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
@@ -0,0 +1,915 @@
|
|
1
|
+
=begin
|
2
|
+
#ForestVPN Cloud API
|
3
|
+
|
4
|
+
#ForestVPN Cloud - it's a Google Cloud but for VPN apps. Ready to use VPN Cloud Platform minimizes efforts to build fast, secure, and modern VPN apps.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0
|
7
|
+
Contact: support@forestvpn.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ForestVPNCloudAPI
|
16
|
+
class ProfilesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create profile
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [CreateOrUpdateProfileRequest] :create_or_update_profile_request
|
25
|
+
# @return [Profile]
|
26
|
+
def create_profile(opts = {})
|
27
|
+
data, _status_code, _headers = create_profile_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Create profile
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [CreateOrUpdateProfileRequest] :create_or_update_profile_request
|
34
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
35
|
+
def create_profile_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/profiles/'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
51
|
+
if !content_type.nil?
|
52
|
+
header_params['Content-Type'] = content_type
|
53
|
+
end
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_or_update_profile_request'])
|
60
|
+
|
61
|
+
# return_type
|
62
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
63
|
+
|
64
|
+
# auth_names
|
65
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
66
|
+
|
67
|
+
new_options = opts.merge(
|
68
|
+
:operation => :"ProfilesApi.create_profile",
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: ProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Create profile data usage limit
|
85
|
+
# @param profile_id [String]
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [CreateOrUpdateDataUsageLimitRequest] :create_or_update_data_usage_limit_request
|
88
|
+
# @return [DataUsageLimit]
|
89
|
+
def create_profile_data_usage_limit(profile_id, opts = {})
|
90
|
+
data, _status_code, _headers = create_profile_data_usage_limit_with_http_info(profile_id, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create profile data usage limit
|
95
|
+
# @param profile_id [String]
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [CreateOrUpdateDataUsageLimitRequest] :create_or_update_data_usage_limit_request
|
98
|
+
# @return [Array<(DataUsageLimit, Integer, Hash)>] DataUsageLimit data, response status code and response headers
|
99
|
+
def create_profile_data_usage_limit_with_http_info(profile_id, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile_data_usage_limit ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'profile_id' is set
|
104
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.create_profile_data_usage_limit"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/profiles/{profileId}/limits/data-usages/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
# HTTP header 'Content-Type'
|
118
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
119
|
+
if !content_type.nil?
|
120
|
+
header_params['Content-Type'] = content_type
|
121
|
+
end
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = opts[:form_params] || {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_or_update_data_usage_limit_request'])
|
128
|
+
|
129
|
+
# return_type
|
130
|
+
return_type = opts[:debug_return_type] || 'DataUsageLimit'
|
131
|
+
|
132
|
+
# auth_names
|
133
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
134
|
+
|
135
|
+
new_options = opts.merge(
|
136
|
+
:operation => :"ProfilesApi.create_profile_data_usage_limit",
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: ProfilesApi#create_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# Delete profile
|
153
|
+
# Deletes profile and all associated resources
|
154
|
+
# @param profile_id [String]
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [nil]
|
157
|
+
def delete_profile(profile_id, opts = {})
|
158
|
+
delete_profile_with_http_info(profile_id, opts)
|
159
|
+
nil
|
160
|
+
end
|
161
|
+
|
162
|
+
# Delete profile
|
163
|
+
# Deletes profile and all associated resources
|
164
|
+
# @param profile_id [String]
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
167
|
+
def delete_profile_with_http_info(profile_id, opts = {})
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.delete_profile ...'
|
170
|
+
end
|
171
|
+
# verify the required parameter 'profile_id' is set
|
172
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.delete_profile"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = opts[:form_params] || {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = opts[:debug_body]
|
191
|
+
|
192
|
+
# return_type
|
193
|
+
return_type = opts[:debug_return_type]
|
194
|
+
|
195
|
+
# auth_names
|
196
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
197
|
+
|
198
|
+
new_options = opts.merge(
|
199
|
+
:operation => :"ProfilesApi.delete_profile",
|
200
|
+
:header_params => header_params,
|
201
|
+
:query_params => query_params,
|
202
|
+
:form_params => form_params,
|
203
|
+
:body => post_body,
|
204
|
+
:auth_names => auth_names,
|
205
|
+
:return_type => return_type
|
206
|
+
)
|
207
|
+
|
208
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "API called: ProfilesApi#delete_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
end
|
212
|
+
return data, status_code, headers
|
213
|
+
end
|
214
|
+
|
215
|
+
# Delete profile data usage limit
|
216
|
+
# @param profile_id [String]
|
217
|
+
# @param limit_id [String]
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [nil]
|
220
|
+
def delete_profile_data_usage_limit(profile_id, limit_id, opts = {})
|
221
|
+
delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts)
|
222
|
+
nil
|
223
|
+
end
|
224
|
+
|
225
|
+
# Delete profile data usage limit
|
226
|
+
# @param profile_id [String]
|
227
|
+
# @param limit_id [String]
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
230
|
+
def delete_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.delete_profile_data_usage_limit ...'
|
233
|
+
end
|
234
|
+
# verify the required parameter 'profile_id' is set
|
235
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
236
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.delete_profile_data_usage_limit"
|
237
|
+
end
|
238
|
+
# verify the required parameter 'limit_id' is set
|
239
|
+
if @api_client.config.client_side_validation && limit_id.nil?
|
240
|
+
fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.delete_profile_data_usage_limit"
|
241
|
+
end
|
242
|
+
# resource path
|
243
|
+
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))
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = opts[:query_params] || {}
|
247
|
+
|
248
|
+
# header parameters
|
249
|
+
header_params = opts[:header_params] || {}
|
250
|
+
# HTTP header 'Accept' (if needed)
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:debug_body]
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:debug_return_type]
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:operation => :"ProfilesApi.delete_profile_data_usage_limit",
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: ProfilesApi#delete_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# Profile details
|
283
|
+
# @param profile_id [String]
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @return [Profile]
|
286
|
+
def get_profile(profile_id, opts = {})
|
287
|
+
data, _status_code, _headers = get_profile_with_http_info(profile_id, opts)
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# Profile details
|
292
|
+
# @param profile_id [String]
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
295
|
+
def get_profile_with_http_info(profile_id, opts = {})
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile ...'
|
298
|
+
end
|
299
|
+
# verify the required parameter 'profile_id' is set
|
300
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
301
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile"
|
302
|
+
end
|
303
|
+
# resource path
|
304
|
+
local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
305
|
+
|
306
|
+
# query parameters
|
307
|
+
query_params = opts[:query_params] || {}
|
308
|
+
|
309
|
+
# header parameters
|
310
|
+
header_params = opts[:header_params] || {}
|
311
|
+
# HTTP header 'Accept' (if needed)
|
312
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
313
|
+
|
314
|
+
# form parameters
|
315
|
+
form_params = opts[:form_params] || {}
|
316
|
+
|
317
|
+
# http body (model)
|
318
|
+
post_body = opts[:debug_body]
|
319
|
+
|
320
|
+
# return_type
|
321
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
322
|
+
|
323
|
+
# auth_names
|
324
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
325
|
+
|
326
|
+
new_options = opts.merge(
|
327
|
+
:operation => :"ProfilesApi.get_profile",
|
328
|
+
:header_params => header_params,
|
329
|
+
:query_params => query_params,
|
330
|
+
:form_params => form_params,
|
331
|
+
:body => post_body,
|
332
|
+
:auth_names => auth_names,
|
333
|
+
:return_type => return_type
|
334
|
+
)
|
335
|
+
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
|
343
|
+
# Profile data usage limit details
|
344
|
+
# @param profile_id [String]
|
345
|
+
# @param limit_id [String]
|
346
|
+
# @param [Hash] opts the optional parameters
|
347
|
+
# @return [DataUsageLimit]
|
348
|
+
def get_profile_data_usage_limit(profile_id, limit_id, opts = {})
|
349
|
+
data, _status_code, _headers = get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts)
|
350
|
+
data
|
351
|
+
end
|
352
|
+
|
353
|
+
# Profile data usage limit details
|
354
|
+
# @param profile_id [String]
|
355
|
+
# @param limit_id [String]
|
356
|
+
# @param [Hash] opts the optional parameters
|
357
|
+
# @return [Array<(DataUsageLimit, Integer, Hash)>] DataUsageLimit data, response status code and response headers
|
358
|
+
def get_profile_data_usage_limit_with_http_info(profile_id, limit_id, opts = {})
|
359
|
+
if @api_client.config.debugging
|
360
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_data_usage_limit ...'
|
361
|
+
end
|
362
|
+
# verify the required parameter 'profile_id' is set
|
363
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
364
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile_data_usage_limit"
|
365
|
+
end
|
366
|
+
# verify the required parameter 'limit_id' is set
|
367
|
+
if @api_client.config.client_side_validation && limit_id.nil?
|
368
|
+
fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.get_profile_data_usage_limit"
|
369
|
+
end
|
370
|
+
# resource path
|
371
|
+
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))
|
372
|
+
|
373
|
+
# query parameters
|
374
|
+
query_params = opts[:query_params] || {}
|
375
|
+
|
376
|
+
# header parameters
|
377
|
+
header_params = opts[:header_params] || {}
|
378
|
+
# HTTP header 'Accept' (if needed)
|
379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
380
|
+
|
381
|
+
# form parameters
|
382
|
+
form_params = opts[:form_params] || {}
|
383
|
+
|
384
|
+
# http body (model)
|
385
|
+
post_body = opts[:debug_body]
|
386
|
+
|
387
|
+
# return_type
|
388
|
+
return_type = opts[:debug_return_type] || 'DataUsageLimit'
|
389
|
+
|
390
|
+
# auth_names
|
391
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
392
|
+
|
393
|
+
new_options = opts.merge(
|
394
|
+
:operation => :"ProfilesApi.get_profile_data_usage_limit",
|
395
|
+
:header_params => header_params,
|
396
|
+
:query_params => query_params,
|
397
|
+
:form_params => form_params,
|
398
|
+
:body => post_body,
|
399
|
+
:auth_names => auth_names,
|
400
|
+
:return_type => return_type
|
401
|
+
)
|
402
|
+
|
403
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
404
|
+
if @api_client.config.debugging
|
405
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
406
|
+
end
|
407
|
+
return data, status_code, headers
|
408
|
+
end
|
409
|
+
|
410
|
+
# Profile data usage limits list
|
411
|
+
# @param profile_id [String]
|
412
|
+
# @param [Hash] opts the optional parameters
|
413
|
+
# @return [Array<DataUsageLimit>]
|
414
|
+
def list_profile_data_usage_limits(profile_id, opts = {})
|
415
|
+
data, _status_code, _headers = list_profile_data_usage_limits_with_http_info(profile_id, opts)
|
416
|
+
data
|
417
|
+
end
|
418
|
+
|
419
|
+
# Profile data usage limits list
|
420
|
+
# @param profile_id [String]
|
421
|
+
# @param [Hash] opts the optional parameters
|
422
|
+
# @return [Array<(Array<DataUsageLimit>, Integer, Hash)>] Array<DataUsageLimit> data, response status code and response headers
|
423
|
+
def list_profile_data_usage_limits_with_http_info(profile_id, opts = {})
|
424
|
+
if @api_client.config.debugging
|
425
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.list_profile_data_usage_limits ...'
|
426
|
+
end
|
427
|
+
# verify the required parameter 'profile_id' is set
|
428
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
429
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.list_profile_data_usage_limits"
|
430
|
+
end
|
431
|
+
# resource path
|
432
|
+
local_var_path = '/profiles/{profileId}/limits/data-usages/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
433
|
+
|
434
|
+
# query parameters
|
435
|
+
query_params = opts[:query_params] || {}
|
436
|
+
|
437
|
+
# header parameters
|
438
|
+
header_params = opts[:header_params] || {}
|
439
|
+
# HTTP header 'Accept' (if needed)
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
441
|
+
|
442
|
+
# form parameters
|
443
|
+
form_params = opts[:form_params] || {}
|
444
|
+
|
445
|
+
# http body (model)
|
446
|
+
post_body = opts[:debug_body]
|
447
|
+
|
448
|
+
# return_type
|
449
|
+
return_type = opts[:debug_return_type] || 'Array<DataUsageLimit>'
|
450
|
+
|
451
|
+
# auth_names
|
452
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
453
|
+
|
454
|
+
new_options = opts.merge(
|
455
|
+
:operation => :"ProfilesApi.list_profile_data_usage_limits",
|
456
|
+
:header_params => header_params,
|
457
|
+
:query_params => query_params,
|
458
|
+
:form_params => form_params,
|
459
|
+
:body => post_body,
|
460
|
+
:auth_names => auth_names,
|
461
|
+
:return_type => return_type
|
462
|
+
)
|
463
|
+
|
464
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
465
|
+
if @api_client.config.debugging
|
466
|
+
@api_client.config.logger.debug "API called: ProfilesApi#list_profile_data_usage_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
467
|
+
end
|
468
|
+
return data, status_code, headers
|
469
|
+
end
|
470
|
+
|
471
|
+
# Profile stats list
|
472
|
+
# @param profile_id [String]
|
473
|
+
# @param [Hash] opts the optional parameters
|
474
|
+
# @option opts [String] :aggregate_by
|
475
|
+
# @option opts [Date] :date_after
|
476
|
+
# @option opts [Date] :date_before
|
477
|
+
# @option opts [Float] :per_page
|
478
|
+
# @option opts [Float] :page
|
479
|
+
# @return [Array<ProfileStats>]
|
480
|
+
def list_profile_stats(profile_id, opts = {})
|
481
|
+
data, _status_code, _headers = list_profile_stats_with_http_info(profile_id, opts)
|
482
|
+
data
|
483
|
+
end
|
484
|
+
|
485
|
+
# Profile stats list
|
486
|
+
# @param profile_id [String]
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @option opts [String] :aggregate_by
|
489
|
+
# @option opts [Date] :date_after
|
490
|
+
# @option opts [Date] :date_before
|
491
|
+
# @option opts [Float] :per_page
|
492
|
+
# @option opts [Float] :page
|
493
|
+
# @return [Array<(Array<ProfileStats>, Integer, Hash)>] Array<ProfileStats> data, response status code and response headers
|
494
|
+
def list_profile_stats_with_http_info(profile_id, opts = {})
|
495
|
+
if @api_client.config.debugging
|
496
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.list_profile_stats ...'
|
497
|
+
end
|
498
|
+
# verify the required parameter 'profile_id' is set
|
499
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
500
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.list_profile_stats"
|
501
|
+
end
|
502
|
+
allowable_values = ["hourly", "daily", "weekly", "monthly"]
|
503
|
+
if @api_client.config.client_side_validation && opts[:'aggregate_by'] && !allowable_values.include?(opts[:'aggregate_by'])
|
504
|
+
fail ArgumentError, "invalid value for \"aggregate_by\", must be one of #{allowable_values}"
|
505
|
+
end
|
506
|
+
# resource path
|
507
|
+
local_var_path = '/profiles/{profileId}/stats/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
508
|
+
|
509
|
+
# query parameters
|
510
|
+
query_params = opts[:query_params] || {}
|
511
|
+
query_params[:'aggregate_by'] = opts[:'aggregate_by'] if !opts[:'aggregate_by'].nil?
|
512
|
+
query_params[:'date_after'] = opts[:'date_after'] if !opts[:'date_after'].nil?
|
513
|
+
query_params[:'date_before'] = opts[:'date_before'] if !opts[:'date_before'].nil?
|
514
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
515
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
516
|
+
|
517
|
+
# header parameters
|
518
|
+
header_params = opts[:header_params] || {}
|
519
|
+
# HTTP header 'Accept' (if needed)
|
520
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
521
|
+
|
522
|
+
# form parameters
|
523
|
+
form_params = opts[:form_params] || {}
|
524
|
+
|
525
|
+
# http body (model)
|
526
|
+
post_body = opts[:debug_body]
|
527
|
+
|
528
|
+
# return_type
|
529
|
+
return_type = opts[:debug_return_type] || 'Array<ProfileStats>'
|
530
|
+
|
531
|
+
# auth_names
|
532
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
533
|
+
|
534
|
+
new_options = opts.merge(
|
535
|
+
:operation => :"ProfilesApi.list_profile_stats",
|
536
|
+
:header_params => header_params,
|
537
|
+
:query_params => query_params,
|
538
|
+
:form_params => form_params,
|
539
|
+
:body => post_body,
|
540
|
+
:auth_names => auth_names,
|
541
|
+
:return_type => return_type
|
542
|
+
)
|
543
|
+
|
544
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
545
|
+
if @api_client.config.debugging
|
546
|
+
@api_client.config.logger.debug "API called: ProfilesApi#list_profile_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
547
|
+
end
|
548
|
+
return data, status_code, headers
|
549
|
+
end
|
550
|
+
|
551
|
+
# Profile list
|
552
|
+
# @param [Hash] opts the optional parameters
|
553
|
+
# @option opts [String] :external_key
|
554
|
+
# @option opts [Float] :per_page
|
555
|
+
# @option opts [Float] :page
|
556
|
+
# @return [Array<Profile>]
|
557
|
+
def list_profiles(opts = {})
|
558
|
+
data, _status_code, _headers = list_profiles_with_http_info(opts)
|
559
|
+
data
|
560
|
+
end
|
561
|
+
|
562
|
+
# Profile list
|
563
|
+
# @param [Hash] opts the optional parameters
|
564
|
+
# @option opts [String] :external_key
|
565
|
+
# @option opts [Float] :per_page
|
566
|
+
# @option opts [Float] :page
|
567
|
+
# @return [Array<(Array<Profile>, Integer, Hash)>] Array<Profile> data, response status code and response headers
|
568
|
+
def list_profiles_with_http_info(opts = {})
|
569
|
+
if @api_client.config.debugging
|
570
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.list_profiles ...'
|
571
|
+
end
|
572
|
+
# resource path
|
573
|
+
local_var_path = '/profiles/'
|
574
|
+
|
575
|
+
# query parameters
|
576
|
+
query_params = opts[:query_params] || {}
|
577
|
+
query_params[:'external_key'] = opts[:'external_key'] if !opts[:'external_key'].nil?
|
578
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
579
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
580
|
+
|
581
|
+
# header parameters
|
582
|
+
header_params = opts[:header_params] || {}
|
583
|
+
# HTTP header 'Accept' (if needed)
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
585
|
+
|
586
|
+
# form parameters
|
587
|
+
form_params = opts[:form_params] || {}
|
588
|
+
|
589
|
+
# http body (model)
|
590
|
+
post_body = opts[:debug_body]
|
591
|
+
|
592
|
+
# return_type
|
593
|
+
return_type = opts[:debug_return_type] || 'Array<Profile>'
|
594
|
+
|
595
|
+
# auth_names
|
596
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
597
|
+
|
598
|
+
new_options = opts.merge(
|
599
|
+
:operation => :"ProfilesApi.list_profiles",
|
600
|
+
:header_params => header_params,
|
601
|
+
:query_params => query_params,
|
602
|
+
:form_params => form_params,
|
603
|
+
:body => post_body,
|
604
|
+
:auth_names => auth_names,
|
605
|
+
:return_type => return_type
|
606
|
+
)
|
607
|
+
|
608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
609
|
+
if @api_client.config.debugging
|
610
|
+
@api_client.config.logger.debug "API called: ProfilesApi#list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
611
|
+
end
|
612
|
+
return data, status_code, headers
|
613
|
+
end
|
614
|
+
|
615
|
+
# Partial update profile details
|
616
|
+
# @param profile_id [String]
|
617
|
+
# @param create_or_update_profile_request [CreateOrUpdateProfileRequest]
|
618
|
+
# @param [Hash] opts the optional parameters
|
619
|
+
# @return [Profile]
|
620
|
+
def partial_update_profile(profile_id, create_or_update_profile_request, opts = {})
|
621
|
+
data, _status_code, _headers = partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts)
|
622
|
+
data
|
623
|
+
end
|
624
|
+
|
625
|
+
# Partial update profile details
|
626
|
+
# @param profile_id [String]
|
627
|
+
# @param create_or_update_profile_request [CreateOrUpdateProfileRequest]
|
628
|
+
# @param [Hash] opts the optional parameters
|
629
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
630
|
+
def partial_update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {})
|
631
|
+
if @api_client.config.debugging
|
632
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.partial_update_profile ...'
|
633
|
+
end
|
634
|
+
# verify the required parameter 'profile_id' is set
|
635
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
636
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.partial_update_profile"
|
637
|
+
end
|
638
|
+
# verify the required parameter 'create_or_update_profile_request' is set
|
639
|
+
if @api_client.config.client_side_validation && create_or_update_profile_request.nil?
|
640
|
+
fail ArgumentError, "Missing the required parameter 'create_or_update_profile_request' when calling ProfilesApi.partial_update_profile"
|
641
|
+
end
|
642
|
+
# resource path
|
643
|
+
local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
644
|
+
|
645
|
+
# query parameters
|
646
|
+
query_params = opts[:query_params] || {}
|
647
|
+
|
648
|
+
# header parameters
|
649
|
+
header_params = opts[:header_params] || {}
|
650
|
+
# HTTP header 'Accept' (if needed)
|
651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
652
|
+
# HTTP header 'Content-Type'
|
653
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
654
|
+
if !content_type.nil?
|
655
|
+
header_params['Content-Type'] = content_type
|
656
|
+
end
|
657
|
+
|
658
|
+
# form parameters
|
659
|
+
form_params = opts[:form_params] || {}
|
660
|
+
|
661
|
+
# http body (model)
|
662
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_profile_request)
|
663
|
+
|
664
|
+
# return_type
|
665
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
666
|
+
|
667
|
+
# auth_names
|
668
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
669
|
+
|
670
|
+
new_options = opts.merge(
|
671
|
+
:operation => :"ProfilesApi.partial_update_profile",
|
672
|
+
:header_params => header_params,
|
673
|
+
:query_params => query_params,
|
674
|
+
:form_params => form_params,
|
675
|
+
:body => post_body,
|
676
|
+
:auth_names => auth_names,
|
677
|
+
:return_type => return_type
|
678
|
+
)
|
679
|
+
|
680
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
681
|
+
if @api_client.config.debugging
|
682
|
+
@api_client.config.logger.debug "API called: ProfilesApi#partial_update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
683
|
+
end
|
684
|
+
return data, status_code, headers
|
685
|
+
end
|
686
|
+
|
687
|
+
# Partial update profile data usage limit
|
688
|
+
# @param profile_id [String]
|
689
|
+
# @param limit_id [String]
|
690
|
+
# @param create_or_update_data_usage_limit_request [CreateOrUpdateDataUsageLimitRequest]
|
691
|
+
# @param [Hash] opts the optional parameters
|
692
|
+
# @return [DataUsageLimit]
|
693
|
+
def partial_update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {})
|
694
|
+
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)
|
695
|
+
data
|
696
|
+
end
|
697
|
+
|
698
|
+
# Partial update profile data usage limit
|
699
|
+
# @param profile_id [String]
|
700
|
+
# @param limit_id [String]
|
701
|
+
# @param create_or_update_data_usage_limit_request [CreateOrUpdateDataUsageLimitRequest]
|
702
|
+
# @param [Hash] opts the optional parameters
|
703
|
+
# @return [Array<(DataUsageLimit, Integer, Hash)>] DataUsageLimit data, response status code and response headers
|
704
|
+
def partial_update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {})
|
705
|
+
if @api_client.config.debugging
|
706
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.partial_update_profile_data_usage_limit ...'
|
707
|
+
end
|
708
|
+
# verify the required parameter 'profile_id' is set
|
709
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
710
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.partial_update_profile_data_usage_limit"
|
711
|
+
end
|
712
|
+
# verify the required parameter 'limit_id' is set
|
713
|
+
if @api_client.config.client_side_validation && limit_id.nil?
|
714
|
+
fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.partial_update_profile_data_usage_limit"
|
715
|
+
end
|
716
|
+
# verify the required parameter 'create_or_update_data_usage_limit_request' is set
|
717
|
+
if @api_client.config.client_side_validation && create_or_update_data_usage_limit_request.nil?
|
718
|
+
fail ArgumentError, "Missing the required parameter 'create_or_update_data_usage_limit_request' when calling ProfilesApi.partial_update_profile_data_usage_limit"
|
719
|
+
end
|
720
|
+
# resource path
|
721
|
+
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))
|
722
|
+
|
723
|
+
# query parameters
|
724
|
+
query_params = opts[:query_params] || {}
|
725
|
+
|
726
|
+
# header parameters
|
727
|
+
header_params = opts[:header_params] || {}
|
728
|
+
# HTTP header 'Accept' (if needed)
|
729
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
730
|
+
# HTTP header 'Content-Type'
|
731
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
732
|
+
if !content_type.nil?
|
733
|
+
header_params['Content-Type'] = content_type
|
734
|
+
end
|
735
|
+
|
736
|
+
# form parameters
|
737
|
+
form_params = opts[:form_params] || {}
|
738
|
+
|
739
|
+
# http body (model)
|
740
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_data_usage_limit_request)
|
741
|
+
|
742
|
+
# return_type
|
743
|
+
return_type = opts[:debug_return_type] || 'DataUsageLimit'
|
744
|
+
|
745
|
+
# auth_names
|
746
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
747
|
+
|
748
|
+
new_options = opts.merge(
|
749
|
+
:operation => :"ProfilesApi.partial_update_profile_data_usage_limit",
|
750
|
+
:header_params => header_params,
|
751
|
+
:query_params => query_params,
|
752
|
+
:form_params => form_params,
|
753
|
+
:body => post_body,
|
754
|
+
:auth_names => auth_names,
|
755
|
+
:return_type => return_type
|
756
|
+
)
|
757
|
+
|
758
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
759
|
+
if @api_client.config.debugging
|
760
|
+
@api_client.config.logger.debug "API called: ProfilesApi#partial_update_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
761
|
+
end
|
762
|
+
return data, status_code, headers
|
763
|
+
end
|
764
|
+
|
765
|
+
# Update profile details
|
766
|
+
# @param profile_id [String]
|
767
|
+
# @param create_or_update_profile_request [CreateOrUpdateProfileRequest]
|
768
|
+
# @param [Hash] opts the optional parameters
|
769
|
+
# @return [Profile]
|
770
|
+
def update_profile(profile_id, create_or_update_profile_request, opts = {})
|
771
|
+
data, _status_code, _headers = update_profile_with_http_info(profile_id, create_or_update_profile_request, opts)
|
772
|
+
data
|
773
|
+
end
|
774
|
+
|
775
|
+
# Update profile details
|
776
|
+
# @param profile_id [String]
|
777
|
+
# @param create_or_update_profile_request [CreateOrUpdateProfileRequest]
|
778
|
+
# @param [Hash] opts the optional parameters
|
779
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
780
|
+
def update_profile_with_http_info(profile_id, create_or_update_profile_request, opts = {})
|
781
|
+
if @api_client.config.debugging
|
782
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile ...'
|
783
|
+
end
|
784
|
+
# verify the required parameter 'profile_id' is set
|
785
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
786
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.update_profile"
|
787
|
+
end
|
788
|
+
# verify the required parameter 'create_or_update_profile_request' is set
|
789
|
+
if @api_client.config.client_side_validation && create_or_update_profile_request.nil?
|
790
|
+
fail ArgumentError, "Missing the required parameter 'create_or_update_profile_request' when calling ProfilesApi.update_profile"
|
791
|
+
end
|
792
|
+
# resource path
|
793
|
+
local_var_path = '/profiles/{profileId}/'.sub('{' + 'profileId' + '}', CGI.escape(profile_id.to_s))
|
794
|
+
|
795
|
+
# query parameters
|
796
|
+
query_params = opts[:query_params] || {}
|
797
|
+
|
798
|
+
# header parameters
|
799
|
+
header_params = opts[:header_params] || {}
|
800
|
+
# HTTP header 'Accept' (if needed)
|
801
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
802
|
+
# HTTP header 'Content-Type'
|
803
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
804
|
+
if !content_type.nil?
|
805
|
+
header_params['Content-Type'] = content_type
|
806
|
+
end
|
807
|
+
|
808
|
+
# form parameters
|
809
|
+
form_params = opts[:form_params] || {}
|
810
|
+
|
811
|
+
# http body (model)
|
812
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_profile_request)
|
813
|
+
|
814
|
+
# return_type
|
815
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
816
|
+
|
817
|
+
# auth_names
|
818
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
819
|
+
|
820
|
+
new_options = opts.merge(
|
821
|
+
:operation => :"ProfilesApi.update_profile",
|
822
|
+
:header_params => header_params,
|
823
|
+
:query_params => query_params,
|
824
|
+
:form_params => form_params,
|
825
|
+
:body => post_body,
|
826
|
+
:auth_names => auth_names,
|
827
|
+
:return_type => return_type
|
828
|
+
)
|
829
|
+
|
830
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
831
|
+
if @api_client.config.debugging
|
832
|
+
@api_client.config.logger.debug "API called: ProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
833
|
+
end
|
834
|
+
return data, status_code, headers
|
835
|
+
end
|
836
|
+
|
837
|
+
# Update profile data usage limit
|
838
|
+
# @param profile_id [String]
|
839
|
+
# @param limit_id [String]
|
840
|
+
# @param create_or_update_data_usage_limit_request [CreateOrUpdateDataUsageLimitRequest]
|
841
|
+
# @param [Hash] opts the optional parameters
|
842
|
+
# @return [DataUsageLimit]
|
843
|
+
def update_profile_data_usage_limit(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {})
|
844
|
+
data, _status_code, _headers = update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts)
|
845
|
+
data
|
846
|
+
end
|
847
|
+
|
848
|
+
# Update profile data usage limit
|
849
|
+
# @param profile_id [String]
|
850
|
+
# @param limit_id [String]
|
851
|
+
# @param create_or_update_data_usage_limit_request [CreateOrUpdateDataUsageLimitRequest]
|
852
|
+
# @param [Hash] opts the optional parameters
|
853
|
+
# @return [Array<(DataUsageLimit, Integer, Hash)>] DataUsageLimit data, response status code and response headers
|
854
|
+
def update_profile_data_usage_limit_with_http_info(profile_id, limit_id, create_or_update_data_usage_limit_request, opts = {})
|
855
|
+
if @api_client.config.debugging
|
856
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile_data_usage_limit ...'
|
857
|
+
end
|
858
|
+
# verify the required parameter 'profile_id' is set
|
859
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
860
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.update_profile_data_usage_limit"
|
861
|
+
end
|
862
|
+
# verify the required parameter 'limit_id' is set
|
863
|
+
if @api_client.config.client_side_validation && limit_id.nil?
|
864
|
+
fail ArgumentError, "Missing the required parameter 'limit_id' when calling ProfilesApi.update_profile_data_usage_limit"
|
865
|
+
end
|
866
|
+
# verify the required parameter 'create_or_update_data_usage_limit_request' is set
|
867
|
+
if @api_client.config.client_side_validation && create_or_update_data_usage_limit_request.nil?
|
868
|
+
fail ArgumentError, "Missing the required parameter 'create_or_update_data_usage_limit_request' when calling ProfilesApi.update_profile_data_usage_limit"
|
869
|
+
end
|
870
|
+
# resource path
|
871
|
+
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))
|
872
|
+
|
873
|
+
# query parameters
|
874
|
+
query_params = opts[:query_params] || {}
|
875
|
+
|
876
|
+
# header parameters
|
877
|
+
header_params = opts[:header_params] || {}
|
878
|
+
# HTTP header 'Accept' (if needed)
|
879
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
880
|
+
# HTTP header 'Content-Type'
|
881
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
882
|
+
if !content_type.nil?
|
883
|
+
header_params['Content-Type'] = content_type
|
884
|
+
end
|
885
|
+
|
886
|
+
# form parameters
|
887
|
+
form_params = opts[:form_params] || {}
|
888
|
+
|
889
|
+
# http body (model)
|
890
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_data_usage_limit_request)
|
891
|
+
|
892
|
+
# return_type
|
893
|
+
return_type = opts[:debug_return_type] || 'DataUsageLimit'
|
894
|
+
|
895
|
+
# auth_names
|
896
|
+
auth_names = opts[:debug_auth_names] || ['ApiTokenAuth', 'BearerTokenAuth']
|
897
|
+
|
898
|
+
new_options = opts.merge(
|
899
|
+
:operation => :"ProfilesApi.update_profile_data_usage_limit",
|
900
|
+
:header_params => header_params,
|
901
|
+
:query_params => query_params,
|
902
|
+
:form_params => form_params,
|
903
|
+
:body => post_body,
|
904
|
+
:auth_names => auth_names,
|
905
|
+
:return_type => return_type
|
906
|
+
)
|
907
|
+
|
908
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
909
|
+
if @api_client.config.debugging
|
910
|
+
@api_client.config.logger.debug "API called: ProfilesApi#update_profile_data_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
911
|
+
end
|
912
|
+
return data, status_code, headers
|
913
|
+
end
|
914
|
+
end
|
915
|
+
end
|