cybersource-rest-client-typescript
Version:
NodeJS client for cybersource-rest-client-typescript
198 lines (168 loc) • 8.29 kB
JavaScript
/**
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/Ptsv1pushfundstransferRecipientInformationPaymentInformation', 'model/Ptsv1pushfundstransferRecipientInformationPersonalIdentification'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv1pushfundstransferRecipientInformationPaymentInformation'), require('./Ptsv1pushfundstransferRecipientInformationPersonalIdentification'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv1pushfundstransferRecipientInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformation, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPersonalIdentification);
}
}(this, function(ApiClient, Ptsv1pushfundstransferRecipientInformationPaymentInformation, Ptsv1pushfundstransferRecipientInformationPersonalIdentification) {
'use strict';
/**
* The Ptsv1pushfundstransferRecipientInformation model module.
* @module model/Ptsv1pushfundstransferRecipientInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv1pushfundstransferRecipientInformation</code>.
* @alias module:model/Ptsv1pushfundstransferRecipientInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv1pushfundstransferRecipientInformation</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Ptsv1pushfundstransferRecipientInformation} obj Optional instance to populate.
* @return {module:model/Ptsv1pushfundstransferRecipientInformation} The populated <code>Ptsv1pushfundstransferRecipientInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('paymentInformation')) {
obj['paymentInformation'] = Ptsv1pushfundstransferRecipientInformationPaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('address1')) {
obj['address1'] = ApiClient.convertToType(data['address1'], 'String');
}
if (data.hasOwnProperty('address2')) {
obj['address2'] = ApiClient.convertToType(data['address2'], 'String');
}
if (data.hasOwnProperty('locality')) {
obj['locality'] = ApiClient.convertToType(data['locality'], 'String');
}
if (data.hasOwnProperty('postalCode')) {
obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String');
}
if (data.hasOwnProperty('administrativeArea')) {
obj['administrativeArea'] = ApiClient.convertToType(data['administrativeArea'], 'String');
}
if (data.hasOwnProperty('country')) {
obj['country'] = ApiClient.convertToType(data['country'], 'String');
}
if (data.hasOwnProperty('firstName')) {
obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String');
}
if (data.hasOwnProperty('middleName')) {
obj['middleName'] = ApiClient.convertToType(data['middleName'], 'String');
}
if (data.hasOwnProperty('middleInitial')) {
obj['middleInitial'] = ApiClient.convertToType(data['middleInitial'], 'String');
}
if (data.hasOwnProperty('lastName')) {
obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String');
}
if (data.hasOwnProperty('dateOfBirth')) {
obj['dateOfBirth'] = ApiClient.convertToType(data['dateOfBirth'], 'String');
}
if (data.hasOwnProperty('phoneNumber')) {
obj['phoneNumber'] = ApiClient.convertToType(data['phoneNumber'], 'String');
}
if (data.hasOwnProperty('personalIdentification')) {
obj['personalIdentification'] = Ptsv1pushfundstransferRecipientInformationPersonalIdentification.constructFromObject(data['personalIdentification']);
}
}
return obj;
}
/**
* @member {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* First line of the recipient's address. Required for Mastercard Send. This field is not supported for Visa Platform Connect.
* @member {String} address1
*/
exports.prototype['address1'] = undefined;
/**
* Second line of the recipient's address Optional for Mastercard Send. This field is not supported for Visa Platform Connect.
* @member {String} address2
*/
exports.prototype['address2'] = undefined;
/**
* Recipient city. Required for Mastercard Send.
* @member {String} locality
*/
exports.prototype['locality'] = undefined;
/**
* Recipient postal code. For USA, this must be a valid value of 5 digits or 5 digits hyphen 4 digits, for example '63368', '63368-5555'. For other regions, this can be alphanumeric, length 1-10. Mastercard Send: Required for recipients in Canada and Canadian issued cards.
* @member {String} postalCode
*/
exports.prototype['postalCode'] = undefined;
/**
* The recipient's province, state or territory. Conditional, required if recipient's country is USA or CAN. Must be an ISO 3166-2 uppercase alpha 2 or 3 character country subdivision code. For example, Missouri is MO. Required only for FDCCompass. This field is not supported for Visa Platform Connect.
* @member {String} administrativeArea
*/
exports.prototype['administrativeArea'] = undefined;
/**
* Recipient country code. Use the ISO Standard Alpha Country Codes. https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf Required for Mastercard Send.
* @member {String} country
*/
exports.prototype['country'] = undefined;
/**
* First name of recipient. Visa Platform Connect (14) Chase Paymentech (30) Mastercard Send (40) This field is required for Mastercard Send.
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
/**
* Sender’s middle name. This field is a passthrough, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
* @member {String} middleName
*/
exports.prototype['middleName'] = undefined;
/**
* Middle Initial of recipient. This field is supported by FDC Compass.
* @member {String} middleInitial
*/
exports.prototype['middleInitial'] = undefined;
/**
* Last name of recipient. Visa Platform Connect (14) Paymentech (30) Mastercard Send (40) This field is required for Mastercard Send.
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
/**
* Recipient date of birth in YYYYMMDD format.
* @member {String} dateOfBirth
*/
exports.prototype['dateOfBirth'] = undefined;
/**
* Recipient phone number. This field is supported by FDC Compass. Mastercard Send: Max length is 15 with no dashes or spaces.
* @member {String} phoneNumber
*/
exports.prototype['phoneNumber'] = undefined;
/**
* @member {module:model/Ptsv1pushfundstransferRecipientInformationPersonalIdentification} personalIdentification
*/
exports.prototype['personalIdentification'] = undefined;
return exports;
}));