ynab 0.6.0 → 0.7.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/Gemfile.lock +1 -1
- data/README.md +24 -24
- data/Rakefile +1 -1
- data/config.json +1 -1
- data/docs/AccountsApi.md +0 -76
- data/docs/BudgetsApi.md +0 -74
- data/docs/CategoriesApi.md +0 -76
- data/docs/CurrencyFormat.md +8 -1
- data/docs/DateFormat.md +1 -1
- data/docs/HybridTransaction.md +3 -0
- data/docs/MonthsApi.md +0 -76
- data/docs/PayeeLocationsApi.md +0 -115
- data/docs/PayeesApi.md +0 -76
- data/docs/ScheduledTransactionsApi.md +0 -76
- data/docs/TransactionsApi.md +0 -325
- data/docs/UserApi.md +0 -34
- data/lib/ynab/api/accounts_api.rb +8 -10
- data/lib/ynab/api/budgets_api.rb +8 -10
- data/lib/ynab/api/categories_api.rb +8 -10
- data/lib/ynab/api/months_api.rb +8 -10
- data/lib/ynab/api/payee_locations_api.rb +11 -14
- data/lib/ynab/api/payees_api.rb +8 -10
- data/lib/ynab/api/scheduled_transactions_api.rb +8 -10
- data/lib/ynab/api/transactions_api.rb +26 -34
- data/lib/ynab/api/user_api.rb +5 -6
- data/lib/ynab/api_client.rb +1 -1
- data/lib/ynab/api_error.rb +1 -1
- data/lib/ynab/configuration.rb +2 -2
- data/lib/ynab/models/account.rb +18 -22
- data/lib/ynab/models/account_response.rb +7 -12
- data/lib/ynab/models/account_wrapper.rb +7 -12
- data/lib/ynab/models/accounts_response.rb +7 -12
- data/lib/ynab/models/accounts_wrapper.rb +7 -12
- data/lib/ynab/models/budget_detail.rb +8 -13
- data/lib/ynab/models/budget_detail_response.rb +7 -12
- data/lib/ynab/models/budget_detail_wrapper.rb +8 -13
- data/lib/ynab/models/budget_summary.rb +8 -13
- data/lib/ynab/models/budget_summary_response.rb +7 -12
- data/lib/ynab/models/budget_summary_wrapper.rb +7 -12
- data/lib/ynab/models/bulk_id_wrapper.rb +7 -12
- data/lib/ynab/models/bulk_ids.rb +8 -13
- data/lib/ynab/models/bulk_response.rb +7 -12
- data/lib/ynab/models/bulk_transactions.rb +7 -12
- data/lib/ynab/models/categories_response.rb +7 -12
- data/lib/ynab/models/category.rb +14 -19
- data/lib/ynab/models/category_group.rb +9 -14
- data/lib/ynab/models/category_group_with_categories.rb +10 -15
- data/lib/ynab/models/category_groups_wrapper.rb +7 -12
- data/lib/ynab/models/category_response.rb +7 -12
- data/lib/ynab/models/category_wrapper.rb +7 -12
- data/lib/ynab/models/currency_format.rb +112 -19
- data/lib/ynab/models/date_format.rb +16 -21
- data/lib/ynab/models/error_detail.rb +9 -14
- data/lib/ynab/models/error_response.rb +7 -12
- data/lib/ynab/models/hybrid_transaction.rb +74 -36
- data/lib/ynab/models/hybrid_transactions_response.rb +7 -12
- data/lib/ynab/models/hybrid_transactions_wrapper.rb +7 -12
- data/lib/ynab/models/month_detail.rb +11 -16
- data/lib/ynab/models/month_detail_response.rb +7 -12
- data/lib/ynab/models/month_detail_wrapper.rb +7 -12
- data/lib/ynab/models/month_summaries_response.rb +7 -12
- data/lib/ynab/models/month_summaries_wrapper.rb +7 -12
- data/lib/ynab/models/month_summary.rb +10 -15
- data/lib/ynab/models/payee.rb +9 -14
- data/lib/ynab/models/payee_location.rb +10 -15
- data/lib/ynab/models/payee_location_response.rb +7 -12
- data/lib/ynab/models/payee_location_wrapper.rb +7 -12
- data/lib/ynab/models/payee_locations_response.rb +7 -12
- data/lib/ynab/models/payee_locations_wrapper.rb +7 -12
- data/lib/ynab/models/payee_response.rb +7 -12
- data/lib/ynab/models/payee_wrapper.rb +7 -12
- data/lib/ynab/models/payees_response.rb +7 -12
- data/lib/ynab/models/payees_wrapper.rb +7 -12
- data/lib/ynab/models/save_transaction.rb +15 -19
- data/lib/ynab/models/save_transaction_wrapper.rb +7 -12
- data/lib/ynab/models/scheduled_sub_transaction.rb +13 -18
- data/lib/ynab/models/scheduled_transaction_detail.rb +27 -31
- data/lib/ynab/models/scheduled_transaction_response.rb +7 -12
- data/lib/ynab/models/scheduled_transaction_summary.rb +23 -27
- data/lib/ynab/models/scheduled_transaction_wrapper.rb +7 -12
- data/lib/ynab/models/scheduled_transactions_response.rb +7 -12
- data/lib/ynab/models/scheduled_transactions_wrapper.rb +7 -12
- data/lib/ynab/models/sub_transaction.rb +13 -18
- data/lib/ynab/models/transaction_detail.rb +28 -32
- data/lib/ynab/models/transaction_response.rb +7 -12
- data/lib/ynab/models/transaction_summary.rb +24 -28
- data/lib/ynab/models/transaction_wrapper.rb +7 -12
- data/lib/ynab/models/transactions_response.rb +7 -12
- data/lib/ynab/models/transactions_wrapper.rb +7 -12
- data/lib/ynab/models/user.rb +7 -12
- data/lib/ynab/models/user_response.rb +7 -12
- data/lib/ynab/models/user_wrapper.rb +7 -12
- data/lib/ynab/version.rb +2 -2
- data/spec-v1-swagger.json +50 -5
- data/swagger-templates/api_doc.mustache +32 -0
- data/ynab.gemspec +1 -1
- metadata +4 -3
@@ -6,18 +6,16 @@
|
|
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.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ScheduledTransactionResponse
|
18
17
|
attr_accessor :data
|
19
18
|
|
20
|
-
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
@@ -38,12 +36,11 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
41
|
if attributes.has_key?(:'data')
|
44
42
|
self.data = attributes[:'data']
|
45
43
|
end
|
46
|
-
|
47
44
|
end
|
48
45
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -51,17 +48,17 @@ module YnabApi
|
|
51
48
|
def list_invalid_properties
|
52
49
|
invalid_properties = Array.new
|
53
50
|
if @data.nil?
|
54
|
-
invalid_properties.push(
|
51
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
55
52
|
end
|
56
53
|
|
57
|
-
|
54
|
+
invalid_properties
|
58
55
|
end
|
59
56
|
|
60
57
|
# Check to see if the all the properties in the model are valid
|
61
58
|
# @return true if the model is valid
|
62
59
|
def valid?
|
63
60
|
return false if @data.nil?
|
64
|
-
|
61
|
+
true
|
65
62
|
end
|
66
63
|
|
67
64
|
# Checks equality by comparing each attribute.
|
@@ -94,7 +91,7 @@ module YnabApi
|
|
94
91
|
# check to ensure the input is an array given that the the attribute
|
95
92
|
# is documented as an array but the input is not
|
96
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
95
|
end
|
99
96
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
97
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -176,7 +173,7 @@ module YnabApi
|
|
176
173
|
# @return [Hash] Returns the value in the form of hash
|
177
174
|
def _to_hash(value)
|
178
175
|
if value.is_a?(Array)
|
179
|
-
value.compact.map{ |v| _to_hash(v) }
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
180
177
|
elsif value.is_a?(Hash)
|
181
178
|
{}.tap do |hash|
|
182
179
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -187,7 +184,5 @@ module YnabApi
|
|
187
184
|
value
|
188
185
|
end
|
189
186
|
end
|
190
|
-
|
191
187
|
end
|
192
|
-
|
193
188
|
end
|
@@ -6,14 +6,13 @@
|
|
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.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ScheduledTransactionSummary
|
18
17
|
attr_accessor :id
|
19
18
|
|
@@ -104,7 +103,7 @@ module YnabApi
|
|
104
103
|
return unless attributes.is_a?(Hash)
|
105
104
|
|
106
105
|
# convert string to symbol for hash key
|
107
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
108
107
|
|
109
108
|
if attributes.has_key?(:'id')
|
110
109
|
self.id = attributes[:'id']
|
@@ -149,7 +148,6 @@ module YnabApi
|
|
149
148
|
if attributes.has_key?(:'transfer_account_id')
|
150
149
|
self.transfer_account_id = attributes[:'transfer_account_id']
|
151
150
|
end
|
152
|
-
|
153
151
|
end
|
154
152
|
|
155
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -157,50 +155,50 @@ module YnabApi
|
|
157
155
|
def list_invalid_properties
|
158
156
|
invalid_properties = Array.new
|
159
157
|
if @id.nil?
|
160
|
-
invalid_properties.push(
|
158
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
161
159
|
end
|
162
160
|
|
163
161
|
if @date_first.nil?
|
164
|
-
invalid_properties.push(
|
162
|
+
invalid_properties.push('invalid value for "date_first", date_first cannot be nil.')
|
165
163
|
end
|
166
164
|
|
167
165
|
if @date_next.nil?
|
168
|
-
invalid_properties.push(
|
166
|
+
invalid_properties.push('invalid value for "date_next", date_next cannot be nil.')
|
169
167
|
end
|
170
168
|
|
171
169
|
if @frequency.nil?
|
172
|
-
invalid_properties.push(
|
170
|
+
invalid_properties.push('invalid value for "frequency", frequency cannot be nil.')
|
173
171
|
end
|
174
172
|
|
175
173
|
if @amount.nil?
|
176
|
-
invalid_properties.push(
|
174
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
177
175
|
end
|
178
176
|
|
179
177
|
if @memo.nil?
|
180
|
-
invalid_properties.push(
|
178
|
+
invalid_properties.push('invalid value for "memo", memo cannot be nil.')
|
181
179
|
end
|
182
180
|
|
183
181
|
if @flag_color.nil?
|
184
|
-
invalid_properties.push(
|
182
|
+
invalid_properties.push('invalid value for "flag_color", flag_color cannot be nil.')
|
185
183
|
end
|
186
184
|
|
187
185
|
if @account_id.nil?
|
188
|
-
invalid_properties.push(
|
186
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
189
187
|
end
|
190
188
|
|
191
189
|
if @payee_id.nil?
|
192
|
-
invalid_properties.push(
|
190
|
+
invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
|
193
191
|
end
|
194
192
|
|
195
193
|
if @category_id.nil?
|
196
|
-
invalid_properties.push(
|
194
|
+
invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
|
197
195
|
end
|
198
196
|
|
199
197
|
if @transfer_account_id.nil?
|
200
|
-
invalid_properties.push(
|
198
|
+
invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
|
201
199
|
end
|
202
200
|
|
203
|
-
|
201
|
+
invalid_properties
|
204
202
|
end
|
205
203
|
|
206
204
|
# Check to see if the all the properties in the model are valid
|
@@ -210,26 +208,26 @@ module YnabApi
|
|
210
208
|
return false if @date_first.nil?
|
211
209
|
return false if @date_next.nil?
|
212
210
|
return false if @frequency.nil?
|
213
|
-
frequency_validator = EnumAttributeValidator.new('String', [
|
211
|
+
frequency_validator = EnumAttributeValidator.new('String', ['never', 'daily', 'weekly', 'everyOtherWeek', 'twiceAMonth', 'every4Weeks', 'monthly', 'everyOtherMonth', 'every3Months', 'every4Months', 'twiceAYear', 'yearly', 'everyOtherYear'])
|
214
212
|
return false unless frequency_validator.valid?(@frequency)
|
215
213
|
return false if @amount.nil?
|
216
214
|
return false if @memo.nil?
|
217
215
|
return false if @flag_color.nil?
|
218
|
-
flag_color_validator = EnumAttributeValidator.new('String', [
|
216
|
+
flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
219
217
|
return false unless flag_color_validator.valid?(@flag_color)
|
220
218
|
return false if @account_id.nil?
|
221
219
|
return false if @payee_id.nil?
|
222
220
|
return false if @category_id.nil?
|
223
221
|
return false if @transfer_account_id.nil?
|
224
|
-
|
222
|
+
true
|
225
223
|
end
|
226
224
|
|
227
225
|
# Custom attribute writer method checking allowed values (enum).
|
228
226
|
# @param [Object] frequency Object to be assigned
|
229
227
|
def frequency=(frequency)
|
230
|
-
validator = EnumAttributeValidator.new('String', [
|
228
|
+
validator = EnumAttributeValidator.new('String', ['never', 'daily', 'weekly', 'everyOtherWeek', 'twiceAMonth', 'every4Weeks', 'monthly', 'everyOtherMonth', 'every3Months', 'every4Months', 'twiceAYear', 'yearly', 'everyOtherYear'])
|
231
229
|
unless validator.valid?(frequency)
|
232
|
-
fail ArgumentError,
|
230
|
+
fail ArgumentError, 'invalid value for "frequency", must be one of #{validator.allowable_values}.'
|
233
231
|
end
|
234
232
|
@frequency = frequency
|
235
233
|
end
|
@@ -237,9 +235,9 @@ module YnabApi
|
|
237
235
|
# Custom attribute writer method checking allowed values (enum).
|
238
236
|
# @param [Object] flag_color Object to be assigned
|
239
237
|
def flag_color=(flag_color)
|
240
|
-
validator = EnumAttributeValidator.new('String', [
|
238
|
+
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
241
239
|
unless validator.valid?(flag_color)
|
242
|
-
fail ArgumentError,
|
240
|
+
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
243
241
|
end
|
244
242
|
@flag_color = flag_color
|
245
243
|
end
|
@@ -284,7 +282,7 @@ module YnabApi
|
|
284
282
|
# check to ensure the input is an array given that the the attribute
|
285
283
|
# is documented as an array but the input is not
|
286
284
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
287
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
285
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
288
286
|
end
|
289
287
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
290
288
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -366,7 +364,7 @@ module YnabApi
|
|
366
364
|
# @return [Hash] Returns the value in the form of hash
|
367
365
|
def _to_hash(value)
|
368
366
|
if value.is_a?(Array)
|
369
|
-
value.compact.map{ |v| _to_hash(v) }
|
367
|
+
value.compact.map { |v| _to_hash(v) }
|
370
368
|
elsif value.is_a?(Hash)
|
371
369
|
{}.tap do |hash|
|
372
370
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -377,7 +375,5 @@ module YnabApi
|
|
377
375
|
value
|
378
376
|
end
|
379
377
|
end
|
380
|
-
|
381
378
|
end
|
382
|
-
|
383
379
|
end
|
@@ -6,18 +6,16 @@
|
|
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.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ScheduledTransactionWrapper
|
18
17
|
attr_accessor :scheduled_transaction
|
19
18
|
|
20
|
-
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
@@ -38,12 +36,11 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
41
|
if attributes.has_key?(:'scheduled_transaction')
|
44
42
|
self.scheduled_transaction = attributes[:'scheduled_transaction']
|
45
43
|
end
|
46
|
-
|
47
44
|
end
|
48
45
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -51,17 +48,17 @@ module YnabApi
|
|
51
48
|
def list_invalid_properties
|
52
49
|
invalid_properties = Array.new
|
53
50
|
if @scheduled_transaction.nil?
|
54
|
-
invalid_properties.push(
|
51
|
+
invalid_properties.push('invalid value for "scheduled_transaction", scheduled_transaction cannot be nil.')
|
55
52
|
end
|
56
53
|
|
57
|
-
|
54
|
+
invalid_properties
|
58
55
|
end
|
59
56
|
|
60
57
|
# Check to see if the all the properties in the model are valid
|
61
58
|
# @return true if the model is valid
|
62
59
|
def valid?
|
63
60
|
return false if @scheduled_transaction.nil?
|
64
|
-
|
61
|
+
true
|
65
62
|
end
|
66
63
|
|
67
64
|
# Checks equality by comparing each attribute.
|
@@ -94,7 +91,7 @@ module YnabApi
|
|
94
91
|
# check to ensure the input is an array given that the the attribute
|
95
92
|
# is documented as an array but the input is not
|
96
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
95
|
end
|
99
96
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
97
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -176,7 +173,7 @@ module YnabApi
|
|
176
173
|
# @return [Hash] Returns the value in the form of hash
|
177
174
|
def _to_hash(value)
|
178
175
|
if value.is_a?(Array)
|
179
|
-
value.compact.map{ |v| _to_hash(v) }
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
180
177
|
elsif value.is_a?(Hash)
|
181
178
|
{}.tap do |hash|
|
182
179
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -187,7 +184,5 @@ module YnabApi
|
|
187
184
|
value
|
188
185
|
end
|
189
186
|
end
|
190
|
-
|
191
187
|
end
|
192
|
-
|
193
188
|
end
|
@@ -6,18 +6,16 @@
|
|
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.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ScheduledTransactionsResponse
|
18
17
|
attr_accessor :data
|
19
18
|
|
20
|
-
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
@@ -38,12 +36,11 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
41
|
if attributes.has_key?(:'data')
|
44
42
|
self.data = attributes[:'data']
|
45
43
|
end
|
46
|
-
|
47
44
|
end
|
48
45
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -51,17 +48,17 @@ module YnabApi
|
|
51
48
|
def list_invalid_properties
|
52
49
|
invalid_properties = Array.new
|
53
50
|
if @data.nil?
|
54
|
-
invalid_properties.push(
|
51
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
55
52
|
end
|
56
53
|
|
57
|
-
|
54
|
+
invalid_properties
|
58
55
|
end
|
59
56
|
|
60
57
|
# Check to see if the all the properties in the model are valid
|
61
58
|
# @return true if the model is valid
|
62
59
|
def valid?
|
63
60
|
return false if @data.nil?
|
64
|
-
|
61
|
+
true
|
65
62
|
end
|
66
63
|
|
67
64
|
# Checks equality by comparing each attribute.
|
@@ -94,7 +91,7 @@ module YnabApi
|
|
94
91
|
# check to ensure the input is an array given that the the attribute
|
95
92
|
# is documented as an array but the input is not
|
96
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
95
|
end
|
99
96
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
97
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -176,7 +173,7 @@ module YnabApi
|
|
176
173
|
# @return [Hash] Returns the value in the form of hash
|
177
174
|
def _to_hash(value)
|
178
175
|
if value.is_a?(Array)
|
179
|
-
value.compact.map{ |v| _to_hash(v) }
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
180
177
|
elsif value.is_a?(Hash)
|
181
178
|
{}.tap do |hash|
|
182
179
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -187,7 +184,5 @@ module YnabApi
|
|
187
184
|
value
|
188
185
|
end
|
189
186
|
end
|
190
|
-
|
191
187
|
end
|
192
|
-
|
193
188
|
end
|
@@ -6,18 +6,16 @@
|
|
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.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ScheduledTransactionsWrapper
|
18
17
|
attr_accessor :scheduled_transactions
|
19
18
|
|
20
|
-
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
@@ -38,14 +36,13 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
41
|
if attributes.has_key?(:'scheduled_transactions')
|
44
42
|
if (value = attributes[:'scheduled_transactions']).is_a?(Array)
|
45
43
|
self.scheduled_transactions = value
|
46
44
|
end
|
47
45
|
end
|
48
|
-
|
49
46
|
end
|
50
47
|
|
51
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -53,17 +50,17 @@ module YnabApi
|
|
53
50
|
def list_invalid_properties
|
54
51
|
invalid_properties = Array.new
|
55
52
|
if @scheduled_transactions.nil?
|
56
|
-
invalid_properties.push(
|
53
|
+
invalid_properties.push('invalid value for "scheduled_transactions", scheduled_transactions cannot be nil.')
|
57
54
|
end
|
58
55
|
|
59
|
-
|
56
|
+
invalid_properties
|
60
57
|
end
|
61
58
|
|
62
59
|
# Check to see if the all the properties in the model are valid
|
63
60
|
# @return true if the model is valid
|
64
61
|
def valid?
|
65
62
|
return false if @scheduled_transactions.nil?
|
66
|
-
|
63
|
+
true
|
67
64
|
end
|
68
65
|
|
69
66
|
# Checks equality by comparing each attribute.
|
@@ -96,7 +93,7 @@ module YnabApi
|
|
96
93
|
# check to ensure the input is an array given that the the attribute
|
97
94
|
# is documented as an array but the input is not
|
98
95
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
99
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
96
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
100
97
|
end
|
101
98
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
102
99
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -178,7 +175,7 @@ module YnabApi
|
|
178
175
|
# @return [Hash] Returns the value in the form of hash
|
179
176
|
def _to_hash(value)
|
180
177
|
if value.is_a?(Array)
|
181
|
-
value.compact.map{ |v| _to_hash(v) }
|
178
|
+
value.compact.map { |v| _to_hash(v) }
|
182
179
|
elsif value.is_a?(Hash)
|
183
180
|
{}.tap do |hash|
|
184
181
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -189,7 +186,5 @@ module YnabApi
|
|
189
186
|
value
|
190
187
|
end
|
191
188
|
end
|
192
|
-
|
193
189
|
end
|
194
|
-
|
195
190
|
end
|