ynab 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +24 -24
  4. data/Rakefile +1 -1
  5. data/config.json +1 -1
  6. data/docs/AccountsApi.md +0 -76
  7. data/docs/BudgetsApi.md +0 -74
  8. data/docs/CategoriesApi.md +0 -76
  9. data/docs/CurrencyFormat.md +8 -1
  10. data/docs/DateFormat.md +1 -1
  11. data/docs/HybridTransaction.md +3 -0
  12. data/docs/MonthsApi.md +0 -76
  13. data/docs/PayeeLocationsApi.md +0 -115
  14. data/docs/PayeesApi.md +0 -76
  15. data/docs/ScheduledTransactionsApi.md +0 -76
  16. data/docs/TransactionsApi.md +0 -325
  17. data/docs/UserApi.md +0 -34
  18. data/lib/ynab/api/accounts_api.rb +8 -10
  19. data/lib/ynab/api/budgets_api.rb +8 -10
  20. data/lib/ynab/api/categories_api.rb +8 -10
  21. data/lib/ynab/api/months_api.rb +8 -10
  22. data/lib/ynab/api/payee_locations_api.rb +11 -14
  23. data/lib/ynab/api/payees_api.rb +8 -10
  24. data/lib/ynab/api/scheduled_transactions_api.rb +8 -10
  25. data/lib/ynab/api/transactions_api.rb +26 -34
  26. data/lib/ynab/api/user_api.rb +5 -6
  27. data/lib/ynab/api_client.rb +1 -1
  28. data/lib/ynab/api_error.rb +1 -1
  29. data/lib/ynab/configuration.rb +2 -2
  30. data/lib/ynab/models/account.rb +18 -22
  31. data/lib/ynab/models/account_response.rb +7 -12
  32. data/lib/ynab/models/account_wrapper.rb +7 -12
  33. data/lib/ynab/models/accounts_response.rb +7 -12
  34. data/lib/ynab/models/accounts_wrapper.rb +7 -12
  35. data/lib/ynab/models/budget_detail.rb +8 -13
  36. data/lib/ynab/models/budget_detail_response.rb +7 -12
  37. data/lib/ynab/models/budget_detail_wrapper.rb +8 -13
  38. data/lib/ynab/models/budget_summary.rb +8 -13
  39. data/lib/ynab/models/budget_summary_response.rb +7 -12
  40. data/lib/ynab/models/budget_summary_wrapper.rb +7 -12
  41. data/lib/ynab/models/bulk_id_wrapper.rb +7 -12
  42. data/lib/ynab/models/bulk_ids.rb +8 -13
  43. data/lib/ynab/models/bulk_response.rb +7 -12
  44. data/lib/ynab/models/bulk_transactions.rb +7 -12
  45. data/lib/ynab/models/categories_response.rb +7 -12
  46. data/lib/ynab/models/category.rb +14 -19
  47. data/lib/ynab/models/category_group.rb +9 -14
  48. data/lib/ynab/models/category_group_with_categories.rb +10 -15
  49. data/lib/ynab/models/category_groups_wrapper.rb +7 -12
  50. data/lib/ynab/models/category_response.rb +7 -12
  51. data/lib/ynab/models/category_wrapper.rb +7 -12
  52. data/lib/ynab/models/currency_format.rb +112 -19
  53. data/lib/ynab/models/date_format.rb +16 -21
  54. data/lib/ynab/models/error_detail.rb +9 -14
  55. data/lib/ynab/models/error_response.rb +7 -12
  56. data/lib/ynab/models/hybrid_transaction.rb +74 -36
  57. data/lib/ynab/models/hybrid_transactions_response.rb +7 -12
  58. data/lib/ynab/models/hybrid_transactions_wrapper.rb +7 -12
  59. data/lib/ynab/models/month_detail.rb +11 -16
  60. data/lib/ynab/models/month_detail_response.rb +7 -12
  61. data/lib/ynab/models/month_detail_wrapper.rb +7 -12
  62. data/lib/ynab/models/month_summaries_response.rb +7 -12
  63. data/lib/ynab/models/month_summaries_wrapper.rb +7 -12
  64. data/lib/ynab/models/month_summary.rb +10 -15
  65. data/lib/ynab/models/payee.rb +9 -14
  66. data/lib/ynab/models/payee_location.rb +10 -15
  67. data/lib/ynab/models/payee_location_response.rb +7 -12
  68. data/lib/ynab/models/payee_location_wrapper.rb +7 -12
  69. data/lib/ynab/models/payee_locations_response.rb +7 -12
  70. data/lib/ynab/models/payee_locations_wrapper.rb +7 -12
  71. data/lib/ynab/models/payee_response.rb +7 -12
  72. data/lib/ynab/models/payee_wrapper.rb +7 -12
  73. data/lib/ynab/models/payees_response.rb +7 -12
  74. data/lib/ynab/models/payees_wrapper.rb +7 -12
  75. data/lib/ynab/models/save_transaction.rb +15 -19
  76. data/lib/ynab/models/save_transaction_wrapper.rb +7 -12
  77. data/lib/ynab/models/scheduled_sub_transaction.rb +13 -18
  78. data/lib/ynab/models/scheduled_transaction_detail.rb +27 -31
  79. data/lib/ynab/models/scheduled_transaction_response.rb +7 -12
  80. data/lib/ynab/models/scheduled_transaction_summary.rb +23 -27
  81. data/lib/ynab/models/scheduled_transaction_wrapper.rb +7 -12
  82. data/lib/ynab/models/scheduled_transactions_response.rb +7 -12
  83. data/lib/ynab/models/scheduled_transactions_wrapper.rb +7 -12
  84. data/lib/ynab/models/sub_transaction.rb +13 -18
  85. data/lib/ynab/models/transaction_detail.rb +28 -32
  86. data/lib/ynab/models/transaction_response.rb +7 -12
  87. data/lib/ynab/models/transaction_summary.rb +24 -28
  88. data/lib/ynab/models/transaction_wrapper.rb +7 -12
  89. data/lib/ynab/models/transactions_response.rb +7 -12
  90. data/lib/ynab/models/transactions_wrapper.rb +7 -12
  91. data/lib/ynab/models/user.rb +7 -12
  92. data/lib/ynab/models/user_response.rb +7 -12
  93. data/lib/ynab/models/user_wrapper.rb +7 -12
  94. data/lib/ynab/version.rb +2 -2
  95. data/spec-v1-swagger.json +50 -5
  96. data/swagger-templates/api_doc.mustache +32 -0
  97. data/ynab.gemspec +1 -1
  98. metadata +4 -3
