UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

143 lines (119 loc) 6.6 kB
/** * 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/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer', 'model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier', 'model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer'), require('./Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier'), require('./Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformationCard = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier, root.CyberSource.Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument); } }(this, function(ApiClient, Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer, Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier, Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument) { 'use strict'; /** * The Ptsv1pushfundstransferRecipientInformationPaymentInformationCard model module. * @module model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCard * @version 0.0.1 */ /** * Constructs a new <code>Ptsv1pushfundstransferRecipientInformationPaymentInformationCard</code>. * @alias module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCard * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv1pushfundstransferRecipientInformationPaymentInformationCard</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/Ptsv1pushfundstransferRecipientInformationPaymentInformationCard} obj Optional instance to populate. * @return {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCard} The populated <code>Ptsv1pushfundstransferRecipientInformationPaymentInformationCard</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } if (data.hasOwnProperty('securityCode')) { obj['securityCode'] = ApiClient.convertToType(data['securityCode'], 'String'); } 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('customer')) { obj['customer'] = Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer.constructFromObject(data['customer']); } if (data.hasOwnProperty('paymentInstrument')) { obj['paymentInstrument'] = Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument.constructFromObject(data['paymentInstrument']); } if (data.hasOwnProperty('instrumentIdentifier')) { obj['instrumentIdentifier'] = Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier.constructFromObject(data['instrumentIdentifier']); } } return obj; } /** * - `001`: Visa - `002`: Mastercard, Eurocard, which is a European regional brand of Mastercard. - `033`: Visa Electron - `024`: Maestro - `042`: Maestro International * @member {String} type */ exports.prototype['type'] = undefined; /** * 3-digit value that indicates the cardCvv2Value. Values can be 0-9. * @member {String} securityCode */ exports.prototype['securityCode'] = undefined; /** * The customer's payment card number, also known as the Primary Account Number (PAN). Conditional: this field is required if not using tokens. * @member {String} number */ exports.prototype['number'] = undefined; /** * Two-digit month in which the payment card expires. Format: MM. Valid values: 01 through 12. Leading 0 is required. * @member {String} expirationMonth */ exports.prototype['expirationMonth'] = undefined; /** * Four-digit year in which the payment card expires. Format: YYYY. * @member {String} expirationYear */ exports.prototype['expirationYear'] = undefined; /** * @member {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardCustomer} customer */ exports.prototype['customer'] = undefined; /** * @member {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardPaymentInstrument} paymentInstrument */ exports.prototype['paymentInstrument'] = undefined; /** * @member {module:model/Ptsv1pushfundstransferRecipientInformationPaymentInformationCardInstrumentIdentifier} instrumentIdentifier */ exports.prototype['instrumentIdentifier'] = undefined; return exports; }));