UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

109 lines (89 loc) 5.69 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/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); } }(this, function(ApiClient, Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction) { 'use strict'; /** * The Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator model module. * @module model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator * @version 0.0.1 */ /** * Constructs a new <code>Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator</code>. * @alias module:model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator</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/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator} obj Optional instance to populate. * @return {module:model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator} The populated <code>Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator</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('credentialStoredOnFile')) { obj['credentialStoredOnFile'] = ApiClient.convertToType(data['credentialStoredOnFile'], 'Boolean'); } if (data.hasOwnProperty('storedCredentialUsed')) { obj['storedCredentialUsed'] = ApiClient.convertToType(data['storedCredentialUsed'], 'Boolean'); } if (data.hasOwnProperty('merchantInitiatedTransaction')) { obj['merchantInitiatedTransaction'] = Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.constructFromObject(data['merchantInitiatedTransaction']); } } return obj; } /** * This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. Valid values: - **customer** - **merchant** * @member {String} type */ exports.prototype['type'] = undefined; /** * Indicates to the issuing bank two things: - The merchant has received consent from the cardholder to store their card details on file - The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder. The purpose of the merchant-initiated transaction is to ensure that the cardholder's credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant's file for future transactions. Valid values: - `true` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions. - `false` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions. **NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5. This field is supported only for Visa transactions on CyberSource through VisaNet. * @member {Boolean} credentialStoredOnFile */ exports.prototype['credentialStoredOnFile'] = undefined; /** * Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file. * @member {Boolean} storedCredentialUsed */ exports.prototype['storedCredentialUsed'] = undefined; /** * @member {module:model/Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction} merchantInitiatedTransaction */ exports.prototype['merchantInitiatedTransaction'] = undefined; return exports; }));