ynab 5.2.0 → 5.3.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/DEVELOPMENT.md +6 -3
- data/Gemfile.lock +21 -19
- data/Rakefile +9 -8
- data/docs/ExistingCategory.md +4 -3
- data/docs/ExistingTransaction.md +1 -1
- data/docs/NewCategory.md +4 -3
- data/docs/NewTransaction.md +1 -1
- data/docs/SaveCategory.md +4 -3
- data/docs/SaveTransactionWithIdOrImportId.md +1 -1
- data/docs/SaveTransactionWithOptionalFields.md +1 -1
- data/docs/TransactionsApi.md +1 -1
- data/lib/ynab/api/accounts_api.rb +1 -1
- data/lib/ynab/api/categories_api.rb +1 -1
- data/lib/ynab/api/money_movements_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/plans_api.rb +1 -1
- data/lib/ynab/api/scheduled_transactions_api.rb +1 -1
- data/lib/ynab/api/transactions_api.rb +3 -3
- data/lib/ynab/api/user_api.rb +1 -1
- data/lib/ynab/api_client.rb +1 -1
- data/lib/ynab/api_model_base.rb +1 -1
- data/lib/ynab/configuration.rb +1 -1
- data/lib/ynab/models/account.rb +38 -13
- data/lib/ynab/models/account_base.rb +34 -12
- data/lib/ynab/models/account_response.rb +31 -12
- data/lib/ynab/models/account_response_data.rb +31 -12
- data/lib/ynab/models/account_type.rb +1 -1
- data/lib/ynab/models/accounts_response.rb +31 -12
- data/lib/ynab/models/accounts_response_data.rb +31 -12
- data/lib/ynab/models/bulk_response.rb +31 -12
- data/lib/ynab/models/bulk_response_data.rb +31 -12
- data/lib/ynab/models/bulk_response_data_bulk.rb +31 -12
- data/lib/ynab/models/bulk_transactions.rb +31 -12
- data/lib/ynab/models/categories_response.rb +31 -12
- data/lib/ynab/models/categories_response_data.rb +31 -12
- data/lib/ynab/models/category.rb +47 -12
- data/lib/ynab/models/category_base.rb +31 -12
- data/lib/ynab/models/category_group.rb +31 -12
- data/lib/ynab/models/category_group_with_categories.rb +31 -12
- data/lib/ynab/models/category_response.rb +31 -12
- data/lib/ynab/models/category_response_data.rb +31 -12
- data/lib/ynab/models/currency_format.rb +31 -12
- data/lib/ynab/models/date_format.rb +31 -12
- data/lib/ynab/models/error_detail.rb +31 -12
- data/lib/ynab/models/error_response.rb +31 -12
- data/lib/ynab/models/existing_category.rb +83 -19
- data/lib/ynab/models/existing_transaction.rb +36 -13
- data/lib/ynab/models/hybrid_transaction.rb +41 -12
- data/lib/ynab/models/hybrid_transactions_response.rb +31 -12
- data/lib/ynab/models/hybrid_transactions_response_data.rb +31 -12
- data/lib/ynab/models/money_movement.rb +38 -12
- data/lib/ynab/models/money_movement_base.rb +31 -12
- data/lib/ynab/models/money_movement_group.rb +31 -12
- data/lib/ynab/models/money_movement_groups_response.rb +31 -12
- data/lib/ynab/models/money_movement_groups_response_data.rb +31 -12
- data/lib/ynab/models/money_movements_response.rb +31 -12
- data/lib/ynab/models/money_movements_response_data.rb +31 -12
- data/lib/ynab/models/month_detail.rb +33 -12
- data/lib/ynab/models/month_detail_base.rb +33 -12
- data/lib/ynab/models/month_detail_response.rb +31 -12
- data/lib/ynab/models/month_detail_response_data.rb +31 -12
- data/lib/ynab/models/month_summaries_response.rb +31 -12
- data/lib/ynab/models/month_summaries_response_data.rb +31 -12
- data/lib/ynab/models/month_summary.rb +33 -12
- data/lib/ynab/models/month_summary_base.rb +31 -12
- data/lib/ynab/models/new_category.rb +83 -19
- data/lib/ynab/models/new_transaction.rb +36 -13
- data/lib/ynab/models/patch_category_group_wrapper.rb +31 -12
- data/lib/ynab/models/patch_category_wrapper.rb +31 -12
- data/lib/ynab/models/patch_month_category_wrapper.rb +31 -12
- data/lib/ynab/models/patch_payee_wrapper.rb +31 -12
- data/lib/ynab/models/patch_transactions_wrapper.rb +31 -12
- data/lib/ynab/models/payee.rb +31 -12
- data/lib/ynab/models/payee_location.rb +31 -12
- data/lib/ynab/models/payee_location_response.rb +31 -12
- data/lib/ynab/models/payee_location_response_data.rb +31 -12
- data/lib/ynab/models/payee_locations_response.rb +31 -12
- data/lib/ynab/models/payee_locations_response_data.rb +31 -12
- data/lib/ynab/models/payee_response.rb +31 -12
- data/lib/ynab/models/payee_response_data.rb +31 -12
- data/lib/ynab/models/payees_response.rb +31 -12
- data/lib/ynab/models/payees_response_data.rb +31 -12
- data/lib/ynab/models/plan_detail.rb +33 -12
- data/lib/ynab/models/plan_detail_response.rb +31 -12
- data/lib/ynab/models/plan_detail_response_data.rb +31 -12
- data/lib/ynab/models/plan_settings.rb +33 -14
- data/lib/ynab/models/plan_settings_response.rb +31 -12
- data/lib/ynab/models/plan_settings_response_data.rb +31 -12
- data/lib/ynab/models/plan_summary.rb +33 -12
- data/lib/ynab/models/plan_summary_response.rb +31 -12
- data/lib/ynab/models/plan_summary_response_data.rb +31 -12
- data/lib/ynab/models/post_account_wrapper.rb +31 -12
- data/lib/ynab/models/post_category_group_wrapper.rb +31 -12
- data/lib/ynab/models/post_category_wrapper.rb +31 -12
- data/lib/ynab/models/post_payee.rb +31 -12
- data/lib/ynab/models/post_payee_wrapper.rb +31 -12
- data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +31 -12
- data/lib/ynab/models/post_transactions_wrapper.rb +31 -12
- data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +31 -12
- data/lib/ynab/models/put_transaction_wrapper.rb +31 -12
- data/lib/ynab/models/save_account.rb +31 -12
- data/lib/ynab/models/save_account_type.rb +1 -1
- data/lib/ynab/models/save_category.rb +79 -20
- data/lib/ynab/models/save_category_group.rb +31 -12
- data/lib/ynab/models/save_category_group_response.rb +31 -12
- data/lib/ynab/models/save_category_group_response_data.rb +31 -12
- data/lib/ynab/models/save_category_response.rb +31 -12
- data/lib/ynab/models/save_category_response_data.rb +31 -12
- data/lib/ynab/models/save_month_category.rb +31 -12
- data/lib/ynab/models/save_payee.rb +31 -12
- data/lib/ynab/models/save_payee_response.rb +31 -12
- data/lib/ynab/models/save_payee_response_data.rb +31 -12
- data/lib/ynab/models/save_scheduled_transaction.rb +31 -12
- data/lib/ynab/models/save_sub_transaction.rb +31 -12
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +36 -13
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +32 -13
- data/lib/ynab/models/save_transactions_response.rb +31 -12
- data/lib/ynab/models/save_transactions_response_data.rb +31 -12
- data/lib/ynab/models/scheduled_sub_transaction.rb +37 -12
- data/lib/ynab/models/scheduled_sub_transaction_base.rb +31 -12
- data/lib/ynab/models/scheduled_transaction_detail.rb +36 -12
- data/lib/ynab/models/scheduled_transaction_frequency.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_response.rb +31 -12
- data/lib/ynab/models/scheduled_transaction_response_data.rb +31 -12
- data/lib/ynab/models/scheduled_transaction_summary.rb +36 -12
- data/lib/ynab/models/scheduled_transaction_summary_base.rb +31 -12
- data/lib/ynab/models/scheduled_transactions_response.rb +31 -12
- data/lib/ynab/models/scheduled_transactions_response_data.rb +31 -12
- data/lib/ynab/models/sub_transaction.rb +38 -12
- data/lib/ynab/models/sub_transaction_base.rb +31 -12
- data/lib/ynab/models/transaction_cleared_status.rb +1 -1
- data/lib/ynab/models/transaction_detail.rb +41 -12
- data/lib/ynab/models/transaction_flag_color.rb +1 -1
- data/lib/ynab/models/transaction_response.rb +31 -12
- data/lib/ynab/models/transaction_response_data.rb +31 -12
- data/lib/ynab/models/transaction_summary.rb +41 -12
- data/lib/ynab/models/transaction_summary_base.rb +31 -12
- data/lib/ynab/models/transactions_import_response.rb +31 -12
- data/lib/ynab/models/transactions_import_response_data.rb +31 -12
- data/lib/ynab/models/transactions_response.rb +31 -12
- data/lib/ynab/models/transactions_response_data.rb +31 -12
- data/lib/ynab/models/user.rb +31 -12
- data/lib/ynab/models/user_response.rb +31 -12
- data/lib/ynab/models/user_response_data.rb +31 -12
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +1 -1
- data/open_api_spec.yaml +61 -30
- data/templates/partial_model_generic.mustache +37 -11
- data/ynab.gemspec +2 -2
- metadata +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -93,9 +93,14 @@ module YNAB
|
|
|
93
93
|
}
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
# Returns attribute mapping this model knows about
|
|
97
|
+
def self.acceptable_attribute_map
|
|
98
|
+
attribute_map
|
|
99
|
+
end
|
|
100
|
+
|
|
96
101
|
# Returns all the JSON keys this model knows about
|
|
97
102
|
def self.acceptable_attributes
|
|
98
|
-
|
|
103
|
+
acceptable_attribute_map.values
|
|
99
104
|
end
|
|
100
105
|
|
|
101
106
|
# Attribute type mapping.
|
|
@@ -122,10 +127,25 @@ module YNAB
|
|
|
122
127
|
# List of attributes with nullable: true
|
|
123
128
|
def self.openapi_nullable
|
|
124
129
|
Set.new([
|
|
130
|
+
:'memo',
|
|
125
131
|
:'flag_color',
|
|
132
|
+
:'flag_name',
|
|
133
|
+
:'payee_id',
|
|
134
|
+
:'category_id',
|
|
135
|
+
:'transfer_account_id',
|
|
126
136
|
])
|
|
127
137
|
end
|
|
128
138
|
|
|
139
|
+
# Returns attribute type mapping
|
|
140
|
+
def self.acceptable_openapi_types
|
|
141
|
+
openapi_types
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Returns the nullable attributes
|
|
145
|
+
def self.acceptable_openapi_nullable
|
|
146
|
+
openapi_nullable
|
|
147
|
+
end
|
|
148
|
+
|
|
129
149
|
# List of class defined in allOf (OpenAPI v3)
|
|
130
150
|
def self.openapi_all_of
|
|
131
151
|
[
|
|
@@ -141,9 +161,10 @@ module YNAB
|
|
|
141
161
|
end
|
|
142
162
|
|
|
143
163
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
164
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
144
165
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
145
|
-
if (!
|
|
146
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionSummary`. Please check the name to make sure it's valid. List of attributes: " +
|
|
166
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
167
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
147
168
|
end
|
|
148
169
|
h[k.to_sym] = v
|
|
149
170
|
}
|
|
@@ -277,18 +298,20 @@ module YNAB
|
|
|
277
298
|
def self.build_from_hash(attributes)
|
|
278
299
|
return nil unless attributes.is_a?(Hash)
|
|
279
300
|
attributes = attributes.transform_keys(&:to_sym)
|
|
301
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
302
|
+
map = acceptable_attribute_map
|
|
280
303
|
transformed_hash = {}
|
|
281
|
-
|
|
282
|
-
if attributes.key?(
|
|
304
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
305
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
283
306
|
transformed_hash["#{key}"] = nil
|
|
284
307
|
elsif type =~ /\AArray<(.*)>/i
|
|
285
308
|
# check to ensure the input is an array given that the attribute
|
|
286
309
|
# is documented as an array but the input is not
|
|
287
|
-
if attributes[
|
|
288
|
-
transformed_hash["#{key}"] = attributes[
|
|
310
|
+
if attributes[map[key]].is_a?(Array)
|
|
311
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
289
312
|
end
|
|
290
|
-
elsif !attributes[
|
|
291
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
313
|
+
elsif !attributes[map[key]].nil?
|
|
314
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
292
315
|
end
|
|
293
316
|
end
|
|
294
317
|
new(transformed_hash)
|
|
@@ -298,10 +321,11 @@ module YNAB
|
|
|
298
321
|
# @return [Hash] Returns the object in the form of hash
|
|
299
322
|
def to_hash
|
|
300
323
|
hash = {}
|
|
301
|
-
|
|
324
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
325
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
302
326
|
value = self.send(attr)
|
|
303
327
|
if value.nil?
|
|
304
|
-
is_nullable = self.class.
|
|
328
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
305
329
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
306
330
|
end
|
|
307
331
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -85,9 +85,14 @@ module YNAB
|
|
|
85
85
|
}
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
+
# Returns attribute mapping this model knows about
|
|
89
|
+
def self.acceptable_attribute_map
|
|
90
|
+
attribute_map
|
|
91
|
+
end
|
|
92
|
+
|
|
88
93
|
# Returns all the JSON keys this model knows about
|
|
89
94
|
def self.acceptable_attributes
|
|
90
|
-
|
|
95
|
+
acceptable_attribute_map.values
|
|
91
96
|
end
|
|
92
97
|
|
|
93
98
|
# Attribute type mapping.
|
|
@@ -121,6 +126,16 @@ module YNAB
|
|
|
121
126
|
])
|
|
122
127
|
end
|
|
123
128
|
|
|
129
|
+
# Returns attribute type mapping
|
|
130
|
+
def self.acceptable_openapi_types
|
|
131
|
+
openapi_types
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Returns the nullable attributes
|
|
135
|
+
def self.acceptable_openapi_nullable
|
|
136
|
+
openapi_nullable
|
|
137
|
+
end
|
|
138
|
+
|
|
124
139
|
# Initializes the object
|
|
125
140
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
141
|
def initialize(attributes = {})
|
|
@@ -129,9 +144,10 @@ module YNAB
|
|
|
129
144
|
end
|
|
130
145
|
|
|
131
146
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
147
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
132
148
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
-
if (!
|
|
134
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionSummaryBase`. Please check the name to make sure it's valid. List of attributes: " +
|
|
149
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
150
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionSummaryBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
135
151
|
end
|
|
136
152
|
h[k.to_sym] = v
|
|
137
153
|
}
|
|
@@ -255,18 +271,20 @@ module YNAB
|
|
|
255
271
|
def self.build_from_hash(attributes)
|
|
256
272
|
return nil unless attributes.is_a?(Hash)
|
|
257
273
|
attributes = attributes.transform_keys(&:to_sym)
|
|
274
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
275
|
+
map = acceptable_attribute_map
|
|
258
276
|
transformed_hash = {}
|
|
259
|
-
|
|
260
|
-
if attributes.key?(
|
|
277
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
278
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
261
279
|
transformed_hash["#{key}"] = nil
|
|
262
280
|
elsif type =~ /\AArray<(.*)>/i
|
|
263
281
|
# check to ensure the input is an array given that the attribute
|
|
264
282
|
# is documented as an array but the input is not
|
|
265
|
-
if attributes[
|
|
266
|
-
transformed_hash["#{key}"] = attributes[
|
|
283
|
+
if attributes[map[key]].is_a?(Array)
|
|
284
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
267
285
|
end
|
|
268
|
-
elsif !attributes[
|
|
269
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
286
|
+
elsif !attributes[map[key]].nil?
|
|
287
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
270
288
|
end
|
|
271
289
|
end
|
|
272
290
|
new(transformed_hash)
|
|
@@ -276,10 +294,11 @@ module YNAB
|
|
|
276
294
|
# @return [Hash] Returns the object in the form of hash
|
|
277
295
|
def to_hash
|
|
278
296
|
hash = {}
|
|
279
|
-
|
|
297
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
298
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
280
299
|
value = self.send(attr)
|
|
281
300
|
if value.nil?
|
|
282
|
-
is_nullable = self.class.
|
|
301
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
283
302
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
284
303
|
end
|
|
285
304
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -21,9 +21,14 @@ module YNAB
|
|
|
21
21
|
}
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# Returns attribute mapping this model knows about
|
|
25
|
+
def self.acceptable_attribute_map
|
|
26
|
+
attribute_map
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
# Returns all the JSON keys this model knows about
|
|
25
30
|
def self.acceptable_attributes
|
|
26
|
-
|
|
31
|
+
acceptable_attribute_map.values
|
|
27
32
|
end
|
|
28
33
|
|
|
29
34
|
# Attribute type mapping.
|
|
@@ -39,6 +44,16 @@ module YNAB
|
|
|
39
44
|
])
|
|
40
45
|
end
|
|
41
46
|
|
|
47
|
+
# Returns attribute type mapping
|
|
48
|
+
def self.acceptable_openapi_types
|
|
49
|
+
openapi_types
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns the nullable attributes
|
|
53
|
+
def self.acceptable_openapi_nullable
|
|
54
|
+
openapi_nullable
|
|
55
|
+
end
|
|
56
|
+
|
|
42
57
|
# Initializes the object
|
|
43
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
44
59
|
def initialize(attributes = {})
|
|
@@ -47,9 +62,10 @@ module YNAB
|
|
|
47
62
|
end
|
|
48
63
|
|
|
49
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
50
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
51
|
-
if (!
|
|
52
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionsResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
53
69
|
end
|
|
54
70
|
h[k.to_sym] = v
|
|
55
71
|
}
|
|
@@ -99,18 +115,20 @@ module YNAB
|
|
|
99
115
|
def self.build_from_hash(attributes)
|
|
100
116
|
return nil unless attributes.is_a?(Hash)
|
|
101
117
|
attributes = attributes.transform_keys(&:to_sym)
|
|
118
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
119
|
+
map = acceptable_attribute_map
|
|
102
120
|
transformed_hash = {}
|
|
103
|
-
|
|
104
|
-
if attributes.key?(
|
|
121
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
122
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
105
123
|
transformed_hash["#{key}"] = nil
|
|
106
124
|
elsif type =~ /\AArray<(.*)>/i
|
|
107
125
|
# check to ensure the input is an array given that the attribute
|
|
108
126
|
# is documented as an array but the input is not
|
|
109
|
-
if attributes[
|
|
110
|
-
transformed_hash["#{key}"] = attributes[
|
|
127
|
+
if attributes[map[key]].is_a?(Array)
|
|
128
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
111
129
|
end
|
|
112
|
-
elsif !attributes[
|
|
113
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
130
|
+
elsif !attributes[map[key]].nil?
|
|
131
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
114
132
|
end
|
|
115
133
|
end
|
|
116
134
|
new(transformed_hash)
|
|
@@ -120,10 +138,11 @@ module YNAB
|
|
|
120
138
|
# @return [Hash] Returns the object in the form of hash
|
|
121
139
|
def to_hash
|
|
122
140
|
hash = {}
|
|
123
|
-
|
|
141
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
142
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
124
143
|
value = self.send(attr)
|
|
125
144
|
if value.nil?
|
|
126
|
-
is_nullable = self.class.
|
|
145
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
127
146
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
128
147
|
end
|
|
129
148
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -25,9 +25,14 @@ module YNAB
|
|
|
25
25
|
}
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
28
33
|
# Returns all the JSON keys this model knows about
|
|
29
34
|
def self.acceptable_attributes
|
|
30
|
-
|
|
35
|
+
acceptable_attribute_map.values
|
|
31
36
|
end
|
|
32
37
|
|
|
33
38
|
# Attribute type mapping.
|
|
@@ -44,6 +49,16 @@ module YNAB
|
|
|
44
49
|
])
|
|
45
50
|
end
|
|
46
51
|
|
|
52
|
+
# Returns attribute type mapping
|
|
53
|
+
def self.acceptable_openapi_types
|
|
54
|
+
openapi_types
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns the nullable attributes
|
|
58
|
+
def self.acceptable_openapi_nullable
|
|
59
|
+
openapi_nullable
|
|
60
|
+
end
|
|
61
|
+
|
|
47
62
|
# Initializes the object
|
|
48
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
64
|
def initialize(attributes = {})
|
|
@@ -52,9 +67,10 @@ module YNAB
|
|
|
52
67
|
end
|
|
53
68
|
|
|
54
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
55
71
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
56
|
-
if (!
|
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionsResponseData`. Please check the name to make sure it's valid. List of attributes: " +
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::ScheduledTransactionsResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
58
74
|
end
|
|
59
75
|
h[k.to_sym] = v
|
|
60
76
|
}
|
|
@@ -112,18 +128,20 @@ module YNAB
|
|
|
112
128
|
def self.build_from_hash(attributes)
|
|
113
129
|
return nil unless attributes.is_a?(Hash)
|
|
114
130
|
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
132
|
+
map = acceptable_attribute_map
|
|
115
133
|
transformed_hash = {}
|
|
116
|
-
|
|
117
|
-
if attributes.key?(
|
|
134
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
118
136
|
transformed_hash["#{key}"] = nil
|
|
119
137
|
elsif type =~ /\AArray<(.*)>/i
|
|
120
138
|
# check to ensure the input is an array given that the attribute
|
|
121
139
|
# is documented as an array but the input is not
|
|
122
|
-
if attributes[
|
|
123
|
-
transformed_hash["#{key}"] = attributes[
|
|
140
|
+
if attributes[map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
124
142
|
end
|
|
125
|
-
elsif !attributes[
|
|
126
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
143
|
+
elsif !attributes[map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
127
145
|
end
|
|
128
146
|
end
|
|
129
147
|
new(transformed_hash)
|
|
@@ -133,10 +151,11 @@ module YNAB
|
|
|
133
151
|
# @return [Hash] Returns the object in the form of hash
|
|
134
152
|
def to_hash
|
|
135
153
|
hash = {}
|
|
136
|
-
|
|
154
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
155
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
137
156
|
value = self.send(attr)
|
|
138
157
|
if value.nil?
|
|
139
|
-
is_nullable = self.class.
|
|
158
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
140
159
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
141
160
|
end
|
|
142
161
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -63,9 +63,14 @@ module YNAB
|
|
|
63
63
|
}
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
# Returns attribute mapping this model knows about
|
|
67
|
+
def self.acceptable_attribute_map
|
|
68
|
+
attribute_map
|
|
69
|
+
end
|
|
70
|
+
|
|
66
71
|
# Returns all the JSON keys this model knows about
|
|
67
72
|
def self.acceptable_attributes
|
|
68
|
-
|
|
73
|
+
acceptable_attribute_map.values
|
|
69
74
|
end
|
|
70
75
|
|
|
71
76
|
# Attribute type mapping.
|
|
@@ -90,9 +95,26 @@ module YNAB
|
|
|
90
95
|
# List of attributes with nullable: true
|
|
91
96
|
def self.openapi_nullable
|
|
92
97
|
Set.new([
|
|
98
|
+
:'memo',
|
|
99
|
+
:'payee_id',
|
|
100
|
+
:'payee_name',
|
|
101
|
+
:'category_id',
|
|
102
|
+
:'category_name',
|
|
103
|
+
:'transfer_account_id',
|
|
104
|
+
:'transfer_transaction_id',
|
|
93
105
|
])
|
|
94
106
|
end
|
|
95
107
|
|
|
108
|
+
# Returns attribute type mapping
|
|
109
|
+
def self.acceptable_openapi_types
|
|
110
|
+
openapi_types
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Returns the nullable attributes
|
|
114
|
+
def self.acceptable_openapi_nullable
|
|
115
|
+
openapi_nullable
|
|
116
|
+
end
|
|
117
|
+
|
|
96
118
|
# List of class defined in allOf (OpenAPI v3)
|
|
97
119
|
def self.openapi_all_of
|
|
98
120
|
[
|
|
@@ -108,9 +130,10 @@ module YNAB
|
|
|
108
130
|
end
|
|
109
131
|
|
|
110
132
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
133
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
134
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
-
if (!
|
|
113
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::SubTransaction`. Please check the name to make sure it's valid. List of attributes: " +
|
|
135
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::SubTransaction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
137
|
end
|
|
115
138
|
h[k.to_sym] = v
|
|
116
139
|
}
|
|
@@ -223,18 +246,20 @@ module YNAB
|
|
|
223
246
|
def self.build_from_hash(attributes)
|
|
224
247
|
return nil unless attributes.is_a?(Hash)
|
|
225
248
|
attributes = attributes.transform_keys(&:to_sym)
|
|
249
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
250
|
+
map = acceptable_attribute_map
|
|
226
251
|
transformed_hash = {}
|
|
227
|
-
|
|
228
|
-
if attributes.key?(
|
|
252
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
253
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
229
254
|
transformed_hash["#{key}"] = nil
|
|
230
255
|
elsif type =~ /\AArray<(.*)>/i
|
|
231
256
|
# check to ensure the input is an array given that the attribute
|
|
232
257
|
# is documented as an array but the input is not
|
|
233
|
-
if attributes[
|
|
234
|
-
transformed_hash["#{key}"] = attributes[
|
|
258
|
+
if attributes[map[key]].is_a?(Array)
|
|
259
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
235
260
|
end
|
|
236
|
-
elsif !attributes[
|
|
237
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
261
|
+
elsif !attributes[map[key]].nil?
|
|
262
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
238
263
|
end
|
|
239
264
|
end
|
|
240
265
|
new(transformed_hash)
|
|
@@ -244,10 +269,11 @@ module YNAB
|
|
|
244
269
|
# @return [Hash] Returns the object in the form of hash
|
|
245
270
|
def to_hash
|
|
246
271
|
hash = {}
|
|
247
|
-
|
|
272
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
273
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
248
274
|
value = self.send(attr)
|
|
249
275
|
if value.nil?
|
|
250
|
-
is_nullable = self.class.
|
|
276
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
251
277
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
252
278
|
end
|
|
253
279
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|
|
@@ -55,9 +55,14 @@ module YNAB
|
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
# Returns all the JSON keys this model knows about
|
|
59
64
|
def self.acceptable_attributes
|
|
60
|
-
|
|
65
|
+
acceptable_attribute_map.values
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
# Attribute type mapping.
|
|
@@ -90,6 +95,16 @@ module YNAB
|
|
|
90
95
|
])
|
|
91
96
|
end
|
|
92
97
|
|
|
98
|
+
# Returns attribute type mapping
|
|
99
|
+
def self.acceptable_openapi_types
|
|
100
|
+
openapi_types
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns the nullable attributes
|
|
104
|
+
def self.acceptable_openapi_nullable
|
|
105
|
+
openapi_nullable
|
|
106
|
+
end
|
|
107
|
+
|
|
93
108
|
# Initializes the object
|
|
94
109
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
110
|
def initialize(attributes = {})
|
|
@@ -98,9 +113,10 @@ module YNAB
|
|
|
98
113
|
end
|
|
99
114
|
|
|
100
115
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
117
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
-
if (!
|
|
103
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::SubTransactionBase`. Please check the name to make sure it's valid. List of attributes: " +
|
|
118
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::SubTransactionBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
120
|
end
|
|
105
121
|
h[k.to_sym] = v
|
|
106
122
|
}
|
|
@@ -203,18 +219,20 @@ module YNAB
|
|
|
203
219
|
def self.build_from_hash(attributes)
|
|
204
220
|
return nil unless attributes.is_a?(Hash)
|
|
205
221
|
attributes = attributes.transform_keys(&:to_sym)
|
|
222
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
223
|
+
map = acceptable_attribute_map
|
|
206
224
|
transformed_hash = {}
|
|
207
|
-
|
|
208
|
-
if attributes.key?(
|
|
225
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
226
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
209
227
|
transformed_hash["#{key}"] = nil
|
|
210
228
|
elsif type =~ /\AArray<(.*)>/i
|
|
211
229
|
# check to ensure the input is an array given that the attribute
|
|
212
230
|
# is documented as an array but the input is not
|
|
213
|
-
if attributes[
|
|
214
|
-
transformed_hash["#{key}"] = attributes[
|
|
231
|
+
if attributes[map[key]].is_a?(Array)
|
|
232
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
215
233
|
end
|
|
216
|
-
elsif !attributes[
|
|
217
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
234
|
+
elsif !attributes[map[key]].nil?
|
|
235
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
218
236
|
end
|
|
219
237
|
end
|
|
220
238
|
new(transformed_hash)
|
|
@@ -224,10 +242,11 @@ module YNAB
|
|
|
224
242
|
# @return [Hash] Returns the object in the form of hash
|
|
225
243
|
def to_hash
|
|
226
244
|
hash = {}
|
|
227
|
-
|
|
245
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
246
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
228
247
|
value = self.send(attr)
|
|
229
248
|
if value.nil?
|
|
230
|
-
is_nullable = self.class.
|
|
249
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
231
250
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
232
251
|
end
|
|
233
252
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#YNAB API Endpoints
|
|
3
3
|
|
|
4
|
-
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation
|
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
|
|
5
5
|
|
|
6
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
7
|
|