ynab 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/docs/Account.md +6 -0
- data/docs/AccountBase.md +25 -0
- data/docs/Category.md +15 -0
- data/docs/CategoryBase.md +34 -0
- data/docs/CategoryGroup.md +1 -0
- data/docs/CategoryGroupWithCategories.md +1 -0
- data/docs/ExistingCategory.md +3 -2
- data/docs/HybridTransaction.md +2 -0
- data/docs/MoneyMovement.md +2 -0
- data/docs/MoneyMovementBase.md +16 -0
- data/docs/MonthDetail.md +8 -0
- data/docs/MonthDetailBase.md +16 -0
- data/docs/MonthSummary.md +8 -0
- data/docs/MonthSummaryBase.md +15 -0
- data/docs/NewCategory.md +3 -2
- data/docs/PayeesApi.md +21 -0
- data/docs/PlanDetail.md +7 -7
- data/docs/PostPayee.md +8 -0
- data/docs/PostPayeeWrapper.md +8 -0
- data/docs/SaveAccount.md +1 -1
- data/docs/SaveAccountType.md +7 -0
- data/docs/SaveCategory.md +3 -2
- data/docs/SavePayee.md +1 -1
- data/docs/ScheduledSubTransaction.md +2 -0
- data/docs/ScheduledSubTransactionBase.md +17 -0
- data/docs/ScheduledTransactionDetail.md +2 -0
- data/docs/ScheduledTransactionSummary.md +2 -0
- data/docs/ScheduledTransactionSummaryBase.md +20 -0
- data/docs/SubTransaction.md +2 -0
- data/docs/SubTransactionBase.md +18 -0
- data/docs/TransactionDetail.md +2 -0
- data/docs/TransactionSummary.md +2 -0
- data/docs/TransactionSummaryBase.md +26 -0
- data/docs/TransactionsApi.md +19 -14
- data/lib/ynab/api/payees_api.rb +74 -0
- data/lib/ynab/api/transactions_api.rb +33 -18
- data/lib/ynab/models/account.rb +72 -8
- data/lib/ynab/models/account_base.rb +340 -0
- data/lib/ynab/models/category.rb +170 -20
- data/lib/ynab/models/category_base.rb +447 -0
- data/lib/ynab/models/category_group.rb +12 -1
- data/lib/ynab/models/category_group_with_categories.rb +12 -1
- data/lib/ynab/models/existing_category.rb +16 -5
- data/lib/ynab/models/hybrid_transaction.rb +21 -1
- data/lib/ynab/models/money_movement.rb +31 -11
- data/lib/ynab/models/money_movement_base.rb +223 -0
- data/lib/ynab/models/month_detail.rb +81 -1
- data/lib/ynab/models/month_detail_base.rb +230 -0
- data/lib/ynab/models/month_summary.rb +91 -6
- data/lib/ynab/models/month_summary_base.rb +212 -0
- data/lib/ynab/models/new_category.rb +16 -5
- data/lib/ynab/models/plan_detail.rb +7 -7
- data/lib/ynab/models/post_payee.rb +148 -0
- data/lib/ynab/models/post_payee_wrapper.rb +136 -0
- data/lib/ynab/models/save_account.rb +1 -1
- data/lib/ynab/models/save_account_type.rb +45 -0
- data/lib/ynab/models/save_category.rb +18 -6
- data/lib/ynab/models/save_payee.rb +1 -1
- data/lib/ynab/models/scheduled_sub_transaction.rb +31 -10
- data/lib/ynab/models/scheduled_sub_transaction_base.rb +229 -0
- data/lib/ynab/models/scheduled_transaction_detail.rb +21 -1
- data/lib/ynab/models/scheduled_transaction_summary.rb +31 -9
- data/lib/ynab/models/scheduled_transaction_summary_base.rb +292 -0
- data/lib/ynab/models/sub_transaction.rb +31 -11
- data/lib/ynab/models/sub_transaction_base.rb +240 -0
- data/lib/ynab/models/transaction_detail.rb +21 -1
- data/lib/ynab/models/transaction_summary.rb +31 -14
- data/lib/ynab/models/transaction_summary_base.rb +358 -0
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +12 -0
- data/open_api_spec.yaml +348 -26
- data/ynab.gemspec +1 -1
- metadata +27 -3
|
@@ -0,0 +1,340 @@
|
|
|
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.ynab.com
|
|
5
|
+
|
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
|
+
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require 'date'
|
|
11
|
+
require 'time'
|
|
12
|
+
|
|
13
|
+
module YNAB
|
|
14
|
+
class AccountBase < ApiModelBase
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
attr_accessor :name
|
|
18
|
+
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
# Whether this account is \"on budget\" or not
|
|
22
|
+
attr_accessor :on_budget
|
|
23
|
+
|
|
24
|
+
# Whether this account is closed or not
|
|
25
|
+
attr_accessor :closed
|
|
26
|
+
|
|
27
|
+
attr_accessor :note
|
|
28
|
+
|
|
29
|
+
# The current available balance of the account in milliunits format
|
|
30
|
+
attr_accessor :balance
|
|
31
|
+
|
|
32
|
+
# The current cleared balance of the account in milliunits format
|
|
33
|
+
attr_accessor :cleared_balance
|
|
34
|
+
|
|
35
|
+
# The current uncleared balance of the account in milliunits format
|
|
36
|
+
attr_accessor :uncleared_balance
|
|
37
|
+
|
|
38
|
+
# The payee id which should be used when transferring to this account
|
|
39
|
+
attr_accessor :transfer_payee_id
|
|
40
|
+
|
|
41
|
+
# Whether or not the account is linked to a financial institution for automatic transaction import.
|
|
42
|
+
attr_accessor :direct_import_linked
|
|
43
|
+
|
|
44
|
+
# 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.
|
|
45
|
+
attr_accessor :direct_import_in_error
|
|
46
|
+
|
|
47
|
+
# A date/time specifying when the account was last reconciled.
|
|
48
|
+
attr_accessor :last_reconciled_at
|
|
49
|
+
|
|
50
|
+
# This field is deprecated and will always be null.
|
|
51
|
+
attr_accessor :debt_original_balance
|
|
52
|
+
|
|
53
|
+
attr_accessor :debt_interest_rates
|
|
54
|
+
|
|
55
|
+
attr_accessor :debt_minimum_payments
|
|
56
|
+
|
|
57
|
+
attr_accessor :debt_escrow_amounts
|
|
58
|
+
|
|
59
|
+
# Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
|
60
|
+
attr_accessor :deleted
|
|
61
|
+
|
|
62
|
+
class EnumAttributeValidator
|
|
63
|
+
attr_reader :datatype
|
|
64
|
+
attr_reader :allowable_values
|
|
65
|
+
|
|
66
|
+
def initialize(datatype, allowable_values)
|
|
67
|
+
@allowable_values = allowable_values.map do |value|
|
|
68
|
+
case datatype.to_s
|
|
69
|
+
when /Integer/i
|
|
70
|
+
value.to_i
|
|
71
|
+
when /Float/i
|
|
72
|
+
value.to_f
|
|
73
|
+
else
|
|
74
|
+
value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def valid?(value)
|
|
80
|
+
!value || allowable_values.include?(value)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
85
|
+
def self.attribute_map
|
|
86
|
+
{
|
|
87
|
+
:'id' => :'id',
|
|
88
|
+
:'name' => :'name',
|
|
89
|
+
:'type' => :'type',
|
|
90
|
+
:'on_budget' => :'on_budget',
|
|
91
|
+
:'closed' => :'closed',
|
|
92
|
+
:'note' => :'note',
|
|
93
|
+
:'balance' => :'balance',
|
|
94
|
+
:'cleared_balance' => :'cleared_balance',
|
|
95
|
+
:'uncleared_balance' => :'uncleared_balance',
|
|
96
|
+
:'transfer_payee_id' => :'transfer_payee_id',
|
|
97
|
+
:'direct_import_linked' => :'direct_import_linked',
|
|
98
|
+
:'direct_import_in_error' => :'direct_import_in_error',
|
|
99
|
+
:'last_reconciled_at' => :'last_reconciled_at',
|
|
100
|
+
:'debt_original_balance' => :'debt_original_balance',
|
|
101
|
+
:'debt_interest_rates' => :'debt_interest_rates',
|
|
102
|
+
:'debt_minimum_payments' => :'debt_minimum_payments',
|
|
103
|
+
:'debt_escrow_amounts' => :'debt_escrow_amounts',
|
|
104
|
+
:'deleted' => :'deleted'
|
|
105
|
+
}
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Returns all the JSON keys this model knows about
|
|
109
|
+
def self.acceptable_attributes
|
|
110
|
+
attribute_map.values
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Attribute type mapping.
|
|
114
|
+
def self.openapi_types
|
|
115
|
+
{
|
|
116
|
+
:'id' => :'String',
|
|
117
|
+
:'name' => :'String',
|
|
118
|
+
:'type' => :'AccountType',
|
|
119
|
+
:'on_budget' => :'Boolean',
|
|
120
|
+
:'closed' => :'Boolean',
|
|
121
|
+
:'note' => :'String',
|
|
122
|
+
:'balance' => :'Integer',
|
|
123
|
+
:'cleared_balance' => :'Integer',
|
|
124
|
+
:'uncleared_balance' => :'Integer',
|
|
125
|
+
:'transfer_payee_id' => :'String',
|
|
126
|
+
:'direct_import_linked' => :'Boolean',
|
|
127
|
+
:'direct_import_in_error' => :'Boolean',
|
|
128
|
+
:'last_reconciled_at' => :'Time',
|
|
129
|
+
:'debt_original_balance' => :'Integer',
|
|
130
|
+
:'debt_interest_rates' => :'Hash<String, Integer>',
|
|
131
|
+
:'debt_minimum_payments' => :'Hash<String, Integer>',
|
|
132
|
+
:'debt_escrow_amounts' => :'Hash<String, Integer>',
|
|
133
|
+
:'deleted' => :'Boolean'
|
|
134
|
+
}
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# List of attributes with nullable: true
|
|
138
|
+
def self.openapi_nullable
|
|
139
|
+
Set.new([
|
|
140
|
+
:'note',
|
|
141
|
+
:'transfer_payee_id',
|
|
142
|
+
:'last_reconciled_at',
|
|
143
|
+
:'debt_original_balance',
|
|
144
|
+
])
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Initializes the object
|
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
149
|
+
def initialize(attributes = {})
|
|
150
|
+
if (!attributes.is_a?(Hash))
|
|
151
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `YNAB::AccountBase` initialize method"
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
155
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
156
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
157
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::AccountBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
158
|
+
end
|
|
159
|
+
h[k.to_sym] = v
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'id')
|
|
163
|
+
self.id = attributes[:'id']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'name')
|
|
167
|
+
self.name = attributes[:'name']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'type')
|
|
171
|
+
self.type = attributes[:'type']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'on_budget')
|
|
175
|
+
self.on_budget = attributes[:'on_budget']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'closed')
|
|
179
|
+
self.closed = attributes[:'closed']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'note')
|
|
183
|
+
self.note = attributes[:'note']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'balance')
|
|
187
|
+
self.balance = attributes[:'balance']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'cleared_balance')
|
|
191
|
+
self.cleared_balance = attributes[:'cleared_balance']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'uncleared_balance')
|
|
195
|
+
self.uncleared_balance = attributes[:'uncleared_balance']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'transfer_payee_id')
|
|
199
|
+
self.transfer_payee_id = attributes[:'transfer_payee_id']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'direct_import_linked')
|
|
203
|
+
self.direct_import_linked = attributes[:'direct_import_linked']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'direct_import_in_error')
|
|
207
|
+
self.direct_import_in_error = attributes[:'direct_import_in_error']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'last_reconciled_at')
|
|
211
|
+
self.last_reconciled_at = attributes[:'last_reconciled_at']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'debt_original_balance')
|
|
215
|
+
self.debt_original_balance = attributes[:'debt_original_balance']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'debt_interest_rates')
|
|
219
|
+
if (value = attributes[:'debt_interest_rates']).is_a?(Hash)
|
|
220
|
+
self.debt_interest_rates = value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'debt_minimum_payments')
|
|
225
|
+
if (value = attributes[:'debt_minimum_payments']).is_a?(Hash)
|
|
226
|
+
self.debt_minimum_payments = value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'debt_escrow_amounts')
|
|
231
|
+
if (value = attributes[:'debt_escrow_amounts']).is_a?(Hash)
|
|
232
|
+
self.debt_escrow_amounts = value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'deleted')
|
|
237
|
+
self.deleted = attributes[:'deleted']
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
242
|
+
# @return Array for valid properties with the reasons
|
|
243
|
+
def list_invalid_properties
|
|
244
|
+
invalid_properties = Array.new
|
|
245
|
+
invalid_properties
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Check to see if the all the properties in the model are valid
|
|
249
|
+
# @return true if the model is valid
|
|
250
|
+
def valid?
|
|
251
|
+
return false if @id.nil?
|
|
252
|
+
return false if @name.nil?
|
|
253
|
+
return false if @type.nil?
|
|
254
|
+
return false if @on_budget.nil?
|
|
255
|
+
return false if @closed.nil?
|
|
256
|
+
return false if @balance.nil?
|
|
257
|
+
return false if @cleared_balance.nil?
|
|
258
|
+
return false if @uncleared_balance.nil?
|
|
259
|
+
return false if @deleted.nil?
|
|
260
|
+
true
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Checks equality by comparing each attribute.
|
|
264
|
+
# @param [Object] Object to be compared
|
|
265
|
+
def ==(o)
|
|
266
|
+
return true if self.equal?(o)
|
|
267
|
+
self.class == o.class &&
|
|
268
|
+
id == o.id &&
|
|
269
|
+
name == o.name &&
|
|
270
|
+
type == o.type &&
|
|
271
|
+
on_budget == o.on_budget &&
|
|
272
|
+
closed == o.closed &&
|
|
273
|
+
note == o.note &&
|
|
274
|
+
balance == o.balance &&
|
|
275
|
+
cleared_balance == o.cleared_balance &&
|
|
276
|
+
uncleared_balance == o.uncleared_balance &&
|
|
277
|
+
transfer_payee_id == o.transfer_payee_id &&
|
|
278
|
+
direct_import_linked == o.direct_import_linked &&
|
|
279
|
+
direct_import_in_error == o.direct_import_in_error &&
|
|
280
|
+
last_reconciled_at == o.last_reconciled_at &&
|
|
281
|
+
debt_original_balance == o.debt_original_balance &&
|
|
282
|
+
debt_interest_rates == o.debt_interest_rates &&
|
|
283
|
+
debt_minimum_payments == o.debt_minimum_payments &&
|
|
284
|
+
debt_escrow_amounts == o.debt_escrow_amounts &&
|
|
285
|
+
deleted == o.deleted
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# @see the `==` method
|
|
289
|
+
# @param [Object] Object to be compared
|
|
290
|
+
def eql?(o)
|
|
291
|
+
self == o
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Calculates hash code according to all attributes.
|
|
295
|
+
# @return [Integer] Hash code
|
|
296
|
+
def hash
|
|
297
|
+
[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
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Builds the object from hash
|
|
301
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
302
|
+
# @return [Object] Returns the model itself
|
|
303
|
+
def self.build_from_hash(attributes)
|
|
304
|
+
return nil unless attributes.is_a?(Hash)
|
|
305
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
306
|
+
transformed_hash = {}
|
|
307
|
+
openapi_types.each_pair do |key, type|
|
|
308
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
309
|
+
transformed_hash["#{key}"] = nil
|
|
310
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
311
|
+
# check to ensure the input is an array given that the attribute
|
|
312
|
+
# is documented as an array but the input is not
|
|
313
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
314
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
315
|
+
end
|
|
316
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
317
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
new(transformed_hash)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Returns the object in the form of hash
|
|
324
|
+
# @return [Hash] Returns the object in the form of hash
|
|
325
|
+
def to_hash
|
|
326
|
+
hash = {}
|
|
327
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
328
|
+
value = self.send(attr)
|
|
329
|
+
if value.nil?
|
|
330
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
331
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
hash[param] = _to_hash(value)
|
|
335
|
+
end
|
|
336
|
+
hash
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
end
|
data/lib/ynab/models/category.rb
CHANGED
|
@@ -23,6 +23,9 @@ module YNAB
|
|
|
23
23
|
# Whether or not the category is hidden
|
|
24
24
|
attr_accessor :hidden
|
|
25
25
|
|
|
26
|
+
# Whether or not the category is internal
|
|
27
|
+
attr_accessor :internal
|
|
28
|
+
|
|
26
29
|
# DEPRECATED: No longer used. Value will always be null.
|
|
27
30
|
attr_accessor :original_category_group_id
|
|
28
31
|
|
|
@@ -85,6 +88,48 @@ module YNAB
|
|
|
85
88
|
# Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
|
|
86
89
|
attr_accessor :deleted
|
|
87
90
|
|
|
91
|
+
# Available balance of the category formatted in the plan's currency format
|
|
92
|
+
attr_accessor :balance_formatted
|
|
93
|
+
|
|
94
|
+
# Available balance of the category as a decimal currency amount
|
|
95
|
+
attr_accessor :balance_currency
|
|
96
|
+
|
|
97
|
+
# Activity of the category formatted in the plan's currency format
|
|
98
|
+
attr_accessor :activity_formatted
|
|
99
|
+
|
|
100
|
+
# Activity of the category as a decimal currency amount
|
|
101
|
+
attr_accessor :activity_currency
|
|
102
|
+
|
|
103
|
+
# Assigned (budgeted) amount of the category formatted in the plan's currency format
|
|
104
|
+
attr_accessor :budgeted_formatted
|
|
105
|
+
|
|
106
|
+
# Assigned (budgeted) amount of the category as a decimal currency amount
|
|
107
|
+
attr_accessor :budgeted_currency
|
|
108
|
+
|
|
109
|
+
# The goal target amount formatted in the plan's currency format
|
|
110
|
+
attr_accessor :goal_target_formatted
|
|
111
|
+
|
|
112
|
+
# The goal target amount as a decimal currency amount
|
|
113
|
+
attr_accessor :goal_target_currency
|
|
114
|
+
|
|
115
|
+
# The goal underfunded amount formatted in the plan's currency format
|
|
116
|
+
attr_accessor :goal_under_funded_formatted
|
|
117
|
+
|
|
118
|
+
# The goal underfunded amount as a decimal currency amount
|
|
119
|
+
attr_accessor :goal_under_funded_currency
|
|
120
|
+
|
|
121
|
+
# The total amount funded towards the goal formatted in the plan's currency format
|
|
122
|
+
attr_accessor :goal_overall_funded_formatted
|
|
123
|
+
|
|
124
|
+
# The total amount funded towards the goal as a decimal currency amount
|
|
125
|
+
attr_accessor :goal_overall_funded_currency
|
|
126
|
+
|
|
127
|
+
# The amount of funding still needed to complete the goal formatted in the plan's currency format
|
|
128
|
+
attr_accessor :goal_overall_left_formatted
|
|
129
|
+
|
|
130
|
+
# The amount of funding still needed to complete the goal as a decimal currency amount
|
|
131
|
+
attr_accessor :goal_overall_left_currency
|
|
132
|
+
|
|
88
133
|
class EnumAttributeValidator
|
|
89
134
|
attr_reader :datatype
|
|
90
135
|
attr_reader :allowable_values
|
|
@@ -115,6 +160,7 @@ module YNAB
|
|
|
115
160
|
:'category_group_name' => :'category_group_name',
|
|
116
161
|
:'name' => :'name',
|
|
117
162
|
:'hidden' => :'hidden',
|
|
163
|
+
:'internal' => :'internal',
|
|
118
164
|
:'original_category_group_id' => :'original_category_group_id',
|
|
119
165
|
:'note' => :'note',
|
|
120
166
|
:'budgeted' => :'budgeted',
|
|
@@ -135,7 +181,21 @@ module YNAB
|
|
|
135
181
|
:'goal_overall_funded' => :'goal_overall_funded',
|
|
136
182
|
:'goal_overall_left' => :'goal_overall_left',
|
|
137
183
|
:'goal_snoozed_at' => :'goal_snoozed_at',
|
|
138
|
-
:'deleted' => :'deleted'
|
|
184
|
+
:'deleted' => :'deleted',
|
|
185
|
+
:'balance_formatted' => :'balance_formatted',
|
|
186
|
+
:'balance_currency' => :'balance_currency',
|
|
187
|
+
:'activity_formatted' => :'activity_formatted',
|
|
188
|
+
:'activity_currency' => :'activity_currency',
|
|
189
|
+
:'budgeted_formatted' => :'budgeted_formatted',
|
|
190
|
+
:'budgeted_currency' => :'budgeted_currency',
|
|
191
|
+
:'goal_target_formatted' => :'goal_target_formatted',
|
|
192
|
+
:'goal_target_currency' => :'goal_target_currency',
|
|
193
|
+
:'goal_under_funded_formatted' => :'goal_under_funded_formatted',
|
|
194
|
+
:'goal_under_funded_currency' => :'goal_under_funded_currency',
|
|
195
|
+
:'goal_overall_funded_formatted' => :'goal_overall_funded_formatted',
|
|
196
|
+
:'goal_overall_funded_currency' => :'goal_overall_funded_currency',
|
|
197
|
+
:'goal_overall_left_formatted' => :'goal_overall_left_formatted',
|
|
198
|
+
:'goal_overall_left_currency' => :'goal_overall_left_currency'
|
|
139
199
|
}
|
|
140
200
|
end
|
|
141
201
|
|
|
@@ -152,6 +212,7 @@ module YNAB
|
|
|
152
212
|
:'category_group_name' => :'String',
|
|
153
213
|
:'name' => :'String',
|
|
154
214
|
:'hidden' => :'Boolean',
|
|
215
|
+
:'internal' => :'Boolean',
|
|
155
216
|
:'original_category_group_id' => :'String',
|
|
156
217
|
:'note' => :'String',
|
|
157
218
|
:'budgeted' => :'Integer',
|
|
@@ -172,33 +233,46 @@ module YNAB
|
|
|
172
233
|
:'goal_overall_funded' => :'Integer',
|
|
173
234
|
:'goal_overall_left' => :'Integer',
|
|
174
235
|
:'goal_snoozed_at' => :'Time',
|
|
175
|
-
:'deleted' => :'Boolean'
|
|
236
|
+
:'deleted' => :'Boolean',
|
|
237
|
+
:'balance_formatted' => :'String',
|
|
238
|
+
:'balance_currency' => :'Float',
|
|
239
|
+
:'activity_formatted' => :'String',
|
|
240
|
+
:'activity_currency' => :'Float',
|
|
241
|
+
:'budgeted_formatted' => :'String',
|
|
242
|
+
:'budgeted_currency' => :'Float',
|
|
243
|
+
:'goal_target_formatted' => :'String',
|
|
244
|
+
:'goal_target_currency' => :'Float',
|
|
245
|
+
:'goal_under_funded_formatted' => :'String',
|
|
246
|
+
:'goal_under_funded_currency' => :'Float',
|
|
247
|
+
:'goal_overall_funded_formatted' => :'String',
|
|
248
|
+
:'goal_overall_funded_currency' => :'Float',
|
|
249
|
+
:'goal_overall_left_formatted' => :'String',
|
|
250
|
+
:'goal_overall_left_currency' => :'Float'
|
|
176
251
|
}
|
|
177
252
|
end
|
|
178
253
|
|
|
179
254
|
# List of attributes with nullable: true
|
|
180
255
|
def self.openapi_nullable
|
|
181
256
|
Set.new([
|
|
182
|
-
:'original_category_group_id',
|
|
183
|
-
:'note',
|
|
184
257
|
:'goal_type',
|
|
185
|
-
:'
|
|
186
|
-
:'
|
|
187
|
-
:'
|
|
188
|
-
:'
|
|
189
|
-
:'
|
|
190
|
-
:'
|
|
191
|
-
:'
|
|
192
|
-
:'
|
|
193
|
-
:'goal_percentage_complete',
|
|
194
|
-
:'goal_months_to_budget',
|
|
195
|
-
:'goal_under_funded',
|
|
196
|
-
:'goal_overall_funded',
|
|
197
|
-
:'goal_overall_left',
|
|
198
|
-
:'goal_snoozed_at',
|
|
258
|
+
:'goal_target_formatted',
|
|
259
|
+
:'goal_target_currency',
|
|
260
|
+
:'goal_under_funded_formatted',
|
|
261
|
+
:'goal_under_funded_currency',
|
|
262
|
+
:'goal_overall_funded_formatted',
|
|
263
|
+
:'goal_overall_funded_currency',
|
|
264
|
+
:'goal_overall_left_formatted',
|
|
265
|
+
:'goal_overall_left_currency'
|
|
199
266
|
])
|
|
200
267
|
end
|
|
201
268
|
|
|
269
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
270
|
+
def self.openapi_all_of
|
|
271
|
+
[
|
|
272
|
+
:'CategoryBase'
|
|
273
|
+
]
|
|
274
|
+
end
|
|
275
|
+
|
|
202
276
|
# Initializes the object
|
|
203
277
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
204
278
|
def initialize(attributes = {})
|
|
@@ -234,6 +308,10 @@ module YNAB
|
|
|
234
308
|
self.hidden = attributes[:'hidden']
|
|
235
309
|
end
|
|
236
310
|
|
|
311
|
+
if attributes.key?(:'internal')
|
|
312
|
+
self.internal = attributes[:'internal']
|
|
313
|
+
end
|
|
314
|
+
|
|
237
315
|
if attributes.key?(:'original_category_group_id')
|
|
238
316
|
self.original_category_group_id = attributes[:'original_category_group_id']
|
|
239
317
|
end
|
|
@@ -317,6 +395,62 @@ module YNAB
|
|
|
317
395
|
if attributes.key?(:'deleted')
|
|
318
396
|
self.deleted = attributes[:'deleted']
|
|
319
397
|
end
|
|
398
|
+
|
|
399
|
+
if attributes.key?(:'balance_formatted')
|
|
400
|
+
self.balance_formatted = attributes[:'balance_formatted']
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
if attributes.key?(:'balance_currency')
|
|
404
|
+
self.balance_currency = attributes[:'balance_currency']
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
if attributes.key?(:'activity_formatted')
|
|
408
|
+
self.activity_formatted = attributes[:'activity_formatted']
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
if attributes.key?(:'activity_currency')
|
|
412
|
+
self.activity_currency = attributes[:'activity_currency']
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
if attributes.key?(:'budgeted_formatted')
|
|
416
|
+
self.budgeted_formatted = attributes[:'budgeted_formatted']
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
if attributes.key?(:'budgeted_currency')
|
|
420
|
+
self.budgeted_currency = attributes[:'budgeted_currency']
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
if attributes.key?(:'goal_target_formatted')
|
|
424
|
+
self.goal_target_formatted = attributes[:'goal_target_formatted']
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
if attributes.key?(:'goal_target_currency')
|
|
428
|
+
self.goal_target_currency = attributes[:'goal_target_currency']
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
if attributes.key?(:'goal_under_funded_formatted')
|
|
432
|
+
self.goal_under_funded_formatted = attributes[:'goal_under_funded_formatted']
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if attributes.key?(:'goal_under_funded_currency')
|
|
436
|
+
self.goal_under_funded_currency = attributes[:'goal_under_funded_currency']
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
if attributes.key?(:'goal_overall_funded_formatted')
|
|
440
|
+
self.goal_overall_funded_formatted = attributes[:'goal_overall_funded_formatted']
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
if attributes.key?(:'goal_overall_funded_currency')
|
|
444
|
+
self.goal_overall_funded_currency = attributes[:'goal_overall_funded_currency']
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if attributes.key?(:'goal_overall_left_formatted')
|
|
448
|
+
self.goal_overall_left_formatted = attributes[:'goal_overall_left_formatted']
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
if attributes.key?(:'goal_overall_left_currency')
|
|
452
|
+
self.goal_overall_left_currency = attributes[:'goal_overall_left_currency']
|
|
453
|
+
end
|
|
320
454
|
end
|
|
321
455
|
|
|
322
456
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -333,6 +467,7 @@ module YNAB
|
|
|
333
467
|
return false if @category_group_id.nil?
|
|
334
468
|
return false if @name.nil?
|
|
335
469
|
return false if @hidden.nil?
|
|
470
|
+
return false if @internal.nil?
|
|
336
471
|
return false if @budgeted.nil?
|
|
337
472
|
return false if @activity.nil?
|
|
338
473
|
return false if @balance.nil?
|
|
@@ -358,6 +493,7 @@ module YNAB
|
|
|
358
493
|
category_group_name == o.category_group_name &&
|
|
359
494
|
name == o.name &&
|
|
360
495
|
hidden == o.hidden &&
|
|
496
|
+
internal == o.internal &&
|
|
361
497
|
original_category_group_id == o.original_category_group_id &&
|
|
362
498
|
note == o.note &&
|
|
363
499
|
budgeted == o.budgeted &&
|
|
@@ -378,7 +514,21 @@ module YNAB
|
|
|
378
514
|
goal_overall_funded == o.goal_overall_funded &&
|
|
379
515
|
goal_overall_left == o.goal_overall_left &&
|
|
380
516
|
goal_snoozed_at == o.goal_snoozed_at &&
|
|
381
|
-
deleted == o.deleted
|
|
517
|
+
deleted == o.deleted &&
|
|
518
|
+
balance_formatted == o.balance_formatted &&
|
|
519
|
+
balance_currency == o.balance_currency &&
|
|
520
|
+
activity_formatted == o.activity_formatted &&
|
|
521
|
+
activity_currency == o.activity_currency &&
|
|
522
|
+
budgeted_formatted == o.budgeted_formatted &&
|
|
523
|
+
budgeted_currency == o.budgeted_currency &&
|
|
524
|
+
goal_target_formatted == o.goal_target_formatted &&
|
|
525
|
+
goal_target_currency == o.goal_target_currency &&
|
|
526
|
+
goal_under_funded_formatted == o.goal_under_funded_formatted &&
|
|
527
|
+
goal_under_funded_currency == o.goal_under_funded_currency &&
|
|
528
|
+
goal_overall_funded_formatted == o.goal_overall_funded_formatted &&
|
|
529
|
+
goal_overall_funded_currency == o.goal_overall_funded_currency &&
|
|
530
|
+
goal_overall_left_formatted == o.goal_overall_left_formatted &&
|
|
531
|
+
goal_overall_left_currency == o.goal_overall_left_currency
|
|
382
532
|
end
|
|
383
533
|
|
|
384
534
|
# @see the `==` method
|
|
@@ -390,7 +540,7 @@ module YNAB
|
|
|
390
540
|
# Calculates hash code according to all attributes.
|
|
391
541
|
# @return [Integer] Hash code
|
|
392
542
|
def hash
|
|
393
|
-
[id, category_group_id, category_group_name, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_needs_whole_amount, goal_day, goal_cadence, goal_cadence_frequency, goal_creation_month, goal_target, goal_target_month, goal_target_date, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, goal_snoozed_at, deleted].hash
|
|
543
|
+
[id, category_group_id, category_group_name, name, hidden, internal, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_needs_whole_amount, goal_day, goal_cadence, goal_cadence_frequency, goal_creation_month, goal_target, goal_target_month, goal_target_date, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, goal_snoozed_at, deleted, balance_formatted, balance_currency, activity_formatted, activity_currency, budgeted_formatted, budgeted_currency, goal_target_formatted, goal_target_currency, goal_under_funded_formatted, goal_under_funded_currency, goal_overall_funded_formatted, goal_overall_funded_currency, goal_overall_left_formatted, goal_overall_left_currency].hash
|
|
394
544
|
end
|
|
395
545
|
|
|
396
546
|
# Builds the object from hash
|