cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
129 lines (107 loc) • 5.92 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', 'model/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods = factory(root.CyberSource.ApiClient, root.CyberSource.PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations);
}
}(this, function(ApiClient, PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations) {
'use strict';
/**
* The PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods model module.
* @module model/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods
* @version 0.0.1
*/
/**
* Constructs a new <code>PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods</code>.
* Payment method configuration for the product.
* @alias module:model/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods</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/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods} obj Optional instance to populate.
* @return {module:model/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods} The populated <code>PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsPaymentMethods</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('merchantId')) {
obj['merchantId'] = ApiClient.convertToType(data['merchantId'], 'String');
}
if (data.hasOwnProperty('logoUrl')) {
obj['logoUrl'] = ApiClient.convertToType(data['logoUrl'], 'String');
}
if (data.hasOwnProperty('redirectSuccessUrl')) {
obj['redirectSuccessUrl'] = ApiClient.convertToType(data['redirectSuccessUrl'], 'String');
}
if (data.hasOwnProperty('redirectCancelUrl')) {
obj['redirectCancelUrl'] = ApiClient.convertToType(data['redirectCancelUrl'], 'String');
}
if (data.hasOwnProperty('redirectFailureUrl')) {
obj['redirectFailureUrl'] = ApiClient.convertToType(data['redirectFailureUrl'], 'String');
}
if (data.hasOwnProperty('additionalConfigurations')) {
obj['additionalConfigurations'] = ApiClient.convertToType(data['additionalConfigurations'], [PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations]);
}
}
return obj;
}
/**
* Merchant ID for the payment method. This is a unique identifier for the merchant. example. mid12345678
* @member {String} merchantId
*/
exports.prototype['merchantId'] = undefined;
/**
* URL of the logo for the payment method. This is used for branding purposes. example: http://www.test.com
* @member {String} logoUrl
*/
exports.prototype['logoUrl'] = undefined;
/**
* URL to redirect to after a successful transaction. This is where the user will be sent after completing the payment. example: http://www.test.com/success
* @member {String} redirectSuccessUrl
*/
exports.prototype['redirectSuccessUrl'] = undefined;
/**
* URL to redirect to if the user cancels the transaction. This is where the user will be sent if they choose to cancel the payment. example: http://www.test.com/cancel
* @member {String} redirectCancelUrl
*/
exports.prototype['redirectCancelUrl'] = undefined;
/**
* URL to redirect to if the transaction fails. This is where the user will be sent if there is an error during the payment process. example: http://www.test.com/failure
* @member {String} redirectFailureUrl
*/
exports.prototype['redirectFailureUrl'] = undefined;
/**
* Additional configurations for the payment method. This can include various settings specific to the payment method.
* @member {Array.<module:model/PaymentsProductsAlternativePaymentMethodsConfigurationInformationConfigurationsAdditionalConfigurations>} additionalConfigurations
*/
exports.prototype['additionalConfigurations'] = undefined;
return exports;
}));