ynab 1.15.0 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/lib/ynab.rb +13 -8
  4. data/lib/ynab/api/accounts_api.rb +65 -7
  5. data/lib/ynab/api/budgets_api.rb +10 -7
  6. data/lib/ynab/api/categories_api.rb +15 -15
  7. data/lib/ynab/api/deprecated_api.rb +3 -3
  8. data/lib/ynab/api/months_api.rb +7 -7
  9. data/lib/ynab/api/payee_locations_api.rb +7 -7
  10. data/lib/ynab/api/payees_api.rb +7 -7
  11. data/lib/ynab/api/scheduled_transactions_api.rb +7 -7
  12. data/lib/ynab/api/transactions_api.rb +93 -41
  13. data/lib/ynab/api/user_api.rb +1 -1
  14. data/lib/ynab/api_client.rb +3 -2
  15. data/lib/ynab/configuration.rb +2 -3
  16. data/lib/ynab/models/account.rb +4 -7
  17. data/lib/ynab/models/account_response.rb +4 -3
  18. data/lib/ynab/models/account_response_data.rb +4 -3
  19. data/lib/ynab/models/accounts_response.rb +4 -3
  20. data/lib/ynab/models/accounts_response_data.rb +4 -3
  21. data/lib/ynab/models/budget_detail.rb +4 -3
  22. data/lib/ynab/models/budget_detail_response.rb +4 -3
  23. data/lib/ynab/models/budget_detail_response_data.rb +4 -3
  24. data/lib/ynab/models/budget_settings.rb +4 -3
  25. data/lib/ynab/models/budget_settings_response.rb +4 -3
  26. data/lib/ynab/models/budget_settings_response_data.rb +4 -3
  27. data/lib/ynab/models/budget_summary.rb +20 -7
  28. data/lib/ynab/models/budget_summary_response.rb +4 -3
  29. data/lib/ynab/models/budget_summary_response_data.rb +4 -3
  30. data/lib/ynab/models/bulk_response.rb +4 -3
  31. data/lib/ynab/models/bulk_response_data.rb +4 -3
  32. data/lib/ynab/models/bulk_response_data_bulk.rb +5 -4
  33. data/lib/ynab/models/bulk_transactions.rb +4 -3
  34. data/lib/ynab/models/categories_response.rb +4 -3
  35. data/lib/ynab/models/categories_response_data.rb +4 -3
  36. data/lib/ynab/models/category.rb +6 -9
  37. data/lib/ynab/models/category_group.rb +4 -3
  38. data/lib/ynab/models/category_group_with_categories.rb +4 -3
  39. data/lib/ynab/models/category_response.rb +4 -3
  40. data/lib/ynab/models/category_response_data.rb +4 -3
  41. data/lib/ynab/models/currency_format.rb +4 -3
  42. data/lib/ynab/models/date_format.rb +4 -3
  43. data/lib/ynab/models/error_detail.rb +4 -3
  44. data/lib/ynab/models/error_response.rb +4 -3
  45. data/lib/ynab/models/hybrid_transaction.rb +4 -15
  46. data/lib/ynab/models/hybrid_transactions_response.rb +4 -3
  47. data/lib/ynab/models/hybrid_transactions_response_data.rb +4 -3
  48. data/lib/ynab/models/month_detail.rb +6 -5
  49. data/lib/ynab/models/month_detail_response.rb +4 -3
  50. data/lib/ynab/models/month_detail_response_data.rb +4 -3
  51. data/lib/ynab/models/month_summaries_response.rb +4 -3
  52. data/lib/ynab/models/month_summaries_response_data.rb +4 -3
  53. data/lib/ynab/models/month_summary.rb +6 -5
  54. data/lib/ynab/models/payee.rb +5 -4
  55. data/lib/ynab/models/payee_location.rb +4 -3
  56. data/lib/ynab/models/payee_location_response.rb +4 -3
  57. data/lib/ynab/models/payee_location_response_data.rb +4 -3
  58. data/lib/ynab/models/payee_locations_response.rb +4 -3
  59. data/lib/ynab/models/payee_locations_response_data.rb +4 -3
  60. data/lib/ynab/models/payee_response.rb +4 -3
  61. data/lib/ynab/models/payee_response_data.rb +4 -3
  62. data/lib/ynab/models/payees_response.rb +4 -3
  63. data/lib/ynab/models/payees_response_data.rb +4 -3
  64. data/lib/ynab/models/save_account.rb +250 -0
  65. data/lib/ynab/models/save_account_wrapper.rb +189 -0
  66. data/lib/ynab/models/save_category_response.rb +4 -3
  67. data/lib/ynab/models/save_category_response_data.rb +4 -3
  68. data/lib/ynab/models/save_month_category.rb +4 -3
  69. data/lib/ynab/models/save_month_category_wrapper.rb +4 -3
  70. data/lib/ynab/models/save_sub_transaction.rb +259 -0
  71. data/lib/ynab/models/save_transaction.rb +24 -19
  72. data/lib/ynab/models/save_transaction_wrapper.rb +4 -3
  73. data/lib/ynab/models/save_transactions_response.rb +4 -3
  74. data/lib/ynab/models/save_transactions_response_data.rb +5 -4
  75. data/lib/ynab/models/save_transactions_wrapper.rb +4 -3
  76. data/lib/ynab/models/scheduled_sub_transaction.rb +4 -3
  77. data/lib/ynab/models/scheduled_transaction_detail.rb +4 -11
  78. data/lib/ynab/models/scheduled_transaction_response.rb +4 -3
  79. data/lib/ynab/models/scheduled_transaction_response_data.rb +4 -3
  80. data/lib/ynab/models/scheduled_transaction_summary.rb +4 -11
  81. data/lib/ynab/models/scheduled_transactions_response.rb +4 -3
  82. data/lib/ynab/models/scheduled_transactions_response_data.rb +4 -3
  83. data/lib/ynab/models/sub_transaction.rb +33 -4
  84. data/lib/ynab/models/transaction_detail.rb +4 -11
  85. data/lib/ynab/models/transaction_response.rb +4 -3
  86. data/lib/ynab/models/transaction_response_data.rb +4 -3
  87. data/lib/ynab/models/transaction_summary.rb +4 -11
  88. data/lib/ynab/models/transactions_import_response.rb +189 -0
  89. data/lib/ynab/models/transactions_import_response_data.rb +192 -0
  90. data/lib/ynab/models/transactions_response.rb +4 -3
  91. data/lib/ynab/models/transactions_response_data.rb +4 -3
  92. data/lib/ynab/models/update_transaction.rb +18 -27
  93. data/lib/ynab/models/update_transactions_wrapper.rb +4 -3
  94. data/lib/ynab/models/user.rb +4 -3
  95. data/lib/ynab/models/user_response.rb +4 -3
  96. data/lib/ynab/models/user_response_data.rb +4 -3
  97. data/lib/ynab/version.rb +1 -1
  98. data/spec/api/accounts_spec.rb +19 -10
  99. data/spec/api/budgets_spec.rb +4 -4
  100. data/spec/api/categories_spec.rb +5 -5
  101. data/spec/api/months_spec.rb +4 -4
  102. data/spec/api/payee_locations_spec.rb +4 -4
  103. data/spec/api/payees_spec.rb +4 -4
  104. data/spec/api/scheduled_transactions_spec.rb +4 -4
  105. data/spec/api/transactions_spec.rb +23 -13
  106. data/spec/fixtures/vcr_cassettes/create_account.yml +51 -0
  107. data/spec/fixtures/vcr_cassettes/import_transactions.yml +50 -0
  108. data/spec/models/transaction_detail_spec.rb +11 -0
  109. metadata +26 -15
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #YNAB API Endpoints
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 is at https://api.youneedabudget.com
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module YNAB
16
+ class TransactionsImportResponseData
17
+ # The list of transaction ids that were imported.
18
+ attr_accessor :transaction_ids
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'transaction_ids' => :'transaction_ids'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'transaction_ids' => :'Array<String>'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'transaction_ids')
43
+ if (value = attributes[:'transaction_ids']).is_a?(Array)
44
+ self.transaction_ids = value
45
+ end
46
+ end
47
+ end
48
+
49
+ # Show invalid properties with the reasons. Usually used together with valid?
50
+ # @return Array for valid properties with the reasons
51
+ def list_invalid_properties
52
+ invalid_properties = Array.new
53
+ if @transaction_ids.nil?
54
+ invalid_properties.push('invalid value for "transaction_ids", transaction_ids cannot be nil.')
55
+ end
56
+
57
+ invalid_properties
58
+ end
59
+
60
+ # Check to see if the all the properties in the model are valid
61
+ # @return true if the model is valid
62
+ def valid?
63
+ return false if @transaction_ids.nil?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ transaction_ids == o.transaction_ids
73
+ end
74
+
75
+ # @see the `==` method
76
+ # @param [Object] Object to be compared
77
+ def eql?(o)
78
+ self == o
79
+ end
80
+
81
+ # Calculates hash code according to all attributes.
82
+ # @return [Fixnum] Hash code
83
+ def hash
84
+ [transaction_ids].hash
85
+ end
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /\AArray<(.*)>/i
93
+ # check to ensure the input is an array given that the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
97
+ end
98
+ elsif !attributes[self.class.attribute_map[key]].nil?
99
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
100
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
101
+ end
102
+
103
+ self
104
+ end
105
+
106
+ # Deserializes the data based on type
107
+ # @param string type Data type
108
+ # @param string value Value to be deserialized
109
+ # @return [Object] Deserialized data
110
+ def _deserialize(type, value)
111
+ case type.to_sym
112
+ when :DateTime
113
+ DateTime.parse(value)
114
+ when :Date
115
+ Date.parse(value)
116
+ when :String
117
+ value.to_s
118
+ when :Integer
119
+ value.to_i
120
+ when :Float
121
+ value.to_f
122
+ when :BOOLEAN
123
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
124
+ true
125
+ else
126
+ false
127
+ end
128
+ when :Object
129
+ # generic object (usually a Hash), return directly
130
+ value
131
+ when /\AArray<(?<inner_type>.+)>\z/
132
+ inner_type = Regexp.last_match[:inner_type]
133
+ value.map { |v| _deserialize(inner_type, v) }
134
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
135
+ k_type = Regexp.last_match[:k_type]
136
+ v_type = Regexp.last_match[:v_type]
137
+ {}.tap do |hash|
138
+ value.each do |k, v|
139
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
+ end
141
+ end
142
+ else # model
143
+ temp_model = YNAB.const_get(type).new
144
+ temp_model.build_from_hash(value)
145
+ end
146
+ end
147
+
148
+ # Returns the string representation of the object
149
+ # @return [String] String presentation of the object
150
+ def to_s
151
+ to_hash.to_s
152
+ end
153
+
154
+ # to_body is an alias to to_hash (backward compatibility)
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_body
157
+ to_hash
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ next if value.nil?
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map { |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -6,7 +6,7 @@
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.4.0-SNAPSHOT
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
 
@@ -80,7 +80,6 @@ module YNAB
80
80
  def hash
81
81
  [data].hash
82
82
  end
83
-
84
83
  # Builds the object from hash
85
84
  # @param [Hash] attributes Model attributes in the form of hash
86
85
  # @return [Object] Returns the model itself
@@ -88,7 +87,7 @@ module YNAB
88
87
  return nil unless attributes.is_a?(Hash)
89
88
  self.class.swagger_types.each_pair do |key, type|
90
89
  if type =~ /\AArray<(.*)>/i
91
- # check to ensure the input is an array given that the the attribute
90
+ # check to ensure the input is an array given that the attribute
92
91
  # is documented as an array but the input is not
93
92
  if attributes[self.class.attribute_map[key]].is_a?(Array)
94
93
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -184,5 +183,7 @@ module YNAB
184
183
  value
185
184
  end
186
185
  end
186
+
187
187
  end
188
+
188
189
  end
@@ -6,7 +6,7 @@
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.4.0-SNAPSHOT
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
 
@@ -97,7 +97,6 @@ module YNAB
97
97
  def hash
98
98
  [transactions, server_knowledge].hash
99
99
  end
100
-
101
100
  # Builds the object from hash
102
101
  # @param [Hash] attributes Model attributes in the form of hash
103
102
  # @return [Object] Returns the model itself
@@ -105,7 +104,7 @@ module YNAB
105
104
  return nil unless attributes.is_a?(Hash)
106
105
  self.class.swagger_types.each_pair do |key, type|
107
106
  if type =~ /\AArray<(.*)>/i
108
- # check to ensure the input is an array given that the the attribute
107
+ # check to ensure the input is an array given that the attribute
109
108
  # is documented as an array but the input is not
110
109
  if attributes[self.class.attribute_map[key]].is_a?(Array)
111
110
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -201,5 +200,7 @@ module YNAB
201
200
  value
202
201
  end
203
202
  end
203
+
204
204
  end
205
+
205
206
  end
@@ -6,7 +6,7 @@
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.4.0-SNAPSHOT
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
 
@@ -22,13 +22,13 @@ module YNAB
22
22
  # The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
23
23
  attr_accessor :amount
24
24
 
25
- # The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource.
25
+ # The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource.
26
26
  attr_accessor :payee_id
27
27
 
28
- # The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee.
28
+ # The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
29
29
  attr_accessor :payee_name
30
30
 
31
- # The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed.
31
+ # The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied.
32
32
  attr_accessor :category_id
33
33
 
34
34
  attr_accessor :memo
@@ -42,10 +42,11 @@ module YNAB
42
42
  # The transaction flag
43
43
  attr_accessor :flag_color
44
44
 
45
- # If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
45
+ # If specified, the new transaction will be assigned this `import_id` and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
46
46
  attr_accessor :import_id
47
47
 
48
- attr_accessor :id
48
+ # An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
49
+ attr_accessor :subtransactions
49
50
 
50
51
  class EnumAttributeValidator
51
52
  attr_reader :datatype
@@ -83,7 +84,7 @@ module YNAB
83
84
  :'approved' => :'approved',
84
85
  :'flag_color' => :'flag_color',
85
86
  :'import_id' => :'import_id',
86
- :'id' => :'id'
87
+ :'subtransactions' => :'subtransactions'
87
88
  }
