ynab 1.27.0 → 1.28.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d79f634b95d7ce4dada9421d20f203a3fd77a8c111c1debf5f8bad1c09284bf
4
- data.tar.gz: fd9500c732cebbeba2790fd58b9e0fcbf1b7228bdf4bbc6a9233aebf028281db
3
+ metadata.gz: b3a257b9c73bad83d7d3e5f80f77b66006a4737a40470f7faf90615afd0ee066
4
+ data.tar.gz: 8dcd9c4112ad2f92b52e73c68438b59cd506061ea9cd32cac6c0914f13dbef47
5
5
  SHA512:
6
- metadata.gz: 47168c88d3b5b35255ccf998ed1102f88a9c8e709e44db698b9f6b4d799543a5d237345c15487966fe0c6b13457abe37cb9c3d43c3b9000ee5662c431902928f
7
- data.tar.gz: 9ae3fd198d06147c5d48df99c48ffe8b3701f76fff38abf7bad23d10e5e7872d55af11d4f73444d3a0e68819d332c7c50596521a92ed8a307d2ce92016d3adcc
6
+ metadata.gz: 15698c59209d472fc7ee645e224b9e4cdba396a248829c42a9696adee131b4eac503e1cd4c21afb26ea598667fba0f5bacaa51cd74c597ec71fe31f4e613dfde
7
+ data.tar.gz: c02b016bb5c5aa08b63ede9af444c93e89e8230c63e4b7aaa51e22db6c64ef055cf0fc3fe3b554d0e9851a20fdaaed4502095c22769f5b6f889a7c6cb4b94d18
@@ -46,6 +46,21 @@ module YNAB
46
46
  # If an account linked to a financial institution (direct_import_linked=true) and the linked connection is not in a healthy state, this will be true.
47
47
  attr_accessor :direct_import_in_error
48
48
 
49
+ # A date/time specifying when the account was last reconciled.
50
+ attr_accessor :last_reconciled_at
51
+
52
+ # The original debt/loan account balance, specified in milliunits format.
53
+ attr_accessor :debt_original_balance
54
+
55
+ # The debt/loan account interest rate(s), by effective date.
56
+ attr_accessor :debt_interest_rates
57
+
58
+ # The minimum payment amount(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
59
+ attr_accessor :debt_minimum_payments
60
+
61
+ # The escrow value(s) for the debt/loan account, by effective date. The amounts are specified in milliunits format.
62
+ attr_accessor :debt_escrow_amounts
63
+
49
64
  # Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
50
65
  attr_accessor :deleted
51
66
 
@@ -64,6 +79,11 @@ module YNAB
64
79
  :'transfer_payee_id' => :'transfer_payee_id',
65
80
  :'direct_import_linked' => :'direct_import_linked',
66
81
  :'direct_import_in_error' => :'direct_import_in_error',
82
+ :'last_reconciled_at' => :'last_reconciled_at',
83
+ :'debt_original_balance' => :'debt_original_balance',
84
+ :'debt_interest_rates' => :'debt_interest_rates',
85
+ :'debt_minimum_payments' => :'debt_minimum_payments',
86
+ :'debt_escrow_amounts' => :'debt_escrow_amounts',
67
87
  :'deleted' => :'deleted'
68
88
  }
69
89
  end
@@ -83,6 +103,11 @@ module YNAB
83
103
  :'transfer_payee_id' => :'String',
84
104
  :'direct_import_linked' => :'BOOLEAN',
85
105
  :'direct_import_in_error' => :'BOOLEAN',
106
+ :'last_reconciled_at' => :'DateTime',
107
+ :'debt_original_balance' => :'Integer',
108
+ :'debt_interest_rates' => :'LoanAccountPeriodicValue',
109
+ :'debt_minimum_payments' => :'LoanAccountPeriodicValue',
110
+ :'debt_escrow_amounts' => :'LoanAccountPeriodicValue',
86
111
  :'deleted' => :'BOOLEAN'
87
112
  }
