(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/FundingAccountAddress'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./FundingAccountAddress'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.SimplePaymentFundingAccountRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FundingAccountAddress);
}
}(this, function(ApiClient, FundingAccountAddress) {
'use strict';
/**
* The SimplePaymentFundingAccountRequest model module.
* @module models/SimplePaymentFundingAccountRequest
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>SimplePaymentFundingAccountRequest</code>.
* @alias module:models/SimplePaymentFundingAccountRequest
* @class
* @param account_number {String} The number or reference that a customer uses to identify the funding account.
*/
var exports = function(account_number) {
var _this = this;
_this['account_number'] = account_number;
};
/**
* Constructs a <code>SimplePaymentFundingAccountRequest</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/SimplePaymentFundingAccountRequest} obj Optional instance to populate.
* @return {module:models/SimplePaymentFundingAccountRequest} The populated <code>SimplePaymentFundingAccountRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('account_holder_name')) {
obj['account_holder_name'] = ApiClient.convertToType(data['account_holder_name'], 'String');
}
if (data.hasOwnProperty('nickname')) {
obj['nickname'] = ApiClient.convertToType(data['nickname'], 'String');
}
if (data.hasOwnProperty('address')) {
obj['address'] = FundingAccountAddress.constructFromObject(data['address']);
}
if (data.hasOwnProperty('account_number')) {
obj['account_number'] = ApiClient.convertToType(data['account_number'], 'String');
}
if (data.hasOwnProperty('aba_routing_number')) {
obj['aba_routing_number'] = ApiClient.convertToType(data['aba_routing_number'], 'String');
}
if (data.hasOwnProperty('expiry_date')) {
obj['expiry_date'] = ApiClient.convertToType(data['expiry_date'], 'String');
}
if (data.hasOwnProperty('account_holder_type')) {
obj['account_holder_type'] = ApiClient.convertToType(data['account_holder_type'], 'String');
}
if (data.hasOwnProperty('custom_fields')) {
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
}
if (data.hasOwnProperty('account_subtype')) {
obj['account_subtype'] = ApiClient.convertToType(data['account_subtype'], 'String');
}
if (data.hasOwnProperty('card_cvv_number')) {
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
}
if (data.hasOwnProperty('device_manufacturer_id')) {
obj['device_manufacturer_id'] = ApiClient.convertToType(data['device_manufacturer_id'], 'String');
}
if (data.hasOwnProperty('display_text')) {
obj['display_text'] = ApiClient.convertToType(data['display_text'], 'String');
}
}
return obj;
};
/**
* The name as specified on the account.
* @member {String} account_holder_name
*/
exports.prototype['account_holder_name'] = undefined;
/**
* The nickname by which a customer might want to identify the account.
* @member {String} nickname
*/
exports.prototype['nickname'] = undefined;
/**
* @member {module:models/FundingAccountAddress} address
*/
exports.prototype['address'] = undefined;
/**
* The number or reference that a customer uses to identify the funding account.
* @member {String} account_number
*/
exports.prototype['account_number'] = undefined;
/**
* The ABA/Routing number for the bank account.
* @member {String} aba_routing_number
*/
exports.prototype['aba_routing_number'] = undefined;
/**
* The expiry date for the card. This is to be in the format MM/YY.
* @member {String} expiry_date
*/
exports.prototype['expiry_date'] = undefined;
/**
* The type of ownership for the funding account.
* @member {module:models/SimplePaymentFundingAccountRequest.AccountHolderTypeEnum} account_holder_type
*/
exports.prototype['account_holder_type'] = 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;
/**
* The sub type of the funding account.
* @member {module:models/SimplePaymentFundingAccountRequest.AccountSubtypeEnum} account_subtype
*/
exports.prototype['account_subtype'] = undefined;
/**
* @member {String} card_cvv_number
*/
exports.prototype['card_cvv_number'] = undefined;
/**
* @member {String} device_manufacturer_id
*/
exports.prototype['device_manufacturer_id'] = undefined;
/**
* UI representation of the account.
* @member {String} display_text
*/
exports.prototype['display_text'] = undefined;
/**
* Allowed values for the <code>account_holder_type</code> property.
* @enum {String}
* @readonly
*/
exports.AccountHolderTypeEnum = {
/**
* value: "personal"
* @const
*/
"personal": "personal",
/**
* value: "business"
* @const
*/
"business": "business" };
/**
* Allowed values for the <code>account_subtype</code> property.
* @enum {String}
* @readonly
*/
exports.AccountSubtypeEnum = {
/**
* value: "savings"
* @const
*/
"savings": "savings",
/**
* value: "checking"
* @const
*/
"checking": "checking",
/**
* value: "money_market"
* @const
*/
"money_market": "money_market",
/**
* value: "visa_credit"
* @const
*/
"visa_credit": "visa_credit",
/**
* value: "mastercard_credit"
* @const
*/
"mastercard_credit": "mastercard_credit",
/**
* value: "american_express_credit"
* @const
*/
"american_express_credit": "american_express_credit",
/**
* value: "discover_credit"
* @const
*/
"discover_credit": "discover_credit",
/**
* value: "visa_debit"
* @const
*/
"visa_debit": "visa_debit",
/**
* value: "mastercard_debit"
* @const
*/
"mastercard_debit": "mastercard_debit",
/**
* value: "discover_debit"
* @const
*/
"discover_debit": "discover_debit",
/**
* value: "apple_pay"
* @const
*/
"apple_pay": "apple_pay",
/**
* value: "google_pay"
* @const
*/
"google_pay": "google_pay",
/**
* value: "voyager_fleet"
* @const
*/
"voyager_fleet": "voyager_fleet" };
return exports;
}));