artikcloud 2.1.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,15 +1,12 @@
1
1
  =begin
2
- Artik Cloud API
2
+ #ARTIK Cloud API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
3
5
 
4
6
  OpenAPI spec version: 2.0.0
5
7
 
6
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
7
9
 
8
- License: MIT
9
- http://en.wikipedia.org/wiki/MIT_License
10
-
11
- Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
12
-
13
10
  =end
14
11
 
15
12
  require 'spec_helper'
@@ -46,86 +43,130 @@ describe 'MessagesApi' do
46
43
  # @return [AggregatesHistogramResponse]
47
44
  describe 'get_aggregates_histogram test' do
48
45
  it "should work" do
49
- message = ArtikCloud::Message.new
50
- message.type = "message"
51
- message.sdid = device.id
52
- message.ts = Time.now.to_f*1000
53
- message.data = {
54
- :'steps' => 500
55
- }
56
-
57
- result = instance.send_message(message)
58
- expect(result).to be_a(ArtikCloud::MessageIDEnvelope)
59
- message_id = result.data.mid
60
-
61
- sleep(2)
62
-
63
- opts = {
64
- :mid => message_id
65
- }
66
-
67
- normalized_messages = instance.get_normalized_messages(opts)
68
- expect(normalized_messages).to be_a(ArtikCloud::NormalizedMessagesEnvelope)
69
- expect(normalized_messages.size).to eq 1
70
-
71
- normalized = normalized_messages.data[0]
72
- expect(normalized.mid).to eq message_id
73
-
74
- volume = normalized.data["steps"]
75
- expect(volume).to_not be_nil
76
- expect(volume).to eq 500
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
77
47
  end
78
48
  end
79
49
 
80
- describe 'get_message_snapshots' do
81
- it 'should work' do
82
- result = instance.get_message_snapshots(device.id)
83
- expect(result.sdids).to eq device.id
84
- expect(result.data.first.sdid).to eq device.id
85
- expect(result.data.first.data['steps'][:value]).to eq 500
50
+ # unit tests for get_field_presence
51
+ # Get normalized message presence
52
+ # Get normalized message presence.
53
+ # @param start_date startDate
54
+ # @param end_date endDate
55
+ # @param interval String representing grouping interval. One of: 'minute' (1 hour limit), 'hour' (1 day limit), 'day' (31 days limit), 'month' (1 year limit), or 'year' (10 years limit).
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :sdid Source device ID of the messages being searched.
58
+ # @option opts [String] :field_presence String representing a field from the specified device ID.
59
+ # @return [FieldPresenceEnvelope]
60
+ describe 'get_field_presence test' do
61
+ it "should work" do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
63
  end
87
64
  end
88
65
 
89
- describe 'send_actions' do
90
- let(:device) { FactoryGirl.create(:device_tv) }
91
-
92
- it 'should work' do
93
- action = ArtikCloud::Action.new
94
- action.name = 'setVolume'
95
- action.parameters = {'volume' => 5}
96
-
97
- action_array = ArtikCloud::ActionArray.new
98
- action_array.actions = [action]
99
-
100
- actions = ArtikCloud::Actions.new
101
- actions.ddid = device.id
102
- actions.ts = Time.now.to_f*1000
103
- actions.data = action_array
66
+ # unit tests for get_last_normalized_messages
67
+ # Get Last Normalized Message
68
+ # Get last messages normalized.
69
+ # @param [Hash] opts the optional parameters
70
+ # @option opts [Integer] :count Number of items to return per query.
71
+ # @option opts [String] :sdids Comma separated list of source device IDs (minimum: 1).
72
+ # @option opts [String] :field_presence String representing a field from the specified device ID.
73
+ # @return [NormalizedMessagesEnvelope]
74
+ describe 'get_last_normalized_messages test' do
75
+ it "should work" do
76
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
77
+ end
78
+ end
104
79
 
105
- mid = instance.send_actions(actions).data.mid
80
+ # unit tests for get_message_aggregates
81
+ # Get Normalized Message Aggregates
82
+ # Get Aggregates on normalized messages.
83
+ # @param sdid Source device ID of the messages being searched.
84
+ # @param field Message field being queried for aggregates.
85
+ # @param start_date Timestamp of earliest message (in milliseconds since epoch).
86
+ # @param end_date Timestamp of latest message (in milliseconds since epoch).
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [AggregatesResponse]
89
+ describe 'get_message_aggregates test' do
90
+ it "should work" do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
106
94
 