88
113
  end
@@ -143,6 +168,26 @@ module YNAB
143
168
  self.direct_import_in_error = attributes[:'direct_import_in_error']
144
169
  end
145
170
 
171
+ if attributes.has_key?(:'last_reconciled_at')
172
+ self.last_reconciled_at = attributes[:'last_reconciled_at']
173
+ end
174
+
175
+ if attributes.has_key?(:'debt_original_balance')
176
+ self.debt_original_balance = attributes[:'debt_original_balance']
177
+ end
178
+
179
+ if attributes.has_key?(:'debt_interest_rates')
180
+ self.debt_interest_rates = attributes[:'debt_interest_rates']
181
+ end
182
+
183
+ if attributes.has_key?(:'debt_minimum_payments')
184
+ self.debt_minimum_payments = attributes[:'debt_minimum_payments']
185
+ end
186
+
187
+ if attributes.has_key?(:'debt_escrow_amounts')
188
+ self.debt_escrow_amounts = attributes[:'debt_escrow_amounts']
189
+ end
190
+
146
191
  if attributes.has_key?(:'deleted')
147
192
  self.deleted = attributes[:'deleted']
148
193
  end
@@ -228,6 +273,11 @@ module YNAB
228
273
  transfer_payee_id == o.transfer_payee_id &&
229
274
  direct_import_linked == o.direct_import_linked &&
230
275
  direct_import_in_error == o.direct_import_in_error &&
276
+ last_reconciled_at == o.last_reconciled_at &&
277
+ debt_original_balance == o.debt_original_balance &&
278
+ debt_interest_rates == o.debt_interest_rates &&
279
+ debt_minimum_payments == o.debt_minimum_payments &&
280
+ debt_escrow_amounts == o.debt_escrow_amounts &&
231
281
  deleted == o.deleted
232
282
  end
233
283
 
@@ -240,7 +290,7 @@ module YNAB
240
290
  # Calculates hash code according to all attributes.
241
291
  # @return [Fixnum] Hash code
242
292
  def hash
243
- [id, name, type, on_budget, closed, note, balance, cleared_balance, uncleared_balance, transfer_payee_id, direct_import_linked, direct_import_in_error, deleted].hash
293
+ [id, name, type, on_budget, closed, note, balance, cleared_balance, uncleared_balance, transfer_payee_id, direct_import_linked, direct_import_in_error, last_reconciled_at, debt_original_balance, debt_interest_rates, debt_minimum_payments, debt_escrow_amounts, deleted].hash
244
294
  end
245
295
  # Builds the object from hash
246
296
  # @param [Hash] attributes Model attributes in the form of hash
@@ -40,6 +40,15 @@ module YNAB
40
40
  # The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
41
41
  attr_accessor :goal_type
42
42
 
43
+ # The day of the goal
44
+ attr_accessor :goal_day
45
+
46
+ # The goal cadence
47
+ attr_accessor :goal_cadence
48
+
49
+ # The goal cadence frequency
50
+ attr_accessor :goal_cadence_frequency
51
+
43
52
  # The month a goal was created
44
53
  attr_accessor :goal_creation_month
45
54
 
@@ -102,6 +111,9 @@ module YNAB
102
111
  :'activity' => :'activity',
103
112
  :'balance' => :'balance',
104
113
  :'goal_type' => :'goal_type',
114
+ :'goal_day' => :'goal_day',
115
+ :'goal_cadence' => :'goal_cadence',
116
+ :'goal_cadence_frequency' => :'goal_cadence_frequency',
105
117
  :'goal_creation_month' => :'goal_creation_month',
106
118
  :'goal_target' => :'goal_target',
107
119
  :'goal_target_month' => :'goal_target_month',
@@ -127,6 +139,9 @@ module YNAB
127
139
  :'activity' => :'Integer',
128
140
  :'balance' => :'Integer',
129
141
  :'goal_type' => :'String',
