infusionsoft-nodejs
Version:
A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.
147 lines (111 loc) • 3.3 kB
JavaScript
/**
* Infusionsoft REST API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: V1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The Address model module.
* @module model/Address
* @version V1.0
*/
export default class Address {
/**
* Constructs a new <code>Address</code>.
* @alias module:model/Address
* @class
*/
constructor() {
}
/**
* Constructs a <code>Address</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:model/Address} obj Optional instance to populate.
* @return {module:model/Address} The populated <code>Address</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Address();
if (data.hasOwnProperty('country_code')) {
obj['country_code'] = ApiClient.convertToType(data['country_code'], 'String');
}
if (data.hasOwnProperty('field')) {
obj['field'] = ApiClient.convertToType(data['field'], 'String');
}
if (data.hasOwnProperty('line1')) {
obj['line1'] = ApiClient.convertToType(data['line1'], 'String');
}
if (data.hasOwnProperty('line2')) {
obj['line2'] = ApiClient.convertToType(data['line2'], 'String');
}
if (data.hasOwnProperty('locality')) {
obj['locality'] = ApiClient.convertToType(data['locality'], 'String');
}
if (data.hasOwnProperty('postal_code')) {
obj['postal_code'] = ApiClient.convertToType(data['postal_code'], 'String');
}
if (data.hasOwnProperty('region')) {
obj['region'] = ApiClient.convertToType(data['region'], 'String');
}
}
return obj;
}
/**
* @member {String} country_code
*/
country_code = undefined;
/**
* @member {module:model/Address.FieldEnum} field
*/
field = undefined;
/**
* @member {String} line1
*/
line1 = undefined;
/**
* @member {String} line2
*/
line2 = undefined;
/**
* @member {String} locality
*/
locality = undefined;
/**
* @member {String} postal_code
*/
postal_code = undefined;
/**
* @member {String} region
*/
region = undefined;
/**
* Allowed values for the <code>field</code> property.
* @enum {String}
* @readonly
*/
static FieldEnum = {
/**
* value: "BILLING"
* @const
*/
"BILLING": "BILLING",
/**
* value: "SHIPPING"
* @const
*/
"SHIPPING": "SHIPPING",
/**
* value: "OTHER"
* @const
*/
"OTHER": "OTHER"
};
}