(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/FeeRequest', 'models/RecordPaymentCustomerAccountRequest', 'models/RecordPaymentCustomerRequest', 'models/RecordedPaymentFundingAccount'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./FeeRequest'), require('./RecordPaymentCustomerAccountRequest'), require('./RecordPaymentCustomerRequest'), require('./RecordedPaymentFundingAccount'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.RecordPaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.RecordPaymentCustomerAccountRequest, root.OrbipayPaymentsapiClient.RecordPaymentCustomerRequest, root.OrbipayPaymentsapiClient.RecordedPaymentFundingAccount);
}
}(this, function(ApiClient, FeeRequest, RecordPaymentCustomerAccountRequest, RecordPaymentCustomerRequest, RecordedPaymentFundingAccount) {
'use strict';
/**
* The RecordPaymentRequest model module.
* @module models/RecordPaymentRequest
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>RecordPaymentRequest</code>.
* @alias module:models/RecordPaymentRequest
* @class
* @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.
* @param payment_method {module:models/RecordPaymentRequest.PaymentMethodEnum} The non fulfillment method for the payment.
* @param customer {module:models/RecordPaymentCustomerRequest}
* @param customer_account {module:models/RecordPaymentCustomerAccountRequest}
*/
var exports = function(payment_date, payment_method, customer, customer_account) {
var _this = this;
_this['payment_date'] = payment_date;
_this['payment_method'] = payment_method;
_this['customer'] = customer;
_this['customer_account'] = customer_account;
};
/**
* Constructs a <code>RecordPaymentRequest</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:models/RecordPaymentRequest} obj Optional instance to populate.
* @return {module:models/RecordPaymentRequest} The populated <code>RecordPaymentRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
if (data.hasOwnProperty('payment_date')) {
obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
}
if (data.hasOwnProperty('payment_amount_type')) {
obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
}
if (data.hasOwnProperty('payment_method')) {
obj['payment_method'] = ApiClient.convertToType(data['payment_method'], 'String');
}
if (data.hasOwnProperty('token')) {
obj['token'] = ApiClient.convertToType(data['token'], 'String');
}
if (data.hasOwnProperty('fee')) {
obj['fee'] = FeeRequest.constructFromObject(data['fee']);
}
if (data.hasOwnProperty('customer')) {
obj['customer'] = RecordPaymentCustomerRequest.constructFromObject(data['customer']);
}
if (data.hasOwnProperty('funding_account')) {
obj['funding_account'] = RecordedPaymentFundingAccount.constructFromObject(data['funding_account']);
}
if (data.hasOwnProperty('customer_account')) {
obj['customer_account'] = RecordPaymentCustomerAccountRequest.constructFromObject(data['customer_account']);
}
if (data.hasOwnProperty('payment_reference')) {
obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
}
if (data.hasOwnProperty('comments')) {
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
}
if (data.hasOwnProperty('custom_fields')) {
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
}
}
return obj;
};
/**
* The amount being paid.
* @member {String} amount
*/
exports.prototype['amount'] = undefined;
/**
* The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
* @member {String} payment_date
*/
exports.prototype['payment_date'] = undefined;
/**
* 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.
* @member {module:models/RecordPaymentRequest.PaymentAmountTypeEnum} payment_amount_type
*/
exports.prototype['payment_amount_type'] = undefined;
/**
* The non fulfillment method for the payment.
* @member {module:models/RecordPaymentRequest.PaymentMethodEnum} payment_method
*/
exports.prototype['payment_method'] = undefined;
/**
* The token is used to uniquely identify the payment, such as the POS token.
* @member {String} token
*/
exports.prototype['token'] = undefined;
/**
* @member {module:models/FeeRequest} fee
*/
exports.prototype['fee'] = undefined;
/**
* @member {module:models/RecordPaymentCustomerRequest} customer
*/
exports.prototype['customer'] = undefined;
/**
* @member {module:models/RecordedPaymentFundingAccount} funding_account
*/
exports.prototype['funding_account'] = undefined;
/**
* @member {module:models/RecordPaymentCustomerAccountRequest} customer_account
*/
exports.prototype['customer_account'] = undefined;
/**
* The unique identifier in the client system for the payment.
* @member {String} payment_reference
*/
exports.prototype['payment_reference'] = undefined;
/**
* @member {String} comments
*/
exports.prototype['comments'] = undefined;
/**
* The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
* @member {Object.<String, String>} custom_fields
*/
exports.prototype['custom_fields'] = undefined;
/**
* Allowed values for the <code>payment_amount_type</code> property.
* @enum {String}
* @readonly
*/
exports.PaymentAmountTypeEnum = {
/**
* value: "current_balance"
* @const
*/
"current_balance": "current_balance",
/**
* value: "minimum_payment_due"
* @const
*/
"minimum_payment_due": "minimum_payment_due",
/**
* value: "past_payment_due"
* @const
*/
"past_payment_due": "past_payment_due",
/**
* value: "statement_balance"
* @const
*/
"statement_balance": "statement_balance",
/**
* value: "other"
* @const
*/
"other": "other",
/**
* value: "payoff_amount"
* @const
*/
"payoff_amount": "payoff_amount",
/**
* value: "paydown_amount"
* @const
*/
"paydown_amount": "paydown_amount" };
/**
* Allowed values for the <code>payment_method</code> property.
* @enum {String}
* @readonly
*/
exports.PaymentMethodEnum = {
/**
* value: "cash"
* @const
*/
"cash": "cash",
/**
* value: "swiped_card"
* @const
*/
"swiped_card": "swiped_card",
/**
* value: "scanned_check"
* @const
*/
"scanned_check": "scanned_check" };
return exports;
}));