142
+ :'goal_day' => :'Integer',
143
+ :'goal_cadence' => :'Integer',
144
+ :'goal_cadence_frequency' => :'Integer',
130
145
  :'goal_creation_month' => :'Date',
131
146
  :'goal_target' => :'Integer',
132
147
  :'goal_target_month' => :'Date',
@@ -187,6 +202,18 @@ module YNAB
187
202
  self.goal_type = attributes[:'goal_type']
188
203
  end
189
204
 
205
+ if attributes.has_key?(:'goal_day')
206
+ self.goal_day = attributes[:'goal_day']
207
+ end
208
+
209
+ if attributes.has_key?(:'goal_cadence')
210
+ self.goal_cadence = attributes[:'goal_cadence']
211
+ end
212
+
213
+ if attributes.has_key?(:'goal_cadence_frequency')
214
+ self.goal_cadence_frequency = attributes[:'goal_cadence_frequency']
215
+ end
216
+
190
217
  if attributes.has_key?(:'goal_creation_month')
191
218
  self.goal_creation_month = attributes[:'goal_creation_month']
192
219
  end
@@ -300,6 +327,9 @@ module YNAB
300
327
  activity == o.activity &&
301
328
  balance == o.balance &&
302
329
  goal_type == o.goal_type &&
330
+ goal_day == o.goal_day &&
331
+ goal_cadence == o.goal_cadence &&
332
+ goal_cadence_frequency == o.goal_cadence_frequency &&
303
333
  goal_creation_month == o.goal_creation_month &&
304
334
  goal_target == o.goal_target &&
305
335
  goal_target_month == o.goal_target_month &&
@@ -320,7 +350,7 @@ module YNAB
320
350
  # Calculates hash code according to all attributes.
321
351
  # @return [Fixnum] Hash code
322
352
  def hash
323
- [id, category_group_id, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_creation_month, goal_target, goal_target_month, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, deleted].hash
353
+ [id, category_group_id, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_day, goal_cadence, goal_cadence_frequency, goal_creation_month, goal_target, goal_target_month, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, deleted].hash
324
354
  end
325
355
  # Builds the object from hash
326
356
  # @param [Hash] attributes Model attributes in the form of hash
@@ -57,6 +57,9 @@ module YNAB
57
57
  # If the transaction was imported, the original payee name as it appeared on the statement
58
58
  attr_accessor :import_payee_name_original
59
59
 
60
+ # If the transaction is a debt/loan account transaction, the type of transaction
61
+ attr_accessor :debt_transaction_type
62
+
60
63
  # Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
61
64
  attr_accessor :deleted
62
65
 
@@ -113,6 +116,7 @@ module YNAB
113
116
  :'import_id' => :'import_id',
114
117
  :'import_payee_name' => :'import_payee_name',
115
118
  :'import_payee_name_original' => :'import_payee_name_original',
119
+ :'debt_transaction_type' => :'debt_transaction_type',
116
120
  :'deleted' => :'deleted',
117
121
  :'type' => :'type',
118
122
  :'parent_transaction_id' => :'parent_transaction_id',
@@ -141,6 +145,7 @@ module YNAB
141
145
  :'import_id' => :'String',
142
146
  :'import_payee_name' => :'String',
143
147
  :'import_payee_name_original' => :'String',
148
+ :'debt_transaction_type' => :'String',
144
149
  :'deleted' => :'BOOLEAN',
145
150
  :'type' => :'String',
146
151
  :'parent_transaction_id' => :'String',
@@ -222,6 +227,10 @@ module YNAB
222
227
  self.import_payee_name_original = attributes[:'import_payee_name_original']
223
228
  end
224
229
 
230
+ if attributes.has_key?(:'debt_transaction_type')
231
+ self.debt_transaction_type = attributes[:'debt_transaction_type']
232
+ end
233
+
225
234
  if attributes.has_key?(:'deleted')
226
235
  self.deleted = attributes[:'deleted']
227
236
  end
@@ -313,6 +322,8 @@ module YNAB
313
322
  return false if @account_id.nil?
