cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
182 lines (154 loc) • 7.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', 'model/CardProcessingConfigCommonCurrencies', 'model/CardProcessingConfigCommonPaymentTypes'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./CardProcessingConfigCommonCurrencies'), require('./CardProcessingConfigCommonPaymentTypes'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.CardProcessingConfigCommonAcquirers = factory(root.CyberSource.ApiClient, root.CyberSource.CardProcessingConfigCommonCurrencies, root.CyberSource.CardProcessingConfigCommonPaymentTypes);
}
}(this, function(ApiClient, CardProcessingConfigCommonCurrencies, CardProcessingConfigCommonPaymentTypes) {
'use strict';
/**
* The CardProcessingConfigCommonAcquirers model module.
* @module model/CardProcessingConfigCommonAcquirers
* @version 0.0.1
*/
/**
* Constructs a new <code>CardProcessingConfigCommonAcquirers</code>.
* @alias module:model/CardProcessingConfigCommonAcquirers
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CardProcessingConfigCommonAcquirers</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/CardProcessingConfigCommonAcquirers} obj Optional instance to populate.
* @return {module:model/CardProcessingConfigCommonAcquirers} The populated <code>CardProcessingConfigCommonAcquirers</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('institutionId')) {
obj['institutionId'] = ApiClient.convertToType(data['institutionId'], 'String');
}
if (data.hasOwnProperty('interbankCardAssociationId')) {
obj['interbankCardAssociationId'] = ApiClient.convertToType(data['interbankCardAssociationId'], 'String');
}
if (data.hasOwnProperty('discoverInstitutionId')) {
obj['discoverInstitutionId'] = ApiClient.convertToType(data['discoverInstitutionId'], 'String');
}
if (data.hasOwnProperty('countryCode')) {
obj['countryCode'] = ApiClient.convertToType(data['countryCode'], 'String');
}
if (data.hasOwnProperty('fileDestinationBin')) {
obj['fileDestinationBin'] = ApiClient.convertToType(data['fileDestinationBin'], 'String');
}
if (data.hasOwnProperty('merchantVerificationValue')) {
obj['merchantVerificationValue'] = ApiClient.convertToType(data['merchantVerificationValue'], 'String');
}
if (data.hasOwnProperty('merchantId')) {
obj['merchantId'] = ApiClient.convertToType(data['merchantId'], 'String');
}
if (data.hasOwnProperty('terminalId')) {
obj['terminalId'] = ApiClient.convertToType(data['terminalId'], 'String');
}
if (data.hasOwnProperty('allowMultipleBills')) {
obj['allowMultipleBills'] = ApiClient.convertToType(data['allowMultipleBills'], 'Boolean');
}
if (data.hasOwnProperty('enableTransactionReferenceNumber')) {
obj['enableTransactionReferenceNumber'] = ApiClient.convertToType(data['enableTransactionReferenceNumber'], 'Boolean');
}
if (data.hasOwnProperty('paymentTypes')) {
obj['paymentTypes'] = ApiClient.convertToType(data['paymentTypes'], {'String': CardProcessingConfigCommonPaymentTypes});
}
if (data.hasOwnProperty('currencies')) {
obj['currencies'] = ApiClient.convertToType(data['currencies'], {'String': CardProcessingConfigCommonCurrencies});
}
}
return obj;
}
/**
* Identifier of the acquirer. This number is usually assigned by Visa.
* @member {String} institutionId
*/
exports.prototype['institutionId'] = undefined;
/**
* Number assigned by MasterCard to banks to identify the member in transactions.
* @member {String} interbankCardAssociationId
*/
exports.prototype['interbankCardAssociationId'] = undefined;
/**
* Assigned by Discover to identify the acquirer.
* @member {String} discoverInstitutionId
*/
exports.prototype['discoverInstitutionId'] = undefined;
/**
* ISO 4217 format.
* @member {String} countryCode
*/
exports.prototype['countryCode'] = undefined;
/**
* The BIN to which this capturefile is sent. This field must contain a valid BIN.
* @member {String} fileDestinationBin
*/
exports.prototype['fileDestinationBin'] = undefined;
/**
* Identify merchants that participate in Select Merchant Fee (SMF) programs. Unique to the merchant.
* @member {String} merchantVerificationValue
*/
exports.prototype['merchantVerificationValue'] = undefined;
/**
* Merchant ID assigned by an acquirer or a processor. Should not be overriden by any other party.
* @member {String} merchantId
*/
exports.prototype['merchantId'] = undefined;
/**
* The 'Terminal Id' aka TID, is an identifier used for with your payments processor. Depending on the processor and payment acceptance type this may also be the default Terminal ID used for Card Present and Virtual Terminal transactions.
* @member {String} terminalId
*/
exports.prototype['terminalId'] = undefined;
/**
* Allows multiple captures for a single authorization transaction.
* @member {Boolean} allowMultipleBills
*/
exports.prototype['allowMultipleBills'] = undefined;
/**
* To enable merchant to send in transaction reference number (unique reconciliation ID).
* @member {Boolean} enableTransactionReferenceNumber
*/
exports.prototype['enableTransactionReferenceNumber'] = undefined;
/**
* Valid values are: * VISA * MASTERCARD * AMERICAN_EXPRESS * CUP * EFTPOS * DINERS_CLUB * DISCOVER * JCB
* @member {Object.<String, module:model/CardProcessingConfigCommonPaymentTypes>} paymentTypes
*/
exports.prototype['paymentTypes'] = undefined;
/**
* Three-character [ISO 4217 ALPHA-3 Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf)
* @member {Object.<String, module:model/CardProcessingConfigCommonCurrencies>} currencies
*/
exports.prototype['currencies'] = undefined;
return exports;
}));