polar_accesslink 1.0.2 → 1.0.3

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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -5
  3. data/README.md +20 -65
  4. data/Rakefile +0 -2
  5. data/docs/DailyActivityApi.md +96 -123
  6. data/docs/ExercisesApi.md +35 -55
  7. data/docs/NightlyRechargeApi.md +96 -0
  8. data/docs/PhysicalInfoApi.md +60 -79
  9. data/docs/PullNotificationsApi.md +11 -20
  10. data/docs/SleepApi.md +137 -0
  11. data/docs/TrainingDataApi.md +175 -213
  12. data/docs/UsersApi.md +33 -56
  13. data/docs/WebhooksApi.md +43 -80
  14. data/git_push.sh +55 -0
  15. data/lib/polar_accesslink.rb +5 -36
  16. data/lib/polar_accesslink/api/daily_activity_api.rb +101 -201
  17. data/lib/polar_accesslink/api/exercises_api.rb +43 -81
  18. data/lib/polar_accesslink/api/nightly_recharge_api.rb +115 -0
  19. data/lib/polar_accesslink/api/physical_info_api.rb +65 -114
  20. data/lib/polar_accesslink/api/pull_notifications_api.rb +15 -27
  21. data/lib/polar_accesslink/api/sleep_api.rb +158 -0
  22. data/lib/polar_accesslink/api/training_data_api.rb +178 -332
  23. data/lib/polar_accesslink/api/users_api.rb +42 -96
  24. data/lib/polar_accesslink/api/webhooks_api.rb +59 -126
  25. data/lib/polar_accesslink/api_client.rb +45 -41
  26. data/lib/polar_accesslink/api_error.rb +3 -22
  27. data/lib/polar_accesslink/configuration.rb +9 -62
  28. data/lib/polar_accesslink/version.rb +3 -3
  29. data/polar_accesslink.gemspec +2 -1
  30. data/spec/api/daily_activity_api_spec.rb +11 -11
  31. data/spec/api/exercises_api_spec.rb +9 -9
  32. data/spec/api/nightly_recharge_api_spec.rb +58 -0
  33. data/spec/api/physical_info_api_spec.rb +9 -9
  34. data/spec/api/pull_notifications_api_spec.rb +7 -7
  35. data/spec/api/sleep_api_spec.rb +69 -0
  36. data/spec/api/training_data_api_spec.rb +16 -15
  37. data/spec/api/users_api_spec.rb +8 -9
  38. data/spec/api/webhooks_api_spec.rb +11 -13
  39. data/spec/api_client_spec.rb +21 -4
  40. data/spec/configuration_spec.rb +6 -6
  41. data/spec/spec_helper.rb +3 -3
  42. metadata +36 -145
  43. data/docs/Activity.md +0 -33
  44. data/docs/ActivityLog.md +0 -17
  45. data/docs/ActivityStepSample.md +0 -19
  46. data/docs/ActivityStepSamples.md +0 -19
  47. data/docs/ActivityZoneSample.md +0 -19
  48. data/docs/ActivityZoneSamples.md +0 -19
  49. data/docs/AvailableUserData.md +0 -21
  50. data/docs/AvailableUserDatas.md +0 -17
  51. data/docs/CreatedWebhook.md +0 -17
  52. data/docs/CreatedWebhookData.md +0 -23
  53. data/docs/DurationZone.md +0 -19
  54. data/docs/Error.md +0 -25
  55. data/docs/Exercise.md +0 -47
  56. data/docs/ExerciseHashId.md +0 -45
  57. data/docs/Exercises.md +0 -17
  58. data/docs/HeartRate.md +0 -19
  59. data/docs/PhysicalInformation.md +0 -39
  60. data/docs/PhysicalInformations.md +0 -17
  61. data/docs/Register.md +0 -17
  62. data/docs/Sample.md +0 -21
  63. data/docs/Samples.md +0 -17
  64. data/docs/TransactionLocation.md +0 -19
  65. data/docs/User.md +0 -35
  66. data/docs/UserExtraInfo.md +0 -21
  67. data/docs/WebhookInfo.md +0 -17
  68. data/docs/WebhookInfoData.md +0 -21
  69. data/docs/WebhookPatch.md +0 -19
  70. data/docs/WebhookPayload.md +0 -25
  71. data/docs/WebhookPing.md +0 -19
  72. data/docs/WebhookRequest.md +0 -19
  73. data/docs/WebhookType.md +0 -16
  74. data/docs/Zone.md +0 -23
  75. data/docs/Zones.md +0 -17
  76. data/lib/polar_accesslink/models/activity.rb +0 -288
  77. data/lib/polar_accesslink/models/activity_log.rb +0 -210
  78. data/lib/polar_accesslink/models/activity_step_sample.rb +0 -218
  79. data/lib/polar_accesslink/models/activity_step_samples.rb +0 -220
  80. data/lib/polar_accesslink/models/activity_zone_sample.rb +0 -220
  81. data/lib/polar_accesslink/models/activity_zone_samples.rb +0 -220
  82. data/lib/polar_accesslink/models/available_user_data.rb +0 -262
  83. data/lib/polar_accesslink/models/available_user_datas.rb +0 -210
  84. data/lib/polar_accesslink/models/created_webhook.rb +0 -206
  85. data/lib/polar_accesslink/models/created_webhook_data.rb +0 -236
  86. data/lib/polar_accesslink/models/duration_zone.rb +0 -218
  87. data/lib/polar_accesslink/models/error.rb +0 -248
  88. data/lib/polar_accesslink/models/exercise.rb +0 -357
  89. data/lib/polar_accesslink/models/exercise_hash_id.rb +0 -347
  90. data/lib/polar_accesslink/models/exercises.rb +0 -210
  91. data/lib/polar_accesslink/models/heart_rate.rb +0 -218
  92. data/lib/polar_accesslink/models/physical_information.rb +0 -352
  93. data/lib/polar_accesslink/models/physical_informations.rb +0 -210
  94. data/lib/polar_accesslink/models/register.rb +0 -213
  95. data/lib/polar_accesslink/models/sample.rb +0 -228
  96. data/lib/polar_accesslink/models/samples.rb +0 -210
  97. data/lib/polar_accesslink/models/transaction_location.rb +0 -218
  98. data/lib/polar_accesslink/models/user.rb +0 -334
  99. data/lib/polar_accesslink/models/user_extra_info.rb +0 -228
  100. data/lib/polar_accesslink/models/webhook_info.rb +0 -206
  101. data/lib/polar_accesslink/models/webhook_info_data.rb +0 -226
  102. data/lib/polar_accesslink/models/webhook_patch.rb +0 -219
  103. data/lib/polar_accesslink/models/webhook_payload.rb +0 -246
  104. data/lib/polar_accesslink/models/webhook_ping.rb +0 -252
  105. data/lib/polar_accesslink/models/webhook_request.rb +0 -229
  106. data/lib/polar_accesslink/models/webhook_type.rb +0 -37
  107. data/lib/polar_accesslink/models/zone.rb +0 -238
  108. data/lib/polar_accesslink/models/zones.rb +0 -210
  109. data/spec/models/activity_log_spec.rb +0 -41
  110. data/spec/models/activity_spec.rb +0 -89
  111. data/spec/models/activity_step_sample_spec.rb +0 -47
  112. data/spec/models/activity_step_samples_spec.rb +0 -47
  113. data/spec/models/activity_zone_sample_spec.rb +0 -47
  114. data/spec/models/activity_zone_samples_spec.rb +0 -47
  115. data/spec/models/available_user_data_spec.rb +0 -57
  116. data/spec/models/available_user_datas_spec.rb +0 -41
  117. data/spec/models/created_webhook_data_spec.rb +0 -59
  118. data/spec/models/created_webhook_spec.rb +0 -41
  119. data/spec/models/duration_zone_spec.rb +0 -47
  120. data/spec/models/error_spec.rb +0 -65
  121. data/spec/models/exercise_hash_id_spec.rb +0 -125
  122. data/spec/models/exercise_spec.rb +0 -131
  123. data/spec/models/exercises_spec.rb +0 -41
  124. data/spec/models/heart_rate_spec.rb +0 -47
  125. data/spec/models/physical_information_spec.rb +0 -111
  126. data/spec/models/physical_informations_spec.rb +0 -41
  127. data/spec/models/register_spec.rb +0 -41
  128. data/spec/models/sample_spec.rb +0 -53
  129. data/spec/models/samples_spec.rb +0 -41
  130. data/spec/models/transaction_location_spec.rb +0 -47
  131. data/spec/models/user_extra_info_spec.rb +0 -53
  132. data/spec/models/user_spec.rb +0 -99
  133. data/spec/models/webhook_info_data_spec.rb +0 -53
  134. data/spec/models/webhook_info_spec.rb +0 -41
  135. data/spec/models/webhook_patch_spec.rb +0 -47
  136. data/spec/models/webhook_payload_spec.rb +0 -65
  137. data/spec/models/webhook_ping_spec.rb +0 -51
  138. data/spec/models/webhook_request_spec.rb +0 -47
  139. data/spec/models/webhook_type_spec.rb +0 -35
  140. data/spec/models/zone_spec.rb +0 -59
  141. data/spec/models/zones_spec.rb +0 -41
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
@@ -15,6 +15,7 @@ require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
17
  require 'typhoeus'
