UNPKG

infusionsoft-nodejs

Version:

A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.

233 lines (180 loc) 5 kB
/** * 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 HistoricalCounts from './HistoricalCounts'; /** * The Goal model module. * @module model/Goal * @version V1.0 */ export default class Goal { /** * Constructs a new <code>Goal</code>. * @alias module:model/Goal * @class */ constructor() { } /** * Constructs a <code>Goal</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/Goal} obj Optional instance to populate. * @return {module:model/Goal} The populated <code>Goal</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new Goal(); if (data.hasOwnProperty('historical_contact_counts')) { obj['historical_contact_counts'] = HistoricalCounts.constructFromObject(data['historical_contact_counts']); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'Number'); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('next_sequence_ids')) { obj['next_sequence_ids'] = ApiClient.convertToType(data['next_sequence_ids'], ['Number']); } if (data.hasOwnProperty('previous_sequence_ids')) { obj['previous_sequence_ids'] = ApiClient.convertToType(data['previous_sequence_ids'], ['Number']); } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } } return obj; } /** * @member {module:model/HistoricalCounts} historical_contact_counts */ historical_contact_counts = undefined; /** * @member {Number} id */ id = undefined; /** * @member {String} name */ name = undefined; /** * @member {Array.<Number>} next_sequence_ids */ next_sequence_ids = undefined; /** * @member {Array.<Number>} previous_sequence_ids */ previous_sequence_ids = undefined; /** * @member {module:model/Goal.TypeEnum} type */ type = undefined; /** * Allowed values for the <code>type</code> property. * @enum {String} * @readonly */ static TypeEnum = { /** * value: "WebForm" * @const */ "WebForm": "WebForm", /** * value: "LandingPage" * @const */ "LandingPage": "LandingPage", /** * value: "Survey" * @const */ "Survey": "Survey", /** * value: "LinkClick" * @const */ "LinkClick": "LinkClick", /** * value: "Score" * @const */ "Score": "Score", /** * value: "Purchase" * @const */ "Purchase": "Purchase", /** * value: "Quote" * @const */ "Quote": "Quote", /** * value: "WebsiteTrigger" * @const */ "WebsiteTrigger": "WebsiteTrigger", /** * value: "InternalForm" * @const */ "InternalForm": "InternalForm", /** * value: "Task" * @const */ "Task": "Task", /** * value: "StageMove" * @const */ "StageMove": "StageMove", /** * value: "Note" * @const */ "Note": "Note", /** * value: "Tag" * @const */ "Tag": "Tag", /** * value: "GroSocial" * @const */ "GroSocial": "GroSocial", /** * value: "TwitterForm" * @const */ "TwitterForm": "TwitterForm", /** * value: "API" * @const */ "API": "API", /** * value: "WordPress" * @const */ "WordPress": "WordPress", /** * value: "NewLandingPage" * @const */ "NewLandingPage": "NewLandingPage" }; }