314
323
  return false if !@import_payee_name.nil? && @import_payee_name.to_s.length > 200
315
324
  return false if !@import_payee_name_original.nil? && @import_payee_name_original.to_s.length > 200
325
+ debt_transaction_type_validator = EnumAttributeValidator.new('String', ['payment', 'refund', 'fee', 'interest', 'escrow', 'balancedAdjustment', 'credit', 'charge'])
326
+ return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
316
327
  return false if @deleted.nil?
317
328
  return false if @type.nil?
318
329
  type_validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
@@ -353,6 +364,12 @@ module YNAB
353
364
  @import_payee_name_original = import_payee_name_original
354
365
  end
355
366
 
367
+ # Custom attribute writer method checking allowed values (enum).
368
+ # @param [Object] debt_transaction_type Object to be assigned
369
+ def debt_transaction_type=(debt_transaction_type)
370
+ @debt_transaction_type = debt_transaction_type
371
+ end
372
+
356
373
  # Custom attribute writer method checking allowed values (enum).
357
374
  # @param [Object] type Object to be assigned
358
375
  def type=(type)
@@ -380,6 +397,7 @@ module YNAB
380
397
  import_id == o.import_id &&
381
398
  import_payee_name == o.import_payee_name &&
382
399
  import_payee_name_original == o.import_payee_name_original &&
400
+ debt_transaction_type == o.debt_transaction_type &&
383
401
  deleted == o.deleted &&
384
402
  type == o.type &&
385
403
  parent_transaction_id == o.parent_transaction_id &&
@@ -397,7 +415,7 @@ module YNAB
397
415
  # Calculates hash code according to all attributes.
398
416
  # @return [Fixnum] Hash code
399
417
  def hash
400
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, deleted, type, parent_transaction_id, account_name, payee_name, category_name].hash
418
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, debt_transaction_type, deleted, type, parent_transaction_id, account_name, payee_name, category_name].hash
401
419
  end
402
420
  # Builds the object from hash
403
421
  # @param [Hash] attributes Model attributes in the form of hash
