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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -3
  3. data/artikcloud.gemspec +3 -4
  4. data/docs/ActionOut.md +6 -0
  5. data/docs/CertificateData.md +9 -0
  6. data/docs/CertificateEnvelope.md +8 -0
  7. data/docs/CertificateFields.md +13 -0
  8. data/docs/CertificateId.md +8 -0
  9. data/docs/ContactInfo.md +9 -0
  10. data/docs/DevicePricingTier.md +16 -0
  11. data/docs/DevicePricingTierEnvelope.md +8 -0
  12. data/docs/DevicePricingTierRequest.md +8 -0
  13. data/docs/DevicePricingTiers.md +8 -0
  14. data/docs/DevicePricingTiersEnvelope.md +8 -0
  15. data/docs/DeviceShareInfo.md +1 -1
  16. data/docs/DeviceTypePricingList.md +8 -0
  17. data/docs/DeviceTypePricingTier.md +17 -0
  18. data/docs/DeviceTypePricingTiersEnvelope.md +8 -0
  19. data/docs/DeviceTypeUpdateInput.md +8 -0
  20. data/docs/DevicesSharesApi.md +235 -0
  21. data/docs/DevicesStatusApi.md +183 -0
  22. data/docs/MessageOut.md +6 -0
  23. data/docs/MonetizationApi.md +289 -0
  24. data/docs/OutputRule.md +1 -0
  25. data/docs/RejectedCSVRow.md +8 -0
  26. data/docs/RejectedCSVRowsEnvelope.md +11 -0
  27. data/docs/Tier.md +17 -0
  28. data/docs/UpgradePath.md +8 -0
  29. data/docs/UpgradePathEnvelope.md +8 -0
  30. data/docs/UpgradePathUserToken.md +10 -0
  31. data/docs/UpgradePathUserTokenEnvelope.md +8 -0
  32. data/docs/UploadIdEnvelope.md +8 -0
  33. data/docs/UploadStatusEnvelope.md +8 -0
  34. data/docs/UsersApi.md +6 -2
  35. data/docs/ValidityPeriod.md +9 -0
  36. data/docs/Whitelist.md +10 -0
  37. data/docs/WhitelistEnvelope.md +8 -0
  38. data/docs/WhitelistResultEnvelope.md +12 -0
  39. data/docs/WhitelistingApi.md +515 -0
  40. data/lib/artikcloud/api/monetization_api.rb +296 -0
  41. data/lib/artikcloud/api/users_api.rb +3 -0
  42. data/lib/artikcloud/api/whitelisting_api.rb +519 -0
  43. data/lib/artikcloud/models/action_out.rb +62 -1
  44. data/lib/artikcloud/models/certificate_data.rb +197 -0
  45. data/lib/artikcloud/models/certificate_envelope.rb +188 -0
  46. data/lib/artikcloud/models/certificate_fields.rb +237 -0
  47. data/lib/artikcloud/models/certificate_id.rb +188 -0
  48. data/lib/artikcloud/models/contact_info.rb +198 -0
  49. data/lib/artikcloud/models/device_pricing_tier.rb +268 -0
  50. data/lib/artikcloud/models/device_pricing_tier_envelope.rb +188 -0
  51. data/lib/artikcloud/models/device_pricing_tier_request.rb +188 -0
  52. data/lib/artikcloud/models/device_pricing_tiers.rb +190 -0
  53. data/lib/artikcloud/models/device_pricing_tiers_envelope.rb +188 -0
  54. data/lib/artikcloud/models/device_share_info.rb +7 -7
  55. data/lib/artikcloud/models/device_type_pricing_list.rb +190 -0
  56. data/lib/artikcloud/models/device_type_pricing_tier.rb +280 -0
  57. data/lib/artikcloud/models/device_type_pricing_tiers_envelope.rb +188 -0
  58. data/lib/artikcloud/models/device_type_update_input.rb +188 -0
  59. data/lib/artikcloud/models/message_out.rb +65 -1
  60. data/lib/artikcloud/models/output_rule.rb +46 -4
  61. data/lib/artikcloud/models/rejected_csv_row.rb +188 -0
  62. data/lib/artikcloud/models/rejected_csv_rows_envelope.rb +220 -0
  63. data/lib/artikcloud/models/tier.rb +278 -0
  64. data/lib/artikcloud/models/upgrade_path.rb +188 -0
  65. data/lib/artikcloud/models/upgrade_path_envelope.rb +188 -0
  66. data/lib/artikcloud/models/upgrade_path_user_token.rb +208 -0
  67. data/lib/artikcloud/models/upgrade_path_user_token_envelope.rb +187 -0
  68. data/lib/artikcloud/models/upload_id_envelope.rb +188 -0
  69. data/lib/artikcloud/models/upload_status_envelope.rb +188 -0
  70. data/lib/artikcloud/models/validity_period.rb +198 -0
  71. data/lib/artikcloud/models/whitelist.rb +208 -0
  72. data/lib/artikcloud/models/whitelist_envelope.rb +190 -0
  73. data/lib/artikcloud/models/whitelist_result_envelope.rb +230 -0
  74. data/lib/artikcloud/version.rb +1 -2
  75. data/lib/artikcloud.rb +33 -3
  76. data/pom.xml +1 -1
  77. data/spec/api/device_types_api_spec.rb +3 -15
  78. data/spec/api/devices_api_spec.rb +6 -22
  79. data/spec/api/devices_management_api_spec.rb +1 -13
  80. data/spec/api/export_api_spec.rb +2 -14
  81. data/spec/api/messages_api_spec.rb +115 -74
  82. data/spec/api/monetization_api_spec.rb +99 -0
  83. data/spec/api/registrations_api_spec.rb +1 -13
  84. data/spec/api/rules_api_spec.rb +3 -15
  85. data/spec/api/tags_api_spec.rb +0 -12
  86. data/spec/api/tokens_api_spec.rb +24 -14
  87. data/spec/api/users_api_spec.rb +119 -57
  88. data/spec/api/whitelisting_api_spec.rb +152 -0
  89. data/spec/factories/users.rb +12 -12
  90. data/spec/models/action_out_spec.rb +36 -0
  91. data/spec/models/certificate_data_spec.rb +47 -0
  92. data/spec/models/certificate_envelope_spec.rb +41 -0
  93. data/spec/models/certificate_fields_spec.rb +71 -0
  94. data/spec/models/certificate_id_spec.rb +41 -0
  95. data/spec/models/contact_info_spec.rb +47 -0
  96. data/spec/models/device_pricing_tier_envelope_spec.rb +41 -0
  97. data/spec/models/device_pricing_tier_request_spec.rb +41 -0
  98. data/spec/models/device_pricing_tier_spec.rb +89 -0
  99. data/spec/models/device_pricing_tiers_envelope_spec.rb +41 -0
  100. data/spec/models/device_pricing_tiers_spec.rb +41 -0
  101. data/spec/models/device_share_info_spec.rb +1 -1
  102. data/spec/models/device_type_pricing_list_spec.rb +41 -0
  103. data/spec/models/device_type_pricing_tier_spec.rb +95 -0
  104. data/spec/models/device_type_pricing_tiers_envelope_spec.rb +41 -0
  105. data/spec/models/device_type_update_input_spec.rb +41 -0
  106. data/spec/models/message_out_spec.rb +36 -0
  107. data/spec/models/output_rule_spec.rb +10 -0
  108. data/spec/models/rejected_csv_row_spec.rb +41 -0
  109. data/spec/models/rejected_csv_rows_envelope_spec.rb +59 -0
  110. data/spec/models/tier_spec.rb +95 -0
  111. data/spec/models/upgrade_path_envelope_spec.rb +41 -0
  112. data/spec/models/upgrade_path_spec.rb +41 -0
  113. data/spec/models/upgrade_path_user_token_envelope_spec.rb +41 -0
  114. data/spec/models/upgrade_path_user_token_spec.rb +53 -0
  115. data/spec/models/upload_id_envelope_spec.rb +41 -0
  116. data/spec/models/upload_status_envelope_spec.rb +41 -0
  117. data/spec/models/validity_period_spec.rb +47 -0
  118. data/spec/models/whitelist_envelope_spec.rb +41 -0
  119. data/spec/models/whitelist_result_envelope_spec.rb +65 -0
  120. data/spec/models/whitelist_spec.rb +53 -0
  121. metadata +121 -11
  122. data/docs/.DS_Store +0 -0
  123. data/lib/.DS_Store +0 -0
  124. data/lib/artikcloud/.DS_Store +0 -0
  125. data/lib/artikcloud/api/.DS_Store +0 -0
  126. data/lib/artikcloud/models/.DS_Store +0 -0
  127. data/spec/.DS_Store +0 -0
  128. 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
