- 1 :
(function(root, factory) {
- 2 :
if (typeof define === 'function' && define.amd) {
- 3 :
// AMD. Register as an anonymous module.
- 4 :
define(['ApiClient', 'models/CustomerAccountMinimalRequest', 'models/CustomerMinimalRequest', 'models/FeeRequest', 'models/FundingAccountMinimalRequest', 'models/PaymentAuthorizationMinimalRequest'], 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('./CustomerAccountMinimalRequest'), require('./CustomerMinimalRequest'), require('./FeeRequest'), require('./FundingAccountMinimalRequest'), require('./PaymentAuthorizationMinimalRequest'));
- 8 :
} else {
- 9 :
// Browser globals (root is window)
- 10 :
if (!root.OrbipayPaymentsapiClient) {
- 11 :
root.OrbipayPaymentsapiClient = {};
- 12 :
}
- 13 :
root.OrbipayPaymentsapiClient.CreatePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.CustomerAccountMinimalRequest, root.OrbipayPaymentsapiClient.CustomerMinimalRequest, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.FundingAccountMinimalRequest, root.OrbipayPaymentsapiClient.PaymentAuthorizationMinimalRequest);
- 14 :
}
- 15 :
}(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FeeRequest, FundingAccountMinimalRequest, PaymentAuthorizationMinimalRequest) {
- 16 :
'use strict';
- 17 :
- 18 :
- 19 :
- 20 :
- 21 :
/**
- 22 :
* The CreatePaymentRequest model module.
- 23 :
* @module models/CreatePaymentRequest
- 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>CreatePaymentRequest</code>.
- 30 :
* @alias module:models/CreatePaymentRequest
- 31 :
* @class
- 32 :
* @param customer {module:models/CustomerMinimalRequest}
- 33 :
* @param funding_account {module:models/FundingAccountMinimalRequest}
- 34 :
* @param customer_account {module:models/CustomerAccountMinimalRequest}
- 35 :
*/
- 36 :
var exports = function(customer, funding_account, customer_account) {
- 37 :
var _this = this;
- 38 :
- 39 :
- 40 :
- 41 :
- 42 :
- 43 :
- 44 :
- 45 :
_this['customer'] = customer;
- 46 :
_this['funding_account'] = funding_account;
- 47 :
_this['customer_account'] = customer_account;
- 48 :
- 49 :
- 50 :
- 51 :
- 52 :
- 53 :
};
- 54 :
- 55 :
/**
- 56 :
* Constructs a <code>CreatePaymentRequest</code> from a plain JavaScript object, optionally creating a new instance.
- 57 :
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
- 58 :
* @param {Object} data The plain JavaScript object bearing properties of interest.
- 59 :
* @param {module:models/CreatePaymentRequest} obj Optional instance to populate.
- 60 :
* @return {module:models/CreatePaymentRequest} The populated <code>CreatePaymentRequest</code> instance.
- 61 :
*/
- 62 :
exports.constructFromObject = function(data, obj) {
- 63 :
if (data) {
- 64 :
obj = obj || new exports();
- 65 :
- 66 :
if (data.hasOwnProperty('amount')) {
- 67 :
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
- 68 :
}
- 69 :
if (data.hasOwnProperty('card_cvv_number')) {
- 70 :
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
- 71 :
}
- 72 :
if (data.hasOwnProperty('payment_date')) {
- 73 :
obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
- 74 :
}
- 75 :
if (data.hasOwnProperty('payment_request_date')) {
- 76 :
obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
- 77 :
}
- 78 :
if (data.hasOwnProperty('payment_amount_type')) {
- 79 :
obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
- 80 :
}
- 81 :
if (data.hasOwnProperty('fee')) {
- 82 :
obj['fee'] = FeeRequest.constructFromObject(data['fee']);
- 83 :
}
- 84 :
if (data.hasOwnProperty('customer')) {
- 85 :
obj['customer'] = CustomerMinimalRequest.constructFromObject(data['customer']);
- 86 :
}
- 87 :
if (data.hasOwnProperty('funding_account')) {
- 88 :
obj['funding_account'] = FundingAccountMinimalRequest.constructFromObject(data['funding_account']);
- 89 :
}
- 90 :
if (data.hasOwnProperty('customer_account')) {
- 91 :
obj['customer_account'] = CustomerAccountMinimalRequest.constructFromObject(data['customer_account']);
- 92 :
}
- 93 :
if (data.hasOwnProperty('payment_authorization')) {
- 94 :
obj['payment_authorization'] = PaymentAuthorizationMinimalRequest.constructFromObject(data['payment_authorization']);
- 95 :
}
- 96 :
if (data.hasOwnProperty('payment_reference')) {
- 97 :
obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
- 98 :
}
- 99 :
if (data.hasOwnProperty('payment_notification_email')) {
- 100 :
obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
- 101 :
}
- 102 :
if (data.hasOwnProperty('comments')) {
- 103 :
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
- 104 :
}
- 105 :
if (data.hasOwnProperty('custom_fields')) {
- 106 :
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
- 107 :
}
- 108 :
}
- 109 :
return obj;
- 110 :
};
- 111 :
- 112 :
/**
- 113 :
* The amount being paid.
- 114 :
* @member {String} amount
- 115 :
*/
- 116 :
exports.prototype['amount'] = undefined;
- 117 :
/**
- 118 :
* @member {String} card_cvv_number
- 119 :
*/
- 120 :
exports.prototype['card_cvv_number'] = undefined;
- 121 :
/**
- 122 :
* The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
- 123 :
* @member {String} payment_date
- 124 :
*/
- 125 :
exports.prototype['payment_date'] = undefined;
- 126 :
/**
- 127 :
* The date on which the biller wants the payment to be settled. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
- 128 :
* @member {String} payment_request_date
- 129 :
*/
- 130 :
exports.prototype['payment_request_date'] = undefined;
- 131 :
/**
- 132 :
* The type of amount, as per the bill/statement, that is being paid. The payment amount is derived from the amount type selected for the payment. This defaults to other.
- 133 :
* @member {module:models/CreatePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
- 134 :
*/
- 135 :
exports.prototype['payment_amount_type'] = undefined;
- 136 :
/**
- 137 :
* @member {module:models/FeeRequest} fee
- 138 :
*/
- 139 :
exports.prototype['fee'] = undefined;
- 140 :
/**
- 141 :
* @member {module:models/CustomerMinimalRequest} customer
- 142 :
*/
- 143 :
exports.prototype['customer'] = undefined;
- 144 :
/**
- 145 :
* @member {module:models/FundingAccountMinimalRequest} funding_account
- 146 :
*/
- 147 :
exports.prototype['funding_account'] = undefined;
- 148 :
/**
- 149 :
* @member {module:models/CustomerAccountMinimalRequest} customer_account
- 150 :
*/
- 151 :
exports.prototype['customer_account'] = undefined;
- 152 :
/**
- 153 :
* @member {module:models/PaymentAuthorizationMinimalRequest} payment_authorization
- 154 :
*/
- 155 :
exports.prototype['payment_authorization'] = undefined;
- 156 :
/**
- 157 :
* The unique identifier in the client system for the payment. This is mandatory in case of voyager fleet card payment.
- 158 :
* @member {String} payment_reference
- 159 :
*/
- 160 :
exports.prototype['payment_reference'] = undefined;
- 161 :
/**
- 162 :
* The email address to which notifications for the payment will be sent.
- 163 :
* @member {String} payment_notification_email
- 164 :
*/
- 165 :
exports.prototype['payment_notification_email'] = undefined;
- 166 :
/**
- 167 :
* Comments that can be used to recollect the operation performed on the resource object.
- 168 :
* @member {String} comments
- 169 :
*/
- 170 :
exports.prototype['comments'] = undefined;
- 171 :
/**
- 172 :
* The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
- 173 :
* @member {Object.<String, String>} custom_fields
- 174 :
*/
- 175 :
exports.prototype['custom_fields'] = undefined;
- 176 :
- 177 :
- 178 :
/**
- 179 :
* Allowed values for the <code>payment_amount_type</code> property.
- 180 :
* @enum {String}
- 181 :
* @readonly
- 182 :
*/
- 183 :
exports.PaymentAmountTypeEnum = {
- 184 :
/**
- 185 :
* value: "current_balance"
- 186 :
* @const
- 187 :
*/
- 188 :
"current_balance": "current_balance",
- 189 :
/**
- 190 :
* value: "minimum_payment_due"
- 191 :
* @const
- 192 :
*/
- 193 :
"minimum_payment_due": "minimum_payment_due",
- 194 :
/**
- 195 :
* value: "past_payment_due"
- 196 :
* @const
- 197 :
*/
- 198 :
"past_payment_due": "past_payment_due",
- 199 :
/**
- 200 :
* value: "statement_balance"
- 201 :
* @const
- 202 :
*/
- 203 :
"statement_balance": "statement_balance",
- 204 :
/**
- 205 :
* value: "discounted_amount"
- 206 :
* @const
- 207 :
*/
- 208 :
"discounted_amount": "discounted_amount",
- 209 :
/**
- 210 :
* value: "penalty_amount"
- 211 :
* @const
- 212 :
*/
- 213 :
"penalty_amount": "penalty_amount",
- 214 :
/**
- 215 :
* value: "other"
- 216 :
* @const
- 217 :
*/
- 218 :
"other": "other",
- 219 :
/**
- 220 :
* value: "payoff_amount"
- 221 :
* @const
- 222 :
*/
- 223 :
"payoff_amount": "payoff_amount",
- 224 :
/**
- 225 :
* value: "paydown_amount"
- 226 :
* @const
- 227 :
*/
- 228 :
"paydown_amount": "paydown_amount" };
- 229 :
- 230 :
- 231 :
return exports;
- 232 :
}));
- 233 :
- 234 :