@@ -0,0 +1,175 @@
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.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module YNAB
16
+ class LoanAccountPeriodicValue
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.swagger_types
25
+ {
26
+ }
27
+ end
28
+
29
+ # Initializes the object
30
+ # @param [Hash] attributes Model attributes in the form of hash
31
+ def initialize(attributes = {})
32
+ return unless attributes.is_a?(Hash)
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
36
+ end
37
+
38
+ # Show invalid properties with the reasons. Usually used together with valid?
39
+ # @return Array for valid properties with the reasons
40
+ def list_invalid_properties
41
+ invalid_properties = Array.new
42
+ invalid_properties
43
+ end
44
+
45
+ # Check to see if the all the properties in the model are valid
46
+ # @return true if the model is valid
47
+ def valid?
48
+ true
49
+ end
50
+
51
+ # Checks equality by comparing each attribute.
52
+ # @param [Object] Object to be compared
53
+ def ==(o)
54
+ return true if self.equal?(o)
55
+ self.class == o.class
56
+ end
57
+
58
+ # @see the `==` method
59
+ # @param [Object] Object to be compared
60
+ def eql?(o)
61
+ self == o
62
+ end
63
+
64
+ # Calculates hash code according to all attributes.
65
+ # @return [Fixnum] Hash code
66
+ def hash
67
+ [].hash
68
+ end
69
+ # Builds the object from hash
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ # @return [Object] Returns the model itself
72
+ def build_from_hash(attributes)
73
+ return nil unless attributes.is_a?(Hash)
74
+ self.class.swagger_types.each_pair do |key, type|
75
+ if type =~ /\AArray<(.*)>/i
76
+ # check to ensure the input is an array given that the attribute
77
+ # is documented as an array but the input is not
78
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
79
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
80
+ end
81
+ elsif !attributes[self.class.attribute_map[key]].nil?
82
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
83
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
84
+ end
85
+
86
+ self
87
+ end
88
+
89
+ # Deserializes the data based on type
90
+ # @param string type Data type
91
+ # @param string value Value to be deserialized
92
+ # @return [Object] Deserialized data
93
+ def _deserialize(type, value)
94
+ case type.to_sym
95
+ when :DateTime
96
+ DateTime.parse(value)
97
+ when :Date
98
+ Date.parse(value)
99
+ when :String
100
+ value.to_s
101
+ when :Integer
102
+ value.to_i
103
+ when :Float
104
+ value.to_f
105
+ when :BOOLEAN
106
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
107
+ true
108
+ else
109
+ false
110
+ end
111
+ when :Object
112
+ # generic object (usually a Hash), return directly
113
+ value
114
+ when /\AArray<(?<inner_type>.+)>\z/
115
+ inner_type = Regexp.last_match[:inner_type]
116
+ value.map { |v| _deserialize(inner_type, v) }
117
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
118
+ k_type = Regexp.last_match[:k_type]
119
+ v_type = Regexp.last_match[:v_type]
120
+ {}.tap do |hash|
121
+ value.each do |k, v|
122
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
123
+ end
124
+ end
125
+ else # model
126
+ temp_model = YNAB.const_get(type).new
127
+ temp_model.build_from_hash(value)
128
+ end
129
+ end
130
+
131
+ # Returns the string representation of the object
132
+ # @return [String] String presentation of the object
133
+ def to_s
134
+ to_hash.to_s
135
+ end
136
+
137
+ # to_body is an alias to to_hash (backward compatibility)
138
+ # @return [Hash] Returns the object in the form of hash
139
+ def to_body
140
+ to_hash
141
+ end
142
+
143
+ # Returns the object in the form of hash
144
+ # @return [Hash] Returns the object in the form of hash
145
+ def to_hash
146
+ hash = {}
147
+ self.class.attribute_map.each_pair do |attr, param|
148
+ value = self.send(attr)
149
+ next if value.nil?
150
+ hash[param] = _to_hash(value)
151
+ end
152
+ hash
153
+ end
154
+
155
+ # Outputs non-array value in the form of hash
156
+ # For object, use to_hash. Otherwise, just return the value
157
+ # @param [Object] value Any valid value
158
+ # @return [Hash] Returns the value in the form of hash
159
+ def _to_hash(value)
160
+ if value.is_a?(Array)
161
+ value.compact.map { |v| _to_hash(v) }
162
+ elsif value.is_a?(Hash)
163
+ {}.tap do |hash|
164
+ value.each { |k, v| hash[k] = _to_hash(v) }
165
+ end
166
+ elsif value.respond_to? :to_hash
167
+ value.to_hash
168
+ else
169
+ value
170
+ end
171
+ end
172
+
173
+ end
174
+
175
+ end
@@ -57,6 +57,9 @@ module YNAB
57
57
  # If the transaction was imported, the original payee name as it appeared on the statement
58
58
  attr_accessor :import_payee_name_original
59
59
 
60
+ # If the transaction is a debt/loan account transaction, the type of transaction
61
+ attr_accessor :debt_transaction_type
62
+
60
63
  # Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
61
64
  attr_accessor :deleted
62
65
 
@@ -110,6 +113,7 @@ module YNAB
110
113
  :'import_id' => :'import_id',
111
114
  :'import_payee_name' => :'import_payee_name',
112
115
  :'import_payee_name_original' => :'import_payee_name_original',
116
+ :'debt_transaction_type' => :'debt_transaction_type',
113
117
  :'deleted' => :'deleted',
114
118
  :'account_name' => :'account_name',
115
119
  :'payee_name' => :'payee_name',
@@ -137,6 +141,7 @@ module YNAB
137
141
  :'import_id' => :'String',
138
142
  :'import_payee_name' => :'String',
139
143
  :'import_payee_name_original' => :'String',
144
+ :'debt_transaction_type' => :'String',
140
145
  :'deleted' => :'BOOLEAN',