107
- sleep(2)
95
+ # unit tests for get_message_snapshots
96
+ # Get Message Snapshots
97
+ # Get message snapshots.
98
+ # @param sdids Device IDs for which the snapshots are requested. Max 100 device ids per call.
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [BOOLEAN] :include_timestamp Indicates whether to return timestamps of the last update for each field.
101
+ # @return [SnapshotResponses]
102
+ describe 'get_message_snapshots test' do
103
+ it "should work" do
104
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
105
+ end
106
+ end
108
107
 
109
- result = instance.get_normalized_actions(
110
- uid: nil,
111
- ddid: nil,
112
- mid: mid,
113
- offset: nil,
114
- count: nil,
115
- startDate: nil,
116
- endDate: nil,
117
- order: nil
118
- )
119
- expect(result.size).to eq 1
108
+ # unit tests for get_normalized_actions
109
+ # Get Normalized Actions
110
+ # Get the actions normalized
111
+ # @param [Hash] opts the optional parameters
112
+ # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
113
+ # @option opts [String] :ddid Destination device ID of the actions being searched.
114
+ # @option opts [String] :mid The message ID being searched.
115
+ # @option opts [String] :offset A string that represents the starting item, should be the value of 'next' field received in the last response. (required for pagination)
116
+ # @option opts [Integer] :count count
117
+ # @option opts [Integer] :start_date startDate
118
+ # @option opts [Integer] :end_date endDate
119
+ # @option opts [String] :order Desired sort order: 'asc' or 'desc'
120
+ # @return [NormalizedActionsEnvelope]
121
+ describe 'get_normalized_actions test' do
122
+ it "should work" do
123
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
124
+ end
125
+ end
120
126
 
121
- normalized = result.data[0]
122
- action_rx = normalized.data.actions[0]
127
+ # unit tests for get_normalized_messages
128
+ # Get Normalized Messages
129
+ # Get the messages normalized
130
+ # @param [Hash] opts the optional parameters
131
+ # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
132
+ # @option opts [String] :sdid Source device ID of the messages being searched.
133
+ # @option opts [String] :mid The message ID being searched.
134
+ # @option opts [String] :field_presence String representing a field from the specified device ID.
135
+ # @option opts [String] :filter Filter.
136
+ # @option opts [String] :offset A string that represents the starting item, should be the value of 'next' field received in the last response. (required for pagination)
137
+ # @option opts [Integer] :count count
138
+ # @option opts [Integer] :start_date startDate
139
+ # @option opts [Integer] :end_date endDate
140
+ # @option opts [String] :order Desired sort order: 'asc' or 'desc'
141
+ # @return [NormalizedMessagesEnvelope]
142
+ describe 'get_normalized_messages test' do
143
+ it "should work" do
144
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
145
+ end
146
+ end
123
147
 
124
- expect(action_rx.name).to eq 'setVolume'
148
+ # unit tests for send_actions
149
+ # Send Actions
150
+ # Send Actions
151
+ # @param data Actions that are passed in the body
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [MessageIDEnvelope]
154
+ describe 'send_actions test' do
155
+ it "should work" do
156
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
157
+ end
158
+ end
125
159
 
126
- volume = action_rx.parameters['volume']
127
- expect(volume).to_not be_nil
128
- expect(volume).to eq 5
160
+ # unit tests for send_message
161
+ # Send Message
162
+ # Send a message
163
+ # @param data Message object that is passed in the body
164
+ # @param [Hash] opts the optional parameters
165
+ # @return [MessageIDEnvelope]
166
+ describe 'send_message test' do
167
+ it "should work" do
168
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
129
169
  end
130
170
  end
171
+
131
172
  end
