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