mx-platform-ruby 0.28.0 → 0.29.0

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/docs/AccountResponse.md +2 -2
  4. data/docs/InsightResponse.md +56 -0
  5. data/docs/InsightResponseBody.md +18 -0
  6. data/docs/InsightUpdateRequest.md +20 -0
  7. data/docs/InsightsApi.md +706 -0
  8. data/docs/InsightsResponseBody.md +20 -0
  9. data/docs/MxPlatformApi.md +1 -1
  10. data/docs/ScheduledPaymentResponse.md +42 -0
  11. data/docs/ScheduledPaymentsResponseBody.md +20 -0
  12. data/docs/WidgetRequest.md +1 -1
  13. data/lib/mx-platform-ruby/api/insights_api.rb +690 -0
  14. data/lib/mx-platform-ruby/api/mx_platform_api.rb +2 -2
  15. data/lib/mx-platform-ruby/models/account_response.rb +11 -11
  16. data/lib/mx-platform-ruby/models/insight_response.rb +404 -0
  17. data/lib/mx-platform-ruby/models/insight_response_body.rb +216 -0
  18. data/lib/mx-platform-ruby/models/insight_update_request.rb +223 -0
  19. data/lib/mx-platform-ruby/models/insights_response_body.rb +225 -0
  20. data/lib/mx-platform-ruby/models/scheduled_payment_response.rb +322 -0
  21. data/lib/mx-platform-ruby/models/scheduled_payments_response_body.rb +225 -0
  22. data/lib/mx-platform-ruby/version.rb +1 -1
  23. data/lib/mx-platform-ruby.rb +7 -0
  24. data/openapi/config.yml +1 -1
  25. data/spec/api/insights_api_spec.rb +166 -0
  26. data/spec/api/mx_platform_api_spec.rb +1 -1
  27. data/spec/models/account_response_spec.rb +3 -3
  28. data/spec/models/insight_response_body_spec.rb +34 -0
  29. data/spec/models/insight_response_spec.rb +148 -0
  30. data/spec/models/insight_update_request_spec.rb +40 -0
  31. data/spec/models/insights_response_body_spec.rb +40 -0
  32. data/spec/models/scheduled_payment_response_spec.rb +106 -0
  33. data/spec/models/scheduled_payments_response_body_spec.rb +40 -0
  34. metadata +30 -2
