ynab 1.15.0 → 1.20.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/README.md +1 -0
- data/lib/ynab.rb +13 -8
- data/lib/ynab/api/accounts_api.rb +65 -7
- data/lib/ynab/api/budgets_api.rb +10 -7
- data/lib/ynab/api/categories_api.rb +15 -15
- data/lib/ynab/api/deprecated_api.rb +3 -3
- data/lib/ynab/api/months_api.rb +7 -7
- data/lib/ynab/api/payee_locations_api.rb +7 -7
- data/lib/ynab/api/payees_api.rb +7 -7
- data/lib/ynab/api/scheduled_transactions_api.rb +7 -7
- data/lib/ynab/api/transactions_api.rb +93 -41
- data/lib/ynab/api/user_api.rb +1 -1
- data/lib/ynab/api_client.rb +3 -2
- data/lib/ynab/configuration.rb +2 -3
- data/lib/ynab/models/account.rb +4 -7
- data/lib/ynab/models/account_response.rb +4 -3
- data/lib/ynab/models/account_response_data.rb +4 -3
- data/lib/ynab/models/accounts_response.rb +4 -3
- data/lib/ynab/models/accounts_response_data.rb +4 -3
- data/lib/ynab/models/budget_detail.rb +4 -3
- data/lib/ynab/models/budget_detail_response.rb +4 -3
- data/lib/ynab/models/budget_detail_response_data.rb +4 -3
- data/lib/ynab/models/budget_settings.rb +4 -3
- data/lib/ynab/models/budget_settings_response.rb +4 -3
- data/lib/ynab/models/budget_settings_response_data.rb +4 -3
- data/lib/ynab/models/budget_summary.rb +20 -7
- data/lib/ynab/models/budget_summary_response.rb +4 -3
- data/lib/ynab/models/budget_summary_response_data.rb +4 -3
- data/lib/ynab/models/bulk_response.rb +4 -3
- data/lib/ynab/models/bulk_response_data.rb +4 -3
- data/lib/ynab/models/bulk_response_data_bulk.rb +5 -4
- data/lib/ynab/models/bulk_transactions.rb +4 -3
- data/lib/ynab/models/categories_response.rb +4 -3
- data/lib/ynab/models/categories_response_data.rb +4 -3
- data/lib/ynab/models/category.rb +6 -9
- data/lib/ynab/models/category_group.rb +4 -3
- data/lib/ynab/models/category_group_with_categories.rb +4 -3
- data/lib/ynab/models/category_response.rb +4 -3
- data/lib/ynab/models/category_response_data.rb +4 -3
- data/lib/ynab/models/currency_format.rb +4 -3
- data/lib/ynab/models/date_format.rb +4 -3
- data/lib/ynab/models/error_detail.rb +4 -3
- data/lib/ynab/models/error_response.rb +4 -3
- data/lib/ynab/models/hybrid_transaction.rb +4 -15
- data/lib/ynab/models/hybrid_transactions_response.rb +4 -3
- data/lib/ynab/models/hybrid_transactions_response_data.rb +4 -3
- data/lib/ynab/models/month_detail.rb +6 -5
- data/lib/ynab/models/month_detail_response.rb +4 -3
- data/lib/ynab/models/month_detail_response_data.rb +4 -3
- data/lib/ynab/models/month_summaries_response.rb +4 -3
- data/lib/ynab/models/month_summaries_response_data.rb +4 -3
- data/lib/ynab/models/month_summary.rb +6 -5
- data/lib/ynab/models/payee.rb +5 -4
- data/lib/ynab/models/payee_location.rb +4 -3
- data/lib/ynab/models/payee_location_response.rb +4 -3
- data/lib/ynab/models/payee_location_response_data.rb +4 -3
- data/lib/ynab/models/payee_locations_response.rb +4 -3
- data/lib/ynab/models/payee_locations_response_data.rb +4 -3
- data/lib/ynab/models/payee_response.rb +4 -3
- data/lib/ynab/models/payee_response_data.rb +4 -3
- data/lib/ynab/models/payees_response.rb +4 -3
- data/lib/ynab/models/payees_response_data.rb +4 -3
- data/lib/ynab/models/save_account.rb +250 -0
- data/lib/ynab/models/save_account_wrapper.rb +189 -0
- data/lib/ynab/models/save_category_response.rb +4 -3
- data/lib/ynab/models/save_category_response_data.rb +4 -3
- data/lib/ynab/models/save_month_category.rb +4 -3
- data/lib/ynab/models/save_month_category_wrapper.rb +4 -3
- data/lib/ynab/models/save_sub_transaction.rb +259 -0
- data/lib/ynab/models/save_transaction.rb +24 -19
- data/lib/ynab/models/save_transaction_wrapper.rb +4 -3
- data/lib/ynab/models/save_transactions_response.rb +4 -3
- data/lib/ynab/models/save_transactions_response_data.rb +5 -4
- data/lib/ynab/models/save_transactions_wrapper.rb +4 -3
- data/lib/ynab/models/scheduled_sub_transaction.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_detail.rb +4 -11
- data/lib/ynab/models/scheduled_transaction_response.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_response_data.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_summary.rb +4 -11
- data/lib/ynab/models/scheduled_transactions_response.rb +4 -3
- data/lib/ynab/models/scheduled_transactions_response_data.rb +4 -3
- data/lib/ynab/models/sub_transaction.rb +33 -4
- data/lib/ynab/models/transaction_detail.rb +4 -11
- data/lib/ynab/models/transaction_response.rb +4 -3
- data/lib/ynab/models/transaction_response_data.rb +4 -3
- data/lib/ynab/models/transaction_summary.rb +4 -11
- data/lib/ynab/models/transactions_import_response.rb +189 -0
- data/lib/ynab/models/transactions_import_response_data.rb +192 -0
- data/lib/ynab/models/transactions_response.rb +4 -3
- data/lib/ynab/models/transactions_response_data.rb +4 -3
- data/lib/ynab/models/update_transaction.rb +18 -27
- data/lib/ynab/models/update_transactions_wrapper.rb +4 -3
- data/lib/ynab/models/user.rb +4 -3
- data/lib/ynab/models/user_response.rb +4 -3
- data/lib/ynab/models/user_response_data.rb +4 -3
- data/lib/ynab/version.rb +1 -1
- data/spec/api/accounts_spec.rb +19 -10
- data/spec/api/budgets_spec.rb +4 -4
- data/spec/api/categories_spec.rb +5 -5
- data/spec/api/months_spec.rb +4 -4
- data/spec/api/payee_locations_spec.rb +4 -4
- data/spec/api/payees_spec.rb +4 -4
- data/spec/api/scheduled_transactions_spec.rb +4 -4
- data/spec/api/transactions_spec.rb +23 -13
- data/spec/fixtures/vcr_cassettes/create_account.yml +51 -0
- data/spec/fixtures/vcr_cassettes/import_transactions.yml +50 -0
- data/spec/models/transaction_detail_spec.rb +11 -0
- metadata +26 -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
|
|
@@ -22,13 +22,13 @@ module YNAB
|
|
22
22
|
# The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
|
23
23
|
attr_accessor :amount
|
24
24
|
|
25
|
-
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource.
|
25
|
+
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource.
|
26
26
|
attr_accessor :payee_id
|
27
27
|
|
28
|
-
# The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee.
|
28
|
+
# The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
|
29
29
|
attr_accessor :payee_name
|
30
30
|
|
31
|
-
# The category for the transaction.
|
31
|
+
# The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied.
|
32
32
|
attr_accessor :category_id
|
33
33
|
|
34
34
|
attr_accessor :memo
|
@@ -42,9 +42,12 @@ module YNAB
|
|
42
42
|
# The transaction flag
|
43
43
|
attr_accessor :flag_color
|
44
44
|
|
45
|
-
# If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
|
45
|
+
# If specified, the new transaction will be assigned this `import_id` and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
|
46
46
|
attr_accessor :import_id
|
47
47
|
|
48
|
+
# An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
|
49
|
+
attr_accessor :subtransactions
|
50
|
+
|
48
51
|
class EnumAttributeValidator
|
49
52
|
attr_reader :datatype
|
50
53
|
attr_reader :allowable_values
|
@@ -80,7 +83,8 @@ module YNAB
|
|
80
83
|
:'cleared' => :'cleared',
|
81
84
|
:'approved' => :'approved',
|
82
85
|
:'flag_color' => :'flag_color',
|
83
|
-
:'import_id' => :'import_id'
|
86
|
+
:'import_id' => :'import_id',
|
87
|
+
:'subtransactions' => :'subtransactions'
|
84
88
|
}
|
85
89
|
end
|
86
90
|
|
@@ -97,7 +101,8 @@ module YNAB
|
|
97
101
|
:'cleared' => :'String',
|
98
102
|
:'approved' => :'BOOLEAN',
|
99
103
|
:'flag_color' => :'String',
|
100
|
-
:'import_id' => :'String'
|
104
|
+
:'import_id' => :'String',
|
105
|
+
:'subtransactions' => :'Array<SaveSubTransaction>'
|
101
106
|
}
|
102
107
|
end
|
103
108
|
|
@@ -152,6 +157,12 @@ module YNAB
|
|
152
157
|
if attributes.has_key?(:'import_id')
|
153
158
|
self.import_id = attributes[:'import_id']
|
154
159
|
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'subtransactions')
|
162
|
+
if (value = attributes[:'subtransactions']).is_a?(Array)
|
163
|
+
self.subtransactions = value
|
164
|
+
end
|
165
|
+
end
|
155
166
|
end
|
156
167
|
|
157
168
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -224,20 +235,12 @@ module YNAB
|
|
224
235
|
# Custom attribute writer method checking allowed values (enum).
|
225
236
|
# @param [Object] cleared Object to be assigned
|
226
237
|
def cleared=(cleared)
|
227
|
-
validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
|
228
|
-
unless validator.valid?(cleared)
|
229
|
-
fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
|
230
|
-
end
|
231
238
|
@cleared = cleared
|
232
239
|
end
|
233
240
|
|
234
241
|
# Custom attribute writer method checking allowed values (enum).
|
235
242
|
# @param [Object] flag_color Object to be assigned
|
236
243
|
def flag_color=(flag_color)
|
237
|
-
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
238
|
-
unless validator.valid?(flag_color)
|
239
|
-
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
240
|
-
end
|
241
244
|
@flag_color = flag_color
|
242
245
|
end
|
243
246
|
|
@@ -266,7 +269,8 @@ module YNAB
|
|
266
269
|
cleared == o.cleared &&
|
267
270
|
approved == o.approved &&
|
268
271
|
flag_color == o.flag_color &&
|
269
|
-
import_id == o.import_id
|
272
|
+
import_id == o.import_id &&
|
273
|
+
subtransactions == o.subtransactions
|
270
274
|
end
|
271
275
|
|
272
276
|
# @see the `==` method
|
@@ -278,9 +282,8 @@ module YNAB
|
|
278
282
|
# Calculates hash code according to all attributes.
|
279
283
|
# @return [Fixnum] Hash code
|
280
284
|
def hash
|
281
|
-
[account_id, date, amount, payee_id, payee_name, category_id, memo, cleared, approved, flag_color, import_id].hash
|
285
|
+
[account_id, date, amount, payee_id, payee_name, category_id, memo, cleared, approved, flag_color, import_id, subtransactions].hash
|
282
286
|
end
|
283
|
-
|
284
287
|
# Builds the object from hash
|
285
288
|
# @param [Hash] attributes Model attributes in the form of hash
|
286
289
|
# @return [Object] Returns the model itself
|
@@ -288,7 +291,7 @@ module YNAB
|
|
288
291
|
return nil unless attributes.is_a?(Hash)
|
289
292
|
self.class.swagger_types.each_pair do |key, type|
|
290
293
|
if type =~ /\AArray<(.*)>/i
|
291
|
-
# check to ensure the input is an array given that the
|
294
|
+
# check to ensure the input is an array given that the attribute
|
292
295
|
# is documented as an array but the input is not
|
293
296
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
294
297
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -384,5 +387,7 @@ module YNAB
|
|
384
387
|
value
|
385
388
|
end
|
386
389
|
end
|
390
|
+
|
387
391
|
end
|
392
|
+
|
388
393
|
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
|
[transaction].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
|
@@ -88,7 +87,7 @@ module YNAB
|
|
88
87
|
return nil unless attributes.is_a?(Hash)
|
89
88
|
self.class.swagger_types.each_pair do |key, type|
|
90
89
|
if type =~ /\AArray<(.*)>/i
|
91
|
-
# check to ensure the input is an array given that the
|
90
|
+
# check to ensure the input is an array given that the attribute
|
92
91
|
# is documented as an array but the input is not
|
93
92
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
93
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -184,5 +183,7 @@ module YNAB
|
|
184
183
|
value
|
185
184
|
end
|
186
185
|
end
|
186
|
+
|
187
187
|
end
|
188
|
+
|
188
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
|
[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
|
@@ -88,7 +87,7 @@ module YNAB
|
|
88
87
|
return nil unless attributes.is_a?(Hash)
|
89
88
|
self.class.swagger_types.each_pair do |key, type|
|
90
89
|
if type =~ /\AArray<(.*)>/i
|
91
|
-
# check to ensure the input is an array given that the
|
90
|
+
# check to ensure the input is an array given that the attribute
|
92
91
|
# is documented as an array but the input is not
|
93
92
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
93
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -184,5 +183,7 @@ module YNAB
|
|
184
183
|
value
|
185
184
|
end
|
186
185
|
end
|
186
|
+
|
187
187
|
end
|
188
|
+
|
188
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
|
|
@@ -23,7 +23,7 @@ module YNAB
|
|
23
23
|
# If multiple transactions were specified, the transactions that were saved
|
24
24
|
attr_accessor :transactions
|
25
25
|
|
26
|
-
# If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account
|
26
|
+
# If multiple transactions were specified, a list of import_ids that were not created because of an existing `import_id` found on the same account
|
27
27
|
attr_accessor :duplicate_import_ids
|
28
28
|
|
29
29
|
# The knowledge of the server
|
@@ -132,7 +132,6 @@ module YNAB
|
|
132
132
|
def hash
|
133
133
|
[transaction_ids, transaction, transactions, duplicate_import_ids, server_knowledge].hash
|
134
134
|
end
|
135
|
-
|
136
135
|
# Builds the object from hash
|
137
136
|
# @param [Hash] attributes Model attributes in the form of hash
|
138
137
|
# @return [Object] Returns the model itself
|
@@ -140,7 +139,7 @@ module YNAB
|
|
140
139
|
return nil unless attributes.is_a?(Hash)
|
141
140
|
self.class.swagger_types.each_pair do |key, type|
|
142
141
|
if type =~ /\AArray<(.*)>/i
|
143
|
-
# check to ensure the input is an array given that the
|
142
|
+
# check to ensure the input is an array given that the attribute
|
144
143
|
# is documented as an array but the input is not
|
145
144
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
146
145
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -236,5 +235,7 @@ module YNAB
|
|
236
235
|
value
|
237
236
|
end
|
238
237
|
end
|
238
|
+
|
239
239
|
end
|
240
|
+
|
240
241
|
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
|
|
@@ -86,7 +86,6 @@ module YNAB
|
|
86
86
|
def hash
|
87
87
|
[transaction, transactions].hash
|
88
88
|
end
|
89
|
-
|
90
89
|
# Builds the object from hash
|
91
90
|
# @param [Hash] attributes Model attributes in the form of hash
|
92
91
|
# @return [Object] Returns the model itself
|
@@ -94,7 +93,7 @@ module YNAB
|
|
94
93
|
return nil unless attributes.is_a?(Hash)
|
95
94
|
self.class.swagger_types.each_pair do |key, type|
|
96
95
|
if type =~ /\AArray<(.*)>/i
|
97
|
-
# check to ensure the input is an array given that the
|
96
|
+
# check to ensure the input is an array given that the attribute
|
98
97
|
# is documented as an array but the input is not
|
99
98
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
99
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -190,5 +189,7 @@ module YNAB
|
|
190
189
|
value
|
191
190
|
end
|
192
191
|
end
|
192
|
+
|
193
193
|
end
|
194
|
+
|
194
195
|
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
|
|
@@ -161,7 +161,6 @@ module YNAB
|
|
161
161
|
def hash
|
162
162
|
[id, scheduled_transaction_id, amount, memo, payee_id, category_id, transfer_account_id, deleted].hash
|
163
163
|
end
|
164
|
-
|
165
164
|
# Builds the object from hash
|
166
165
|
# @param [Hash] attributes Model attributes in the form of hash
|
167
166
|
# @return [Object] Returns the model itself
|
@@ -169,7 +168,7 @@ module YNAB
|
|
169
168
|
return nil unless attributes.is_a?(Hash)
|
170
169
|
self.class.swagger_types.each_pair do |key, type|
|
171
170
|
if type =~ /\AArray<(.*)>/i
|
172
|
-
# check to ensure the input is an array given that the
|
171
|
+
# check to ensure the input is an array given that the attribute
|
173
172
|
# is documented as an array but the input is not
|
174
173
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
175
174
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -265,5 +264,7 @@ module YNAB
|
|
265
264
|
value
|
266
265
|
end
|
267
266
|
end
|
267
|
+
|
268
268
|
end
|
269
|
+
|
269
270
|
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
|
|
@@ -259,20 +259,12 @@ module YNAB
|
|
259
259
|
# Custom attribute writer method checking allowed values (enum).
|
260
260
|
# @param [Object] frequency Object to be assigned
|
261
261
|
def frequency=(frequency)
|
262
|
-
validator = EnumAttributeValidator.new('String', ['never', 'daily', 'weekly', 'everyOtherWeek', 'twiceAMonth', 'every4Weeks', 'monthly', 'everyOtherMonth', 'every3Months', 'every4Months', 'twiceAYear', 'yearly', 'everyOtherYear'])
|
263
|
-
unless validator.valid?(frequency)
|
264
|
-
fail ArgumentError, 'invalid value for "frequency", must be one of #{validator.allowable_values}.'
|
265
|
-
end
|
266
262
|
@frequency = frequency
|
267
263
|
end
|
268
264
|
|
269
265
|
# Custom attribute writer method checking allowed values (enum).
|
270
266
|
# @param [Object] flag_color Object to be assigned
|
271
267
|
def flag_color=(flag_color)
|
272
|
-
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
273
|
-
unless validator.valid?(flag_color)
|
274
|
-
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
275
|
-
end
|
276
268
|
@flag_color = flag_color
|
277
269
|
end
|
278
270
|
|
@@ -310,7 +302,6 @@ module YNAB
|
|
310
302
|
def hash
|
311
303
|
[id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id, deleted, account_name, payee_name, category_name, subtransactions].hash
|
312
304
|
end
|
313
|
-
|
314
305
|
# Builds the object from hash
|
315
306
|
# @param [Hash] attributes Model attributes in the form of hash
|
316
307
|
# @return [Object] Returns the model itself
|
@@ -318,7 +309,7 @@ module YNAB
|
|
318
309
|
return nil unless attributes.is_a?(Hash)
|
319
310
|
self.class.swagger_types.each_pair do |key, type|
|
320
311
|
if type =~ /\AArray<(.*)>/i
|
321
|
-
# check to ensure the input is an array given that the
|
312
|
+
# check to ensure the input is an array given that the attribute
|
322
313
|
# is documented as an array but the input is not
|
323
314
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
324
315
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -414,5 +405,7 @@ module YNAB
|
|
414
405
|
value
|
415
406
|
end
|
416
407
|
end
|
408
|
+
|
417
409
|
end
|
410
|
+
|
418
411
|
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
|
@@ -88,7 +87,7 @@ module YNAB
|
|
88
87
|
return nil unless attributes.is_a?(Hash)
|
89
88
|
self.class.swagger_types.each_pair do |key, type|
|
90
89
|
if type =~ /\AArray<(.*)>/i
|
91
|
-
# check to ensure the input is an array given that the
|
90
|
+
# check to ensure the input is an array given that the attribute
|
92
91
|
# is documented as an array but the input is not
|
93
92
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
93
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -184,5 +183,7 @@ module YNAB
|
|
184
183
|
value
|
185
184
|
end
|
186
185
|
end
|
186
|
+
|
187
187
|
end
|
188
|
+
|
188
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
|
[scheduled_transaction].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
|
@@ -88,7 +87,7 @@ module YNAB
|
|
88
87
|
return nil unless attributes.is_a?(Hash)
|
89
88
|
self.class.swagger_types.each_pair do |key, type|
|
90
89
|
if type =~ /\AArray<(.*)>/i
|
91
|
-
# check to ensure the input is an array given that the
|
90
|
+
# check to ensure the input is an array given that the attribute
|
92
91
|
# is documented as an array but the input is not
|
93
92
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
93
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -184,5 +183,7 @@ module YNAB
|
|
184
183
|
value
|
185
184
|
end
|
186
185
|
end
|
186
|
+
|
187
187
|
end
|
188
|
+
|
188
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
|
|
@@ -214,20 +214,12 @@ module YNAB
|
|
214
214
|
# Custom attribute writer method checking allowed values (enum).
|
215
215
|
# @param [Object] frequency Object to be assigned
|
216
216
|
def frequency=(frequency)
|
217
|
-
validator = EnumAttributeValidator.new('String', ['never', 'daily', 'weekly', 'everyOtherWeek', 'twiceAMonth', 'every4Weeks', 'monthly', 'everyOtherMonth', 'every3Months', 'every4Months', 'twiceAYear', 'yearly', 'everyOtherYear'])
|
218
|
-
unless validator.valid?(frequency)
|
219
|
-
fail ArgumentError, 'invalid value for "frequency", must be one of #{validator.allowable_values}.'
|
220
|
-
end
|
221
217
|
@frequency = frequency
|
222
218
|
end
|
223
219
|
|
224
220
|
# Custom attribute writer method checking allowed values (enum).
|
225
221
|
# @param [Object] flag_color Object to be assigned
|
226
222
|
def flag_color=(flag_color)
|
227
|
-
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
228
|
-
unless validator.valid?(flag_color)
|
229
|
-
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
230
|
-
end
|
231
223
|
@flag_color = flag_color
|
232
224
|
end
|
233
225
|
|
@@ -261,7 +253,6 @@ module YNAB
|
|
261
253
|
def hash
|
262
254
|
[id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id, deleted].hash
|
263
255
|
end
|
264
|
-
|
265
256
|
# Builds the object from hash
|
266
257
|
# @param [Hash] attributes Model attributes in the form of hash
|
267
258
|
# @return [Object] Returns the model itself
|
@@ -269,7 +260,7 @@ module YNAB
|
|
269
260
|
return nil unless attributes.is_a?(Hash)
|
270
261
|
self.class.swagger_types.each_pair do |key, type|
|
271
262
|
if type =~ /\AArray<(.*)>/i
|
272
|
-
# check to ensure the input is an array given that the
|
263
|
+
# check to ensure the input is an array given that the attribute
|
273
264
|
# is documented as an array but the input is not
|
274
265
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
275
266
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -365,5 +356,7 @@ module YNAB
|
|
365
356
|
value
|
366
357
|
end
|
367
358
|
end
|
359
|
+
|
368
360
|
end
|
361
|
+
|
369
362
|
end
|