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,29 +6,27 @@
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 DateFormat
18
- attr_accessor :locale
19
-
17
+ attr_accessor :format
20
18
 
21
19
  # Attribute mapping from ruby-style variable name to JSON key.
22
20
  def self.attribute_map
23
21
  {
24
- :'locale' => :'locale'
22
+ :'format' => :'format'
25
23
  }
26
24
  end
27
25
 
28
26
  # Attribute type mapping.
29
27
  def self.swagger_types
30
28
  {
31
- :'locale' => :'String'
29
+ :'format' => :'String'
32
30
  }
33
31
  end
34
32
 
@@ -38,30 +36,29 @@ 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
- if attributes.has_key?(:'locale')
44
- self.locale = attributes[:'locale']
41
+ if attributes.has_key?(:'format')
42
+ self.format = attributes[:'format']
45
43
  end
46
-
47
44
  end
48
45
 
49
46
  # Show invalid properties with the reasons. Usually used together with valid?
50
47
  # @return Array for valid properties with the reasons
51
48
  def list_invalid_properties
52
49
  invalid_properties = Array.new
53
- if @locale.nil?
54
- invalid_properties.push("invalid value for 'locale', locale cannot be nil.")
50
+ if @format.nil?
51
+ invalid_properties.push('invalid value for "format", format 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
- return false if @locale.nil?
64
- return true
60
+ return false if @format.nil?
61
+ true
65
62
  end
66
63
 
67
64
  # Checks equality by comparing each attribute.
@@ -69,7 +66,7 @@ module YnabApi
69
66
  def ==(o)
70
67
  return true if self.equal?(o)
71
68
  self.class == o.class &&
72
- locale == o.locale
69
+ format == o.format
73
70
  end
74
71
 
75
72
  # @see the `==` method
@@ -81,7 +78,7 @@ module YnabApi
81
78
  # Calculates hash code according to all attributes.
82
79
  # @return [Fixnum] Hash code
83
80
  def hash
84
- [locale].hash
81
+ [format].hash
85
82
  end
86
83
 
87
84
  # Builds the object from hash
@@ -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 ErrorDetail
18
17
  attr_accessor :id
19
18
 
@@ -21,7 +20,6 @@ module YnabApi
21
20
 
22
21
  attr_accessor :detail
23
22
 
24
-
25
23
  # Attribute mapping from ruby-style variable name to JSON key.
26
24
  def self.attribute_map
27
25
  {
@@ -46,7 +44,7 @@ module YnabApi
46
44
  return unless attributes.is_a?(Hash)
47
45
 
48
46
  # convert string to symbol for hash key
49
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
48
 
51
49
  if attributes.has_key?(:'id')
52
50
  self.id = attributes[:'id']
@@ -59,7 +57,6 @@ module YnabApi
59
57
  if attributes.has_key?(:'detail')
60
58
  self.detail = attributes[:'detail']
61
59
  end
62
-
63
60
  end
64
61
 
65
62
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -67,18 +64,18 @@ module YnabApi
67
64
  def list_invalid_properties
68
65
  invalid_properties = Array.new
69
66
  if @id.nil?
70
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
67
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
71
68
  end
72
69
 
73
70
  if @name.nil?
74
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
71
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
75
72
  end
76
73
 
77
74
  if @detail.nil?
78
- invalid_properties.push("invalid value for 'detail', detail cannot be nil.")
75
+ invalid_properties.push('invalid value for "detail", detail cannot be nil.')
79
76
  end
80
77
 
81
- return invalid_properties
78
+ invalid_properties
82
79
  end
83
80
 
84
81
  # Check to see if the all the properties in the model are valid
@@ -87,7 +84,7 @@ module YnabApi
87
84
  return false if @id.nil?
88
85
  return false if @name.nil?
89
86
  return false if @detail.nil?
90
- return true
87
+ true
91
88
  end
92
89
 
93
90
  # Checks equality by comparing each attribute.
@@ -122,7 +119,7 @@ module YnabApi
122
119
  # check to ensure the input is an array given that the the attribute
123
120
  # is documented as an array but the input is not
124
121
  if attributes[self.class.attribute_map[key]].is_a?(Array)
125
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
122
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
123
  end
127
124
  elsif !attributes[self.class.attribute_map[key]].nil?
128
125
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -204,7 +201,7 @@ module YnabApi
204
201
  # @return [Hash] Returns the value in the form of hash
205
202
  def _to_hash(value)
206
203
  if value.is_a?(Array)
207
- value.compact.map{ |v| _to_hash(v) }
204
+ value.compact.map { |v| _to_hash(v) }
208
205
  elsif value.is_a?(Hash)
209
206
  {}.tap do |hash|
210
207
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -215,7 +212,5 @@ module YnabApi
215
212
  value
216
213
  end
217
214
  end
218
-
219
215
  end
220
-
221
216
  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 ErrorResponse
18
17
  attr_accessor :error
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?(:'error')
44
42
  self.error = attributes[:'error']
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 @error.nil?
54
- invalid_properties.push("invalid value for 'error', error cannot be nil.")
51
+ invalid_properties.push('invalid value for "error", error 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 @error.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 HybridTransaction
18
17
  attr_accessor :id
19
18
 
@@ -50,6 +49,12 @@ module YnabApi
50
49
  # For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
51
50
  attr_accessor :parent_transaction_id
52
51
 
52
+ attr_accessor :account_name
53
+
54
+ attr_accessor :payee_name
55
+
56
+ attr_accessor :category_name
57
+
53
58
  class EnumAttributeValidator
54
59
  attr_reader :datatype
55
60
  attr_reader :allowable_values
@@ -88,7 +93,10 @@ module YnabApi
88
93
  :'transfer_account_id' => :'transfer_account_id',
89
94
  :'import_id' => :'import_id',
90
95
  :'type' => :'type',
91
- :'parent_transaction_id' => :'parent_transaction_id'
96
+ :'parent_transaction_id' => :'parent_transaction_id',
97
+ :'account_name' => :'account_name',
98
+ :'payee_name' => :'payee_name',
99
+ :'category_name' => :'category_name'
92
100
  }
93
101
  end
94
102
 
@@ -108,7 +116,10 @@ module YnabApi
108
116
  :'transfer_account_id' => :'String',
109
117
  :'import_id' => :'String',
110
118
  :'type' => :'String',
111
- :'parent_transaction_id' => :'String'
119
+ :'parent_transaction_id' => :'String',
120
+ :'account_name' => :'String',
121
+ :'payee_name' => :'String',
122
+ :'category_name' => :'String'
112
123
  }
113
124
  end
114
125
 
@@ -118,7 +129,7 @@ module YnabApi
118
129
  return unless attributes.is_a?(Hash)
119
130
 
120
131
  # convert string to symbol for hash key
121
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
132
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
122
133
 
123
134
  if attributes.has_key?(:'id')
124
135
  self.id = attributes[:'id']
@@ -176,6 +187,17 @@ module YnabApi
176
187
  self.parent_transaction_id = attributes[:'parent_transaction_id']
177
188
  end
178
189
 
190
+ if attributes.has_key?(:'account_name')
191
+ self.account_name = attributes[:'account_name']
192
+ end
193
+
194
+ if attributes.has_key?(:'payee_name')
195
+ self.payee_name = attributes[:'payee_name']
196
+ end
197
+
198
+ if attributes.has_key?(:'category_name')
199
+ self.category_name = attributes[:'category_name']
200
+ end
179
201
  end
180
202
 
181
203
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -183,62 +205,74 @@ module YnabApi
183
205
  def list_invalid_properties
184
206
  invalid_properties = Array.new
185
207
  if @id.nil?
186
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
208
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
187
209
  end
188
210
 
189
211
  if @date.nil?
190
- invalid_properties.push("invalid value for 'date', date cannot be nil.")
212
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
191
213
  end
192
214
 
193
215
  if @amount.nil?
194
- invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
216
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
195
217
  end
196
218
 
197
219
  if @memo.nil?
198
- invalid_properties.push("invalid value for 'memo', memo cannot be nil.")
220
+ invalid_properties.push('invalid value for "memo", memo cannot be nil.')
199
221
  end
200
222
 
201
223
  if @cleared.nil?
202
- invalid_properties.push("invalid value for 'cleared', cleared cannot be nil.")
224
+ invalid_properties.push('invalid value for "cleared", cleared cannot be nil.')
203
225
  end
204
226
 
205
227
  if @approved.nil?
206
- invalid_properties.push("invalid value for 'approved', approved cannot be nil.")
228
+ invalid_properties.push('invalid value for "approved", approved cannot be nil.')
207
229
  end
208
230
 
209
231
  if @flag_color.nil?
210
- invalid_properties.push("invalid value for 'flag_color', flag_color cannot be nil.")
232
+ invalid_properties.push('invalid value for "flag_color", flag_color cannot be nil.')
211
233
  end
212
234
 
213
235
  if @account_id.nil?
214
- invalid_properties.push("invalid value for 'account_id', account_id cannot be nil.")
236
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
215
237
  end
216
238
 
217
239
  if @payee_id.nil?
218
- invalid_properties.push("invalid value for 'payee_id', payee_id cannot be nil.")
240
+ invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
219
241
  end
220
242
 
221
243
  if @category_id.nil?
222
- invalid_properties.push("invalid value for 'category_id', category_id cannot be nil.")
244
+ invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
223
245
  end
224
246
 
225
247
  if @transfer_account_id.nil?
226
- invalid_properties.push("invalid value for 'transfer_account_id', transfer_account_id cannot be nil.")
248
+ invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
227
249
  end
228
250
 
229
251
  if @import_id.nil?
230
- invalid_properties.push("invalid value for 'import_id', import_id cannot be nil.")
252
+ invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
231
253
  end
232
254
 
233
255
  if @type.nil?
234
- invalid_properties.push("invalid value for 'type', type cannot be nil.")
256
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
235
257
  end
236
258
 
237
259
  if @parent_transaction_id.nil?
238
- invalid_properties.push("invalid value for 'parent_transaction_id', parent_transaction_id cannot be nil.")
260
+ invalid_properties.push('invalid value for "parent_transaction_id", parent_transaction_id cannot be nil.')
239
261
  end
240
262
 
241
- return invalid_properties
263
+ if @account_name.nil?
264
+ invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
265
+ end
266
+
267
+ if @payee_name.nil?
268
+ invalid_properties.push('invalid value for "payee_name", payee_name cannot be nil.')
269
+ end
270
+
271
+ if @category_name.nil?
272
+ invalid_properties.push('invalid value for "category_name", category_name cannot be nil.')
273
+ end
274
+
275
+ invalid_properties
242
276
  end
243
277
 
244
278
  # Check to see if the all the properties in the model are valid
@@ -249,11 +283,11 @@ module YnabApi
249
283
  return false if @amount.nil?
250
284
  return false if @memo.nil?
251
285
  return false if @cleared.nil?
252
- cleared_validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
286
+ cleared_validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
253
287
  return false unless cleared_validator.valid?(@cleared)
254
288
  return false if @approved.nil?
255
289
  return false if @flag_color.nil?
256
- flag_color_validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
290
+ flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
257
291
  return false unless flag_color_validator.valid?(@flag_color)
258
292
  return false if @account_id.nil?
259
293
  return false if @payee_id.nil?
@@ -261,18 +295,21 @@ module YnabApi
261
295
  return false if @transfer_account_id.nil?
262
296
  return false if @import_id.nil?
263
297
  return false if @type.nil?
264
- type_validator = EnumAttributeValidator.new('String', ["transaction", "subtransaction"])
298
+ type_validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
265
299
  return false unless type_validator.valid?(@type)
266
300
  return false if @parent_transaction_id.nil?
267
- return true
301
+ return false if @account_name.nil?
302
+ return false if @payee_name.nil?
303
+ return false if @category_name.nil?
304
+ true
268
305
  end
269
306
 
270
307
  # Custom attribute writer method checking allowed values (enum).
271
308
  # @param [Object] cleared Object to be assigned
272
309
  def cleared=(cleared)
273
- validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
310
+ validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
274
311
  unless validator.valid?(cleared)
275
- fail ArgumentError, "invalid value for 'cleared', must be one of #{validator.allowable_values}."
312
+ fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
276
313
  end
277
314
  @cleared = cleared
278
315
  end
@@ -280,9 +317,9 @@ module YnabApi
280
317
  # Custom attribute writer method checking allowed values (enum).
281
318
  # @param [Object] flag_color Object to be assigned
282
319
  def flag_color=(flag_color)
283
- validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
320
+ validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
284
321
  unless validator.valid?(flag_color)
285
- fail ArgumentError, "invalid value for 'flag_color', must be one of #{validator.allowable_values}."
322
+ fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
286
323
  end
287
324
  @flag_color = flag_color
288
325
  end
@@ -290,9 +327,9 @@ module YnabApi
290
327
  # Custom attribute writer method checking allowed values (enum).
291
328
  # @param [Object] type Object to be assigned
292
329
  def type=(type)
293
- validator = EnumAttributeValidator.new('String', ["transaction", "subtransaction"])
330
+ validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
294
331
  unless validator.valid?(type)
295
- fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
332
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
296
333
  end
297
334
  @type = type
298
335
  end
@@ -315,7 +352,10 @@ module YnabApi
315
352
  transfer_account_id == o.transfer_account_id &&
316
353
  import_id == o.import_id &&
317
354
  type == o.type &&
318
- parent_transaction_id == o.parent_transaction_id
355
+ parent_transaction_id == o.parent_transaction_id &&
356
+ account_name == o.account_name &&
357
+ payee_name == o.payee_name &&
358
+ category_name == o.category_name
319
359
  end
320
360
 
321
361
  # @see the `==` method
@@ -327,7 +367,7 @@ module YnabApi
327
367
  # Calculates hash code according to all attributes.
328
368
  # @return [Fixnum] Hash code
329
369
  def hash
330
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, type, parent_transaction_id].hash
370
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, type, parent_transaction_id, account_name, payee_name, category_name].hash
331
371
  end
332
372
 
333
373
  # Builds the object from hash
@@ -340,7 +380,7 @@ module YnabApi
340
380
  # check to ensure the input is an array given that the the attribute
341
381
  # is documented as an array but the input is not
342
382
  if attributes[self.class.attribute_map[key]].is_a?(Array)
343
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
383
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
344
384
  end
345
385
  elsif !attributes[self.class.attribute_map[key]].nil?
346
386
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -422,7 +462,7 @@ module YnabApi
422
462
  # @return [Hash] Returns the value in the form of hash
423
463
  def _to_hash(value)
424
464
  if value.is_a?(Array)
425
- value.compact.map{ |v| _to_hash(v) }
465
+ value.compact.map { |v| _to_hash(v) }
426
466
  elsif value.is_a?(Hash)
427
467
  {}.tap do |hash|
428
468
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -433,7 +473,5 @@ module YnabApi
433
473
  value
434
474
  end
435
475
  end
436
-
437
476
  end
438
-
439
477
  end