UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

111 lines (92 loc) 4.64 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/InlineResponse2018OrderInformationCurrencyConversionOffer'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./InlineResponse2018OrderInformationCurrencyConversionOffer')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.InlineResponse2018OrderInformationCurrencyConversion = factory(root.CyberSource.ApiClient, root.CyberSource.InlineResponse2018OrderInformationCurrencyConversionOffer); } }(this, function(ApiClient, InlineResponse2018OrderInformationCurrencyConversionOffer) { 'use strict'; /** * The InlineResponse2018OrderInformationCurrencyConversion model module. * @module model/InlineResponse2018OrderInformationCurrencyConversion * @version 0.0.1 */ /** * Constructs a new <code>InlineResponse2018OrderInformationCurrencyConversion</code>. * @alias module:model/InlineResponse2018OrderInformationCurrencyConversion * @class * @param reconciliationId {String} Unique identifier generated by the DCC provider. */ var exports = function(reconciliationId) { var _this = this; _this['reconciliationId'] = reconciliationId; }; /** * Constructs a <code>InlineResponse2018OrderInformationCurrencyConversion</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/InlineResponse2018OrderInformationCurrencyConversion} obj Optional instance to populate. * @return {module:model/InlineResponse2018OrderInformationCurrencyConversion} The populated <code>InlineResponse2018OrderInformationCurrencyConversion</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } if (data.hasOwnProperty('reconciliationId')) { obj['reconciliationId'] = ApiClient.convertToType(data['reconciliationId'], 'String'); } if (data.hasOwnProperty('offer')) { obj['offer'] = ApiClient.convertToType(data['offer'], [InlineResponse2018OrderInformationCurrencyConversionOffer]); } if (data.hasOwnProperty('disclaimer')) { obj['disclaimer'] = ApiClient.convertToType(data['disclaimer'], 'String'); } } return obj; } /** * Valid Values: - `DCC`: Dynamic Currency Conversion - `MCP`: Multi-Currency Pricing This should be echo'd from the request * @member {String} type */ exports.prototype['type'] = undefined; /** * Unique identifier generated by the DCC provider. * @member {String} reconciliationId */ exports.prototype['reconciliationId'] = undefined; /** * When type is DCC this is a single item. When type is MCP this is an array that repeats for each currency that's configured by the currency conversion provider for the merchant. * @member {Array.<module:model/InlineResponse2018OrderInformationCurrencyConversionOffer>} offer */ exports.prototype['offer'] = undefined; /** * This text is intended to inform customers about their opt-in choices. It should include details such as the amount, exchange rate, currency, mark-up, and any other regulated requirements, such as the mark-up over the ECB rate, if applicable. It is mandatory for DCC (Dynamic Currency Conversion) and optional otherwise. This information will be displayed on the screen and printed on the receipt without modification. * @member {String} disclaimer */ exports.prototype['disclaimer'] = undefined; return exports; }));