notifo-io 1.0.0.1 → 1.0.0.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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/docs/{AddAllowedTopicRequest.md → AddAllowedTopicDto.md} +2 -2
  4. data/docs/AppDetailsDto.md +2 -2
  5. data/docs/AppDto.md +1 -1
  6. data/docs/EventDto.md +5 -5
  7. data/docs/EventsApi.md +6 -6
  8. data/docs/MediaApi.md +2 -2
  9. data/docs/MediaDto.md +2 -2
  10. data/docs/NotificationFormattingDto.md +8 -8
  11. data/docs/NotificationSend.md +15 -0
  12. data/docs/NotificationSettingDto.md +1 -1
  13. data/docs/ProfileDto.md +32 -0
  14. data/docs/{PublishRequestDto.md → PublishDto.md} +5 -5
  15. data/docs/PublishManyDto.md +18 -0
  16. data/docs/SchedulingDto.md +2 -2
  17. data/docs/SubscriptionDto.md +1 -1
  18. data/docs/TemplateDto.md +2 -2
  19. data/docs/TopicDto.md +1 -1
  20. data/docs/TopicsApi.md +0 -192
  21. data/docs/UpdateProfileDto.md +28 -0
  22. data/docs/UpsertTemplateDto.md +2 -2
  23. data/docs/UpsertUserDto.md +1 -1
  24. data/docs/UserApi.md +323 -0
  25. data/docs/UserDto.md +2 -2
  26. data/docs/UsersApi.md +12 -12
  27. data/lib/notifo.rb +7 -4
  28. data/lib/notifo/api/events_api.rb +9 -9
  29. data/lib/notifo/api/media_api.rb +2 -2
  30. data/lib/notifo/api/topics_api.rb +0 -189
  31. data/lib/notifo/api/user_api.rb +331 -0
  32. data/lib/notifo/api/users_api.rb +18 -18
  33. data/lib/notifo/models/{add_allowed_topic_request.rb → add_allowed_topic_dto.rb} +3 -3
  34. data/lib/notifo/models/app_details_dto.rb +5 -4
  35. data/lib/notifo/models/app_dto.rb +4 -2
  36. data/lib/notifo/models/event_dto.rb +14 -11
  37. data/lib/notifo/models/media_dto.rb +5 -5
  38. data/lib/notifo/models/notification_formatting_dto.rb +29 -29
  39. data/lib/notifo/models/notification_send.rb +39 -0
  40. data/lib/notifo/models/notification_setting_dto.rb +1 -3
  41. data/lib/notifo/models/profile_dto.rb +295 -0
  42. data/lib/notifo/models/{publish_request_dto.rb → publish_dto.rb} +10 -11
  43. data/lib/notifo/models/{publish_many_request_dto.rb → publish_many_dto.rb} +4 -4
  44. data/lib/notifo/models/scheduling_dto.rb +2 -5
  45. data/lib/notifo/models/subscription_dto.rb +5 -2
  46. data/lib/notifo/models/template_dto.rb +5 -4
  47. data/lib/notifo/models/topic_dto.rb +4 -2
  48. data/lib/notifo/models/{subscribe_dto.rb → update_profile_dto.rb} +65 -17
  49. data/lib/notifo/models/upsert_template_dto.rb +5 -4
  50. data/lib/notifo/models/upsert_user_dto.rb +4 -2
  51. data/lib/notifo/models/user_dto.rb +8 -4
  52. data/notifo-1.0.0.gem +0 -0
  53. data/notifo-io-1.0.0.gem +0 -0
  54. data/notifo.gemspec +5 -5
  55. data/spec/api/events_api_spec.rb +1 -1
  56. data/spec/api/media_api_spec.rb +1 -1
  57. data/spec/api/topics_api_spec.rb +0 -36
  58. data/spec/api/user_api_spec.rb +92 -0
  59. data/spec/api/users_api_spec.rb +2 -2
  60. data/spec/models/{add_allowed_topic_request_spec.rb → add_allowed_topic_dto_spec.rb} +6 -6
  61. data/spec/models/notification_send_spec.rb +28 -0
  62. data/spec/models/profile_dto_spec.rb +76 -0
  63. data/spec/models/{publish_request_dto_spec.rb → publish_dto_spec.rb} +6 -6
  64. data/spec/models/{publish_many_request_dto_spec.rb → publish_many_dto_spec.rb} +6 -6
  65. data/spec/models/update_profile_dto_spec.rb +64 -0
  66. metadata +35 -25
  67. data/docs/PublishManyRequestDto.md +0 -18
  68. data/docs/SubscribeDto.md +0 -20
  69. data/notifo-io-1.0.0.pre.beta.gem +0 -0
  70. data/notifo-io-1.0.0.pre.gem +0 -0
  71. data/spec/models/subscribe_dto_spec.rb +0 -40