@@ -1,10 +1,9 @@
1
1
  =begin
2
2
  #ARTIK Cloud API
3
3
 
4
- OpenAPI spec version: 2.0.0
5
4
 
6
5
  =end
7
6
 
8
7
  module ArtikCloud
9
- VERSION = "2.1.1"
8
+ VERSION = "2.2.2"
10
9
  end
data/lib/artikcloud.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  =begin
2
2
  #ARTIK Cloud API
3
3
 
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ A ruby wrapper for the ArtikCloud REST APIs
5
5
 
6
- OpenAPI spec version: 2.0.0
7
6
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
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
@@ -3,7 +3,7 @@
3
3
  <groupId>cloud.artik</groupId>
4
4
  <artifactId>RubyArtikCloudClientTests</artifactId>
5
5
  <packaging>pom</packaging>
6
- <version>2.1.1</version>
6
+ <version>2.2.2</version>
7
7
  <name>Ruby Artik Cloud Client</name>
8
8
  <build>
9
9
  <plugins>
@@ -1,24 +1,12 @@
1
1
  =begin
2
2
  #ARTIK Cloud API
3
3
 
4
- #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
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 instance of DeviceTypesApi' do
42
- # expect(@instance).to be_instance_of(ArtikCloud::DeviceTypesApi)
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 descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
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', :vcr do
18
+ describe 'DevicesApi' do
31
19
  before do
32
20
  # run before each test
33
- let(:instance) { ArtikCloud::DevicesApi.new(API_CLIENT) }
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 instance of DevicesApi' do
42
- # expect(@instance).to be_instance_of(ArtikCloud::DevicesApi)
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
- result = instance.get_device_presence(device.id)
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 descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
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'
@@ -1,24 +1,12 @@
1
1
  =begin
2
2
  #ARTIK Cloud API
3
3
 
4
- #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
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 instance of ExportApi' do
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