cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
109 lines (89 loc) • 4.76 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/Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.GetSubscriptionResponse1PaymentInstrumentBuyerInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification);
}
}(this, function(ApiClient, Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification) {
'use strict';
/**
* The GetSubscriptionResponse1PaymentInstrumentBuyerInformation model module.
* @module model/GetSubscriptionResponse1PaymentInstrumentBuyerInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>GetSubscriptionResponse1PaymentInstrumentBuyerInformation</code>.
* @alias module:model/GetSubscriptionResponse1PaymentInstrumentBuyerInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>GetSubscriptionResponse1PaymentInstrumentBuyerInformation</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/GetSubscriptionResponse1PaymentInstrumentBuyerInformation} obj Optional instance to populate.
* @return {module:model/GetSubscriptionResponse1PaymentInstrumentBuyerInformation} The populated <code>GetSubscriptionResponse1PaymentInstrumentBuyerInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('companyTaxID')) {
obj['companyTaxID'] = ApiClient.convertToType(data['companyTaxID'], 'String');
}
if (data.hasOwnProperty('currency')) {
obj['currency'] = ApiClient.convertToType(data['currency'], 'String');
}
if (data.hasOwnProperty('dateOfBirth')) {
obj['dateOfBirth'] = ApiClient.convertToType(data['dateOfBirth'], 'Date');
}
if (data.hasOwnProperty('personalIdentification')) {
obj['personalIdentification'] = ApiClient.convertToType(data['personalIdentification'], [Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification]);
}
}
return obj;
}
/**
* Company's tax identifier. This is only used for eCheck service.
* @member {String} companyTaxID
*/
exports.prototype['companyTaxID'] = undefined;
/**
* Currency used for the order. Use the three-character I[ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf).
* @member {String} currency
*/
exports.prototype['currency'] = undefined;
/**
* Date of birth of the customer. Format: YYYY-MM-DD
* @member {Date} dateOfBirth
*/
exports.prototype['dateOfBirth'] = undefined;
/**
* @member {Array.<module:model/Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification>} personalIdentification
*/
exports.prototype['personalIdentification'] = undefined;
return exports;
}));