@@ -17,7 +17,7 @@ require 'notifo/version'
17
17
  require 'notifo/configuration'
18
18
 
19
19
  # Models
20
- require 'notifo/models/add_allowed_topic_request'
20
+ require 'notifo/models/add_allowed_topic_dto'
21
21
  require 'notifo/models/add_contributor_dto'
22
22
  require 'notifo/models/app_contributor_dto'
23
23
  require 'notifo/models/app_details_dto'
@@ -41,16 +41,18 @@ require 'notifo/models/log_entry_dto'
41
41
  require 'notifo/models/media_dto'
42
42
  require 'notifo/models/media_type'
43
43
  require 'notifo/models/notification_formatting_dto'
44
+ require 'notifo/models/notification_send'
44
45
  require 'notifo/models/notification_setting_dto'
45
- require 'notifo/models/publish_many_request_dto'
46
- require 'notifo/models/publish_request_dto'
46
+ require 'notifo/models/profile_dto'
47
+ require 'notifo/models/publish_dto'
48
+ require 'notifo/models/publish_many_dto'
47
49
  require 'notifo/models/resize_mode'
48
50
  require 'notifo/models/scheduling_dto'
49
51
  require 'notifo/models/scheduling_type'
50
- require 'notifo/models/subscribe_dto'
51
52
  require 'notifo/models/subscription_dto'
52
53
  require 'notifo/models/template_dto'
53
54
  require 'notifo/models/topic_dto'
55
+ require 'notifo/models/update_profile_dto'
54
56
  require 'notifo/models/upsert_app_dto'
55
57
  require 'notifo/models/upsert_template_dto'
56
58
  require 'notifo/models/upsert_templates_dto'
@@ -66,6 +68,7 @@ require 'notifo/api/logs_api'
66
68
  require 'notifo/api/media_api'
67
69
  require 'notifo/api/templates_api'
68
70
  require 'notifo/api/topics_api'
71
+ require 'notifo/api/user_api'
69
72
  require 'notifo/api/users_api'
70
73
 
71
74
  module Notifo
@@ -91,20 +91,20 @@ module Notifo
91
91
 
92
92
  # Publish events.
93
93
  # @param app_id [String] The app where the events belongs to.
94
- # @param publish_many_request_dto [PublishManyRequestDto] The publish request.
94
+ # @param publish_many_dto [PublishManyDto] The publish request.
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [nil]
97
- def events_post_events(app_id, publish_many_request_dto, opts = {})
98
- events_post_events_with_http_info(app_id, publish_many_request_dto, opts)
97
+ def events_post_events(app_id, publish_many_dto, opts = {})
98
+ events_post_events_with_http_info(app_id, publish_many_dto, opts)
99
99
  nil
100
100
  end
101
101
 
102
102
  # Publish events.
103
103
  # @param app_id [String] The app where the events belongs to.
104
- # @param publish_many_request_dto [PublishManyRequestDto] The publish request.
104
+ # @param publish_many_dto [PublishManyDto] The publish request.
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
- def events_post_events_with_http_info(app_id, publish_many_request_dto, opts = {})
107
+ def events_post_events_with_http_info(app_id, publish_many_dto, opts = {})
108
108
  if @api_client.config.debugging
109
109
  @api_client.config.logger.debug 'Calling API: EventsApi.events_post_events ...'
110
110
  end
@@ -112,9 +112,9 @@ module Notifo
112
112
  if @api_client.config.client_side_validation && app_id.nil?
