cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
102 lines (83 loc) • 5.39 kB
JavaScript
/**
* 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.Upv1capturecontextsCompleteMandate = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Upv1capturecontextsCompleteMandate model module.
* @module model/Upv1capturecontextsCompleteMandate
* @version 0.0.1
*/
/**
* Constructs a new <code>Upv1capturecontextsCompleteMandate</code>.
* The completeMandate object is designed to provide instructions for orchestrating payment services. Unified Checkout is capable of orchestrating a number of services on your behalf.<br><br> By providing this field in the capture context Unified Checkout will initiate services on your behalf from the browser, simplifying your integration.
* @alias module:model/Upv1capturecontextsCompleteMandate
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Upv1capturecontextsCompleteMandate</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/Upv1capturecontextsCompleteMandate} obj Optional instance to populate.
* @return {module:model/Upv1capturecontextsCompleteMandate} The populated <code>Upv1capturecontextsCompleteMandate</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('decisionManager')) {
obj['decisionManager'] = ApiClient.convertToType(data['decisionManager'], 'Boolean');
}
if (data.hasOwnProperty('consumerAuthentication')) {
obj['consumerAuthentication'] = ApiClient.convertToType(data['consumerAuthentication'], 'Boolean');
}
}
return obj;
}
/**
* This field is used to indicate how a payment should be processed. Possible values: - AUTH: Use this value when you want to authorize a payment within Unified Checkout without capturing it immediately. Payment types that initiate an immediate transfer of funds are NOT allowed. If a capture context request includes a payment type incompatible with this mode, a 400 error will be returned. A merchant would need to perform their own capture via API where applicable.<br><br> - CAPTURE: Use this value when you want to perform a sale within Unified Checkout and capture the payment immediately during the transaction. Note: Some payment types may return a PENDING status, requiring an additional status check call to determine the final outcome of the payment.<br><br> - PREFER_AUTH: Use this value to offer multiple alternative payment options during the Unified Checkout experience. This option authorizes the payment without immediate capture, where available. It will perform a \"CAPTURE\" where an \"AUTH\" is not allowed by the payment type. Transactions can be AUTHORIZED, CAPTURED, or PENDING. If an \"AUTH\" is performed, a merchant would need to perform their own capture via API where applicable.
* @member {String} type
*/
exports.prototype['type'] = undefined;
/**
* Configure Unified Checkout to determine whether Decision Manager is invoked during service orchestration. Possible values: - True - False<br><br> Setting this value to True indicates that device fingerprinting will be executed to add additional information for risk service Setting this value to False (or not provided) indicates that you do not wish to run device fingerprinting and skip decision manager services.
* @member {Boolean} decisionManager
*/
exports.prototype['decisionManager'] = undefined;
/**
* Configure Unified Checkout to determine whether Consumer Authentication is invoked during service orchestration. Possible values: - True - False<br><br> Setting this value to True will attempt to perform authentication using the Payer Authentication Service. Setting this value to False (or not provided) indicates that you do not wish to perform authentication using the Payer Authentication Service.
* @member {Boolean} consumerAuthentication
*/
exports.prototype['consumerAuthentication'] = undefined;
return exports;
}));