Class: ForestVPNCloudAPI::ProfilesApi
- Inherits:
-
Object
- Object
- ForestVPNCloudAPI::ProfilesApi
- Defined in:
- lib/forestvpn_cloud_api/api/profiles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_profile(opts = {}) ⇒ Profile
Create profile.
-
#create_profile_data_usage_limit(profile_id, opts = {}) ⇒ DataUsageLimit
Create profile data usage limit.
-
#create_profile_data_usage_limit_with_http_info(profile_id, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Create profile data usage limit.
-
#create_profile_with_http_info(opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Create profile.
-
#delete_profile(profile_id, opts = {}) ⇒ nil
Delete profile Deletes profile and all associated resources.
-
#delete_profile_data_usage_limit(profile_id, limit_id, opts = {}) ⇒ nil
Delete profile data usage limit.
-
#delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete profile data usage limit.
-
#delete_profile_with_http_info(profile_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete profile Deletes profile and all associated resources.
-
#get_profile(profile_id, opts = {}) ⇒ Profile
Profile details.
-
#get_profile_data_usage_limit(profile_id, limit_id, opts = {}) ⇒ DataUsageLimit
Profile data usage limit details.
-
#get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Profile data usage limit details.
-
#get_profile_with_http_info(profile_id, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Profile details.
-
#initialize(api_client = ApiClient.default) ⇒ ProfilesApi
constructor
A new instance of ProfilesApi.
-
#list_profile_data_usage_limits(profile_id, opts = {}) ⇒ Array<DataUsageLimit>
Profile data usage limits list.
-
#list_profile_data_usage_limits_with_http_info(profile_id, opts = {}) ⇒ Array<(Array<DataUsageLimit>, Integer, Hash)>
Profile data usage limits list.
-
#list_profile_stats(profile_id, opts = {}) ⇒ Array<ProfileStats>
Profile stats list.
-
#list_profile_stats_with_http_info(profile_id, opts = {}) ⇒ Array<(Array<ProfileStats>, Integer, Hash)>
Profile stats list.
-
#list_profiles(opts = {}) ⇒ Array<Profile>
Profile list.
-
#list_profiles_with_http_info(opts = {}) ⇒ Array<(Array<Profile>, Integer, Hash)>
Profile list.
-
#partial_update_profile(profile_id, create_or_update_profile_request, opts = {}) ⇒ Profile
Partial update profile details.
-
#partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ DataUsageLimit
Partial update profile data usage limit.
-
#partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Partial update profile data usage limit.
-
#partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Partial update profile details.
-
#update_profile(profile_id, create_or_update_profile_request, opts = {}) ⇒ Profile
Update profile details.
-
#update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ DataUsageLimit
Update profile data usage limit.
-
#update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Update profile data usage limit.
-
#update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Update profile details.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProfilesApi
Returns a new instance of ProfilesApi.
19 20 21 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_profile(opts = {}) ⇒ Profile
Create profile
26 27 28 29 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 26 def create_profile(opts = {}) data, _status_code, _headers = create_profile_with_http_info(opts) data end |
#create_profile_data_usage_limit(profile_id, opts = {}) ⇒ DataUsageLimit
Create profile data usage limit
89 90 91 92 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 89 def create_profile_data_usage_limit(profile_id, opts = {}) data, _status_code, _headers = create_profile_data_usage_limit_with_http_info(profile_id, opts) data end |
#create_profile_data_usage_limit_with_http_info(profile_id, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Create profile data usage limit
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 99 def create_profile_data_usage_limit_with_http_info(profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile_data_usage_limit ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.create_profile_data_usage_limit" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_or_update_data_usage_limit_request']) # return_type return_type = opts[:debug_return_type] || 'DataUsageLimit' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.create_profile_data_usage_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#create_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_profile_with_http_info(opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Create profile
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 35 def create_profile_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile ...' end # resource path local_var_path = '/profiles/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_or_update_profile_request']) # return_type return_type = opts[:debug_return_type] || 'Profile' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.create_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_profile(profile_id, opts = {}) ⇒ nil
Delete profile Deletes profile and all associated resources
157 158 159 160 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 157 def delete_profile(profile_id, opts = {}) delete_profile_with_http_info(profile_id, opts) nil end |
#delete_profile_data_usage_limit(profile_id, limit_id, opts = {}) ⇒ nil
Delete profile data usage limit
220 221 222 223 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 220 def delete_profile_data_usage_limit(profile_id, limit_id, opts = {}) delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts) nil end |
#delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete profile data usage limit
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 230 def delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.delete_profile_data_usage_limit ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.delete_profile_data_usage_limit" end # verify the required parameter 'limit_id' is set if @api_client.config.client_side_validation && limit_id.nil? fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.delete_profile_data_usage_limit" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/{limitId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)).sub('{' + 'limitId' + '}', CGI.escape(limit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.delete_profile_data_usage_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#delete_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_profile_with_http_info(profile_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete profile Deletes profile and all associated resources
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 167 def delete_profile_with_http_info(profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.delete_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.delete_profile" end # resource path local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.delete_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#delete_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile(profile_id, opts = {}) ⇒ Profile
Profile details
286 287 288 289 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 286 def get_profile(profile_id, opts = {}) data, _status_code, _headers = get_profile_with_http_info(profile_id, opts) data end |
#get_profile_data_usage_limit(profile_id, limit_id, opts = {}) ⇒ DataUsageLimit
Profile data usage limit details
348 349 350 351 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 348 def get_profile_data_usage_limit(profile_id, limit_id, opts = {}) data, _status_code, _headers = get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts) data end |
#get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Profile data usage limit details
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 358 def get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_data_usage_limit ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile_data_usage_limit" end # verify the required parameter 'limit_id' is set if @api_client.config.client_side_validation && limit_id.nil? fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.get_profile_data_usage_limit" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/{limitId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)).sub('{' + 'limitId' + '}', CGI.escape(limit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DataUsageLimit' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.get_profile_data_usage_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_with_http_info(profile_id, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Profile details
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 295 def get_profile_with_http_info(profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile" end # resource path local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Profile' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.get_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_profile_data_usage_limits(profile_id, opts = {}) ⇒ Array<DataUsageLimit>
Profile data usage limits list
414 415 416 417 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 414 def list_profile_data_usage_limits(profile_id, opts = {}) data, _status_code, _headers = list_profile_data_usage_limits_with_http_info(profile_id, opts) data end |
#list_profile_data_usage_limits_with_http_info(profile_id, opts = {}) ⇒ Array<(Array<DataUsageLimit>, Integer, Hash)>
Profile data usage limits list
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 423 def list_profile_data_usage_limits_with_http_info(profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.list_profile_data_usage_limits ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.list_profile_data_usage_limits" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<DataUsageLimit>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.list_profile_data_usage_limits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#list_profile_data_usage_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_profile_stats(profile_id, opts = {}) ⇒ Array<ProfileStats>
Profile stats list
480 481 482 483 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 480 def list_profile_stats(profile_id, opts = {}) data, _status_code, _headers = list_profile_stats_with_http_info(profile_id, opts) data end |
#list_profile_stats_with_http_info(profile_id, opts = {}) ⇒ Array<(Array<ProfileStats>, Integer, Hash)>
Profile stats list
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 494 def list_profile_stats_with_http_info(profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.list_profile_stats ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.list_profile_stats" end allowable_values = ["hourly", "daily", "weekly", "monthly"] if @api_client.config.client_side_validation && opts[:'aggregate_by'] && !allowable_values.include?(opts[:'aggregate_by']) fail ArgumentError, "invalid value for \"aggregate_by\", must be one of #{allowable_values}" end # resource path local_var_path = '/profiles/{profileId}/stats/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'aggregate_by'] = opts[:'aggregate_by'] if !opts[:'aggregate_by'].nil? query_params[:'date_after'] = opts[:'date_after'] if !opts[:'date_after'].nil? query_params[:'date_before'] = opts[:'date_before'] if !opts[:'date_before'].nil? query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ProfileStats>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.list_profile_stats", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#list_profile_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_profiles(opts = {}) ⇒ Array<Profile>
Profile list
557 558 559 560 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 557 def list_profiles(opts = {}) data, _status_code, _headers = list_profiles_with_http_info(opts) data end |
#list_profiles_with_http_info(opts = {}) ⇒ Array<(Array<Profile>, Integer, Hash)>
Profile list
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 568 def list_profiles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.list_profiles ...' end # resource path local_var_path = '/profiles/' # query parameters query_params = opts[:query_params] || {} query_params[:'external_key'] = opts[:'external_key'] if !opts[:'external_key'].nil? query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Profile>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.list_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#partial_update_profile(profile_id, create_or_update_profile_request, opts = {}) ⇒ Profile
Partial update profile details
620 621 622 623 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 620 def partial_update_profile(profile_id, create_or_update_profile_request, opts = {}) data, _status_code, _headers = partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts) data end |
#partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ DataUsageLimit
Partial update profile data usage limit
693 694 695 696 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 693 def partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) data, _status_code, _headers = partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts) data end |
#partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Partial update profile data usage limit
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 704 def partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.partial_update_profile_data_usage_limit ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.partial_update_profile_data_usage_limit" end # verify the required parameter 'limit_id' is set if @api_client.config.client_side_validation && limit_id.nil? fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.partial_update_profile_data_usage_limit" end # verify the required parameter 'create_or_update_data_usage_limit_request' is set if @api_client.config.client_side_validation && create_or_update_data_usage_limit_request.nil? fail ArgumentError, "Missing the required parameter 'create_or_update_data_usage_limit_request' when calling ProfilesApi.partial_update_profile_data_usage_limit" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/{limitId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)).sub('{' + 'limitId' + '}', CGI.escape(limit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_data_usage_limit_request) # return_type return_type = opts[:debug_return_type] || 'DataUsageLimit' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.partial_update_profile_data_usage_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#partial_update_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Partial update profile details
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 630 def partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.partial_update_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.partial_update_profile" end # verify the required parameter 'create_or_update_profile_request' is set if @api_client.config.client_side_validation && create_or_update_profile_request.nil? fail ArgumentError, "Missing the required parameter 'create_or_update_profile_request' when calling ProfilesApi.partial_update_profile" end # resource path local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_profile_request) # return_type return_type = opts[:debug_return_type] || 'Profile' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.partial_update_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#partial_update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile(profile_id, create_or_update_profile_request, opts = {}) ⇒ Profile
Update profile details
770 771 772 773 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 770 def update_profile(profile_id, create_or_update_profile_request, opts = {}) data, _status_code, _headers = update_profile_with_http_info(profile_id, create_or_update_profile_request, opts) data end |
#update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ DataUsageLimit
Update profile data usage limit
843 844 845 846 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 843 def update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) data, _status_code, _headers = update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts) data end |
#update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) ⇒ Array<(DataUsageLimit, Integer, Hash)>
Update profile data usage limit
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 854 def update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile_data_usage_limit ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.update_profile_data_usage_limit" end # verify the required parameter 'limit_id' is set if @api_client.config.client_side_validation && limit_id.nil? fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.update_profile_data_usage_limit" end # verify the required parameter 'create_or_update_data_usage_limit_request' is set if @api_client.config.client_side_validation && create_or_update_data_usage_limit_request.nil? fail ArgumentError, "Missing the required parameter 'create_or_update_data_usage_limit_request' when calling ProfilesApi.update_profile_data_usage_limit" end # resource path local_var_path = '/profiles/{profileId}/limits/data-usages/{limitId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)).sub('{' + 'limitId' + '}', CGI.escape(limit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_data_usage_limit_request) # return_type return_type = opts[:debug_return_type] || 'DataUsageLimit' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.update_profile_data_usage_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#update_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) ⇒ Array<(Profile, Integer, Hash)>
Update profile details
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
# File 'lib/forestvpn_cloud_api/api/profiles_api.rb', line 780 def update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.update_profile" end # verify the required parameter 'create_or_update_profile_request' is set if @api_client.config.client_side_validation && create_or_update_profile_request.nil? fail ArgumentError, "Missing the required parameter 'create_or_update_profile_request' when calling ProfilesApi.update_profile" end # resource path local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_profile_request) # return_type return_type = opts[:debug_return_type] || 'Profile' # auth_names auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth'] = opts.merge( :operation => :"ProfilesApi.update_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |