(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'models/AddressVo'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./AddressVo'));
} else {
// Browser globals (root is window)
if (!root.OrbipayPaymentsapiClient) {
root.OrbipayPaymentsapiClient = {};
}
root.OrbipayPaymentsapiClient.CustomerSnapshotResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo);
}
}(this, function(ApiClient, AddressVo) {
'use strict';
/**
* The CustomerSnapshotResponse model module.
* @module models/CustomerSnapshotResponse
*/
/**
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
* Constructs a new <code>CustomerSnapshotResponse</code>.
* The customer making the payment
* @alias module:models/CustomerSnapshotResponse
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CustomerSnapshotResponse</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/CustomerSnapshotResponse} obj Optional instance to populate.
* @return {module:models/CustomerSnapshotResponse} The populated <code>CustomerSnapshotResponse</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
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('customer_reference')) {
obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
}
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('email')) {
obj['email'] = ApiClient.convertToType(data['email'], 'String');
}
if (data.hasOwnProperty('home_phone')) {
obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
}
if (data.hasOwnProperty('address')) {
obj['address'] = AddressVo.constructFromObject(data['address']);
}
}
return obj;
};
/**
* The unique identifier assigned by EBPP to the customer.
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* The URL that can be used to fetch the details of the customer.
* @member {String} url
*/
exports.prototype['url'] = undefined;
/**
* The unique identifier in the client system for the customer.
* @member {String} customer_reference
*/
exports.prototype['customer_reference'] = undefined;
/**
* The first name of the customer.
* @member {String} first_name
*/
exports.prototype['first_name'] = undefined;
/**
* The last name of the customer.
* @member {String} last_name
*/
exports.prototype['last_name'] = undefined;
/**
* The middle initial of the customer.
* @member {String} middle_name
*/
exports.prototype['middle_name'] = 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 home phone number of the customer.
* @member {String} home_phone
*/
exports.prototype['home_phone'] = undefined;
/**
* @member {module:models/AddressVo} address
*/
exports.prototype['address'] = undefined;
return exports;
}));