UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

136 lines (113 loc) 5.71 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/Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ptsv2paymentsidcapturesOrderInformationInvoiceDetails = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum); } }(this, function(ApiClient, Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum) { 'use strict'; /** * The Ptsv2paymentsidcapturesOrderInformationInvoiceDetails model module. * @module model/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails * @version 0.0.1 */ /** * Constructs a new <code>Ptsv2paymentsidcapturesOrderInformationInvoiceDetails</code>. * @alias module:model/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv2paymentsidcapturesOrderInformationInvoiceDetails</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/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails} obj Optional instance to populate. * @return {module:model/Ptsv2paymentsidcapturesOrderInformationInvoiceDetails} The populated <code>Ptsv2paymentsidcapturesOrderInformationInvoiceDetails</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('purchaseOrderNumber')) { obj['purchaseOrderNumber'] = ApiClient.convertToType(data['purchaseOrderNumber'], 'String'); } if (data.hasOwnProperty('purchaseOrderDate')) { obj['purchaseOrderDate'] = ApiClient.convertToType(data['purchaseOrderDate'], 'String'); } if (data.hasOwnProperty('purchaseContactName')) { obj['purchaseContactName'] = ApiClient.convertToType(data['purchaseContactName'], 'String'); } if (data.hasOwnProperty('taxable')) { obj['taxable'] = ApiClient.convertToType(data['taxable'], 'Boolean'); } if (data.hasOwnProperty('vatInvoiceReferenceNumber')) { obj['vatInvoiceReferenceNumber'] = ApiClient.convertToType(data['vatInvoiceReferenceNumber'], 'String'); } if (data.hasOwnProperty('commodityCode')) { obj['commodityCode'] = ApiClient.convertToType(data['commodityCode'], 'String'); } if (data.hasOwnProperty('transactionAdviceAddendum')) { obj['transactionAdviceAddendum'] = ApiClient.convertToType(data['transactionAdviceAddendum'], [Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum]); } } return obj; } /** * Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. * @member {String} purchaseOrderNumber */ exports.prototype['purchaseOrderNumber'] = undefined; /** * Date the order was processed. `Format: YYYY-MM-DD`. * @member {String} purchaseOrderDate */ exports.prototype['purchaseOrderDate'] = undefined; /** * The name of the individual or the company contacted for company authorized purchases. * @member {String} purchaseContactName */ exports.prototype['purchaseContactName'] = undefined; /** * Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any `lineItems[].taxAmount` values in your request, CyberSource does not include `invoiceDetails.taxable` in the data it sends to the processor. Possible values: - **true** - **false** * @member {Boolean} taxable */ exports.prototype['taxable'] = undefined; /** * VAT invoice number associated with the transaction. * @member {String} vatInvoiceReferenceNumber */ exports.prototype['vatInvoiceReferenceNumber'] = undefined; /** * International description code of the overall order's goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. * @member {String} commodityCode */ exports.prototype['commodityCode'] = undefined; /** * @member {Array.<module:model/Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>} transactionAdviceAddendum */ exports.prototype['transactionAdviceAddendum'] = undefined; return exports; }));