ynab 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -2
- data/Rakefile +3 -3
- data/config.json +1 -1
- data/docs/Account.md +3 -3
- data/docs/BudgetDetailWrapper.md +1 -1
- data/docs/BudgetsApi.md +1 -1
- data/docs/Category.md +8 -3
- data/docs/CurrencyFormat.md +1 -1
- data/docs/HybridTransaction.md +1 -1
- data/docs/MonthDetail.md +2 -2
- data/docs/MonthSummary.md +2 -2
- data/docs/SaveTransaction.md +1 -1
- data/docs/ScheduledSubTransaction.md +1 -1
- data/docs/ScheduledTransactionDetail.md +1 -1
- data/docs/ScheduledTransactionSummary.md +1 -1
- data/docs/SubTransaction.md +1 -1
- data/docs/TransactionDetail.md +1 -1
- data/docs/TransactionSummary.md +1 -1
- data/lib/ynab/api/budgets_api.rb +2 -2
- data/lib/ynab/models/account.rb +3 -3
- data/lib/ynab/models/budget_detail_wrapper.rb +1 -1
- data/lib/ynab/models/category.rb +113 -4
- data/lib/ynab/models/currency_format.rb +1 -1
- data/lib/ynab/models/hybrid_transaction.rb +1 -1
- data/lib/ynab/models/month_detail.rb +2 -2
- data/lib/ynab/models/month_summary.rb +2 -2
- data/lib/ynab/models/save_transaction.rb +1 -1
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -1
- data/lib/ynab/models/sub_transaction.rb +1 -1
- data/lib/ynab/models/transaction_detail.rb +1 -1
- data/lib/ynab/models/transaction_summary.rb +1 -1
- data/lib/ynab/version.rb +1 -1
- data/pkg/ynab-1.1.0.gem +0 -0
- data/pkg/ynab-1.2.0.gem +0 -0
- data/spec-v1-swagger.json +44 -16
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4d3a0740b445b4056dd6bf489c6ab83c0941c6
|
4
|
+
data.tar.gz: 04e4894f4d8f7ade62afc56ac7057b915bba3c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa657ced871b1463e5db24f599d657f575bd4a50c3932a021ae761540dfc239af1619acff5953c9afd910e873b715819122947c0ac1ffdea13ee8891736c056d
|
7
|
+
data.tar.gz: 8c8fd058f98c7f954f7a87320b4f2f055ab6841224d8ee821ac703837689e55879c0a91b2ad722c258dfe1fdf2f2242df25b6128f19969ea728299751722ddb0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -28,9 +28,9 @@ require 'ynab'
|
|
28
28
|
|
29
29
|
access_token = 'bf0cbb14b4330-not-real-3de12e66a389eaafe2'
|
30
30
|
|
31
|
-
|
31
|
+
ynab_api = YNAB::API.new(access_token)
|
32
32
|
|
33
|
-
budget_response =
|
33
|
+
budget_response = ynab_api.budgets.get_budgets
|
34
34
|
budgets = budget_response.data.budgets
|
35
35
|
|
36
36
|
budgets.each do |budget|
|
@@ -51,6 +51,7 @@ The following methods are available in this library.
|
|
51
51
|
| **User** | [budgets.get_user()](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/UserApi.md#get_user) | Returns authenticated user information
|
52
52
|
| **Budgets** | [budgets.get_budgets()](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budgets) | Returns budgets list with summary information |
|
53
53
|
| | [budgets.get_budget_by_id(id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_by_id) | Returns a single budget with all related entities |
|
54
|
+
| | [budgets.get_budget_settings_by_id(id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_settings_by_id) | Returns settings for a budget |
|
54
55
|
| **Accounts** | [accounts.get_accounts(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/AccountsApi.md#get_accounts) | Returns all accounts |
|
55
56
|
| | [accounts.get_account_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/AccountsApi.md#get_account_by_id) | Returns a single account |
|
56
57
|
| **Categories** | [categories.get_categories(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#get_categories) | Returns all categories grouped by category group. |
|
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ task :generate do
|
|
21
21
|
# Examples:
|
22
22
|
# ["string", "null"] => "string"
|
23
23
|
# ["number", "null"] => "number"
|
24
|
-
sh %Q[sed -E -i '' 's/\\\[\\"(string|number|array|boolean)\\"\\, \\"null\\"\\\]/"\\1"/g' #{spec_filename}]
|
24
|
+
sh %Q[sed -E -i '' 's/\\\[\\"(string|number|integer|array|boolean)\\"\\, \\"null\\"\\\]/"\\1"/g' #{spec_filename}]
|
25
25
|
|
26
26
|
# Use Docker to codegen ruby based on the swagger spec
|
27
27
|
sh "docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate"\
|
@@ -32,9 +32,9 @@ task :generate do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
task :commit_version_bump do
|
35
|
-
sh "git add lib/ynab/version.rb Gemfile.lock && git diff-index --quiet HEAD || git commit -m 'Bumping version for release'"
|
35
|
+
sh "git add config.json lib/ynab/version.rb Gemfile.lock && git diff-index --quiet HEAD || git commit -m 'Bumping version for release'"
|
36
36
|
end
|
37
37
|
|
38
38
|
desc "Bump version, run specs build a gem and release on RubyGems"
|
39
|
-
task :publish => ['generate', '
|
39
|
+
task :publish => ['generate', 'spec', 'release']
|
40
40
|
|
data/config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"gemName": "ynab",
|
3
3
|
"moduleName": "YNAB",
|
4
|
-
"gemVersion": "1.
|
4
|
+
"gemVersion": "1.2.0",
|
5
5
|
"gemDescription": "Ruby gem wrapper for the YNAB API. Read the documentation at https://api.youneedabudget.com",
|
6
6
|
"gemHomepage": "https://github.com/ynab/ynab-sdk-ruby",
|
7
7
|
"gemLicense": "Apache-2.0",
|
data/docs/Account.md
CHANGED
@@ -9,9 +9,9 @@ Name | Type | Description | Notes
|
|
9
9
|
**on_budget** | **BOOLEAN** | Whether this account is on budget or not |
|
10
10
|
**closed** | **BOOLEAN** | Whether this account is closed or not |
|
11
11
|
**note** | **String** | |
|
12
|
-
**balance** | **
|
13
|
-
**cleared_balance** | **
|
14
|
-
**uncleared_balance** | **
|
12
|
+
**balance** | **Integer** | The current balance of the account in milliunits format |
|
13
|
+
**cleared_balance** | **Integer** | The current cleared balance of the account in milliunits format |
|
14
|
+
**uncleared_balance** | **Integer** | The current uncleared balance of the account in milliunits format |
|
15
15
|
**deleted** | **BOOLEAN** | Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. |
|
16
16
|
|
17
17
|
|
data/docs/BudgetDetailWrapper.md
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**budget** | [**BudgetDetail**](BudgetDetail.md) | |
|
7
|
-
**server_knowledge** | **
|
7
|
+
**server_knowledge** | **Integer** | The knowledge of the server |
|
8
8
|
|
9
9
|
|
data/docs/BudgetsApi.md
CHANGED
@@ -21,7 +21,7 @@ Returns a single budget with all related entities. This resource is effectively
|
|
21
21
|
Name | Type | Description | Notes
|
22
22
|
------------- | ------------- | ------------- | -------------
|
23
23
|
**budget_id** | [**String**](.md)| The ID of the Budget. |
|
24
|
-
**last_knowledge_of_server** | **
|
24
|
+
**last_knowledge_of_server** | **Integer**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | [optional]
|
25
25
|
|
26
26
|
### Return type
|
27
27
|
|
data/docs/Category.md
CHANGED
@@ -9,9 +9,14 @@ Name | Type | Description | Notes
|
|
9
9
|
**hidden** | **BOOLEAN** | Whether or not the category is hidden |
|
10
10
|
**original_category_group_id** | **String** | If category is hidden this is the id of the category group it originally belonged to before it was hidden. | [optional]
|
11
11
|
**note** | **String** | |
|
12
|
-
**budgeted** | **
|
13
|
-
**activity** | **
|
14
|
-
**balance** | **
|
12
|
+
**budgeted** | **Integer** | Budgeted amount in current month in milliunits format |
|
13
|
+
**activity** | **Integer** | Activity amount in current month in milliunits format |
|
14
|
+
**balance** | **Integer** | Balance in current month in milliunits format |
|
15
|
+
**goal_type** | **String** | The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) |
|
16
|
+
**goal_creation_month** | **Date** | The month a goal was created |
|
17
|
+
**goal_target** | **Integer** | The goal target amount in milliunits |
|
18
|
+
**goal_target_month** | **Date** | If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed |
|
19
|
+
**goal_percentage_complete** | **Integer** | The percentage completion of the goal |
|
15
20
|
**deleted** | **BOOLEAN** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. |
|
16
21
|
|
17
22
|
|
data/docs/CurrencyFormat.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**iso_code** | **String** | |
|
7
7
|
**example_format** | **String** | |
|
8
|
-
**decimal_digits** | **
|
8
|
+
**decimal_digits** | **Integer** | |
|
9
9
|
**decimal_separator** | **String** | |
|
10
10
|
**symbol_first** | **BOOLEAN** | |
|
11
11
|
**group_separator** | **String** | |
|
data/docs/HybridTransaction.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**id** | **String** | |
|
7
7
|
**date** | **Date** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The transaction amount in milliunits format |
|
9
9
|
**memo** | **String** | |
|
10
10
|
**cleared** | **String** | The cleared status of the transaction |
|
11
11
|
**approved** | **BOOLEAN** | Whether or not the transaction is approved |
|
data/docs/MonthDetail.md
CHANGED
@@ -5,8 +5,8 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**month** | **Date** | |
|
7
7
|
**note** | **String** | |
|
8
|
-
**to_be_budgeted** | **
|
9
|
-
**age_of_money** | **
|
8
|
+
**to_be_budgeted** | **Integer** | The current balance of the account in milliunits format |
|
9
|
+
**age_of_money** | **Integer** | |
|
10
10
|
**categories** | [**Array<Category>**](Category.md) | The budget month categories |
|
11
11
|
|
12
12
|
|
data/docs/MonthSummary.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**month** | **Date** | |
|
7
7
|
**note** | **String** | |
|
8
|
-
**to_be_budgeted** | **
|
9
|
-
**age_of_money** | **
|
8
|
+
**to_be_budgeted** | **Integer** | The current balance of the account in milliunits format |
|
9
|
+
**age_of_money** | **Integer** | |
|
10
10
|
|
11
11
|
|
data/docs/SaveTransaction.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**account_id** | **String** | |
|
7
7
|
**date** | **Date** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The transaction amount in milliunits format |
|
9
9
|
**payee_id** | **String** | The payee for the transaction. Transfer payees are not permitted and will be ignored if supplied. | [optional]
|
10
10
|
**payee_name** | **String** | 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. | [optional]
|
11
11
|
**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional]
|
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**id** | **String** | |
|
7
7
|
**scheduled_transaction_id** | **String** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The scheduled subtransaction amount in milliunits format |
|
9
9
|
**memo** | **String** | |
|
10
10
|
**payee_id** | **String** | |
|
11
11
|
**category_id** | **String** | |
|
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**date_first** | **Date** | The first date for which the Scheduled Transaction was scheduled. |
|
8
8
|
**date_next** | **Date** | The next date for which the Scheduled Transaction is scheduled. |
|
9
9
|
**frequency** | **String** | |
|
10
|
-
**amount** | **
|
10
|
+
**amount** | **Integer** | The scheduled transaction amount in milliunits format |
|
11
11
|
**memo** | **String** | |
|
12
12
|
**flag_color** | **String** | The scheduled transaction flag |
|
13
13
|
**account_id** | **String** | |
|
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**date_first** | **Date** | The first date for which the Scheduled Transaction was scheduled. |
|
8
8
|
**date_next** | **Date** | The next date for which the Scheduled Transaction is scheduled. |
|
9
9
|
**frequency** | **String** | |
|
10
|
-
**amount** | **
|
10
|
+
**amount** | **Integer** | The scheduled transaction amount in milliunits format |
|
11
11
|
**memo** | **String** | |
|
12
12
|
**flag_color** | **String** | The scheduled transaction flag |
|
13
13
|
**account_id** | **String** | |
|
data/docs/SubTransaction.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**id** | **String** | |
|
7
7
|
**transaction_id** | **String** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The subtransaction amount in milliunits format |
|
9
9
|
**memo** | **String** | |
|
10
10
|
**payee_id** | **String** | |
|
11
11
|
**category_id** | **String** | |
|
data/docs/TransactionDetail.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**id** | **String** | |
|
7
7
|
**date** | **Date** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The transaction amount in milliunits format |
|
9
9
|
**memo** | **String** | |
|
10
10
|
**cleared** | **String** | The cleared status of the transaction |
|
11
11
|
**approved** | **BOOLEAN** | Whether or not the transaction is approved |
|
data/docs/TransactionSummary.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**id** | **String** | |
|
7
7
|
**date** | **Date** | |
|
8
|
-
**amount** | **
|
8
|
+
**amount** | **Integer** | The transaction amount in milliunits format |
|
9
9
|
**memo** | **String** | |
|
10
10
|
**cleared** | **String** | The cleared status of the transaction |
|
11
11
|
**approved** | **BOOLEAN** | Whether or not the transaction is approved |
|
data/lib/ynab/api/budgets_api.rb
CHANGED
@@ -23,7 +23,7 @@ module YNAB
|
|
23
23
|
# Returns a single budget with all related entities. This resource is effectively a full budget export.
|
24
24
|
# @param budget_id The ID of the Budget.
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [
|
26
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
27
27
|
# @return [BudgetDetailResponse]
|
28
28
|
def get_budget_by_id(budget_id, opts = {})
|
29
29
|
data, _status_code, _headers = get_budget_by_id_with_http_info(budget_id, opts)
|
@@ -34,7 +34,7 @@ module YNAB
|
|
34
34
|
# Returns a single budget with all related entities. This resource is effectively a full budget export.
|
35
35
|
# @param budget_id The ID of the Budget.
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
|
-
# @option opts [
|
37
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
38
38
|
# @return [Array<(BudgetDetailResponse, Fixnum, Hash)>] BudgetDetailResponse data, response status code and response headers
|
39
39
|
def get_budget_by_id_with_http_info(budget_id, opts = {})
|
40
40
|
if @api_client.config.debugging
|
data/lib/ynab/models/account.rb
CHANGED
@@ -88,9 +88,9 @@ module YNAB
|
|
88
88
|
:'on_budget' => :'BOOLEAN',
|
89
89
|
:'closed' => :'BOOLEAN',
|
90
90
|
:'note' => :'String',
|
91
|
-
:'balance' => :'
|
92
|
-
:'cleared_balance' => :'
|
93
|
-
:'uncleared_balance' => :'
|
91
|
+
:'balance' => :'Integer',
|
92
|
+
:'cleared_balance' => :'Integer',
|
93
|
+
:'uncleared_balance' => :'Integer',
|
94
94
|
:'deleted' => :'BOOLEAN'
|
95
95
|
}
|
96
96
|
end
|
data/lib/ynab/models/category.rb
CHANGED
@@ -37,9 +37,46 @@ module YNAB
|
|
37
37
|
# Balance in current month in milliunits format
|
38
38
|
attr_accessor :balance
|
39
39
|
|
40
|
+
# The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
|
41
|
+
attr_accessor :goal_type
|
42
|
+
|
43
|
+
# The month a goal was created
|
44
|
+
attr_accessor :goal_creation_month
|
45
|
+
|
46
|
+
# The goal target amount in milliunits
|
47
|
+
attr_accessor :goal_target
|
48
|
+
|
49
|
+
# If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed
|
50
|
+
attr_accessor :goal_target_month
|
51
|
+
|
52
|
+
# The percentage completion of the goal
|
53
|
+
attr_accessor :goal_percentage_complete
|
54
|
+
|
40
55
|
# Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
|
41
56
|
attr_accessor :deleted
|
42
57
|
|
58
|
+
class EnumAttributeValidator
|
59
|
+
attr_reader :datatype
|
60
|
+
attr_reader :allowable_values
|
61
|
+
|
62
|
+
def initialize(datatype, allowable_values)
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
64
|
+
case datatype.to_s
|
65
|
+
when /Integer/i
|
66
|
+
value.to_i
|
67
|
+
when /Float/i
|
68
|
+
value.to_f
|
69
|
+
else
|
70
|
+
value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def valid?(value)
|
76
|
+
!value || allowable_values.include?(value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
43
80
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
81
|
def self.attribute_map
|
45
82
|
{
|
@@ -52,6 +89,11 @@ module YNAB
|
|
52
89
|
:'budgeted' => :'budgeted',
|
53
90
|
:'activity' => :'activity',
|
54
91
|
:'balance' => :'balance',
|
92
|
+
:'goal_type' => :'goal_type',
|
93
|
+
:'goal_creation_month' => :'goal_creation_month',
|
94
|
+
:'goal_target' => :'goal_target',
|
95
|
+
:'goal_target_month' => :'goal_target_month',
|
96
|
+
:'goal_percentage_complete' => :'goal_percentage_complete',
|
55
97
|
:'deleted' => :'deleted'
|
56
98
|
}
|
57
99
|
end
|
@@ -65,9 +107,14 @@ module YNAB
|
|
65
107
|
:'hidden' => :'BOOLEAN',
|
66
108
|
:'original_category_group_id' => :'String',
|
67
109
|
:'note' => :'String',
|
68
|
-
:'budgeted' => :'
|
69
|
-
:'activity' => :'
|
70
|
-
:'balance' => :'
|
110
|
+
:'budgeted' => :'Integer',
|
111
|
+
:'activity' => :'Integer',
|
112
|
+
:'balance' => :'Integer',
|
113
|
+
:'goal_type' => :'String',
|
114
|
+
:'goal_creation_month' => :'Date',
|
115
|
+
:'goal_target' => :'Integer',
|
116
|
+
:'goal_target_month' => :'Date',
|
117
|
+
:'goal_percentage_complete' => :'Integer',
|
71
118
|
:'deleted' => :'BOOLEAN'
|
72
119
|
}
|
73
120
|
end
|
@@ -116,6 +163,26 @@ module YNAB
|
|
116
163
|
self.balance = attributes[:'balance']
|
117
164
|
end
|
118
165
|
|
166
|
+
if attributes.has_key?(:'goal_type')
|
167
|
+
self.goal_type = attributes[:'goal_type']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'goal_creation_month')
|
171
|
+
self.goal_creation_month = attributes[:'goal_creation_month']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'goal_target')
|
175
|
+
self.goal_target = attributes[:'goal_target']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'goal_target_month')
|
179
|
+
self.goal_target_month = attributes[:'goal_target_month']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'goal_percentage_complete')
|
183
|
+
self.goal_percentage_complete = attributes[:'goal_percentage_complete']
|
184
|
+
end
|
185
|
+
|
119
186
|
if attributes.has_key?(:'deleted')
|
120
187
|
self.deleted = attributes[:'deleted']
|
121
188
|
end
|
@@ -157,6 +224,26 @@ module YNAB
|
|
157
224
|
invalid_properties.push('invalid value for "balance", balance cannot be nil.')
|
158
225
|
end
|
159
226
|
|
227
|
+
if @goal_type.nil?
|
228
|
+
invalid_properties.push('invalid value for "goal_type", goal_type cannot be nil.')
|
229
|
+
end
|
230
|
+
|
231
|
+
if @goal_creation_month.nil?
|
232
|
+
invalid_properties.push('invalid value for "goal_creation_month", goal_creation_month cannot be nil.')
|
233
|
+
end
|
234
|
+
|
235
|
+
if @goal_target.nil?
|
236
|
+
invalid_properties.push('invalid value for "goal_target", goal_target cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @goal_target_month.nil?
|
240
|
+
invalid_properties.push('invalid value for "goal_target_month", goal_target_month cannot be nil.')
|
241
|
+
end
|
242
|
+
|
243
|
+
if @goal_percentage_complete.nil?
|
244
|
+
invalid_properties.push('invalid value for "goal_percentage_complete", goal_percentage_complete cannot be nil.')
|
245
|
+
end
|
246
|
+
|
160
247
|
if @deleted.nil?
|
161
248
|
invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
|
162
249
|
end
|
@@ -175,10 +262,27 @@ module YNAB
|
|
175
262
|
return false if @budgeted.nil?
|
176
263
|
return false if @activity.nil?
|
177
264
|
return false if @balance.nil?
|
265
|
+
return false if @goal_type.nil?
|
266
|
+
goal_type_validator = EnumAttributeValidator.new('String', ['TB', 'TBD', 'MF'])
|
267
|
+
return false unless goal_type_validator.valid?(@goal_type)
|
268
|
+
return false if @goal_creation_month.nil?
|
269
|
+
return false if @goal_target.nil?
|
270
|
+
return false if @goal_target_month.nil?
|
271
|
+
return false if @goal_percentage_complete.nil?
|
178
272
|
return false if @deleted.nil?
|
179
273
|
true
|
180
274
|
end
|
181
275
|
|
276
|
+
# Custom attribute writer method checking allowed values (enum).
|
277
|
+
# @param [Object] goal_type Object to be assigned
|
278
|
+
def goal_type=(goal_type)
|
279
|
+
validator = EnumAttributeValidator.new('String', ['TB', 'TBD', 'MF'])
|
280
|
+
unless validator.valid?(goal_type)
|
281
|
+
fail ArgumentError, 'invalid value for "goal_type", must be one of #{validator.allowable_values}.'
|
282
|
+
end
|
283
|
+
@goal_type = goal_type
|
284
|
+
end
|
285
|
+
|
182
286
|
# Checks equality by comparing each attribute.
|
183
287
|
# @param [Object] Object to be compared
|
184
288
|
def ==(o)
|
@@ -193,6 +297,11 @@ module YNAB
|
|
193
297
|
budgeted == o.budgeted &&
|
194
298
|
activity == o.activity &&
|
195
299
|
balance == o.balance &&
|
300
|
+
goal_type == o.goal_type &&
|
301
|
+
goal_creation_month == o.goal_creation_month &&
|
302
|
+
goal_target == o.goal_target &&
|
303
|
+
goal_target_month == o.goal_target_month &&
|
304
|
+
goal_percentage_complete == o.goal_percentage_complete &&
|
196
305
|
deleted == o.deleted
|
197
306
|
end
|
198
307
|
|
@@ -205,7 +314,7 @@ module YNAB
|
|
205
314
|
# Calculates hash code according to all attributes.
|
206
315
|
# @return [Fixnum] Hash code
|
207
316
|
def hash
|
208
|
-
[id, category_group_id, name, hidden, original_category_group_id, note, budgeted, activity, balance, deleted].hash
|
317
|
+
[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, deleted].hash
|
209
318
|
end
|
210
319
|
|
211
320
|
# Builds the object from hash
|
data/lib/ynab/version.rb
CHANGED
data/pkg/ynab-1.1.0.gem
CHANGED
Binary file
|
data/pkg/ynab-1.2.0.gem
ADDED
Binary file
|
data/spec-v1-swagger.json
CHANGED
@@ -129,7 +129,7 @@
|
|
129
129
|
"description":
|
130
130
|
"The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.",
|
131
131
|
"required": false,
|
132
|
-
"type": "
|
132
|
+
"type": "integer"
|
133
133
|
}
|
134
134
|
],
|
135
135
|
"responses": {
|
@@ -1273,7 +1273,7 @@
|
|
1273
1273
|
"type": "string"
|
1274
1274
|
},
|
1275
1275
|
"decimal_digits": {
|
1276
|
-
"type": "
|
1276
|
+
"type": "integer"
|
1277
1277
|
},
|
1278
1278
|
"decimal_separator": {
|
1279
1279
|
"type": "string"
|
@@ -1330,7 +1330,7 @@
|
|
1330
1330
|
"$ref": "#/definitions/BudgetDetail"
|
1331
1331
|
},
|
1332
1332
|
"server_knowledge": {
|
1333
|
-
"type": "
|
1333
|
+
"type": "integer",
|
1334
1334
|
"description": "The knowledge of the server"
|
1335
1335
|
}
|
1336
1336
|
}
|
@@ -1552,19 +1552,19 @@
|
|
1552
1552
|
"type": "string"
|
1553
1553
|
},
|
1554
1554
|
"balance": {
|
1555
|
-
"type": "
|
1555
|
+
"type": "integer",
|
1556
1556
|
"format": "1234000",
|
1557
1557
|
"description":
|
1558
1558
|
"The current balance of the account in milliunits format"
|
1559
1559
|
},
|
1560
1560
|
"cleared_balance": {
|
1561
|
-
"type": "
|
1561
|
+
"type": "integer",
|
1562
1562
|
"format": "1234000",
|
1563
1563
|
"description":
|
1564
1564
|
"The current cleared balance of the account in milliunits format"
|
1565
1565
|
},
|
1566
1566
|
"uncleared_balance": {
|
1567
|
-
"type": "
|
1567
|
+
"type": "integer",
|
1568
1568
|
"format": "1234000",
|
1569
1569
|
"description":
|
1570
1570
|
"The current uncleared balance of the account in milliunits format"
|
@@ -1666,6 +1666,11 @@
|
|
1666
1666
|
"budgeted",
|
1667
1667
|
"activity",
|
1668
1668
|
"balance",
|
1669
|
+
"goal_type",
|
1670
|
+
"goal_creation_month",
|
1671
|
+
"goal_target",
|
1672
|
+
"goal_target_month",
|
1673
|
+
"goal_percentage_complete",
|
1669
1674
|
"deleted"
|
1670
1675
|
],
|
1671
1676
|
"properties": {
|
@@ -1693,17 +1698,40 @@
|
|
1693
1698
|
"type": "string"
|
1694
1699
|
},
|
1695
1700
|
"budgeted": {
|
1696
|
-
"type": "
|
1701
|
+
"type": "integer",
|
1697
1702
|
"description": "Budgeted amount in current month in milliunits format"
|
1698
1703
|
},
|
1699
1704
|
"activity": {
|
1700
|
-
"type": "
|
1705
|
+
"type": "integer",
|
1701
1706
|
"description": "Activity amount in current month in milliunits format"
|
1702
1707
|
},
|
1703
1708
|
"balance": {
|
1704
|
-
"type": "
|
1709
|
+
"type": "integer",
|
1705
1710
|
"description": "Balance in current month in milliunits format"
|
1706
1711
|
},
|
1712
|
+
"goal_type": {
|
1713
|
+
"type": "string",
|
1714
|
+
"enum": ["TB", "TBD", "MF", null],
|
1715
|
+
"description": "The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)"
|
1716
|
+
},
|
1717
|
+
"goal_creation_month": {
|
1718
|
+
"type": "string",
|
1719
|
+
"format": "date",
|
1720
|
+
"description": "The month a goal was created"
|
1721
|
+
},
|
1722
|
+
"goal_target": {
|
1723
|
+
"type": "integer",
|
1724
|
+
"description": "The goal target amount in milliunits"
|
1725
|
+
},
|
1726
|
+
"goal_target_month": {
|
1727
|
+
"type": "string",
|
1728
|
+
"format": "date",
|
1729
|
+
"description": "If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed"
|
1730
|
+
},
|
1731
|
+
"goal_percentage_complete": {
|
1732
|
+
"type": "integer",
|
1733
|
+
"description": "The percentage completion of the goal"
|
1734
|
+
},
|
1707
1735
|
"deleted": {
|
1708
1736
|
"type": "boolean",
|
1709
1737
|
"description": "Whether or not the category has been deleted. Deleted categories will only be included in delta requests."
|
@@ -1921,7 +1949,7 @@
|
|
1921
1949
|
"format": "date"
|
1922
1950
|
},
|
1923
1951
|
"amount": {
|
1924
|
-
"type": "
|
1952
|
+
"type": "integer",
|
1925
1953
|
"format": "1234000",
|
1926
1954
|
"description": "The transaction amount in milliunits format"
|
1927
1955
|
},
|
@@ -2065,7 +2093,7 @@
|
|
2065
2093
|
"format": "date"
|
2066
2094
|
},
|
2067
2095
|
"amount": {
|
2068
|
-
"type": "
|
2096
|
+
"type": "integer",
|
2069
2097
|
"format": "1234000",
|
2070
2098
|
"description": "The transaction amount in milliunits format"
|
2071
2099
|
},
|
@@ -2184,7 +2212,7 @@
|
|
2184
2212
|
"format": "uuid"
|
2185
2213
|
},
|
2186
2214
|
"amount": {
|
2187
|
-
"type": "
|
2215
|
+
"type": "integer",
|
2188
2216
|
"format": "1234000",
|
2189
2217
|
"description": "The subtransaction amount in milliunits format"
|
2190
2218
|
},
|
@@ -2302,7 +2330,7 @@
|
|
2302
2330
|
]
|
2303
2331
|
},
|
2304
2332
|
"amount": {
|
2305
|
-
"type": "
|
2333
|
+
"type": "integer",
|
2306
2334
|
"format": "1234000",
|
2307
2335
|
"description": "The scheduled transaction amount in milliunits format"
|
2308
2336
|
},
|
@@ -2395,7 +2423,7 @@
|
|
2395
2423
|
"format": "uuid"
|
2396
2424
|
},
|
2397
2425
|
"amount": {
|
2398
|
-
"type": "
|
2426
|
+
"type": "integer",
|
2399
2427
|
"format": "1234000",
|
2400
2428
|
"description":
|
2401
2429
|
"The scheduled subtransaction amount in milliunits format"
|
@@ -2474,13 +2502,13 @@
|
|
2474
2502
|
"type": "string"
|
2475
2503
|
},
|
2476
2504
|
"to_be_budgeted": {
|
2477
|
-
"type": "
|
2505
|
+
"type": "integer",
|
2478
2506
|
"format": "1234000",
|
2479
2507
|
"description":
|
2480
2508
|
"The current balance of the account in milliunits format"
|
2481
2509
|
},
|
2482
2510
|
"age_of_money": {
|
2483
|
-
"type": "
|
2511
|
+
"type": "integer"
|
2484
2512
|
}
|
2485
2513
|
}
|
2486
2514
|
},
|
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.
|
4
|
+
version: 1.2.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: 2018-07-
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -269,6 +269,7 @@ files:
|
|
269
269
|
- lib/ynab/version.rb
|
270
270
|
- pkg/ynab-1.0.0.gem
|
271
271
|
- pkg/ynab-1.1.0.gem
|
272
|
+
- pkg/ynab-1.2.0.gem
|
272
273
|
- spec-v1-swagger.json
|
273
274
|
- spec/api/accounts_spec.rb
|
274
275
|
- spec/api/budgets_spec.rb
|