cybersource-rest-client-typescript
Version:
NodeJS client for cybersource-rest-client-typescript
224 lines (191 loc) • 9.36 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/Ptsv1pushfundstransferSenderInformationAccount', 'model/Ptsv1pushfundstransferSenderInformationPaymentInformation', 'model/Ptsv1pushfundstransferSenderInformationPersonalIdentification'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv1pushfundstransferSenderInformationAccount'), require('./Ptsv1pushfundstransferSenderInformationPaymentInformation'), require('./Ptsv1pushfundstransferSenderInformationPersonalIdentification'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv1pushfundstransferSenderInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv1pushfundstransferSenderInformationAccount, root.CyberSource.Ptsv1pushfundstransferSenderInformationPaymentInformation, root.CyberSource.Ptsv1pushfundstransferSenderInformationPersonalIdentification);
}
}(this, function(ApiClient, Ptsv1pushfundstransferSenderInformationAccount, Ptsv1pushfundstransferSenderInformationPaymentInformation, Ptsv1pushfundstransferSenderInformationPersonalIdentification) {
'use strict';
/**
* The Ptsv1pushfundstransferSenderInformation model module.
* @module model/Ptsv1pushfundstransferSenderInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv1pushfundstransferSenderInformation</code>.
* @alias module:model/Ptsv1pushfundstransferSenderInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv1pushfundstransferSenderInformation</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/Ptsv1pushfundstransferSenderInformation} obj Optional instance to populate.
* @return {module:model/Ptsv1pushfundstransferSenderInformation} The populated <code>Ptsv1pushfundstransferSenderInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('firstName')) {
obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String');
}
if (data.hasOwnProperty('lastName')) {
obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String');
}
if (data.hasOwnProperty('middleName')) {
obj['middleName'] = ApiClient.convertToType(data['middleName'], 'String');
}
if (data.hasOwnProperty('postalCode')) {
obj['postalCode'] = ApiClient.convertToType(data['postalCode'], '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('locality')) {
obj['locality'] = ApiClient.convertToType(data['locality'], '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('vatRegistrationNumber')) {
obj['vatRegistrationNumber'] = ApiClient.convertToType(data['vatRegistrationNumber'], '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('paymentInformation')) {
obj['paymentInformation'] = Ptsv1pushfundstransferSenderInformationPaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('referenceNumber')) {
obj['referenceNumber'] = ApiClient.convertToType(data['referenceNumber'], 'String');
}
if (data.hasOwnProperty('account')) {
obj['account'] = Ptsv1pushfundstransferSenderInformationAccount.constructFromObject(data['account']);
}
if (data.hasOwnProperty('personalIdentification')) {
obj['personalIdentification'] = Ptsv1pushfundstransferSenderInformationPersonalIdentification.constructFromObject(data['personalIdentification']);
}
}
return obj;
}
/**
* Name of sender. Funds Disbursement This value is the name of the originator sending the funds disbursement.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* This field contains the first name of the entity funding the transaction.
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
/**
* This field contains the last name of the entity funding the transaction.
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
/**
* Supported only for Mastercard transactions. This field contains the middle name of the entity funding the transaction
* @member {String} middleName
*/
exports.prototype['middleName'] = undefined;
/**
* Sender’s 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. Required for FDCCompass.
* @member {String} postalCode
*/
exports.prototype['postalCode'] = undefined;
/**
* Street address of sender. Funds Disbursement This value is the address of the originator sending the funds disbursement. Visa Platform Connect Required for transactions using business application id of AA, BI, PP, and WT.
* @member {String} address1
*/
exports.prototype['address1'] = undefined;
/**
* Used for additional address information. For example: Attention: Accounts Payable Optional field. This field is supported for only Mastercard Send.
* @member {String} address2
*/
exports.prototype['address2'] = undefined;
/**
* The sender's city Visa Platform Connect Required for transactions using business application id of AA, BI, PP, and WT.
* @member {String} locality
*/
exports.prototype['locality'] = undefined;
/**
* Sender’s state. Use the State, Province, and Territory Codes for the United States and Canada.The sender's province, state or territory. Conditional, required if sender's country is USA or CAN. Must be uppercase alpha 2 or 3 character country subdivision code. See https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf
* @member {String} administrativeArea
*/
exports.prototype['administrativeArea'] = undefined;
/**
* Sender's country code. Use ISO Standard Alpha Country Codes. https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf Visa Platform Connect Required for transactions using business application id of AA, BI, PP, and WT. Required for Mastercard Send
* @member {String} country
*/
exports.prototype['country'] = undefined;
/**
* Customer's government-assigned tax identification number.
* @member {String} vatRegistrationNumber
*/
exports.prototype['vatRegistrationNumber'] = undefined;
/**
* Sender’s date of birth in YYYYMMDD format.
* @member {String} dateOfBirth
*/
exports.prototype['dateOfBirth'] = undefined;
/**
* Sender’s phone number.
* @member {String} phoneNumber
*/
exports.prototype['phoneNumber'] = undefined;
/**
* @member {module:model/Ptsv1pushfundstransferSenderInformationPaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* Reference number generated by you that uniquely identifies the sender.
* @member {String} referenceNumber
*/
exports.prototype['referenceNumber'] = undefined;
/**
* @member {module:model/Ptsv1pushfundstransferSenderInformationAccount} account
*/
exports.prototype['account'] = undefined;
/**
* @member {module:model/Ptsv1pushfundstransferSenderInformationPersonalIdentification} personalIdentification
*/
exports.prototype['personalIdentification'] = undefined;
return exports;
}));