@@ -0,0 +1,99 @@
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 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for ArtikCloud::MonetizationApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'MonetizationApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = ArtikCloud::MonetizationApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of MonetizationApi' do
29
+ it 'should create an instact of MonetizationApi' do
30
+ expect(@instance).to be_instance_of(ArtikCloud::MonetizationApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for create_pricing_tiers
35
+ # Define devicetype's pricing tiers.
36
+ # Define devicetype's pricing tiers.
37
+ # @param dtid DeviceType ID
38
+ # @param pricing_tier_info Pricing tier info
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [DeviceTypePricingTier]
41
+ describe 'create_pricing_tiers test' do
42
+ it "should work" do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_pricing_tiers
48
+ # Get a device's pricing tiers
49
+ # Get a device's pricing tiers
50
+ # @param did Device ID
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [BOOLEAN] :active Filter by active
53
+ # @return [DevicePricingTiersEnvelope]
54
+ describe 'get_pricing_tiers test' do
55
+ it "should work" do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ # unit tests for get_the__pricing_tiers
61
+ # Get devicetype's pricing tiers.
62
+ # Get devicetype's pricing tiers.
63
+ # @param dtid DeviceType ID
64
+ # @param version Version
65
+ # @param [Hash] opts the optional parameters
66
+ # @return [DeviceTypePricingTiersEnvelope]
67
+ describe 'get_the__pricing_tiers test' do
68
+ it "should work" do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
73
+ # unit tests for get_upgrade_path
74
+ # Get upgrade path
75
+ # Get upgrade path
76
+ # @param did Device ID
77
+ # @param action Action to perform
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [UpgradePathEnvelope]
80
+ describe 'get_upgrade_path test' do
81
+ it "should work" do
82
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ end
84
+ end
85
+
86
+ # unit tests for set_pricing_tier
87
+ # Set a device's pricing tier
88
+ # Set a device's pricing tier
89
+ # @param did Device ID
90
+ # @param pricing_tier Pricing tier
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [DevicePricingTierEnvelope]
93
+ describe 'set_pricing_tier test' do
94
+ it "should work" do
95
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
96
+ end
97
+ end
98
+
99
+ end
@@ -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,8 +26,8 @@ describe 'RulesApi' do
38
26
  end
39
27
 
40
28
  describe 'test an instance of RulesApi' do
41
- it 'should create an instance of RulesApi' do
42
- # expect(@instance).to be_instance_of(ArtikCloud::RulesApi)
29
+ it 'should create an instact of RulesApi' do
30
+ expect(@instance).to be_instance_of(ArtikCloud::RulesApi)
43
31
  end
44
32
  end
45
33
 
@@ -7,18 +7,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,15 +1,12 @@
1
1
  =begin
2
- Artik Cloud API
2
+ #ARTIK Cloud API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
3
5
 
4
6
  OpenAPI spec version: 2.0.0
5
7
 
6
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
7
9
 
8
- License: MIT
9
- http://en.wikipedia.org/wiki/MIT_License
10
-
11
- Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
12
-
13
10
  =end
14
11
 
15
12
  require 'spec_helper'
@@ -21,7 +18,7 @@ require 'json'
21
18
  describe 'TokensApi' do
22
19
  before do
23
20
  # run before each test
24
- let(:instance) { ArtikCloud::TokensApi.new(API_CLIENT) }
21
+ @instance = ArtikCloud::TokensApi.new
25
22
  end
26
23
 
27
24
  after do
@@ -42,19 +39,32 @@ describe 'TokensApi' do
42
39
  # @return [CheckTokenResponse]
43
40
  describe 'check_token test' do
44
41
  it "should work" do
45
- response = instance.token_info
46
- expect(response).to be_a(ArtikCloud::TokenInfoSuccessResponse)
47
- expect(response.data.expires_in).to_not be_nil
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
43
  end
49
44
  end
50
45
 
46
+ # unit tests for refresh_token
47
+ # Refresh Token
48
+ # Refresh Token
49
+ # @param grant_type Grant Type.
50
+ # @param refresh_token Refresh Token.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [RefreshTokenResponse]
51
53
  describe 'refresh_token test' do
52
54
  it "should work" do
53
- pending 'refresh_token is invalid, a good one is needed'
54
- refresh_token = "bb90333aee114b3e97284814d978080d"
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
55
58
 
56
- response = instance.refresh_token("refresh_token", refresh_token)
57
- response.should be_a(ArtikCloud::RefreshTokenResponse)
59
+ # unit tests for token_info
60
+ # Token Info
61
+ # Returns the Token Information
62
+ # @param [Hash] opts the optional parameters
63
+ # @return [TokenInfoSuccessResponse]
64
+ describe 'token_info test' do
65
+ it "should work" do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
67
  end
59
68
  end
69
+
60
70
  end