@@ -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.3.1
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 SubTransaction
18
17
  attr_accessor :id
19
18
 
@@ -31,7 +30,6 @@ module YnabApi
31
30
  # If a transfer, the account_id which the subtransaction transfers to
32
31
  attr_accessor :transfer_account_id
33
32
 
34
-
35
33
  # Attribute mapping from ruby-style variable name to JSON key.
36
34
  def self.attribute_map
37
35
  {
@@ -64,7 +62,7 @@ module YnabApi
64
62
  return unless attributes.is_a?(Hash)
65
63
 
66
64
  # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
65
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
66
 
69
67
  if attributes.has_key?(:'id')
70
68
  self.id = attributes[:'id']
@@ -93,7 +91,6 @@ module YnabApi
93
91
  if attributes.has_key?(:'transfer_account_id')
94
92
  self.transfer_account_id = attributes[:'transfer_account_id']
95
93
  end
96
-
97
94
  end
98
95
 
99
96
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -101,34 +98,34 @@ module YnabApi
101
98
  def list_invalid_properties
102
99
  invalid_properties = Array.new
103
100
  if @id.nil?
104
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
101
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
105
102
  end
106
103
 
107
104
  if @transaction_id.nil?
108
- invalid_properties.push("invalid value for 'transaction_id', transaction_id cannot be nil.")
105
+ invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
109
106
  end
110
107
 
111
108
  if @amount.nil?
112
- invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
109
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
113
110
  end
114
111
 
115
112
  if @memo.nil?
116
- invalid_properties.push("invalid value for 'memo', memo cannot be nil.")
113
+ invalid_properties.push('invalid value for "memo", memo cannot be nil.')
117
114
  end
118
115
 
119
116
  if @payee_id.nil?
120
- invalid_properties.push("invalid value for 'payee_id', payee_id cannot be nil.")
117
+ invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
121
118
  end
122
119
 
123
120
  if @category_id.nil?
124
- invalid_properties.push("invalid value for 'category_id', category_id cannot be nil.")
121
+ invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
125
122
  end
126
123
 
127
124
  if @transfer_account_id.nil?
128
- invalid_properties.push("invalid value for 'transfer_account_id', transfer_account_id cannot be nil.")
125
+ invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
129
126
  end
130
127
 
131
- return invalid_properties
128
+ invalid_properties
132
129
  end
133
130
 
134
131
  # Check to see if the all the properties in the model are valid
@@ -141,7 +138,7 @@ module YnabApi
141
138
  return false if @payee_id.nil?
142
139
  return false if @category_id.nil?
143
140
  return false if @transfer_account_id.nil?
144
- return true
141
+ true
145
142
  end
146
143
 
147
144
  # Checks equality by comparing each attribute.
@@ -180,7 +177,7 @@ module YnabApi
180
177
  # check to ensure the input is an array given that the the attribute
181
178
  # is documented as an array but the input is not
182
179
  if attributes[self.class.attribute_map[key]].is_a?(Array)
183
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
180
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
181
  end
185
182
  elsif !attributes[self.class.attribute_map[key]].nil?
186
183
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -262,7 +259,7 @@ module YnabApi
262
259
  # @return [Hash] Returns the value in the form of hash
263
260
  def _to_hash(value)
264
261
  if value.is_a?(Array)
265
- value.compact.map{ |v| _to_hash(v) }
262
+ value.compact.map { |v| _to_hash(v) }
266
263
  elsif value.is_a?(Hash)
267
264
  {}.tap do |hash|
268
265
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -273,7 +270,5 @@ module YnabApi
273
270
  value
274
271
  end
275
272
  end
276
-
277
273
  end
278
-
279
274
  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.3.1
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 TransactionDetail
18
17
  attr_accessor :id
19
18
 
@@ -125,7 +124,7 @@ module YnabApi
125
124
  return unless attributes.is_a?(Hash)
126
125
 
127
126
  # convert string to symbol for hash key
128
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
127
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
129
128
 
130
129
  if attributes.has_key?(:'id')
131
130
  self.id = attributes[:'id']
@@ -192,7 +191,6 @@ module YnabApi
192
191
  self.subtransactions = value
193
192
  end
194
193
  end
195
-
196
194
  end
197
195
 
198
196
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -200,70 +198,70 @@ module YnabApi
200
198
  def list_invalid_properties
201
199
  invalid_properties = Array.new
202
200
  if @id.nil?
203
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
201
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
204
202
  end
205
203
 
206
204
  if @date.nil?
207
- invalid_properties.push("invalid value for 'date', date cannot be nil.")
205
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
208
206
  end
209
207
 
210
208
  if @amount.nil?
211
- invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
209
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
212
210
  end
213
211
 
214
212
  if @memo.nil?
215
- invalid_properties.push("invalid value for 'memo', memo cannot be nil.")
213
+ invalid_properties.push('invalid value for "memo", memo cannot be nil.')
216
214
  end
217
215
 
218
216
  if @cleared.nil?
219
- invalid_properties.push("invalid value for 'cleared', cleared cannot be nil.")
217
+ invalid_properties.push('invalid value for "cleared", cleared cannot be nil.')
220
218
  end
221
219
 
222
220
  if @approved.nil?
223
- invalid_properties.push("invalid value for 'approved', approved cannot be nil.")
221
+ invalid_properties.push('invalid value for "approved", approved cannot be nil.')
224
222
  end
225
223
 
226
224
  if @flag_color.nil?
227
- invalid_properties.push("invalid value for 'flag_color', flag_color cannot be nil.")
225
+ invalid_properties.push('invalid value for "flag_color", flag_color cannot be nil.')
228
226
  end
229
227
 
230
228
  if @account_id.nil?
231
- invalid_properties.push("invalid value for 'account_id', account_id cannot be nil.")
229
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
232
230
  end
233
231
 
234
232
  if @payee_id.nil?
235
- invalid_properties.push("invalid value for 'payee_id', payee_id cannot be nil.")
233
+ invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
236
234
  end
237
235
 
238
236
  if @category_id.nil?
239
- invalid_properties.push("invalid value for 'category_id', category_id cannot be nil.")
237
+ invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
240
238
  end
241
239
 
242
240
  if @transfer_account_id.nil?
243
- invalid_properties.push("invalid value for 'transfer_account_id', transfer_account_id cannot be nil.")
241
+ invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
244
242
  end
245
243
 
246
244
  if @import_id.nil?
247
- invalid_properties.push("invalid value for 'import_id', import_id cannot be nil.")
245
+ invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
248
246
  end
249
247
 
250
248
  if @account_name.nil?
251
- invalid_properties.push("invalid value for 'account_name', account_name cannot be nil.")
249
+ invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
252
250
  end
253
251
 
254
252
  if @payee_name.nil?
255
- invalid_properties.push("invalid value for 'payee_name', payee_name cannot be nil.")
253
+ invalid_properties.push('invalid value for "payee_name", payee_name cannot be nil.')
256
254
  end
257
255
 
258
256
  if @category_name.nil?
259
- invalid_properties.push("invalid value for 'category_name', category_name cannot be nil.")
257
+ invalid_properties.push('invalid value for "category_name", category_name cannot be nil.')
260
258
  end
261
259
 
262
260
  if @subtransactions.nil?
263
- invalid_properties.push("invalid value for 'subtransactions', subtransactions cannot be nil.")
261
+ invalid_properties.push('invalid value for "subtransactions", subtransactions cannot be nil.')
264
262
  end
265
263
 
266
- return invalid_properties
264
+ invalid_properties
267
265
  end
268
266
 
269
267
  # Check to see if the all the properties in the model are valid
@@ -274,11 +272,11 @@ module YnabApi
274
272
  return false if @amount.nil?
275
273
  return false if @memo.nil?
276
274
  return false if @cleared.nil?
277
- cleared_validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
275
+ cleared_validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
278
276
  return false unless cleared_validator.valid?(@cleared)
279
277
  return false if @approved.nil?
280
278
  return false if @flag_color.nil?
281
- flag_color_validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
279
+ flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
282
280
  return false unless flag_color_validator.valid?(@flag_color)
283
281
  return false if @account_id.nil?
284
282
  return false if @payee_id.nil?
@@ -289,15 +287,15 @@ module YnabApi
289
287
  return false if @payee_name.nil?
290
288
  return false if @category_name.nil?
291
289
  return false if @subtransactions.nil?
292
- return true
290
+ true
293
291
  end
294
292
 
295
293
  # Custom attribute writer method checking allowed values (enum).
296
294
  # @param [Object] cleared Object to be assigned
297
295
  def cleared=(cleared)
298
- validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
296
+ validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
299
297
  unless validator.valid?(cleared)
300
- fail ArgumentError, "invalid value for 'cleared', must be one of #{validator.allowable_values}."
298
+ fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
301
299
  end
302
300
  @cleared = cleared
303
301
  end
@@ -305,9 +303,9 @@ module YnabApi
305
303
  # Custom attribute writer method checking allowed values (enum).
306
304
  # @param [Object] flag_color Object to be assigned
307
305
  def flag_color=(flag_color)
308
- validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
306
+ validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
309
307
  unless validator.valid?(flag_color)
310
- fail ArgumentError, "invalid value for 'flag_color', must be one of #{validator.allowable_values}."
308
+ fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
311
309
  end
312
310
  @flag_color = flag_color
313
311
  end
@@ -357,7 +355,7 @@ module YnabApi
357
355
  # check to ensure the input is an array given that the the attribute
358
356
  # is documented as an array but the input is not
359
357
  if attributes[self.class.attribute_map[key]].is_a?(Array)
360
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
358
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
361
359
  end
362
360
  elsif !attributes[self.class.attribute_map[key]].nil?
363
361
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -439,7 +437,7 @@ module YnabApi
439
437
  # @return [Hash] Returns the value in the form of hash
440
438
  def _to_hash(value)
441
439
  if value.is_a?(Array)
442
- value.compact.map{ |v| _to_hash(v) }
440
+ value.compact.map { |v| _to_hash(v) }
443
441
  elsif value.is_a?(Hash)
444
442
  {}.tap do |hash|
445
443
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -450,7 +448,5 @@ module YnabApi
450
448
  value
451
449
  end
452
450
  end
453
-
454
451
  end
455
-
456
452
  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.3.1
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 TransactionResponse
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("invalid value for 'data', data cannot be nil.")
51
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
55
52
  end
56
53
 
57
- return invalid_properties
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
- return true
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.3.1
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 TransactionSummary
18
17
  attr_accessor :id
19
18
 
@@ -108,7 +107,7 @@ module YnabApi
108
107
  return unless attributes.is_a?(Hash)
109
108
 
110
109
  # convert string to symbol for hash key
111
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
110
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
112
111
 
113
112
  if attributes.has_key?(:'id')
114
113
  self.id = attributes[:'id']
@@ -157,7 +156,6 @@ module YnabApi
157
156
  if attributes.has_key?(:'import_id')
158
157
  self.import_id = attributes[:'import_id']
159
158
  end
160
-
161
159
  end
162
160
 
163
161
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -165,54 +163,54 @@ module YnabApi
165
163
  def list_invalid_properties
166
164
  invalid_properties = Array.new
167
165
  if @id.nil?
168
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
166
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
169
167
  end
170
168
 
171
169
  if @date.nil?
172
- invalid_properties.push("invalid value for 'date', date cannot be nil.")
170
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
173
171
  end
174
172
 
175
173
  if @amount.nil?
176
- invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
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("invalid value for 'memo', memo cannot be nil.")
178
+ invalid_properties.push('invalid value for "memo", memo cannot be nil.')
181
179
  end
182
180
 
183
181
  if @cleared.nil?
184
- invalid_properties.push("invalid value for 'cleared', cleared cannot be nil.")
182
+ invalid_properties.push('invalid value for "cleared", cleared cannot be nil.')
185
183
  end
186
184
 
187
185
  if @approved.nil?
188
- invalid_properties.push("invalid value for 'approved', approved cannot be nil.")
186
+ invalid_properties.push('invalid value for "approved", approved cannot be nil.')
189
187
  end
190
188
 
191
189
  if @flag_color.nil?
192
- invalid_properties.push("invalid value for 'flag_color', flag_color cannot be nil.")
190
+ invalid_properties.push('invalid value for "flag_color", flag_color cannot be nil.')
193
191
  end
194
192
 
195
193
  if @account_id.nil?
196
- invalid_properties.push("invalid value for 'account_id', account_id cannot be nil.")
194
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
197
195
  end
198
196
 
199
197
  if @payee_id.nil?
200
- invalid_properties.push("invalid value for 'payee_id', payee_id cannot be nil.")
198
+ invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
201
199
  end
202
200
 
203
201
  if @category_id.nil?
204
- invalid_properties.push("invalid value for 'category_id', category_id cannot be nil.")
202
+ invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
205
203
  end
206
204
 
207
205
  if @transfer_account_id.nil?
208
- invalid_properties.push("invalid value for 'transfer_account_id', transfer_account_id cannot be nil.")
206
+ invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
209
207
  end
210
208
 
211
209
  if @import_id.nil?
212
- invalid_properties.push("invalid value for 'import_id', import_id cannot be nil.")
210
+ invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
213
211
  end
214
212
 
215
- return invalid_properties
213
+ invalid_properties
216
214
  end
217
215
 
218
216
  # Check to see if the all the properties in the model are valid
@@ -223,26 +221,26 @@ module YnabApi
223
221
  return false if @amount.nil?
224
222
  return false if @memo.nil?
225
223
  return false if @cleared.nil?
226
- cleared_validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
224
+ cleared_validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
227
225
  return false unless cleared_validator.valid?(@cleared)
228
226
  return false if @approved.nil?
229
227
  return false if @flag_color.nil?
230
- flag_color_validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
228
+ flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
231
229
  return false unless flag_color_validator.valid?(@flag_color)
232
230
  return false if @account_id.nil?
233
231
  return false if @payee_id.nil?
234
232
  return false if @category_id.nil?
235
233
  return false if @transfer_account_id.nil?
236
234
  return false if @import_id.nil?
237
- return true
235
+ true
238
236
  end
239
237
 
240
238
  # Custom attribute writer method checking allowed values (enum).
241
239
  # @param [Object] cleared Object to be assigned
242
240
  def cleared=(cleared)
243
- validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
241
+ validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
244
242
  unless validator.valid?(cleared)
245
- fail ArgumentError, "invalid value for 'cleared', must be one of #{validator.allowable_values}."
243
+ fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
246
244
  end
247
245
  @cleared = cleared
248
246
  end
@@ -250,9 +248,9 @@ module YnabApi
250
248
  # Custom attribute writer method checking allowed values (enum).
251
249
  # @param [Object] flag_color Object to be assigned
252
250
  def flag_color=(flag_color)
253
- validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
251
+ validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
254
252
  unless validator.valid?(flag_color)
255
- fail ArgumentError, "invalid value for 'flag_color', must be one of #{validator.allowable_values}."
253
+ fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
256
254
  end
257
255
  @flag_color = flag_color
258
256
  end
@@ -298,7 +296,7 @@ module YnabApi
298
296
  # check to ensure the input is an array given that the the attribute
299
297
  # is documented as an array but the input is not
300
298
  if attributes[self.class.attribute_map[key]].is_a?(Array)
301
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
299
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
302
300
  end
303
301
  elsif !attributes[self.class.attribute_map[key]].nil?
304
302
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -380,7 +378,7 @@ module YnabApi
380
378
  # @return [Hash] Returns the value in the form of hash
381
379
  def _to_hash(value)
382
380
  if value.is_a?(Array)
383
- value.compact.map{ |v| _to_hash(v) }
381
+ value.compact.map { |v| _to_hash(v) }
384
382
  elsif value.is_a?(Hash)
385
383
  {}.tap do |hash|
386
384
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -391,7 +389,5 @@ module YnabApi
391
389
  value
392
390
  end
393
391
  end
394
-
395
392
  end
396
-
397
393
  end