ynab 1.18.0 → 1.19.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.
- checksums.yaml +4 -4
- data/lib/ynab.rb +8 -8
- data/lib/ynab/api/accounts_api.rb +1 -1
- data/lib/ynab/api/budgets_api.rb +1 -1
- data/lib/ynab/api/categories_api.rb +1 -1
- data/lib/ynab/api/deprecated_api.rb +1 -1
- data/lib/ynab/api/months_api.rb +1 -1
- data/lib/ynab/api/payee_locations_api.rb +1 -1
- data/lib/ynab/api/payees_api.rb +1 -1
- data/lib/ynab/api/scheduled_transactions_api.rb +1 -1
- data/lib/ynab/api/transactions_api.rb +1 -1
- data/lib/ynab/api/user_api.rb +1 -1
- data/lib/ynab/api_client.rb +1 -1
- data/lib/ynab/configuration.rb +1 -1
- data/lib/ynab/models/account.rb +2 -6
- data/lib/ynab/models/account_response.rb +2 -2
- data/lib/ynab/models/account_response_data.rb +2 -2
- data/lib/ynab/models/accounts_response.rb +2 -2
- data/lib/ynab/models/accounts_response_data.rb +2 -2
- data/lib/ynab/models/budget_detail.rb +2 -2
- data/lib/ynab/models/budget_detail_response.rb +2 -2
- data/lib/ynab/models/budget_detail_response_data.rb +2 -2
- data/lib/ynab/models/budget_settings.rb +2 -2
- data/lib/ynab/models/budget_settings_response.rb +2 -2
- data/lib/ynab/models/budget_settings_response_data.rb +2 -2
- data/lib/ynab/models/budget_summary.rb +2 -2
- data/lib/ynab/models/budget_summary_response.rb +2 -2
- data/lib/ynab/models/budget_summary_response_data.rb +2 -2
- data/lib/ynab/models/bulk_response.rb +2 -2
- data/lib/ynab/models/bulk_response_data.rb +2 -2
- data/lib/ynab/models/bulk_response_data_bulk.rb +2 -2
- data/lib/ynab/models/bulk_transactions.rb +2 -2
- data/lib/ynab/models/categories_response.rb +2 -2
- data/lib/ynab/models/categories_response_data.rb +2 -2
- data/lib/ynab/models/category.rb +2 -6
- data/lib/ynab/models/category_group.rb +2 -2
- data/lib/ynab/models/category_group_with_categories.rb +2 -2
- data/lib/ynab/models/category_response.rb +2 -2
- data/lib/ynab/models/category_response_data.rb +2 -2
- data/lib/ynab/models/currency_format.rb +2 -2
- data/lib/ynab/models/date_format.rb +2 -2
- data/lib/ynab/models/error_detail.rb +2 -2
- data/lib/ynab/models/error_response.rb +2 -2
- data/lib/ynab/models/hybrid_transaction.rb +2 -14
- data/lib/ynab/models/hybrid_transactions_response.rb +2 -2
- data/lib/ynab/models/hybrid_transactions_response_data.rb +2 -2
- data/lib/ynab/models/month_detail.rb +2 -2
- data/lib/ynab/models/month_detail_response.rb +2 -2
- data/lib/ynab/models/month_detail_response_data.rb +2 -2
- data/lib/ynab/models/month_summaries_response.rb +2 -2
- data/lib/ynab/models/month_summaries_response_data.rb +2 -2
- data/lib/ynab/models/month_summary.rb +2 -2
- data/lib/ynab/models/payee.rb +2 -2
- data/lib/ynab/models/payee_location.rb +2 -2
- data/lib/ynab/models/payee_location_response.rb +2 -2
- data/lib/ynab/models/payee_location_response_data.rb +2 -2
- data/lib/ynab/models/payee_locations_response.rb +2 -2
- data/lib/ynab/models/payee_locations_response_data.rb +2 -2
- data/lib/ynab/models/payee_response.rb +2 -2
- data/lib/ynab/models/payee_response_data.rb +2 -2
- data/lib/ynab/models/payees_response.rb +2 -2
- data/lib/ynab/models/payees_response_data.rb +2 -2
- data/lib/ynab/models/save_category_response.rb +2 -2
- data/lib/ynab/models/save_category_response_data.rb +2 -2
- data/lib/ynab/models/save_month_category.rb +2 -2
- data/lib/ynab/models/save_month_category_wrapper.rb +2 -2
- data/lib/ynab/models/save_sub_transaction.rb +2 -2
- data/lib/ynab/models/save_transaction.rb +2 -10
- data/lib/ynab/models/save_transaction_wrapper.rb +2 -2
- data/lib/ynab/models/save_transactions_response.rb +2 -2
- data/lib/ynab/models/save_transactions_response_data.rb +2 -2
- data/lib/ynab/models/save_transactions_wrapper.rb +2 -2
- data/lib/ynab/models/scheduled_sub_transaction.rb +2 -2
- data/lib/ynab/models/scheduled_transaction_detail.rb +2 -10
- data/lib/ynab/models/scheduled_transaction_response.rb +2 -2
- data/lib/ynab/models/scheduled_transaction_response_data.rb +2 -2
- data/lib/ynab/models/scheduled_transaction_summary.rb +2 -10
- data/lib/ynab/models/scheduled_transactions_response.rb +2 -2
- data/lib/ynab/models/scheduled_transactions_response_data.rb +2 -2
- data/lib/ynab/models/sub_transaction.rb +13 -3
- data/lib/ynab/models/transaction_detail.rb +2 -10
- data/lib/ynab/models/transaction_response.rb +2 -2
- data/lib/ynab/models/transaction_response_data.rb +2 -2
- data/lib/ynab/models/transaction_summary.rb +2 -10
- data/lib/ynab/models/transactions_import_response.rb +2 -2
- data/lib/ynab/models/transactions_import_response_data.rb +2 -2
- data/lib/ynab/models/transactions_response.rb +2 -2
- data/lib/ynab/models/transactions_response_data.rb +2 -2
- data/lib/ynab/models/update_transaction.rb +6 -28
- data/lib/ynab/models/update_transactions_wrapper.rb +2 -2
- data/lib/ynab/models/user.rb +2 -2
- data/lib/ynab/models/user_response.rb +2 -2
- data/lib/ynab/models/user_response_data.rb +2 -2
- data/lib/ynab/version.rb +1 -1
- data/spec/models/transaction_detail_spec.rb +11 -0
- metadata +17 -15
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -154,7 +154,6 @@ module YNAB
|
|
154
154
|
def hash
|
155
155
|
[id, name, last_modified_on, first_month, last_month, date_format, currency_format, accounts].hash
|
156
156
|
end
|
157
|
-
|
158
157
|
# Builds the object from hash
|
159
158
|
# @param [Hash] attributes Model attributes in the form of hash
|
160
159
|
# @return [Object] Returns the model itself
|
@@ -260,4 +259,5 @@ module YNAB
|
|
260
259
|
end
|
261
260
|
|
262
261
|
end
|
262
|
+
|
263
263
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[data].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -92,7 +92,6 @@ module YNAB
|
|
92
92
|
def hash
|
93
93
|
[budgets, default_budget].hash
|
94
94
|
end
|
95
|
-
|
96
95
|
# Builds the object from hash
|
97
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
98
97
|
# @return [Object] Returns the model itself
|
@@ -198,4 +197,5 @@ module YNAB
|
|
198
197
|
end
|
199
198
|
|
200
199
|
end
|
200
|
+
|
201
201
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[data].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[bulk].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -100,7 +100,6 @@ module YNAB
|
|
100
100
|
def hash
|
101
101
|
[transaction_ids, duplicate_import_ids].hash
|
102
102
|
end
|
103
|
-
|
104
103
|
# Builds the object from hash
|
105
104
|
# @param [Hash] attributes Model attributes in the form of hash
|
106
105
|
# @return [Object] Returns the model itself
|
@@ -206,4 +205,5 @@ module YNAB
|
|
206
205
|
end
|
207
206
|
|
208
207
|
end
|
208
|
+
|
209
209
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -82,7 +82,6 @@ module YNAB
|
|
82
82
|
def hash
|
83
83
|
[transactions].hash
|
84
84
|
end
|
85
|
-
|
86
85
|
# Builds the object from hash
|
87
86
|
# @param [Hash] attributes Model attributes in the form of hash
|
88
87
|
# @return [Object] Returns the model itself
|
@@ -188,4 +187,5 @@ module YNAB
|
|
188
187
|
end
|
189
188
|
|
190
189
|
end
|
190
|
+
|
191
191
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[data].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -97,7 +97,6 @@ module YNAB
|
|
97
97
|
def hash
|
98
98
|
[category_groups, server_knowledge].hash
|
99
99
|
end
|
100
|
-
|
101
100
|
# Builds the object from hash
|
102
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
103
102
|
# @return [Object] Returns the model itself
|
@@ -203,4 +202,5 @@ module YNAB
|
|
203
202
|
end
|
204
203
|
|
205
204
|
end
|
205
|
+
|
206
206
|
end
|
data/lib/ynab/models/category.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -246,10 +246,6 @@ module YNAB
|
|
246
246
|
# Custom attribute writer method checking allowed values (enum).
|
247
247
|
# @param [Object] goal_type Object to be assigned
|
248
248
|
def goal_type=(goal_type)
|
249
|
-
validator = EnumAttributeValidator.new('String', ['TB', 'TBD', 'MF', 'NEED'])
|
250
|
-
unless validator.valid?(goal_type)
|
251
|
-
fail ArgumentError, 'invalid value for "goal_type", must be one of #{validator.allowable_values}.'
|
252
|
-
end
|
253
249
|
@goal_type = goal_type
|
254
250
|
end
|
255
251
|
|
@@ -286,7 +282,6 @@ module YNAB
|
|
286
282
|
def hash
|
287
283
|
[id, category_group_id, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_creation_month, goal_target, goal_target_month, goal_percentage_complete, deleted].hash
|
288
284
|
end
|
289
|
-
|
290
285
|
# Builds the object from hash
|
291
286
|
# @param [Hash] attributes Model attributes in the form of hash
|
292
287
|
# @return [Object] Returns the model itself
|
@@ -392,4 +387,5 @@ module YNAB
|
|
392
387
|
end
|
393
388
|
|
394
389
|
end
|
390
|
+
|
395
391
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -124,7 +124,6 @@ module YNAB
|
|
124
124
|
def hash
|
125
125
|
[id, name, hidden, deleted].hash
|
126
126
|
end
|
127
|
-
|
128
127
|
# Builds the object from hash
|
129
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
129
|
# @return [Object] Returns the model itself
|
@@ -230,4 +229,5 @@ module YNAB
|
|
230
229
|
end
|
231
230
|
|
232
231
|
end
|
232
|
+
|
233
233
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -141,7 +141,6 @@ module YNAB
|
|
141
141
|
def hash
|
142
142
|
[id, name, hidden, deleted, categories].hash
|
143
143
|
end
|
144
|
-
|
145
144
|
# Builds the object from hash
|
146
145
|
# @param [Hash] attributes Model attributes in the form of hash
|
147
146
|
# @return [Object] Returns the model itself
|
@@ -247,4 +246,5 @@ module YNAB
|
|
247
246
|
end
|
248
247
|
|
249
248
|
end
|
249
|
+
|
250
250
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[data].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[category].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -179,7 +179,6 @@ module YNAB
|
|
179
179
|
def hash
|
180
180
|
[iso_code, example_format, decimal_digits, decimal_separator, symbol_first, group_separator, currency_symbol, display_symbol].hash
|
181
181
|
end
|
182
|
-
|
183
182
|
# Builds the object from hash
|
184
183
|
# @param [Hash] attributes Model attributes in the form of hash
|
185
184
|
# @return [Object] Returns the model itself
|
@@ -285,4 +284,5 @@ module YNAB
|
|
285
284
|
end
|
286
285
|
|
287
286
|
end
|
287
|
+
|
288
288
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -81,7 +81,6 @@ module YNAB
|
|
81
81
|
def hash
|
82
82
|
[format].hash
|
83
83
|
end
|
84
|
-
|
85
84
|
# Builds the object from hash
|
86
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
87
86
|
# @return [Object] Returns the model itself
|
@@ -187,4 +186,5 @@ module YNAB
|
|
187
186
|
end
|
188
187
|
|
189
188
|
end
|
189
|
+
|
190
190
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -108,7 +108,6 @@ module YNAB
|
|
108
108
|
def hash
|
109
109
|
[id, name, detail].hash
|
110
110
|
end
|
111
|
-
|
112
111
|
# Builds the object from hash
|
113
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
114
113
|
# @return [Object] Returns the model itself
|
@@ -214,4 +213,5 @@ module YNAB
|
|
214
213
|
end
|
215
214
|
|
216
215
|
end
|
216
|
+
|
217
217
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,7 +80,6 @@ module YNAB
|
|
80
80
|
def hash
|
81
81
|
[error].hash
|
82
82
|
end
|
83
|
-
|
84
83
|
# Builds the object from hash
|
85
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
85
|
# @return [Object] Returns the model itself
|
@@ -186,4 +185,5 @@ module YNAB
|
|
186
185
|
end
|
187
186
|
|
188
187
|
end
|
188
|
+
|
189
189
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -296,30 +296,18 @@ module YNAB
|
|
296
296
|
# Custom attribute writer method checking allowed values (enum).
|
297
297
|
# @param [Object] cleared Object to be assigned
|
298
298
|
def cleared=(cleared)
|
299
|
-
validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
|
300
|
-
unless validator.valid?(cleared)
|
301
|
-
fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
|
302
|
-
end
|
303
299
|
@cleared = cleared
|
304
300
|
end
|
305
301
|
|
306
302
|
# Custom attribute writer method checking allowed values (enum).
|
307
303
|
# @param [Object] flag_color Object to be assigned
|
308
304
|
def flag_color=(flag_color)
|
309
|
-
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
310
|
-
unless validator.valid?(flag_color)
|
311
|
-
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
312
|
-
end
|
313
305
|
@flag_color = flag_color
|
314
306
|
end
|
315
307
|
|
316
308
|
# Custom attribute writer method checking allowed values (enum).
|
317
309
|
# @param [Object] type Object to be assigned
|
318
310
|
def type=(type)
|
319
|
-
validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
|
320
|
-
unless validator.valid?(type)
|
321
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
322
|
-
end
|
323
311
|
@type = type
|
324
312
|
end
|
325
313
|
|
@@ -361,7 +349,6 @@ module YNAB
|
|
361
349
|
def hash
|
362
350
|
[id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, deleted, type, parent_transaction_id, account_name, payee_name, category_name].hash
|
363
351
|
end
|
364
|
-
|
365
352
|
# Builds the object from hash
|
366
353
|
# @param [Hash] attributes Model attributes in the form of hash
|
367
354
|
# @return [Object] Returns the model itself
|
@@ -467,4 +454,5 @@ module YNAB
|
|
467
454
|
end
|
468
455
|
|
469
456
|
end
|
457
|
+
|
470
458
|
end
|