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
data/lib/ynab/models/payee.rb
CHANGED
|
@@ -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
|
|
|
@@ -32,9 +32,14 @@ module YNAB
|
|
|
32
32
|
}
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
35
40
|
# Returns all the JSON keys this model knows about
|
|
36
41
|
def self.acceptable_attributes
|
|
37
|
-
|
|
42
|
+
acceptable_attribute_map.values
|
|
38
43
|
end
|
|
39
44
|
|
|
40
45
|
# Attribute type mapping.
|
|
@@ -54,6 +59,16 @@ module YNAB
|
|
|
54
59
|
])
|
|
55
60
|
end
|
|
56
61
|
|
|
62
|
+
# Returns attribute type mapping
|
|
63
|
+
def self.acceptable_openapi_types
|
|
64
|
+
openapi_types
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns the nullable attributes
|
|
68
|
+
def self.acceptable_openapi_nullable
|
|
69
|
+
openapi_nullable
|
|
70
|
+
end
|
|
71
|
+
|
|
57
72
|
# Initializes the object
|
|
58
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
74
|
def initialize(attributes = {})
|
|
@@ -62,9 +77,10 @@ module YNAB
|
|
|
62
77
|
end
|
|
63
78
|
|
|
64
79
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
81
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::Payee`. Please check the name to make sure it's valid. List of attributes: " +
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::Payee`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
84
|
end
|
|
69
85
|
h[k.to_sym] = v
|
|
70
86
|
}
|
|
@@ -131,18 +147,20 @@ module YNAB
|
|
|
131
147
|
def self.build_from_hash(attributes)
|
|
132
148
|
return nil unless attributes.is_a?(Hash)
|
|
133
149
|
attributes = attributes.transform_keys(&:to_sym)
|
|
150
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
151
|
+
map = acceptable_attribute_map
|
|
134
152
|
transformed_hash = {}
|
|
135
|
-
|
|
136
|
-
if attributes.key?(
|
|
153
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
154
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
137
155
|
transformed_hash["#{key}"] = nil
|
|
138
156
|
elsif type =~ /\AArray<(.*)>/i
|
|
139
157
|
# check to ensure the input is an array given that the attribute
|
|
140
158
|
# is documented as an array but the input is not
|
|
141
|
-
if attributes[
|
|
142
|
-
transformed_hash["#{key}"] = attributes[
|
|
159
|
+
if attributes[map[key]].is_a?(Array)
|
|
160
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
143
161
|
end
|
|
144
|
-
elsif !attributes[
|
|
145
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
162
|
+
elsif !attributes[map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
146
164
|
end
|
|
147
165
|
end
|
|
148
166
|
new(transformed_hash)
|
|
@@ -152,10 +170,11 @@ module YNAB
|
|
|
152
170
|
# @return [Hash] Returns the object in the form of hash
|
|
153
171
|
def to_hash
|
|
154
172
|
hash = {}
|
|
155
|
-
|
|
173
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
174
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
156
175
|
value = self.send(attr)
|
|
157
176
|
if value.nil?
|
|
158
|
-
is_nullable = self.class.
|
|
177
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
159
178
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
160
179
|
end
|
|
161
180
|
|
|
@@ -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
|
|
|
@@ -34,9 +34,14 @@ module YNAB
|
|
|
34
34
|
}
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
37
42
|
# Returns all the JSON keys this model knows about
|
|
38
43
|
def self.acceptable_attributes
|
|
39
|
-
|
|
44
|
+
acceptable_attribute_map.values
|
|
40
45
|
end
|
|
41
46
|
|
|
42
47
|
# Attribute type mapping.
|
|
@@ -56,6 +61,16 @@ module YNAB
|
|
|
56
61
|
])
|
|
57
62
|
end
|
|
58
63
|
|
|
64
|
+
# Returns attribute type mapping
|
|
65
|
+
def self.acceptable_openapi_types
|
|
66
|
+
openapi_types
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns the nullable attributes
|
|
70
|
+
def self.acceptable_openapi_nullable
|
|
71
|
+
openapi_nullable
|
|
72
|
+
end
|
|
73
|
+
|
|
59
74
|
# Initializes the object
|
|
60
75
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
76
|
def initialize(attributes = {})
|
|
@@ -64,9 +79,10 @@ module YNAB
|
|
|
64
79
|
end
|
|
65
80
|
|
|
66
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
83
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
-
if (!
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::PayeeLocation`. Please check the name to make sure it's valid. List of attributes: " +
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::PayeeLocation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
86
|
end
|
|
71
87
|
h[k.to_sym] = v
|
|
72
88
|
}
|
|
@@ -140,18 +156,20 @@ module YNAB
|
|
|
140
156
|
def self.build_from_hash(attributes)
|
|
141
157
|
return nil unless attributes.is_a?(Hash)
|
|
142
158
|
attributes = attributes.transform_keys(&:to_sym)
|
|
159
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
160
|
+
map = acceptable_attribute_map
|
|
143
161
|
transformed_hash = {}
|
|
144
|
-
|
|
145
|
-
if attributes.key?(
|
|
162
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
146
164
|
transformed_hash["#{key}"] = nil
|
|
147
165
|
elsif type =~ /\AArray<(.*)>/i
|
|
148
166
|
# check to ensure the input is an array given that the attribute
|
|
149
167
|
# is documented as an array but the input is not
|
|
150
|
-
if attributes[
|
|
151
|
-
transformed_hash["#{key}"] = attributes[
|
|
168
|
+
if attributes[map[key]].is_a?(Array)
|
|
169
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
152
170
|
end
|
|
153
|
-
elsif !attributes[
|
|
154
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
171
|
+
elsif !attributes[map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
155
173
|
end
|
|
156
174
|
end
|
|
157
175
|
new(transformed_hash)
|
|
@@ -161,10 +179,11 @@ module YNAB
|
|
|
161
179
|
# @return [Hash] Returns the object in the form of hash
|
|
162
180
|
def to_hash
|
|
163
181
|
hash = {}
|
|
164
|
-
|
|
182
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
183
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
165
184
|
value = self.send(attr)
|
|
166
185
|
if value.nil?
|
|
167
|
-
is_nullable = self.class.
|
|
186
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
168
187
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
169
188
|
end
|
|
170
189
|
|
|
@@ -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::PayeeLocationResponse`. 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::PayeeLocationResponse`. 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
|
|
|
@@ -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::PayeeLocationResponseData`. 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::PayeeLocationResponseData`. 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
|
|
|
@@ -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::PayeeLocationsResponse`. 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::PayeeLocationsResponse`. 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
|
|
|
@@ -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::PayeeLocationsResponseData`. 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::PayeeLocationsResponseData`. 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
|
}
|
|
@@ -101,18 +117,20 @@ module YNAB
|
|
|
101
117
|
def self.build_from_hash(attributes)
|
|
102
118
|
return nil unless attributes.is_a?(Hash)
|
|
103
119
|
attributes = attributes.transform_keys(&:to_sym)
|
|
120
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
121
|
+
map = acceptable_attribute_map
|
|
104
122
|
transformed_hash = {}
|
|
105
|
-
|
|
106
|
-
if attributes.key?(
|
|
123
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
107
125
|
transformed_hash["#{key}"] = nil
|
|
108
126
|
elsif type =~ /\AArray<(.*)>/i
|
|
109
127
|
# check to ensure the input is an array given that the attribute
|
|
110
128
|
# is documented as an array but the input is not
|
|
111
|
-
if attributes[
|
|
112
|
-
transformed_hash["#{key}"] = attributes[
|
|
129
|
+
if attributes[map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
113
131
|
end
|
|
114
|
-
elsif !attributes[
|
|
115
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
132
|
+
elsif !attributes[map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
116
134
|
end
|
|
117
135
|
end
|
|
118
136
|
new(transformed_hash)
|
|
@@ -122,10 +140,11 @@ module YNAB
|
|
|
122
140
|
# @return [Hash] Returns the object in the form of hash
|
|
123
141
|
def to_hash
|
|
124
142
|
hash = {}
|
|
125
|
-
|
|
143
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
144
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
126
145
|
value = self.send(attr)
|
|
127
146
|
if value.nil?
|
|
128
|
-
is_nullable = self.class.
|
|
147
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
129
148
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
130
149
|
end
|
|
131
150
|
|
|
@@ -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::PayeeResponse`. 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::PayeeResponse`. 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
|
|