88
89
  end
89
90
 
@@ -101,7 +102,7 @@ module YNAB
101
102
  :'approved' => :'BOOLEAN',
102
103
  :'flag_color' => :'String',
103
104
  :'import_id' => :'String',
104
- :'id' => :'String'
105
+ :'subtransactions' => :'Array<SaveSubTransaction>'
105
106
  }
106
107
  end
107
108
 
@@ -157,8 +158,10 @@ module YNAB
157
158
  self.import_id = attributes[:'import_id']
158
159
  end
159
160
 
160
- if attributes.has_key?(:'id')
161
- self.id = attributes[:'id']
161
+ if attributes.has_key?(:'subtransactions')
162
+ if (value = attributes[:'subtransactions']).is_a?(Array)
163
+ self.subtransactions = value
164
+ end
162
165
  end
163
166
  end
164
167
 
@@ -190,10 +193,6 @@ module YNAB
190
193
  invalid_properties.push('invalid value for "import_id", the character length must be smaller than or equal to 36.')
191
194
  end
192
195
 
193
- if @id.nil?
194
- invalid_properties.push('invalid value for "id", id cannot be nil.')
195
- end
196
-
197
196
  invalid_properties
198
197
  end
199
198
 
@@ -210,7 +209,6 @@ module YNAB
210
209
  flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
