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