141
146
  :'account_name' => :'String',
142
147
  :'payee_name' => :'String',
@@ -217,6 +222,10 @@ module YNAB
217
222
  self.import_payee_name_original = attributes[:'import_payee_name_original']
218
223
  end
219
224
 
225
+ if attributes.has_key?(:'debt_transaction_type')
226
+ self.debt_transaction_type = attributes[:'debt_transaction_type']
227
+ end
228
+
220
229
  if attributes.has_key?(:'deleted')
221
230
  self.deleted = attributes[:'deleted']
222
231
  end
@@ -306,6 +315,8 @@ module YNAB
306
315
  return false if @account_id.nil?
307
316
  return false if !@import_payee_name.nil? && @import_payee_name.to_s.length > 200
308
317
  return false if !@import_payee_name_original.nil? && @import_payee_name_original.to_s.length > 200
318
+ debt_transaction_type_validator = EnumAttributeValidator.new('String', ['payment', 'refund', 'fee', 'interest', 'escrow', 'balancedAdjustment', 'credit', 'charge'])
319
+ return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
309
320
  return false if @deleted.nil?
310
321
  return false if @account_name.nil?
311
322
  return false if @subtransactions.nil?
@@ -344,6 +355,12 @@ module YNAB
344
355
  @import_payee_name_original = import_payee_name_original
345
356
  end
346
357
 
358
+ # Custom attribute writer method checking allowed values (enum).
359
+ # @param [Object] debt_transaction_type Object to be assigned
360
+ def debt_transaction_type=(debt_transaction_type)
361
+ @debt_transaction_type = debt_transaction_type
362
+ end
363
+
347
364
  # Checks equality by comparing each attribute.
348
365
  # @param [Object] Object to be compared
349
366
  def ==(o)
@@ -365,6 +382,7 @@ module YNAB
365
382
  import_id == o.import_id &&
366
383
  import_payee_name == o.import_payee_name &&
367
384
  import_payee_name_original == o.import_payee_name_original &&
385
+ debt_transaction_type == o.debt_transaction_type &&
368
386
  deleted == o.deleted &&
369
387
  account_name == o.account_name &&
370
388
  payee_name == o.payee_name &&
@@ -381,7 +399,7 @@ module YNAB
381
399
  # Calculates hash code according to all attributes.
382
400
  # @return [Fixnum] Hash code
383
401
  def hash
384
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, deleted, account_name, payee_name, category_name, subtransactions].hash
402
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, debt_transaction_type, deleted, account_name, payee_name, category_name, subtransactions].hash
385
403
  end
386
404
  # Builds the object from hash
387
405
  # @param [Hash] attributes Model attributes in the form of hash
@@ -57,6 +57,9 @@ module YNAB
57
57
  # If the transaction was imported, the original payee name as it appeared on the statement
58
58
  attr_accessor :import_payee_name_original
59
59
 
60
+ # If the transaction is a debt/loan account transaction, the type of transaction
61
+ attr_accessor :debt_transaction_type
62
+
60
63
  # Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
61
64
  attr_accessor :deleted
62
65
 
@@ -101,6 +104,7 @@ module YNAB
101
104
  :'import_id' => :'import_id',
102
105
  :'import_payee_name' => :'import_payee_name',
103
106
  :'import_payee_name_original' => :'import_payee_name_original',
107
+ :'debt_transaction_type' => :'debt_transaction_type',
104
108
  :'deleted' => :'deleted'
105
109
  }
106
110
  end
@@ -124,6 +128,7 @@ module YNAB
124
128
  :'import_id' => :'String',
125
129
  :'import_payee_name' => :'String',
126
130
  :'import_payee_name_original' => :'String',
131
+ :'debt_transaction_type' => :'String',
127
132
  :'deleted' => :'BOOLEAN'
128
133
  }
129
134
  end
@@ -200,6 +205,10 @@ module YNAB
200
205
  self.import_payee_name_original = attributes[:'import_payee_name_original']
