UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

93 lines (75 loc) 4.49 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'], 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.InvoicingV2InvoicesGet200ResponseTransactionDetails = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The InvoicingV2InvoicesGet200ResponseTransactionDetails model module. * @module model/InvoicingV2InvoicesGet200ResponseTransactionDetails * @version 0.0.1 */ /** * Constructs a new <code>InvoicingV2InvoicesGet200ResponseTransactionDetails</code>. * These details are only returned when the invoice event is `payment`. * @alias module:model/InvoicingV2InvoicesGet200ResponseTransactionDetails * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>InvoicingV2InvoicesGet200ResponseTransactionDetails</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/InvoicingV2InvoicesGet200ResponseTransactionDetails} obj Optional instance to populate. * @return {module:model/InvoicingV2InvoicesGet200ResponseTransactionDetails} The populated <code>InvoicingV2InvoicesGet200ResponseTransactionDetails</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('transactionId')) { obj['transactionId'] = ApiClient.convertToType(data['transactionId'], 'String'); } if (data.hasOwnProperty('amount')) { obj['amount'] = ApiClient.convertToType(data['amount'], 'String'); } } return obj; } /** * Payer auth Transaction identifier. * @member {String} transactionId */ exports.prototype['transactionId'] = undefined; /** * Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. **Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12. **Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. If your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. #### Card Present Required to include either this field or `orderInformation.lineItems[].unitPrice` for the order. #### Invoicing / Pay By Link Required for creating a new invoice or payment link. #### PIN Debit Amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit; however, for all other processors, these fields are required. #### DCC with a Third-Party Provider Set this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. #### DCC for First Data Not used. * @member {String} amount */ exports.prototype['amount'] = undefined; return exports; }));