UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

169 lines (142 loc) 11.2 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/TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions', 'model/TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions', 'model/TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions', 'model/TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions'), require('./TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions'), require('./TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions'), require('./TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformation = factory(root.CyberSource.ApiClient, root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions, root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions, root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions, root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions); } }(this, function(ApiClient, TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions, TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions, TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions, TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions) { 'use strict'; /** * The TssV2TransactionsGet200ResponseProcessingInformation model module. * @module model/TssV2TransactionsGet200ResponseProcessingInformation * @version 0.0.1 */ /** * Constructs a new <code>TssV2TransactionsGet200ResponseProcessingInformation</code>. * @alias module:model/TssV2TransactionsGet200ResponseProcessingInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>TssV2TransactionsGet200ResponseProcessingInformation</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/TssV2TransactionsGet200ResponseProcessingInformation} obj Optional instance to populate. * @return {module:model/TssV2TransactionsGet200ResponseProcessingInformation} The populated <code>TssV2TransactionsGet200ResponseProcessingInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('binSource')) { obj['binSource'] = ApiClient.convertToType(data['binSource'], 'String'); } if (data.hasOwnProperty('industryDataType')) { obj['industryDataType'] = ApiClient.convertToType(data['industryDataType'], 'String'); } if (data.hasOwnProperty('paymentSolution')) { obj['paymentSolution'] = ApiClient.convertToType(data['paymentSolution'], 'String'); } if (data.hasOwnProperty('commerceIndicator')) { obj['commerceIndicator'] = ApiClient.convertToType(data['commerceIndicator'], 'String'); } if (data.hasOwnProperty('commerceIndicatorLabel')) { obj['commerceIndicatorLabel'] = ApiClient.convertToType(data['commerceIndicatorLabel'], 'String'); } if (data.hasOwnProperty('businessApplicationId')) { obj['businessApplicationId'] = ApiClient.convertToType(data['businessApplicationId'], 'String'); } if (data.hasOwnProperty('authorizationOptions')) { obj['authorizationOptions'] = TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions.constructFromObject(data['authorizationOptions']); } if (data.hasOwnProperty('bankTransferOptions')) { obj['bankTransferOptions'] = TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions.constructFromObject(data['bankTransferOptions']); } if (data.hasOwnProperty('captureOptions')) { obj['captureOptions'] = TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions.constructFromObject(data['captureOptions']); } if (data.hasOwnProperty('reconciliationId')) { obj['reconciliationId'] = ApiClient.convertToType(data['reconciliationId'], 'String'); } if (data.hasOwnProperty('japanPaymentOptions')) { obj['japanPaymentOptions'] = TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions.constructFromObject(data['japanPaymentOptions']); } } return obj; } /** * Bin Source File Identifier. Possible values: - itmx - rupay * @member {String} binSource */ exports.prototype['binSource'] = undefined; /** * Indicates that the transaction includes industry-specific data. Possible Values: - `airline` - `restaurant` - `lodging` - `auto_rental` - `transit` - `healthcare_medical` - `healthcare_transit` - `transit` #### Card Present, Airlines and Auto Rental You must set this field to `airline` in order for airline data to be sent to the processor. For example, if this field is not set to `airline` or is not included in the request, no airline data is sent to the processor. You must set this field to `restaurant` in order for restaurant data to be sent to the processor. When this field is not set to `restaurant` or is not included in the request, no restaurant data is sent to the processor. You must set this field to `auto_rental` in order for auto rental data to be sent to the processor. For example, if this field is not set to `auto_rental` or is not included in the request, no auto rental data is sent to the processor. Restaurant data is supported only on CyberSource through VisaNet. * @member {String} industryDataType */ exports.prototype['industryDataType'] = undefined; /** * Type of digital payment solution for the transaction. * @member {String} paymentSolution */ exports.prototype['paymentSolution'] = undefined; /** * Type of transaction. Some payment card companies use this information when determining discount rates. #### Used by **Authorization** Required payer authentication transactions; otherwise, optional. **Credit** Required for standalone credits on Chase Paymentech solutions; otherwise, optional. The list of valid values in this field depends on your processor. #### Ingenico ePayments When you omit this field for Ingenico ePayments, the processor uses the default transaction type they have on file for you instead of the default value #### Card Present You must set this field to `retail`. This field is required for a card-present transaction. Note that this should ONLY be used when the cardholder and card are present at the time of the transaction. For all keyed transactions originated from a POS terminal where the cardholder and card are not present, commerceIndicator should be submitted as \"moto\" * @member {String} commerceIndicator */ exports.prototype['commerceIndicator'] = undefined; /** * Type of transaction. Some payment card companies use this information when determining discount rates. #### Used by **Authorization** Required payer authentication transactions; otherwise, optional. **Credit** Required for standalone credits on Chase Paymentech solutions; otherwise, optional. The list of valid values in this field depends on your processor. #### Ingenico ePayments When you omit this field for Ingenico ePayments, the processor uses the default transaction type they have on file for you instead of the default value #### Card Present You must set this field to `retail`. This field is required for a card-present transaction. Note that this should ONLY be used when the cardholder and card are present at the time of the transaction. For all keyed transactions originated from a POS terminal where the cardholder and card are not present, commerceIndicator should be submitted as `moto` * @member {String} commerceIndicatorLabel */ exports.prototype['commerceIndicatorLabel'] = undefined; /** * Required for AFT and OCT transactions. Given below is a list of all the BAI values available. However, the processors may support only few specific BAI values. - AA : Account-to-account - BB : Supplier Payments - BI : Bank-Initiated P2P Money Transfer - BP : Non-Card Bill Pay/Bill Pay - CD : Cash Deposit - CP : Credit card Bill Payment - FD : Funds disbursement - FT : Funds transfer - GD : Government Disbursement - GP : Gambling payout (non-online gambling) - LO : Loyalty credits and rebates - MD : Merchant Settlement - OG : Online Gambling Payout - PD : Payroll and pension disbursement - PP : Person-to-Person or Peer-to-Peer - TU : Top up, prepaid load - WT : Digital wallet * @member {String} businessApplicationId */ exports.prototype['businessApplicationId'] = undefined; /** * @member {module:model/TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions} authorizationOptions */ exports.prototype['authorizationOptions'] = undefined; /** * @member {module:model/TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions} bankTransferOptions */ exports.prototype['bankTransferOptions'] = undefined; /** * @member {module:model/TssV2TransactionsGet200ResponseProcessingInformationCaptureOptions} captureOptions */ exports.prototype['captureOptions'] = undefined; /** * Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response. * @member {String} reconciliationId */ exports.prototype['reconciliationId'] = undefined; /** * @member {module:model/TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions} japanPaymentOptions */ exports.prototype['japanPaymentOptions'] = undefined; return exports; }));