201
206
  end
202
207
 
208
+ if attributes.has_key?(:'debt_transaction_type')
209
+ self.debt_transaction_type = attributes[:'debt_transaction_type']
210
+ end
211
+
203
212
  if attributes.has_key?(:'deleted')
204
213
  self.deleted = attributes[:'deleted']
205
214
  end
@@ -263,6 +272,8 @@ module YNAB
263
272
  return false if @account_id.nil?
264
273
  return false if !@import_payee_name.nil? && @import_payee_name.to_s.length > 200
265
274
  return false if !@import_payee_name_original.nil? && @import_payee_name_original.to_s.length > 200
275
+ debt_transaction_type_validator = EnumAttributeValidator.new('String', ['payment', 'refund', 'fee', 'interest', 'escrow', 'balancedAdjustment', 'credit', 'charge'])
276
+ return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
266
277
  return false if @deleted.nil?
267
278
  true
268
279
  end
@@ -299,6 +310,12 @@ module YNAB
299
310
  @import_payee_name_original = import_payee_name_original
300
311
  end
301
312
 
313
+ # Custom attribute writer method checking allowed values (enum).
314
+ # @param [Object] debt_transaction_type Object to be assigned
315
+ def debt_transaction_type=(debt_transaction_type)
316
+ @debt_transaction_type = debt_transaction_type
317
+ end
318
+
302
319
  # Checks equality by comparing each attribute.
303
320
  # @param [Object] Object to be compared
304
321
  def ==(o)
@@ -320,6 +337,7 @@ module YNAB
320
337
  import_id == o.import_id &&
321
338
  import_payee_name == o.import_payee_name &&
322
339
  import_payee_name_original == o.import_payee_name_original &&
340
+ debt_transaction_type == o.debt_transaction_type &&
323
341
  deleted == o.deleted
324
342
  end
325
343
 
@@ -332,7 +350,7 @@ module YNAB
332
350
  # Calculates hash code according to all attributes.
333
351
  # @return [Fixnum] Hash code
334
352
  def hash
335
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, deleted].hash
353
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, transfer_transaction_id, matched_transaction_id, import_id, import_payee_name, import_payee_name_original, debt_transaction_type, deleted].hash
336
354
  end
337
355
  # Builds the object from hash
338
356
  # @param [Hash] attributes Model attributes in the form of hash
data/lib/ynab/version.rb CHANGED
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module YNAB
14
- VERSION = '1.27.0'
14
+ VERSION = '1.28.0'
15
15
  end
data/lib/ynab.rb CHANGED
@@ -47,6 +47,7 @@ require 'ynab/models/error_detail'
47
47
  require 'ynab/models/error_response'
48
48
  require 'ynab/models/hybrid_transactions_response'
49
49
  require 'ynab/models/hybrid_transactions_response_data'
50
+ require 'ynab/models/loan_account_periodic_value'
50
51
  require 'ynab/models/month_detail_response'
51
52
  require 'ynab/models/month_detail_response_data'
52
53
  require 'ynab/models/month_summaries_response'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ynab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.0
4
+ version: 1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - You Need A Budget, LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-20 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -146,6 +146,7 @@ files:
146
146
  - lib/ynab/models/hybrid_transaction.rb
147
147
  - lib/ynab/models/hybrid_transactions_response.rb
148
148
  - lib/ynab/models/hybrid_transactions_response_data.rb
149
+ - lib/ynab/models/loan_account_periodic_value.rb
149
150
  - lib/ynab/models/month_detail.rb
150
151
  - lib/ynab/models/month_detail_response.rb
151
152
  - lib/ynab/models/month_detail_response_data.rb
@@ -269,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
270
  - !ruby/object:Gem::Version
270
271
  version: '0'
271
272
  requirements: []
272
- rubygems_version: 3.4.4
273
+ rubygems_version: 3.4.7
273
274
  signing_key:
274
275
  specification_version: 4
275
276
  summary: YNAB API Endpoints Ruby Gem