forestvpn_cloud_api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +139 -0
- data/Rakefile +10 -0
- data/docs/Action.md +32 -0
- data/docs/Activity.md +36 -0
- data/docs/Address.md +28 -0
- data/docs/Billing.md +24 -0
- data/docs/Country.md +26 -0
- data/docs/CreateBillingRequest.md +22 -0
- data/docs/CreateOrUpdateDataUsageLimitRequest.md +20 -0
- data/docs/CreateOrUpdatePaymentProfileRequest.md +34 -0
- data/docs/CreateOrUpdateProfileRequest.md +22 -0
- data/docs/DataUsageLimit.md +24 -0
- data/docs/Error.md +20 -0
- data/docs/GeoApi.md +77 -0
- data/docs/LimitsApi.md +447 -0
- data/docs/Location.md +28 -0
- data/docs/PaymentMethod.md +24 -0
- data/docs/PaymentProfile.md +32 -0
- data/docs/Profile.md +26 -0
- data/docs/ProfileStats.md +26 -0
- data/docs/ProfilesApi.md +996 -0
- data/docs/Project.md +22 -0
- data/docs/ResourceRef.md +20 -0
- data/docs/User.md +32 -0
- data/forestvpn_cloud_api.gemspec +39 -0
- data/git_push.sh +57 -0
- data/lib/forestvpn_cloud_api/api/geo_api.rb +77 -0
- data/lib/forestvpn_cloud_api/api/limits_api.rb +405 -0
- data/lib/forestvpn_cloud_api/api/profiles_api.rb +915 -0
- data/lib/forestvpn_cloud_api/api_client.rb +426 -0
- data/lib/forestvpn_cloud_api/api_error.rb +57 -0
- data/lib/forestvpn_cloud_api/configuration.rb +335 -0
- data/lib/forestvpn_cloud_api/models/action.rb +348 -0
- data/lib/forestvpn_cloud_api/models/activity.rb +360 -0
- data/lib/forestvpn_cloud_api/models/address.rb +269 -0
- data/lib/forestvpn_cloud_api/models/billing.rb +266 -0
- data/lib/forestvpn_cloud_api/models/country.rb +282 -0
- data/lib/forestvpn_cloud_api/models/create_billing_request.rb +252 -0
- data/lib/forestvpn_cloud_api/models/create_or_update_data_usage_limit_request.rb +230 -0
- data/lib/forestvpn_cloud_api/models/create_or_update_payment_profile_request.rb +328 -0
- data/lib/forestvpn_cloud_api/models/create_or_update_profile_request.rb +275 -0
- data/lib/forestvpn_cloud_api/models/data_usage_limit.rb +302 -0
- data/lib/forestvpn_cloud_api/models/error.rb +238 -0
- data/lib/forestvpn_cloud_api/models/location.rb +296 -0
- data/lib/forestvpn_cloud_api/models/payment_method.rb +261 -0
- data/lib/forestvpn_cloud_api/models/payment_profile.rb +313 -0
- data/lib/forestvpn_cloud_api/models/profile.rb +320 -0
- data/lib/forestvpn_cloud_api/models/profile_stats.rb +280 -0
- data/lib/forestvpn_cloud_api/models/project.rb +254 -0
- data/lib/forestvpn_cloud_api/models/resource_ref.rb +238 -0
- data/lib/forestvpn_cloud_api/models/user.rb +307 -0
- data/lib/forestvpn_cloud_api/version.rb +15 -0
- data/lib/forestvpn_cloud_api.rb +61 -0
- data/spec/api/geo_api_spec.rb +45 -0
- data/spec/api/limits_api_spec.rb +102 -0
- data/spec/api/profiles_api_spec.rb +195 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_spec.rb +80 -0
- data/spec/models/activity_spec.rb +92 -0
- data/spec/models/address_spec.rb +64 -0
- data/spec/models/billing_spec.rb +52 -0
- data/spec/models/country_spec.rb +58 -0
- data/spec/models/create_billing_request_spec.rb +46 -0
- data/spec/models/create_or_update_data_usage_limit_request_spec.rb +40 -0
- data/spec/models/create_or_update_payment_profile_request_spec.rb +82 -0
- data/spec/models/create_or_update_profile_request_spec.rb +50 -0
- data/spec/models/data_usage_limit_spec.rb +56 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/location_spec.rb +64 -0
- data/spec/models/payment_method_spec.rb +52 -0
- data/spec/models/payment_profile_spec.rb +76 -0
- data/spec/models/profile_spec.rb +62 -0
- data/spec/models/profile_stats_spec.rb +58 -0
- data/spec/models/project_spec.rb +46 -0
- data/spec/models/resource_ref_spec.rb +40 -0
- data/spec/models/user_spec.rb +76 -0
- data/spec/spec_helper.rb +111 -0
- metadata +203 -0
data/docs/ProfilesApi.md
ADDED
@@ -0,0 +1,996 @@
|
|
1
|
+
# ForestVPNCloudAPI::ProfilesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.forestvpn.com/cloud/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_profile**](ProfilesApi.md#create_profile) | **POST** /profiles/ | Create profile |
|
8
|
+
| [**create_profile_data_usage_limit**](ProfilesApi.md#create_profile_data_usage_limit) | **POST** /profiles/{profileId}/limits/data-usages/ | Create profile data usage limit |
|
9
|
+
| [**delete_profile**](ProfilesApi.md#delete_profile) | **DELETE** /profiles/{profileId}/ | Delete profile |
|
10
|
+
| [**delete_profile_data_usage_limit**](ProfilesApi.md#delete_profile_data_usage_limit) | **DELETE** /profiles/{profileId}/limits/data-usages/{limitId}/ | Delete profile data usage limit |
|
11
|
+
| [**get_profile**](ProfilesApi.md#get_profile) | **GET** /profiles/{profileId}/ | Profile details |
|
12
|
+
| [**get_profile_data_usage_limit**](ProfilesApi.md#get_profile_data_usage_limit) | **GET** /profiles/{profileId}/limits/data-usages/{limitId}/ | Profile data usage limit details |
|
13
|
+
| [**list_profile_data_usage_limits**](ProfilesApi.md#list_profile_data_usage_limits) | **GET** /profiles/{profileId}/limits/data-usages/ | Profile data usage limits list |
|
14
|
+
| [**list_profile_stats**](ProfilesApi.md#list_profile_stats) | **GET** /profiles/{profileId}/stats/ | Profile stats list |
|
15
|
+
| [**list_profiles**](ProfilesApi.md#list_profiles) | **GET** /profiles/ | Profile list |
|
16
|
+
| [**partial_update_profile**](ProfilesApi.md#partial_update_profile) | **PATCH** /profiles/{profileId}/ | Partial update profile details |
|
17
|
+
| [**partial_update_profile_data_usage_limit**](ProfilesApi.md#partial_update_profile_data_usage_limit) | **PATCH** /profiles/{profileId}/limits/data-usages/{limitId}/ | Partial update profile data usage limit |
|
18
|
+
| [**update_profile**](ProfilesApi.md#update_profile) | **PUT** /profiles/{profileId}/ | Update profile details |
|
19
|
+
| [**update_profile_data_usage_limit**](ProfilesApi.md#update_profile_data_usage_limit) | **PUT** /profiles/{profileId}/limits/data-usages/{limitId}/ | Update profile data usage limit |
|
20
|
+
|
21
|
+
|
22
|
+
## create_profile
|
23
|
+
|
24
|
+
> <Profile> create_profile(opts)
|
25
|
+
|
26
|
+
Create profile
|
27
|
+
|
28
|
+
### Examples
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'time'
|
32
|
+
require 'forestvpn_cloud_api'
|
33
|
+
# setup authorization
|
34
|
+
ForestVPNCloudAPI.configure do |config|
|
35
|
+
# Configure API key authorization: ApiTokenAuth
|
36
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
37
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
38
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
39
|
+
|
40
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
41
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
42
|
+
end
|
43
|
+
|
44
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
45
|
+
opts = {
|
46
|
+
create_or_update_profile_request: ForestVPNCloudAPI::CreateOrUpdateProfileRequest.new # CreateOrUpdateProfileRequest |
|
47
|
+
}
|
48
|
+
|
49
|
+
begin
|
50
|
+
# Create profile
|
51
|
+
result = api_instance.create_profile(opts)
|
52
|
+
p result
|
53
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
54
|
+
puts "Error when calling ProfilesApi->create_profile: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
#### Using the create_profile_with_http_info variant
|
59
|
+
|
60
|
+
This returns an Array which contains the response data, status code and headers.
|
61
|
+
|
62
|
+
> <Array(<Profile>, Integer, Hash)> create_profile_with_http_info(opts)
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
begin
|
66
|
+
# Create profile
|
67
|
+
data, status_code, headers = api_instance.create_profile_with_http_info(opts)
|
68
|
+
p status_code # => 2xx
|
69
|
+
p headers # => { ... }
|
70
|
+
p data # => <Profile>
|
71
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
72
|
+
puts "Error when calling ProfilesApi->create_profile_with_http_info: #{e}"
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
### Parameters
|
77
|
+
|
78
|
+
| Name | Type | Description | Notes |
|
79
|
+
| ---- | ---- | ----------- | ----- |
|
80
|
+
| **create_or_update_profile_request** | [**CreateOrUpdateProfileRequest**](CreateOrUpdateProfileRequest.md) | | [optional] |
|
81
|
+
|
82
|
+
### Return type
|
83
|
+
|
84
|
+
[**Profile**](Profile.md)
|
85
|
+
|
86
|
+
### Authorization
|
87
|
+
|
88
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
89
|
+
|
90
|
+
### HTTP request headers
|
91
|
+
|
92
|
+
- **Content-Type**: application/json
|
93
|
+
- **Accept**: application/json
|
94
|
+
|
95
|
+
|
96
|
+
## create_profile_data_usage_limit
|
97
|
+
|
98
|
+
> <DataUsageLimit> create_profile_data_usage_limit(profile_id, opts)
|
99
|
+
|
100
|
+
Create profile data usage limit
|
101
|
+
|
102
|
+
### Examples
|
103
|
+
|
104
|
+
```ruby
|
105
|
+
require 'time'
|
106
|
+
require 'forestvpn_cloud_api'
|
107
|
+
# setup authorization
|
108
|
+
ForestVPNCloudAPI.configure do |config|
|
109
|
+
# Configure API key authorization: ApiTokenAuth
|
110
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
111
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
112
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
113
|
+
|
114
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
115
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
116
|
+
end
|
117
|
+
|
118
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
119
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
120
|
+
opts = {
|
121
|
+
create_or_update_data_usage_limit_request: ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
122
|
+
}
|
123
|
+
|
124
|
+
begin
|
125
|
+
# Create profile data usage limit
|
126
|
+
result = api_instance.create_profile_data_usage_limit(profile_id, opts)
|
127
|
+
p result
|
128
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
129
|
+
puts "Error when calling ProfilesApi->create_profile_data_usage_limit: #{e}"
|
130
|
+
end
|
131
|
+
```
|
132
|
+
|
133
|
+
#### Using the create_profile_data_usage_limit_with_http_info variant
|
134
|
+
|
135
|
+
This returns an Array which contains the response data, status code and headers.
|
136
|
+
|
137
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> create_profile_data_usage_limit_with_http_info(profile_id, opts)
|
138
|
+
|
139
|
+
```ruby
|
140
|
+
begin
|
141
|
+
# Create profile data usage limit
|
142
|
+
data, status_code, headers = api_instance.create_profile_data_usage_limit_with_http_info(profile_id, opts)
|
143
|
+
p status_code # => 2xx
|
144
|
+
p headers # => { ... }
|
145
|
+
p data # => <DataUsageLimit>
|
146
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
147
|
+
puts "Error when calling ProfilesApi->create_profile_data_usage_limit_with_http_info: #{e}"
|
148
|
+
end
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
|
153
|
+
| Name | Type | Description | Notes |
|
154
|
+
| ---- | ---- | ----------- | ----- |
|
155
|
+
| **profile_id** | **String** | | |
|
156
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | [optional] |
|
157
|
+
|
158
|
+
### Return type
|
159
|
+
|
160
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
161
|
+
|
162
|
+
### Authorization
|
163
|
+
|
164
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
165
|
+
|
166
|
+
### HTTP request headers
|
167
|
+
|
168
|
+
- **Content-Type**: application/json
|
169
|
+
- **Accept**: application/json
|
170
|
+
|
171
|
+
|
172
|
+
## delete_profile
|
173
|
+
|
174
|
+
> delete_profile(profile_id)
|
175
|
+
|
176
|
+
Delete profile
|
177
|
+
|
178
|
+
Deletes profile and all associated resources
|
179
|
+
|
180
|
+
### Examples
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
require 'time'
|
184
|
+
require 'forestvpn_cloud_api'
|
185
|
+
# setup authorization
|
186
|
+
ForestVPNCloudAPI.configure do |config|
|
187
|
+
# Configure API key authorization: ApiTokenAuth
|
188
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
189
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
190
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
191
|
+
|
192
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
193
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
194
|
+
end
|
195
|
+
|
196
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
197
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
198
|
+
|
199
|
+
begin
|
200
|
+
# Delete profile
|
201
|
+
api_instance.delete_profile(profile_id)
|
202
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
203
|
+
puts "Error when calling ProfilesApi->delete_profile: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
#### Using the delete_profile_with_http_info variant
|
208
|
+
|
209
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
210
|
+
|
211
|
+
> <Array(nil, Integer, Hash)> delete_profile_with_http_info(profile_id)
|
212
|
+
|
213
|
+
```ruby
|
214
|
+
begin
|
215
|
+
# Delete profile
|
216
|
+
data, status_code, headers = api_instance.delete_profile_with_http_info(profile_id)
|
217
|
+
p status_code # => 2xx
|
218
|
+
p headers # => { ... }
|
219
|
+
p data # => nil
|
220
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
221
|
+
puts "Error when calling ProfilesApi->delete_profile_with_http_info: #{e}"
|
222
|
+
end
|
223
|
+
```
|
224
|
+
|
225
|
+
### Parameters
|
226
|
+
|
227
|
+
| Name | Type | Description | Notes |
|
228
|
+
| ---- | ---- | ----------- | ----- |
|
229
|
+
| **profile_id** | **String** | | |
|
230
|
+
|
231
|
+
### Return type
|
232
|
+
|
233
|
+
nil (empty response body)
|
234
|
+
|
235
|
+
### Authorization
|
236
|
+
|
237
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
238
|
+
|
239
|
+
### HTTP request headers
|
240
|
+
|
241
|
+
- **Content-Type**: Not defined
|
242
|
+
- **Accept**: application/json
|
243
|
+
|
244
|
+
|
245
|
+
## delete_profile_data_usage_limit
|
246
|
+
|
247
|
+
> delete_profile_data_usage_limit(profile_id, limit_id)
|
248
|
+
|
249
|
+
Delete profile data usage limit
|
250
|
+
|
251
|
+
### Examples
|
252
|
+
|
253
|
+
```ruby
|
254
|
+
require 'time'
|
255
|
+
require 'forestvpn_cloud_api'
|
256
|
+
# setup authorization
|
257
|
+
ForestVPNCloudAPI.configure do |config|
|
258
|
+
# Configure API key authorization: ApiTokenAuth
|
259
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
260
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
261
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
262
|
+
|
263
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
264
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
265
|
+
end
|
266
|
+
|
267
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
268
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
269
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
270
|
+
|
271
|
+
begin
|
272
|
+
# Delete profile data usage limit
|
273
|
+
api_instance.delete_profile_data_usage_limit(profile_id, limit_id)
|
274
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
275
|
+
puts "Error when calling ProfilesApi->delete_profile_data_usage_limit: #{e}"
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
#### Using the delete_profile_data_usage_limit_with_http_info variant
|
280
|
+
|
281
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
282
|
+
|
283
|
+
> <Array(nil, Integer, Hash)> delete_profile_data_usage_limit_with_http_info(profile_id, limit_id)
|
284
|
+
|
285
|
+
```ruby
|
286
|
+
begin
|
287
|
+
# Delete profile data usage limit
|
288
|
+
data, status_code, headers = api_instance.delete_profile_data_usage_limit_with_http_info(profile_id, limit_id)
|
289
|
+
p status_code # => 2xx
|
290
|
+
p headers # => { ... }
|
291
|
+
p data # => nil
|
292
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
293
|
+
puts "Error when calling ProfilesApi->delete_profile_data_usage_limit_with_http_info: #{e}"
|
294
|
+
end
|
295
|
+
```
|
296
|
+
|
297
|
+
### Parameters
|
298
|
+
|
299
|
+
| Name | Type | Description | Notes |
|
300
|
+
| ---- | ---- | ----------- | ----- |
|
301
|
+
| **profile_id** | **String** | | |
|
302
|
+
| **limit_id** | **String** | | |
|
303
|
+
|
304
|
+
### Return type
|
305
|
+
|
306
|
+
nil (empty response body)
|
307
|
+
|
308
|
+
### Authorization
|
309
|
+
|
310
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
311
|
+
|
312
|
+
### HTTP request headers
|
313
|
+
|
314
|
+
- **Content-Type**: Not defined
|
315
|
+
- **Accept**: application/json
|
316
|
+
|
317
|
+
|
318
|
+
## get_profile
|
319
|
+
|
320
|
+
> <Profile> get_profile(profile_id)
|
321
|
+
|
322
|
+
Profile details
|
323
|
+
|
324
|
+
### Examples
|
325
|
+
|
326
|
+
```ruby
|
327
|
+
require 'time'
|
328
|
+
require 'forestvpn_cloud_api'
|
329
|
+
# setup authorization
|
330
|
+
ForestVPNCloudAPI.configure do |config|
|
331
|
+
# Configure API key authorization: ApiTokenAuth
|
332
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
333
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
334
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
335
|
+
|
336
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
337
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
338
|
+
end
|
339
|
+
|
340
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
341
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
342
|
+
|
343
|
+
begin
|
344
|
+
# Profile details
|
345
|
+
result = api_instance.get_profile(profile_id)
|
346
|
+
p result
|
347
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
348
|
+
puts "Error when calling ProfilesApi->get_profile: #{e}"
|
349
|
+
end
|
350
|
+
```
|
351
|
+
|
352
|
+
#### Using the get_profile_with_http_info variant
|
353
|
+
|
354
|
+
This returns an Array which contains the response data, status code and headers.
|
355
|
+
|
356
|
+
> <Array(<Profile>, Integer, Hash)> get_profile_with_http_info(profile_id)
|
357
|
+
|
358
|
+
```ruby
|
359
|
+
begin
|
360
|
+
# Profile details
|
361
|
+
data, status_code, headers = api_instance.get_profile_with_http_info(profile_id)
|
362
|
+
p status_code # => 2xx
|
363
|
+
p headers # => { ... }
|
364
|
+
p data # => <Profile>
|
365
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
366
|
+
puts "Error when calling ProfilesApi->get_profile_with_http_info: #{e}"
|
367
|
+
end
|
368
|
+
```
|
369
|
+
|
370
|
+
### Parameters
|
371
|
+
|
372
|
+
| Name | Type | Description | Notes |
|
373
|
+
| ---- | ---- | ----------- | ----- |
|
374
|
+
| **profile_id** | **String** | | |
|
375
|
+
|
376
|
+
### Return type
|
377
|
+
|
378
|
+
[**Profile**](Profile.md)
|
379
|
+
|
380
|
+
### Authorization
|
381
|
+
|
382
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
383
|
+
|
384
|
+
### HTTP request headers
|
385
|
+
|
386
|
+
- **Content-Type**: Not defined
|
387
|
+
- **Accept**: application/json
|
388
|
+
|
389
|
+
|
390
|
+
## get_profile_data_usage_limit
|
391
|
+
|
392
|
+
> <DataUsageLimit> get_profile_data_usage_limit(profile_id, limit_id)
|
393
|
+
|
394
|
+
Profile data usage limit details
|
395
|
+
|
396
|
+
### Examples
|
397
|
+
|
398
|
+
```ruby
|
399
|
+
require 'time'
|
400
|
+
require 'forestvpn_cloud_api'
|
401
|
+
# setup authorization
|
402
|
+
ForestVPNCloudAPI.configure do |config|
|
403
|
+
# Configure API key authorization: ApiTokenAuth
|
404
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
405
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
406
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
407
|
+
|
408
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
409
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
410
|
+
end
|
411
|
+
|
412
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
413
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
414
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
415
|
+
|
416
|
+
begin
|
417
|
+
# Profile data usage limit details
|
418
|
+
result = api_instance.get_profile_data_usage_limit(profile_id, limit_id)
|
419
|
+
p result
|
420
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
421
|
+
puts "Error when calling ProfilesApi->get_profile_data_usage_limit: #{e}"
|
422
|
+
end
|
423
|
+
```
|
424
|
+
|
425
|
+
#### Using the get_profile_data_usage_limit_with_http_info variant
|
426
|
+
|
427
|
+
This returns an Array which contains the response data, status code and headers.
|
428
|
+
|
429
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> get_profile_data_usage_limit_with_http_info(profile_id, limit_id)
|
430
|
+
|
431
|
+
```ruby
|
432
|
+
begin
|
433
|
+
# Profile data usage limit details
|
434
|
+
data, status_code, headers = api_instance.get_profile_data_usage_limit_with_http_info(profile_id, limit_id)
|
435
|
+
p status_code # => 2xx
|
436
|
+
p headers # => { ... }
|
437
|
+
p data # => <DataUsageLimit>
|
438
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
439
|
+
puts "Error when calling ProfilesApi->get_profile_data_usage_limit_with_http_info: #{e}"
|
440
|
+
end
|
441
|
+
```
|
442
|
+
|
443
|
+
### Parameters
|
444
|
+
|
445
|
+
| Name | Type | Description | Notes |
|
446
|
+
| ---- | ---- | ----------- | ----- |
|
447
|
+
| **profile_id** | **String** | | |
|
448
|
+
| **limit_id** | **String** | | |
|
449
|
+
|
450
|
+
### Return type
|
451
|
+
|
452
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
453
|
+
|
454
|
+
### Authorization
|
455
|
+
|
456
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
457
|
+
|
458
|
+
### HTTP request headers
|
459
|
+
|
460
|
+
- **Content-Type**: Not defined
|
461
|
+
- **Accept**: application/json
|
462
|
+
|
463
|
+
|
464
|
+
## list_profile_data_usage_limits
|
465
|
+
|
466
|
+
> <Array<DataUsageLimit>> list_profile_data_usage_limits(profile_id)
|
467
|
+
|
468
|
+
Profile data usage limits list
|
469
|
+
|
470
|
+
### Examples
|
471
|
+
|
472
|
+
```ruby
|
473
|
+
require 'time'
|
474
|
+
require 'forestvpn_cloud_api'
|
475
|
+
# setup authorization
|
476
|
+
ForestVPNCloudAPI.configure do |config|
|
477
|
+
# Configure API key authorization: ApiTokenAuth
|
478
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
479
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
480
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
481
|
+
|
482
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
483
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
484
|
+
end
|
485
|
+
|
486
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
487
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
488
|
+
|
489
|
+
begin
|
490
|
+
# Profile data usage limits list
|
491
|
+
result = api_instance.list_profile_data_usage_limits(profile_id)
|
492
|
+
p result
|
493
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
494
|
+
puts "Error when calling ProfilesApi->list_profile_data_usage_limits: #{e}"
|
495
|
+
end
|
496
|
+
```
|
497
|
+
|
498
|
+
#### Using the list_profile_data_usage_limits_with_http_info variant
|
499
|
+
|
500
|
+
This returns an Array which contains the response data, status code and headers.
|
501
|
+
|
502
|
+
> <Array(<Array<DataUsageLimit>>, Integer, Hash)> list_profile_data_usage_limits_with_http_info(profile_id)
|
503
|
+
|
504
|
+
```ruby
|
505
|
+
begin
|
506
|
+
# Profile data usage limits list
|
507
|
+
data, status_code, headers = api_instance.list_profile_data_usage_limits_with_http_info(profile_id)
|
508
|
+
p status_code # => 2xx
|
509
|
+
p headers # => { ... }
|
510
|
+
p data # => <Array<DataUsageLimit>>
|
511
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
512
|
+
puts "Error when calling ProfilesApi->list_profile_data_usage_limits_with_http_info: #{e}"
|
513
|
+
end
|
514
|
+
```
|
515
|
+
|
516
|
+
### Parameters
|
517
|
+
|
518
|
+
| Name | Type | Description | Notes |
|
519
|
+
| ---- | ---- | ----------- | ----- |
|
520
|
+
| **profile_id** | **String** | | |
|
521
|
+
|
522
|
+
### Return type
|
523
|
+
|
524
|
+
[**Array<DataUsageLimit>**](DataUsageLimit.md)
|
525
|
+
|
526
|
+
### Authorization
|
527
|
+
|
528
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
529
|
+
|
530
|
+
### HTTP request headers
|
531
|
+
|
532
|
+
- **Content-Type**: Not defined
|
533
|
+
- **Accept**: application/json
|
534
|
+
|
535
|
+
|
536
|
+
## list_profile_stats
|
537
|
+
|
538
|
+
> <Array<ProfileStats>> list_profile_stats(profile_id, opts)
|
539
|
+
|
540
|
+
Profile stats list
|
541
|
+
|
542
|
+
### Examples
|
543
|
+
|
544
|
+
```ruby
|
545
|
+
require 'time'
|
546
|
+
require 'forestvpn_cloud_api'
|
547
|
+
# setup authorization
|
548
|
+
ForestVPNCloudAPI.configure do |config|
|
549
|
+
# Configure API key authorization: ApiTokenAuth
|
550
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
551
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
552
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
553
|
+
|
554
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
555
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
556
|
+
end
|
557
|
+
|
558
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
559
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
560
|
+
opts = {
|
561
|
+
aggregate_by: 'hourly', # String |
|
562
|
+
date_after: Date.parse('2013-10-20'), # Date |
|
563
|
+
date_before: Date.parse('2013-10-20'), # Date |
|
564
|
+
per_page: 8.14, # Float |
|
565
|
+
page: 8.14 # Float |
|
566
|
+
}
|
567
|
+
|
568
|
+
begin
|
569
|
+
# Profile stats list
|
570
|
+
result = api_instance.list_profile_stats(profile_id, opts)
|
571
|
+
p result
|
572
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
573
|
+
puts "Error when calling ProfilesApi->list_profile_stats: #{e}"
|
574
|
+
end
|
575
|
+
```
|
576
|
+
|
577
|
+
#### Using the list_profile_stats_with_http_info variant
|
578
|
+
|
579
|
+
This returns an Array which contains the response data, status code and headers.
|
580
|
+
|
581
|
+
> <Array(<Array<ProfileStats>>, Integer, Hash)> list_profile_stats_with_http_info(profile_id, opts)
|
582
|
+
|
583
|
+
```ruby
|
584
|
+
begin
|
585
|
+
# Profile stats list
|
586
|
+
data, status_code, headers = api_instance.list_profile_stats_with_http_info(profile_id, opts)
|
587
|
+
p status_code # => 2xx
|
588
|
+
p headers # => { ... }
|
589
|
+
p data # => <Array<ProfileStats>>
|
590
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
591
|
+
puts "Error when calling ProfilesApi->list_profile_stats_with_http_info: #{e}"
|
592
|
+
end
|
593
|
+
```
|
594
|
+
|
595
|
+
### Parameters
|
596
|
+
|
597
|
+
| Name | Type | Description | Notes |
|
598
|
+
| ---- | ---- | ----------- | ----- |
|
599
|
+
| **profile_id** | **String** | | |
|
600
|
+
| **aggregate_by** | **String** | | [optional] |
|
601
|
+
| **date_after** | **Date** | | [optional] |
|
602
|
+
| **date_before** | **Date** | | [optional] |
|
603
|
+
| **per_page** | **Float** | | [optional] |
|
604
|
+
| **page** | **Float** | | [optional] |
|
605
|
+
|
606
|
+
### Return type
|
607
|
+
|
608
|
+
[**Array<ProfileStats>**](ProfileStats.md)
|
609
|
+
|
610
|
+
### Authorization
|
611
|
+
|
612
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
613
|
+
|
614
|
+
### HTTP request headers
|
615
|
+
|
616
|
+
- **Content-Type**: Not defined
|
617
|
+
- **Accept**: application/json
|
618
|
+
|
619
|
+
|
620
|
+
## list_profiles
|
621
|
+
|
622
|
+
> <Array<Profile>> list_profiles(opts)
|
623
|
+
|
624
|
+
Profile list
|
625
|
+
|
626
|
+
### Examples
|
627
|
+
|
628
|
+
```ruby
|
629
|
+
require 'time'
|
630
|
+
require 'forestvpn_cloud_api'
|
631
|
+
# setup authorization
|
632
|
+
ForestVPNCloudAPI.configure do |config|
|
633
|
+
# Configure API key authorization: ApiTokenAuth
|
634
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
635
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
636
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
637
|
+
|
638
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
639
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
640
|
+
end
|
641
|
+
|
642
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
643
|
+
opts = {
|
644
|
+
external_key: 'external_key_example', # String |
|
645
|
+
per_page: 8.14, # Float |
|
646
|
+
page: 8.14 # Float |
|
647
|
+
}
|
648
|
+
|
649
|
+
begin
|
650
|
+
# Profile list
|
651
|
+
result = api_instance.list_profiles(opts)
|
652
|
+
p result
|
653
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
654
|
+
puts "Error when calling ProfilesApi->list_profiles: #{e}"
|
655
|
+
end
|
656
|
+
```
|
657
|
+
|
658
|
+
#### Using the list_profiles_with_http_info variant
|
659
|
+
|
660
|
+
This returns an Array which contains the response data, status code and headers.
|
661
|
+
|
662
|
+
> <Array(<Array<Profile>>, Integer, Hash)> list_profiles_with_http_info(opts)
|
663
|
+
|
664
|
+
```ruby
|
665
|
+
begin
|
666
|
+
# Profile list
|
667
|
+
data, status_code, headers = api_instance.list_profiles_with_http_info(opts)
|
668
|
+
p status_code # => 2xx
|
669
|
+
p headers # => { ... }
|
670
|
+
p data # => <Array<Profile>>
|
671
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
672
|
+
puts "Error when calling ProfilesApi->list_profiles_with_http_info: #{e}"
|
673
|
+
end
|
674
|
+
```
|
675
|
+
|
676
|
+
### Parameters
|
677
|
+
|
678
|
+
| Name | Type | Description | Notes |
|
679
|
+
| ---- | ---- | ----------- | ----- |
|
680
|
+
| **external_key** | **String** | | [optional] |
|
681
|
+
| **per_page** | **Float** | | [optional] |
|
682
|
+
| **page** | **Float** | | [optional] |
|
683
|
+
|
684
|
+
### Return type
|
685
|
+
|
686
|
+
[**Array<Profile>**](Profile.md)
|
687
|
+
|
688
|
+
### Authorization
|
689
|
+
|
690
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
691
|
+
|
692
|
+
### HTTP request headers
|
693
|
+
|
694
|
+
- **Content-Type**: Not defined
|
695
|
+
- **Accept**: application/json
|
696
|
+
|
697
|
+
|
698
|
+
## partial_update_profile
|
699
|
+
|
700
|
+
> <Profile> partial_update_profile(profile_id, create_or_update_profile_request)
|
701
|
+
|
702
|
+
Partial update profile details
|
703
|
+
|
704
|
+
### Examples
|
705
|
+
|
706
|
+
```ruby
|
707
|
+
require 'time'
|
708
|
+
require 'forestvpn_cloud_api'
|
709
|
+
# setup authorization
|
710
|
+
ForestVPNCloudAPI.configure do |config|
|
711
|
+
# Configure API key authorization: ApiTokenAuth
|
712
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
713
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
714
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
715
|
+
|
716
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
717
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
718
|
+
end
|
719
|
+
|
720
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
721
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
722
|
+
create_or_update_profile_request = ForestVPNCloudAPI::CreateOrUpdateProfileRequest.new # CreateOrUpdateProfileRequest |
|
723
|
+
|
724
|
+
begin
|
725
|
+
# Partial update profile details
|
726
|
+
result = api_instance.partial_update_profile(profile_id, create_or_update_profile_request)
|
727
|
+
p result
|
728
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
729
|
+
puts "Error when calling ProfilesApi->partial_update_profile: #{e}"
|
730
|
+
end
|
731
|
+
```
|
732
|
+
|
733
|
+
#### Using the partial_update_profile_with_http_info variant
|
734
|
+
|
735
|
+
This returns an Array which contains the response data, status code and headers.
|
736
|
+
|
737
|
+
> <Array(<Profile>, Integer, Hash)> partial_update_profile_with_http_info(profile_id, create_or_update_profile_request)
|
738
|
+
|
739
|
+
```ruby
|
740
|
+
begin
|
741
|
+
# Partial update profile details
|
742
|
+
data, status_code, headers = api_instance.partial_update_profile_with_http_info(profile_id, create_or_update_profile_request)
|
743
|
+
p status_code # => 2xx
|
744
|
+
p headers # => { ... }
|
745
|
+
p data # => <Profile>
|
746
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
747
|
+
puts "Error when calling ProfilesApi->partial_update_profile_with_http_info: #{e}"
|
748
|
+
end
|
749
|
+
```
|
750
|
+
|
751
|
+
### Parameters
|
752
|
+
|
753
|
+
| Name | Type | Description | Notes |
|
754
|
+
| ---- | ---- | ----------- | ----- |
|
755
|
+
| **profile_id** | **String** | | |
|
756
|
+
| **create_or_update_profile_request** | [**CreateOrUpdateProfileRequest**](CreateOrUpdateProfileRequest.md) | | |
|
757
|
+
|
758
|
+
### Return type
|
759
|
+
|
760
|
+
[**Profile**](Profile.md)
|
761
|
+
|
762
|
+
### Authorization
|
763
|
+
|
764
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
765
|
+
|
766
|
+
### HTTP request headers
|
767
|
+
|
768
|
+
- **Content-Type**: application/json
|
769
|
+
- **Accept**: application/json
|
770
|
+
|
771
|
+
|
772
|
+
## partial_update_profile_data_usage_limit
|
773
|
+
|
774
|
+
> <DataUsageLimit> partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
775
|
+
|
776
|
+
Partial update profile data usage limit
|
777
|
+
|
778
|
+
### Examples
|
779
|
+
|
780
|
+
```ruby
|
781
|
+
require 'time'
|
782
|
+
require 'forestvpn_cloud_api'
|
783
|
+
# setup authorization
|
784
|
+
ForestVPNCloudAPI.configure do |config|
|
785
|
+
# Configure API key authorization: ApiTokenAuth
|
786
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
787
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
788
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
789
|
+
|
790
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
791
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
792
|
+
end
|
793
|
+
|
794
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
795
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
796
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
797
|
+
create_or_update_data_usage_limit_request = ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
798
|
+
|
799
|
+
begin
|
800
|
+
# Partial update profile data usage limit
|
801
|
+
result = api_instance.partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
802
|
+
p result
|
803
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
804
|
+
puts "Error when calling ProfilesApi->partial_update_profile_data_usage_limit: #{e}"
|
805
|
+
end
|
806
|
+
```
|
807
|
+
|
808
|
+
#### Using the partial_update_profile_data_usage_limit_with_http_info variant
|
809
|
+
|
810
|
+
This returns an Array which contains the response data, status code and headers.
|
811
|
+
|
812
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
813
|
+
|
814
|
+
```ruby
|
815
|
+
begin
|
816
|
+
# Partial update profile data usage limit
|
817
|
+
data, status_code, headers = api_instance.partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
818
|
+
p status_code # => 2xx
|
819
|
+
p headers # => { ... }
|
820
|
+
p data # => <DataUsageLimit>
|
821
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
822
|
+
puts "Error when calling ProfilesApi->partial_update_profile_data_usage_limit_with_http_info: #{e}"
|
823
|
+
end
|
824
|
+
```
|
825
|
+
|
826
|
+
### Parameters
|
827
|
+
|
828
|
+
| Name | Type | Description | Notes |
|
829
|
+
| ---- | ---- | ----------- | ----- |
|
830
|
+
| **profile_id** | **String** | | |
|
831
|
+
| **limit_id** | **String** | | |
|
832
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | |
|
833
|
+
|
834
|
+
### Return type
|
835
|
+
|
836
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
837
|
+
|
838
|
+
### Authorization
|
839
|
+
|
840
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
841
|
+
|
842
|
+
### HTTP request headers
|
843
|
+
|
844
|
+
- **Content-Type**: application/json
|
845
|
+
- **Accept**: application/json
|
846
|
+
|
847
|
+
|
848
|
+
## update_profile
|
849
|
+
|
850
|
+
> <Profile> update_profile(profile_id, create_or_update_profile_request)
|
851
|
+
|
852
|
+
Update profile details
|
853
|
+
|
854
|
+
### Examples
|
855
|
+
|
856
|
+
```ruby
|
857
|
+
require 'time'
|
858
|
+
require 'forestvpn_cloud_api'
|
859
|
+
# setup authorization
|
860
|
+
ForestVPNCloudAPI.configure do |config|
|
861
|
+
# Configure API key authorization: ApiTokenAuth
|
862
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
863
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
864
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
865
|
+
|
866
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
867
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
868
|
+
end
|
869
|
+
|
870
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
871
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
872
|
+
create_or_update_profile_request = ForestVPNCloudAPI::CreateOrUpdateProfileRequest.new # CreateOrUpdateProfileRequest |
|
873
|
+
|
874
|
+
begin
|
875
|
+
# Update profile details
|
876
|
+
result = api_instance.update_profile(profile_id, create_or_update_profile_request)
|
877
|
+
p result
|
878
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
879
|
+
puts "Error when calling ProfilesApi->update_profile: #{e}"
|
880
|
+
end
|
881
|
+
```
|
882
|
+
|
883
|
+
#### Using the update_profile_with_http_info variant
|
884
|
+
|
885
|
+
This returns an Array which contains the response data, status code and headers.
|
886
|
+
|
887
|
+
> <Array(<Profile>, Integer, Hash)> update_profile_with_http_info(profile_id, create_or_update_profile_request)
|
888
|
+
|
889
|
+
```ruby
|
890
|
+
begin
|
891
|
+
# Update profile details
|
892
|
+
data, status_code, headers = api_instance.update_profile_with_http_info(profile_id, create_or_update_profile_request)
|
893
|
+
p status_code # => 2xx
|
894
|
+
p headers # => { ... }
|
895
|
+
p data # => <Profile>
|
896
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
897
|
+
puts "Error when calling ProfilesApi->update_profile_with_http_info: #{e}"
|
898
|
+
end
|
899
|
+
```
|
900
|
+
|
901
|
+
### Parameters
|
902
|
+
|
903
|
+
| Name | Type | Description | Notes |
|
904
|
+
| ---- | ---- | ----------- | ----- |
|
905
|
+
| **profile_id** | **String** | | |
|
906
|
+
| **create_or_update_profile_request** | [**CreateOrUpdateProfileRequest**](CreateOrUpdateProfileRequest.md) | | |
|
907
|
+
|
908
|
+
### Return type
|
909
|
+
|
910
|
+
[**Profile**](Profile.md)
|
911
|
+
|
912
|
+
### Authorization
|
913
|
+
|
914
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
915
|
+
|
916
|
+
### HTTP request headers
|
917
|
+
|
918
|
+
- **Content-Type**: application/json
|
919
|
+
- **Accept**: application/json
|
920
|
+
|
921
|
+
|
922
|
+
## update_profile_data_usage_limit
|
923
|
+
|
924
|
+
> <DataUsageLimit> update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
925
|
+
|
926
|
+
Update profile data usage limit
|
927
|
+
|
928
|
+
### Examples
|
929
|
+
|
930
|
+
```ruby
|
931
|
+
require 'time'
|
932
|
+
require 'forestvpn_cloud_api'
|
933
|
+
# setup authorization
|
934
|
+
ForestVPNCloudAPI.configure do |config|
|
935
|
+
# Configure API key authorization: ApiTokenAuth
|
936
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
937
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
938
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
939
|
+
|
940
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
941
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
942
|
+
end
|
943
|
+
|
944
|
+
api_instance = ForestVPNCloudAPI::ProfilesApi.new
|
945
|
+
profile_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
946
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
947
|
+
create_or_update_data_usage_limit_request = ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
948
|
+
|
949
|
+
begin
|
950
|
+
# Update profile data usage limit
|
951
|
+
result = api_instance.update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
952
|
+
p result
|
953
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
954
|
+
puts "Error when calling ProfilesApi->update_profile_data_usage_limit: #{e}"
|
955
|
+
end
|
956
|
+
```
|
957
|
+
|
958
|
+
#### Using the update_profile_data_usage_limit_with_http_info variant
|
959
|
+
|
960
|
+
This returns an Array which contains the response data, status code and headers.
|
961
|
+
|
962
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
963
|
+
|
964
|
+
```ruby
|
965
|
+
begin
|
966
|
+
# Update profile data usage limit
|
967
|
+
data, status_code, headers = api_instance.update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request)
|
968
|
+
p status_code # => 2xx
|
969
|
+
p headers # => { ... }
|
970
|
+
p data # => <DataUsageLimit>
|
971
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
972
|
+
puts "Error when calling ProfilesApi->update_profile_data_usage_limit_with_http_info: #{e}"
|
973
|
+
end
|
974
|
+
```
|
975
|
+
|
976
|
+
### Parameters
|
977
|
+
|
978
|
+
| Name | Type | Description | Notes |
|
979
|
+
| ---- | ---- | ----------- | ----- |
|
980
|
+
| **profile_id** | **String** | | |
|
981
|
+
| **limit_id** | **String** | | |
|
982
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | |
|
983
|
+
|
984
|
+
### Return type
|
985
|
+
|
986
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
987
|
+
|
988
|
+
### Authorization
|
989
|
+
|
990
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
991
|
+
|
992
|
+
### HTTP request headers
|
993
|
+
|
994
|
+
- **Content-Type**: application/json
|
995
|
+
- **Accept**: application/json
|
996
|
+
|