cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
164 lines (138 loc) • 5.57 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/Tmsv2TokenizedCardCardTermsAndConditions'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Tmsv2TokenizedCardCardTermsAndConditions'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Tmsv2TokenizedCardCard = factory(root.CyberSource.ApiClient, root.CyberSource.Tmsv2TokenizedCardCardTermsAndConditions);
}
}(this, function(ApiClient, Tmsv2TokenizedCardCardTermsAndConditions) {
'use strict';
/**
* The Tmsv2TokenizedCardCard model module.
* @module model/Tmsv2TokenizedCardCard
* @version 0.0.1
*/
/**
* Constructs a new <code>Tmsv2TokenizedCardCard</code>.
* Card object used to create a network token
* @alias module:model/Tmsv2TokenizedCardCard
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Tmsv2TokenizedCardCard</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/Tmsv2TokenizedCardCard} obj Optional instance to populate.
* @return {module:model/Tmsv2TokenizedCardCard} The populated <code>Tmsv2TokenizedCardCard</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('number')) {
obj['number'] = ApiClient.convertToType(data['number'], 'String');
}
if (data.hasOwnProperty('expirationMonth')) {
obj['expirationMonth'] = ApiClient.convertToType(data['expirationMonth'], 'String');
}
if (data.hasOwnProperty('expirationYear')) {
obj['expirationYear'] = ApiClient.convertToType(data['expirationYear'], 'String');
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('suffix')) {
obj['suffix'] = ApiClient.convertToType(data['suffix'], 'String');
}
if (data.hasOwnProperty('issueDate')) {
obj['issueDate'] = ApiClient.convertToType(data['issueDate'], 'Date');
}
if (data.hasOwnProperty('activationDate')) {
obj['activationDate'] = ApiClient.convertToType(data['activationDate'], 'Date');
}
if (data.hasOwnProperty('expirationPrinted')) {
obj['expirationPrinted'] = ApiClient.convertToType(data['expirationPrinted'], 'Boolean');
}
if (data.hasOwnProperty('securityCodePrinted')) {
obj['securityCodePrinted'] = ApiClient.convertToType(data['securityCodePrinted'], 'Boolean');
}
if (data.hasOwnProperty('termsAndConditions')) {
obj['termsAndConditions'] = Tmsv2TokenizedCardCardTermsAndConditions.constructFromObject(data['termsAndConditions']);
}
}
return obj;
}
/**
* The customer's payment card number, also known as the Primary Account Number (PAN).
* @member {String} number
*/
exports.prototype['number'] = undefined;
/**
* Two-digit month in which the payment card expires. Format: `MM`. Possible Values: `01` through `12`.
* @member {String} expirationMonth
*/
exports.prototype['expirationMonth'] = undefined;
/**
* Four-digit year in which the credit card expires. Format: `YYYY`.
* @member {String} expirationYear
*/
exports.prototype['expirationYear'] = undefined;
/**
* The type of card (Card Network). Possible Values: - 001: visa
* @member {String} type
*/
exports.prototype['type'] = undefined;
/**
* The customer's latest payment card number suffix.
* @member {String} suffix
*/
exports.prototype['suffix'] = undefined;
/**
* Card issuance date. XML date format: YYYY-MM-DD.
* @member {Date} issueDate
*/
exports.prototype['issueDate'] = undefined;
/**
* Card activation date. XML date format: YYYY-MM-DD
* @member {Date} activationDate
*/
exports.prototype['activationDate'] = undefined;
/**
* Indicates if the expiration date is printed on the card.
* @member {Boolean} expirationPrinted
*/
exports.prototype['expirationPrinted'] = undefined;
/**
* Indicates if the Card Verification Number is printed on the card.
* @member {Boolean} securityCodePrinted
*/
exports.prototype['securityCodePrinted'] = undefined;
/**
* @member {module:model/Tmsv2TokenizedCardCardTermsAndConditions} termsAndConditions
*/
exports.prototype['termsAndConditions'] = undefined;
return exports;
}));