@@ -0,0 +1,706 @@
1
+ # MxPlatformRuby::InsightsApi
2
+
3
+ All URIs are relative to *https://api.mx.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**list_accounts_insight**](InsightsApi.md#list_accounts_insight) | **GET** /users/{user_guid}/insights/{insight_guid}/accounts | List all accounts associated with an insight. |
8
+ | [**list_categories_insight**](InsightsApi.md#list_categories_insight) | **GET** /users/{user_guid}/insights/{insight_guid}/categories | List all categories associated with an insight. |
9
+ | [**list_insights_by_account**](InsightsApi.md#list_insights_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/insights | List insights by account |
10
+ | [**list_insights_user**](InsightsApi.md#list_insights_user) | **GET** /users/{user_guid}/insights | List all insights for a user. |
11
+ | [**list_merchants_insight**](InsightsApi.md#list_merchants_insight) | **GET** /users/{user_guid}/insights/{insight_guid}/merchants | List all merchants associated with an insight. |
12
+ | [**list_scheduled_payments_insight**](InsightsApi.md#list_scheduled_payments_insight) | **GET** /users/{user_guid}/insights/{insight_guid}/scheduled_payments | List all scheduled payments associated with an insight |
13
+ | [**list_transactions_insight**](InsightsApi.md#list_transactions_insight) | **GET** /users/{user_guid}/insights/{insight_guid}/transactions | List all transactions associated with an insight. |
14
+ | [**read_insights_user**](InsightsApi.md#read_insights_user) | **GET** /users/{user_guid}/insights{insight_guid} | Read a specific insight. |
15
+ | [**update_insight**](InsightsApi.md#update_insight) | **PUT** /users/{user_guid}/insights{insight_guid} | Update insight |
16
+
17
+
18
+ ## list_accounts_insight
19
+
20
+ > <AccountsResponseBody> list_accounts_insight(user_guid, insight_guid, opts)
21
+
22
+ List all accounts associated with an insight.
23
+
24
+ Use this endpoint to list all the accounts associated with the insight.
25
+
26
+ ### Examples
27
+
28
+ ```ruby
29
+ require 'time'
30
+ require 'mx-platform-ruby'
31
+ # setup authorization
32
+ MxPlatformRuby.configure do |config|
33
+ # Configure HTTP basic authorization: basicAuth
34
+ config.username = 'YOUR USERNAME'
35
+ config.password = 'YOUR PASSWORD'
36
+ end
37
+
38
+ api_instance = MxPlatformRuby::InsightsApi.new
39
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
40
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
41
+ opts = {
42
+ page: 1, # Integer | Specify current page.
43
+ records_per_page: 10 # Integer | Specify records per page.
44
+ }
45
+
46
+ begin
47
+ # List all accounts associated with an insight.
48
+ result = api_instance.list_accounts_insight(user_guid, insight_guid, opts)
49
+ p result
50
+ rescue MxPlatformRuby::ApiError => e
51
+ puts "Error when calling InsightsApi->list_accounts_insight: #{e}"
52
+ end
53
+ ```
54
+
55
+ #### Using the list_accounts_insight_with_http_info variant
56
+
57
+ This returns an Array which contains the response data, status code and headers.
58
+
59
+ > <Array(<AccountsResponseBody>, Integer, Hash)> list_accounts_insight_with_http_info(user_guid, insight_guid, opts)
60
+
61
+ ```ruby
62
+ begin
63
+ # List all accounts associated with an insight.
64
+ data, status_code, headers = api_instance.list_accounts_insight_with_http_info(user_guid, insight_guid, opts)
65
+ p status_code # => 2xx
66
+ p headers # => { ... }
67
+ p data # => <AccountsResponseBody>
68
+ rescue MxPlatformRuby::ApiError => e
69
+ puts "Error when calling InsightsApi->list_accounts_insight_with_http_info: #{e}"
70
+ end
71
+ ```
72
+
73
+ ### Parameters
74
+
75
+ | Name | Type | Description | Notes |
76
+ | ---- | ---- | ----------- | ----- |
77
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
78
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
79
+ | **page** | **Integer** | Specify current page. | [optional] |
80
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
81
+
82
+ ### Return type
83
+
84
+ [**AccountsResponseBody**](AccountsResponseBody.md)
85
+
86
+ ### Authorization
87
+
88
+ [basicAuth](../README.md#basicAuth)
89
+
90
+ ### HTTP request headers
91
+
92
+ - **Content-Type**: Not defined
93
+ - **Accept**: application/vnd.mx.api.v1+json
94
+
95
+
96
+ ## list_categories_insight
97
+
98
+ > <CategoriesResponseBody> list_categories_insight(user_guid, insight_guid, opts)
99
+
100
+ List all categories associated with an insight.
101
+
102
+ Use this endpoint to list all the categories associated with the insight.
103
+
104
+ ### Examples
105
+
106
+ ```ruby
107
+ require 'time'
108
+ require 'mx-platform-ruby'
109
+ # setup authorization
110
+ MxPlatformRuby.configure do |config|
111
+ # Configure HTTP basic authorization: basicAuth
112
+ config.username = 'YOUR USERNAME'
113
+ config.password = 'YOUR PASSWORD'
114
+ end
115
+
116
+ api_instance = MxPlatformRuby::InsightsApi.new
117
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
118
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
119
+ opts = {
120
+ page: 1, # Integer | Specify current page.
121
+ records_per_page: 10 # Integer | Specify records per page.
122
+ }
123
+
124
+ begin
125
+ # List all categories associated with an insight.
126
+ result = api_instance.list_categories_insight(user_guid, insight_guid, opts)
127
+ p result
128
+ rescue MxPlatformRuby::ApiError => e
129
+ puts "Error when calling InsightsApi->list_categories_insight: #{e}"
130
+ end
131
+ ```
132
+
133
+ #### Using the list_categories_insight_with_http_info variant
134
+
135
+ This returns an Array which contains the response data, status code and headers.
136
+
137
+ > <Array(<CategoriesResponseBody>, Integer, Hash)> list_categories_insight_with_http_info(user_guid, insight_guid, opts)
138
+
139
+ ```ruby
140
+ begin
141
+ # List all categories associated with an insight.
142
+ data, status_code, headers = api_instance.list_categories_insight_with_http_info(user_guid, insight_guid, opts)
143
+ p status_code # => 2xx
144
+ p headers # => { ... }
145
+ p data # => <CategoriesResponseBody>
146
+ rescue MxPlatformRuby::ApiError => e
147
+ puts "Error when calling InsightsApi->list_categories_insight_with_http_info: #{e}"
148
+ end
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+ | Name | Type | Description | Notes |
154
+ | ---- | ---- | ----------- | ----- |
155
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
156
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
157
+ | **page** | **Integer** | Specify current page. | [optional] |
158
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
159
+
160
+ ### Return type
161
+
162
+ [**CategoriesResponseBody**](CategoriesResponseBody.md)
163
+
164
+ ### Authorization
165
+
166
+ [basicAuth](../README.md#basicAuth)
167
+
168
+ ### HTTP request headers
169
+
170
+ - **Content-Type**: Not defined
171
+ - **Accept**: application/vnd.mx.api.v1+json
172
+
173
+
174
+ ## list_insights_by_account
175
+
176
+ > <InsightsResponseBody> list_insights_by_account(account_guid, user_guid, opts)
177
+
178
+ List insights by account
179
+
180
+ Use this endpoint to list all insights associated with a specified account GUID.
181
+
182
+ ### Examples
183
+
184
+ ```ruby
185
+ require 'time'
186
+ require 'mx-platform-ruby'
187
+ # setup authorization
188
+ MxPlatformRuby.configure do |config|
189
+ # Configure HTTP basic authorization: basicAuth
190
+ config.username = 'YOUR USERNAME'
191
+ config.password = 'YOUR PASSWORD'
192
+ end
193
+
194
+ api_instance = MxPlatformRuby::InsightsApi.new
195
+ account_guid = 'ACT-7c6f361b-e582-15b6-60c0-358f12466b4b' # String | The unique id for the `account`.
196
+ user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for the `user`.
197
+ opts = {
198
+ page: 1, # Integer | Specify current page.
199
+ records_per_page: 10 # Integer | Specify records per page.
200
+ }
201
+
202
+ begin
203
+ # List insights by account
204
+ result = api_instance.list_insights_by_account(account_guid, user_guid, opts)
205
+ p result
206
+ rescue MxPlatformRuby::ApiError => e
207
+ puts "Error when calling InsightsApi->list_insights_by_account: #{e}"
208
+ end
209
+ ```
210
+
211
+ #### Using the list_insights_by_account_with_http_info variant
212
+
213
+ This returns an Array which contains the response data, status code and headers.
214
+
215
+ > <Array(<InsightsResponseBody>, Integer, Hash)> list_insights_by_account_with_http_info(account_guid, user_guid, opts)
216
+
217
+ ```ruby
218
+ begin
219
+ # List insights by account
220
+ data, status_code, headers = api_instance.list_insights_by_account_with_http_info(account_guid, user_guid, opts)
221
+ p status_code # => 2xx
222
+ p headers # => { ... }
223
+ p data # => <InsightsResponseBody>
224
+ rescue MxPlatformRuby::ApiError => e
225
+ puts "Error when calling InsightsApi->list_insights_by_account_with_http_info: #{e}"
226
+ end
227
+ ```
228
+
229
+ ### Parameters
230
+
231
+ | Name | Type | Description | Notes |
232
+ | ---- | ---- | ----------- | ----- |
233
+ | **account_guid** | **String** | The unique id for the &#x60;account&#x60;. | |
234
+ | **user_guid** | **String** | The unique id for the &#x60;user&#x60;. | |
235
+ | **page** | **Integer** | Specify current page. | [optional] |
236
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
237
+
238
+ ### Return type
239
+
240
+ [**InsightsResponseBody**](InsightsResponseBody.md)
241
+
242
+ ### Authorization
243
+
244
+ [basicAuth](../README.md#basicAuth)
245
+
246
+ ### HTTP request headers
247
+
248
+ - **Content-Type**: Not defined
249
+ - **Accept**: application/vnd.mx.api.v1+json
250
+
251
+
252
+ ## list_insights_user
253
+
254
+ > <InsightsResponseBody> list_insights_user(user_guid, opts)
255
+
256
+ List all insights for a user.
257
+
258
+ Use this endpoint to list all the insights associated with the user.
259
+
260
+ ### Examples
261
+
262
+ ```ruby
263
+ require 'time'
264
+ require 'mx-platform-ruby'
265
+ # setup authorization
266
+ MxPlatformRuby.configure do |config|
267
+ # Configure HTTP basic authorization: basicAuth
268
+ config.username = 'YOUR USERNAME'
269
+ config.password = 'YOUR PASSWORD'
270
+ end
271
+
272
+ api_instance = MxPlatformRuby::InsightsApi.new
273
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
274
+ opts = {
275
+ page: 1, # Integer | Specify current page.
276
+ records_per_page: 10 # Integer | Specify records per page.
277
+ }
278
+
279
+ begin
280
+ # List all insights for a user.
281
+ result = api_instance.list_insights_user(user_guid, opts)
282
+ p result
283
+ rescue MxPlatformRuby::ApiError => e
284
+ puts "Error when calling InsightsApi->list_insights_user: #{e}"
285
+ end
286
+ ```
287
+
288
+ #### Using the list_insights_user_with_http_info variant
289
+
290
+ This returns an Array which contains the response data, status code and headers.
291
+
292
+ > <Array(<InsightsResponseBody>, Integer, Hash)> list_insights_user_with_http_info(user_guid, opts)
293
+
294
+ ```ruby
295
+ begin
296
+ # List all insights for a user.
297
+ data, status_code, headers = api_instance.list_insights_user_with_http_info(user_guid, opts)
298
+ p status_code # => 2xx
299
+ p headers # => { ... }
300
+ p data # => <InsightsResponseBody>
301
+ rescue MxPlatformRuby::ApiError => e
302
+ puts "Error when calling InsightsApi->list_insights_user_with_http_info: #{e}"
303
+ end
304
+ ```
305
+
306
+ ### Parameters
307
+
308
+ | Name | Type | Description | Notes |
309
+ | ---- | ---- | ----------- | ----- |
310
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
311
+ | **page** | **Integer** | Specify current page. | [optional] |
312
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
313
+
314
+ ### Return type
315
+
316
+ [**InsightsResponseBody**](InsightsResponseBody.md)
317
+
318
+ ### Authorization
319
+
320
+ [basicAuth](../README.md#basicAuth)
321
+
322
+ ### HTTP request headers
323
+
324
+ - **Content-Type**: Not defined
325
+ - **Accept**: application/vnd.mx.api.v1+json
326
+
327
+
328
+ ## list_merchants_insight
329
+
330
+ > <MerchantsResponseBody> list_merchants_insight(user_guid, insight_guid, opts)
331
+
332
+ List all merchants associated with an insight.
333
+
334
+ Use this endpoint to list all the merchants associated with the insight.
335
+
336
+ ### Examples
337
+
338
+ ```ruby
339
+ require 'time'
340
+ require 'mx-platform-ruby'
341
+ # setup authorization
342
+ MxPlatformRuby.configure do |config|
343
+ # Configure HTTP basic authorization: basicAuth
344
+ config.username = 'YOUR USERNAME'
345
+ config.password = 'YOUR PASSWORD'
346
+ end
347
+
348
+ api_instance = MxPlatformRuby::InsightsApi.new
349
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
350
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
351
+ opts = {
352
+ page: 1, # Integer | Specify current page.
353
+ records_per_page: 10 # Integer | Specify records per page.
354
+ }
355
+
356
+ begin
357
+ # List all merchants associated with an insight.
358
+ result = api_instance.list_merchants_insight(user_guid, insight_guid, opts)
359
+ p result
360
+ rescue MxPlatformRuby::ApiError => e
361
+ puts "Error when calling InsightsApi->list_merchants_insight: #{e}"
362
+ end
363
+ ```
364
+
365
+ #### Using the list_merchants_insight_with_http_info variant
366
+
367
+ This returns an Array which contains the response data, status code and headers.
368
+
369
+ > <Array(<MerchantsResponseBody>, Integer, Hash)> list_merchants_insight_with_http_info(user_guid, insight_guid, opts)
370
+
371
+ ```ruby
372
+ begin
373
+ # List all merchants associated with an insight.
374
+ data, status_code, headers = api_instance.list_merchants_insight_with_http_info(user_guid, insight_guid, opts)
375
+ p status_code # => 2xx
376
+ p headers # => { ... }
377
+ p data # => <MerchantsResponseBody>
378
+ rescue MxPlatformRuby::ApiError => e
379
+ puts "Error when calling InsightsApi->list_merchants_insight_with_http_info: #{e}"
380
+ end
381
+ ```
382
+
383
+ ### Parameters
384
+
385
+ | Name | Type | Description | Notes |
386
+ | ---- | ---- | ----------- | ----- |
387
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
388
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
389
+ | **page** | **Integer** | Specify current page. | [optional] |
390
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
391
+
392
+ ### Return type
393
+
394
+ [**MerchantsResponseBody**](MerchantsResponseBody.md)
395
+
396
+ ### Authorization
397
+
398
+ [basicAuth](../README.md#basicAuth)
399
+
400
+ ### HTTP request headers
401
+
402
+ - **Content-Type**: Not defined
403
+ - **Accept**: application/vnd.mx.api.v1+json
404
+
405
+
406
+ ## list_scheduled_payments_insight
407
+
408
+ > <ScheduledPaymentsResponseBody> list_scheduled_payments_insight(user_guid, insight_guid, opts)
409
+
410
+ List all scheduled payments associated with an insight
411
+
412
+ Use this endpoint to list all the scheduled payments associated with the insight.
413
+
414
+ ### Examples
415
+
416
+ ```ruby
417
+ require 'time'
418
+ require 'mx-platform-ruby'
419
+ # setup authorization
420
+ MxPlatformRuby.configure do |config|
421
+ # Configure HTTP basic authorization: basicAuth
422
+ config.username = 'YOUR USERNAME'
423
+ config.password = 'YOUR PASSWORD'
424
+ end
425
+
426
+ api_instance = MxPlatformRuby::InsightsApi.new
427
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
428
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
429
+ opts = {
430
+ page: 1, # Integer | Specify current page.
431
+ records_per_page: 10 # Integer | Specify records per page.
432
+ }
433
+
434
+ begin
435
+ # List all scheduled payments associated with an insight
436
+ result = api_instance.list_scheduled_payments_insight(user_guid, insight_guid, opts)
437
+ p result
438
+ rescue MxPlatformRuby::ApiError => e
439
+ puts "Error when calling InsightsApi->list_scheduled_payments_insight: #{e}"
440
+ end
441
+ ```
442
+
443
+ #### Using the list_scheduled_payments_insight_with_http_info variant
444
+
445
+ This returns an Array which contains the response data, status code and headers.
446
+
447
+ > <Array(<ScheduledPaymentsResponseBody>, Integer, Hash)> list_scheduled_payments_insight_with_http_info(user_guid, insight_guid, opts)
448
+
449
+ ```ruby
450
+ begin
451
+ # List all scheduled payments associated with an insight
452
+ data, status_code, headers = api_instance.list_scheduled_payments_insight_with_http_info(user_guid, insight_guid, opts)
453
+ p status_code # => 2xx
454
+ p headers # => { ... }
455
+ p data # => <ScheduledPaymentsResponseBody>
456
+ rescue MxPlatformRuby::ApiError => e
457
+ puts "Error when calling InsightsApi->list_scheduled_payments_insight_with_http_info: #{e}"
458
+ end
459
+ ```
460
+
461
+ ### Parameters
462
+
463
+ | Name | Type | Description | Notes |
464
+ | ---- | ---- | ----------- | ----- |
465
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
466
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
467
+ | **page** | **Integer** | Specify current page. | [optional] |
468
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
469
+
470
+ ### Return type
471
+
472
+ [**ScheduledPaymentsResponseBody**](ScheduledPaymentsResponseBody.md)
473
+
474
+ ### Authorization
475
+
476
+ [basicAuth](../README.md#basicAuth)
477
+
478
+ ### HTTP request headers
479
+
480
+ - **Content-Type**: Not defined
481
+ - **Accept**: application/vnd.mx.api.v1+json
482
+
483
+
484
+ ## list_transactions_insight
485
+
486
+ > <TransactionsResponseBody> list_transactions_insight(user_guid, insight_guid, opts)
487
+
488
+ List all transactions associated with an insight.
489
+
490
+ Use this endpoint to list all the transactions associated with the insight.
491
+
492
+ ### Examples
493
+
494
+ ```ruby
495
+ require 'time'
496
+ require 'mx-platform-ruby'
497
+ # setup authorization
498
+ MxPlatformRuby.configure do |config|
499
+ # Configure HTTP basic authorization: basicAuth
500
+ config.username = 'YOUR USERNAME'
501
+ config.password = 'YOUR PASSWORD'
502
+ end
503
+
504
+ api_instance = MxPlatformRuby::InsightsApi.new
505
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
506
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
507
+ opts = {
508
+ page: 1, # Integer | Specify current page.
509
+ records_per_page: 10 # Integer | Specify records per page.
510
+ }
511
+
512
+ begin
513
+ # List all transactions associated with an insight.
514
+ result = api_instance.list_transactions_insight(user_guid, insight_guid, opts)
515
+ p result
516
+ rescue MxPlatformRuby::ApiError => e
517
+ puts "Error when calling InsightsApi->list_transactions_insight: #{e}"
518
+ end
519
+ ```
520
+
521
+ #### Using the list_transactions_insight_with_http_info variant
522
+
523
+ This returns an Array which contains the response data, status code and headers.
524
+
525
+ > <Array(<TransactionsResponseBody>, Integer, Hash)> list_transactions_insight_with_http_info(user_guid, insight_guid, opts)
526
+
527
+ ```ruby
528
+ begin
529
+ # List all transactions associated with an insight.
530
+ data, status_code, headers = api_instance.list_transactions_insight_with_http_info(user_guid, insight_guid, opts)
531
+ p status_code # => 2xx
532
+ p headers # => { ... }
533
+ p data # => <TransactionsResponseBody>
534
+ rescue MxPlatformRuby::ApiError => e
535
+ puts "Error when calling InsightsApi->list_transactions_insight_with_http_info: #{e}"
536
+ end
537
+ ```
538
+
539
+ ### Parameters
540
+
541
+ | Name | Type | Description | Notes |
542
+ | ---- | ---- | ----------- | ----- |
543
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
544
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
545
+ | **page** | **Integer** | Specify current page. | [optional] |
546
+ | **records_per_page** | **Integer** | Specify records per page. | [optional] |
547
+
548
+ ### Return type
549
+
550
+ [**TransactionsResponseBody**](TransactionsResponseBody.md)
551
+
552
+ ### Authorization
553
+
554
+ [basicAuth](../README.md#basicAuth)
555
+
556
+ ### HTTP request headers
557
+
558
+ - **Content-Type**: Not defined
559
+ - **Accept**: application/vnd.mx.api.v1+json
560
+
561
+
562
+ ## read_insights_user
563
+
564
+ > <InsightResponseBody> read_insights_user(user_guid, insight_guid)
565
+
566
+ Read a specific insight.
567
+
568
+ Use this endpoint to read the attributes of a specific insight according to its unique GUID.
569
+
570
+ ### Examples
571
+
572
+ ```ruby
573
+ require 'time'
574
+ require 'mx-platform-ruby'
575
+ # setup authorization
576
+ MxPlatformRuby.configure do |config|
577
+ # Configure HTTP basic authorization: basicAuth
578
+ config.username = 'YOUR USERNAME'
579
+ config.password = 'YOUR PASSWORD'
580
+ end
581
+
582
+ api_instance = MxPlatformRuby::InsightsApi.new
583
+ user_guid = 'USR-1234-abcd' # String | The unique identifier for the user. Defined by MX.
584
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
585
+
586
+ begin
587
+ # Read a specific insight.
588
+ result = api_instance.read_insights_user(user_guid, insight_guid)
589
+ p result
590
+ rescue MxPlatformRuby::ApiError => e
591
+ puts "Error when calling InsightsApi->read_insights_user: #{e}"
592
+ end
593
+ ```
594
+
595
+ #### Using the read_insights_user_with_http_info variant
596
+
597
+ This returns an Array which contains the response data, status code and headers.
598
+
599
+ > <Array(<InsightResponseBody>, Integer, Hash)> read_insights_user_with_http_info(user_guid, insight_guid)
600
+
601
+ ```ruby
602
+ begin
603
+ # Read a specific insight.
604
+ data, status_code, headers = api_instance.read_insights_user_with_http_info(user_guid, insight_guid)
605
+ p status_code # => 2xx
606
+ p headers # => { ... }
607
+ p data # => <InsightResponseBody>
608
+ rescue MxPlatformRuby::ApiError => e
609
+ puts "Error when calling InsightsApi->read_insights_user_with_http_info: #{e}"
610
+ end
611
+ ```
612
+
613
+ ### Parameters
614
+
615
+ | Name | Type | Description | Notes |
616
+ | ---- | ---- | ----------- | ----- |
617
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
618
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
619
+
620
+ ### Return type
621
+
622
+ [**InsightResponseBody**](InsightResponseBody.md)
623
+
624
+ ### Authorization
625
+
626
+ [basicAuth](../README.md#basicAuth)
627
+
628
+ ### HTTP request headers
629
+
630
+ - **Content-Type**: Not defined
631
+ - **Accept**: application/vnd.mx.api.v1+json
632
+
633
+
634
+ ## update_insight
635
+
636
+ > <InsightResponse> update_insight(user_guid, insight_guid, insight_update_request)
637
+
638
+ Update insight
639
+
640
+ Use this endpoint to update the attributes of a particular insight according to its unique GUID.
641
+
642
+ ### Examples
643
+
644
+ ```ruby
645
+ require 'time'
646
+ require 'mx-platform-ruby'
647
+ # setup authorization
648
+ MxPlatformRuby.configure do |config|
649
+ # Configure HTTP basic authorization: basicAuth
650
+ config.username = 'YOUR USERNAME'
651
+ config.password = 'YOUR PASSWORD'
652
+ end
653
+
654
+ api_instance = MxPlatformRuby::InsightsApi.new
655
+ user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique identifier for the user. Defined by MX.
656
+ insight_guid = 'BET-1234-abcd' # String | The unique identifier for the insight. Defined by MX.
657
+ insight_update_request = MxPlatformRuby::InsightUpdateRequest.new # InsightUpdateRequest | The insight to be updated (None of these parameters are required, but the user object cannot be empty.)
658
+
659
+ begin
660
+ # Update insight
661
+ result = api_instance.update_insight(user_guid, insight_guid, insight_update_request)
662
+ p result
663
+ rescue MxPlatformRuby::ApiError => e
664
+ puts "Error when calling InsightsApi->update_insight: #{e}"
665
+ end
666
+ ```
667
+
668
+ #### Using the update_insight_with_http_info variant
669
+
670
+ This returns an Array which contains the response data, status code and headers.
671
+
672
+ > <Array(<InsightResponse>, Integer, Hash)> update_insight_with_http_info(user_guid, insight_guid, insight_update_request)
673
+
674
+ ```ruby
675
+ begin
676
+ # Update insight
677
+ data, status_code, headers = api_instance.update_insight_with_http_info(user_guid, insight_guid, insight_update_request)
678
+ p status_code # => 2xx
679
+ p headers # => { ... }
680
+ p data # => <InsightResponse>
681
+ rescue MxPlatformRuby::ApiError => e
682
+ puts "Error when calling InsightsApi->update_insight_with_http_info: #{e}"
683
+ end
684
+ ```
685
+
686
+ ### Parameters
687
+
688
+ | Name | Type | Description | Notes |
689
+ | ---- | ---- | ----------- | ----- |
690
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
691
+ | **insight_guid** | **String** | The unique identifier for the insight. Defined by MX. | |
692
+ | **insight_update_request** | [**InsightUpdateRequest**](InsightUpdateRequest.md) | The insight to be updated (None of these parameters are required, but the user object cannot be empty.) | |
693
+
694
+ ### Return type
695
+
696
+ [**InsightResponse**](InsightResponse.md)
697
+
698
+ ### Authorization
699
+
700
+ [basicAuth](../README.md#basicAuth)
701
+
702
+ ### HTTP request headers
703
+
704
+ - **Content-Type**: application/json
705
+ - **Accept**: application/vnd.mx.api.v1+json
706
+