cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
164 lines (138 loc) • 7.75 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/Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv2paymentsProcessingInformationJapanPaymentOptions = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses);
}
}(this, function(ApiClient, Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses) {
'use strict';
/**
* The Ptsv2paymentsProcessingInformationJapanPaymentOptions model module.
* @module model/Ptsv2paymentsProcessingInformationJapanPaymentOptions
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv2paymentsProcessingInformationJapanPaymentOptions</code>.
* @alias module:model/Ptsv2paymentsProcessingInformationJapanPaymentOptions
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv2paymentsProcessingInformationJapanPaymentOptions</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/Ptsv2paymentsProcessingInformationJapanPaymentOptions} obj Optional instance to populate.
* @return {module:model/Ptsv2paymentsProcessingInformationJapanPaymentOptions} The populated <code>Ptsv2paymentsProcessingInformationJapanPaymentOptions</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('paymentMethod')) {
obj['paymentMethod'] = ApiClient.convertToType(data['paymentMethod'], 'String');
}
if (data.hasOwnProperty('bonuses')) {
obj['bonuses'] = ApiClient.convertToType(data['bonuses'], [Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses]);
}
if (data.hasOwnProperty('preapprovalType')) {
obj['preapprovalType'] = ApiClient.convertToType(data['preapprovalType'], 'String');
}
if (data.hasOwnProperty('installments')) {
obj['installments'] = ApiClient.convertToType(data['installments'], 'String');
}
if (data.hasOwnProperty('terminalId')) {
obj['terminalId'] = ApiClient.convertToType(data['terminalId'], 'String');
}
if (data.hasOwnProperty('firstBillingMonth')) {
obj['firstBillingMonth'] = ApiClient.convertToType(data['firstBillingMonth'], 'String');
}
if (data.hasOwnProperty('businessName')) {
obj['businessName'] = ApiClient.convertToType(data['businessName'], 'String');
}
if (data.hasOwnProperty('businessNameKatakana')) {
obj['businessNameKatakana'] = ApiClient.convertToType(data['businessNameKatakana'], 'String');
}
if (data.hasOwnProperty('jis2TrackData')) {
obj['jis2TrackData'] = ApiClient.convertToType(data['jis2TrackData'], 'String');
}
if (data.hasOwnProperty('businessNameAlphaNumeric')) {
obj['businessNameAlphaNumeric'] = ApiClient.convertToType(data['businessNameAlphaNumeric'], 'String');
}
}
return obj;
}
/**
* This value is a 2-digit code indicating the payment method. Use Payment Method Code value that applies to the tranasction. - 10 (One-time payment) - 21, 22, 23, 24 (Bonus(one-time)payment) - 61 (Installment payment) - 31, 32, 33, 34 (Integrated (Bonus + Installment)payment) - 80 (Revolving payment)
* @member {String} paymentMethod
*/
exports.prototype['paymentMethod'] = undefined;
/**
* An array of objects, each of which contains a bonus month and bonus amount. Length of bonuses array is equal to the number of bonuses. Max length = 6. In case of bonus month and amount not specified, null objects to be returned in the array. Example: bonuses : [ {\"month\": \"1\",\"amount\": \"200\"}, {\"month\": \"3\",\"amount\": \"2500\"}, null]
* @member {Array.<module:model/Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses>} bonuses
*/
exports.prototype['bonuses'] = undefined;
/**
* This will contain the details of the kind of transaction that has been processe. Used only for Japan. Possible Values: - 0 = Normal (authorization with amount and clearing/settlement; data capture or paper draft) - 1 = Negative card authorization (authorization-only with 0 or 1 amount) - 2 = Reservation of authorization (authorization-only with amount) - 3 = Cancel transaction - 4 = Merchant-initiated reversal/refund transactions - 5 = Cancel reservation of authorization - 6 = Post authorization
* @member {String} preapprovalType
*/
exports.prototype['preapprovalType'] = undefined;
/**
* Number of Installments.
* @member {String} installments
*/
exports.prototype['installments'] = undefined;
/**
* Unique Japan Credit Card Association (JCCA) terminal identifier. The difference between this field and the `pointOfSaleInformation.terminalID` field is that you can define `pointOfSaleInformation.terminalID`, but `processingInformation.japanPaymentOptions.terminalId` is defined by the JCCA and is used only in Japan. This field is supported only on CyberSource through VisaNet and JCN Gateway. Optional field.
* @member {String} terminalId
*/
exports.prototype['terminalId'] = undefined;
/**
* Billing month in MM format.
* @member {String} firstBillingMonth
*/
exports.prototype['firstBillingMonth'] = undefined;
/**
* Business name in Japanese characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
* @member {String} businessName
*/
exports.prototype['businessName'] = undefined;
/**
* Business name in Katakana characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
* @member {String} businessNameKatakana
*/
exports.prototype['businessNameKatakana'] = undefined;
/**
* Japanese Industrial Standard Type 2 (JIS2) track data from the front of the card. This field is supported only on CyberSource through VisaNet and JCN Gateway. Optional field.
* @member {String} jis2TrackData
*/
exports.prototype['jis2TrackData'] = undefined;
/**
* Business name in alphanumeric characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
* @member {String} businessNameAlphaNumeric
*/
exports.prototype['businessNameAlphaNumeric'] = undefined;
return exports;
}));