/**
* AI Mastering API
* This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
*
* OpenAPI spec version: 1.0.0
* Contact: info@bakuage.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.1
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.Aimastering) {
root.Aimastering = {};
}
root.Aimastering.Plan = factory(root.Aimastering.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Plan model module.
* @module model/Plan
* @version 1.1.0
*/
/**
* Constructs a new Plan.
* @alias module:model/Plan
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a Plan from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from data to obj if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Plan} obj Optional instance to populate.
* @return {module:model/Plan} The populated Plan instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'Number');
}
if (data.hasOwnProperty('currency')) {
obj['currency'] = ApiClient.convertToType(data['currency'], 'String');
}
if (data.hasOwnProperty('interval')) {
obj['interval'] = ApiClient.convertToType(data['interval'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('stripe_plan_id')) {
obj['stripe_plan_id'] = ApiClient.convertToType(data['stripe_plan_id'], 'String');
}
}
return obj;
}
/**
* @member {Number} amount
*/
exports.prototype['amount'] = undefined;
/**
* @member {module:model/Plan.CurrencyEnum} currency
*/
exports.prototype['currency'] = undefined;
/**
* @member {module:model/Plan.IntervalEnum} interval
*/
exports.prototype['interval'] = undefined;
/**
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* @member {String} stripe_plan_id
*/
exports.prototype['stripe_plan_id'] = undefined;
/**
* Allowed values for the currency property.
* @enum {String}
* @readonly
*/
exports.CurrencyEnum = {
/**
* value: "jpy"
* @const
*/
"jpy": "jpy",
/**
* value: "usd"
* @const
*/
"usd": "usd" };
/**
* Allowed values for the interval property.
* @enum {String}
* @readonly
*/
exports.IntervalEnum = {
/**
* value: "month"
* @const
*/
"month": "month" };
return exports;
}));