(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/CustomerAccountMinimalRequest', 'models/CustomerMinimalRequest', 'models/FundingAccountMinimalRequest', 'models/PaymentScheduleVo', 'models/PaymentSetupFeeRequest'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./CustomerAccountMinimalRequest'), require('./CustomerMinimalRequest'), require('./FundingAccountMinimalRequest'), require('./PaymentScheduleVo'), require('./PaymentSetupFeeRequest'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.CreatePaymentSetupRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.CustomerAccountMinimalRequest, root.OrbipayPaymentsapiClient.CustomerMinimalRequest, root.OrbipayPaymentsapiClient.FundingAccountMinimalRequest, root.OrbipayPaymentsapiClient.PaymentScheduleVo, root.OrbipayPaymentsapiClient.PaymentSetupFeeRequest);
}
}(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FundingAccountMinimalRequest, PaymentScheduleVo, PaymentSetupFeeRequest) {
'use strict';
/**
* The CreatePaymentSetupRequest model module.
* @module models/CreatePaymentSetupRequest
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>CreatePaymentSetupRequest</code>.
* @alias module:models/CreatePaymentSetupRequest
* @class
* @param payment_setup_schedule_type {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} The schedule type for the payment setup.
* @param customer {module:models/CustomerMinimalRequest}
* @param funding_account {module:models/FundingAccountMinimalRequest}
* @param customer_account {module:models/CustomerAccountMinimalRequest}
* @param payment_schedule {module:models/PaymentScheduleVo}
*/
var exports = function(payment_setup_schedule_type, customer, funding_account, customer_account, payment_schedule) {
var _this = this;
_this['payment_setup_schedule_type'] = payment_setup_schedule_type;
_this['customer'] = customer;
_this['funding_account'] = funding_account;
_this['customer_account'] = customer_account;
_this['payment_schedule'] = payment_schedule;
};
/**
* Constructs a <code>CreatePaymentSetupRequest</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/CreatePaymentSetupRequest} obj Optional instance to populate.
* @return {module:models/CreatePaymentSetupRequest} The populated <code>CreatePaymentSetupRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('payment_setup_reference')) {
obj['payment_setup_reference'] = ApiClient.convertToType(data['payment_setup_reference'], 'String');
}
if (data.hasOwnProperty('payment_setup_schedule_type')) {
obj['payment_setup_schedule_type'] = ApiClient.convertToType(data['payment_setup_schedule_type'], 'String');
}
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
if (data.hasOwnProperty('card_cvv_number')) {
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
}
if (data.hasOwnProperty('fee')) {
obj['fee'] = PaymentSetupFeeRequest.constructFromObject(data['fee']);
}
if (data.hasOwnProperty('customer')) {
obj['customer'] = CustomerMinimalRequest.constructFromObject(data['customer']);
}
if (data.hasOwnProperty('funding_account')) {
obj['funding_account'] = FundingAccountMinimalRequest.constructFromObject(data['funding_account']);
}
if (data.hasOwnProperty('customer_account')) {
obj['customer_account'] = CustomerAccountMinimalRequest.constructFromObject(data['customer_account']);
}
if (data.hasOwnProperty('payment_schedule')) {
obj['payment_schedule'] = PaymentScheduleVo.constructFromObject(data['payment_schedule']);
}
if (data.hasOwnProperty('custom_fields')) {
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
}
if (data.hasOwnProperty('comments')) {
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
}
}
return obj;
};
/**
* The unique identifier in the client system for the paymentSetup.
* @member {String} payment_setup_reference
*/
exports.prototype['payment_setup_reference'] = undefined;
/**
* The schedule type for the payment setup.
* @member {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} payment_setup_schedule_type
*/
exports.prototype['payment_setup_schedule_type'] = undefined;
/**
* The amount being paid.
* @member {String} amount
*/
exports.prototype['amount'] = undefined;
/**
* @member {String} card_cvv_number
*/
exports.prototype['card_cvv_number'] = undefined;
/**
* @member {module:models/PaymentSetupFeeRequest} fee
*/
exports.prototype['fee'] = undefined;
/**
* @member {module:models/CustomerMinimalRequest} customer
*/
exports.prototype['customer'] = undefined;
/**
* @member {module:models/FundingAccountMinimalRequest} funding_account
*/
exports.prototype['funding_account'] = undefined;
/**
* @member {module:models/CustomerAccountMinimalRequest} customer_account
*/
exports.prototype['customer_account'] = undefined;
/**
* @member {module:models/PaymentScheduleVo} payment_schedule
*/
exports.prototype['payment_schedule'] = 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;
/**
* Comments that can be used to recollect the operation performed on the resource object.
* @member {String} comments
*/
exports.prototype['comments'] = undefined;
/**
* Allowed values for the <code>payment_setup_schedule_type</code> property.
* @enum {String}
* @readonly
*/
exports.PaymentSetupScheduleTypeEnum = {
/**
* value: "variable_recurring_enrollment"
* @const
*/
"variable_recurring_enrollment": "variable_recurring_enrollment",
/**
* value: "autopay_enrollment"
* @const
*/
"autopay_enrollment": "autopay_enrollment",
/**
* value: "payment_plan"
* @const
*/
"payment_plan": "payment_plan" };
return exports;
}));