(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/AuditInfoVo', '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('./AuditInfoVo'), require('./FundingAccountAddress'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.FundingAccountResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.FundingAccountAddress);
}
}(this, function(ApiClient, AuditInfoVo, FundingAccountAddress) {
'use strict';
/**
* The FundingAccountResponse model module.
* @module models/FundingAccountResponse
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>FundingAccountResponse</code>.
* @alias module:models/FundingAccountResponse
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>FundingAccountResponse</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/FundingAccountResponse} obj Optional instance to populate.
* @return {module:models/FundingAccountResponse} The populated <code>FundingAccountResponse</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('issuer_name')) {
obj['issuer_name'] = ApiClient.convertToType(data['issuer_name'], 'String');
}
if (data.hasOwnProperty('currency_code3d')) {
obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], '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('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('url')) {
obj['url'] = ApiClient.convertToType(data['url'], 'String');
}
if (data.hasOwnProperty('ach_eligible_flag')) {
obj['ach_eligible_flag'] = ApiClient.convertToType(data['ach_eligible_flag'], 'String');
}
if (data.hasOwnProperty('atm_eligible_flag')) {
obj['atm_eligible_flag'] = ApiClient.convertToType(data['atm_eligible_flag'], 'String');
}
if (data.hasOwnProperty('card_cvv_number')) {
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
}
if (data.hasOwnProperty('account_type')) {
obj['account_type'] = ApiClient.convertToType(data['account_type'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('comments')) {
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
}
if (data.hasOwnProperty('audit_info')) {
obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
}
}
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 name of the authority that has issued the account. This is relevant only in the case of bank accounts.
* @member {String} issuer_name
*/
exports.prototype['issuer_name'] = undefined;
/**
* The three-letter currency code in the ISO4217 format, in uppercase, for the card account. It must be a currency supported by EBPP. This defaults to USD.
* @member {String} currency_code3d
*/
exports.prototype['currency_code3d'] = undefined;
/**
* The expiry date for the card. This is to be in the format MM/YY. Only applicable for cards accounts.
* @member {String} expiry_date
*/
exports.prototype['expiry_date'] = undefined;
/**
* The type of ownership for the funding account. This is applicable only in the case of bank accounts and it is defaults to personal.
* @member {module:models/FundingAccountResponse.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. The custom fields need to be configured with EBPP before they can be accepted. EBPP would reject custom fields that are not pre-configured. Please contact <a href = \"mailto: support@billerpayments.com\">support@billerpayments.com</a> for more information on configuring and using custom fields. Only the custom fields enabled for the client, in EBPP, would be accepted in the requests.
* @member {Object.<String, String>} custom_fields
*/
exports.prototype['custom_fields'] = undefined;
/**
* The sub type of the funding account. This is derived by EBPP in the case of card funding accounts. It needs to be passed when adding or editing a DDA/bank account. For e.g., a savings account, a checking account.
* @member {module:models/FundingAccountResponse.AccountSubtypeEnum} account_subtype
*/
exports.prototype['account_subtype'] = undefined;
/**
* Id is a unique identifier assigned to the funding account in EBPP. A new Id is generated for the funding account when the account number is updated.
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* This URL fetches the funding account details.
* @member {String} url
*/
exports.prototype['url'] = undefined;
/**
* Indicates if the funding account can be debited vide ACH, in case the funding account is a Demand Deposit Account (DDA).
* @member {module:models/FundingAccountResponse.AchEligibleFlagEnum} ach_eligible_flag
*/
exports.prototype['ach_eligible_flag'] = undefined;
/**
* Indicates if the funding account can be debited vide the ATM Rail network, in case the funding account is a Debit Card.
* @member {module:models/FundingAccountResponse.AtmEligibleFlagEnum} atm_eligible_flag
*/
exports.prototype['atm_eligible_flag'] = undefined;
/**
* This is never returned by EBPP. This needs to be passed to EBPP when adding or editing a card funding account.
* @member {String} card_cvv_number
*/
exports.prototype['card_cvv_number'] = undefined;
/**
* The type of the funding account.
* @member {module:models/FundingAccountResponse.AccountTypeEnum} account_type
*/
exports.prototype['account_type'] = undefined;
/**
* The status of the funding account in EBPP.
* @member {module:models/FundingAccountResponse.StatusEnum} status
*/
exports.prototype['status'] = undefined;
/**
* Comments that can be used to recollect the operation performed on the resource object. API clients need to ensure that no sensitive information is passed in the memo. Alacriti (EBPP) is not responsible for the security of any sensitive information that may be passed as part of the memo.
* @member {String} comments
*/
exports.prototype['comments'] = undefined;
/**
* @member {module:models/AuditInfoVo} audit_info
*/
exports.prototype['audit_info'] = 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" };
/**
* Allowed values for the <code>ach_eligible_flag</code> property.
* @enum {String}
* @readonly
*/
exports.AchEligibleFlagEnum = {
/**
* value: "yes"
* @const
*/
"yes": "yes",
/**
* value: "no"
* @const
*/
"no": "no" };
/**
* Allowed values for the <code>atm_eligible_flag</code> property.
* @enum {String}
* @readonly
*/
exports.AtmEligibleFlagEnum = {
/**
* value: "yes"
* @const
*/
"yes": "yes",
/**
* value: "no"
* @const
*/
"no": "no" };
/**
* Allowed values for the <code>account_type</code> property.
* @enum {String}
* @readonly
*/
exports.AccountTypeEnum = {
/**
* value: "bank"
* @const
*/
"bank": "bank",
/**
* value: "debit_card"
* @const
*/
"debit_card": "debit_card",
/**
* value: "credit_card"
* @const
*/
"credit_card": "credit_card" };
/**
* Allowed values for the <code>status</code> property.
* @enum {String}
* @readonly
*/
exports.StatusEnum = {
/**
* value: "active"
* @const
*/
"active": "active",
/**
* value: "inactive"
* @const
*/
"inactive": "inactive",
/**
* value: "frozen"
* @const
*/
"frozen": "frozen",
/**
* value: "unverified"
* @const
*/
"unverified": "unverified",
/**
* value: "unusable"
* @const
*/
"unusable": "unusable" };
return exports;
}));