UNPKG

infusionsoft-nodejs

Version:

A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.

130 lines (96 loc) 3.39 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'; /** * The SubscriptionPlan model module. * @module model/SubscriptionPlan * @version V1.0 */ export default class SubscriptionPlan { /** * Constructs a new <code>SubscriptionPlan</code>. * @alias module:model/SubscriptionPlan * @class */ constructor() { } /** * Constructs a <code>SubscriptionPlan</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/SubscriptionPlan} obj Optional instance to populate. * @return {module:model/SubscriptionPlan} The populated <code>SubscriptionPlan</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new SubscriptionPlan(); if (data.hasOwnProperty('active')) { obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); } if (data.hasOwnProperty('cycle')) { obj['cycle'] = ApiClient.convertToType(data['cycle'], 'Number'); } if (data.hasOwnProperty('frequency')) { obj['frequency'] = ApiClient.convertToType(data['frequency'], 'Number'); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'Number'); } if (data.hasOwnProperty('number_of_cycles')) { obj['number_of_cycles'] = ApiClient.convertToType(data['number_of_cycles'], 'Number'); } if (data.hasOwnProperty('plan_price')) { obj['plan_price'] = ApiClient.convertToType(data['plan_price'], 'Number'); } if (data.hasOwnProperty('subscription_plan_index')) { obj['subscription_plan_index'] = ApiClient.convertToType(data['subscription_plan_index'], 'Number'); } if (data.hasOwnProperty('subscription_plan_name')) { obj['subscription_plan_name'] = ApiClient.convertToType(data['subscription_plan_name'], 'String'); } } return obj; } /** * @member {Boolean} active */ active = undefined; /** * @member {Number} cycle */ cycle = undefined; /** * @member {Number} frequency */ frequency = undefined; /** * @member {Number} id */ id = undefined; /** * @member {Number} number_of_cycles */ number_of_cycles = undefined; /** * @member {Number} plan_price */ plan_price = undefined; /** * @member {Number} subscription_plan_index */ subscription_plan_index = undefined; /** * @member {String} subscription_plan_name */ subscription_plan_name = undefined; }