18
+ require 'addressable/uri'
18
19
 
19
20
  module PolarAccesslink
20
21
  class ApiClient
@@ -30,7 +31,7 @@ module PolarAccesslink
30
31
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
31
32
  def initialize(config = Configuration.default)
32
33
  @config = config
33
- @user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
34
+ @user_agent = "Swagger-Codegen/#{VERSION}/ruby"
34
35
  @default_headers = {
35
36
  'Content-Type' => 'application/json',
36
37
  'User-Agent' => @user_agent
@@ -43,7 +44,7 @@ module PolarAccesslink
43
44
 
44
45
  # Call an API with given options.
45
46
  #
46
- # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
47
+ # @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
47
48
  # the data deserialized from response body (could be nil), response status code and response headers.
48
49
  def call_api(http_method, path, opts = {})
49
50
  request = build_request(http_method, path, opts)
@@ -62,7 +63,7 @@ module PolarAccesslink
62
63
  :message => response.return_message)
63
64
  else
64
65
  fail ApiError.new(:code => response.code,
65
- :response_headers => response.headers,
66
+ :response_headers => response.headers.to_h,
66
67
  :response_body => response.body),
67
68
  response.status_message
68
69
  end
@@ -93,7 +94,6 @@ module PolarAccesslink
93
94
  query_params = opts[:query_params] || {}
