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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e61add8014e4af8eddee3d7ecff72bb5cbfa5181e92e3e21a056adb4fb0d6c79
4
- data.tar.gz: 4bc80c1a991ac8766bbb826733a6cfdfc71076c8c50f795d54591ed5f623614b
3
+ metadata.gz: 4bc4bd8101a2f5716f0febb5ecdd53dfcda22f2c5c1d79426f046050aa3edd47
4
+ data.tar.gz: 8c8534adf53b61a2b72293ee2b88f80c7ea5d0c40080299cf77c2b54dae0a01d
5
5
  SHA512:
6
- metadata.gz: ba096840fc12b092ab449afb51d8a74f4d999e9781725192149cf006c8a7fd3fb69e86612f4ff7ead4e025f1b61f2bf503fc6522c0012dfedaec401bb8b1132f
7
- data.tar.gz: 991548fa8e30d1a434bd67de2e3ab4c8fdeb7a8e8ce96c0ca19b1ee3482ab91e182a9044face58c8dab0aa0e210bfe30d8fe03d0e37f87339c6cfd8a3f2b5ebb
6
+ metadata.gz: 717a4b06557ed16241e431fb40e905670973bf7046f7aa900ed8d6f88c6dbce33dff7b78b89e7c5fa3282bdff0bab9d2d802e6606a9eaf339ce6390033a7cb53
7
+ data.tar.gz: 8206b49cfc1ebed604cf1bbadbe3b8400ddb0c3fcb81b10fd0184d4ec597a8950ec4d20694583a2d49ebdea6142575577d96fc538bd1782879a24c7d06469756
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mx-platform-ruby (0.39.0)
4
+ mx-platform-ruby (0.40.0)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart
7
7
 
