forestvpn_cloud_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/LimitsApi.md
ADDED
@@ -0,0 +1,447 @@
|
|
1
|
+
# ForestVPNCloudAPI::LimitsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.forestvpn.com/cloud/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_data_usage_limit**](LimitsApi.md#create_data_usage_limit) | **POST** /limits/data-usage/ | Create data usage limit |
|
8
|
+
| [**delete_data_usage_limit**](LimitsApi.md#delete_data_usage_limit) | **DELETE** /limits/data-usage/{limitId}/ | Delete data usage limit |
|
9
|
+
| [**get_data_usage_limit**](LimitsApi.md#get_data_usage_limit) | **GET** /limits/data-usage/{limitId}/ | Data usage limit details |
|
10
|
+
| [**lis_data_usage_limits**](LimitsApi.md#lis_data_usage_limits) | **GET** /limits/data-usage/ | Data usage limit list |
|
11
|
+
| [**partial_update_data_usage_limit**](LimitsApi.md#partial_update_data_usage_limit) | **PATCH** /limits/data-usage/{limitId}/ | Partial update profile details |
|
12
|
+
| [**update_data_usage_limit**](LimitsApi.md#update_data_usage_limit) | **PUT** /limits/data-usage/{limitId}/ | Update data usage limit |
|
13
|
+
|
14
|
+
|
15
|
+
## create_data_usage_limit
|
16
|
+
|
17
|
+
> <DataUsageLimit> create_data_usage_limit(opts)
|
18
|
+
|
19
|
+
Create data usage limit
|
20
|
+
|
21
|
+
### Examples
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'time'
|
25
|
+
require 'forestvpn_cloud_api'
|
26
|
+
# setup authorization
|
27
|
+
ForestVPNCloudAPI.configure do |config|
|
28
|
+
# Configure API key authorization: ApiTokenAuth
|
29
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
32
|
+
|
33
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
34
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
35
|
+
end
|
36
|
+
|
37
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
38
|
+
opts = {
|
39
|
+
create_or_update_data_usage_limit_request: ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
40
|
+
}
|
41
|
+
|
42
|
+
begin
|
43
|
+
# Create data usage limit
|
44
|
+
result = api_instance.create_data_usage_limit(opts)
|
45
|
+
p result
|
46
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
47
|
+
puts "Error when calling LimitsApi->create_data_usage_limit: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Using the create_data_usage_limit_with_http_info variant
|
52
|
+
|
53
|
+
This returns an Array which contains the response data, status code and headers.
|
54
|
+
|
55
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> create_data_usage_limit_with_http_info(opts)
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
begin
|
59
|
+
# Create data usage limit
|
60
|
+
data, status_code, headers = api_instance.create_data_usage_limit_with_http_info(opts)
|
61
|
+
p status_code # => 2xx
|
62
|
+
p headers # => { ... }
|
63
|
+
p data # => <DataUsageLimit>
|
64
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
65
|
+
puts "Error when calling LimitsApi->create_data_usage_limit_with_http_info: #{e}"
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
### Parameters
|
70
|
+
|
71
|
+
| Name | Type | Description | Notes |
|
72
|
+
| ---- | ---- | ----------- | ----- |
|
73
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | [optional] |
|
74
|
+
|
75
|
+
### Return type
|
76
|
+
|
77
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
78
|
+
|
79
|
+
### Authorization
|
80
|
+
|
81
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
82
|
+
|
83
|
+
### HTTP request headers
|
84
|
+
|
85
|
+
- **Content-Type**: application/json
|
86
|
+
- **Accept**: application/json
|
87
|
+
|
88
|
+
|
89
|
+
## delete_data_usage_limit
|
90
|
+
|
91
|
+
> delete_data_usage_limit(limit_id)
|
92
|
+
|
93
|
+
Delete data usage limit
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'forestvpn_cloud_api'
|
100
|
+
# setup authorization
|
101
|
+
ForestVPNCloudAPI.configure do |config|
|
102
|
+
# Configure API key authorization: ApiTokenAuth
|
103
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
104
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
105
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
106
|
+
|
107
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
108
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
109
|
+
end
|
110
|
+
|
111
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
112
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
113
|
+
|
114
|
+
begin
|
115
|
+
# Delete data usage limit
|
116
|
+
api_instance.delete_data_usage_limit(limit_id)
|
117
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
118
|
+
puts "Error when calling LimitsApi->delete_data_usage_limit: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Using the delete_data_usage_limit_with_http_info variant
|
123
|
+
|
124
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
125
|
+
|
126
|
+
> <Array(nil, Integer, Hash)> delete_data_usage_limit_with_http_info(limit_id)
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
begin
|
130
|
+
# Delete data usage limit
|
131
|
+
data, status_code, headers = api_instance.delete_data_usage_limit_with_http_info(limit_id)
|
132
|
+
p status_code # => 2xx
|
133
|
+
p headers # => { ... }
|
134
|
+
p data # => nil
|
135
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
136
|
+
puts "Error when calling LimitsApi->delete_data_usage_limit_with_http_info: #{e}"
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
### Parameters
|
141
|
+
|
142
|
+
| Name | Type | Description | Notes |
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
144
|
+
| **limit_id** | **String** | | |
|
145
|
+
|
146
|
+
### Return type
|
147
|
+
|
148
|
+
nil (empty response body)
|
149
|
+
|
150
|
+
### Authorization
|
151
|
+
|
152
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
153
|
+
|
154
|
+
### HTTP request headers
|
155
|
+
|
156
|
+
- **Content-Type**: Not defined
|
157
|
+
- **Accept**: application/json
|
158
|
+
|
159
|
+
|
160
|
+
## get_data_usage_limit
|
161
|
+
|
162
|
+
> <DataUsageLimit> get_data_usage_limit(limit_id)
|
163
|
+
|
164
|
+
Data usage limit details
|
165
|
+
|
166
|
+
### Examples
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
require 'time'
|
170
|
+
require 'forestvpn_cloud_api'
|
171
|
+
# setup authorization
|
172
|
+
ForestVPNCloudAPI.configure do |config|
|
173
|
+
# Configure API key authorization: ApiTokenAuth
|
174
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
175
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
176
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
177
|
+
|
178
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
179
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
180
|
+
end
|
181
|
+
|
182
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
183
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
184
|
+
|
185
|
+
begin
|
186
|
+
# Data usage limit details
|
187
|
+
result = api_instance.get_data_usage_limit(limit_id)
|
188
|
+
p result
|
189
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
190
|
+
puts "Error when calling LimitsApi->get_data_usage_limit: #{e}"
|
191
|
+
end
|
192
|
+
```
|
193
|
+
|
194
|
+
#### Using the get_data_usage_limit_with_http_info variant
|
195
|
+
|
196
|
+
This returns an Array which contains the response data, status code and headers.
|
197
|
+
|
198
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> get_data_usage_limit_with_http_info(limit_id)
|
199
|
+
|
200
|
+
```ruby
|
201
|
+
begin
|
202
|
+
# Data usage limit details
|
203
|
+
data, status_code, headers = api_instance.get_data_usage_limit_with_http_info(limit_id)
|
204
|
+
p status_code # => 2xx
|
205
|
+
p headers # => { ... }
|
206
|
+
p data # => <DataUsageLimit>
|
207
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
208
|
+
puts "Error when calling LimitsApi->get_data_usage_limit_with_http_info: #{e}"
|
209
|
+
end
|
210
|
+
```
|
211
|
+
|
212
|
+
### Parameters
|
213
|
+
|
214
|
+
| Name | Type | Description | Notes |
|
215
|
+
| ---- | ---- | ----------- | ----- |
|
216
|
+
| **limit_id** | **String** | | |
|
217
|
+
|
218
|
+
### Return type
|
219
|
+
|
220
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
221
|
+
|
222
|
+
### Authorization
|
223
|
+
|
224
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
225
|
+
|
226
|
+
### HTTP request headers
|
227
|
+
|
228
|
+
- **Content-Type**: Not defined
|
229
|
+
- **Accept**: application/json
|
230
|
+
|
231
|
+
|
232
|
+
## lis_data_usage_limits
|
233
|
+
|
234
|
+
> <Array<DataUsageLimit>> lis_data_usage_limits
|
235
|
+
|
236
|
+
Data usage limit list
|
237
|
+
|
238
|
+
### Examples
|
239
|
+
|
240
|
+
```ruby
|
241
|
+
require 'time'
|
242
|
+
require 'forestvpn_cloud_api'
|
243
|
+
# setup authorization
|
244
|
+
ForestVPNCloudAPI.configure do |config|
|
245
|
+
# Configure API key authorization: ApiTokenAuth
|
246
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
247
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
248
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
249
|
+
|
250
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
251
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
252
|
+
end
|
253
|
+
|
254
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
255
|
+
|
256
|
+
begin
|
257
|
+
# Data usage limit list
|
258
|
+
result = api_instance.lis_data_usage_limits
|
259
|
+
p result
|
260
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
261
|
+
puts "Error when calling LimitsApi->lis_data_usage_limits: #{e}"
|
262
|
+
end
|
263
|
+
```
|
264
|
+
|
265
|
+
#### Using the lis_data_usage_limits_with_http_info variant
|
266
|
+
|
267
|
+
This returns an Array which contains the response data, status code and headers.
|
268
|
+
|
269
|
+
> <Array(<Array<DataUsageLimit>>, Integer, Hash)> lis_data_usage_limits_with_http_info
|
270
|
+
|
271
|
+
```ruby
|
272
|
+
begin
|
273
|
+
# Data usage limit list
|
274
|
+
data, status_code, headers = api_instance.lis_data_usage_limits_with_http_info
|
275
|
+
p status_code # => 2xx
|
276
|
+
p headers # => { ... }
|
277
|
+
p data # => <Array<DataUsageLimit>>
|
278
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
279
|
+
puts "Error when calling LimitsApi->lis_data_usage_limits_with_http_info: #{e}"
|
280
|
+
end
|
281
|
+
```
|
282
|
+
|
283
|
+
### Parameters
|
284
|
+
|
285
|
+
This endpoint does not need any parameter.
|
286
|
+
|
287
|
+
### Return type
|
288
|
+
|
289
|
+
[**Array<DataUsageLimit>**](DataUsageLimit.md)
|
290
|
+
|
291
|
+
### Authorization
|
292
|
+
|
293
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
294
|
+
|
295
|
+
### HTTP request headers
|
296
|
+
|
297
|
+
- **Content-Type**: Not defined
|
298
|
+
- **Accept**: application/json
|
299
|
+
|
300
|
+
|
301
|
+
## partial_update_data_usage_limit
|
302
|
+
|
303
|
+
> <DataUsageLimit> partial_update_data_usage_limit(limit_id, create_or_update_data_usage_limit_request)
|
304
|
+
|
305
|
+
Partial update profile details
|
306
|
+
|
307
|
+
### Examples
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
require 'time'
|
311
|
+
require 'forestvpn_cloud_api'
|
312
|
+
# setup authorization
|
313
|
+
ForestVPNCloudAPI.configure do |config|
|
314
|
+
# Configure API key authorization: ApiTokenAuth
|
315
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
316
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
317
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
318
|
+
|
319
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
320
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
321
|
+
end
|
322
|
+
|
323
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
324
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
325
|
+
create_or_update_data_usage_limit_request = ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
326
|
+
|
327
|
+
begin
|
328
|
+
# Partial update profile details
|
329
|
+
result = api_instance.partial_update_data_usage_limit(limit_id, create_or_update_data_usage_limit_request)
|
330
|
+
p result
|
331
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
332
|
+
puts "Error when calling LimitsApi->partial_update_data_usage_limit: #{e}"
|
333
|
+
end
|
334
|
+
```
|
335
|
+
|
336
|
+
#### Using the partial_update_data_usage_limit_with_http_info variant
|
337
|
+
|
338
|
+
This returns an Array which contains the response data, status code and headers.
|
339
|
+
|
340
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> partial_update_data_usage_limit_with_http_info(limit_id, create_or_update_data_usage_limit_request)
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
begin
|
344
|
+
# Partial update profile details
|
345
|
+
data, status_code, headers = api_instance.partial_update_data_usage_limit_with_http_info(limit_id, create_or_update_data_usage_limit_request)
|
346
|
+
p status_code # => 2xx
|
347
|
+
p headers # => { ... }
|
348
|
+
p data # => <DataUsageLimit>
|
349
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
350
|
+
puts "Error when calling LimitsApi->partial_update_data_usage_limit_with_http_info: #{e}"
|
351
|
+
end
|
352
|
+
```
|
353
|
+
|
354
|
+
### Parameters
|
355
|
+
|
356
|
+
| Name | Type | Description | Notes |
|
357
|
+
| ---- | ---- | ----------- | ----- |
|
358
|
+
| **limit_id** | **String** | | |
|
359
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | |
|
360
|
+
|
361
|
+
### Return type
|
362
|
+
|
363
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
364
|
+
|
365
|
+
### Authorization
|
366
|
+
|
367
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
368
|
+
|
369
|
+
### HTTP request headers
|
370
|
+
|
371
|
+
- **Content-Type**: application/json
|
372
|
+
- **Accept**: application/json
|
373
|
+
|
374
|
+
|
375
|
+
## update_data_usage_limit
|
376
|
+
|
377
|
+
> <DataUsageLimit> update_data_usage_limit(limit_id, create_or_update_data_usage_limit_request)
|
378
|
+
|
379
|
+
Update data usage limit
|
380
|
+
|
381
|
+
### Examples
|
382
|
+
|
383
|
+
```ruby
|
384
|
+
require 'time'
|
385
|
+
require 'forestvpn_cloud_api'
|
386
|
+
# setup authorization
|
387
|
+
ForestVPNCloudAPI.configure do |config|
|
388
|
+
# Configure API key authorization: ApiTokenAuth
|
389
|
+
config.api_key['ApiTokenAuth'] = 'YOUR API KEY'
|
390
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
391
|
+
# config.api_key_prefix['ApiTokenAuth'] = 'Bearer'
|
392
|
+
|
393
|
+
# Configure Bearer authorization (JWT): BearerTokenAuth
|
394
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
395
|
+
end
|
396
|
+
|
397
|
+
api_instance = ForestVPNCloudAPI::LimitsApi.new
|
398
|
+
limit_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
399
|
+
create_or_update_data_usage_limit_request = ForestVPNCloudAPI::CreateOrUpdateDataUsageLimitRequest.new # CreateOrUpdateDataUsageLimitRequest |
|
400
|
+
|
401
|
+
begin
|
402
|
+
# Update data usage limit
|
403
|
+
result = api_instance.update_data_usage_limit(limit_id, create_or_update_data_usage_limit_request)
|
404
|
+
p result
|
405
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
406
|
+
puts "Error when calling LimitsApi->update_data_usage_limit: #{e}"
|
407
|
+
end
|
408
|
+
```
|
409
|
+
|
410
|
+
#### Using the update_data_usage_limit_with_http_info variant
|
411
|
+
|
412
|
+
This returns an Array which contains the response data, status code and headers.
|
413
|
+
|
414
|
+
> <Array(<DataUsageLimit>, Integer, Hash)> update_data_usage_limit_with_http_info(limit_id, create_or_update_data_usage_limit_request)
|
415
|
+
|
416
|
+
```ruby
|
417
|
+
begin
|
418
|
+
# Update data usage limit
|
419
|
+
data, status_code, headers = api_instance.update_data_usage_limit_with_http_info(limit_id, create_or_update_data_usage_limit_request)
|
420
|
+
p status_code # => 2xx
|
421
|
+
p headers # => { ... }
|
422
|
+
p data # => <DataUsageLimit>
|
423
|
+
rescue ForestVPNCloudAPI::ApiError => e
|
424
|
+
puts "Error when calling LimitsApi->update_data_usage_limit_with_http_info: #{e}"
|
425
|
+
end
|
426
|
+
```
|
427
|
+
|
428
|
+
### Parameters
|
429
|
+
|
430
|
+
| Name | Type | Description | Notes |
|
431
|
+
| ---- | ---- | ----------- | ----- |
|
432
|
+
| **limit_id** | **String** | | |
|
433
|
+
| **create_or_update_data_usage_limit_request** | [**CreateOrUpdateDataUsageLimitRequest**](CreateOrUpdateDataUsageLimitRequest.md) | | |
|
434
|
+
|
435
|
+
### Return type
|
436
|
+
|
437
|
+
[**DataUsageLimit**](DataUsageLimit.md)
|
438
|
+
|
439
|
+
### Authorization
|
440
|
+
|
441
|
+
[ApiTokenAuth](../README.md#ApiTokenAuth), [BearerTokenAuth](../README.md#BearerTokenAuth)
|
442
|
+
|
443
|
+
### HTTP request headers
|
444
|
+
|
445
|
+
- **Content-Type**: application/json
|
446
|
+
- **Accept**: application/json
|
447
|
+
|
data/docs/Location.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# ForestVPNCloudAPI::Location
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **name** | **String** | | |
|
9
|
+
| **latitude** | **Float** | | |
|
10
|
+
| **longitude** | **Float** | | |
|
11
|
+
| **country** | [**Country**](Country.md) | | |
|
12
|
+
| **alternative_names** | **Array<String>** | | |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'forestvpn_cloud_api'
|
18
|
+
|
19
|
+
instance = ForestVPNCloudAPI::Location.new(
|
20
|
+
id: null,
|
21
|
+
name: null,
|
22
|
+
latitude: null,
|
23
|
+
longitude: null,
|
24
|
+
country: null,
|
25
|
+
alternative_names: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# ForestVPNCloudAPI::PaymentMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **name** | **String** | | |
|
9
|
+
| **image_url** | **String** | | |
|
10
|
+
| **expires_at** | **Date** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'forestvpn_cloud_api'
|
16
|
+
|
17
|
+
instance = ForestVPNCloudAPI::PaymentMethod.new(
|
18
|
+
id: null,
|
19
|
+
name: null,
|
20
|
+
image_url: null,
|
21
|
+
expires_at: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# ForestVPNCloudAPI::PaymentProfile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | [optional] |
|
8
|
+
| **tax_number** | **String** | In some situations, your tax status will determine your tax treatment. | [optional] |
|
9
|
+
| **business_name** | **String** | | |
|
10
|
+
| **name** | **String** | | |
|
11
|
+
| **address** | [**Address**](Address.md) | | |
|
12
|
+
| **primary_contact_name** | **String** | | |
|
13
|
+
| **primary_contact_phone** | **String** | | |
|
14
|
+
| **primary_contact_email** | **String** | | |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'forestvpn_cloud_api'
|
20
|
+
|
21
|
+
instance = ForestVPNCloudAPI::PaymentProfile.new(
|
22
|
+
id: null,
|
23
|
+
tax_number: null,
|
24
|
+
business_name: null,
|
25
|
+
name: null,
|
26
|
+
address: null,
|
27
|
+
primary_contact_name: null,
|
28
|
+
primary_contact_phone: null,
|
29
|
+
primary_contact_email: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
data/docs/Profile.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# ForestVPNCloudAPI::Profile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **external_key** | **String** | | |
|
9
|
+
| **status** | **String** | | [default to 'suspended'] |
|
10
|
+
| **secret_key** | **String** | A secret key that should be used along with ID in ForestVPN Cloud VPN SDK. | |
|
11
|
+
| **metadata** | **Hash<String, String>** | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. | |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'forestvpn_cloud_api'
|
17
|
+
|
18
|
+
instance = ForestVPNCloudAPI::Profile.new(
|
19
|
+
id: null,
|
20
|
+
external_key: null,
|
21
|
+
status: null,
|
22
|
+
secret_key: null,
|
23
|
+
metadata: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# ForestVPNCloudAPI::ProfileStats
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **connections** | **Float** | | |
|
9
|
+
| **received_bytes** | **Float** | | |
|
10
|
+
| **transmitted_bytes** | **Float** | | |
|
11
|
+
| **date** | **Time** | | |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'forestvpn_cloud_api'
|
17
|
+
|
18
|
+
instance = ForestVPNCloudAPI::ProfileStats.new(
|
19
|
+
id: null,
|
20
|
+
connections: null,
|
21
|
+
received_bytes: null,
|
22
|
+
transmitted_bytes: null,
|
23
|
+
date: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|