ynab 3.8.0 → 3.9.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 -1
- data/docs/Category.md +1 -0
- data/docs/TransactionResponseData.md +1 -0
- data/lib/ynab/models/category.rb +12 -1
- data/lib/ynab/models/transaction_flag_color.rb +2 -1
- data/lib/ynab/models/transaction_response_data.rb +15 -4
- data/lib/ynab/version.rb +1 -1
- data/open_api_spec.yaml +14 -1
- data/spec/api/transactions_spec.rb +1 -1
- data/ynab.gemspec +1 -1
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e85fab164378b1c194af69c633cd7161809e9e497be321607fec9da7afbbb81
|
4
|
+
data.tar.gz: fc2c5601c227c31fb7202f3ea9bab7a9b90c8987097a43b0b44d25bf5637bcae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aac05d952641c7e087ba1dd21e1e72023709d451f32e2f4a462898f340257d3ea645ca9613e504aab6702dd8ffe148c61edcc364b56a77a336b660aab2dd581
|
7
|
+
data.tar.gz: a52ce7981de87bbf406abb208ca26245a202e9aa459a2014419450ae90b743e74c225e4139c7eed95ae86ebcf4f4271ea867aca8a21d8a30f09fcb72184aeec5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Note: The current version of this gem requires Ruby version 3.3 or later. If you
|
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
To use this client you must
|
22
|
-
[obtain an access token](https://api.ynab.com/#authentication
|
22
|
+
[obtain an access token](https://api.ynab.com/#authentication) from
|
23
23
|
your [Account Settings](https://app.ynab.com/settings) page of the YNAB web
|
24
24
|
app.
|
25
25
|
|
data/docs/Category.md
CHANGED
@@ -27,5 +27,6 @@
|
|
27
27
|
| **goal_under_funded** | **Integer** | The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month. The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month. | [optional] |
|
28
28
|
| **goal_overall_funded** | **Integer** | The total amount funded towards the goal within the current goal period. | [optional] |
|
29
29
|
| **goal_overall_left** | **Integer** | The amount of funding still needed to complete the goal within the current goal period. | [optional] |
|
30
|
+
| **goal_snoozed_at** | **Time** | The date/time the goal was snoozed. If the goal is not snoozed, this will be null. | [optional] |
|
30
31
|
| **deleted** | **Boolean** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. | |
|
31
32
|
|
data/lib/ynab/models/category.rb
CHANGED
@@ -76,6 +76,9 @@ module YNAB
|
|
76
76
|
# The amount of funding still needed to complete the goal within the current goal period.
|
77
77
|
attr_accessor :goal_overall_left
|
78
78
|
|
79
|
+
# The date/time the goal was snoozed. If the goal is not snoozed, this will be null.
|
80
|
+
attr_accessor :goal_snoozed_at
|
81
|
+
|
79
82
|
# Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
|
80
83
|
attr_accessor :deleted
|
81
84
|
|
@@ -127,6 +130,7 @@ module YNAB
|
|
127
130
|
:'goal_under_funded' => :'goal_under_funded',
|
128
131
|
:'goal_overall_funded' => :'goal_overall_funded',
|
129
132
|
:'goal_overall_left' => :'goal_overall_left',
|
133
|
+
:'goal_snoozed_at' => :'goal_snoozed_at',
|
130
134
|
:'deleted' => :'deleted'
|
131
135
|
}
|
132
136
|
end
|
@@ -162,6 +166,7 @@ module YNAB
|
|
162
166
|
:'goal_under_funded' => :'Integer',
|
163
167
|
:'goal_overall_funded' => :'Integer',
|
164
168
|
:'goal_overall_left' => :'Integer',
|
169
|
+
:'goal_snoozed_at' => :'Time',
|
165
170
|
:'deleted' => :'Boolean'
|
166
171
|
}
|
167
172
|
end
|
@@ -184,6 +189,7 @@ module YNAB
|
|
184
189
|
:'goal_under_funded',
|
185
190
|
:'goal_overall_funded',
|
186
191
|
:'goal_overall_left',
|
192
|
+
:'goal_snoozed_at',
|
187
193
|
])
|
188
194
|
end
|
189
195
|
|
@@ -294,6 +300,10 @@ module YNAB
|
|
294
300
|
self.goal_overall_left = attributes[:'goal_overall_left']
|
295
301
|
end
|
296
302
|
|
303
|
+
if attributes.key?(:'goal_snoozed_at')
|
304
|
+
self.goal_snoozed_at = attributes[:'goal_snoozed_at']
|
305
|
+
end
|
306
|
+
|
297
307
|
if attributes.key?(:'deleted')
|
298
308
|
self.deleted = attributes[:'deleted']
|
299
309
|
end
|
@@ -356,6 +366,7 @@ module YNAB
|
|
356
366
|
goal_under_funded == o.goal_under_funded &&
|
357
367
|
goal_overall_funded == o.goal_overall_funded &&
|
358
368
|
goal_overall_left == o.goal_overall_left &&
|
369
|
+
goal_snoozed_at == o.goal_snoozed_at &&
|
359
370
|
deleted == o.deleted
|
360
371
|
end
|
361
372
|
|
@@ -368,7 +379,7 @@ module YNAB
|
|
368
379
|
# Calculates hash code according to all attributes.
|
369
380
|
# @return [Integer] Hash code
|
370
381
|
def hash
|
371
|
-
[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_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, deleted].hash
|
382
|
+
[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_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, goal_snoozed_at, deleted].hash
|
372
383
|
end
|
373
384
|
|
374
385
|
# Builds the object from hash
|
@@ -18,9 +18,10 @@ module YNAB
|
|
18
18
|
GREEN = "green".freeze
|
19
19
|
BLUE = "blue".freeze
|
20
20
|
PURPLE = "purple".freeze
|
21
|
+
EMPTY = "".freeze
|
21
22
|
|
22
23
|
def self.all_vars
|
23
|
-
@all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE].freeze
|
24
|
+
@all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE, EMPTY].freeze
|
24
25
|
end
|
25
26
|
|
26
27
|
# Builds the enum from string
|
@@ -14,10 +14,14 @@ module YNAB
|
|
14
14
|
class TransactionResponseData
|
15
15
|
attr_accessor :transaction
|
16
16
|
|
17
|
+
# The knowledge of the server
|
18
|
+
attr_accessor :server_knowledge
|
19
|
+
|
17
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
21
|
def self.attribute_map
|
19
22
|
{
|
20
|
-
:'transaction' => :'transaction'
|
23
|
+
:'transaction' => :'transaction',
|
24
|
+
:'server_knowledge' => :'server_knowledge'
|
21
25
|
}
|
22
26
|
end
|
23
27
|
|
@@ -29,7 +33,8 @@ module YNAB
|
|
29
33
|
# Attribute type mapping.
|
30
34
|
def self.openapi_types
|
31
35
|
{
|
32
|
-
:'transaction' => :'TransactionDetail'
|
36
|
+
:'transaction' => :'TransactionDetail',
|
37
|
+
:'server_knowledge' => :'Integer'
|
33
38
|
}
|
34
39
|
end
|
35
40
|
|
@@ -57,6 +62,10 @@ module YNAB
|
|
57
62
|
if attributes.key?(:'transaction')
|
58
63
|
self.transaction = attributes[:'transaction']
|
59
64
|
end
|
65
|
+
|
66
|
+
if attributes.key?(:'server_knowledge')
|
67
|
+
self.server_knowledge = attributes[:'server_knowledge']
|
68
|
+
end
|
60
69
|
end
|
61
70
|
|
62
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -70,6 +79,7 @@ module YNAB
|
|
70
79
|
# @return true if the model is valid
|
71
80
|
def valid?
|
72
81
|
return false if @transaction.nil?
|
82
|
+
return false if @server_knowledge.nil?
|
73
83
|
true
|
74
84
|
end
|
75
85
|
|
@@ -78,7 +88,8 @@ module YNAB
|
|
78
88
|
def ==(o)
|
79
89
|
return true if self.equal?(o)
|
80
90
|
self.class == o.class &&
|
81
|
-
transaction == o.transaction
|
91
|
+
transaction == o.transaction &&
|
92
|
+
server_knowledge == o.server_knowledge
|
82
93
|
end
|
83
94
|
|
84
95
|
# @see the `==` method
|
@@ -90,7 +101,7 @@ module YNAB
|
|
90
101
|
# Calculates hash code according to all attributes.
|
91
102
|
# @return [Integer] Hash code
|
92
103
|
def hash
|
93
|
-
[transaction].hash
|
104
|
+
[transaction, server_knowledge].hash
|
94
105
|
end
|
95
106
|
|
96
107
|
# Builds the object from hash
|
data/lib/ynab/version.rb
CHANGED
data/open_api_spec.yaml
CHANGED
@@ -6,7 +6,7 @@ info:
|
|
6
6
|
upon HTTPS for transport. We respond with meaningful HTTP response codes and
|
7
7
|
if an error occurs, we include error details in the response body. API
|
8
8
|
Documentation is at https://api.ynab.com
|
9
|
-
version: 1.
|
9
|
+
version: 1.76.0
|
10
10
|
servers:
|
11
11
|
- url: https://api.ynab.com/v1
|
12
12
|
security:
|
@@ -2304,6 +2304,13 @@ components:
|
|
2304
2304
|
current goal period.
|
2305
2305
|
format: int64
|
2306
2306
|
nullable: true
|
2307
|
+
goal_snoozed_at:
|
2308
|
+
type: string
|
2309
|
+
description: >-
|
2310
|
+
The date/time the goal was snoozed. If the goal is not snoozed, this
|
2311
|
+
will be null.
|
2312
|
+
format: date-time
|
2313
|
+
nullable: true
|
2307
2314
|
deleted:
|
2308
2315
|
type: boolean
|
2309
2316
|
description: >-
|
@@ -2715,10 +2722,15 @@ components:
|
|
2715
2722
|
data:
|
2716
2723
|
required:
|
2717
2724
|
- transaction
|
2725
|
+
- server_knowledge
|
2718
2726
|
type: object
|
2719
2727
|
properties:
|
2720
2728
|
transaction:
|
2721
2729
|
$ref: "#/components/schemas/TransactionDetail"
|
2730
|
+
server_knowledge:
|
2731
|
+
type: integer
|
2732
|
+
description: The knowledge of the server
|
2733
|
+
format: int64
|
2722
2734
|
TransactionSummary:
|
2723
2735
|
required:
|
2724
2736
|
- account_id
|
@@ -3380,6 +3392,7 @@ components:
|
|
3380
3392
|
- green
|
3381
3393
|
- blue
|
3382
3394
|
- purple
|
3395
|
+
- ""
|
3383
3396
|
- null
|
3384
3397
|
nullable: true
|
3385
3398
|
TransactionFlagName:
|
@@ -52,7 +52,7 @@ describe 'transactions' do
|
|
52
52
|
expect(client.last_request.response.options[:code]).to be 200
|
53
53
|
expect(response.data.transactions.length).to be 2
|
54
54
|
# We expect the flag_color to have been converted to nil for these transactions
|
55
|
-
expect(response.data.transactions[0].flag_color).to
|
55
|
+
expect(response.data.transactions[0].flag_color).to eq ""
|
56
56
|
expect(response.data.transactions[1].flag_color).to be_nil
|
57
57
|
end
|
58
58
|
end
|
data/ynab.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.email = ["api@ynab.com"]
|
21
21
|
s.homepage = "https://github.com/ynab/ynab-sdk-ruby"
|
22
22
|
s.summary = "Official Ruby client for the YNAB API"
|
23
|
-
s.description = "Official Ruby client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.
|
23
|
+
s.description = "Official Ruby client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.76.0."
|
24
24
|
s.license = "Apache-2.0"
|
25
25
|
s.required_ruby_version = ">= 3.3"
|
26
26
|
s.metadata = {}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ynab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YNAB
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: typhoeus
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: 3.6.0
|
52
52
|
description: Official Ruby client for the YNAB API. API documentation available at
|
53
|
-
https://api.ynab.com. Generated from server specification version 1.
|
53
|
+
https://api.ynab.com. Generated from server specification version 1.76.0.
|
54
54
|
email:
|
55
55
|
- api@ynab.com
|
56
56
|
executables: []
|
@@ -367,55 +367,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
367
|
- !ruby/object:Gem::Version
|
368
368
|
version: '0'
|
369
369
|
requirements: []
|
370
|
-
rubygems_version: 3.
|
370
|
+
rubygems_version: 3.7.1
|
371
371
|
specification_version: 4
|
372
372
|
summary: Official Ruby client for the YNAB API
|
373
373
|
test_files:
|
374
|
-
- spec/api/budgets_spec.rb
|
375
|
-
- spec/api/payees_spec.rb
|
376
374
|
- spec/api/accounts_spec.rb
|
375
|
+
- spec/api/budgets_spec.rb
|
376
|
+
- spec/api/categories_spec.rb
|
377
377
|
- spec/api/months_spec.rb
|
378
378
|
- spec/api/payee_locations_spec.rb
|
379
|
+
- spec/api/payees_spec.rb
|
379
380
|
- spec/api/scheduled_transactions_spec.rb
|
380
381
|
- spec/api/transactions_spec.rb
|
381
|
-
- spec/api/categories_spec.rb
|
382
382
|
- spec/api_error_spec.rb
|
383
|
-
- spec/fixtures/vcr_cassettes/
|
384
|
-
- spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
|
385
|
-
- spec/fixtures/vcr_cassettes/accounts_unauthorized.yml
|
383
|
+
- spec/fixtures/vcr_cassettes/account.yml
|
386
384
|
- spec/fixtures/vcr_cassettes/accounts.yml
|
387
|
-
- spec/fixtures/vcr_cassettes/
|
388
|
-
- spec/fixtures/vcr_cassettes/
|
389
|
-
- spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
|
390
|
-
- spec/fixtures/vcr_cassettes/import_transactions.yml
|
391
|
-
- spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml
|
392
|
-
- spec/fixtures/vcr_cassettes/category_transactions.yml
|
393
|
-
- spec/fixtures/vcr_cassettes/scheduled_transaction.yml
|
394
|
-
- spec/fixtures/vcr_cassettes/bulk_transactions.yml
|
395
|
-
- spec/fixtures/vcr_cassettes/payees_unauthorized.yml
|
396
|
-
- spec/fixtures/vcr_cassettes/create_transactions.yml
|
385
|
+
- spec/fixtures/vcr_cassettes/accounts_unauthorized.yml
|
386
|
+
- spec/fixtures/vcr_cassettes/budget.yml
|
397
387
|
- spec/fixtures/vcr_cassettes/budgets.yml
|
388
|
+
- spec/fixtures/vcr_cassettes/budgets_unauthorized.yml
|
389
|
+
- spec/fixtures/vcr_cassettes/bulk_transactions.yml
|
390
|
+
- spec/fixtures/vcr_cassettes/categories.yml
|
398
391
|
- spec/fixtures/vcr_cassettes/categories_unauthorized.yml
|
392
|
+
- spec/fixtures/vcr_cassettes/category.yml
|
393
|
+
- spec/fixtures/vcr_cassettes/category_transactions.yml
|
394
|
+
- spec/fixtures/vcr_cassettes/create_account.yml
|
395
|
+
- spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml
|
396
|
+
- spec/fixtures/vcr_cassettes/create_transaction.yml
|
397
|
+
- spec/fixtures/vcr_cassettes/create_transactions.yml
|
398
|
+
- spec/fixtures/vcr_cassettes/import_transactions.yml
|
399
399
|
- spec/fixtures/vcr_cassettes/month.yml
|
400
|
-
- spec/fixtures/vcr_cassettes/
|
401
|
-
- spec/fixtures/vcr_cassettes/categories.yml
|
400
|
+
- spec/fixtures/vcr_cassettes/month_transactions.yml
|
402
401
|
- spec/fixtures/vcr_cassettes/months.yml
|
403
|
-
- spec/fixtures/vcr_cassettes/
|
404
|
-
- spec/fixtures/vcr_cassettes/
|
405
|
-
- spec/fixtures/vcr_cassettes/update_transactions.yml
|
406
|
-
- spec/fixtures/vcr_cassettes/payees.yml
|
407
|
-
- spec/fixtures/vcr_cassettes/scheduled_transactions.yml
|
402
|
+
- spec/fixtures/vcr_cassettes/months_unauthorized.yml
|
403
|
+
- spec/fixtures/vcr_cassettes/multiple_transactions.yml
|
408
404
|
- spec/fixtures/vcr_cassettes/patch_month_category.yml
|
409
|
-
- spec/fixtures/vcr_cassettes/
|
405
|
+
- spec/fixtures/vcr_cassettes/payee.yml
|
406
|
+
- spec/fixtures/vcr_cassettes/payee_location.yml
|
410
407
|
- spec/fixtures/vcr_cassettes/payee_locations.yml
|
411
|
-
- spec/fixtures/vcr_cassettes/
|
412
|
-
- spec/fixtures/vcr_cassettes/months_unauthorized.yml
|
408
|
+
- spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
|
413
409
|
- spec/fixtures/vcr_cassettes/payee_transactions.yml
|
414
|
-
- spec/fixtures/vcr_cassettes/
|
415
|
-
- spec/fixtures/vcr_cassettes/
|
416
|
-
- spec/fixtures/vcr_cassettes/
|
410
|
+
- spec/fixtures/vcr_cassettes/payees.yml
|
411
|
+
- spec/fixtures/vcr_cassettes/payees_unauthorized.yml
|
412
|
+
- spec/fixtures/vcr_cassettes/scheduled_transaction.yml
|
413
|
+
- spec/fixtures/vcr_cassettes/scheduled_transactions.yml
|
414
|
+
- spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml
|
417
415
|
- spec/fixtures/vcr_cassettes/transaction.yml
|
418
|
-
- spec/fixtures/vcr_cassettes/
|
419
|
-
- spec/fixtures/vcr_cassettes/
|
420
|
-
- spec/fixtures/vcr_cassettes/
|
416
|
+
- spec/fixtures/vcr_cassettes/transactions.yml
|
417
|
+
- spec/fixtures/vcr_cassettes/transactions_invalid_flags.yml
|
418
|
+
- spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
|
419
|
+
- spec/fixtures/vcr_cassettes/update_transaction.yml
|
420
|
+
- spec/fixtures/vcr_cassettes/update_transactions.yml
|
421
421
|
- spec/spec_helper.rb
|