groupdocs_platform_cloud 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +160 -0
- data/Ruby Mustache Templates/ReadMe.txt +1 -0
- data/Ruby Mustache Templates/api_client.mustache +441 -0
- data/Swagger Specs File/platform.json +1683 -0
- data/groupdocs_platform_cloud.gemspec +26 -0
- data/lib/groupdocs_platform_cloud.rb +72 -0
- data/lib/groupdocs_platform_cloud/api/app_api.rb +359 -0
- data/lib/groupdocs_platform_cloud/api/app_statistics_api.rb +572 -0
- data/lib/groupdocs_platform_cloud/api/auth_api.rb +176 -0
- data/lib/groupdocs_platform_cloud/api/file_api.rb +282 -0
- data/lib/groupdocs_platform_cloud/api/folder_api.rb +267 -0
- data/lib/groupdocs_platform_cloud/api/heroku_api.rb +241 -0
- data/lib/groupdocs_platform_cloud/api/storage_api.rb +249 -0
- data/lib/groupdocs_platform_cloud/api/usage_api.rb +233 -0
- data/lib/groupdocs_platform_cloud/api_client.rb +446 -0
- data/lib/groupdocs_platform_cloud/api_error.rb +38 -0
- data/lib/groupdocs_platform_cloud/configuration.rb +216 -0
- data/lib/groupdocs_platform_cloud/groupdocs_app.rb +20 -0
- data/lib/groupdocs_platform_cloud/models/access_token_list_response.rb +213 -0
- data/lib/groupdocs_platform_cloud/models/access_token_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/app.rb +243 -0
- data/lib/groupdocs_platform_cloud/models/app_usage.rb +235 -0
- data/lib/groupdocs_platform_cloud/models/application_usage_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/disc_usage.rb +207 -0
- data/lib/groupdocs_platform_cloud/models/disc_usage_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/file.rb +253 -0
- data/lib/groupdocs_platform_cloud/models/file_exist.rb +207 -0
- data/lib/groupdocs_platform_cloud/models/file_exist_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/file_response.rb +224 -0
- data/lib/groupdocs_platform_cloud/models/file_version.rb +276 -0
- data/lib/groupdocs_platform_cloud/models/file_versions_response.rb +213 -0
- data/lib/groupdocs_platform_cloud/models/folder_response.rb +208 -0
- data/lib/groupdocs_platform_cloud/models/heroku_request.rb +233 -0
- data/lib/groupdocs_platform_cloud/models/heroku_request_options.rb +188 -0
- data/lib/groupdocs_platform_cloud/models/move_file_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/move_folder_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/remove_file_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/remove_folder_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/saa_spose_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/storage_exist_response.rb +216 -0
- data/lib/groupdocs_platform_cloud/models/user_usage_summary_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/user_usage_summary_statistics.rb +291 -0
- data/lib/groupdocs_platform_cloud/version.rb +15 -0
- data/test/data/SampleExecuteTemplate.doc +0 -0
- data/test/data/SampleExecuteTemplateData.txt +49 -0
- data/test/data/SampleWordDocument.docx +0 -0
- data/test/data/buzz.png +0 -0
- data/test/data/testfile.txt +1 -0
- data/test/platform_tests.rb +144 -0
- metadata +156 -0
@@ -0,0 +1,249 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module GroupDocsPlatformCloud
|
16
|
+
class StorageApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Check the disk usage of the current account. Parameters: storage - user's storage name.
|
24
|
+
#
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :storage
|
27
|
+
# @return [DiscUsageResponse]
|
28
|
+
def storage_get_disc_usage(opts = {})
|
29
|
+
data, _status_code, _headers = storage_get_disc_usage_with_http_info(opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Check the disk usage of the current account. Parameters: storage - user's storage name.
|
34
|
+
#
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :storage
|
37
|
+
# @return [Array<(DiscUsageResponse, Fixnum, Hash)>] DiscUsageResponse data, response status code and response headers
|
38
|
+
def storage_get_disc_usage_with_http_info(opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: StorageApi.storage_get_disc_usage ..."
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = "/storage/disc"
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = {}
|
47
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = nil
|
61
|
+
auth_names = []
|
62
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'DiscUsageResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: StorageApi#storage_get_disc_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
|
75
|
+
# Check if a specific file or folder exists.Parameters: path - file or folder path e.g. /file.ext or /Folder1, versionID - file's version, storage - user's storage name.
|
76
|
+
#
|
77
|
+
# @param path
|
78
|
+
# @param [Hash] opts the optional parameters
|
79
|
+
# @option opts [String] :version_id
|
80
|
+
# @option opts [String] :storage
|
81
|
+
# @return [FileExistResponse]
|
82
|
+
def storage_get_is_exist(path, opts = {})
|
83
|
+
data, _status_code, _headers = storage_get_is_exist_with_http_info(path, opts)
|
84
|
+
return data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check if a specific file or folder exists.Parameters: path - file or folder path e.g. /file.ext or /Folder1, versionID - file's version, storage - user's storage name.
|
88
|
+
#
|
89
|
+
# @param path
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @option opts [String] :version_id
|
92
|
+
# @option opts [String] :storage
|
93
|
+
# @return [Array<(FileExistResponse, Fixnum, Hash)>] FileExistResponse data, response status code and response headers
|
94
|
+
def storage_get_is_exist_with_http_info(path, opts = {})
|
95
|
+
if @api_client.config.debugging
|
96
|
+
@api_client.config.logger.debug "Calling API: StorageApi.storage_get_is_exist ..."
|
97
|
+
end
|
98
|
+
# verify the required parameter 'path' is set
|
99
|
+
if @api_client.config.client_side_validation && path.nil?
|
100
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.storage_get_is_exist"
|
101
|
+
end
|
102
|
+
# resource path
|
103
|
+
local_var_path = "/storage/exist/{path}".sub('{' + 'path' + '}', path.to_s)
|
104
|
+
|
105
|
+
# query parameters
|
106
|
+
query_params = {}
|
107
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
108
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
109
|
+
|
110
|
+
# header parameters
|
111
|
+
header_params = {}
|
112
|
+
# HTTP header 'Accept' (if needed)
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = []
|
123
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'FileExistResponse')
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: StorageApi#storage_get_is_exist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
|
136
|
+
# Check if storage exists.
|
137
|
+
#
|
138
|
+
# @param name Storage name
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [StorageExistResponse]
|
141
|
+
def storage_get_is_storage_exist(name, opts = {})
|
142
|
+
data, _status_code, _headers = storage_get_is_storage_exist_with_http_info(name, opts)
|
143
|
+
return data
|
144
|
+
end
|
145
|
+
|
146
|
+
# Check if storage exists.
|
147
|
+
#
|
148
|
+
# @param name Storage name
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [Array<(StorageExistResponse, Fixnum, Hash)>] StorageExistResponse data, response status code and response headers
|
151
|
+
def storage_get_is_storage_exist_with_http_info(name, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "Calling API: StorageApi.storage_get_is_storage_exist ..."
|
154
|
+
end
|
155
|
+
# verify the required parameter 'name' is set
|
156
|
+
if @api_client.config.client_side_validation && name.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling StorageApi.storage_get_is_storage_exist"
|
158
|
+
end
|
159
|
+
# resource path
|
160
|
+
local_var_path = "/storage/{name}/exist".sub('{' + 'name' + '}', name.to_s)
|
161
|
+
|
162
|
+
# query parameters
|
163
|
+
query_params = {}
|
164
|
+
|
165
|
+
# header parameters
|
166
|
+
header_params = {}
|
167
|
+
# HTTP header 'Accept' (if needed)
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
169
|
+
# HTTP header 'Content-Type'
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
171
|
+
|
172
|
+
# form parameters
|
173
|
+
form_params = {}
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = nil
|
177
|
+
auth_names = []
|
178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => 'StorageExistResponse')
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "API called: StorageApi#storage_get_is_storage_exist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
|
+
end
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
190
|
+
|
191
|
+
# Get the file's versions list. Parameters: path - file path e.g. /file.ext or /Folder1/file.ext, storage - user's storage name.
|
192
|
+
#
|
193
|
+
# @param path
|
194
|
+
# @param [Hash] opts the optional parameters
|
195
|
+
# @option opts [String] :storage
|
196
|
+
# @return [FileVersionsResponse]
|
197
|
+
def storage_get_list_file_versions(path, opts = {})
|
198
|
+
data, _status_code, _headers = storage_get_list_file_versions_with_http_info(path, opts)
|
199
|
+
return data
|
200
|
+
end
|
201
|
+
|
202
|
+
# Get the file's versions list. Parameters: path - file path e.g. /file.ext or /Folder1/file.ext, storage - user's storage name.
|
203
|
+
#
|
204
|
+
# @param path
|
205
|
+
# @param [Hash] opts the optional parameters
|
206
|
+
# @option opts [String] :storage
|
207
|
+
# @return [Array<(FileVersionsResponse, Fixnum, Hash)>] FileVersionsResponse data, response status code and response headers
|
208
|
+
def storage_get_list_file_versions_with_http_info(path, opts = {})
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "Calling API: StorageApi.storage_get_list_file_versions ..."
|
211
|
+
end
|
212
|
+
# verify the required parameter 'path' is set
|
213
|
+
if @api_client.config.client_side_validation && path.nil?
|
214
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.storage_get_list_file_versions"
|
215
|
+
end
|
216
|
+
# resource path
|
217
|
+
local_var_path = "/storage/version/{path}".sub('{' + 'path' + '}', path.to_s)
|
218
|
+
|
219
|
+
# query parameters
|
220
|
+
query_params = {}
|
221
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
222
|
+
|
223
|
+
# header parameters
|
224
|
+
header_params = {}
|
225
|
+
# HTTP header 'Accept' (if needed)
|
226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
227
|
+
# HTTP header 'Content-Type'
|
228
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
229
|
+
|
230
|
+
# form parameters
|
231
|
+
form_params = {}
|
232
|
+
|
233
|
+
# http body (model)
|
234
|
+
post_body = nil
|
235
|
+
auth_names = []
|
236
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
237
|
+
:header_params => header_params,
|
238
|
+
:query_params => query_params,
|
239
|
+
:form_params => form_params,
|
240
|
+
:body => post_body,
|
241
|
+
:auth_names => auth_names,
|
242
|
+
:return_type => 'FileVersionsResponse')
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "API called: StorageApi#storage_get_list_file_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
+
end
|
246
|
+
return data, status_code, headers
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
@@ -0,0 +1,233 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module GroupDocsPlatformCloud
|
16
|
+
class UsageApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Get usage logs for some period.
|
24
|
+
#
|
25
|
+
# @param start The period start.
|
26
|
+
# @param _end The period end.
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [File]
|
29
|
+
def usage_get_user_usage(start, _end, opts = {})
|
30
|
+
data, _status_code, _headers = usage_get_user_usage_with_http_info(start, _end, opts)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get usage logs for some period.
|
35
|
+
#
|
36
|
+
# @param start The period start.
|
37
|
+
# @param _end The period end.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
40
|
+
def usage_get_user_usage_with_http_info(start, _end, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug "Calling API: UsageApi.usage_get_user_usage ..."
|
43
|
+
end
|
44
|
+
# verify the required parameter 'start' is set
|
45
|
+
if @api_client.config.client_side_validation && start.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'start' when calling UsageApi.usage_get_user_usage"
|
47
|
+
end
|
48
|
+
# verify the required parameter '_end' is set
|
49
|
+
if @api_client.config.client_side_validation && _end.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter '_end' when calling UsageApi.usage_get_user_usage"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = "/usage"
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = {}
|
57
|
+
query_params[:'start'] = start
|
58
|
+
query_params[:'end'] = _end
|
59
|
+
|
60
|
+
# header parameters
|
61
|
+
header_params = {}
|
62
|
+
# HTTP header 'Accept' (if needed)
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
64
|
+
# HTTP header 'Content-Type'
|
65
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = {}
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = nil
|
72
|
+
auth_names = []
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => 'File')
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: UsageApi#usage_get_user_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Get usage for current subscription period.
|
87
|
+
#
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [File]
|
90
|
+
def usage_get_user_usage_current_month(opts = {})
|
91
|
+
data, _status_code, _headers = usage_get_user_usage_current_month_with_http_info(opts)
|
92
|
+
return data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Get usage for current subscription period.
|
96
|
+
#
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
99
|
+
def usage_get_user_usage_current_month_with_http_info(opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug "Calling API: UsageApi.usage_get_user_usage_current_month ..."
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = "/usage/currentPeriod"
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = {}
|
108
|
+
|
109
|
+
# header parameters
|
110
|
+
header_params = {}
|
111
|
+
# HTTP header 'Accept' (if needed)
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
113
|
+
# HTTP header 'Content-Type'
|
114
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = nil
|
121
|
+
auth_names = []
|
122
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => 'File')
|
129
|
+
if @api_client.config.debugging
|
130
|
+
@api_client.config.logger.debug "API called: UsageApi#usage_get_user_usage_current_month\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
131
|
+
end
|
132
|
+
return data, status_code, headers
|
133
|
+
end
|
134
|
+
|
135
|
+
# Get summary usage for current subscription period.
|
136
|
+
#
|
137
|
+
# @param [Hash] opts the optional parameters
|
138
|
+
# @return [UserUsageSummaryResponse]
|
139
|
+
def usage_get_user_usage_current_period_summary(opts = {})
|
140
|
+
data, _status_code, _headers = usage_get_user_usage_current_period_summary_with_http_info(opts)
|
141
|
+
return data
|
142
|
+
end
|
143
|
+
|
144
|
+
# Get summary usage for current subscription period.
|
145
|
+
#
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(UserUsageSummaryResponse, Fixnum, Hash)>] UserUsageSummaryResponse data, response status code and response headers
|
148
|
+
def usage_get_user_usage_current_period_summary_with_http_info(opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "Calling API: UsageApi.usage_get_user_usage_current_period_summary ..."
|
151
|
+
end
|
152
|
+
# resource path
|
153
|
+
local_var_path = "/usage/summary"
|
154
|
+
|
155
|
+
# query parameters
|
156
|
+
query_params = {}
|
157
|
+
|
158
|
+
# header parameters
|
159
|
+
header_params = {}
|
160
|
+
# HTTP header 'Accept' (if needed)
|
161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
162
|
+
# HTTP header 'Content-Type'
|
163
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
164
|
+
|
165
|
+
# form parameters
|
166
|
+
form_params = {}
|
167
|
+
|
168
|
+
# http body (model)
|
169
|
+
post_body = nil
|
170
|
+
auth_names = []
|
171
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
172
|
+
:header_params => header_params,
|
173
|
+
:query_params => query_params,
|
174
|
+
:form_params => form_params,
|
175
|
+
:body => post_body,
|
176
|
+
:auth_names => auth_names,
|
177
|
+
:return_type => 'UserUsageSummaryResponse')
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug "API called: UsageApi#usage_get_user_usage_current_period_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
180
|
+
end
|
181
|
+
return data, status_code, headers
|
182
|
+
end
|
183
|
+
|
184
|
+
# Get usage logs for previous subscription period.
|
185
|
+
#
|
186
|
+
# @param [Hash] opts the optional parameters
|
187
|
+
# @return [File]
|
188
|
+
def usage_get_user_usage_previous_month(opts = {})
|
189
|
+
data, _status_code, _headers = usage_get_user_usage_previous_month_with_http_info(opts)
|
190
|
+
return data
|
191
|
+
end
|
192
|
+
|
193
|
+
# Get usage logs for previous subscription period.
|
194
|
+
#
|
195
|
+
# @param [Hash] opts the optional parameters
|
196
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
197
|
+
def usage_get_user_usage_previous_month_with_http_info(opts = {})
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug "Calling API: UsageApi.usage_get_user_usage_previous_month ..."
|
200
|
+
end
|
201
|
+
# resource path
|
202
|
+
local_var_path = "/usage/previousPeriod"
|
203
|
+
|
204
|
+
# query parameters
|
205
|
+
query_params = {}
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
211
|
+
# HTTP header 'Content-Type'
|
212
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
213
|
+
|
214
|
+
# form parameters
|
215
|
+
form_params = {}
|
216
|
+
|
217
|
+
# http body (model)
|
218
|
+
post_body = nil
|
219
|
+
auth_names = []
|
220
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => 'File')
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug "API called: UsageApi#usage_get_user_usage_previous_month\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
|
+
end
|
230
|
+
return data, status_code, headers
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|