- 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/FundingAccountMinimalRequest', 'models/PaymentScheduleVo', 'models/PaymentSetupFeeRequest'], 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('./FundingAccountMinimalRequest'), require('./PaymentScheduleVo'), require('./PaymentSetupFeeRequest'));
- 8 :
} else {
- 9 :
// Browser globals (root is window)
- 10 :
if (!root.OrbipayPaymentsapiClient) {
- 11 :
root.OrbipayPaymentsapiClient = {};
- 12 :
}
- 13 :
root.OrbipayPaymentsapiClient.CreatePaymentSetupRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.CustomerAccountMinimalRequest, root.OrbipayPaymentsapiClient.CustomerMinimalRequest, root.OrbipayPaymentsapiClient.FundingAccountMinimalRequest, root.OrbipayPaymentsapiClient.PaymentScheduleVo, root.OrbipayPaymentsapiClient.PaymentSetupFeeRequest);
- 14 :
}
- 15 :
}(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FundingAccountMinimalRequest, PaymentScheduleVo, PaymentSetupFeeRequest) {
- 16 :
'use strict';
- 17 :
- 18 :
- 19 :
- 20 :
- 21 :
/**
- 22 :
* The CreatePaymentSetupRequest model module.
- 23 :
* @module models/CreatePaymentSetupRequest
- 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>CreatePaymentSetupRequest</code>.
- 30 :
* @alias module:models/CreatePaymentSetupRequest
- 31 :
* @class
- 32 :
* @param payment_setup_schedule_type {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} The schedule type for the payment setup.
- 33 :
* @param customer {module:models/CustomerMinimalRequest}
- 34 :
* @param funding_account {module:models/FundingAccountMinimalRequest}
- 35 :
* @param customer_account {module:models/CustomerAccountMinimalRequest}
- 36 :
* @param payment_schedule {module:models/PaymentScheduleVo}
- 37 :
*/
- 38 :
var exports = function(payment_setup_schedule_type, customer, funding_account, customer_account, payment_schedule) {
- 39 :
var _this = this;
- 40 :
- 41 :
- 42 :
_this['payment_setup_schedule_type'] = payment_setup_schedule_type;
- 43 :
- 44 :
- 45 :
- 46 :
_this['customer'] = customer;
- 47 :
_this['funding_account'] = funding_account;
- 48 :
_this['customer_account'] = customer_account;
- 49 :
_this['payment_schedule'] = payment_schedule;
- 50 :
- 51 :
- 52 :
};
- 53 :
- 54 :
/**
- 55 :
* Constructs a <code>CreatePaymentSetupRequest</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/CreatePaymentSetupRequest} obj Optional instance to populate.
- 59 :
* @return {module:models/CreatePaymentSetupRequest} The populated <code>CreatePaymentSetupRequest</code> instance.
- 60 :
*/
- 61 :
exports.constructFromObject = function(data, obj) {
- 62 :
if (data) {
- 63 :
obj = obj || new exports();
- 64 :
- 65 :
if (data.hasOwnProperty('payment_setup_reference')) {
- 66 :
obj['payment_setup_reference'] = ApiClient.convertToType(data['payment_setup_reference'], 'String');
- 67 :
}
- 68 :
if (data.hasOwnProperty('payment_setup_schedule_type')) {
- 69 :
obj['payment_setup_schedule_type'] = ApiClient.convertToType(data['payment_setup_schedule_type'], 'String');
- 70 :
}
- 71 :
if (data.hasOwnProperty('amount')) {
- 72 :
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
- 73 :
}
- 74 :
if (data.hasOwnProperty('card_cvv_number')) {
- 75 :
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
- 76 :
}
- 77 :
if (data.hasOwnProperty('fee')) {
- 78 :
obj['fee'] = PaymentSetupFeeRequest.constructFromObject(data['fee']);
- 79 :
}
- 80 :
if (data.hasOwnProperty('customer')) {
- 81 :
obj['customer'] = CustomerMinimalRequest.constructFromObject(data['customer']);
- 82 :
}
- 83 :
if (data.hasOwnProperty('funding_account')) {
- 84 :
obj['funding_account'] = FundingAccountMinimalRequest.constructFromObject(data['funding_account']);
- 85 :
}
- 86 :
if (data.hasOwnProperty('customer_account')) {
- 87 :
obj['customer_account'] = CustomerAccountMinimalRequest.constructFromObject(data['customer_account']);
- 88 :
}
- 89 :
if (data.hasOwnProperty('payment_schedule')) {
- 90 :
obj['payment_schedule'] = PaymentScheduleVo.constructFromObject(data['payment_schedule']);
- 91 :
}
- 92 :
if (data.hasOwnProperty('custom_fields')) {
- 93 :
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
- 94 :
}
- 95 :
if (data.hasOwnProperty('comments')) {
- 96 :
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
- 97 :
}
- 98 :
}
- 99 :
return obj;
- 100 :
};
- 101 :
- 102 :
/**
- 103 :
* The unique identifier in the client system for the paymentSetup.
- 104 :
* @member {String} payment_setup_reference
- 105 :
*/
- 106 :
exports.prototype['payment_setup_reference'] = undefined;
- 107 :
/**
- 108 :
* The schedule type for the payment setup.
- 109 :
* @member {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} payment_setup_schedule_type
- 110 :
*/
- 111 :
exports.prototype['payment_setup_schedule_type'] = undefined;
- 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 :
* @member {module:models/PaymentSetupFeeRequest} fee
- 123 :
*/
- 124 :
exports.prototype['fee'] = undefined;
- 125 :
/**
- 126 :
* @member {module:models/CustomerMinimalRequest} customer
- 127 :
*/
- 128 :
exports.prototype['customer'] = undefined;
- 129 :
/**
- 130 :
* @member {module:models/FundingAccountMinimalRequest} funding_account
- 131 :
*/
- 132 :
exports.prototype['funding_account'] = undefined;
- 133 :
/**
- 134 :
* @member {module:models/CustomerAccountMinimalRequest} customer_account
- 135 :
*/
- 136 :
exports.prototype['customer_account'] = undefined;
- 137 :
/**
- 138 :
* @member {module:models/PaymentScheduleVo} payment_schedule
- 139 :
*/
- 140 :
exports.prototype['payment_schedule'] = undefined;
- 141 :
/**
- 142 :
* The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
- 143 :
* @member {Object.<String, String>} custom_fields
- 144 :
*/
- 145 :
exports.prototype['custom_fields'] = undefined;
- 146 :
/**
- 147 :
* Comments that can be used to recollect the operation performed on the resource object.
- 148 :
* @member {String} comments
- 149 :
*/
- 150 :
exports.prototype['comments'] = undefined;
- 151 :
- 152 :
- 153 :
/**
- 154 :
* Allowed values for the <code>payment_setup_schedule_type</code> property.
- 155 :
* @enum {String}
- 156 :
* @readonly
- 157 :
*/
- 158 :
exports.PaymentSetupScheduleTypeEnum = {
- 159 :
/**
- 160 :
* value: "variable_recurring_enrollment"
- 161 :
* @const
- 162 :
*/
- 163 :
"variable_recurring_enrollment": "variable_recurring_enrollment",
- 164 :
/**
- 165 :
* value: "autopay_enrollment"
- 166 :
* @const
- 167 :
*/
- 168 :
"autopay_enrollment": "autopay_enrollment",
- 169 :
/**
- 170 :
* value: "payment_plan"
- 171 :
* @const
- 172 :
*/
- 173 :
"payment_plan": "payment_plan" };
- 174 :
- 175 :
- 176 :
return exports;
- 177 :
}));
- 178 :
- 179 :