(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.UpdateFundingAccountRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FundingAccountAddress);
}
}(this, function(ApiClient, FundingAccountAddress) {
'use strict';
/**
* The UpdateFundingAccountRequest model module.
* @module models/UpdateFundingAccountRequest
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>UpdateFundingAccountRequest</code>.
* @alias module:models/UpdateFundingAccountRequest
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>UpdateFundingAccountRequest</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/UpdateFundingAccountRequest} obj Optional instance to populate.
* @return {module:models/UpdateFundingAccountRequest} The populated <code>UpdateFundingAccountRequest</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('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('card_cvv_number')) {
obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
}
if (data.hasOwnProperty('comments')) {
obj['comments'] = ApiClient.convertToType(data['comments'], '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. 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/UpdateFundingAccountRequest.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.
* @member {module:models/UpdateFundingAccountRequest.AccountSubtypeEnum} account_subtype
*/
exports.prototype['account_subtype'] = undefined;
/**
* The status of the funding account in EBPP.
* @member {module:models/UpdateFundingAccountRequest.StatusEnum} status
*/
exports.prototype['status'] = 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;
/**
* 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;
/**
* 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>status</code> property.
* @enum {String}
* @readonly
*/
exports.StatusEnum = {
/**
* value: "active"
* @const
*/
"active": "active",
/**
* value: "frozen"
* @const
*/
"frozen": "frozen",
/**
* value: "unverified"
* @const
*/
"unverified": "unverified",
/**
* value: "inactive"
* @const
*/
"inactive": "inactive",
/**
* value: "deleted"
* @const
*/
"deleted": "deleted" };
return exports;
}));