211
210
  return false unless flag_color_validator.valid?(@flag_color)
212
211
  return false if !@import_id.nil? && @import_id.to_s.length > 36
213
- return false if @id.nil?
214
212
  true
215
213
  end
216
214
 
@@ -237,20 +235,12 @@ module YNAB
237
235
  # Custom attribute writer method checking allowed values (enum).
238
236
  # @param [Object] cleared Object to be assigned
239
237
  def cleared=(cleared)
240
- validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
241
- unless validator.valid?(cleared)
242
- fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
243
- end
244
238
  @cleared = cleared
245
239
  end
246
240
 
247
241
  # Custom attribute writer method checking allowed values (enum).
248
242
  # @param [Object] flag_color Object to be assigned
249
243
  def flag_color=(flag_color)
250
- validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
251
- unless validator.valid?(flag_color)
252
- fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
253
- end
254
244
  @flag_color = flag_color
255
245
  end
256
246
 
@@ -280,7 +270,7 @@ module YNAB
280
270
  approved == o.approved &&
281
271
  flag_color == o.flag_color &&
282
272
  import_id == o.import_id &&
283
- id == o.id
273
+ subtransactions == o.subtransactions
284
274
  end
285
275
 
286
276
  # @see the `==` method
@@ -292,9 +282,8 @@ module YNAB
292
282
  # Calculates hash code according to all attributes.