@@ -0,0 +1,26 @@
1
+ # MxPlatformRuby::BudgetCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **category_guid** | **String** | Unique identifier of the category. | |
8
+ | **parent_guid** | **String** | Unique identifier of the parent budget. This is only required when creating a budget on a sub-category. | |
9
+ | **amount** | **Integer** | Amount of the budget. | [optional] |
10
+ | **metadata** | **String** | Additional information a partner can store on the budget. | [optional] |
11
+ | **skip_webhook** | **Boolean** | When set to true, this parameter will prevent a webhook from being triggered by the request. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'mx-platform-ruby'
17
+
18
+ instance = MxPlatformRuby::BudgetCreateRequest.new(
19
+ category_guid: CAT-bd56d35a-a9a7-6e10-66c1-5b9cc1b6c81a,
20
+ parent_guid: BGT-6be44a91-e105-f68a-4770-8c7c0a5c9778,
21
+ amount: 1000,
22
+ metadata: Additional information,
23
+ skip_webhook: true
24
+ )
25
+ ```
26
+
@@ -0,0 +1,18 @@
1
+ # MxPlatformRuby::BudgetCreateRequestBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **budget** | [**BudgetCreateRequest**](BudgetCreateRequest.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'mx-platform-ruby'
13
+
14
+ instance = MxPlatformRuby::BudgetCreateRequestBody.new(
15
+ budget: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,48 @@
1
+ # MxPlatformRuby::BudgetResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **Float** | A goal amount set by the user for a category&#39;s transaction total during a month. | [optional] |
8
+ | **category_guid** | **String** | Unique identifier for the budget category. Defined by MX. | [optional] |
9
+ | **created_at** | **String** | Date and time the budget was created, represented in ISO 8601 format with timestamp. | [optional] |
10
+ | **guid** | **String** | Unique identifier for the budget. Defined by MX. | [optional] |
11
+ | **is_exceeded** | **Boolean** | If the budget has been exceeded, this field will be true. Otherwise, this field will be false. | [optional] |
12
+ | **is_off_track** | **Boolean** | If the budget is off track, this field will be true. Otherwise, this field will be false. | [optional] |
13
+ | **metadata** | **String** | Additional information a partner can store on the budget. | [optional] |
14
+ | **name** | **String** | The name of the budget that is visible to the user (ie \&quot;Food\&quot;, \&quot;Bills\&quot;, \&quot;Entertainment\&quot;, etc). | [optional] |
15
+ | **off_track_percentage** | **Float** | The percentage amount of off track spending. (Deprecated). | [optional] |
16
+ | **parent_guid** | **String** | Unique identifier for the parent budget. Defined by MX. | [optional] |
17
+ | **percent_spent** | **Float** | The percentage of a budget that has been spent during the current calendar month Calculated as the transaction total divided by the amount and then multiplied by 100.A value of zero will be returned when &#x60;amount&#x60; is zero. | [optional] |
18
+ | **projected_spending** | **Float** | The projected amount of spending for the budget. | [optional] |
19
+ | **revision** | **Integer** | The revision number of this budget record. | [optional] |
20
+ | **transaction_total** | **Object** | The cumulative amount of all transactions under the budget. | [optional] |
21
+ | **updated_at** | **Object** | Date and time the budget was updated, represented in ISO 8601 format with timestamp. | [optional] |
22
+ | **user_guid** | **Object** | Unique identifier for the user. Defined by MX. | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'mx-platform-ruby'
28
+
29
+ instance = MxPlatformRuby::BudgetResponse.new(
30
+ amount: 153.0,
31
+ category_guid: CAT-bd56d35a-a9a7-6e10-66c1-5b9cc1b6c81a,
32
+ created_at: 2018-10-18T19:51:26+00:00,
33
+ guid: BGT-6ca0e3ef-c65e-4655-8b5a-275a3c19c21d,
34
+ is_exceeded: true,
35
+ is_off_track: true,
36
+ metadata: some metadata,
37
+ name: Food &amp; Dining,
38
+ off_track_percentage: null,
39
+ parent_guid: null,
40
+ percent_spent: 1276.34,
41
+ projected_spending: 3562.4,
42
+ revision: 561,
43
+ transaction_total: 1952.8,
44
+ updated_at: 2022-06-14T21:17:11+00:00,
45
+ user_guid: USR-11141024-90b3-1bce-cac9-c06ced52ab4c
46
+ )
47
+ ```
48
+
@@ -0,0 +1,18 @@
1
+ # MxPlatformRuby::BudgetResponseBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **budget** | [**BudgetResponse**](BudgetResponse.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'mx-platform-ruby'
13
+
14
+ instance = MxPlatformRuby::BudgetResponseBody.new(
15
+ budget: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # MxPlatformRuby::BudgetUpdateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **Integer** | Amount of the budget. | [optional] |
8
+ | **metadata** | **String** | Additional information a partner can store on the budget. | [optional] |
9
+ | **skip_webhook** | **Boolean** | When set to true, this parameter will prevent a webhook from being triggered by the request. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'mx-platform-ruby'
15
+
16
+ instance = MxPlatformRuby::BudgetUpdateRequest.new(
17
+ amount: 1000,
18
+ metadata: Additional information,
19
+ skip_webhook: true
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # MxPlatformRuby::BudgetUpdateRequestBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **budget** | [**BudgetUpdateRequest**](BudgetUpdateRequest.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'mx-platform-ruby'
13
+
14
+ instance = MxPlatformRuby::BudgetUpdateRequestBody.new(
15
+ budget: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,444 @@
1
+ # MxPlatformRuby::BudgetsApi
2
+
3
+ All URIs are relative to *https://api.mx.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**users_user_guid_budgets_budget_guid_delete**](BudgetsApi.md#users_user_guid_budgets_budget_guid_delete) | **DELETE** /users/{user_guid}/budgets/{budget_guid} | Delete a budget |
8
+ | [**users_user_guid_budgets_budget_guid_get**](BudgetsApi.md#users_user_guid_budgets_budget_guid_get) | **GET** /users/{user_guid}/budgets/{budget_guid} | Read a specific budget |
9
+ | [**users_user_guid_budgets_budget_guid_put**](BudgetsApi.md#users_user_guid_budgets_budget_guid_put) | **PUT** /users/{user_guid}/budgets/{budget_guid} | Update a specific budget |
10
+ | [**users_user_guid_budgets_generate_post**](BudgetsApi.md#users_user_guid_budgets_generate_post) | **POST** /users/{user_guid}/budgets/generate | Auto-generate budgets |
11
+ | [**users_user_guid_budgets_get**](BudgetsApi.md#users_user_guid_budgets_get) | **GET** /users/{user_guid}/budgets | List all budgets |
12
+ | [**users_user_guid_budgets_post**](BudgetsApi.md#users_user_guid_budgets_post) | **POST** /users/{user_guid}/budgets | Create a budget |
13
+
14
+
15
+ ## users_user_guid_budgets_budget_guid_delete
16
+
17
+ > users_user_guid_budgets_budget_guid_delete(user_guid, budget_guid)
18
+
19
+ Delete a budget
20
+
21
+ Delete a budget.
22
+
23
+ ### Examples
24
+
25
+ ```ruby
26
+ require 'time'
27
+ require 'mx-platform-ruby'
28
+ # setup authorization
29
+ MxPlatformRuby.configure do |config|
30
+ # Configure HTTP basic authorization: basicAuth
31
+ config.username = 'YOUR USERNAME'
32
+ config.password = 'YOUR PASSWORD'
33
+ end
34
+
35
+ api_instance = MxPlatformRuby::BudgetsApi.new
36
+ user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX.
37
+ budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX.
38
+
39
+ begin
40
+ # Delete a budget
41
+ api_instance.users_user_guid_budgets_budget_guid_delete(user_guid, budget_guid)
42
+ rescue MxPlatformRuby::ApiError => e
43
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_delete: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the users_user_guid_budgets_budget_guid_delete_with_http_info variant
48
+
49
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
50
+
51
+ > <Array(nil, Integer, Hash)> users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid)
52
+
53
+ ```ruby
54
+ begin
55
+ # Delete a budget
56
+ data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_delete_with_http_info(user_guid, budget_guid)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => nil
60
+ rescue MxPlatformRuby::ApiError => e
61
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_delete_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
70
+ | **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
71
+
72
+ ### Return type
73
+
74
+ nil (empty response body)
75
+
76
+ ### Authorization
77
+
78
+ [basicAuth](../README.md#basicAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: Not defined
84
+
85
+
86
+ ## users_user_guid_budgets_budget_guid_get
87
+
88
+ > <BudgetResponseBody> users_user_guid_budgets_budget_guid_get(budget_guid, user_guid)
89
+
90
+ Read a specific budget
91
+
92
+ Read a specific budget.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'mx-platform-ruby'
99
+ # setup authorization
100
+ MxPlatformRuby.configure do |config|
101
+ # Configure HTTP basic authorization: basicAuth
102
+ config.username = 'YOUR USERNAME'
103
+ config.password = 'YOUR PASSWORD'
104
+ end
105
+
106
+ api_instance = MxPlatformRuby::BudgetsApi.new
107
+ budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX.
108
+ user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX.
109
+
110
+ begin
111
+ # Read a specific budget
112
+ result = api_instance.users_user_guid_budgets_budget_guid_get(budget_guid, user_guid)
113
+ p result
114
+ rescue MxPlatformRuby::ApiError => e
115
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_get: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the users_user_guid_budgets_budget_guid_get_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(<BudgetResponseBody>, Integer, Hash)> users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid)
124
+
125
+ ```ruby
126
+ begin
127
+ # Read a specific budget
128
+ data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_get_with_http_info(budget_guid, user_guid)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => <BudgetResponseBody>
132
+ rescue MxPlatformRuby::ApiError => e
133
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_get_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
142
+ | **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
143
+
144
+ ### Return type
145
+
146
+ [**BudgetResponseBody**](BudgetResponseBody.md)
147
+
148
+ ### Authorization
149
+
150
+ [basicAuth](../README.md#basicAuth)
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: Not defined
155
+ - **Accept**: application/json
156
+
157
+
158
+ ## users_user_guid_budgets_budget_guid_put
159
+
160
+ > <BudgetResponseBody> users_user_guid_budgets_budget_guid_put(user_guid, budget_guid, opts)
161
+
162
+ Update a specific budget
163
+
164
+ Update a specific budget.
165
+
166
+ ### Examples
167
+
168
+ ```ruby
169
+ require 'time'
170
+ require 'mx-platform-ruby'
171
+ # setup authorization
172
+ MxPlatformRuby.configure do |config|
173
+ # Configure HTTP basic authorization: basicAuth
174
+ config.username = 'YOUR USERNAME'
175
+ config.password = 'YOUR PASSWORD'
176
+ end
177
+
178
+ api_instance = MxPlatformRuby::BudgetsApi.new
179
+ user_guid = 'user_guid_example' # String | The unique identifier for the budget. Defined by MX.
180
+ budget_guid = 'budget_guid_example' # String | The unique identifier for the budget. Defined by MX.
181
+ opts = {
182
+ budget_update_request_body: MxPlatformRuby::BudgetUpdateRequestBody.new # BudgetUpdateRequestBody |
183
+ }
184
+
185
+ begin
186
+ # Update a specific budget
187
+ result = api_instance.users_user_guid_budgets_budget_guid_put(user_guid, budget_guid, opts)
188
+ p result
189
+ rescue MxPlatformRuby::ApiError => e
190
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_put: #{e}"
191
+ end
192
+ ```
193
+
194
+ #### Using the users_user_guid_budgets_budget_guid_put_with_http_info variant
195
+
196
+ This returns an Array which contains the response data, status code and headers.
197
+
198
+ > <Array(<BudgetResponseBody>, Integer, Hash)> users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts)
199
+
200
+ ```ruby
201
+ begin
202
+ # Update a specific budget
203
+ data, status_code, headers = api_instance.users_user_guid_budgets_budget_guid_put_with_http_info(user_guid, budget_guid, opts)
204
+ p status_code # => 2xx
205
+ p headers # => { ... }
206
+ p data # => <BudgetResponseBody>
207
+ rescue MxPlatformRuby::ApiError => e
208
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_budget_guid_put_with_http_info: #{e}"
209
+ end
210
+ ```
211
+
212
+ ### Parameters
213
+
214
+ | Name | Type | Description | Notes |
215
+ | ---- | ---- | ----------- | ----- |
216
+ | **user_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
217
+ | **budget_guid** | **String** | The unique identifier for the budget. Defined by MX. | |
218
+ | **budget_update_request_body** | [**BudgetUpdateRequestBody**](BudgetUpdateRequestBody.md) | | [optional] |
219
+
220
+ ### Return type
221
+
222
+ [**BudgetResponseBody**](BudgetResponseBody.md)
223
+
224
+ ### Authorization
225
+
226
+ [basicAuth](../README.md#basicAuth)
227
+
228
+ ### HTTP request headers
229
+
230
+ - **Content-Type**: application/json
231
+ - **Accept**: application/json
232
+
233
+
234
+ ## users_user_guid_budgets_generate_post
235
+
236
+ > <BudgetResponseBody> users_user_guid_budgets_generate_post(user_guid)
237
+
238
+ Auto-generate budgets
239
+
240
+ This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one \"Bills & Utilities\" `transaction` in both January and February, a budget will be generated for \"Bills & Utilities.\" If there are two \"Bills & Utilities\" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren't enough transactions to automatically create any budgets`.
241
+
242
+ ### Examples
243
+
244
+ ```ruby
245
+ require 'time'
246
+ require 'mx-platform-ruby'
247
+ # setup authorization
248
+ MxPlatformRuby.configure do |config|
249
+ # Configure HTTP basic authorization: basicAuth
250
+ config.username = 'YOUR USERNAME'
251
+ config.password = 'YOUR PASSWORD'
252
+ end
253
+
254
+ api_instance = MxPlatformRuby::BudgetsApi.new
255
+ user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX.
256
+
257
+ begin
258
+ # Auto-generate budgets
259
+ result = api_instance.users_user_guid_budgets_generate_post(user_guid)
260
+ p result
261
+ rescue MxPlatformRuby::ApiError => e
262
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_generate_post: #{e}"
263
+ end
264
+ ```
265
+
266
+ #### Using the users_user_guid_budgets_generate_post_with_http_info variant
267
+
268
+ This returns an Array which contains the response data, status code and headers.
269
+
270
+ > <Array(<BudgetResponseBody>, Integer, Hash)> users_user_guid_budgets_generate_post_with_http_info(user_guid)
271
+
272
+ ```ruby
273
+ begin
274
+ # Auto-generate budgets
275
+ data, status_code, headers = api_instance.users_user_guid_budgets_generate_post_with_http_info(user_guid)
276
+ p status_code # => 2xx
277
+ p headers # => { ... }
278
+ p data # => <BudgetResponseBody>
279
+ rescue MxPlatformRuby::ApiError => e
280
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_generate_post_with_http_info: #{e}"
281
+ end
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+ | Name | Type | Description | Notes |
287
+ | ---- | ---- | ----------- | ----- |
288
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
289
+
290
+ ### Return type
291
+
292
+ [**BudgetResponseBody**](BudgetResponseBody.md)
293
+
294
+ ### Authorization
295
+
296
+ [basicAuth](../README.md#basicAuth)
297
+
298
+ ### HTTP request headers
299
+
300
+ - **Content-Type**: Not defined
301
+ - **Accept**: application/json
302
+
303
+
304
+ ## users_user_guid_budgets_get
305
+
306
+ > <BudgetResponseBody> users_user_guid_budgets_get(user_guid)
307
+
308
+ List all budgets
309
+
310
+ List all budgets
311
+
312
+ ### Examples
313
+
314
+ ```ruby
315
+ require 'time'
316
+ require 'mx-platform-ruby'
317
+ # setup authorization
318
+ MxPlatformRuby.configure do |config|
319
+ # Configure HTTP basic authorization: basicAuth
320
+ config.username = 'YOUR USERNAME'
321
+ config.password = 'YOUR PASSWORD'
322
+ end
323
+
324
+ api_instance = MxPlatformRuby::BudgetsApi.new
325
+ user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX.
326
+
327
+ begin
328
+ # List all budgets
329
+ result = api_instance.users_user_guid_budgets_get(user_guid)
330
+ p result
331
+ rescue MxPlatformRuby::ApiError => e
332
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_get: #{e}"
333
+ end
334
+ ```
335
+
336
+ #### Using the users_user_guid_budgets_get_with_http_info variant
337
+
338
+ This returns an Array which contains the response data, status code and headers.
339
+
340
+ > <Array(<BudgetResponseBody>, Integer, Hash)> users_user_guid_budgets_get_with_http_info(user_guid)
341
+
342
+ ```ruby
343
+ begin
344
+ # List all budgets
345
+ data, status_code, headers = api_instance.users_user_guid_budgets_get_with_http_info(user_guid)
346
+ p status_code # => 2xx
347
+ p headers # => { ... }
348
+ p data # => <BudgetResponseBody>
349
+ rescue MxPlatformRuby::ApiError => e
350
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_get_with_http_info: #{e}"
351
+ end
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ | Name | Type | Description | Notes |
357
+ | ---- | ---- | ----------- | ----- |
358
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
359
+
360
+ ### Return type
361
+
362
+ [**BudgetResponseBody**](BudgetResponseBody.md)
363
+
364
+ ### Authorization
365
+
366
+ [basicAuth](../README.md#basicAuth)
367
+
368
+ ### HTTP request headers
369
+
370
+ - **Content-Type**: Not defined
371
+ - **Accept**: application/json
372
+
373
+
374
+ ## users_user_guid_budgets_post
375
+
376
+ > <BudgetResponseBody> users_user_guid_budgets_post(user_guid, budget_create_request_body)
377
+
378
+ Create a budget
379
+
380
+ Create a budget. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook` parameter. You cannot create a duplicate budget. For example, if you attempt to create a budget for \"Gas\", but that budget already exist, the request will fail. You can retrieve a list of all existing categories by using the List Categories endpoint.
381
+
382
+ ### Examples
383
+
384
+ ```ruby
385
+ require 'time'
386
+ require 'mx-platform-ruby'
387
+ # setup authorization
388
+ MxPlatformRuby.configure do |config|
389
+ # Configure HTTP basic authorization: basicAuth
390
+ config.username = 'YOUR USERNAME'
391
+ config.password = 'YOUR PASSWORD'
392
+ end
393
+
394
+ api_instance = MxPlatformRuby::BudgetsApi.new
395
+ user_guid = 'user_guid_example' # String | The unique identifier for the user. Defined by MX.
396
+ budget_create_request_body = MxPlatformRuby::BudgetCreateRequestBody.new # BudgetCreateRequestBody |
397
+
398
+ begin
399
+ # Create a budget
400
+ result = api_instance.users_user_guid_budgets_post(user_guid, budget_create_request_body)
401
+ p result
402
+ rescue MxPlatformRuby::ApiError => e
403
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_post: #{e}"
404
+ end
405
+ ```
406
+
407
+ #### Using the users_user_guid_budgets_post_with_http_info variant
408
+
409
+ This returns an Array which contains the response data, status code and headers.
410
+
411
+ > <Array(<BudgetResponseBody>, Integer, Hash)> users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body)
412
+
413
+ ```ruby
414
+ begin
415
+ # Create a budget
416
+ data, status_code, headers = api_instance.users_user_guid_budgets_post_with_http_info(user_guid, budget_create_request_body)
417
+ p status_code # => 2xx
418
+ p headers # => { ... }
419
+ p data # => <BudgetResponseBody>
420
+ rescue MxPlatformRuby::ApiError => e
421
+ puts "Error when calling BudgetsApi->users_user_guid_budgets_post_with_http_info: #{e}"
422
+ end
423
+ ```
424
+
425
+ ### Parameters
426
+
427
+ | Name | Type | Description | Notes |
428
+ | ---- | ---- | ----------- | ----- |
429
+ | **user_guid** | **String** | The unique identifier for the user. Defined by MX. | |
430
+ | **budget_create_request_body** | [**BudgetCreateRequestBody**](BudgetCreateRequestBody.md) | | |
431
+
432
+ ### Return type
433
+
434
+ [**BudgetResponseBody**](BudgetResponseBody.md)
435
+
436
+ ### Authorization
437
+
438
+ [basicAuth](../README.md#basicAuth)
439
+
440
+ ### HTTP request headers
441
+
442
+ - **Content-Type**: application/json
443
+ - **Accept**: application/json
444
+
@@ -4,18 +4,18 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **annual_fee** | **Object** | | [optional] |
8
- | **duration_of_introductory_rate_on_balance_transfer** | **Object** | | [optional] |
9
- | **duration_of_introductory_rate_on_purchases** | **Object** | | [optional] |
10
- | **guid** | **Object** | | [optional] |
7
+ | **annual_fee** | **Float** | | [optional] |
8
+ | **duration_of_introductory_rate_on_balance_transfer** | **Integer** | | [optional] |
9
+ | **duration_of_introductory_rate_on_purchases** | **Integer** | | [optional] |
10
+ | **guid** | **String** | | [optional] |
11
11
  | **has_cashback_rewards** | **Boolean** | | [optional] |
12
12
  | **has_other_rewards** | **Boolean** | | [optional] |
13
13
  | **has_travel_rewards** | **Boolean** | | [optional] |
14
14
  | **has_zero_introductory_annual_fee** | **Boolean** | | [optional] |
15
15
  | **has_zero_percent_introductory_rate** | **Boolean** | | [optional] |
16
16
  | **has_zero_percent_introductory_rate_on_balance_transfer** | **Boolean** | | [optional] |
17
- | **financial_institution** | **Boolean** | | [optional] |
18
- | **is_accepting_applications** | **Boolean** | | [optional] |
17
+ | **is_accepting_applicants** | **Boolean** | | [optional] |
18
+ | **is_active_credit_card_product** | **Boolean** | | [optional] |
19
19
  | **is_small_business_card** | **Boolean** | | [optional] |
20
20
  | **name** | **String** | | [optional] |
21
21
 
@@ -35,8 +35,8 @@ instance = MxPlatformRuby::CreditCardProduct.new(
35
35
  has_zero_introductory_annual_fee: true,
36
36
  has_zero_percent_introductory_rate: false,
37
37
  has_zero_percent_introductory_rate_on_balance_transfer: true,
38
- financial_institution: true,
39
- is_accepting_applications: true,
38
+ is_accepting_applicants: true,
39
+ is_active_credit_card_product: true,
40
40
  is_small_business_card: true,
41
41
  name: Chase Credit Card
42
42
  )
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **reward** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] |
7
+ | **credit_card_product** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] |
8
8
 
9
9
  ## Example
10
10
 
@@ -12,7 +12,7 @@
12
12
  require 'mx-platform-ruby'
13
13
 
14
14
  instance = MxPlatformRuby::CreditCardProductResponse.new(
15
- reward: null
15
+ credit_card_product: null
16
16
  )
17
17
  ```
18
18