(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/AddressVo', 'models/AuditInfoVo', 'models/CustomersCustomerAccountsResponse', 'models/CustomersFundingAccountsResponse', 'models/CustomersPaymentSetupsResponse', 'models/CustomersPaymentsResponse'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./AddressVo'), require('./AuditInfoVo'), require('./CustomersCustomerAccountsResponse'), require('./CustomersFundingAccountsResponse'), require('./CustomersPaymentSetupsResponse'), require('./CustomersPaymentsResponse'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.CustomerResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.CustomersCustomerAccountsResponse, root.OrbipayPaymentsapiClient.CustomersFundingAccountsResponse, root.OrbipayPaymentsapiClient.CustomersPaymentSetupsResponse, root.OrbipayPaymentsapiClient.CustomersPaymentsResponse);
}
}(this, function(ApiClient, AddressVo, AuditInfoVo, CustomersCustomerAccountsResponse, CustomersFundingAccountsResponse, CustomersPaymentSetupsResponse, CustomersPaymentsResponse) {
'use strict';
/**
* The CustomerResponse model module.
* @module models/CustomerResponse
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>CustomerResponse</code>.
* @alias module:models/CustomerResponse
* @class
* @param id {String} The unique identifier assigned by EBPP to the customer.
* @param status {module:models/CustomerResponse.StatusEnum} The status of the customer in EBPP.
*/
var exports = function(id, status) {
var _this = this;
_this['id'] = id;
_this['status'] = status;
};
/**
* Constructs a <code>CustomerResponse</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/CustomerResponse} obj Optional instance to populate.
* @return {module:models/CustomerResponse} The populated <code>CustomerResponse</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('first_name')) {
obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
}
if (data.hasOwnProperty('last_name')) {
obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
}
if (data.hasOwnProperty('middle_name')) {
obj['middle_name'] = ApiClient.convertToType(data['middle_name'], 'String');
}
if (data.hasOwnProperty('gender')) {
obj['gender'] = ApiClient.convertToType(data['gender'], 'String');
}
if (data.hasOwnProperty('date_of_birth')) {
obj['date_of_birth'] = ApiClient.convertToType(data['date_of_birth'], 'String');
}
if (data.hasOwnProperty('ssn')) {
obj['ssn'] = ApiClient.convertToType(data['ssn'], 'String');
}
if (data.hasOwnProperty('locale')) {
obj['locale'] = ApiClient.convertToType(data['locale'], 'String');
}
if (data.hasOwnProperty('email')) {
obj['email'] = ApiClient.convertToType(data['email'], 'String');
}
if (data.hasOwnProperty('registered_email')) {
obj['registered_email'] = ApiClient.convertToType(data['registered_email'], 'String');
}
if (data.hasOwnProperty('home_phone')) {
obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
}
if (data.hasOwnProperty('work_phone')) {
obj['work_phone'] = ApiClient.convertToType(data['work_phone'], 'String');
}
if (data.hasOwnProperty('mobile_phone')) {
obj['mobile_phone'] = ApiClient.convertToType(data['mobile_phone'], 'String');
}
if (data.hasOwnProperty('address')) {
obj['address'] = AddressVo.constructFromObject(data['address']);
}
if (data.hasOwnProperty('custom_fields')) {
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
}
if (data.hasOwnProperty('customer_reference')) {
obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
}
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('url')) {
obj['url'] = ApiClient.convertToType(data['url'], 'String');
}
if (data.hasOwnProperty('comments')) {
obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
}
if (data.hasOwnProperty('customer_accounts')) {
obj['customer_accounts'] = CustomersCustomerAccountsResponse.constructFromObject(data['customer_accounts']);
}
if (data.hasOwnProperty('funding_accounts')) {
obj['funding_accounts'] = CustomersFundingAccountsResponse.constructFromObject(data['funding_accounts']);
}
if (data.hasOwnProperty('payments')) {
obj['payments'] = CustomersPaymentsResponse.constructFromObject(data['payments']);
}
if (data.hasOwnProperty('payment_setups')) {
obj['payment_setups'] = CustomersPaymentSetupsResponse.constructFromObject(data['payment_setups']);
}
if (data.hasOwnProperty('audit_info')) {
obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
}
}
return obj;
};
/**
* The first name of the customer. Either first_name or last_name is required to create a customer.
* @member {String} first_name
*/
exports.prototype['first_name'] = undefined;
/**
* The last name of the customer. Either first_name or last_name is required to create a customer.
* @member {String} last_name
*/
exports.prototype['last_name'] = undefined;
/**
* The middle name of the customer.
* @member {String} middle_name
*/
exports.prototype['middle_name'] = undefined;
/**
* The gender of the customer.
* @member {module:models/CustomerResponse.GenderEnum} gender
*/
exports.prototype['gender'] = undefined;
/**
* The date of birth of the customer. It should be in the full-date format as per ISO8601, namely, YYYY-MM-DD.
* @member {String} date_of_birth
*/
exports.prototype['date_of_birth'] = undefined;
/**
* The SSN of the customer if the account holder is an individual or the tax ID, if the customer is a business.
* @member {String} ssn
*/
exports.prototype['ssn'] = undefined;
/**
* The language in which the customer wants the alerts and notifications from EBPP. This is to be specified in the format,<br><i>< <b>ISO-639-1 language code</b> >_< <b>ISO ALPHA-2 Country Code</b> ></i>.<br> For e.g., <b>en_US</b> indicates the language preference as US English, which is also the default value.
* @member {String} locale
*/
exports.prototype['locale'] = undefined;
/**
* The email address of the customer to which notifications from EBPP will be sent. This will default to the registered_email while creating a customer.
* @member {String} email
*/
exports.prototype['email'] = undefined;
/**
* The email address of the customer registered with the client. This may be used to uniquely identify the customer if the client is set up accordingly in EBPP.
* @member {String} registered_email
*/
exports.prototype['registered_email'] = undefined;
/**
* The home phone number of the customer.
* @member {String} home_phone
*/
exports.prototype['home_phone'] = undefined;
/**
* The work phone number of the customer.
* @member {String} work_phone
*/
exports.prototype['work_phone'] = undefined;
/**
* The mobile phone number of the customer.
* @member {String} mobile_phone
*/
exports.prototype['mobile_phone'] = undefined;
/**
* @member {module:models/AddressVo} address
*/
exports.prototype['address'] = 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 unique identifier in the client system for the customer.
* @member {String} customer_reference
*/
exports.prototype['customer_reference'] = undefined;
/**
* The unique identifier assigned by EBPP to the customer.
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* The status of the customer in EBPP.
* @member {module:models/CustomerResponse.StatusEnum} status
*/
exports.prototype['status'] = undefined;
/**
* This URL fetches the Customer details.
* @member {String} url
*/
exports.prototype['url'] = 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/CustomersCustomerAccountsResponse} customer_accounts
*/
exports.prototype['customer_accounts'] = undefined;
/**
* @member {module:models/CustomersFundingAccountsResponse} funding_accounts
*/
exports.prototype['funding_accounts'] = undefined;
/**
* @member {module:models/CustomersPaymentsResponse} payments
*/
exports.prototype['payments'] = undefined;
/**
* @member {module:models/CustomersPaymentSetupsResponse} payment_setups
*/
exports.prototype['payment_setups'] = undefined;
/**
* @member {module:models/AuditInfoVo} audit_info
*/
exports.prototype['audit_info'] = undefined;
/**
* Allowed values for the <code>gender</code> property.
* @enum {String}
* @readonly
*/
exports.GenderEnum = {
/**
* value: "male"
* @const
*/
"male": "male",
/**
* value: "female"
* @const
*/
"female": "female" };
/**
* Allowed values for the <code>status</code> property.
* @enum {String}
* @readonly
*/
exports.StatusEnum = {
/**
* value: "active"
* @const
*/
"active": "active",
/**
* value: "revoked"
* @const
*/
"revoked": "revoked",
/**
* value: "suspended"
* @const
*/
"suspended": "suspended" };
return exports;
}));