cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
172 lines (145 loc) • 7.14 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/Ptsv2paymentsSenderInformationAccount'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsSenderInformationAccount'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv2paymentsSenderInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsSenderInformationAccount);
}
}(this, function(ApiClient, Ptsv2paymentsSenderInformationAccount) {
'use strict';
/**
* The Ptsv2paymentsSenderInformation model module.
* @module model/Ptsv2paymentsSenderInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv2paymentsSenderInformation</code>.
* @alias module:model/Ptsv2paymentsSenderInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv2paymentsSenderInformation</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/Ptsv2paymentsSenderInformation} obj Optional instance to populate.
* @return {module:model/Ptsv2paymentsSenderInformation} The populated <code>Ptsv2paymentsSenderInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
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('lastName')) {
obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String');
}
if (data.hasOwnProperty('address1')) {
obj['address1'] = ApiClient.convertToType(data['address1'], '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('countryCode')) {
obj['countryCode'] = ApiClient.convertToType(data['countryCode'], 'String');
}
if (data.hasOwnProperty('aliasName')) {
obj['aliasName'] = ApiClient.convertToType(data['aliasName'], 'String');
}
if (data.hasOwnProperty('referenceNumber')) {
obj['referenceNumber'] = ApiClient.convertToType(data['referenceNumber'], 'String');
}
if (data.hasOwnProperty('account')) {
obj['account'] = Ptsv2paymentsSenderInformationAccount.constructFromObject(data['account']);
}
if (data.hasOwnProperty('postalCode')) {
obj['postalCode'] = ApiClient.convertToType(data['postalCode'], 'String');
}
}
return obj;
}
/**
* First name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported.Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to the processor.
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
/**
* Middle name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
* @member {String} middleName
*/
exports.prototype['middleName'] = undefined;
/**
* Last name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
/**
* The street address of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
* @member {String} address1
*/
exports.prototype['address1'] = undefined;
/**
* The city or locality of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
* @member {String} locality
*/
exports.prototype['locality'] = undefined;
/**
* The state or province of the sender. This field is applicable for AFT transactions when the sender country is US or CA. Else it is optional. Must be a two character value
* @member {String} administrativeArea
*/
exports.prototype['administrativeArea'] = undefined;
/**
* The country associated with the address of the sender. This field is applicable for AFT transactions. Must be a two character ISO country code. For example, see [ISO Country Code](https://developer.cybersource.com/docs/cybs/en-us/country-codes/reference/all/na/country-codes/country-codes.html)
* @member {String} countryCode
*/
exports.prototype['countryCode'] = undefined;
/**
* Sender's alias name.
* @member {String} aliasName
*/
exports.prototype['aliasName'] = undefined;
/**
* This field is applicable for AFT transactions. Contains a transaction reference number provided by the Merchant. Only alpha numeric values are supported.
* @member {String} referenceNumber
*/
exports.prototype['referenceNumber'] = undefined;
/**
* @member {module:model/Ptsv2paymentsSenderInformationAccount} account
*/
exports.prototype['account'] = undefined;
/**
* Postal code of sender.
* @member {String} postalCode
*/
exports.prototype['postalCode'] = undefined;
return exports;
}));