113
113
  fail ArgumentError, "Missing the required parameter 'app_id' when calling EventsApi.events_post_events"
114
114
  end
115
- # verify the required parameter 'publish_many_request_dto' is set
116
- if @api_client.config.client_side_validation && publish_many_request_dto.nil?
117
- fail ArgumentError, "Missing the required parameter 'publish_many_request_dto' when calling EventsApi.events_post_events"
115
+ # verify the required parameter 'publish_many_dto' is set
116
+ if @api_client.config.client_side_validation && publish_many_dto.nil?
117
+ fail ArgumentError, "Missing the required parameter 'publish_many_dto' when calling EventsApi.events_post_events"
118
118
  end
119
119
  # resource path
120
120
  local_var_path = '/api/apps/{appId}/events'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
@@ -133,7 +133,7 @@ module Notifo
133
133
  form_params = opts[:form_params] || {}
134
134
 
135
135
  # http body (model)
136
- post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_many_request_dto)
136
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_many_dto)
137
137
 
138
138
  # return_type
139
139
  return_type = opts[:debug_return_type]
@@ -96,7 +96,7 @@ module Notifo
96
96
  # @option opts [Integer] :height The target height when an image.
97
97
  # @option opts [Integer] :quality The target quality when an image.
98
98
  # @option opts [String] :preset A preset dimension.
99
- # @option opts [OneOfResizeMode] :mode The resize mode.
99
+ # @option opts [ResizeMode] :mode The resize mode.
100
100
  # @option opts [Float] :focus_x The x position of the focues point.
101
101
  # @option opts [Float] :focus_y The y position of the focues point.
102
102
  # @option opts [Boolean] :force True to resize it and clear the cache.
@@ -116,7 +116,7 @@ module Notifo
116
116
  # @option opts [Integer] :height The target height when an image.
117
117
  # @option opts [Integer] :quality The target quality when an image.
118
118
  # @option opts [String] :preset A preset dimension.
119
- # @option opts [OneOfResizeMode] :mode The resize mode.
119
+ # @option opts [ResizeMode] :mode The resize mode.
120
120
  # @option opts [Float] :focus_x The x position of the focues point.
121
121
  # @option opts [Float] :focus_y The y position of the focues point.
122
122
  # @option opts [Boolean] :force True to resize it and clear the cache.
