artikcloud 2.1.1 → 2.2.2
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 +4 -4
- data/README.md +44 -3
- data/artikcloud.gemspec +3 -4
- data/docs/ActionOut.md +6 -0
- data/docs/CertificateData.md +9 -0
- data/docs/CertificateEnvelope.md +8 -0
- data/docs/CertificateFields.md +13 -0
- data/docs/CertificateId.md +8 -0
- data/docs/ContactInfo.md +9 -0
- data/docs/DevicePricingTier.md +16 -0
- data/docs/DevicePricingTierEnvelope.md +8 -0
- data/docs/DevicePricingTierRequest.md +8 -0
- data/docs/DevicePricingTiers.md +8 -0
- data/docs/DevicePricingTiersEnvelope.md +8 -0
- data/docs/DeviceShareInfo.md +1 -1
- data/docs/DeviceTypePricingList.md +8 -0
- data/docs/DeviceTypePricingTier.md +17 -0
- data/docs/DeviceTypePricingTiersEnvelope.md +8 -0
- data/docs/DeviceTypeUpdateInput.md +8 -0
- data/docs/DevicesSharesApi.md +235 -0
- data/docs/DevicesStatusApi.md +183 -0
- data/docs/MessageOut.md +6 -0
- data/docs/MonetizationApi.md +289 -0
- data/docs/OutputRule.md +1 -0
- data/docs/RejectedCSVRow.md +8 -0
- data/docs/RejectedCSVRowsEnvelope.md +11 -0
- data/docs/Tier.md +17 -0
- data/docs/UpgradePath.md +8 -0
- data/docs/UpgradePathEnvelope.md +8 -0
- data/docs/UpgradePathUserToken.md +10 -0
- data/docs/UpgradePathUserTokenEnvelope.md +8 -0
- data/docs/UploadIdEnvelope.md +8 -0
- data/docs/UploadStatusEnvelope.md +8 -0
- data/docs/UsersApi.md +6 -2
- data/docs/ValidityPeriod.md +9 -0
- data/docs/Whitelist.md +10 -0
- data/docs/WhitelistEnvelope.md +8 -0
- data/docs/WhitelistResultEnvelope.md +12 -0
- data/docs/WhitelistingApi.md +515 -0
- data/lib/artikcloud/api/monetization_api.rb +296 -0
- data/lib/artikcloud/api/users_api.rb +3 -0
- data/lib/artikcloud/api/whitelisting_api.rb +519 -0
- data/lib/artikcloud/models/action_out.rb +62 -1
- data/lib/artikcloud/models/certificate_data.rb +197 -0
- data/lib/artikcloud/models/certificate_envelope.rb +188 -0
- data/lib/artikcloud/models/certificate_fields.rb +237 -0
- data/lib/artikcloud/models/certificate_id.rb +188 -0
- data/lib/artikcloud/models/contact_info.rb +198 -0
- data/lib/artikcloud/models/device_pricing_tier.rb +268 -0
- data/lib/artikcloud/models/device_pricing_tier_envelope.rb +188 -0
- data/lib/artikcloud/models/device_pricing_tier_request.rb +188 -0
- data/lib/artikcloud/models/device_pricing_tiers.rb +190 -0
- data/lib/artikcloud/models/device_pricing_tiers_envelope.rb +188 -0
- data/lib/artikcloud/models/device_share_info.rb +7 -7
- data/lib/artikcloud/models/device_type_pricing_list.rb +190 -0
- data/lib/artikcloud/models/device_type_pricing_tier.rb +280 -0
- data/lib/artikcloud/models/device_type_pricing_tiers_envelope.rb +188 -0
- data/lib/artikcloud/models/device_type_update_input.rb +188 -0
- data/lib/artikcloud/models/message_out.rb +65 -1
- data/lib/artikcloud/models/output_rule.rb +46 -4
- data/lib/artikcloud/models/rejected_csv_row.rb +188 -0
- data/lib/artikcloud/models/rejected_csv_rows_envelope.rb +220 -0
- data/lib/artikcloud/models/tier.rb +278 -0
- data/lib/artikcloud/models/upgrade_path.rb +188 -0
- data/lib/artikcloud/models/upgrade_path_envelope.rb +188 -0
- data/lib/artikcloud/models/upgrade_path_user_token.rb +208 -0
- data/lib/artikcloud/models/upgrade_path_user_token_envelope.rb +187 -0
- data/lib/artikcloud/models/upload_id_envelope.rb +188 -0
- data/lib/artikcloud/models/upload_status_envelope.rb +188 -0
- data/lib/artikcloud/models/validity_period.rb +198 -0
- data/lib/artikcloud/models/whitelist.rb +208 -0
- data/lib/artikcloud/models/whitelist_envelope.rb +190 -0
- data/lib/artikcloud/models/whitelist_result_envelope.rb +230 -0
- data/lib/artikcloud/version.rb +1 -2
- data/lib/artikcloud.rb +33 -3
- data/pom.xml +1 -1
- data/spec/api/device_types_api_spec.rb +3 -15
- data/spec/api/devices_api_spec.rb +6 -22
- data/spec/api/devices_management_api_spec.rb +1 -13
- data/spec/api/export_api_spec.rb +2 -14
- data/spec/api/messages_api_spec.rb +115 -74
- data/spec/api/monetization_api_spec.rb +99 -0
- data/spec/api/registrations_api_spec.rb +1 -13
- data/spec/api/rules_api_spec.rb +3 -15
- data/spec/api/tags_api_spec.rb +0 -12
- data/spec/api/tokens_api_spec.rb +24 -14
- data/spec/api/users_api_spec.rb +119 -57
- data/spec/api/whitelisting_api_spec.rb +152 -0
- data/spec/factories/users.rb +12 -12
- data/spec/models/action_out_spec.rb +36 -0
- data/spec/models/certificate_data_spec.rb +47 -0
- data/spec/models/certificate_envelope_spec.rb +41 -0
- data/spec/models/certificate_fields_spec.rb +71 -0
- data/spec/models/certificate_id_spec.rb +41 -0
- data/spec/models/contact_info_spec.rb +47 -0
- data/spec/models/device_pricing_tier_envelope_spec.rb +41 -0
- data/spec/models/device_pricing_tier_request_spec.rb +41 -0
- data/spec/models/device_pricing_tier_spec.rb +89 -0
- data/spec/models/device_pricing_tiers_envelope_spec.rb +41 -0
- data/spec/models/device_pricing_tiers_spec.rb +41 -0
- data/spec/models/device_share_info_spec.rb +1 -1
- data/spec/models/device_type_pricing_list_spec.rb +41 -0
- data/spec/models/device_type_pricing_tier_spec.rb +95 -0
- data/spec/models/device_type_pricing_tiers_envelope_spec.rb +41 -0
- data/spec/models/device_type_update_input_spec.rb +41 -0
- data/spec/models/message_out_spec.rb +36 -0
- data/spec/models/output_rule_spec.rb +10 -0
- data/spec/models/rejected_csv_row_spec.rb +41 -0
- data/spec/models/rejected_csv_rows_envelope_spec.rb +59 -0
- data/spec/models/tier_spec.rb +95 -0
- data/spec/models/upgrade_path_envelope_spec.rb +41 -0
- data/spec/models/upgrade_path_spec.rb +41 -0
- data/spec/models/upgrade_path_user_token_envelope_spec.rb +41 -0
- data/spec/models/upgrade_path_user_token_spec.rb +53 -0
- data/spec/models/upload_id_envelope_spec.rb +41 -0
- data/spec/models/upload_status_envelope_spec.rb +41 -0
- data/spec/models/validity_period_spec.rb +47 -0
- data/spec/models/whitelist_envelope_spec.rb +41 -0
- data/spec/models/whitelist_result_envelope_spec.rb +65 -0
- data/spec/models/whitelist_spec.rb +53 -0
- metadata +121 -11
- data/docs/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/artikcloud/.DS_Store +0 -0
- data/lib/artikcloud/api/.DS_Store +0 -0
- data/lib/artikcloud/models/.DS_Store +0 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/.DS_Store +0 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ARTIK Cloud API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
module ArtikCloud
|
|
15
|
+
class WhitelistingApi
|
|
16
|
+
attr_accessor :api_client
|
|
17
|
+
|
|
18
|
+
def initialize(api_client = ApiClient.default)
|
|
19
|
+
@api_client = api_client
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Delete a vdid from the devicetype whitelist.
|
|
23
|
+
# Delete a vdid from the devicetype whitelist.
|
|
24
|
+
# @param dtid Device Type ID.
|
|
25
|
+
# @param vdid Vendor Device ID.
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [WhitelistEnvelope]
|
|
28
|
+
def delete_vdid(dtid, vdid, opts = {})
|
|
29
|
+
data, _status_code, _headers = delete_vdid_with_http_info(dtid, vdid, opts)
|
|
30
|
+
return data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Delete a vdid from the devicetype whitelist.
|
|
34
|
+
# Delete a vdid from the devicetype whitelist.
|
|
35
|
+
# @param dtid Device Type ID.
|
|
36
|
+
# @param vdid Vendor Device ID.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(WhitelistEnvelope, Fixnum, Hash)>] WhitelistEnvelope data, response status code and response headers
|
|
39
|
+
def delete_vdid_with_http_info(dtid, vdid, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.delete_vdid ..."
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'dtid' is set
|
|
44
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.delete_vdid" if dtid.nil?
|
|
45
|
+
# verify the required parameter 'vdid' is set
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'vdid' when calling WhitelistingApi.delete_vdid" if vdid.nil?
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/{vdid}".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'vdid' + '}', vdid.to_s)
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = nil
|
|
63
|
+
auth_names = ['artikcloud_oauth']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => 'WhitelistEnvelope')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#delete_vdid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Delete a whitelist certificate associated with a devicetype.
|
|
78
|
+
# Delete a whitelist certificate associated with a devicetype.
|
|
79
|
+
# @param dtid Device Type ID.
|
|
80
|
+
# @param cid Certificate ID.
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [WhitelistEnvelope]
|
|
83
|
+
def delete_whitelist_certificate(dtid, cid, opts = {})
|
|
84
|
+
data, _status_code, _headers = delete_whitelist_certificate_with_http_info(dtid, cid, opts)
|
|
85
|
+
return data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Delete a whitelist certificate associated with a devicetype.
|
|
89
|
+
# Delete a whitelist certificate associated with a devicetype.
|
|
90
|
+
# @param dtid Device Type ID.
|
|
91
|
+
# @param cid Certificate ID.
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @return [Array<(WhitelistEnvelope, Fixnum, Hash)>] WhitelistEnvelope data, response status code and response headers
|
|
94
|
+
def delete_whitelist_certificate_with_http_info(dtid, cid, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.delete_whitelist_certificate ..."
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'dtid' is set
|
|
99
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.delete_whitelist_certificate" if dtid.nil?
|
|
100
|
+
# verify the required parameter 'cid' is set
|
|
101
|
+
fail ArgumentError, "Missing the required parameter 'cid' when calling WhitelistingApi.delete_whitelist_certificate" if cid.nil?
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/certificates/{cid}".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'cid' + '}', cid.to_s)
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = nil
|
|
118
|
+
auth_names = ['artikcloud_oauth']
|
|
119
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
120
|
+
:header_params => header_params,
|
|
121
|
+
:query_params => query_params,
|
|
122
|
+
:form_params => form_params,
|
|
123
|
+
:body => post_body,
|
|
124
|
+
:auth_names => auth_names,
|
|
125
|
+
:return_type => 'WhitelistEnvelope')
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#delete_whitelist_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Enable or disble whitelist feature of a device type
|
|
133
|
+
# Enable or disble whitelist feature of a device type
|
|
134
|
+
# @param dtid Device Type ID.
|
|
135
|
+
# @param device_type_update_info Device type update input.
|
|
136
|
+
# @param [Hash] opts the optional parameters
|
|
137
|
+
# @return [WhitelistEnvelope]
|
|
138
|
+
def enable_whitelist(dtid, device_type_update_info, opts = {})
|
|
139
|
+
data, _status_code, _headers = enable_whitelist_with_http_info(dtid, device_type_update_info, opts)
|
|
140
|
+
return data
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Enable or disble whitelist feature of a device type
|
|
144
|
+
# Enable or disble whitelist feature of a device type
|
|
145
|
+
# @param dtid Device Type ID.
|
|
146
|
+
# @param device_type_update_info Device type update input.
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @return [Array<(WhitelistEnvelope, Fixnum, Hash)>] WhitelistEnvelope data, response status code and response headers
|
|
149
|
+
def enable_whitelist_with_http_info(dtid, device_type_update_info, opts = {})
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.enable_whitelist ..."
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'dtid' is set
|
|
154
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.enable_whitelist" if dtid.nil?
|
|
155
|
+
# verify the required parameter 'device_type_update_info' is set
|
|
156
|
+
fail ArgumentError, "Missing the required parameter 'device_type_update_info' when calling WhitelistingApi.enable_whitelist" if device_type_update_info.nil?
|
|
157
|
+
# resource path
|
|
158
|
+
local_var_path = "/devicetypes/:dtid/whitelist/enable".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s)
|
|
159
|
+
|
|
160
|
+
# query parameters
|
|
161
|
+
query_params = {}
|
|
162
|
+
|
|
163
|
+
# header parameters
|
|
164
|
+
header_params = {}
|
|
165
|
+
# HTTP header 'Accept' (if needed)
|
|
166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
167
|
+
# HTTP header 'Content-Type'
|
|
168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = @api_client.object_to_http_body(device_type_update_info)
|
|
175
|
+
auth_names = ['artikcloud_oauth']
|
|
176
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
177
|
+
:header_params => header_params,
|
|
178
|
+
:query_params => query_params,
|
|
179
|
+
:form_params => form_params,
|
|
180
|
+
:body => post_body,
|
|
181
|
+
:auth_names => auth_names,
|
|
182
|
+
:return_type => 'WhitelistEnvelope')
|
|
183
|
+
if @api_client.config.debugging
|
|
184
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#enable_whitelist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
185
|
+
end
|
|
186
|
+
return data, status_code, headers
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Get the list of rejected rows for an uploaded CSV file.
|
|
190
|
+
# Get the list of rejected rows for an uploaded CSV file.
|
|
191
|
+
# @param dtid Device type id related to the uploaded CSV file.
|
|
192
|
+
# @param upload_id Upload id related to the uploaded CSV file.
|
|
193
|
+
# @param [Hash] opts the optional parameters
|
|
194
|
+
# @option opts [Integer] :count Max results count.
|
|
195
|
+
# @option opts [Integer] :offset Result starting offset.
|
|
196
|
+
# @return [RejectedCSVRowsEnvelope]
|
|
197
|
+
def get_rejected_row_list(dtid, upload_id, opts = {})
|
|
198
|
+
data, _status_code, _headers = get_rejected_row_list_with_http_info(dtid, upload_id, opts)
|
|
199
|
+
return data
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Get the list of rejected rows for an uploaded CSV file.
|
|
203
|
+
# Get the list of rejected rows for an uploaded CSV file.
|
|
204
|
+
# @param dtid Device type id related to the uploaded CSV file.
|
|
205
|
+
# @param upload_id Upload id related to the uploaded CSV file.
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @option opts [Integer] :count Max results count.
|
|
208
|
+
# @option opts [Integer] :offset Result starting offset.
|
|
209
|
+
# @return [Array<(RejectedCSVRowsEnvelope, Fixnum, Hash)>] RejectedCSVRowsEnvelope data, response status code and response headers
|
|
210
|
+
def get_rejected_row_list_with_http_info(dtid, upload_id, opts = {})
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.get_rejected_row_list ..."
|
|
213
|
+
end
|
|
214
|
+
# verify the required parameter 'dtid' is set
|
|
215
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.get_rejected_row_list" if dtid.nil?
|
|
216
|
+
# verify the required parameter 'upload_id' is set
|
|
217
|
+
fail ArgumentError, "Missing the required parameter 'upload_id' when calling WhitelistingApi.get_rejected_row_list" if upload_id.nil?
|
|
218
|
+
# resource path
|
|
219
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/{uploadId}/rejectedRows".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'uploadId' + '}', upload_id.to_s)
|
|
220
|
+
|
|
221
|
+
# query parameters
|
|
222
|
+
query_params = {}
|
|
223
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
224
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
225
|
+
|
|
226
|
+
# header parameters
|
|
227
|
+
header_params = {}
|
|
228
|
+
# HTTP header 'Accept' (if needed)
|
|
229
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
230
|
+
|
|
231
|
+
# form parameters
|
|
232
|
+
form_params = {}
|
|
233
|
+
|
|
234
|
+
# http body (model)
|
|
235
|
+
post_body = nil
|
|
236
|
+
auth_names = ['artikcloud_oauth']
|
|
237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
238
|
+
:header_params => header_params,
|
|
239
|
+
:query_params => query_params,
|
|
240
|
+
:form_params => form_params,
|
|
241
|
+
:body => post_body,
|
|
242
|
+
:auth_names => auth_names,
|
|
243
|
+
:return_type => 'RejectedCSVRowsEnvelope')
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#get_rejected_row_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
246
|
+
end
|
|
247
|
+
return data, status_code, headers
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Get the status of a uploaded CSV file.
|
|
251
|
+
# Get the status of a uploaded CSV file.
|
|
252
|
+
# @param dtid Device type id related to the uploaded CSV file.
|
|
253
|
+
# @param upload_id Upload id related to the uploaded CSV file.
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @return [UploadStatusEnvelope]
|
|
256
|
+
def get_upload_status(dtid, upload_id, opts = {})
|
|
257
|
+
data, _status_code, _headers = get_upload_status_with_http_info(dtid, upload_id, opts)
|
|
258
|
+
return data
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Get the status of a uploaded CSV file.
|
|
262
|
+
# Get the status of a uploaded CSV file.
|
|
263
|
+
# @param dtid Device type id related to the uploaded CSV file.
|
|
264
|
+
# @param upload_id Upload id related to the uploaded CSV file.
|
|
265
|
+
# @param [Hash] opts the optional parameters
|
|
266
|
+
# @return [Array<(UploadStatusEnvelope, Fixnum, Hash)>] UploadStatusEnvelope data, response status code and response headers
|
|
267
|
+
def get_upload_status_with_http_info(dtid, upload_id, opts = {})
|
|
268
|
+
if @api_client.config.debugging
|
|
269
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.get_upload_status ..."
|
|
270
|
+
end
|
|
271
|
+
# verify the required parameter 'dtid' is set
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.get_upload_status" if dtid.nil?
|
|
273
|
+
# verify the required parameter 'upload_id' is set
|
|
274
|
+
fail ArgumentError, "Missing the required parameter 'upload_id' when calling WhitelistingApi.get_upload_status" if upload_id.nil?
|
|
275
|
+
# resource path
|
|
276
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/{uploadId}/status".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'uploadId' + '}', upload_id.to_s)
|
|
277
|
+
|
|
278
|
+
# query parameters
|
|
279
|
+
query_params = {}
|
|
280
|
+
|
|
281
|
+
# header parameters
|
|
282
|
+
header_params = {}
|
|
283
|
+
# HTTP header 'Accept' (if needed)
|
|
284
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
285
|
+
|
|
286
|
+
# form parameters
|
|
287
|
+
form_params = {}
|
|
288
|
+
|
|
289
|
+
# http body (model)
|
|
290
|
+
post_body = nil
|
|
291
|
+
auth_names = ['artikcloud_oauth']
|
|
292
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
293
|
+
:header_params => header_params,
|
|
294
|
+
:query_params => query_params,
|
|
295
|
+
:form_params => form_params,
|
|
296
|
+
:body => post_body,
|
|
297
|
+
:auth_names => auth_names,
|
|
298
|
+
:return_type => 'UploadStatusEnvelope')
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#get_upload_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
301
|
+
end
|
|
302
|
+
return data, status_code, headers
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Get whitelisted vdids of a device type.
|
|
306
|
+
# Get whitelisted vdids of a device type.
|
|
307
|
+
# @param dtid Device Type ID.
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @option opts [Integer] :count Max results count.
|
|
310
|
+
# @option opts [Integer] :offset Result starting offset.
|
|
311
|
+
# @return [WhitelistResultEnvelope]
|
|
312
|
+
def get_whitelist(dtid, opts = {})
|
|
313
|
+
data, _status_code, _headers = get_whitelist_with_http_info(dtid, opts)
|
|
314
|
+
return data
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Get whitelisted vdids of a device type.
|
|
318
|
+
# Get whitelisted vdids of a device type.
|
|
319
|
+
# @param dtid Device Type ID.
|
|
320
|
+
# @param [Hash] opts the optional parameters
|
|
321
|
+
# @option opts [Integer] :count Max results count.
|
|
322
|
+
# @option opts [Integer] :offset Result starting offset.
|
|
323
|
+
# @return [Array<(WhitelistResultEnvelope, Fixnum, Hash)>] WhitelistResultEnvelope data, response status code and response headers
|
|
324
|
+
def get_whitelist_with_http_info(dtid, opts = {})
|
|
325
|
+
if @api_client.config.debugging
|
|
326
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.get_whitelist ..."
|
|
327
|
+
end
|
|
328
|
+
# verify the required parameter 'dtid' is set
|
|
329
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.get_whitelist" if dtid.nil?
|
|
330
|
+
# resource path
|
|
331
|
+
local_var_path = "/devicetypes/{dtid}/whitelist".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s)
|
|
332
|
+
|
|
333
|
+
# query parameters
|
|
334
|
+
query_params = {}
|
|
335
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
336
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
337
|
+
|
|
338
|
+
# header parameters
|
|
339
|
+
header_params = {}
|
|
340
|
+
# HTTP header 'Accept' (if needed)
|
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
342
|
+
|
|
343
|
+
# form parameters
|
|
344
|
+
form_params = {}
|
|
345
|
+
|
|
346
|
+
# http body (model)
|
|
347
|
+
post_body = nil
|
|
348
|
+
auth_names = ['artikcloud_oauth']
|
|
349
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
350
|
+
:header_params => header_params,
|
|
351
|
+
:query_params => query_params,
|
|
352
|
+
:form_params => form_params,
|
|
353
|
+
:body => post_body,
|
|
354
|
+
:auth_names => auth_names,
|
|
355
|
+
:return_type => 'WhitelistResultEnvelope')
|
|
356
|
+
if @api_client.config.debugging
|
|
357
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#get_whitelist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
358
|
+
end
|
|
359
|
+
return data, status_code, headers
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Get whitelist certificate of device type.
|
|
363
|
+
# Get whitelist certificate of device type.
|
|
364
|
+
# @param dtid Device Type ID.
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @return [CertificateEnvelope]
|
|
367
|
+
def get_whitelist_certificate(dtid, opts = {})
|
|
368
|
+
data, _status_code, _headers = get_whitelist_certificate_with_http_info(dtid, opts)
|
|
369
|
+
return data
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Get whitelist certificate of device type.
|
|
373
|
+
# Get whitelist certificate of device type.
|
|
374
|
+
# @param dtid Device Type ID.
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [Array<(CertificateEnvelope, Fixnum, Hash)>] CertificateEnvelope data, response status code and response headers
|
|
377
|
+
def get_whitelist_certificate_with_http_info(dtid, opts = {})
|
|
378
|
+
if @api_client.config.debugging
|
|
379
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.get_whitelist_certificate ..."
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'dtid' is set
|
|
382
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.get_whitelist_certificate" if dtid.nil?
|
|
383
|
+
# resource path
|
|
384
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/certificates".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s)
|
|
385
|
+
|
|
386
|
+
# query parameters
|
|
387
|
+
query_params = {}
|
|
388
|
+
|
|
389
|
+
# header parameters
|
|
390
|
+
header_params = {}
|
|
391
|
+
# HTTP header 'Accept' (if needed)
|
|
392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
393
|
+
|
|
394
|
+
# form parameters
|
|
395
|
+
form_params = {}
|
|
396
|
+
|
|
397
|
+
# http body (model)
|
|
398
|
+
post_body = nil
|
|
399
|
+
auth_names = ['artikcloud_oauth']
|
|
400
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
401
|
+
:header_params => header_params,
|
|
402
|
+
:query_params => query_params,
|
|
403
|
+
:form_params => form_params,
|
|
404
|
+
:body => post_body,
|
|
405
|
+
:auth_names => auth_names,
|
|
406
|
+
:return_type => 'CertificateEnvelope')
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#get_whitelist_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
409
|
+
end
|
|
410
|
+
return data, status_code, headers
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Get the status of whitelist feature (enabled/disabled) of a device type.
|
|
414
|
+
# Get the status of whitelist feature (enabled/disabled) of a device type.
|
|
415
|
+
# @param dtid Device Type ID.
|
|
416
|
+
# @param [Hash] opts the optional parameters
|
|
417
|
+
# @return [WhitelistEnvelope]
|
|
418
|
+
def get_whitelist_status(dtid, opts = {})
|
|
419
|
+
data, _status_code, _headers = get_whitelist_status_with_http_info(dtid, opts)
|
|
420
|
+
return data
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Get the status of whitelist feature (enabled/disabled) of a device type.
|
|
424
|
+
# Get the status of whitelist feature (enabled/disabled) of a device type.
|
|
425
|
+
# @param dtid Device Type ID.
|
|
426
|
+
# @param [Hash] opts the optional parameters
|
|
427
|
+
# @return [Array<(WhitelistEnvelope, Fixnum, Hash)>] WhitelistEnvelope data, response status code and response headers
|
|
428
|
+
def get_whitelist_status_with_http_info(dtid, opts = {})
|
|
429
|
+
if @api_client.config.debugging
|
|
430
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.get_whitelist_status ..."
|
|
431
|
+
end
|
|
432
|
+
# verify the required parameter 'dtid' is set
|
|
433
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.get_whitelist_status" if dtid.nil?
|
|
434
|
+
# resource path
|
|
435
|
+
local_var_path = "/devicetypes/{dtid}/whitelist/status".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s)
|
|
436
|
+
|
|
437
|
+
# query parameters
|
|
438
|
+
query_params = {}
|
|
439
|
+
|
|
440
|
+
# header parameters
|
|
441
|
+
header_params = {}
|
|
442
|
+
# HTTP header 'Accept' (if needed)
|
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
444
|
+
|
|
445
|
+
# form parameters
|
|
446
|
+
form_params = {}
|
|
447
|
+
|
|
448
|
+
# http body (model)
|
|
449
|
+
post_body = nil
|
|
450
|
+
auth_names = ['artikcloud_oauth']
|
|
451
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
452
|
+
:header_params => header_params,
|
|
453
|
+
:query_params => query_params,
|
|
454
|
+
:form_params => form_params,
|
|
455
|
+
:body => post_body,
|
|
456
|
+
:auth_names => auth_names,
|
|
457
|
+
:return_type => 'WhitelistEnvelope')
|
|
458
|
+
if @api_client.config.debugging
|
|
459
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#get_whitelist_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
460
|
+
end
|
|
461
|
+
return data, status_code, headers
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# Upload a CSV file related to the Device Type.
|
|
465
|
+
# Upload a CSV file related to the Device Type.
|
|
466
|
+
# @param dtid Device Type ID.
|
|
467
|
+
# @param file Device Type ID.
|
|
468
|
+
# @param [Hash] opts the optional parameters
|
|
469
|
+
# @return [UploadIdEnvelope]
|
|
470
|
+
def upload_csv(dtid, file, opts = {})
|
|
471
|
+
data, _status_code, _headers = upload_csv_with_http_info(dtid, file, opts)
|
|
472
|
+
return data
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# Upload a CSV file related to the Device Type.
|
|
476
|
+
# Upload a CSV file related to the Device Type.
|
|
477
|
+
# @param dtid Device Type ID.
|
|
478
|
+
# @param file Device Type ID.
|
|
479
|
+
# @param [Hash] opts the optional parameters
|
|
480
|
+
# @return [Array<(UploadIdEnvelope, Fixnum, Hash)>] UploadIdEnvelope data, response status code and response headers
|
|
481
|
+
def upload_csv_with_http_info(dtid, file, opts = {})
|
|
482
|
+
if @api_client.config.debugging
|
|
483
|
+
@api_client.config.logger.debug "Calling API: WhitelistingApi.upload_csv ..."
|
|
484
|
+
end
|
|
485
|
+
# verify the required parameter 'dtid' is set
|
|
486
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling WhitelistingApi.upload_csv" if dtid.nil?
|
|
487
|
+
# verify the required parameter 'file' is set
|
|
488
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling WhitelistingApi.upload_csv" if file.nil?
|
|
489
|
+
# resource path
|
|
490
|
+
local_var_path = "/devicetypes/{dtid}/whitelist".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s)
|
|
491
|
+
|
|
492
|
+
# query parameters
|
|
493
|
+
query_params = {}
|
|
494
|
+
|
|
495
|
+
# header parameters
|
|
496
|
+
header_params = {}
|
|
497
|
+
# HTTP header 'Accept' (if needed)
|
|
498
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
499
|
+
|
|
500
|
+
# form parameters
|
|
501
|
+
form_params = {}
|
|
502
|
+
|
|
503
|
+
# http body (model)
|
|
504
|
+
post_body = @api_client.object_to_http_body(file)
|
|
505
|
+
auth_names = ['artikcloud_oauth']
|
|
506
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
507
|
+
:header_params => header_params,
|
|
508
|
+
:query_params => query_params,
|
|
509
|
+
:form_params => form_params,
|
|
510
|
+
:body => post_body,
|
|
511
|
+
:auth_names => auth_names,
|
|
512
|
+
:return_type => 'UploadIdEnvelope')
|
|
513
|
+
if @api_client.config.debugging
|
|
514
|
+
@api_client.config.logger.debug "API called: WhitelistingApi#upload_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
515
|
+
end
|
|
516
|
+
return data, status_code, headers
|
|
517
|
+
end
|
|
518
|
+
end
|
|
519
|
+
end
|
|
@@ -14,6 +14,23 @@ require 'date'
|
|
|
14
14
|
module ArtikCloud
|
|
15
15
|
# Action received in a WebSocket.
|
|
16
16
|
class ActionOut
|
|
17
|
+
attr_accessor :data
|
|
18
|
+
|
|
19
|
+
# Confirmation ID.
|
|
20
|
+
attr_accessor :cid
|
|
21
|
+
|
|
22
|
+
# Destination Device ID.
|
|
23
|
+
attr_accessor :ddid
|
|
24
|
+
|
|
25
|
+
# Source Device ID.
|
|
26
|
+
attr_accessor :sdid
|
|
27
|
+
|
|
28
|
+
# Timestamp (past, present or future). Defaults to current time if not provided.
|
|
29
|
+
attr_accessor :ts
|
|
30
|
+
|
|
31
|
+
# Type.
|
|
32
|
+
attr_accessor :type
|
|
33
|
+
|
|
17
34
|
# Message ID.
|
|
18
35
|
attr_accessor :mid
|
|
19
36
|
|
|
@@ -33,6 +50,12 @@ module ArtikCloud
|
|
|
33
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
51
|
def self.attribute_map
|
|
35
52
|
{
|
|
53
|
+
:'data' => :'data',
|
|
54
|
+
:'cid' => :'cid',
|
|
55
|
+
:'ddid' => :'ddid',
|
|
56
|
+
:'sdid' => :'sdid',
|
|
57
|
+
:'ts' => :'ts',
|
|
58
|
+
:'type' => :'type',
|
|
36
59
|
:'mid' => :'mid',
|
|
37
60
|
:'uid' => :'uid',
|
|
38
61
|
:'sdtid' => :'sdtid',
|
|
@@ -44,6 +67,12 @@ module ArtikCloud
|
|
|
44
67
|
# Attribute type mapping.
|
|
45
68
|
def self.swagger_types
|
|
46
69
|
{
|
|
70
|
+
:'data' => :'ActionDetailsArray',
|
|
71
|
+
:'cid' => :'String',
|
|
72
|
+
:'ddid' => :'String',
|
|
73
|
+
:'sdid' => :'String',
|
|
74
|
+
:'ts' => :'Integer',
|
|
75
|
+
:'type' => :'String',
|
|
47
76
|
:'mid' => :'String',
|
|
48
77
|
:'uid' => :'String',
|
|
49
78
|
:'sdtid' => :'String',
|
|
@@ -60,6 +89,32 @@ module ArtikCloud
|
|
|
60
89
|
# convert string to symbol for hash key
|
|
61
90
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
62
91
|
|
|
92
|
+
if attributes.has_key?(:'data')
|
|
93
|
+
self.data = attributes[:'data']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.has_key?(:'cid')
|
|
97
|
+
self.cid = attributes[:'cid']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.has_key?(:'ddid')
|
|
101
|
+
self.ddid = attributes[:'ddid']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.has_key?(:'sdid')
|
|
105
|
+
self.sdid = attributes[:'sdid']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.has_key?(:'ts')
|
|
109
|
+
self.ts = attributes[:'ts']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.has_key?(:'type')
|
|
113
|
+
self.type = attributes[:'type']
|
|
114
|
+
else
|
|
115
|
+
self.type = "action"
|
|
116
|
+
end
|
|
117
|
+
|
|
63
118
|
if attributes.has_key?(:'mid')
|
|
64
119
|
self.mid = attributes[:'mid']
|
|
65
120
|
end
|
|
@@ -100,6 +155,12 @@ module ArtikCloud
|
|
|
100
155
|
def ==(o)
|
|
101
156
|
return true if self.equal?(o)
|
|
102
157
|
self.class == o.class &&
|
|
158
|
+
data == o.data &&
|
|
159
|
+
cid == o.cid &&
|
|
160
|
+
ddid == o.ddid &&
|
|
161
|
+
sdid == o.sdid &&
|
|
162
|
+
ts == o.ts &&
|
|
163
|
+
type == o.type &&
|
|
103
164
|
mid == o.mid &&
|
|
104
165
|
uid == o.uid &&
|
|
105
166
|
sdtid == o.sdtid &&
|
|
@@ -116,7 +177,7 @@ module ArtikCloud
|
|
|
116
177
|
# Calculates hash code according to all attributes.
|
|
117
178
|
# @return [Fixnum] Hash code
|
|
118
179
|
def hash
|
|
119
|
-
[mid, uid, sdtid, cts, mv].hash
|
|
180
|
+
[data, cid, ddid, sdid, ts, type, mid, uid, sdtid, cts, mv].hash
|
|
120
181
|
end
|
|
121
182
|
|
|
122
183
|
# Builds the object from hash
|