- 1 :
(function(root, factory) {
- 2 :
if (typeof define === 'function' && define.amd) {
- 3 :
// AMD. Register as an anonymous module.
- 4 :
define(['ApiClient', 'models/PaymentAuthCustomerAccountRequest', 'models/PaymentAuthCustomerRequest', 'models/PaymentAuthFundingAccountRequest'], factory);
- 5 :
} else if (typeof module === 'object' && module.exports) {
- 6 :
// CommonJS-like environments that support module.exports, like Node.
- 7 :
module.exports = factory(require('../ApiClient'), require('./PaymentAuthCustomerAccountRequest'), require('./PaymentAuthCustomerRequest'), require('./PaymentAuthFundingAccountRequest'));
- 8 :
} else {
- 9 :
// Browser globals (root is window)
- 10 :
if (!root.OrbipayPaymentsapiClient) {
- 11 :
root.OrbipayPaymentsapiClient = {};
- 12 :
}
- 13 :
root.OrbipayPaymentsapiClient.CreatePaymentAuthorizationRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.PaymentAuthCustomerAccountRequest, root.OrbipayPaymentsapiClient.PaymentAuthCustomerRequest, root.OrbipayPaymentsapiClient.PaymentAuthFundingAccountRequest);
- 14 :
}
- 15 :
}(this, function(ApiClient, PaymentAuthCustomerAccountRequest, PaymentAuthCustomerRequest, PaymentAuthFundingAccountRequest) {
- 16 :
'use strict';
- 17 :
- 18 :
- 19 :
- 20 :
- 21 :
/**
- 22 :
* The CreatePaymentAuthorizationRequest model module.
- 23 :
* @module models/CreatePaymentAuthorizationRequest
- 24 :
*/
- 25 :
- 26 :
/**
- 27 :
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
- 28 :
- 29 :
* Constructs a new <code>CreatePaymentAuthorizationRequest</code>.
- 30 :
* @alias module:models/CreatePaymentAuthorizationRequest
- 31 :
* @class
- 32 :
* @param auth_amount {String} The amount being authorized.
- 33 :
* @param customer {module:models/PaymentAuthCustomerRequest}
- 34 :
* @param funding_account {module:models/PaymentAuthFundingAccountRequest}
- 35 :
* @param customer_account {module:models/PaymentAuthCustomerAccountRequest}
- 36 :
*/
- 37 :
var exports = function(auth_amount, customer, funding_account, customer_account) {
- 38 :
var _this = this;
- 39 :
- 40 :
- 41 :
_this['auth_amount'] = auth_amount;
- 42 :
- 43 :
_this['customer'] = customer;
- 44 :
_this['funding_account'] = funding_account;
- 45 :
_this['customer_account'] = customer_account;
- 46 :
- 47 :
- 48 :
};
- 49 :
- 50 :
/**
- 51 :
* Constructs a <code>CreatePaymentAuthorizationRequest</code> from a plain JavaScript object, optionally creating a new instance.
- 52 :
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
- 53 :
* @param {Object} data The plain JavaScript object bearing properties of interest.
- 54 :
* @param {module:models/CreatePaymentAuthorizationRequest} obj Optional instance to populate.
- 55 :
* @return {module:models/CreatePaymentAuthorizationRequest} The populated <code>CreatePaymentAuthorizationRequest</code> instance.
- 56 :
*/
- 57 :
exports.constructFromObject = function(data, obj) {
- 58 :
if (data) {
- 59 :
obj = obj || new exports();
- 60 :
- 61 :
if (data.hasOwnProperty('payment_auth_reference')) {
- 62 :
obj['payment_auth_reference'] = ApiClient.convertToType(data['payment_auth_reference'], 'String');
- 63 :
}
- 64 :
if (data.hasOwnProperty('auth_amount')) {
- 65 :
obj['auth_amount'] = ApiClient.convertToType(data['auth_amount'], 'String');
- 66 :
}
- 67 :
if (data.hasOwnProperty('card_cvv_number')) {
- 68 :
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
- 69 :
}
- 70 :
if (data.hasOwnProperty('customer')) {
- 71 :
obj['customer'] = PaymentAuthCustomerRequest.constructFromObject(data['customer']);
- 72 :
}
- 73 :
if (data.hasOwnProperty('funding_account')) {
- 74 :
obj['funding_account'] = PaymentAuthFundingAccountRequest.constructFromObject(data['funding_account']);
- 75 :
}
- 76 :
if (data.hasOwnProperty('customer_account')) {
- 77 :
obj['customer_account'] = PaymentAuthCustomerAccountRequest.constructFromObject(data['customer_account']);
- 78 :
}
- 79 :
if (data.hasOwnProperty('comments')) {
- 80 :
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
- 81 :
}
- 82 :
if (data.hasOwnProperty('custom_fields')) {
- 83 :
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
- 84 :
}
- 85 :
}
- 86 :
return obj;
- 87 :
};
- 88 :
- 89 :
/**
- 90 :
* The unique identifier in the client system for the payment authorization. This is mandatory in case of voyager fleet card payment.
- 91 :
* @member {String} payment_auth_reference
- 92 :
*/
- 93 :
exports.prototype['payment_auth_reference'] = undefined;
- 94 :
/**
- 95 :
* The amount being authorized.
- 96 :
* @member {String} auth_amount
- 97 :
*/
- 98 :
exports.prototype['auth_amount'] = undefined;
- 99 :
/**
- 100 :
* @member {String} card_cvv_number
- 101 :
*/
- 102 :
exports.prototype['card_cvv_number'] = undefined;
- 103 :
/**
- 104 :
* @member {module:models/PaymentAuthCustomerRequest} customer
- 105 :
*/
- 106 :
exports.prototype['customer'] = undefined;
- 107 :
/**
- 108 :
* @member {module:models/PaymentAuthFundingAccountRequest} funding_account
- 109 :
*/
- 110 :
exports.prototype['funding_account'] = undefined;
- 111 :
/**
- 112 :
* @member {module:models/PaymentAuthCustomerAccountRequest} customer_account
- 113 :
*/
- 114 :
exports.prototype['customer_account'] = undefined;
- 115 :
/**
- 116 :
* Comments that can be used to recollect the operation performed on the resource object.
- 117 :
* @member {String} comments
- 118 :
*/
- 119 :
exports.prototype['comments'] = undefined;
- 120 :
/**
- 121 :
* The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
- 122 :
* @member {Object.<String, String>} custom_fields
- 123 :
*/
- 124 :
exports.prototype['custom_fields'] = undefined;
- 125 :
- 126 :
- 127 :
- 128 :
return exports;
- 129 :
}));
- 130 :
- 131 :