293
283
  # @return [Fixnum] Hash code
294
284
  def hash
295
- [account_id, date, amount, payee_id, payee_name, category_id, memo, cleared, approved, flag_color, import_id, id].hash
285
+ [account_id, date, amount, payee_id, payee_name, category_id, memo, cleared, approved, flag_color, import_id, subtransactions].hash
296
286
  end
297
-
298
287
  # Builds the object from hash
299
288
  # @param [Hash] attributes Model attributes in the form of hash
300
289
  # @return [Object] Returns the model itself
@@ -302,7 +291,7 @@ module YNAB
302
291
  return nil unless attributes.is_a?(Hash)
303
292
  self.class.swagger_types.each_pair do |key, type|
304
293
  if type =~ /\AArray<(.*)>/i
305
- # check to ensure the input is an array given that the the attribute
294
+ # check to ensure the input is an array given that the attribute
306
295
  # is documented as an array but the input is not
307
296
  if attributes[self.class.attribute_map[key]].is_a?(Array)
308
297
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -398,5 +387,7 @@ module YNAB
398
387
  value
399
388
  end
400
389
  end
390
+
401
391
  end
392
+
402
393
  end
@@ -6,7 +6,7 @@
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.4.0-SNAPSHOT
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
 
@@ -82,7 +82,6 @@ module YNAB
82
82
  def hash
