cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
116 lines (95 loc) • 4.89 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/Ptsv2paymentsPaymentInformationBank', 'model/Ptsv2paymentsPaymentInformationCustomer', 'model/Riskv1decisionsPaymentInformationCard', 'model/Riskv1decisionsPaymentInformationTokenizedCard'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsPaymentInformationBank'), require('./Ptsv2paymentsPaymentInformationCustomer'), require('./Riskv1decisionsPaymentInformationCard'), require('./Riskv1decisionsPaymentInformationTokenizedCard'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Riskv1decisionsPaymentInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsPaymentInformationBank, root.CyberSource.Ptsv2paymentsPaymentInformationCustomer, root.CyberSource.Riskv1decisionsPaymentInformationCard, root.CyberSource.Riskv1decisionsPaymentInformationTokenizedCard);
}
}(this, function(ApiClient, Ptsv2paymentsPaymentInformationBank, Ptsv2paymentsPaymentInformationCustomer, Riskv1decisionsPaymentInformationCard, Riskv1decisionsPaymentInformationTokenizedCard) {
'use strict';
/**
* The Riskv1decisionsPaymentInformation model module.
* @module model/Riskv1decisionsPaymentInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Riskv1decisionsPaymentInformation</code>.
* Contains the payment data for this transaction.
* @alias module:model/Riskv1decisionsPaymentInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Riskv1decisionsPaymentInformation</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/Riskv1decisionsPaymentInformation} obj Optional instance to populate.
* @return {module:model/Riskv1decisionsPaymentInformation} The populated <code>Riskv1decisionsPaymentInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('card')) {
obj['card'] = Riskv1decisionsPaymentInformationCard.constructFromObject(data['card']);
}
if (data.hasOwnProperty('tokenizedCard')) {
obj['tokenizedCard'] = Riskv1decisionsPaymentInformationTokenizedCard.constructFromObject(data['tokenizedCard']);
}
if (data.hasOwnProperty('customer')) {
obj['customer'] = Ptsv2paymentsPaymentInformationCustomer.constructFromObject(data['customer']);
}
if (data.hasOwnProperty('bank')) {
obj['bank'] = Ptsv2paymentsPaymentInformationBank.constructFromObject(data['bank']);
}
if (data.hasOwnProperty('method')) {
obj['method'] = ApiClient.convertToType(data['method'], 'String');
}
}
return obj;
}
/**
* @member {module:model/Riskv1decisionsPaymentInformationCard} card
*/
exports.prototype['card'] = undefined;
/**
* @member {module:model/Riskv1decisionsPaymentInformationTokenizedCard} tokenizedCard
*/
exports.prototype['tokenizedCard'] = undefined;
/**
* @member {module:model/Ptsv2paymentsPaymentInformationCustomer} customer
*/
exports.prototype['customer'] = undefined;
/**
* @member {module:model/Ptsv2paymentsPaymentInformationBank} bank
*/
exports.prototype['bank'] = undefined;
/**
* Method of payment used for the order. This field can contain one of the following values: - `consumer` (default): Customer credit card - `corporate`: Corporate credit card - `debit`: Debit card, such as a Maestro (UK Domestic) card - `cod`: Collect on delivery - `check`: Electronic check - `p2p`: Person-to-person payment - `private1`: Private label credit card - `other`: Other payment method
* @member {String} method
*/
exports.prototype['method'] = undefined;
return exports;
}));