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
data/lib/ynab/configuration.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
|
|
@@ -174,8 +174,7 @@ module YNAB
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def base_url
|
177
|
-
|
178
|
-
URI.encode(url)
|
177
|
+
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
179
178
|
end
|
180
179
|
|
181
180
|
# Gets API key (with prefix if set).
|
data/lib/ynab/models/account.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
|
|
@@ -221,10 +221,6 @@ module YNAB
|
|
221
221
|
# Custom attribute writer method checking allowed values (enum).
|
222
222
|
# @param [Object] type Object to be assigned
|
223
223
|
def type=(type)
|
224
|
-
validator = EnumAttributeValidator.new('String', ['checking', 'savings', 'cash', 'creditCard', 'lineOfCredit', 'otherAsset', 'otherLiability', 'payPal', 'merchantAccount', 'investmentAccount', 'mortgage'])
|
225
|
-
unless validator.valid?(type)
|
226
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
227
|
-
end
|
228
224
|
@type = type
|
229
225
|
end
|
230
226
|
|
@@ -257,7 +253,6 @@ module YNAB
|
|
257
253
|
def hash
|
258
254
|
[id, name, type, on_budget, closed, note, balance, cleared_balance, uncleared_balance, transfer_payee_id, deleted].hash
|
259
255
|
end
|
260
|
-
|
261
256
|
# Builds the object from hash
|
262
257
|
# @param [Hash] attributes Model attributes in the form of hash
|
263
258
|
# @return [Object] Returns the model itself
|
@@ -265,7 +260,7 @@ module YNAB
|
|
265
260
|
return nil unless attributes.is_a?(Hash)
|
266
261
|
self.class.swagger_types.each_pair do |key, type|
|
267
262
|
if type =~ /\AArray<(.*)>/i
|
268
|
-
# check to ensure the input is an array given that the
|
263
|
+
# check to ensure the input is an array given that the attribute
|
269
264
|
# is documented as an array but the input is not
|
270
265
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
271
266
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -361,5 +356,7 @@ module YNAB
|
|
361
356
|
value
|
362
357
|
end
|
363
358
|
end
|
359
|
+
|
364
360
|
end
|
361
|
+
|
365
362
|
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
|
[account].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
|
|
@@ -97,7 +97,6 @@ module YNAB
|
|
97
97
|
def hash
|
98
98
|
[accounts, 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
|
@@ -105,7 +104,7 @@ module YNAB
|
|
105
104
|
return nil unless attributes.is_a?(Hash)
|
106
105
|
self.class.swagger_types.each_pair do |key, type|
|
107
106
|
if type =~ /\AArray<(.*)>/i
|
108
|
-
# check to ensure the input is an array given that the
|
107
|
+
# check to ensure the input is an array given that the attribute
|
109
108
|
# is documented as an array but the input is not
|
110
109
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
111
110
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -201,5 +200,7 @@ module YNAB
|
|
201
200
|
value
|
202
201
|
end
|
203
202
|
end
|
203
|
+
|
204
204
|
end
|
205
|
+
|
205
206
|
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
|
|
@@ -252,7 +252,6 @@ module YNAB
|
|
252
252
|
def hash
|
253
253
|
[id, name, last_modified_on, first_month, last_month, date_format, currency_format, accounts, payees, payee_locations, category_groups, categories, months, transactions, subtransactions, scheduled_transactions, scheduled_subtransactions].hash
|
254
254
|
end
|
255
|
-
|
256
255
|
# Builds the object from hash
|
257
256
|
# @param [Hash] attributes Model attributes in the form of hash
|
258
257
|
# @return [Object] Returns the model itself
|
@@ -260,7 +259,7 @@ module YNAB
|
|
260
259
|
return nil unless attributes.is_a?(Hash)
|
261
260
|
self.class.swagger_types.each_pair do |key, type|
|
262
261
|
if type =~ /\AArray<(.*)>/i
|
263
|
-
# check to ensure the input is an array given that the
|
262
|
+
# check to ensure the input is an array given that the attribute
|
264
263
|
# is documented as an array but the input is not
|
265
264
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
266
265
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -356,5 +355,7 @@ module YNAB
|
|
356
355
|
value
|
357
356
|
end
|
358
357
|
end
|
358
|
+
|
359
359
|
end
|
360
|
+
|
360
361
|
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
|
|
@@ -95,7 +95,6 @@ module YNAB
|
|
95
95
|
def hash
|
96
96
|
[budget, server_knowledge].hash
|
97
97
|
end
|
98
|
-
|
99
98
|
# Builds the object from hash
|
100
99
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
100
|
# @return [Object] Returns the model itself
|
@@ -103,7 +102,7 @@ module YNAB
|
|
103
102
|
return nil unless attributes.is_a?(Hash)
|
104
103
|
self.class.swagger_types.each_pair do |key, type|
|
105
104
|
if type =~ /\AArray<(.*)>/i
|
106
|
-
# check to ensure the input is an array given that the
|
105
|
+
# check to ensure the input is an array given that the attribute
|
107
106
|
# is documented as an array but the input is not
|
108
107
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
109
108
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -199,5 +198,7 @@ module YNAB
|
|
199
198
|
value
|
200
199
|
end
|
201
200
|
end
|
201
|
+
|
202
202
|
end
|
203
|
+
|
203
204
|
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
|
|
@@ -94,7 +94,6 @@ module YNAB
|
|
94
94
|
def hash
|
95
95
|
[date_format, currency_format].hash
|
96
96
|
end
|
97
|
-
|
98
97
|
# Builds the object from hash
|
99
98
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
99
|
# @return [Object] Returns the model itself
|
@@ -102,7 +101,7 @@ module YNAB
|
|
102
101
|
return nil unless attributes.is_a?(Hash)
|
103
102
|
self.class.swagger_types.each_pair do |key, type|
|
104
103
|
if type =~ /\AArray<(.*)>/i
|
105
|
-
# check to ensure the input is an array given that the
|
104
|
+
# check to ensure the input is an array given that the attribute
|
106
105
|
# is documented as an array but the input is not
|
107
106
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
107
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -198,5 +197,7 @@ module YNAB
|
|
198
197
|
value
|
199
198
|
end
|
200
199
|
end
|
200
|
+
|
201
201
|
end
|
202
|
+
|
202
203
|
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
|
[settings].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
|
|
@@ -31,6 +31,9 @@ module YNAB
|
|
31
31
|
|
32
32
|
attr_accessor :currency_format
|
33
33
|
|
34
|
+
# The budget accounts (only included if `include_accounts=true` specified as query parameter)
|
35
|
+
attr_accessor :accounts
|
36
|
+
|
34
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
38
|
def self.attribute_map
|
36
39
|
{
|
@@ -40,7 +43,8 @@ module YNAB
|
|
40
43
|
:'first_month' => :'first_month',
|
41
44
|
:'last_month' => :'last_month',
|
42
45
|
:'date_format' => :'date_format',
|
43
|
-
:'currency_format' => :'currency_format'
|
46
|
+
:'currency_format' => :'currency_format',
|
47
|
+
:'accounts' => :'accounts'
|
44
48
|
}
|
45
49
|
end
|
46
50
|
|
@@ -53,7 +57,8 @@ module YNAB
|
|
53
57
|
:'first_month' => :'Date',
|
54
58
|
:'last_month' => :'Date',
|
55
59
|
:'date_format' => :'DateFormat',
|
56
|
-
:'currency_format' => :'CurrencyFormat'
|
60
|
+
:'currency_format' => :'CurrencyFormat',
|
61
|
+
:'accounts' => :'Array<Account>'
|
57
62
|
}
|
58
63
|
end
|
59
64
|
|
@@ -92,6 +97,12 @@ module YNAB
|
|
92
97
|
if attributes.has_key?(:'currency_format')
|
93
98
|
self.currency_format = attributes[:'currency_format']
|
94
99
|
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'accounts')
|
102
|
+
if (value = attributes[:'accounts']).is_a?(Array)
|
103
|
+
self.accounts = value
|
104
|
+
end
|
105
|
+
end
|
95
106
|
end
|
96
107
|
|
97
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -128,7 +139,8 @@ module YNAB
|
|
128
139
|
first_month == o.first_month &&
|
129
140
|
last_month == o.last_month &&
|
130
141
|
date_format == o.date_format &&
|
131
|
-
currency_format == o.currency_format
|
142
|
+
currency_format == o.currency_format &&
|
143
|
+
accounts == o.accounts
|
132
144
|
end
|
133
145
|
|
134
146
|
# @see the `==` method
|
@@ -140,9 +152,8 @@ module YNAB
|
|
140
152
|
# Calculates hash code according to all attributes.
|
141
153
|
# @return [Fixnum] Hash code
|
142
154
|
def hash
|
143
|
-
[id, name, last_modified_on, first_month, last_month, date_format, currency_format].hash
|
155
|
+
[id, name, last_modified_on, first_month, last_month, date_format, currency_format, accounts].hash
|
144
156
|
end
|
145
|
-
|
146
157
|
# Builds the object from hash
|
147
158
|
# @param [Hash] attributes Model attributes in the form of hash
|
148
159
|
# @return [Object] Returns the model itself
|
@@ -150,7 +161,7 @@ module YNAB
|
|
150
161
|
return nil unless attributes.is_a?(Hash)
|
151
162
|
self.class.swagger_types.each_pair do |key, type|
|
152
163
|
if type =~ /\AArray<(.*)>/i
|
153
|
-
# check to ensure the input is an array given that the
|
164
|
+
# check to ensure the input is an array given that the attribute
|
154
165
|
# is documented as an array but the input is not
|
155
166
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
156
167
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -246,5 +257,7 @@ module YNAB
|
|
246
257
|
value
|
247
258
|
end
|
248
259
|
end
|
260
|
+
|
249
261
|
end
|
262
|
+
|
250
263
|
end
|