94
95
  form_params = opts[:form_params] || {}
95
96
 
96
- update_params_for_auth! header_params, query_params, opts[:auth_names]
97
97
 
98
98
  # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
99
99
  _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
@@ -111,6 +111,8 @@ module PolarAccesslink
111
111
  :verbose => @config.debugging
112
112
  }
113
113
 
114
+ req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/"
115
+
114
116
  # set custom cert, if provided
115
117
  req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
116
118
 
@@ -127,34 +129,6 @@ module PolarAccesslink
127
129
  request
128
130
  end
129
131
 
130
- # Builds the HTTP request body
131
- #
132
- # @param [Hash] header_params Header parameters
133
- # @param [Hash] form_params Query parameters
134
- # @param [Object] body HTTP body (JSON/XML)
135
- # @return [String] HTTP body data in the form of string
136
- def build_request_body(header_params, form_params, body)
137
- # http form
138
- if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
139
- header_params['Content-Type'] == 'multipart/form-data'
140
- data = {}
141
- form_params.each do |key, value|
142
- case value
143
- when ::File, ::Array, nil
144
- # let typhoeus handle File, Array and nil parameters
145
- data[key] = value
146
- else
147
- data[key] = value.to_s
148
- end
149
- end
150
- elsif body
151
- data = body.is_a?(String) ? body : body.to_json
152
- else
153
- data = nil
154
- end
155
- data
156
- end
157
-
158
132
  # Check if the given MIME is a JSON MIME.
