cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
289 lines (249 loc) • 11 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.4.38
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/Ptsv1pullfundstransferRecipientInformationPersonalIdentification'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv1pullfundstransferRecipientInformationPersonalIdentification'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv1pullfundstransferRecipientInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv1pullfundstransferRecipientInformationPersonalIdentification);
}
}(this, function(ApiClient, Ptsv1pullfundstransferRecipientInformationPersonalIdentification) {
'use strict';
/**
* The Ptsv1pullfundstransferRecipientInformation model module.
* @module model/Ptsv1pullfundstransferRecipientInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv1pullfundstransferRecipientInformation</code>.
* @alias module:model/Ptsv1pullfundstransferRecipientInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv1pullfundstransferRecipientInformation</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/Ptsv1pullfundstransferRecipientInformation} obj Optional instance to populate.
* @return {module:model/Ptsv1pullfundstransferRecipientInformation} The populated <code>Ptsv1pullfundstransferRecipientInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('administrativeArea')) {
obj['administrativeArea'] = ApiClient.convertToType(data['administrativeArea'], 'String');
}
if (data.hasOwnProperty('postalCode')) {
obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String');
}
if (data.hasOwnProperty('country')) {
obj['country'] = ApiClient.convertToType(data['country'], 'String');
}
if (data.hasOwnProperty('personalIdentification')) {
obj['personalIdentification'] = Ptsv1pullfundstransferRecipientInformationPersonalIdentification.constructFromObject(data['personalIdentification']);
}
if (data.hasOwnProperty('firstName')) {
obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String');
}
if (data.hasOwnProperty('middleInitial')) {
obj['middleInitial'] = ApiClient.convertToType(data['middleInitial'], 'String');
}
if (data.hasOwnProperty('middleName')) {
obj['middleName'] = ApiClient.convertToType(data['middleName'], 'String');
}
if (data.hasOwnProperty('lastName')) {
obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String');
}
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('buildingNumber')) {
obj['buildingNumber'] = ApiClient.convertToType(data['buildingNumber'], 'String');
}
if (data.hasOwnProperty('locality')) {
obj['locality'] = ApiClient.convertToType(data['locality'], 'String');
}
if (data.hasOwnProperty('identificationNumber')) {
obj['identificationNumber'] = ApiClient.convertToType(data['identificationNumber'], 'String');
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('descriptor')) {
obj['descriptor'] = ApiClient.convertToType(data['descriptor'], 'String');
}
if (data.hasOwnProperty('accountId')) {
obj['accountId'] = ApiClient.convertToType(data['accountId'], 'String');
}
if (data.hasOwnProperty('accountType')) {
obj['accountType'] = ApiClient.convertToType(data['accountType'], 'String');
}
if (data.hasOwnProperty('aliasName')) {
obj['aliasName'] = ApiClient.convertToType(data['aliasName'], 'String');
}
if (data.hasOwnProperty('countryOfBirth')) {
obj['countryOfBirth'] = ApiClient.convertToType(data['countryOfBirth'], 'String');
}
if (data.hasOwnProperty('dateOfBirth')) {
obj['dateOfBirth'] = ApiClient.convertToType(data['dateOfBirth'], 'String');
}
if (data.hasOwnProperty('email')) {
obj['email'] = ApiClient.convertToType(data['email'], 'String');
}
if (data.hasOwnProperty('nationality')) {
obj['nationality'] = ApiClient.convertToType(data['nationality'], 'String');
}
if (data.hasOwnProperty('occupation')) {
obj['occupation'] = ApiClient.convertToType(data['occupation'], 'String');
}
if (data.hasOwnProperty('streetName')) {
obj['streetName'] = ApiClient.convertToType(data['streetName'], 'String');
}
}
return obj;
}
/**
* Recipient's state. Use the State, Province, and Territory Codes for the United States and Canada. Value must be an ISO Standard State Code: https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf
* @member {String} administrativeArea
*/
exports.prototype['administrativeArea'] = undefined;
/**
* Recipient's postal code.
* @member {String} postalCode
*/
exports.prototype['postalCode'] = undefined;
/**
* Recipient's country code. Check that this field contains 2-character alpha ISO 3166-1 standard values.
* @member {String} country
*/
exports.prototype['country'] = undefined;
/**
* @member {module:model/Ptsv1pullfundstransferRecipientInformationPersonalIdentification} personalIdentification
*/
exports.prototype['personalIdentification'] = undefined;
/**
* Recipient's first name.
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
/**
* Middle Initial of recipient. This field is supported by FDC Compass.
* @member {String} middleInitial
*/
exports.prototype['middleInitial'] = undefined;
/**
* Recipient's middle name. This field is a pass through, 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;
/**
* Recipient's last name. Conditional field. If `recipientInformation.sameAsSender` = `false`, this field is mandatory.
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
/**
* Street address of recipient. This field is conditional: it is required if using neither a Customer nor Payment Instrument token.
* @member {String} address1
*/
exports.prototype['address1'] = undefined;
/**
* Second line of the recipient's address.
* @member {String} address2
*/
exports.prototype['address2'] = undefined;
/**
* This field contains the house or the building number of the recipient address.
* @member {String} buildingNumber
*/
exports.prototype['buildingNumber'] = undefined;
/**
* Recipient city.
* @member {String} locality
*/
exports.prototype['locality'] = undefined;
/**
* Government-issued identification number. Conditional: This field is mandatory if the `processingInformation.businessApplicationId` is any of the following: - `AA` - `PP` - `TU` - `BI` - `WT` - `FT` - and country code = `BR`, `AR`, `CO`, `PE`, in `recipientInformation.countryCode` (Argentina, Brazil, Colombia, and Peru)
* @member {String} identificationNumber
*/
exports.prototype['identificationNumber'] = undefined;
/**
* `B` for Business or `I` for individual. Conditional: If `recipientInformation.identificationNumber` is present, then this field is mandatory.
* @member {String} type
*/
exports.prototype['type'] = undefined;
/**
* Recipient first name, this will be concatenated with the 4-digit originator abbreviation.
* @member {String} descriptor
*/
exports.prototype['descriptor'] = undefined;
/**
* Identifier for the recipient's account.
* @member {String} accountId
*/
exports.prototype['accountId'] = undefined;
/**
* Identifies the recipient's account type. This field is applicable for AFT transactions. Valid values are: - `00` Other - `01` Routing transit number (RTN) and bank account - `02` IBAN - `03` Card account - `04` Email - `05` Phone number - `06` Bank account number (BAN) and bank identification code (BIC) - `07` Wallet ID - `08` Social network ID
* @member {String} accountType
*/
exports.prototype['accountType'] = undefined;
/**
* Account owner alias name.
* @member {String} aliasName
*/
exports.prototype['aliasName'] = undefined;
/**
* Account Owner Country of Birth
* @member {String} countryOfBirth
*/
exports.prototype['countryOfBirth'] = undefined;
/**
* Recipient's date of birth. Format: YYYYMMDD.
* @member {String} dateOfBirth
*/
exports.prototype['dateOfBirth'] = undefined;
/**
* Account Owner email address
* @member {String} email
*/
exports.prototype['email'] = undefined;
/**
* Account Owner Nationality
* @member {String} nationality
*/
exports.prototype['nationality'] = undefined;
/**
* Account Owner Occupation
* @member {String} occupation
*/
exports.prototype['occupation'] = undefined;
/**
* This field contains the street name of the recipient's address.
* @member {String} streetName
*/
exports.prototype['streetName'] = undefined;
return exports;
}));