cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
155 lines (139 loc) • 6.3 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'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.MppCredentialsResponse200 = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The MppCredentialsResponse200 model module.
* @module model/MppCredentialsResponse200
* @version 0.0.1
*/
/**
* Constructs a new <code>MppCredentialsResponse200</code>.
* MPP payment credentials response. The 'token' field Contains the RSA-OAEP encrypted network token ciphertext. All other fields are display-only metadata.
* @alias module:model/MppCredentialsResponse200
* @class
* @param token {String} Base64-encoded RSA-OAEP encrypted token ciphertext. Must not be parsed by client/server — forwarded opaquely to the Server Enabler.
* @param network {String} Card network. Possible values: - `visa` - `mastercard` - `amex` - `discover`
* @param lastFour {String} Last four digits of the card number as displayed to cardholder.
* @param expirationMonth {String} Token expiration month (e.g., '06'). Display only.
* @param expirationYear {String} Token expiration year, four digits (e.g., '2028'). Display only.
* @param dynamicData {String} Base64-encoded cryptogram from TSP. Present only for network_token type. Display only.
* @param eci {String} Electronic Commerce Indicator (e.g., '05', '07'). Present only for network_token type. Display only.
* @param paymentAccountReference {String} Payment Account Reference — a stable reference to the underlying funding account.
*/
var exports = function(token, network, lastFour, expirationMonth, expirationYear, dynamicData, eci, paymentAccountReference) {
var _this = this;
_this['token'] = token;
_this['network'] = network;
_this['lastFour'] = lastFour;
_this['expirationMonth'] = expirationMonth;
_this['expirationYear'] = expirationYear;
_this['dynamicData'] = dynamicData;
_this['eci'] = eci;
_this['paymentAccountReference'] = paymentAccountReference;
};
/**
* Constructs a <code>MppCredentialsResponse200</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/MppCredentialsResponse200} obj Optional instance to populate.
* @return {module:model/MppCredentialsResponse200} The populated <code>MppCredentialsResponse200</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('token')) {
obj['token'] = ApiClient.convertToType(data['token'], 'String');
}
if (data.hasOwnProperty('network')) {
obj['network'] = ApiClient.convertToType(data['network'], 'String');
}
if (data.hasOwnProperty('lastFour')) {
obj['lastFour'] = ApiClient.convertToType(data['lastFour'], '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('dynamicData')) {
obj['dynamicData'] = ApiClient.convertToType(data['dynamicData'], 'String');
}
if (data.hasOwnProperty('eci')) {
obj['eci'] = ApiClient.convertToType(data['eci'], 'String');
}
if (data.hasOwnProperty('paymentAccountReference')) {
obj['paymentAccountReference'] = ApiClient.convertToType(data['paymentAccountReference'], 'String');
}
}
return obj;
}
/**
* Base64-encoded RSA-OAEP encrypted token ciphertext. Must not be parsed by client/server — forwarded opaquely to the Server Enabler.
* @member {String} token
*/
exports.prototype['token'] = undefined;
/**
* Card network. Possible values: - `visa` - `mastercard` - `amex` - `discover`
* @member {String} network
*/
exports.prototype['network'] = undefined;
/**
* Last four digits of the card number as displayed to cardholder.
* @member {String} lastFour
*/
exports.prototype['lastFour'] = undefined;
/**
* Token expiration month (e.g., '06'). Display only.
* @member {String} expirationMonth
*/
exports.prototype['expirationMonth'] = undefined;
/**
* Token expiration year, four digits (e.g., '2028'). Display only.
* @member {String} expirationYear
*/
exports.prototype['expirationYear'] = undefined;
/**
* Base64-encoded cryptogram from TSP. Present only for network_token type. Display only.
* @member {String} dynamicData
*/
exports.prototype['dynamicData'] = undefined;
/**
* Electronic Commerce Indicator (e.g., '05', '07'). Present only for network_token type. Display only.
* @member {String} eci
*/
exports.prototype['eci'] = undefined;
/**
* Payment Account Reference — a stable reference to the underlying funding account.
* @member {String} paymentAccountReference
*/
exports.prototype['paymentAccountReference'] = undefined;
return exports;
}));