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
data/docs/TransactionsApi.md
CHANGED
|
@@ -7,11 +7,11 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
|
7
7
|
| [**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /plans/{plan_id}/transactions | Create a single transaction or multiple transactions |
|
|
8
8
|
| [**delete_transaction**](TransactionsApi.md#delete_transaction) | **DELETE** /plans/{plan_id}/transactions/{transaction_id} | Delete a transaction |
|
|
9
9
|
| [**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **GET** /plans/{plan_id}/transactions/{transaction_id} | Get a transaction |
|
|
10
|
-
| [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /plans/{plan_id}/transactions | Get
|
|
11
|
-
| [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /plans/{plan_id}/accounts/{account_id}/transactions | Get
|
|
12
|
-
| [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /plans/{plan_id}/categories/{category_id}/transactions | Get
|
|
13
|
-
| [**get_transactions_by_month**](TransactionsApi.md#get_transactions_by_month) | **GET** /plans/{plan_id}/months/{month}/transactions | Get
|
|
14
|
-
| [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **GET** /plans/{plan_id}/payees/{payee_id}/transactions | Get
|
|
10
|
+
| [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /plans/{plan_id}/transactions | Get transactions |
|
|
11
|
+
| [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /plans/{plan_id}/accounts/{account_id}/transactions | Get account transactions |
|
|
12
|
+
| [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /plans/{plan_id}/categories/{category_id}/transactions | Get category transactions |
|
|
13
|
+
| [**get_transactions_by_month**](TransactionsApi.md#get_transactions_by_month) | **GET** /plans/{plan_id}/months/{month}/transactions | Get plan month transactions |
|
|
14
|
+
| [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **GET** /plans/{plan_id}/payees/{payee_id}/transactions | Get payee transactions |
|
|
15
15
|
| [**import_transactions**](TransactionsApi.md#import_transactions) | **POST** /plans/{plan_id}/transactions/import | Import transactions |
|
|
16
16
|
| [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /plans/{plan_id}/transactions/{transaction_id} | Update a transaction |
|
|
17
17
|
| [**update_transactions**](TransactionsApi.md#update_transactions) | **PATCH** /plans/{plan_id}/transactions | Update multiple transactions |
|
|
@@ -81,7 +81,7 @@ Returns a single transaction
|
|
|
81
81
|
|
|
82
82
|
> <TransactionsResponse> get_transactions(plan_id, opts)
|
|
83
83
|
|
|
84
|
-
Get
|
|
84
|
+
Get transactions
|
|
85
85
|
|
|
86
86
|
Returns plan transactions, excluding any pending transactions
|
|
87
87
|
|
|
@@ -90,7 +90,8 @@ Returns plan transactions, excluding any pending transactions
|
|
|
90
90
|
| Name | Type | Description | Notes |
|
|
91
91
|
| ---- | ---- | ----------- | ----- |
|
|
92
92
|
| **plan_id** | **String** | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
|
|
93
|
-
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
93
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified. | [optional] |
|
|
94
|
+
| **until_date** | **Date** | If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
94
95
|
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
|
95
96
|
| **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] |
|
|
96
97
|
|
|
@@ -103,7 +104,7 @@ Returns plan transactions, excluding any pending transactions
|
|
|
103
104
|
|
|
104
105
|
> <TransactionsResponse> get_transactions_by_account(plan_id, account_id, opts)
|
|
105
106
|
|
|
106
|
-
Get
|
|
107
|
+
Get account transactions
|
|
107
108
|
|
|
108
109
|
Returns all transactions for a specified account, excluding any pending transactions
|
|
109
110
|
|
|
@@ -113,7 +114,8 @@ Returns all transactions for a specified account, excluding any pending transact
|
|
|
113
114
|
| ---- | ---- | ----------- | ----- |
|
|
114
115
|
| **plan_id** | **String** | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
|
|
115
116
|
| **account_id** | **String** | The id of the account | |
|
|
116
|
-
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
117
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified. | [optional] |
|
|
118
|
+
| **until_date** | **Date** | If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
117
119
|
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
|
118
120
|
| **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] |
|
|
119
121
|
|
|
@@ -126,7 +128,7 @@ Returns all transactions for a specified account, excluding any pending transact
|
|
|
126
128
|
|
|
127
129
|
> <HybridTransactionsResponse> get_transactions_by_category(plan_id, category_id, opts)
|
|
128
130
|
|
|
129
|
-
Get
|
|
131
|
+
Get category transactions
|
|
130
132
|
|
|
131
133
|
Returns all transactions for a specified category, excluding any pending transactions
|
|
132
134
|
|
|
@@ -136,7 +138,8 @@ Returns all transactions for a specified category, excluding any pending transac
|
|
|
136
138
|
| ---- | ---- | ----------- | ----- |
|
|
137
139
|
| **plan_id** | **String** | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
|
|
138
140
|
| **category_id** | **String** | The id of the category | |
|
|
139
|
-
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
141
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified. | [optional] |
|
|
142
|
+
| **until_date** | **Date** | If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
140
143
|
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
|
141
144
|
| **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] |
|
|
142
145
|
|
|
@@ -149,7 +152,7 @@ Returns all transactions for a specified category, excluding any pending transac
|
|
|
149
152
|
|
|
150
153
|
> <TransactionsResponse> get_transactions_by_month(plan_id, month, opts)
|
|
151
154
|
|
|
152
|
-
Get
|
|
155
|
+
Get plan month transactions
|
|
153
156
|
|
|
154
157
|
Returns all transactions for a specified month, excluding any pending transactions
|
|
155
158
|
|
|
@@ -160,6 +163,7 @@ Returns all transactions for a specified month, excluding any pending transactio
|
|
|
160
163
|
| **plan_id** | **String** | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
|
|
161
164
|
| **month** | **String** | The plan month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | |
|
|
162
165
|
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
166
|
+
| **until_date** | **Date** | If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
163
167
|
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
|
164
168
|
| **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] |
|
|
165
169
|
|
|
@@ -172,7 +176,7 @@ Returns all transactions for a specified month, excluding any pending transactio
|
|
|
172
176
|
|
|
173
177
|
> <HybridTransactionsResponse> get_transactions_by_payee(plan_id, payee_id, opts)
|
|
174
178
|
|
|
175
|
-
Get
|
|
179
|
+
Get payee transactions
|
|
176
180
|
|
|
177
181
|
Returns all transactions for a specified payee, excluding any pending transactions
|
|
178
182
|
|
|
@@ -182,7 +186,8 @@ Returns all transactions for a specified payee, excluding any pending transactio
|
|
|
182
186
|
| ---- | ---- | ----------- | ----- |
|
|
183
187
|
| **plan_id** | **String** | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
|
|
184
188
|
| **payee_id** | **String** | The id of the payee | |
|
|
185
|
-
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
189
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified. | [optional] |
|
|
190
|
+
| **until_date** | **Date** | If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
|
186
191
|
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
|
187
192
|
| **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] |
|
|
188
193
|
|
data/lib/ynab/api/payees_api.rb
CHANGED
|
@@ -15,6 +15,80 @@ module YNAB
|
|
|
15
15
|
def initialize(api_client = ApiClient.default)
|
|
16
16
|
@api_client = api_client
|
|
17
17
|
end
|
|
18
|
+
# Create a payee
|
|
19
|
+
# Creates a new payee
|
|
20
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
21
|
+
# @param data [PostPayeeWrapper] The payee to create
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @return [SavePayeeResponse]
|
|
24
|
+
def create_payee(plan_id, data, opts = {})
|
|
25
|
+
data, _status_code, _headers = create_payee_with_http_info(plan_id, data, opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Create a payee
|
|
30
|
+
# Creates a new payee
|
|
31
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
32
|
+
# @param data [PostPayeeWrapper] The payee to create
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(SavePayeeResponse, Integer, Hash)>] SavePayeeResponse data, response status code and response headers
|
|
35
|
+
def create_payee_with_http_info(plan_id, data, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: PayeesApi.create_payee ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'plan_id' is set
|
|
40
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling PayeesApi.create_payee"
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'data' is set
|
|
44
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling PayeesApi.create_payee"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/plans/{plan_id}/payees'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
57
|
+
# HTTP header 'Content-Type'
|
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
59
|
+
if !content_type.nil?
|
|
60
|
+
header_params['Content-Type'] = content_type
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'SavePayeeResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :"PayeesApi.create_payee",
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: PayeesApi#create_payee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
return data, status_code, headers
|
|
90
|
+
end
|
|
91
|
+
|
|
18
92
|
# Get a payee
|
|
19
93
|
# Returns a single payee
|
|
20
94
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
@@ -227,11 +227,12 @@ module YNAB
|
|
|
227
227
|
return data, status_code, headers
|
|
228
228
|
end
|
|
229
229
|
|
|
230
|
-
# Get
|
|
230
|
+
# Get transactions
|
|
231
231
|
# Returns plan transactions, excluding any pending transactions
|
|
232
232
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
233
233
|
# @param [Hash] opts the optional parameters
|
|
234
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
234
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
235
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
235
236
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
236
237
|
# @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.
|
|
237
238
|
# @return [TransactionsResponse]
|
|
@@ -240,11 +241,12 @@ module YNAB
|
|
|
240
241
|
data
|
|
241
242
|
end
|
|
242
243
|
|
|
243
|
-
# Get
|
|
244
|
+
# Get transactions
|
|
244
245
|
# Returns plan transactions, excluding any pending transactions
|
|
245
246
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
246
247
|
# @param [Hash] opts the optional parameters
|
|
247
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
248
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
249
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
248
250
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
249
251
|
# @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.
|
|
250
252
|
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
@@ -262,6 +264,7 @@ module YNAB
|
|
|
262
264
|
# query parameters
|
|
263
265
|
query_params = opts[:query_params] || {}
|
|
264
266
|
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
|
267
|
+
query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil?
|
|
265
268
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
266
269
|
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
|
267
270
|
|
|
@@ -299,12 +302,13 @@ module YNAB
|
|
|
299
302
|
return data, status_code, headers
|
|
300
303
|
end
|
|
301
304
|
|
|
302
|
-
# Get
|
|
305
|
+
# Get account transactions
|
|
303
306
|
# Returns all transactions for a specified account, excluding any pending transactions
|
|
304
307
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
305
308
|
# @param account_id [String] The id of the account
|
|
306
309
|
# @param [Hash] opts the optional parameters
|
|
307
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
310
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
311
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
308
312
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
309
313
|
# @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.
|
|
310
314
|
# @return [TransactionsResponse]
|
|
@@ -313,12 +317,13 @@ module YNAB
|
|
|
313
317
|
data
|
|
314
318
|
end
|
|
315
319
|
|
|
316
|
-
# Get
|
|
320
|
+
# Get account transactions
|
|
317
321
|
# Returns all transactions for a specified account, excluding any pending transactions
|
|
318
322
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
319
323
|
# @param account_id [String] The id of the account
|
|
320
324
|
# @param [Hash] opts the optional parameters
|
|
321
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
325
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
326
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
322
327
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
323
328
|
# @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.
|
|
324
329
|
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
@@ -340,6 +345,7 @@ module YNAB
|
|
|
340
345
|
# query parameters
|
|
341
346
|
query_params = opts[:query_params] || {}
|
|
342
347
|
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
|
348
|
+
query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil?
|
|
343
349
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
344
350
|
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
|
345
351
|
|
|
@@ -377,12 +383,13 @@ module YNAB
|
|
|
377
383
|
return data, status_code, headers
|
|
378
384
|
end
|
|
379
385
|
|
|
380
|
-
# Get
|
|
386
|
+
# Get category transactions
|
|
381
387
|
# Returns all transactions for a specified category, excluding any pending transactions
|
|
382
388
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
383
389
|
# @param category_id [String] The id of the category
|
|
384
390
|
# @param [Hash] opts the optional parameters
|
|
385
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
391
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
392
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
386
393
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
387
394
|
# @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.
|
|
388
395
|
# @return [HybridTransactionsResponse]
|
|
@@ -391,12 +398,13 @@ module YNAB
|
|
|
391
398
|
data
|
|
392
399
|
end
|
|
393
400
|
|
|
394
|
-
# Get
|
|
401
|
+
# Get category transactions
|
|
395
402
|
# Returns all transactions for a specified category, excluding any pending transactions
|
|
396
403
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
397
404
|
# @param category_id [String] The id of the category
|
|
398
405
|
# @param [Hash] opts the optional parameters
|
|
399
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
406
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
407
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
400
408
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
401
409
|
# @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.
|
|
402
410
|
# @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
|
@@ -418,6 +426,7 @@ module YNAB
|
|
|
418
426
|
# query parameters
|
|
419
427
|
query_params = opts[:query_params] || {}
|
|
420
428
|
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
|
429
|
+
query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil?
|
|
421
430
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
422
431
|
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
|
423
432
|
|
|
@@ -455,12 +464,13 @@ module YNAB
|
|
|
455
464
|
return data, status_code, headers
|
|
456
465
|
end
|
|
457
466
|
|
|
458
|
-
# Get
|
|
467
|
+
# Get plan month transactions
|
|
459
468
|
# Returns all transactions for a specified month, excluding any pending transactions
|
|
460
469
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
461
470
|
# @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
462
471
|
# @param [Hash] opts the optional parameters
|
|
463
472
|
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
473
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
464
474
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
465
475
|
# @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.
|
|
466
476
|
# @return [TransactionsResponse]
|
|
@@ -469,12 +479,13 @@ module YNAB
|
|
|
469
479
|
data
|
|
470
480
|
end
|
|
471
481
|
|
|
472
|
-
# Get
|
|
482
|
+
# Get plan month transactions
|
|
473
483
|
# Returns all transactions for a specified month, excluding any pending transactions
|
|
474
484
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
475
485
|
# @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
476
486
|
# @param [Hash] opts the optional parameters
|
|
477
487
|
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
488
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
478
489
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
479
490
|
# @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.
|
|
480
491
|
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
@@ -496,6 +507,7 @@ module YNAB
|
|
|
496
507
|
# query parameters
|
|
497
508
|
query_params = opts[:query_params] || {}
|
|
498
509
|
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
|
510
|
+
query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil?
|
|
499
511
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
500
512
|
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
|
501
513
|
|
|
@@ -533,12 +545,13 @@ module YNAB
|
|
|
533
545
|
return data, status_code, headers
|
|
534
546
|
end
|
|
535
547
|
|
|
536
|
-
# Get
|
|
548
|
+
# Get payee transactions
|
|
537
549
|
# Returns all transactions for a specified payee, excluding any pending transactions
|
|
538
550
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
539
551
|
# @param payee_id [String] The id of the payee
|
|
540
552
|
# @param [Hash] opts the optional parameters
|
|
541
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
553
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
554
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
542
555
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
543
556
|
# @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.
|
|
544
557
|
# @return [HybridTransactionsResponse]
|
|
@@ -547,12 +560,13 @@ module YNAB
|
|
|
547
560
|
data
|
|
548
561
|
end
|
|
549
562
|
|
|
550
|
-
# Get
|
|
563
|
+
# Get payee transactions
|
|
551
564
|
# Returns all transactions for a specified payee, excluding any pending transactions
|
|
552
565
|
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
553
566
|
# @param payee_id [String] The id of the payee
|
|
554
567
|
# @param [Hash] opts the optional parameters
|
|
555
|
-
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
568
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
|
|
569
|
+
# @option opts [Date] :until_date If specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
|
556
570
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
557
571
|
# @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.
|
|
558
572
|
# @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
|
@@ -574,6 +588,7 @@ module YNAB
|
|
|
574
588
|
# query parameters
|
|
575
589
|
query_params = opts[:query_params] || {}
|
|
576
590
|
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
|
591
|
+
query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil?
|
|
577
592
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
578
593
|
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
|
579
594
|
|
data/lib/ynab/models/account.rb
CHANGED
|
@@ -59,6 +59,24 @@ module YNAB
|
|
|
59
59
|
# Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
|
60
60
|
attr_accessor :deleted
|
|
61
61
|
|
|
62
|
+
# The current available balance of the account formatted in the plan's currency format
|
|
63
|
+
attr_accessor :balance_formatted
|
|
64
|
+
|
|
65
|
+
# The current available balance of the account as a decimal currency amount
|
|
66
|
+
attr_accessor :balance_currency
|
|
67
|
+
|
|
68
|
+
# The current cleared balance of the account formatted in the plan's currency format
|
|
69
|
+
attr_accessor :cleared_balance_formatted
|
|
70
|
+
|
|
71
|
+
# The current cleared balance of the account as a decimal currency amount
|
|
72
|
+
attr_accessor :cleared_balance_currency
|
|
73
|
+
|
|
74
|
+
# The current uncleared balance of the account formatted in the plan's currency format
|
|
75
|
+
attr_accessor :uncleared_balance_formatted
|
|
76
|
+
|
|
77
|
+
# The current uncleared balance of the account as a decimal currency amount
|
|
78
|
+
attr_accessor :uncleared_balance_currency
|
|
79
|
+
|
|
62
80
|
class EnumAttributeValidator
|
|
63
81
|
attr_reader :datatype
|
|
64
82
|
attr_reader :allowable_values
|
|
@@ -101,7 +119,13 @@ module YNAB
|
|
|
101
119
|
:'debt_interest_rates' => :'debt_interest_rates',
|
|
102
120
|
:'debt_minimum_payments' => :'debt_minimum_payments',
|
|
103
121
|
:'debt_escrow_amounts' => :'debt_escrow_amounts',
|
|
104
|
-
:'deleted' => :'deleted'
|
|
122
|
+
:'deleted' => :'deleted',
|
|
123
|
+
:'balance_formatted' => :'balance_formatted',
|
|
124
|
+
:'balance_currency' => :'balance_currency',
|
|
125
|
+
:'cleared_balance_formatted' => :'cleared_balance_formatted',
|
|
126
|
+
:'cleared_balance_currency' => :'cleared_balance_currency',
|
|
127
|
+
:'uncleared_balance_formatted' => :'uncleared_balance_formatted',
|
|
128
|
+
:'uncleared_balance_currency' => :'uncleared_balance_currency'
|
|
105
129
|
}
|
|
106
130
|
end
|
|
107
131
|
|
|
@@ -130,20 +154,29 @@ module YNAB
|
|
|
130
154
|
:'debt_interest_rates' => :'Hash<String, Integer>',
|
|
131
155
|
:'debt_minimum_payments' => :'Hash<String, Integer>',
|
|
132
156
|
:'debt_escrow_amounts' => :'Hash<String, Integer>',
|
|
133
|
-
:'deleted' => :'Boolean'
|
|
157
|
+
:'deleted' => :'Boolean',
|
|
158
|
+
:'balance_formatted' => :'String',
|
|
159
|
+
:'balance_currency' => :'Float',
|
|
160
|
+
:'cleared_balance_formatted' => :'String',
|
|
161
|
+
:'cleared_balance_currency' => :'Float',
|
|
162
|
+
:'uncleared_balance_formatted' => :'String',
|
|
163
|
+
:'uncleared_balance_currency' => :'Float'
|
|
134
164
|
}
|
|
135
165
|
end
|
|
136
166
|
|
|
137
167
|
# List of attributes with nullable: true
|
|
138
168
|
def self.openapi_nullable
|
|
139
169
|
Set.new([
|
|
140
|
-
:'note',
|
|
141
|
-
:'transfer_payee_id',
|
|
142
|
-
:'last_reconciled_at',
|
|
143
|
-
:'debt_original_balance',
|
|
144
170
|
])
|
|
145
171
|
end
|
|
146
172
|
|
|
173
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
174
|
+
def self.openapi_all_of
|
|
175
|
+
[
|
|
176
|
+
:'AccountBase'
|
|
177
|
+
]
|
|
178
|
+
end
|
|
179
|
+
|
|
147
180
|
# Initializes the object
|
|
148
181
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
149
182
|
def initialize(attributes = {})
|
|
@@ -236,6 +269,30 @@ module YNAB
|
|
|
236
269
|
if attributes.key?(:'deleted')
|
|
237
270
|
self.deleted = attributes[:'deleted']
|
|
238
271
|
end
|
|
272
|
+
|
|
273
|
+
if attributes.key?(:'balance_formatted')
|
|
274
|
+
self.balance_formatted = attributes[:'balance_formatted']
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
if attributes.key?(:'balance_currency')
|
|
278
|
+
self.balance_currency = attributes[:'balance_currency']
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if attributes.key?(:'cleared_balance_formatted')
|
|
282
|
+
self.cleared_balance_formatted = attributes[:'cleared_balance_formatted']
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if attributes.key?(:'cleared_balance_currency')
|
|
286
|
+
self.cleared_balance_currency = attributes[:'cleared_balance_currency']
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
if attributes.key?(:'uncleared_balance_formatted')
|
|
290
|
+
self.uncleared_balance_formatted = attributes[:'uncleared_balance_formatted']
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if attributes.key?(:'uncleared_balance_currency')
|
|
294
|
+
self.uncleared_balance_currency = attributes[:'uncleared_balance_currency']
|
|
295
|
+
end
|
|
239
296
|
end
|
|
240
297
|
|
|
241
298
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -256,6 +313,7 @@ module YNAB
|
|
|
256
313
|
return false if @balance.nil?
|
|
257
314
|
return false if @cleared_balance.nil?
|
|
258
315
|
return false if @uncleared_balance.nil?
|
|
316
|
+
return false if @transfer_payee_id.nil?
|
|
259
317
|
return false if @deleted.nil?
|
|
260
318
|
true
|
|
261
319
|
end
|
|
@@ -282,7 +340,13 @@ module YNAB
|
|
|
282
340
|
debt_interest_rates == o.debt_interest_rates &&
|
|
283
341
|
debt_minimum_payments == o.debt_minimum_payments &&
|
|
284
342
|
debt_escrow_amounts == o.debt_escrow_amounts &&
|
|
285
|
-
deleted == o.deleted
|
|
343
|
+
deleted == o.deleted &&
|
|
344
|
+
balance_formatted == o.balance_formatted &&
|
|
345
|
+
balance_currency == o.balance_currency &&
|
|
346
|
+
cleared_balance_formatted == o.cleared_balance_formatted &&
|
|
347
|
+
cleared_balance_currency == o.cleared_balance_currency &&
|
|
348
|
+
uncleared_balance_formatted == o.uncleared_balance_formatted &&
|
|
349
|
+
uncleared_balance_currency == o.uncleared_balance_currency
|
|
286
350
|
end
|
|
287
351
|
|
|
288
352
|
# @see the `==` method
|
|
@@ -294,7 +358,7 @@ module YNAB
|
|
|
294
358
|
# Calculates hash code according to all attributes.
|
|
295
359
|
# @return [Integer] Hash code
|
|
296
360
|
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
|
|
361
|
+
[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, balance_formatted, balance_currency, cleared_balance_formatted, cleared_balance_currency, uncleared_balance_formatted, uncleared_balance_currency].hash
|
|
298
362
|
end
|
|
299
363
|
|
|
300
364
|
# Builds the object from hash
|