159
133
  # JSON MIME examples:
160
134
  # application/json
@@ -170,7 +144,7 @@ module PolarAccesslink
170
144
  # Deserialize the response to the given return type.
171
145
  #
172
146
  # @param [Response] response HTTP response
173
- # @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
147
+ # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
174
148
  def deserialize(response, return_type)
175
149
  body = response.body
176
150
 
@@ -214,7 +188,7 @@ module PolarAccesslink
214
188
  data.to_i
215
189
  when 'Float'
216
190
  data.to_f
217
- when 'Boolean'
191
+ when 'BOOLEAN'
218
192
  data == true
219
193
  when 'DateTime'
220
194
  # parse date time (expecting ISO 8601 format)
@@ -237,7 +211,9 @@ module PolarAccesslink
237
211
  end
238
212
  else
239
213
  # models, e.g. Pet
240
- PolarAccesslink.const_get(return_type).build_from_hash(data)
214
+ PolarAccesslink.const_get(return_type).new.tap do |model|
215
+ model.build_from_hash data
216
+ end
241
217
  end
242
218
  end
243
219
 
@@ -269,7 +245,7 @@ module PolarAccesslink
269
245
  tempfile.write(chunk)
270
246
  end
271
247
  request.on_complete do |response|
272
- tempfile.close if tempfile
248
+ tempfile.close
273
249
  @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
274
250
  "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
275
251
  "will be deleted automatically with GC. It's also recommended to delete the temp file "\
@@ -289,7 +265,35 @@ module PolarAccesslink
289
265
  def build_request_url(path)
290
266
  # Add leading and trailing slashes to path
291
267
  path = "/#{path}".gsub(/\/+/, '/')
292
- @config.base_url + path
268
+ Addressable::URI.encode(@config.base_url + path)
269
+ end
270
+
271
+ # Builds the HTTP request body
272
+ #
273
+ # @param [Hash] header_params Header parameters
274
+ # @param [Hash] form_params Query parameters
275
+ # @param [Object] body HTTP body (JSON/XML)
276
+ # @return [String] HTTP body data in the form of string
277
+ def build_request_body(header_params, form_params, body)
278
+ # http form
279
+ if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
280
+ header_params['Content-Type'] == 'multipart/form-data'
281
+ data = {}
282
+ form_params.each do |key, value|
283
+ case value
284
+ when ::File, ::Array, nil
285
+ # let typhoeus handle File, Array and nil parameters
286
+ data[key] = value
287
+ else
288
+ data[key] = value.to_s
289
+ end
290
+ end
291
+ elsif body
292
+ data = body.is_a?(String) ? body : body.to_json
293
+ else
294
+ data = nil
295
+ end
296
+ data
293
297
  end
294
298
 
295
299
  # Update hearder and query params based on authentication settings.
@@ -311,7 +315,7 @@ module PolarAccesslink
311
315
 
312
316
  # Sets user agent in HTTP header
313
317
  #
314
- # @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
318
+ # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
315
319
  def user_agent=(user_agent)
316
320
  @user_agent = user_agent
317
321
  @default_headers['User-Agent'] = @user_agent
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
@@ -34,24 +34,5 @@ module PolarAccesslink
34
34
  super arg
35
35
  end
36
36
  end
37
-
38
- # Override to_s to display a friendly error message
39
- def to_s
40
- message
41
- end
42
-
43
- def message
44
- if @message.nil?
45
- msg = "Error message: the server returns an error"
46
- else
47
- msg = @message
48
- end
49
-
50
- msg += "\nHTTP status code: #{code}" if code
51
- msg += "\nResponse headers: #{response_headers}" if response_headers
52
- msg += "\nResponse body: #{response_body}" if response_body
53
-
54
- msg
55
- end
56
37
  end
57
38
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
13
+ require 'addressable/uri'
14
+
13
15
  module PolarAccesslink
14
16
  class Configuration
15
17
  # Defines url scheme
@@ -126,8 +128,8 @@ module PolarAccesslink
126
128
  attr_accessor :force_ending_format