83
83
  [transactions].hash
84
84
  end
85
-
86
85
  # Builds the object from hash
87
86
  # @param [Hash] attributes Model attributes in the form of hash
88
87
  # @return [Object] Returns the model itself
@@ -90,7 +89,7 @@ module YNAB
90
89
  return nil unless attributes.is_a?(Hash)
91
90
  self.class.swagger_types.each_pair do |key, type|
92
91
  if type =~ /\AArray<(.*)>/i
93
- # check to ensure the input is an array given that the the attribute
92
+ # check to ensure the input is an array given that the attribute
94
93
  # is documented as an array but the input is not
95
94
  if attributes[self.class.attribute_map[key]].is_a?(Array)
96
95
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -186,5 +185,7 @@ module YNAB
186
185
  value
187
186
  end
188
187
  end
188
+
189
189
  end
190
+
190
191
  end
@@ -6,7 +6,7 @@
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.4.0-SNAPSHOT
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
 
@@ -80,7 +80,6 @@ module YNAB
80
80
  def hash
81
81
  [id].hash
82
82
  end
83
-
84
83
  # Builds the object from hash
85
84
  # @param [Hash] attributes Model attributes in the form of hash
86
85
  # @return [Object] Returns the model itself
@@ -88,7 +87,7 @@ module YNAB
88
87
  return nil unless attributes.is_a?(Hash)
89
88
  self.class.swagger_types.each_pair do |key, type|
90
89
  if type =~ /\AArray<(.*)>/i
91
- # check to ensure the input is an array given that the the attribute
90
+ # check to ensure the input is an array given that the attribute
92
91
  # is documented as an array but the input is not
93
92
  if attributes[self.class.attribute_map[key]].is_a?(Array)
94
93
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -184,5 +183,7 @@ module YNAB
184
183
  value
185
184
  end
186
185
  end
186
+
187
187
  end
188
+
188
189
  end