mx-platform-ruby 0.39.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/BudgetCreateRequest.md +26 -0
  4. data/docs/BudgetCreateRequestBody.md +18 -0
  5. data/docs/BudgetResponse.md +48 -0
  6. data/docs/BudgetResponseBody.md +18 -0
  7. data/docs/BudgetUpdateRequest.md +22 -0
  8. data/docs/BudgetUpdateRequestBody.md +18 -0
  9. data/docs/BudgetsApi.md +444 -0
  10. data/docs/CreditCardProduct.md +8 -8
  11. data/docs/CreditCardProductResponse.md +2 -2
  12. data/docs/GoalRequest.md +38 -0
  13. data/docs/GoalRequestBody.md +18 -0
  14. data/docs/GoalResponse.md +48 -0
  15. data/docs/GoalResponseBody.md +18 -0
  16. data/docs/GoalsApi.md +450 -0
  17. data/docs/GoalsResponse.md +48 -0
  18. data/docs/GoalsResponseBody.md +20 -0
  19. data/docs/MonthlyCashFlowProfileRequest.md +20 -0
  20. data/docs/MonthlyCashFlowProfileRequestBody.md +18 -0
  21. data/docs/MonthlyCashFlowResponse.md +30 -0
  22. data/docs/MonthlyCashFlowResponseBody.md +18 -0
  23. data/docs/MxPlatformApi.md +291 -0
  24. data/docs/RepositionRequest.md +20 -0
  25. data/docs/RepositionRequestBody.md +18 -0
  26. data/docs/RepositionResponseBody.md +18 -0
  27. data/docs/RewardResponse.md +2 -0
  28. data/docs/RewardsResponse.md +2 -0
  29. data/docs/SplitTransactionRequest.md +24 -0
  30. data/docs/SplitTransactionRequestBody.md +18 -0
  31. data/docs/SplitTransactionsResponseBody.md +18 -0
  32. data/docs/UpdateGoalRequest.md +38 -0
  33. data/docs/UpdateGoalRequestBody.md +18 -0
  34. data/lib/mx-platform-ruby/api/budgets_api.rb +434 -0
  35. data/lib/mx-platform-ruby/api/goals_api.rb +455 -0
  36. data/lib/mx-platform-ruby/api/mx_platform_api.rb +278 -0
  37. data/lib/mx-platform-ruby/models/budget_create_request.rb +269 -0
  38. data/lib/mx-platform-ruby/models/budget_create_request_body.rb +214 -0
  39. data/lib/mx-platform-ruby/models/budget_response.rb +373 -0
  40. data/lib/mx-platform-ruby/models/budget_response_body.rb +214 -0
  41. data/lib/mx-platform-ruby/models/budget_update_request.rb +235 -0
  42. data/lib/mx-platform-ruby/models/budget_update_request_body.rb +214 -0
  43. data/lib/mx-platform-ruby/models/credit_card_product.rb +17 -21
  44. data/lib/mx-platform-ruby/models/credit_card_product_response.rb +7 -7
  45. data/lib/mx-platform-ruby/models/goal_request.rb +350 -0
  46. data/lib/mx-platform-ruby/models/goal_request_body.rb +214 -0
  47. data/lib/mx-platform-ruby/models/goal_response.rb +364 -0
  48. data/lib/mx-platform-ruby/models/goal_response_body.rb +214 -0
  49. data/lib/mx-platform-ruby/models/goals_response.rb +363 -0
  50. data/lib/mx-platform-ruby/models/goals_response_body.rb +225 -0
  51. data/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request.rb +225 -0
  52. data/lib/mx-platform-ruby/models/monthly_cash_flow_profile_request_body.rb +214 -0
  53. data/lib/mx-platform-ruby/models/monthly_cash_flow_response.rb +274 -0
  54. data/lib/mx-platform-ruby/models/monthly_cash_flow_response_body.rb +214 -0
  55. data/lib/mx-platform-ruby/models/reposition_request.rb +239 -0
  56. data/lib/mx-platform-ruby/models/reposition_request_body.rb +216 -0
  57. data/lib/mx-platform-ruby/models/reposition_response_body.rb +216 -0
  58. data/lib/mx-platform-ruby/models/reward_response.rb +10 -1
  59. data/lib/mx-platform-ruby/models/rewards_response.rb +10 -1
  60. data/lib/mx-platform-ruby/models/split_transaction_request.rb +252 -0
  61. data/lib/mx-platform-ruby/models/split_transaction_request_body.rb +221 -0
  62. data/lib/mx-platform-ruby/models/split_transactions_response_body.rb +216 -0
  63. data/lib/mx-platform-ruby/models/update_goal_request.rb +315 -0
  64. data/lib/mx-platform-ruby/models/update_goal_request_body.rb +214 -0
  65. data/lib/mx-platform-ruby/version.rb +1 -1
  66. data/lib/mx-platform-ruby.rb +26 -0
  67. data/openapi/config.yml +1 -1
  68. data/spec/api/budgets_api_spec.rb +112 -0
  69. data/spec/api/goals_api_spec.rb +115 -0
  70. data/spec/api/mx_platform_api_spec.rb +51 -0
  71. data/spec/models/budget_create_request_body_spec.rb +34 -0
  72. data/spec/models/budget_create_request_spec.rb +58 -0
  73. data/spec/models/budget_response_body_spec.rb +34 -0
  74. data/spec/models/budget_response_spec.rb +124 -0
  75. data/spec/models/budget_update_request_body_spec.rb +34 -0
  76. data/spec/models/budget_update_request_spec.rb +46 -0
  77. data/spec/models/credit_card_product_response_spec.rb +1 -1
  78. data/spec/models/credit_card_product_spec.rb +2 -2
  79. data/spec/models/goal_request_body_spec.rb +34 -0
  80. data/spec/models/goal_request_spec.rb +94 -0
  81. data/spec/models/goal_response_body_spec.rb +34 -0
  82. data/spec/models/goal_response_spec.rb +124 -0
  83. data/spec/models/goals_response_body_spec.rb +40 -0
  84. data/spec/models/goals_response_spec.rb +124 -0
  85. data/spec/models/monthly_cash_flow_profile_request_body_spec.rb +34 -0
  86. data/spec/models/monthly_cash_flow_profile_request_spec.rb +40 -0
  87. data/spec/models/monthly_cash_flow_response_body_spec.rb +34 -0
  88. data/spec/models/monthly_cash_flow_response_spec.rb +70 -0
  89. data/spec/models/reposition_request_body_spec.rb +34 -0
  90. data/spec/models/reposition_request_spec.rb +40 -0
  91. data/spec/models/reposition_response_body_spec.rb +34 -0
  92. data/spec/models/reward_response_spec.rb +6 -0
  93. data/spec/models/rewards_response_spec.rb +6 -0
  94. data/spec/models/split_transaction_request_body_spec.rb +34 -0
  95. data/spec/models/split_transaction_request_spec.rb +52 -0
  96. data/spec/models/split_transactions_response_body_spec.rb +34 -0
  97. data/spec/models/update_goal_request_body_spec.rb +34 -0
  98. data/spec/models/update_goal_request_spec.rb +94 -0
  99. metadata +106 -2
