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,296 @@
|
|
|
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 MonetizationApi
|
|
16
|
+
attr_accessor :api_client
|
|
17
|
+
|
|
18
|
+
def initialize(api_client = ApiClient.default)
|
|
19
|
+
@api_client = api_client
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Define devicetype's pricing tiers.
|
|
23
|
+
# Define devicetype's pricing tiers.
|
|
24
|
+
# @param dtid DeviceType ID
|
|
25
|
+
# @param pricing_tier_info Pricing tier info
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [DeviceTypePricingTier]
|
|
28
|
+
def create_pricing_tiers(dtid, pricing_tier_info, opts = {})
|
|
29
|
+
data, _status_code, _headers = create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts)
|
|
30
|
+
return data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Define devicetype's pricing tiers.
|
|
34
|
+
# Define devicetype's pricing tiers.
|
|
35
|
+
# @param dtid DeviceType ID
|
|
36
|
+
# @param pricing_tier_info Pricing tier info
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(DeviceTypePricingTier, Fixnum, Hash)>] DeviceTypePricingTier data, response status code and response headers
|
|
39
|
+
def create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug "Calling API: MonetizationApi.create_pricing_tiers ..."
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'dtid' is set
|
|
44
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling MonetizationApi.create_pricing_tiers" if dtid.nil?
|
|
45
|
+
# verify the required parameter 'pricing_tier_info' is set
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'pricing_tier_info' when calling MonetizationApi.create_pricing_tiers" if pricing_tier_info.nil?
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = "/pricing/devicetypes/{dtid}/pricingtiers".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.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 = @api_client.object_to_http_body(pricing_tier_info)
|
|
63
|
+
auth_names = ['artikcloud_oauth']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, 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 => 'DeviceTypePricingTier')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: MonetizationApi#create_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Get a device's pricing tiers
|
|
78
|
+
# Get a device's pricing tiers
|
|
79
|
+
# @param did Device ID
|
|
80
|
+
# @param [Hash] opts the optional parameters
|
|
81
|
+
# @option opts [BOOLEAN] :active Filter by active
|
|
82
|
+
# @return [DevicePricingTiersEnvelope]
|
|
83
|
+
def get_pricing_tiers(did, opts = {})
|
|
84
|
+
data, _status_code, _headers = get_pricing_tiers_with_http_info(did, opts)
|
|
85
|
+
return data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get a device's pricing tiers
|
|
89
|
+
# Get a device's pricing tiers
|
|
90
|
+
# @param did Device ID
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [BOOLEAN] :active Filter by active
|
|
93
|
+
# @return [Array<(DevicePricingTiersEnvelope, Fixnum, Hash)>] DevicePricingTiersEnvelope data, response status code and response headers
|
|
94
|
+
def get_pricing_tiers_with_http_info(did, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug "Calling API: MonetizationApi.get_pricing_tiers ..."
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'did' is set
|
|
99
|
+
fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.get_pricing_tiers" if did.nil?
|
|
100
|
+
# resource path
|
|
101
|
+
local_var_path = "/pricing/devices/{did}/pricingtiers".sub('{format}','json').sub('{' + 'did' + '}', did.to_s)
|
|
102
|
+
|
|
103
|
+
# query parameters
|
|
104
|
+
query_params = {}
|
|
105
|
+
query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = {}
|
|
109
|
+
# HTTP header 'Accept' (if needed)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
111
|
+
|
|
112
|
+
# form parameters
|
|
113
|
+
form_params = {}
|
|
114
|
+
|
|
115
|
+
# http body (model)
|
|
116
|
+
post_body = nil
|
|
117
|
+
auth_names = ['artikcloud_oauth']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => 'DevicePricingTiersEnvelope')
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: MonetizationApi#get_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Get devicetype's pricing tiers.
|
|
132
|
+
# Get devicetype's pricing tiers.
|
|
133
|
+
# @param dtid DeviceType ID
|
|
134
|
+
# @param version Version
|
|
135
|
+
# @param [Hash] opts the optional parameters
|
|
136
|
+
# @return [DeviceTypePricingTiersEnvelope]
|
|
137
|
+
def get_the__pricing_tiers(dtid, version, opts = {})
|
|
138
|
+
data, _status_code, _headers = get_the__pricing_tiers_with_http_info(dtid, version, opts)
|
|
139
|
+
return data
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Get devicetype's pricing tiers.
|
|
143
|
+
# Get devicetype's pricing tiers.
|
|
144
|
+
# @param dtid DeviceType ID
|
|
145
|
+
# @param version Version
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [Array<(DeviceTypePricingTiersEnvelope, Fixnum, Hash)>] DeviceTypePricingTiersEnvelope data, response status code and response headers
|
|
148
|
+
def get_the__pricing_tiers_with_http_info(dtid, version, opts = {})
|
|
149
|
+
if @api_client.config.debugging
|
|
150
|
+
@api_client.config.logger.debug "Calling API: MonetizationApi.get_the__pricing_tiers ..."
|
|
151
|
+
end
|
|
152
|
+
# verify the required parameter 'dtid' is set
|
|
153
|
+
fail ArgumentError, "Missing the required parameter 'dtid' when calling MonetizationApi.get_the__pricing_tiers" if dtid.nil?
|
|
154
|
+
# verify the required parameter 'version' is set
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling MonetizationApi.get_the__pricing_tiers" if version.nil?
|
|
156
|
+
# resource path
|
|
157
|
+
local_var_path = "/pricing/devicetypes/{dtid}/pricingtiers".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'version' + '}', version.to_s)
|
|
158
|
+
|
|
159
|
+
# query parameters
|
|
160
|
+
query_params = {}
|
|
161
|
+
|
|
162
|
+
# header parameters
|
|
163
|
+
header_params = {}
|
|
164
|
+
# HTTP header 'Accept' (if needed)
|
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
166
|
+
|
|
167
|
+
# form parameters
|
|
168
|
+
form_params = {}
|
|
169
|
+
|
|
170
|
+
# http body (model)
|
|
171
|
+
post_body = nil
|
|
172
|
+
auth_names = ['artikcloud_oauth']
|
|
173
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
174
|
+
:header_params => header_params,
|
|
175
|
+
:query_params => query_params,
|
|
176
|
+
:form_params => form_params,
|
|
177
|
+
:body => post_body,
|
|
178
|
+
:auth_names => auth_names,
|
|
179
|
+
:return_type => 'DeviceTypePricingTiersEnvelope')
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug "API called: MonetizationApi#get_the__pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
182
|
+
end
|
|
183
|
+
return data, status_code, headers
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Get upgrade path
|
|
187
|
+
# Get upgrade path
|
|
188
|
+
# @param did Device ID
|
|
189
|
+
# @param action Action to perform
|
|
190
|
+
# @param [Hash] opts the optional parameters
|
|
191
|
+
# @return [UpgradePathEnvelope]
|
|
192
|
+
def get_upgrade_path(did, action, opts = {})
|
|
193
|
+
data, _status_code, _headers = get_upgrade_path_with_http_info(did, action, opts)
|
|
194
|
+
return data
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Get upgrade path
|
|
198
|
+
# Get upgrade path
|
|
199
|
+
# @param did Device ID
|
|
200
|
+
# @param action Action to perform
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [Array<(UpgradePathEnvelope, Fixnum, Hash)>] UpgradePathEnvelope data, response status code and response headers
|
|
203
|
+
def get_upgrade_path_with_http_info(did, action, opts = {})
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug "Calling API: MonetizationApi.get_upgrade_path ..."
|
|
206
|
+
end
|
|
207
|
+
# verify the required parameter 'did' is set
|
|
208
|
+
fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.get_upgrade_path" if did.nil?
|
|
209
|
+
# verify the required parameter 'action' is set
|
|
210
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling MonetizationApi.get_upgrade_path" if action.nil?
|
|
211
|
+
# resource path
|
|
212
|
+
local_var_path = "/pricing/devices/{did}/revenueshare/upgradepath".sub('{format}','json').sub('{' + 'did' + '}', did.to_s).sub('{' + 'action' + '}', action.to_s)
|
|
213
|
+
|
|
214
|
+
# query parameters
|
|
215
|
+
query_params = {}
|
|
216
|
+
|
|
217
|
+
# header parameters
|
|
218
|
+
header_params = {}
|
|
219
|
+
# HTTP header 'Accept' (if needed)
|
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
221
|
+
|
|
222
|
+
# form parameters
|
|
223
|
+
form_params = {}
|
|
224
|
+
|
|
225
|
+
# http body (model)
|
|
226
|
+
post_body = nil
|
|
227
|
+
auth_names = ['artikcloud_oauth']
|
|
228
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => 'UpgradePathEnvelope')
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug "API called: MonetizationApi#get_upgrade_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
+
end
|
|
238
|
+
return data, status_code, headers
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Set a device's pricing tier
|
|
242
|
+
# Set a device's pricing tier
|
|
243
|
+
# @param did Device ID
|
|
244
|
+
# @param pricing_tier Pricing tier
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @return [DevicePricingTierEnvelope]
|
|
247
|
+
def set_pricing_tier(did, pricing_tier, opts = {})
|
|
248
|
+
data, _status_code, _headers = set_pricing_tier_with_http_info(did, pricing_tier, opts)
|
|
249
|
+
return data
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Set a device's pricing tier
|
|
253
|
+
# Set a device's pricing tier
|
|
254
|
+
# @param did Device ID
|
|
255
|
+
# @param pricing_tier Pricing tier
|
|
256
|
+
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @return [Array<(DevicePricingTierEnvelope, Fixnum, Hash)>] DevicePricingTierEnvelope data, response status code and response headers
|
|
258
|
+
def set_pricing_tier_with_http_info(did, pricing_tier, opts = {})
|
|
259
|
+
if @api_client.config.debugging
|
|
260
|
+
@api_client.config.logger.debug "Calling API: MonetizationApi.set_pricing_tier ..."
|
|
261
|
+
end
|
|
262
|
+
# verify the required parameter 'did' is set
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.set_pricing_tier" if did.nil?
|
|
264
|
+
# verify the required parameter 'pricing_tier' is set
|
|
265
|
+
fail ArgumentError, "Missing the required parameter 'pricing_tier' when calling MonetizationApi.set_pricing_tier" if pricing_tier.nil?
|
|
266
|
+
# resource path
|
|
267
|
+
local_var_path = "/pricing/devices/{did}/pricingtiers".sub('{format}','json').sub('{' + 'did' + '}', did.to_s)
|
|
268
|
+
|
|
269
|
+
# query parameters
|
|
270
|
+
query_params = {}
|
|
271
|
+
|
|
272
|
+
# header parameters
|
|
273
|
+
header_params = {}
|
|
274
|
+
# HTTP header 'Accept' (if needed)
|
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = @api_client.object_to_http_body(pricing_tier)
|
|
282
|
+
auth_names = ['artikcloud_oauth']
|
|
283
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
284
|
+
:header_params => header_params,
|
|
285
|
+
:query_params => query_params,
|
|
286
|
+
:form_params => form_params,
|
|
287
|
+
:body => post_body,
|
|
288
|
+
:auth_names => auth_names,
|
|
289
|
+
:return_type => 'DevicePricingTierEnvelope')
|
|
290
|
+
if @api_client.config.debugging
|
|
291
|
+
@api_client.config.logger.debug "API called: MonetizationApi#set_pricing_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
292
|
+
end
|
|
293
|
+
return data, status_code, headers
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
|
@@ -249,6 +249,7 @@ module ArtikCloud
|
|
|
249
249
|
# @option opts [BOOLEAN] :include_properties Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
250
250
|
# @option opts [String] :owner Return owned and/or shared devices. Default to ALL.
|
|
251
251
|
# @option opts [BOOLEAN] :include_share_info Include share info
|
|
252
|
+
# @option opts [String] :dtid Return only devices of this device type. If empty, assumes all device types allowed by the authorization.
|
|
252
253
|
# @return [DevicesEnvelope]
|
|
253
254
|
def get_user_devices(user_id, opts = {})
|
|
254
255
|
data, _status_code, _headers = get_user_devices_with_http_info(user_id, opts)
|
|
@@ -264,6 +265,7 @@ module ArtikCloud
|
|
|
264
265
|
# @option opts [BOOLEAN] :include_properties Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
265
266
|
# @option opts [String] :owner Return owned and/or shared devices. Default to ALL.
|
|
266
267
|
# @option opts [BOOLEAN] :include_share_info Include share info
|
|
268
|
+
# @option opts [String] :dtid Return only devices of this device type. If empty, assumes all device types allowed by the authorization.
|
|
267
269
|
# @return [Array<(DevicesEnvelope, Fixnum, Hash)>] DevicesEnvelope data, response status code and response headers
|
|
268
270
|
def get_user_devices_with_http_info(user_id, opts = {})
|
|
269
271
|
if @api_client.config.debugging
|
|
@@ -281,6 +283,7 @@ module ArtikCloud
|
|
|
281
283
|
query_params[:'includeProperties'] = opts[:'include_properties'] if !opts[:'include_properties'].nil?
|
|
282
284
|
query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?
|
|
283
285
|
query_params[:'includeShareInfo'] = opts[:'include_share_info'] if !opts[:'include_share_info'].nil?
|
|
286
|
+
query_params[:'dtid'] = opts[:'dtid'] if !opts[:'dtid'].nil?
|
|
284
287
|
|
|
285
288
|
# header parameters
|
|
286
289
|
header_params = {}
|