@@ -19,69 +19,6 @@ module Notifo
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Gets a user subscription.
23
- # User Id and App Id are resolved using the API token.
24
- # @param topic [String] The topic path.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def topics_get_subscription(topic, opts = {})
28
- topics_get_subscription_with_http_info(topic, opts)
29
- nil
30
- end
31
-
32
- # Gets a user subscription.
33
- # User Id and App Id are resolved using the API token.
34
- # @param topic [String] The topic path.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
- def topics_get_subscription_with_http_info(topic, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: TopicsApi.topics_get_subscription ...'
40
- end
41
- # verify the required parameter 'topic' is set
42
- if @api_client.config.client_side_validation && topic.nil?
43
- fail ArgumentError, "Missing the required parameter 'topic' when calling TopicsApi.topics_get_subscription"
44
- end
45
- # resource path
46
- local_var_path = '/api/web/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
-
56
- # form parameters
57
- form_params = opts[:form_params] || {}
58
-
59
- # http body (model)
60
- post_body = opts[:debug_body]
61
-
62
- # return_type
63
- return_type = opts[:debug_return_type]
64
-
65
- # auth_names
66
- auth_names = opts[:debug_auth_names] || []
67
-
68
- new_options = opts.merge(
69
- :operation => :"TopicsApi.topics_get_subscription",
70
- :header_params => header_params,
71
- :query_params => query_params,
72
- :form_params => form_params,
73
- :body => post_body,
74
- :auth_names => auth_names,
75
- :return_type => return_type
76
- )
77
-
78
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
79
- if @api_client.config.debugging
80
- @api_client.config.logger.debug "API called: TopicsApi#topics_get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
- end
82
- return data, status_code, headers
83
- end
84
-
85
22
  # Query topics.
86
23
  # @param app_id [String] The app where the topics belongs to.
87
24
  # @param [Hash] opts the optional parameters
@@ -151,131 +88,5 @@ module Notifo
151
88
  end
152
89
  return data, status_code, headers
153
90
  end
154
-
155
- # Creates a user subscription.
156
- # User Id and App Id are resolved using the API token.
157
- # @param topic [String] The topic path.
158
- # @param [Hash] opts the optional parameters
159
- # @return [nil]
160
- def topics_subscribe(topic, opts = {})
161
- topics_subscribe_with_http_info(topic, opts)
162
- nil
163
- end
164
-
165
- # Creates a user subscription.
166
- # User Id and App Id are resolved using the API token.
167
- # @param topic [String] The topic path.
168
- # @param [Hash] opts the optional parameters
169
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
170
- def topics_subscribe_with_http_info(topic, opts = {})
171
- if @api_client.config.debugging
172
- @api_client.config.logger.debug 'Calling API: TopicsApi.topics_subscribe ...'
173
- end
174
- # verify the required parameter 'topic' is set
175
- if @api_client.config.client_side_validation && topic.nil?
176
- fail ArgumentError, "Missing the required parameter 'topic' when calling TopicsApi.topics_subscribe"
177
- end
178
- # resource path
179
- local_var_path = '/api/web/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
180
-
181
- # query parameters
182
- query_params = opts[:query_params] || {}
183
-
184
- # header parameters
185
- header_params = opts[:header_params] || {}
186
- # HTTP header 'Accept' (if needed)
187
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
188
-
189
- # form parameters
190
- form_params = opts[:form_params] || {}
191
-
192
- # http body (model)
193
- post_body = opts[:debug_body]
194
-
195
- # return_type
196
- return_type = opts[:debug_return_type]
197
-
198
- # auth_names
199
- auth_names = opts[:debug_auth_names] || []
200
-
201
- new_options = opts.merge(
202
- :operation => :"TopicsApi.topics_subscribe",
203
- :header_params => header_params,
204
- :query_params => query_params,
205
- :form_params => form_params,
206
- :body => post_body,
207
- :auth_names => auth_names,
208
- :return_type => return_type
209
- )
210
-
211
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
212
- if @api_client.config.debugging
213
- @api_client.config.logger.debug "API called: TopicsApi#topics_subscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
- end
215
- return data, status_code, headers
216
- end
217
-
218
- # Deletes a user subscription.
219
- # User Id and App Id are resolved using the API token.
220
- # @param topic [String] The topic path.
221
- # @param [Hash] opts the optional parameters
222
- # @return [nil]
223
- def topics_unsubscribe(topic, opts = {})
224
- topics_unsubscribe_with_http_info(topic, opts)
225
- nil
226
- end
227
-
228
- # Deletes a user subscription.
229
- # User Id and App Id are resolved using the API token.
230
- # @param topic [String] The topic path.
231
- # @param [Hash] opts the optional parameters
232
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
233
- def topics_unsubscribe_with_http_info(topic, opts = {})
234
- if @api_client.config.debugging
235
- @api_client.config.logger.debug 'Calling API: TopicsApi.topics_unsubscribe ...'
236
- end
237
- # verify the required parameter 'topic' is set
238
- if @api_client.config.client_side_validation && topic.nil?
239
- fail ArgumentError, "Missing the required parameter 'topic' when calling TopicsApi.topics_unsubscribe"
240
- end
241
- # resource path
242
- local_var_path = '/api/web/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
243
-
244
- # query parameters
245
- query_params = opts[:query_params] || {}
246
-
247
- # header parameters
248
- header_params = opts[:header_params] || {}
249
- # HTTP header 'Accept' (if needed)
250
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
251
-
252
- # form parameters
253
- form_params = opts[:form_params] || {}
254
-
255
- # http body (model)
256
- post_body = opts[:debug_body]
257
-
258
- # return_type
259
- return_type = opts[:debug_return_type]
260
-
261
- # auth_names
262
- auth_names = opts[:debug_auth_names] || []
263
-
264
- new_options = opts.merge(
265
- :operation => :"TopicsApi.topics_unsubscribe",
266
- :header_params => header_params,
267
- :query_params => query_params,
268
- :form_params => form_params,
269
- :body => post_body,
270
- :auth_names => auth_names,
271
- :return_type => return_type
272
- )
273
-
274
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
275
- if @api_client.config.debugging
276
- @api_client.config.logger.debug "API called: TopicsApi#topics_unsubscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
277
- end
278
- return data, status_code, headers
279
- end
280
91
  end
281
92
  end
@@ -0,0 +1,331 @@
1
+ =begin
2
+ #Notifo API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Notifo
16
+ class UserApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Deletes a user subscription.
23
+ # User Id and App Id are resolved using the API token.
24
+ # @param topic [String] The topic path.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def user_delete_subscription(topic, opts = {})
28
+ user_delete_subscription_with_http_info(topic, opts)
29
+ nil
30
+ end
31
+
32
+ # Deletes a user subscription.
33
+ # User Id and App Id are resolved using the API token.
34
+ # @param topic [String] The topic path.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def user_delete_subscription_with_http_info(topic, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: UserApi.user_delete_subscription ...'
40
+ end
41
+ # verify the required parameter 'topic' is set
42
+ if @api_client.config.client_side_validation && topic.nil?
43
+ fail ArgumentError, "Missing the required parameter 'topic' when calling UserApi.user_delete_subscription"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/me/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type]
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || []
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"UserApi.user_delete_subscription",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: UserApi#user_delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Gets a user subscription.
86
+ # User Id and App Id are resolved using the API token.
87
+ # @param topic [String] The topic path.
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [SubscriptionDto]
90
+ def user_get_subscription(topic, opts = {})
91
+ data, _status_code, _headers = user_get_subscription_with_http_info(topic, opts)
92
+ data
93
+ end
94
+
95
+ # Gets a user subscription.
96
+ # User Id and App Id are resolved using the API token.
97
+ # @param topic [String] The topic path.
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(SubscriptionDto, Integer, Hash)>] SubscriptionDto data, response status code and response headers
100
+ def user_get_subscription_with_http_info(topic, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: UserApi.user_get_subscription ...'
103
+ end
104
+ # verify the required parameter 'topic' is set
105
+ if @api_client.config.client_side_validation && topic.nil?
106
+ fail ArgumentError, "Missing the required parameter 'topic' when calling UserApi.user_get_subscription"
107
+ end
108
+ # resource path
109
+ local_var_path = '/api/me/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type] || 'SubscriptionDto'
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || []
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"UserApi.user_get_subscription",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: UserApi#user_get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Get the current user.
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [ProfileDto]
151
+ def user_get_user(opts = {})
152
+ data, _status_code, _headers = user_get_user_with_http_info(opts)
153
+ data
154
+ end
155
+
156
+ # Get the current user.
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [Array<(ProfileDto, Integer, Hash)>] ProfileDto data, response status code and response headers
159
+ def user_get_user_with_http_info(opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: UserApi.user_get_user ...'
162
+ end
163
+ # resource path
164
+ local_var_path = '/api/me'
165
+
166
+ # query parameters
167
+ query_params = opts[:query_params] || {}
168
+
169
+ # header parameters
170
+ header_params = opts[:header_params] || {}
171
+ # HTTP header 'Accept' (if needed)
172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
173
+
174
+ # form parameters
175
+ form_params = opts[:form_params] || {}
176
+
177
+ # http body (model)
178
+ post_body = opts[:debug_body]
179
+
180
+ # return_type
181
+ return_type = opts[:debug_return_type] || 'ProfileDto'
182
+
183
+ # auth_names
184
+ auth_names = opts[:debug_auth_names] || []
185
+
186
+ new_options = opts.merge(
187
+ :operation => :"UserApi.user_get_user",
188
+ :header_params => header_params,
189
+ :query_params => query_params,
190
+ :form_params => form_params,
191
+ :body => post_body,
192
+ :auth_names => auth_names,
193
+ :return_type => return_type
194
+ )
195
+
196
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
197
+ if @api_client.config.debugging
198
+ @api_client.config.logger.debug "API called: UserApi#user_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
199
+ end
200
+ return data, status_code, headers
201
+ end
202
+
203
+ # Creates a user subscription.
204
+ # User Id and App Id are resolved using the API token.
205
+ # @param subscription_dto [SubscriptionDto] The subscription settings.
206
+ # @param [Hash] opts the optional parameters
207
+ # @return [nil]
208
+ def user_post_subscription(subscription_dto, opts = {})
209
+ user_post_subscription_with_http_info(subscription_dto, opts)
210
+ nil
211
+ end
212
+
213
+ # Creates a user subscription.
214
+ # User Id and App Id are resolved using the API token.
215
+ # @param subscription_dto [SubscriptionDto] The subscription settings.
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
218
+ def user_post_subscription_with_http_info(subscription_dto, opts = {})
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug 'Calling API: UserApi.user_post_subscription ...'
221
+ end
222
+ # verify the required parameter 'subscription_dto' is set
223
+ if @api_client.config.client_side_validation && subscription_dto.nil?
224
+ fail ArgumentError, "Missing the required parameter 'subscription_dto' when calling UserApi.user_post_subscription"
225
+ end
226
+ # resource path
227
+ local_var_path = '/api/me/subscriptions'
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
236
+ # HTTP header 'Content-Type'
237
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
238
+
239
+ # form parameters
240
+ form_params = opts[:form_params] || {}
241
+
242
+ # http body (model)
243
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_dto)
244
+
245
+ # return_type
246
+ return_type = opts[:debug_return_type]
247
+
248
+ # auth_names
249
+ auth_names = opts[:debug_auth_names] || []
250
+
251
+ new_options = opts.merge(
252
+ :operation => :"UserApi.user_post_subscription",
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => return_type
259
+ )
260
+
261
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: UserApi#user_post_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+
268
+ # Update the user.
269
+ # @param update_profile_dto [UpdateProfileDto] The upsert request.
270
+ # @param [Hash] opts the optional parameters
271
+ # @return [ProfileDto]
272
+ def user_post_user(update_profile_dto, opts = {})
273
+ data, _status_code, _headers = user_post_user_with_http_info(update_profile_dto, opts)
274
+ data
275
+ end
276
+
277
+ # Update the user.
278
+ # @param update_profile_dto [UpdateProfileDto] The upsert request.
279
+ # @param [Hash] opts the optional parameters
280
+ # @return [Array<(ProfileDto, Integer, Hash)>] ProfileDto data, response status code and response headers
281
+ def user_post_user_with_http_info(update_profile_dto, opts = {})
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug 'Calling API: UserApi.user_post_user ...'
284
+ end
285
+ # verify the required parameter 'update_profile_dto' is set
286
+ if @api_client.config.client_side_validation && update_profile_dto.nil?
287
+ fail ArgumentError, "Missing the required parameter 'update_profile_dto' when calling UserApi.user_post_user"
288
+ end
289
+ # resource path
290
+ local_var_path = '/api/me'
291
+
292
+ # query parameters
293
+ query_params = opts[:query_params] || {}
294
+
295
+ # header parameters
296
+ header_params = opts[:header_params] || {}
297
+ # HTTP header 'Accept' (if needed)
298
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
299
+ # HTTP header 'Content-Type'
300
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
301
+
302
+ # form parameters
303
+ form_params = opts[:form_params] || {}
304
+
305
+ # http body (model)
306
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_profile_dto)
307
+
308
+ # return_type
309
+ return_type = opts[:debug_return_type] || 'ProfileDto'
310
+
311
+ # auth_names
312
+ auth_names = opts[:debug_auth_names] || []
313
+
314
+ new_options = opts.merge(
315
+ :operation => :"UserApi.user_post_user",
316
+ :header_params => header_params,
317
+ :query_params => query_params,
318
+ :form_params => form_params,
319
+ :body => post_body,
320
+ :auth_names => auth_names,
321
+ :return_type => return_type
322
+ )
323
+
324
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
325
+ if @api_client.config.debugging
326
+ @api_client.config.logger.debug "API called: UserApi#user_post_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
327
+ end
328
+ return data, status_code, headers
329
+ end
330
+ end
331
+ end