127
129
 
128
130
  def initialize
129
- @scheme = 'https'
130
- @host = 'www.polaraccesslink.com'
131
+ @scheme = 'https:'
132
+ @host = ''
131
133
  @base_path = ''
132
134
  @api_key = {}
133
135
  @api_key_prefix = {}
@@ -172,7 +174,8 @@ module PolarAccesslink
172
174
  end
173
175
 
174
176
  def base_url
175
- "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
177
+ url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
178
+ Addressable::URI.encode(url)
176
179
  end
177
180
 
178
181
  # Gets API key (with prefix if set).
@@ -193,63 +196,7 @@ module PolarAccesslink
193
196
  # Returns Auth Settings hash for api client.
194
197
  def auth_settings
195
198
  {
196
- 'Basic' =>
197
- {
198
- type: 'basic',
199
- in: 'header',
200
- key: 'Authorization',
201
- value: basic_auth_token
202
- },
203
- 'OAuth2' =>
204
- {
205
- type: 'oauth2',
206
- in: 'header',
207
- key: 'Authorization',
208
- value: "Bearer #{access_token}"
209
- },
210
199
  }
211
200
  end
212
-
213
- # Returns an array of Server setting
214
- def server_settings
215
- [
216
- {
217
- url: "https://www.polaraccesslink.com/",
218
- description: "No description provided",
219
- }
220
- ]
221
- end
222
-
223
- # Returns URL based on server settings
224
- #
225
- # @param index array index of the server settings
226
- # @param variables hash of variable and the corresponding value
227
- def server_url(index, variables = {})
228
- servers = server_settings
229
-
230
- # check array index out of bound
231
- if (index < 0 || index >= servers.size)
232
- fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
233
- end
234
-
235
- server = servers[index]
236
- url = server[:url]
237
-
238
- # go through variable and assign a value
239
- server[:variables].each do |name, variable|
240
- if variables.key?(name)
241
- if (server[:variables][name][:enum_values].include? variables[name])
242
- url.gsub! "{" + name.to_s + "}", variables[name]
243
- else
244
- fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
245
- end
246
- else
247
- # use default value
248
- url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
249
- end
250
- end
251
-
252
- url
253
- end
254
201
  end
255
202
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
@@ -16,7 +16,7 @@ $:.push File.expand_path("../lib", __FILE__)
16
16
 
17
17
  Gem::Specification.new do |s|
18
18
  s.name = "polar_accesslink"
19
- s.version = "1.0.2"
19
+ s.version = "1.0.3"
20
20
  s.platform = Gem::Platform::RUBY
21
21
  s.authors = ["OpenAPI-Generator"]
22
22
  s.email = ["b2bhelpdesk@polar.com"]
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
28
28
 
29
29
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
30
30
  s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
31
+ s.add_runtime_dependency 'addressable', '~> 2.7'
31
32
 
32
33
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
34
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
@@ -14,12 +14,12 @@ require 'spec_helper'
14
14
  require 'json'
15
15
 
16
16
  # Unit tests for PolarAccesslink::DailyActivityApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
18
  # Please update as you see appropriate
19
19
  describe 'DailyActivityApi' do
20
20
  before do
21
21
  # run before each test
22
- @api_instance = PolarAccesslink::DailyActivityApi.new
22
+ @instance = PolarAccesslink::DailyActivityApi.new
23
23
  end
24
24
 
25
25
  after do
@@ -28,7 +28,7 @@ describe 'DailyActivityApi' do
28
28
 
29
29
  describe 'test an instance of DailyActivityApi' do
30
30
  it 'should create an instance of DailyActivityApi' do
31
- expect(@api_instance).to be_instance_of(PolarAccesslink::DailyActivityApi)
31
+ expect(@instance).to be_instance_of(PolarAccesslink::DailyActivityApi)
32
32
  end
33
33
  end
34
34
 
@@ -50,7 +50,7 @@ describe 'DailyActivityApi' do
50
50
  # Initiate activity transaction. Check for new activity summaries and create a new transaction if found.
51
51
  # @param user_id User identifier