@@ -0,0 +1,455 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MxPlatformRuby
16
+ class GoalsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List goals
23
+ # List all goals a user can set.
24
+ # @param user_guid [String] The unique identifier for the user.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :page Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified.
27
+ # @option opts [String] :records_per_age The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used.
28
+ # @return [GoalsResponseBody]
29
+ def users_user_guid_goals_get(user_guid, opts = {})
30
+ data, _status_code, _headers = users_user_guid_goals_get_with_http_info(user_guid, opts)
31
+ data
32
+ end
33
+
34
+ # List goals
35
+ # List all goals a user can set.
36
+ # @param user_guid [String] The unique identifier for the user.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :page Results are returned in paginated sets, this is the page of the results you would like to view. Defaults to page 1 if no page is specified.
39
+ # @option opts [String] :records_per_age The supported range is from 10 to 1000. If the records_per_page parameter is not specified or is outside this range, a default of 25 records per page will be used.
40
+ # @return [Array<(GoalsResponseBody, Integer, Hash)>] GoalsResponseBody data, response status code and response headers
41
+ def users_user_guid_goals_get_with_http_info(user_guid, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_get ...'
44
+ end
45
+ # verify the required parameter 'user_guid' is set
46
+ if @api_client.config.client_side_validation && user_guid.nil?
47
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_get"
48
+ end
49
+ # resource path
50
+ local_var_path = '/users/{user_guid}/goals'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
55
+ query_params[:'records_per_age'] = opts[:'records_per_age'] if !opts[:'records_per_age'].nil?
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body]
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'GoalsResponseBody'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"GoalsApi.users_user_guid_goals_get",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Delete a goal
92
+ # Delete a goal.
93
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
94
+ # @param user_guid [String] The unique identifier for a user.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [nil]
97
+ def users_user_guid_goals_goal_guid_delete(goal_guid, user_guid, opts = {})
98
+ users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid, opts)
99
+ nil
100
+ end
101
+
102
+ # Delete a goal
103
+ # Delete a goal.
104
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
105
+ # @param user_guid [String] The unique identifier for a user.
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
108
+ def users_user_guid_goals_goal_guid_delete_with_http_info(goal_guid, user_guid, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_delete ...'
111
+ end
112
+ # verify the required parameter 'goal_guid' is set
113
+ if @api_client.config.client_side_validation && goal_guid.nil?
114
+ fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_delete"
115
+ end
116
+ # verify the required parameter 'user_guid' is set
117
+ if @api_client.config.client_side_validation && user_guid.nil?
118
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_delete"
119
+ end
120
+ # resource path
121
+ local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+
126
+ # header parameters
127
+ header_params = opts[:header_params] || {}
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body]
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"GoalsApi.users_user_guid_goals_goal_guid_delete",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Read a goal
159
+ # Read a specific goal.
160
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
161
+ # @param user_guid [String] The unique identifier for a user.
162
+ # @param [Hash] opts the optional parameters
163
+ # @return [GoalResponseBody]
164
+ def users_user_guid_goals_goal_guid_get(goal_guid, user_guid, opts = {})
165
+ data, _status_code, _headers = users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid, opts)
166
+ data
167
+ end
168
+
169
+ # Read a goal
170
+ # Read a specific goal.
171
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
172
+ # @param user_guid [String] The unique identifier for a user.
173
+ # @param [Hash] opts the optional parameters
174
+ # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers
175
+ def users_user_guid_goals_goal_guid_get_with_http_info(goal_guid, user_guid, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_get ...'
178
+ end
179
+ # verify the required parameter 'goal_guid' is set
180
+ if @api_client.config.client_side_validation && goal_guid.nil?
181
+ fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_get"
182
+ end
183
+ # verify the required parameter 'user_guid' is set
184
+ if @api_client.config.client_side_validation && user_guid.nil?
185
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_get"
186
+ end
187
+ # resource path
188
+ local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+
193
+ # header parameters
194
+ header_params = opts[:header_params] || {}
195
+ # HTTP header 'Accept' (if needed)
196
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:debug_body]
203
+
204
+ # return_type
205
+ return_type = opts[:debug_return_type] || 'GoalResponseBody'
206
+
207
+ # auth_names
208
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
209
+
210
+ new_options = opts.merge(
211
+ :operation => :"GoalsApi.users_user_guid_goals_goal_guid_get",
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => return_type
218
+ )
219
+
220
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+
227
+ # Update a goal
228
+ # This endpoint updates a specific goal.
229
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
230
+ # @param user_guid [String] The unique identifier for a user.
231
+ # @param update_goal_request_body [UpdateGoalRequestBody]
232
+ # @param [Hash] opts the optional parameters
233
+ # @return [GoalResponseBody]
234
+ def users_user_guid_goals_goal_guid_put(goal_guid, user_guid, update_goal_request_body, opts = {})
235
+ data, _status_code, _headers = users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body, opts)
236
+ data
237
+ end
238
+
239
+ # Update a goal
240
+ # This endpoint updates a specific goal.
241
+ # @param goal_guid [String] The unique identifier for a goal. Defined by MX.
242
+ # @param user_guid [String] The unique identifier for a user.
243
+ # @param update_goal_request_body [UpdateGoalRequestBody]
244
+ # @param [Hash] opts the optional parameters
245
+ # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers
246
+ def users_user_guid_goals_goal_guid_put_with_http_info(goal_guid, user_guid, update_goal_request_body, opts = {})
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_goal_guid_put ...'
249
+ end
250
+ # verify the required parameter 'goal_guid' is set
251
+ if @api_client.config.client_side_validation && goal_guid.nil?
252
+ fail ArgumentError, "Missing the required parameter 'goal_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_put"
253
+ end
254
+ # verify the required parameter 'user_guid' is set
255
+ if @api_client.config.client_side_validation && user_guid.nil?
256
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_goal_guid_put"
257
+ end
258
+ # verify the required parameter 'update_goal_request_body' is set
259
+ if @api_client.config.client_side_validation && update_goal_request_body.nil?
260
+ fail ArgumentError, "Missing the required parameter 'update_goal_request_body' when calling GoalsApi.users_user_guid_goals_goal_guid_put"
261
+ end
262
+ # resource path
263
+ local_var_path = '/users/{user_guid}/goals/{goal_guid}'.sub('{' + 'goal_guid' + '}', CGI.escape(goal_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
264
+
265
+ # query parameters
266
+ query_params = opts[:query_params] || {}
267
+
268
+ # header parameters
269
+ header_params = opts[:header_params] || {}
270
+ # HTTP header 'Accept' (if needed)
271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
272
+ # HTTP header 'Content-Type'
273
+ content_type = @api_client.select_header_content_type(['application/json'])
274
+ if !content_type.nil?
275
+ header_params['Content-Type'] = content_type
276
+ end
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_goal_request_body)
283
+
284
+ # return_type
285
+ return_type = opts[:debug_return_type] || 'GoalResponseBody'
286
+
287
+ # auth_names
288
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
289
+
290
+ new_options = opts.merge(
291
+ :operation => :"GoalsApi.users_user_guid_goals_goal_guid_put",
292
+ :header_params => header_params,
293
+ :query_params => query_params,
294
+ :form_params => form_params,
295
+ :body => post_body,
296
+ :auth_names => auth_names,
297
+ :return_type => return_type
298
+ )
299
+
300
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_goal_guid_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+
307
+ # Create a goal
308
+ # Create a goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter.
309
+ # @param user_guid [String] The unique identifier for the user.
310
+ # @param goal_request_body [GoalRequestBody]
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [GoalResponseBody]
313
+ def users_user_guid_goals_post(user_guid, goal_request_body, opts = {})
314
+ data, _status_code, _headers = users_user_guid_goals_post_with_http_info(user_guid, goal_request_body, opts)
315
+ data
316
+ end
317
+
318
+ # Create a goal
319
+ # Create a goal. This endpoint accepts the optional &#x60;MX-Skip-Webhook&#x60; header and &#x60;skip_webhook&#x60; parameter.
320
+ # @param user_guid [String] The unique identifier for the user.
321
+ # @param goal_request_body [GoalRequestBody]
322
+ # @param [Hash] opts the optional parameters
323
+ # @return [Array<(GoalResponseBody, Integer, Hash)>] GoalResponseBody data, response status code and response headers
324
+ def users_user_guid_goals_post_with_http_info(user_guid, goal_request_body, opts = {})
325
+ if @api_client.config.debugging
326
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_post ...'
327
+ end
328
+ # verify the required parameter 'user_guid' is set
329
+ if @api_client.config.client_side_validation && user_guid.nil?
330
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_post"
331
+ end
332
+ # verify the required parameter 'goal_request_body' is set
333
+ if @api_client.config.client_side_validation && goal_request_body.nil?
334
+ fail ArgumentError, "Missing the required parameter 'goal_request_body' when calling GoalsApi.users_user_guid_goals_post"
335
+ end
336
+ # resource path
337
+ local_var_path = '/users/{user_guid}/goals'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
338
+
339
+ # query parameters
340
+ query_params = opts[:query_params] || {}
341
+
342
+ # header parameters
343
+ header_params = opts[:header_params] || {}
344
+ # HTTP header 'Accept' (if needed)
345
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
346
+ # HTTP header 'Content-Type'
347
+ content_type = @api_client.select_header_content_type(['application/json'])
348
+ if !content_type.nil?
349
+ header_params['Content-Type'] = content_type
350
+ end
351
+
352
+ # form parameters
353
+ form_params = opts[:form_params] || {}
354
+
355
+ # http body (model)
356
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(goal_request_body)
357
+
358
+ # return_type
359
+ return_type = opts[:debug_return_type] || 'GoalResponseBody'
360
+
361
+ # auth_names
362
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
363
+
364
+ new_options = opts.merge(
365
+ :operation => :"GoalsApi.users_user_guid_goals_post",
366
+ :header_params => header_params,
367
+ :query_params => query_params,
368
+ :form_params => form_params,
369
+ :body => post_body,
370
+ :auth_names => auth_names,
371
+ :return_type => return_type
372
+ )
373
+
374
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
377
+ end
378
+ return data, status_code, headers
379
+ end
380
+
381
+ # Reposition goals
382
+ # This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly.
383
+ # @param user_guid [String] The unique identifier for the user.
384
+ # @param reposition_request_body [RepositionRequestBody]
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [RepositionResponseBody]
387
+ def users_user_guid_goals_reposition_put(user_guid, reposition_request_body, opts = {})
388
+ data, _status_code, _headers = users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body, opts)
389
+ data
390
+ end
391
+
392
+ # Reposition goals
393
+ # This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly.
394
+ # @param user_guid [String] The unique identifier for the user.
395
+ # @param reposition_request_body [RepositionRequestBody]
396
+ # @param [Hash] opts the optional parameters
397
+ # @return [Array<(RepositionResponseBody, Integer, Hash)>] RepositionResponseBody data, response status code and response headers
398
+ def users_user_guid_goals_reposition_put_with_http_info(user_guid, reposition_request_body, opts = {})
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug 'Calling API: GoalsApi.users_user_guid_goals_reposition_put ...'
401
+ end
402
+ # verify the required parameter 'user_guid' is set
403
+ if @api_client.config.client_side_validation && user_guid.nil?
404
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling GoalsApi.users_user_guid_goals_reposition_put"
405
+ end
406
+ # verify the required parameter 'reposition_request_body' is set
407
+ if @api_client.config.client_side_validation && reposition_request_body.nil?
408
+ fail ArgumentError, "Missing the required parameter 'reposition_request_body' when calling GoalsApi.users_user_guid_goals_reposition_put"
409
+ end
410
+ # resource path
411
+ local_var_path = '/users/{user_guid}/goals/reposition'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
412
+
413
+ # query parameters
414
+ query_params = opts[:query_params] || {}
415
+
416
+ # header parameters
417
+ header_params = opts[:header_params] || {}
418
+ # HTTP header 'Accept' (if needed)
419
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
420
+ # HTTP header 'Content-Type'
421
+ content_type = @api_client.select_header_content_type(['application/json'])
422
+ if !content_type.nil?
423
+ header_params['Content-Type'] = content_type
424
+ end
425
+
426
+ # form parameters
427
+ form_params = opts[:form_params] || {}
428
+
429
+ # http body (model)
430
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(reposition_request_body)
431
+
432
+ # return_type
433
+ return_type = opts[:debug_return_type] || 'RepositionResponseBody'
434
+
435
+ # auth_names
436
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
437
+
438
+ new_options = opts.merge(
439
+ :operation => :"GoalsApi.users_user_guid_goals_reposition_put",
440
+ :header_params => header_params,
441
+ :query_params => query_params,
442
+ :form_params => form_params,
443
+ :body => post_body,
444
+ :auth_names => auth_names,
445
+ :return_type => return_type
446
+ )
447
+
448
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
449
+ if @api_client.config.debugging
450
+ @api_client.config.logger.debug "API called: GoalsApi#users_user_guid_goals_reposition_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
451
+ end
452
+ return data, status_code, headers
453
+ end
454
+ end
455
+ end