Class: Files::Plan
- Inherits:
-
Object
- Object
- Files::Plan
- Defined in:
- lib/files.com/models/plan.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.create_export(params = {}, options = {}) ⇒ Object
Parameters: currency - string - Currency.
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#activation_cost ⇒ Object
decimal - Activation cost (upfront).
-
#addon_description ⇒ Object
string - Description of add on charges.
-
#annually ⇒ Object
string - Price annually.
-
#annually_addon ⇒ Object
string - Addons price annually.
-
#automation_and_sync_flow_overage_cost ⇒ Object
string - Cost per additional automation and sync flow.
-
#automation_and_sync_flows ⇒ Object
int64 - Number of automation and sync flows included.
-
#child_sites ⇒ Object
int64 - Number of child sites available.
-
#currency ⇒ Object
string - Currency.
-
#dedicated_ip ⇒ Object
boolean - Offers dedicated ip?.
-
#dedicated_ips ⇒ Object
int64 - Number of dedicated IPs.
-
#domain_count ⇒ Object
int64 - Number of custom domains.
-
#feature_bundle_eca ⇒ Object
boolean - Does this plan include the ECA feature bundle?.
-
#feature_bundle_power ⇒ Object
boolean - Does this plan include the Power feature bundle?.
-
#feature_bundle_premier ⇒ Object
boolean - Does this plan include the Enterprise feature bundle?.
-
#feature_bundle_starter ⇒ Object
boolean - Does this plan include the Starter feature bundle?.
-
#id ⇒ Object
int64 - Plan ID.
-
#initialize(attributes = {}, options = {}) ⇒ Plan
constructor
A new instance of Plan.
-
#monthly ⇒ Object
string - Price monthly.
-
#monthly_addon ⇒ Object
string - Addons price monthly.
-
#name ⇒ Object
string - Plan name.
-
#outbound_connections ⇒ Object
int64 - Number of outbound connections.
-
#preview_page_limit ⇒ Object
int64 - Number of previews available.
-
#regions_included ⇒ Object
int64 - Number of storage regions included.
-
#remote_sync_interval ⇒ Object
int64 - Number of minutes between remote sync.
-
#signup_page_marketing_text ⇒ Object
string - Additional marketing text to show on signup page.
-
#staging_sites ⇒ Object
int64 - Number of child sites available.
-
#system_users ⇒ Object
int64 - # of System Users included.
-
#transformation_and_ai_credit_overage_cost_per_million ⇒ Object
string - Cost per million additional transformation and AI credits.
-
#transformation_and_ai_credits ⇒ Object
int64 - Transformation and AI credits included.
-
#trial_days ⇒ Object
int64 - # of trial days included.
-
#usage_cost ⇒ Object
string - Usage cost per GB of overage.
-
#usage_included ⇒ Object
int64 - Usage included per month, in GB.
-
#user_cost ⇒ Object
string - Cost per additional user.
-
#users ⇒ Object
int64 - # of users included.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Plan
Returns a new instance of Plan.
9 10 11 12 |
# File 'lib/files.com/models/plan.rb', line 9 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/files.com/models/plan.rb', line 7 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/files.com/models/plan.rb', line 7 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
196 197 198 |
# File 'lib/files.com/models/plan.rb', line 196 def self.all(params = {}, = {}) list(params, ) end |
.create_export(params = {}, options = {}) ⇒ Object
Parameters:
currency - string - Currency.
202 203 204 205 206 207 |
# File 'lib/files.com/models/plan.rb', line 202 def self.create_export(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: currency must be an String") if params[:currency] and !params[:currency].is_a?(String) response, = Api.send_request("/plans/create_export", :post, params, ) Export.new(response.data, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
currency - string - Currency.
186 187 188 189 190 191 192 193 194 |
# File 'lib/files.com/models/plan.rb', line 186 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: currency must be an String") if params[:currency] and !params[:currency].is_a?(String) List.new(Plan, params) do Api.send_request("/plans", :get, params, ) end end |
Instance Method Details
#activation_cost ⇒ Object
decimal - Activation cost (upfront)
20 21 22 23 24 25 |
# File 'lib/files.com/models/plan.rb', line 20 def activation_cost value = @attributes[:activation_cost] return value if value.nil? || value.is_a?(BigDecimal) BigDecimal(value.to_s) end |
#addon_description ⇒ Object
string - Description of add on charges
28 29 30 |
# File 'lib/files.com/models/plan.rb', line 28 def addon_description @attributes[:addon_description] end |
#annually ⇒ Object
string - Price annually
33 34 35 |
# File 'lib/files.com/models/plan.rb', line 33 def annually @attributes[:annually] end |
#annually_addon ⇒ Object
string - Addons price annually
38 39 40 |
# File 'lib/files.com/models/plan.rb', line 38 def annually_addon @attributes[:annually_addon] end |
#automation_and_sync_flow_overage_cost ⇒ Object
string - Cost per additional automation and sync flow
43 44 45 |
# File 'lib/files.com/models/plan.rb', line 43 def automation_and_sync_flow_overage_cost @attributes[:automation_and_sync_flow_overage_cost] end |
#automation_and_sync_flows ⇒ Object
int64 - Number of automation and sync flows included. 0 means unlimited.
48 49 50 |
# File 'lib/files.com/models/plan.rb', line 48 def automation_and_sync_flows @attributes[:automation_and_sync_flows] end |
#child_sites ⇒ Object
int64 - Number of child sites available
53 54 55 |
# File 'lib/files.com/models/plan.rb', line 53 def child_sites @attributes[:child_sites] end |
#currency ⇒ Object
string - Currency
58 59 60 |
# File 'lib/files.com/models/plan.rb', line 58 def currency @attributes[:currency] end |
#dedicated_ip ⇒ Object
boolean - Offers dedicated ip?
63 64 65 |
# File 'lib/files.com/models/plan.rb', line 63 def dedicated_ip @attributes[:dedicated_ip] end |
#dedicated_ips ⇒ Object
int64 - Number of dedicated IPs
68 69 70 |
# File 'lib/files.com/models/plan.rb', line 68 def dedicated_ips @attributes[:dedicated_ips] end |
#domain_count ⇒ Object
int64 - Number of custom domains
73 74 75 |
# File 'lib/files.com/models/plan.rb', line 73 def domain_count @attributes[:domain_count] end |
#feature_bundle_eca ⇒ Object
boolean - Does this plan include the ECA feature bundle?
78 79 80 |
# File 'lib/files.com/models/plan.rb', line 78 def feature_bundle_eca @attributes[:feature_bundle_eca] end |
#feature_bundle_power ⇒ Object
boolean - Does this plan include the Power feature bundle?
83 84 85 |
# File 'lib/files.com/models/plan.rb', line 83 def feature_bundle_power @attributes[:feature_bundle_power] end |
#feature_bundle_premier ⇒ Object
boolean - Does this plan include the Enterprise feature bundle?
88 89 90 |
# File 'lib/files.com/models/plan.rb', line 88 def feature_bundle_premier @attributes[:feature_bundle_premier] end |
#feature_bundle_starter ⇒ Object
boolean - Does this plan include the Starter feature bundle?
93 94 95 |
# File 'lib/files.com/models/plan.rb', line 93 def feature_bundle_starter @attributes[:feature_bundle_starter] end |
#id ⇒ Object
int64 - Plan ID
15 16 17 |
# File 'lib/files.com/models/plan.rb', line 15 def id @attributes[:id] end |
#monthly ⇒ Object
string - Price monthly
98 99 100 |
# File 'lib/files.com/models/plan.rb', line 98 def monthly @attributes[:monthly] end |
#monthly_addon ⇒ Object
string - Addons price monthly
103 104 105 |
# File 'lib/files.com/models/plan.rb', line 103 def monthly_addon @attributes[:monthly_addon] end |
#name ⇒ Object
string - Plan name
108 109 110 |
# File 'lib/files.com/models/plan.rb', line 108 def name @attributes[:name] end |
#outbound_connections ⇒ Object
int64 - Number of outbound connections
113 114 115 |
# File 'lib/files.com/models/plan.rb', line 113 def outbound_connections @attributes[:outbound_connections] end |
#preview_page_limit ⇒ Object
int64 - Number of previews available
118 119 120 |
# File 'lib/files.com/models/plan.rb', line 118 def preview_page_limit @attributes[:preview_page_limit] end |
#regions_included ⇒ Object
int64 - Number of storage regions included
123 124 125 |
# File 'lib/files.com/models/plan.rb', line 123 def regions_included @attributes[:regions_included] end |
#remote_sync_interval ⇒ Object
int64 - Number of minutes between remote sync
128 129 130 |
# File 'lib/files.com/models/plan.rb', line 128 def remote_sync_interval @attributes[:remote_sync_interval] end |
#signup_page_marketing_text ⇒ Object
string - Additional marketing text to show on signup page
133 134 135 |
# File 'lib/files.com/models/plan.rb', line 133 def signup_page_marketing_text @attributes[:signup_page_marketing_text] end |
#staging_sites ⇒ Object
int64 - Number of child sites available
143 144 145 |
# File 'lib/files.com/models/plan.rb', line 143 def staging_sites @attributes[:staging_sites] end |
#system_users ⇒ Object
int64 - # of System Users included. 0 means that system users are included in the normal user quota.
138 139 140 |
# File 'lib/files.com/models/plan.rb', line 138 def system_users @attributes[:system_users] end |
#transformation_and_ai_credit_overage_cost_per_million ⇒ Object
string - Cost per million additional transformation and AI credits
148 149 150 |
# File 'lib/files.com/models/plan.rb', line 148 def transformation_and_ai_credit_overage_cost_per_million @attributes[:transformation_and_ai_credit_overage_cost_per_million] end |
#transformation_and_ai_credits ⇒ Object
int64 - Transformation and AI credits included
153 154 155 |
# File 'lib/files.com/models/plan.rb', line 153 def transformation_and_ai_credits @attributes[:transformation_and_ai_credits] end |
#trial_days ⇒ Object
int64 - # of trial days included. Values of 0 or less mean no trial is offered.
158 159 160 |
# File 'lib/files.com/models/plan.rb', line 158 def trial_days @attributes[:trial_days] end |
#usage_cost ⇒ Object
string - Usage cost per GB of overage
168 169 170 |
# File 'lib/files.com/models/plan.rb', line 168 def usage_cost @attributes[:usage_cost] end |
#usage_included ⇒ Object
int64 - Usage included per month, in GB
173 174 175 |
# File 'lib/files.com/models/plan.rb', line 173 def usage_included @attributes[:usage_included] end |
#user_cost ⇒ Object
string - Cost per additional user
163 164 165 |
# File 'lib/files.com/models/plan.rb', line 163 def user_cost @attributes[:user_cost] end |
#users ⇒ Object
int64 - # of users included. 0 or -1 mean unlimited.
178 179 180 |
# File 'lib/files.com/models/plan.rb', line 178 def users @attributes[:users] end |