infusionsoft-nodejs
Version:
A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.
255 lines (196 loc) • 5.19 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';
import CustomFieldOption from './CustomFieldOption';
/**
* The CustomFieldMetaData model module.
* @module model/CustomFieldMetaData
* @version V1.0
*/
export default class CustomFieldMetaData {
/**
* Constructs a new <code>CustomFieldMetaData</code>.
* @alias module:model/CustomFieldMetaData
* @class
*/
constructor() {
}
/**
* Constructs a <code>CustomFieldMetaData</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/CustomFieldMetaData} obj Optional instance to populate.
* @return {module:model/CustomFieldMetaData} The populated <code>CustomFieldMetaData</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CustomFieldMetaData();
if (data.hasOwnProperty('field_type')) {
obj['field_type'] = ApiClient.convertToType(data['field_type'], 'String');
}
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('label')) {
obj['label'] = ApiClient.convertToType(data['label'], 'String');
}
if (data.hasOwnProperty('options')) {
obj['options'] = ApiClient.convertToType(data['options'], [CustomFieldOption]);
}
}
return obj;
}
/**
* @member {module:model/CustomFieldMetaData.FieldTypeEnum} field_type
*/
field_type = undefined;
/**
* @member {Number} id
*/
id = undefined;
/**
* @member {String} label
*/
label = undefined;
/**
* @member {Array.<module:model/CustomFieldOption>} options
*/
options = undefined;
/**
* Allowed values for the <code>field_type</code> property.
* @enum {String}
* @readonly
*/
static FieldTypeEnum = {
/**
* value: "Currency"
* @const
*/
"Currency": "Currency",
/**
* value: "Date"
* @const
*/
"Date": "Date",
/**
* value: "DateTime"
* @const
*/
"DateTime": "DateTime",
/**
* value: "DayOfWeek"
* @const
*/
"DayOfWeek": "DayOfWeek",
/**
* value: "Drilldown"
* @const
*/
"Drilldown": "Drilldown",
/**
* value: "Email"
* @const
*/
"Email": "Email",
/**
* value: "Month"
* @const
*/
"Month": "Month",
/**
* value: "ListBox"
* @const
*/
"ListBox": "ListBox",
/**
* value: "Name"
* @const
*/
"Name": "Name",
/**
* value: "WholeNumber"
* @const
*/
"WholeNumber": "WholeNumber",
/**
* value: "DecimalNumber"
* @const
*/
"DecimalNumber": "DecimalNumber",
/**
* value: "Percent"
* @const
*/
"Percent": "Percent",
/**
* value: "PhoneNumber"
* @const
*/
"PhoneNumber": "PhoneNumber",
/**
* value: "Radio"
* @const
*/
"Radio": "Radio",
/**
* value: "Dropdown"
* @const
*/
"Dropdown": "Dropdown",
/**
* value: "SocialSecurityNumber"
* @const
*/
"SocialSecurityNumber": "SocialSecurityNumber",
/**
* value: "State"
* @const
*/
"State": "State",
/**
* value: "Text"
* @const
*/
"Text": "Text",
/**
* value: "TextArea"
* @const
*/
"TextArea": "TextArea",
/**
* value: "User"
* @const
*/
"User": "User",
/**
* value: "UserListBox"
* @const
*/
"UserListBox": "UserListBox",
/**
* value: "Website"
* @const
*/
"Website": "Website",
/**
* value: "Year"
* @const
*/
"Year": "Year",
/**
* value: "YesNo"
* @const
*/
"YesNo": "YesNo"
};
}