artikcloud 2.1.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,230 @@
|
|
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 'date'
|
13
|
+
|
14
|
+
module ArtikCloud
|
15
|
+
#
|
16
|
+
class WhitelistResultEnvelope
|
17
|
+
# Device type id
|
18
|
+
attr_accessor :dtid
|
19
|
+
|
20
|
+
# Page starting position
|
21
|
+
attr_accessor :offset
|
22
|
+
|
23
|
+
# Page size
|
24
|
+
attr_accessor :count
|
25
|
+
|
26
|
+
# Total number or whitelist vdids
|
27
|
+
attr_accessor :total
|
28
|
+
|
29
|
+
# Array of whitelisted vdids
|
30
|
+
attr_accessor :data
|
31
|
+
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'dtid' => :'dtid',
|
37
|
+
:'offset' => :'offset',
|
38
|
+
:'count' => :'count',
|
39
|
+
:'total' => :'total',
|
40
|
+
:'data' => :'data'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.swagger_types
|
46
|
+
{
|
47
|
+
:'dtid' => :'String',
|
48
|
+
:'offset' => :'Integer',
|
49
|
+
:'count' => :'Integer',
|
50
|
+
:'total' => :'Integer',
|
51
|
+
:'data' => :'Array<Whitelist>'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'dtid')
|
64
|
+
self.dtid = attributes[:'dtid']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'offset')
|
68
|
+
self.offset = attributes[:'offset']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'count')
|
72
|
+
self.count = attributes[:'count']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'total')
|
76
|
+
self.total = attributes[:'total']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'data')
|
80
|
+
if (value = attributes[:'data']).is_a?(Array)
|
81
|
+
self.data = value
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properies with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = Array.new
|
91
|
+
return invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
dtid == o.dtid &&
|
106
|
+
offset == o.offset &&
|
107
|
+
count == o.count &&
|
108
|
+
total == o.total &&
|
109
|
+
data == o.data
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Fixnum] Hash code
|
120
|
+
def hash
|
121
|
+
[dtid, offset, count, total, data].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :BOOLEAN
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
temp_model = ArtikCloud.const_get(type).new
|
182
|
+
temp_model.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
next if value.nil?
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map{ |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
data/lib/artikcloud/version.rb
CHANGED
data/lib/artikcloud.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
|
4
|
+
A ruby wrapper for the ArtikCloud REST APIs
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0.0
|
7
6
|
|
8
|
-
|
7
|
+
|
8
|
+
|
9
|
+
https://github.com/artikcloud/artikcloud-ruby
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -30,11 +31,21 @@ require 'artikcloud/models/aggregates_histogram_data'
|
|
30
31
|
require 'artikcloud/models/aggregates_histogram_response'
|
31
32
|
require 'artikcloud/models/aggregates_response'
|
32
33
|
require 'artikcloud/models/app_properties'
|
34
|
+
require 'artikcloud/models/certificate_data'
|
35
|
+
require 'artikcloud/models/certificate_envelope'
|
36
|
+
require 'artikcloud/models/certificate_fields'
|
37
|
+
require 'artikcloud/models/certificate_id'
|
33
38
|
require 'artikcloud/models/check_token_message'
|
34
39
|
require 'artikcloud/models/check_token_response'
|
40
|
+
require 'artikcloud/models/contact_info'
|
35
41
|
require 'artikcloud/models/device'
|
36
42
|
require 'artikcloud/models/device_array'
|
37
43
|
require 'artikcloud/models/device_envelope'
|
44
|
+
require 'artikcloud/models/device_pricing_tier'
|
45
|
+
require 'artikcloud/models/device_pricing_tier_envelope'
|
46
|
+
require 'artikcloud/models/device_pricing_tier_request'
|
47
|
+
require 'artikcloud/models/device_pricing_tiers'
|
48
|
+
require 'artikcloud/models/device_pricing_tiers_envelope'
|
38
49
|
require 'artikcloud/models/device_reg_complete_request'
|
39
50
|
require 'artikcloud/models/device_reg_confirm_user_request'
|
40
51
|
require 'artikcloud/models/device_reg_confirm_user_response'
|
@@ -61,6 +72,10 @@ require 'artikcloud/models/device_type_array'
|
|
61
72
|
require 'artikcloud/models/device_type_envelope'
|
62
73
|
require 'artikcloud/models/device_type_info'
|
63
74
|
require 'artikcloud/models/device_type_info_envelope'
|
75
|
+
require 'artikcloud/models/device_type_pricing_list'
|
76
|
+
require 'artikcloud/models/device_type_pricing_tier'
|
77
|
+
require 'artikcloud/models/device_type_pricing_tiers_envelope'
|
78
|
+
require 'artikcloud/models/device_type_update_input'
|
64
79
|
require 'artikcloud/models/device_types_envelope'
|
65
80
|
require 'artikcloud/models/device_types_info'
|
66
81
|
require 'artikcloud/models/device_types_info_envelope'
|
@@ -108,6 +123,8 @@ require 'artikcloud/models/presence_model'
|
|
108
123
|
require 'artikcloud/models/properties_envelope'
|
109
124
|
require 'artikcloud/models/refresh_token_response'
|
110
125
|
require 'artikcloud/models/register_message'
|
126
|
+
require 'artikcloud/models/rejected_csv_row'
|
127
|
+
require 'artikcloud/models/rejected_csv_rows_envelope'
|
111
128
|
require 'artikcloud/models/rule_array'
|
112
129
|
require 'artikcloud/models/rule_creation_info'
|
113
130
|
require 'artikcloud/models/rule_envelope'
|
@@ -145,6 +162,7 @@ require 'artikcloud/models/task_statuses_history_envelope'
|
|
145
162
|
require 'artikcloud/models/task_update_request'
|
146
163
|
require 'artikcloud/models/task_update_response'
|
147
164
|
require 'artikcloud/models/tasks_status_counts'
|
165
|
+
require 'artikcloud/models/tier'
|
148
166
|
require 'artikcloud/models/token'
|
149
167
|
require 'artikcloud/models/token_info'
|
150
168
|
require 'artikcloud/models/token_info_success_response'
|
@@ -153,10 +171,20 @@ require 'artikcloud/models/token_response'
|
|
153
171
|
require 'artikcloud/models/unregister_device_response'
|
154
172
|
require 'artikcloud/models/unregister_device_response_envelope'
|
155
173
|
require 'artikcloud/models/update_parameters'
|
174
|
+
require 'artikcloud/models/upgrade_path'
|
175
|
+
require 'artikcloud/models/upgrade_path_envelope'
|
176
|
+
require 'artikcloud/models/upgrade_path_user_token'
|
177
|
+
require 'artikcloud/models/upgrade_path_user_token_envelope'
|
178
|
+
require 'artikcloud/models/upload_id_envelope'
|
179
|
+
require 'artikcloud/models/upload_status_envelope'
|
156
180
|
require 'artikcloud/models/user'
|
157
181
|
require 'artikcloud/models/user_envelope'
|
158
182
|
require 'artikcloud/models/validation_callback_info'
|
183
|
+
require 'artikcloud/models/validity_period'
|
159
184
|
require 'artikcloud/models/web_socket_error'
|
185
|
+
require 'artikcloud/models/whitelist'
|
186
|
+
require 'artikcloud/models/whitelist_envelope'
|
187
|
+
require 'artikcloud/models/whitelist_result_envelope'
|
160
188
|
|
161
189
|
# APIs
|
162
190
|
require 'artikcloud/api/device_types_api'
|
@@ -166,12 +194,14 @@ require 'artikcloud/api/devices_shares_api'
|
|
166
194
|
require 'artikcloud/api/devices_status_api'
|
167
195
|
require 'artikcloud/api/export_api'
|
168
196
|
require 'artikcloud/api/messages_api'
|
197
|
+
require 'artikcloud/api/monetization_api'
|
169
198
|
require 'artikcloud/api/registrations_api'
|
170
199
|
require 'artikcloud/api/rules_api'
|
171
200
|
require 'artikcloud/api/subscriptions_api'
|
172
201
|
require 'artikcloud/api/tags_api'
|
173
202
|
require 'artikcloud/api/tokens_api'
|
174
203
|
require 'artikcloud/api/users_api'
|
204
|
+
require 'artikcloud/api/whitelisting_api'
|
175
205
|
|
176
206
|
module ArtikCloud
|
177
207
|
class << self
|
data/pom.xml
CHANGED
@@ -1,24 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
#No
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'spec_helper'
|
@@ -38,8 +26,8 @@ describe 'DeviceTypesApi' do
|
|
38
26
|
end
|
39
27
|
|
40
28
|
describe 'test an instance of DeviceTypesApi' do
|
41
|
-
it 'should create an
|
42
|
-
|
29
|
+
it 'should create an instact of DeviceTypesApi' do
|
30
|
+
expect(@instance).to be_instance_of(ArtikCloud::DeviceTypesApi)
|
43
31
|
end
|
44
32
|
end
|
45
33
|
|
@@ -1,24 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
#No
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'spec_helper'
|
@@ -27,10 +15,10 @@ require 'json'
|
|
27
15
|
# Unit tests for ArtikCloud::DevicesApi
|
28
16
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
29
17
|
# Please update as you see appropriate
|
30
|
-
describe 'DevicesApi'
|
18
|
+
describe 'DevicesApi' do
|
31
19
|
before do
|
32
20
|
# run before each test
|
33
|
-
|
21
|
+
@instance = ArtikCloud::DevicesApi.new
|
34
22
|
end
|
35
23
|
|
36
24
|
after do
|
@@ -38,8 +26,8 @@ describe 'DevicesApi', :vcr do
|
|
38
26
|
end
|
39
27
|
|
40
28
|
describe 'test an instance of DevicesApi' do
|
41
|
-
it 'should create an
|
42
|
-
|
29
|
+
it 'should create an instact of DevicesApi' do
|
30
|
+
expect(@instance).to be_instance_of(ArtikCloud::DevicesApi)
|
43
31
|
end
|
44
32
|
end
|
45
33
|
|
@@ -98,12 +86,8 @@ describe 'DevicesApi', :vcr do
|
|
98
86
|
# @param [Hash] opts the optional parameters
|
99
87
|
# @return [PresenceEnvelope]
|
100
88
|
describe 'get_device_presence test' do
|
101
|
-
let(:device) { FactoryGirl.create(:device1) }
|
102
|
-
|
103
89
|
it "should work" do
|
104
|
-
|
105
|
-
expect(result.sdid).to eq device.id
|
106
|
-
expect(result.data.last_seen_on).to_not be_nil
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
107
91
|
end
|
108
92
|
end
|
109
93
|
|
@@ -1,24 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
#No
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'spec_helper'
|
data/spec/api/export_api_spec.rb
CHANGED
@@ -1,24 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
#No
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'spec_helper'
|
@@ -38,7 +26,7 @@ describe 'ExportApi' do
|
|
38
26
|
end
|
39
27
|
|
40
28
|
describe 'test an instance of ExportApi' do
|
41
|
-
it 'should create an
|
29
|
+
it 'should create an instact of ExportApi' do
|
42
30
|
expect(@instance).to be_instance_of(ArtikCloud::ExportApi)
|
43
31
|
end
|
44
32
|
end
|