- 1 :
(function(root, factory) {
- 2 :
if (typeof define === 'function' && define.amd) {
- 3 :
// AMD. Register as an anonymous module.
- 4 :
define(['ApiClient', 'models/AddressVo'], factory);
- 5 :
} else if (typeof module === 'object' && module.exports) {
- 6 :
// CommonJS-like environments that support module.exports, like Node.
- 7 :
module.exports = factory(require('../ApiClient'), require('./AddressVo'));
- 8 :
} else {
- 9 :
// Browser globals (root is window)
- 10 :
if (!root.OrbipayPaymentsapiClient) {
- 11 :
root.OrbipayPaymentsapiClient = {};
- 12 :
}
- 13 :
root.OrbipayPaymentsapiClient.SimplePaymentCustomerRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo);
- 14 :
}
- 15 :
}(this, function(ApiClient, AddressVo) {
- 16 :
'use strict';
- 17 :
- 18 :
- 19 :
- 20 :
- 21 :
/**
- 22 :
* The SimplePaymentCustomerRequest model module.
- 23 :
* @module models/SimplePaymentCustomerRequest
- 24 :
*/
- 25 :
- 26 :
/**
- 27 :
* <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
- 28 :
- 29 :
* Constructs a new <code>SimplePaymentCustomerRequest</code>.
- 30 :
* @alias module:models/SimplePaymentCustomerRequest
- 31 :
* @class
- 32 :
* @param locale {String} 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.
- 33 :
*/
- 34 :
var exports = function(locale) {
- 35 :
var _this = this;
- 36 :
- 37 :
- 38 :
- 39 :
- 40 :
- 41 :
- 42 :
- 43 :
- 44 :
_this['locale'] = locale;
- 45 :
- 46 :
- 47 :
- 48 :
- 49 :
- 50 :
- 51 :
- 52 :
};
- 53 :
- 54 :
/**
- 55 :
* Constructs a <code>SimplePaymentCustomerRequest</code> from a plain JavaScript object, optionally creating a new instance.
- 56 :
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
- 57 :
* @param {Object} data The plain JavaScript object bearing properties of interest.
- 58 :
* @param {module:models/SimplePaymentCustomerRequest} obj Optional instance to populate.
- 59 :
* @return {module:models/SimplePaymentCustomerRequest} The populated <code>SimplePaymentCustomerRequest</code> instance.
- 60 :
*/
- 61 :
exports.constructFromObject = function(data, obj) {
- 62 :
if (data) {
- 63 :
obj = obj || new exports();
- 64 :
- 65 :
if (data.hasOwnProperty('customer_reference')) {
- 66 :
obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
- 67 :
}
- 68 :
if (data.hasOwnProperty('first_name')) {
- 69 :
obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
- 70 :
}
- 71 :
if (data.hasOwnProperty('last_name')) {
- 72 :
obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
- 73 :
}
- 74 :
if (data.hasOwnProperty('middle_name')) {
- 75 :
obj['middle_name'] = ApiClient.convertToType(data['middle_name'], 'String');
- 76 :
}
- 77 :
if (data.hasOwnProperty('gender')) {
- 78 :
obj['gender'] = ApiClient.convertToType(data['gender'], 'String');
- 79 :
}
- 80 :
if (data.hasOwnProperty('date_of_birth')) {
- 81 :
obj['date_of_birth'] = ApiClient.convertToType(data['date_of_birth'], 'String');
- 82 :
}
- 83 :
if (data.hasOwnProperty('ssn')) {
- 84 :
obj['ssn'] = ApiClient.convertToType(data['ssn'], 'String');
- 85 :
}
- 86 :
if (data.hasOwnProperty('locale')) {
- 87 :
obj['locale'] = ApiClient.convertToType(data['locale'], 'String');
- 88 :
}
- 89 :
if (data.hasOwnProperty('email')) {
- 90 :
obj['email'] = ApiClient.convertToType(data['email'], 'String');
- 91 :
}
- 92 :
if (data.hasOwnProperty('registered_email')) {
- 93 :
obj['registered_email'] = ApiClient.convertToType(data['registered_email'], 'String');
- 94 :
}
- 95 :
if (data.hasOwnProperty('home_phone')) {
- 96 :
obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
- 97 :
}
- 98 :
if (data.hasOwnProperty('work_phone')) {
- 99 :
obj['work_phone'] = ApiClient.convertToType(data['work_phone'], 'String');
- 100 :
}
- 101 :
if (data.hasOwnProperty('mobile_phone')) {
- 102 :
obj['mobile_phone'] = ApiClient.convertToType(data['mobile_phone'], 'String');
- 103 :
}
- 104 :
if (data.hasOwnProperty('address')) {
- 105 :
obj['address'] = AddressVo.constructFromObject(data['address']);
- 106 :
}
- 107 :
if (data.hasOwnProperty('custom_fields')) {
- 108 :
obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
- 109 :
}
- 110 :
}
- 111 :
return obj;
- 112 :
};
- 113 :
- 114 :
/**
- 115 :
* The unique identifier in the client system for the customer.
- 116 :
* @member {String} customer_reference
- 117 :
*/
- 118 :
exports.prototype['customer_reference'] = undefined;
- 119 :
/**
- 120 :
* The first name of the customer.
- 121 :
* @member {String} first_name
- 122 :
*/
- 123 :
exports.prototype['first_name'] = undefined;
- 124 :
/**
- 125 :
* The last name of the customer.
- 126 :
* @member {String} last_name
- 127 :
*/
- 128 :
exports.prototype['last_name'] = undefined;
- 129 :
/**
- 130 :
* The middle name of the customer.
- 131 :
* @member {String} middle_name
- 132 :
*/
- 133 :
exports.prototype['middle_name'] = undefined;
- 134 :
/**
- 135 :
* The gender of the customer.
- 136 :
* @member {module:models/SimplePaymentCustomerRequest.GenderEnum} gender
- 137 :
*/
- 138 :
exports.prototype['gender'] = undefined;
- 139 :
/**
- 140 :
* The date of birth of the customer. It should be in the full-date format as per ISO8601, namely, YYYY-MM-DD.
- 141 :
* @member {String} date_of_birth
- 142 :
*/
- 143 :
exports.prototype['date_of_birth'] = undefined;
- 144 :
/**
- 145 :
* The SSN of the customer if the account holder is an individual or the tax ID, if the customer is a business.
- 146 :
* @member {String} ssn
- 147 :
*/
- 148 :
exports.prototype['ssn'] = undefined;
- 149 :
/**
- 150 :
* 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.
- 151 :
* @member {String} locale
- 152 :
*/
- 153 :
exports.prototype['locale'] = undefined;
- 154 :
/**
- 155 :
* The email address of the customer to which notifications from EBPP will be sent.
- 156 :
* @member {String} email
- 157 :
*/
- 158 :
exports.prototype['email'] = undefined;
- 159 :
/**
- 160 :
* 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.
- 161 :
* @member {String} registered_email
- 162 :
*/
- 163 :
exports.prototype['registered_email'] = undefined;
- 164 :
/**
- 165 :
* The home phone number of the customer.
- 166 :
* @member {String} home_phone
- 167 :
*/
- 168 :
exports.prototype['home_phone'] = undefined;
- 169 :
/**
- 170 :
* The work phone number of the customer.
- 171 :
* @member {String} work_phone
- 172 :
*/
- 173 :
exports.prototype['work_phone'] = undefined;
- 174 :
/**
- 175 :
* The mobile phone number of the customer.
- 176 :
* @member {String} mobile_phone
- 177 :
*/
- 178 :
exports.prototype['mobile_phone'] = undefined;
- 179 :
/**
- 180 :
* @member {module:models/AddressVo} address
- 181 :
*/
- 182 :
exports.prototype['address'] = undefined;
- 183 :
/**
- 184 :
* The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
- 185 :
* @member {Object.<String, String>} custom_fields
- 186 :
*/
- 187 :
exports.prototype['custom_fields'] = undefined;
- 188 :
- 189 :
- 190 :
/**
- 191 :
* Allowed values for the <code>gender</code> property.
- 192 :
* @enum {String}
- 193 :
* @readonly
- 194 :
*/
- 195 :
exports.GenderEnum = {
- 196 :
/**
- 197 :
* value: "male"
- 198 :
* @const
- 199 :
*/
- 200 :
"male": "male",
- 201 :
/**
- 202 :
* value: "female"
- 203 :
* @const
- 204 :
*/
- 205 :
"female": "female" };
- 206 :
- 207 :
- 208 :
return exports;
- 209 :
}));
- 210 :
- 211 :