52
52
  # @param [Hash] opts the optional parameters
53
- # @return [TransactionLocation]
53
+ # @return [nil]
54
54
  describe 'create_activity_transaction test' do
55
55
  it 'should work' do
56
56
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -63,7 +63,7 @@ describe 'DailyActivityApi' do
63
63
  # @param transaction_id Transaction identifier
64
64
  # @param activity_id Activity summary identifier
65
65
  # @param [Hash] opts the optional parameters
66
- # @return [Activity]
66
+ # @return [nil]
67
67
  describe 'get_activity_summary test' do
68
68
  it 'should work' do
69
69
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -77,7 +77,7 @@ describe 'DailyActivityApi' do
77
77
  # @param transaction_id Transaction identifier
78
78
  # @param activity_id Activity summary identifier
79
79
  # @param [Hash] opts the optional parameters
80
- # @return [ActivityStepSamples]
80
+ # @return [nil]
81
81
  describe 'get_step_samples test' do
82
82
  it 'should work' do
83
83
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -91,7 +91,7 @@ describe 'DailyActivityApi' do
91
91
  # @param transaction_id Transaction identifier
92
92
  # @param activity_id Activity summary identifier
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [ActivityZoneSamples]
94
+ # @return [nil]
95
95
  describe 'get_zone_samples test' do
96
96
  it 'should work' do
97
97
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -104,7 +104,7 @@ describe 'DailyActivityApi' do
104
104
  # @param transaction_id Transaction identifier
105
105
  # @param user_id User identifier
106
106
  # @param [Hash] opts the optional parameters
107
- # @return [ActivityLog]
107
+ # @return [nil]
108
108
  describe 'list_activities test' do
109
109
  it 'should work' do
110
110
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Polar Accesslink API documentation
5
5
 
6
- The version of the OpenAPI document: 3.40.0
6
+ OpenAPI spec version: 3.59.0
7
7
  Contact: b2bhelpdesk@polar.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.16
10
10
 
11
11
  =end
12
12
 
@@ -14,12 +14,12 @@ require 'spec_helper'
14
14
  require 'json'
15
15
 
16
16
  # Unit tests for PolarAccesslink::ExercisesApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
18
  # Please update as you see appropriate
19
19
  describe 'ExercisesApi' do
20
20
  before do
21
21
  # run before each test
22
- @api_instance = PolarAccesslink::ExercisesApi.new
22
+ @instance = PolarAccesslink::ExercisesApi.new
23
23
  end
24
24
 
25
25
  after do
@@ -28,7 +28,7 @@ describe 'ExercisesApi' do
28
28
 
29
29
  describe 'test an instance of ExercisesApi' do
30
30
  it 'should create an instance of ExercisesApi' do
31
- expect(@api_instance).to be_instance_of(PolarAccesslink::ExercisesApi)
31
+ expect(@instance).to be_instance_of(PolarAccesslink::ExercisesApi)
32
32
  end
33
33
  end
34
34
 
@@ -37,7 +37,7 @@ describe 'ExercisesApi' do
37
37
  # FIT file for users exercise.
38
38
  # @param exercise_id Hashed exercise id.
39
39
  # @param [Hash] opts the optional parameters
40
- # @return [String]
40
+ # @return [nil]
41
41
  describe 'get_exercise_fit_without_transaction test' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -49,7 +49,7 @@ describe 'ExercisesApi' do
49
49
  # Get users exercise using hashed id.
50
50
  # @param exercise_id Hashed exercise id.
51
51
  # @param [Hash] opts the optional parameters
52
- # @return [ExerciseHashId]
52
+ # @return [nil]
53
53
  describe 'get_exercise_without_transaction test' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -60,7 +60,7 @@ describe 'ExercisesApi' do
60
60
  # List exercises
61
61
  # List users exercises available in Accesslink.
62
62
  # @param [Hash] opts the optional parameters
63
- # @return [Array<ExerciseHashId>]
63
+ # @return [nil]
64
64
  describe 'list_exercises_without_transaction test' do
65
65
  it 'should work' do
66
66
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers