ynab 3.6.0 → 3.7.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/DEVELOPMENT.md +5 -3
- data/Gemfile.lock +1 -1
- data/README.md +9 -2
- data/Rakefile +1 -1
- data/docs/PutScheduledTransactionWrapper.md +8 -0
- data/docs/SaveCategory.md +1 -0
- data/docs/ScheduledSubTransaction.md +2 -0
- data/docs/ScheduledTransactionsApi.md +43 -0
- data/lib/ynab/api/scheduled_transactions_api.rb +149 -0
- data/lib/ynab/models/category.rb +1 -1
- data/lib/ynab/models/hybrid_transaction.rb +1 -1
- data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +210 -0
- data/lib/ynab/models/save_category.rb +15 -4
- data/lib/ynab/models/scheduled_sub_transaction.rb +21 -1
- data/lib/ynab/models/transaction_detail.rb +1 -1
- data/lib/ynab/models/transaction_flag_color.rb +1 -2
- data/lib/ynab/models/transaction_summary.rb +1 -1
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +1 -0
- data/open_api_spec.yaml +98 -1
- data/{config.yaml → openapi-generator-config.yaml} +2 -2
- data/templates/gemspec.mustache +1 -1
- data/ynab.gemspec +2 -2
- metadata +44 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35929f4460ec30abd1a21c5c21542835c97e8f6bded66fb3f4ed15d13ec9658a
|
4
|
+
data.tar.gz: 9046362bc5a2c09a4a3fef4dd670182f9718a44bb55b97d938eea75201983bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d26afdb2a437e4c4a795345f0aeb1d91ec30db31b2b4e89af3b3b1e80918da8480974e755772c90efd18ee4f557a86f7e69d2dfb4b86a3655cb7c37a23040193
|
7
|
+
data.tar.gz: 36ce35994f670df1ded39b9738f8451a84fc5205dbdf36486ba94e01acb61198222f682baa746e5b52a08a4e6ff78b900c030c8df80f5c39f228cda733c87877
|
data/DEVELOPMENT.md
CHANGED
@@ -3,11 +3,13 @@
|
|
3
3
|
## Setup
|
4
4
|
|
5
5
|
- Install dependencies: `bundle`
|
6
|
-
-
|
7
|
-
- Install [OpenAPI Generator](https://openapi-generator.tech/), for macOS: `brew install openapi-generator`
|
8
|
-
- Run `bundle exec rake generate`
|
6
|
+
- Install [OpenAPI Generator](https://openapi-generator.tech/) (on macOS: `brew install openapi-generator`)
|
9
7
|
- Run tests: `bundle exec rake spec` or `rspec`
|
10
8
|
|
9
|
+
## Generating
|
10
|
+
|
11
|
+
Run `bundle exec rake generate`. This will generate the API client from the latest OpenAPI spec. Once generated, you should open a PR and merge the changes.
|
12
|
+
|
11
13
|
## Publishing
|
12
14
|
|
13
15
|
Run the "Publish" GitHub Actions workflow
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# YNAB API Ruby Library
|
2
2
|
|
3
|
-
[](https://rubygems.org/gems/ynab)
|
3
|
+
[](https://github.com/ynab/ynab-sdk-ruby/actions/workflows/build-test.yml) [](https://badge.fury.io/rb/ynab)
|
5
4
|
|
6
5
|
This is the Ruby client for the YNAB API.
|
7
6
|
|
@@ -57,6 +56,8 @@ The following methods are available in this library.
|
|
57
56
|
| **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. |
|
58
57
|
| | [categories.get_category_by_id(budget_id, category_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#get_category_by_id) | Returns a single category |
|
59
58
|
| | [categories.get_month_category_by_id(budget_id, month, category_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/MonthsApi.md#get_month_category_by_id) | Returns a single category for a specific budget month
|
59
|
+
| | [categories.update_category(budget_id, category_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#update_category) | Update an existing category
|
60
|
+
| | [categories.update_month_category(budget_id, month, category_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#update_month_category) | Update an existing month category
|
60
61
|
| **Payees** | [payees.get_payees(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeesApi.md#get_payees) | Returns all payees |
|
61
62
|
| | [payees.get_payee_by_id(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeesApi.md#get_payee_by_id) | Returns single payee |
|
62
63
|
| **Payee Locations** | [payee_locations.get_payee_locations(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_locations) | Returns all payee locations |
|
@@ -79,6 +80,12 @@ The following methods are available in this library.
|
|
79
80
|
| **Scheduled Transactions** | [scheduled_transactions.get_scheduled_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | Returns all scheduled transactions |
|
80
81
|
| | [scheduled_transactions.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Returns a single scheduled transaction |
|
81
82
|
| | [scheduled_transactions.create_scheduled_transaction(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#create_scheduled_transaction) | Creates a single scheduled transaction |
|
83
|
+
| | [scheduled_transactions.update_scheduled_transaction(budget_id, scheduled_transaction_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#update_scheduled_transaction) | Updates a single scheduled transaction |
|
84
|
+
| | [scheduled_transactions.delete_scheduled_transaction(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#delete_scheduled_transaction) | Deletes a single scheduled transaction |
|
85
|
+
|
86
|
+
## Versioning
|
87
|
+
|
88
|
+
The version of this client is defined in the `ynab.gemspec` file and follows [semantic versioning](https://semver.org/). The version of this client is maintained independently and does not align with the the version of YNAB API itself (which is defined in the [OpenAPI spec](https://api.ynab.com/papi/open_api_spec.yaml)). To determine which spec version of the YNAB API was used when generating this client you can refer to the "description" in the field in the `ynab.gemspec` file.
|
82
89
|
|
83
90
|
## License
|
84
91
|
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ task :generate do
|
|
20
20
|
# Remove existing generated files to ensure old files are not included in the gem
|
21
21
|
sh "rm -r docs/ lib/ynab/models/"
|
22
22
|
# Generate the client
|
23
|
-
sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c config.yaml -o ./"
|
23
|
+
sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c openapi-generator-config.yaml -o ./"
|
24
24
|
end
|
25
25
|
|
26
26
|
task :get_current_version do
|
data/docs/SaveCategory.md
CHANGED
@@ -7,4 +7,5 @@
|
|
7
7
|
| **name** | **String** | | [optional] |
|
8
8
|
| **note** | **String** | | [optional] |
|
9
9
|
| **category_group_id** | **String** | | [optional] |
|
10
|
+
| **goal_target** | **Integer** | The goal target amount in milliunits format. This amount can only be changed if the category already has a configured goal (goal_type != null). | [optional] |
|
10
11
|
|
@@ -9,7 +9,9 @@
|
|
9
9
|
| **amount** | **Integer** | The scheduled subtransaction amount in milliunits format | |
|
10
10
|
| **memo** | **String** | | [optional] |
|
11
11
|
| **payee_id** | **String** | | [optional] |
|
12
|
+
| **payee_name** | **String** | | [optional] |
|
12
13
|
| **category_id** | **String** | | [optional] |
|
14
|
+
| **category_name** | **String** | | [optional] |
|
13
15
|
| **transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to | [optional] |
|
14
16
|
| **deleted** | **Boolean** | Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. | |
|
15
17
|
|
@@ -5,8 +5,10 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**create_scheduled_transaction**](ScheduledTransactionsApi.md#create_scheduled_transaction) | **POST** /budgets/{budget_id}/scheduled_transactions | Create a single scheduled transaction |
|
8
|
+
| [**delete_scheduled_transaction**](ScheduledTransactionsApi.md#delete_scheduled_transaction) | **DELETE** /budgets/{budget_id}/scheduled_transactions | Deletes an existing scheduled transaction |
|
8
9
|
| [**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction |
|
9
10
|
| [**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions |
|
11
|
+
| [**update_scheduled_transaction**](ScheduledTransactionsApi.md#update_scheduled_transaction) | **PUT** /budgets/{budget_id}/scheduled_transactions | Updates an existing scheduled transaction |
|
10
12
|
|
11
13
|
|
12
14
|
## create_scheduled_transaction
|
@@ -29,6 +31,26 @@ Creates a single scheduled transaction (a transaction with a future date).
|
|
29
31
|
[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md)
|
30
32
|
|
31
33
|
|
34
|
+
## delete_scheduled_transaction
|
35
|
+
|
36
|
+
> <ScheduledTransactionResponse> delete_scheduled_transaction(budget_id, scheduled_transaction_id)
|
37
|
+
|
38
|
+
Deletes an existing scheduled transaction
|
39
|
+
|
40
|
+
Deletes a scheduled transaction
|
41
|
+
|
42
|
+
### Parameters
|
43
|
+
|
44
|
+
| Name | Type | Description | Notes |
|
45
|
+
| ---- | ---- | ----------- | ----- |
|
46
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
47
|
+
| **scheduled_transaction_id** | **String** | The id of the scheduled transaction | |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md)
|
52
|
+
|
53
|
+
|
32
54
|
## get_scheduled_transaction_by_id
|
33
55
|
|
34
56
|
> <ScheduledTransactionResponse> get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)
|
@@ -68,3 +90,24 @@ Returns all scheduled transactions
|
|
68
90
|
|
69
91
|
[**ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md)
|
70
92
|
|
93
|
+
|
94
|
+
## update_scheduled_transaction
|
95
|
+
|
96
|
+
> <ScheduledTransactionResponse> update_scheduled_transaction(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper)
|
97
|
+
|
98
|
+
Updates an existing scheduled transaction
|
99
|
+
|
100
|
+
Updates a single scheduled transaction
|
101
|
+
|
102
|
+
### Parameters
|
103
|
+
|
104
|
+
| Name | Type | Description | Notes |
|
105
|
+
| ---- | ---- | ----------- | ----- |
|
106
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
107
|
+
| **scheduled_transaction_id** | **String** | The id of the scheduled transaction | |
|
108
|
+
| **put_scheduled_transaction_wrapper** | [**PutScheduledTransactionWrapper**](PutScheduledTransactionWrapper.md) | The scheduled transaction to update | |
|
109
|
+
|
110
|
+
### Return type
|
111
|
+
|
112
|
+
[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md)
|
113
|
+
|
@@ -90,6 +90,75 @@ module YNAB
|
|
90
90
|
return data, status_code, headers
|
91
91
|
end
|
92
92
|
|
93
|
+
# Deletes an existing scheduled transaction
|
94
|
+
# Deletes a scheduled transaction
|
95
|
+
# @param budget_id [String] The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
|
96
|
+
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [ScheduledTransactionResponse]
|
99
|
+
def delete_scheduled_transaction(budget_id, scheduled_transaction_id, opts = {})
|
100
|
+
data, _status_code, _headers = delete_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Deletes an existing scheduled transaction
|
105
|
+
# Deletes a scheduled transaction
|
106
|
+
# @param budget_id [String] The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
|
107
|
+
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
110
|
+
def delete_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.delete_scheduled_transaction ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'budget_id' is set
|
115
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.delete_scheduled_transaction"
|
117
|
+
end
|
118
|
+
# verify the required parameter 'scheduled_transaction_id' is set
|
119
|
+
if @api_client.config.client_side_validation && scheduled_transaction_id.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'scheduled_transaction_id' when calling ScheduledTransactionsApi.delete_scheduled_transaction"
|
121
|
+
end
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/budgets/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = opts[:query_params] || {}
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = opts[:header_params] || {}
|
130
|
+
# HTTP header 'Accept' (if needed)
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
132
|
+
|
133
|
+
# form parameters
|
134
|
+
form_params = opts[:form_params] || {}
|
135
|
+
|
136
|
+
# http body (model)
|
137
|
+
post_body = opts[:debug_body]
|
138
|
+
|
139
|
+
# return_type
|
140
|
+
return_type = opts[:debug_return_type] || 'ScheduledTransactionResponse'
|
141
|
+
|
142
|
+
# auth_names
|
143
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
144
|
+
|
145
|
+
new_options = opts.merge(
|
146
|
+
:operation => :"ScheduledTransactionsApi.delete_scheduled_transaction",
|
147
|
+
:header_params => header_params,
|
148
|
+
:query_params => query_params,
|
149
|
+
:form_params => form_params,
|
150
|
+
:body => post_body,
|
151
|
+
:auth_names => auth_names,
|
152
|
+
:return_type => return_type
|
153
|
+
)
|
154
|
+
|
155
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
156
|
+
if @api_client.config.debugging
|
157
|
+
@api_client.config.logger.debug "API called: ScheduledTransactionsApi#delete_scheduled_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
158
|
+
end
|
159
|
+
return data, status_code, headers
|
160
|
+
end
|
161
|
+
|
93
162
|
# Single scheduled transaction
|
94
163
|
# Returns a single scheduled transaction
|
95
164
|
# @param budget_id [String] The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
|
@@ -224,5 +293,85 @@ module YNAB
|
|
224
293
|
end
|
225
294
|
return data, status_code, headers
|
226
295
|
end
|
296
|
+
|
297
|
+
# Updates an existing scheduled transaction
|
298
|
+
# Updates a single scheduled transaction
|
299
|
+
# @param budget_id [String] The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
|
300
|
+
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
301
|
+
# @param put_scheduled_transaction_wrapper [PutScheduledTransactionWrapper] The scheduled transaction to update
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @return [ScheduledTransactionResponse]
|
304
|
+
def update_scheduled_transaction(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
|
305
|
+
data, _status_code, _headers = update_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts)
|
306
|
+
data
|
307
|
+
end
|
308
|
+
|
309
|
+
# Updates an existing scheduled transaction
|
310
|
+
# Updates a single scheduled transaction
|
311
|
+
# @param budget_id [String] The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
|
312
|
+
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
313
|
+
# @param put_scheduled_transaction_wrapper [PutScheduledTransactionWrapper] The scheduled transaction to update
|
314
|
+
# @param [Hash] opts the optional parameters
|
315
|
+
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
316
|
+
def update_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.update_scheduled_transaction ...'
|
319
|
+
end
|
320
|
+
# verify the required parameter 'budget_id' is set
|
321
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.update_scheduled_transaction"
|
323
|
+
end
|
324
|
+
# verify the required parameter 'scheduled_transaction_id' is set
|
325
|
+
if @api_client.config.client_side_validation && scheduled_transaction_id.nil?
|
326
|
+
fail ArgumentError, "Missing the required parameter 'scheduled_transaction_id' when calling ScheduledTransactionsApi.update_scheduled_transaction"
|
327
|
+
end
|
328
|
+
# verify the required parameter 'put_scheduled_transaction_wrapper' is set
|
329
|
+
if @api_client.config.client_side_validation && put_scheduled_transaction_wrapper.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'put_scheduled_transaction_wrapper' when calling ScheduledTransactionsApi.update_scheduled_transaction"
|
331
|
+
end
|
332
|
+
# resource path
|
333
|
+
local_var_path = '/budgets/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
|
334
|
+
|
335
|
+
# query parameters
|
336
|
+
query_params = opts[:query_params] || {}
|
337
|
+
|
338
|
+
# header parameters
|
339
|
+
header_params = opts[:header_params] || {}
|
340
|
+
# HTTP header 'Accept' (if needed)
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
342
|
+
# HTTP header 'Content-Type'
|
343
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
344
|
+
if !content_type.nil?
|
345
|
+
header_params['Content-Type'] = content_type
|
346
|
+
end
|
347
|
+
|
348
|
+
# form parameters
|
349
|
+
form_params = opts[:form_params] || {}
|
350
|
+
|
351
|
+
# http body (model)
|
352
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(put_scheduled_transaction_wrapper)
|
353
|
+
|
354
|
+
# return_type
|
355
|
+
return_type = opts[:debug_return_type] || 'ScheduledTransactionResponse'
|
356
|
+
|
357
|
+
# auth_names
|
358
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
359
|
+
|
360
|
+
new_options = opts.merge(
|
361
|
+
:operation => :"ScheduledTransactionsApi.update_scheduled_transaction",
|
362
|
+
:header_params => header_params,
|
363
|
+
:query_params => query_params,
|
364
|
+
:form_params => form_params,
|
365
|
+
:body => post_body,
|
366
|
+
:auth_names => auth_names,
|
367
|
+
:return_type => return_type
|
368
|
+
)
|
369
|
+
|
370
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
371
|
+
if @api_client.config.debugging
|
372
|
+
@api_client.config.logger.debug "API called: ScheduledTransactionsApi#update_scheduled_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
373
|
+
end
|
374
|
+
return data, status_code, headers
|
375
|
+
end
|
227
376
|
end
|
228
377
|
end
|
data/lib/ynab/models/category.rb
CHANGED
@@ -316,7 +316,7 @@ module YNAB
|
|
316
316
|
return false if @budgeted.nil?
|
317
317
|
return false if @activity.nil?
|
318
318
|
return false if @balance.nil?
|
319
|
-
goal_type_validator = EnumAttributeValidator.new('String', ["TB", "TBD", "MF", "NEED", "DEBT"
|
319
|
+
goal_type_validator = EnumAttributeValidator.new('String', ["TB", "TBD", "MF", "NEED", "DEBT"])
|
320
320
|
return false unless goal_type_validator.valid?(@goal_type)
|
321
321
|
return false if @deleted.nil?
|
322
322
|
true
|
@@ -317,7 +317,7 @@ module YNAB
|
|
317
317
|
return false if @cleared.nil?
|
318
318
|
return false if @approved.nil?
|
319
319
|
return false if @account_id.nil?
|
320
|
-
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"
|
320
|
+
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"])
|
321
321
|
return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
|
322
322
|
return false if @deleted.nil?
|
323
323
|
return false if @type.nil?
|
@@ -0,0 +1,210 @@
|
|
1
|
+
=begin
|
2
|
+
#YNAB API Endpoints
|
3
|
+
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
|
+
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
require 'time'
|
12
|
+
|
13
|
+
module YNAB
|
14
|
+
class PutScheduledTransactionWrapper
|
15
|
+
attr_accessor :scheduled_transaction
|
16
|
+
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:'scheduled_transaction' => :'scheduled_transaction'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns all the JSON keys this model knows about
|
25
|
+
def self.acceptable_attributes
|
26
|
+
attribute_map.values
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'scheduled_transaction' => :'SaveScheduledTransaction'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# List of attributes with nullable: true
|
37
|
+
def self.openapi_nullable
|
38
|
+
Set.new([
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `YNAB::PutScheduledTransactionWrapper` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::PutScheduledTransactionWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'scheduled_transaction')
|
58
|
+
self.scheduled_transaction = attributes[:'scheduled_transaction']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
return false if @scheduled_transaction.nil?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def ==(o)
|
79
|
+
return true if self.equal?(o)
|
80
|
+
self.class == o.class &&
|
81
|
+
scheduled_transaction == o.scheduled_transaction
|
82
|
+
end
|
83
|
+
|
84
|
+
# @see the `==` method
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def eql?(o)
|
87
|
+
self == o
|
88
|
+
end
|
89
|
+
|
90
|
+
# Calculates hash code according to all attributes.
|
91
|
+
# @return [Integer] Hash code
|
92
|
+
def hash
|
93
|
+
[scheduled_transaction].hash
|
94
|
+
end
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def self.build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
attributes = attributes.transform_keys(&:to_sym)
|
102
|
+
transformed_hash = {}
|
103
|
+
openapi_types.each_pair do |key, type|
|
104
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
105
|
+
transformed_hash["#{key}"] = nil
|
106
|
+
elsif type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
110
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
111
|
+
end
|
112
|
+
elsif !attributes[attribute_map[key]].nil?
|
113
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
114
|
+
end
|
115
|
+
end
|
116
|
+
new(transformed_hash)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Deserializes the data based on type
|
120
|
+
# @param string type Data type
|
121
|
+
# @param string value Value to be deserialized
|
122
|
+
# @return [Object] Deserialized data
|
123
|
+
def self._deserialize(type, value)
|
124
|
+
case type.to_sym
|
125
|
+
when :Time
|
126
|
+
Time.parse(value)
|
127
|
+
when :Date
|
128
|
+
Date.parse(value)
|
129
|
+
when :String
|
130
|
+
value.to_s
|
131
|
+
when :Integer
|
132
|
+
value.to_i
|
133
|
+
when :Float
|
134
|
+
value.to_f
|
135
|
+
when :Boolean
|
136
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
137
|
+
true
|
138
|
+
else
|
139
|
+
false
|
140
|
+
end
|
141
|
+
when :Object
|
142
|
+
# generic object (usually a Hash), return directly
|
143
|
+
value
|
144
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
145
|
+
inner_type = Regexp.last_match[:inner_type]
|
146
|
+
value.map { |v| _deserialize(inner_type, v) }
|
147
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
148
|
+
k_type = Regexp.last_match[:k_type]
|
149
|
+
v_type = Regexp.last_match[:v_type]
|
150
|
+
{}.tap do |hash|
|
151
|
+
value.each do |k, v|
|
152
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
else # model
|
156
|
+
# models (e.g. Pet) or oneOf
|
157
|
+
klass = YNAB.const_get(type)
|
158
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
if value.nil?
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
183
|
+
end
|
184
|
+
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map { |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
@@ -18,12 +18,16 @@ module YNAB
|
|
18
18
|
|
19
19
|
attr_accessor :category_group_id
|
20
20
|
|
21
|
+
# The goal target amount in milliunits format. This amount can only be changed if the category already has a configured goal (goal_type != null).
|
22
|
+
attr_accessor :goal_target
|
23
|
+
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
25
|
def self.attribute_map
|
23
26
|
{
|
24
27
|
:'name' => :'name',
|
25
28
|
:'note' => :'note',
|
26
|
-
:'category_group_id' => :'category_group_id'
|
29
|
+
:'category_group_id' => :'category_group_id',
|
30
|
+
:'goal_target' => :'goal_target'
|
27
31
|
}
|
28
32
|
end
|
29
33
|
|
@@ -37,7 +41,8 @@ module YNAB
|
|
37
41
|
{
|
38
42
|
:'name' => :'String',
|
39
43
|
:'note' => :'String',
|
40
|
-
:'category_group_id' => :'String'
|
44
|
+
:'category_group_id' => :'String',
|
45
|
+
:'goal_target' => :'Integer'
|
41
46
|
}
|
42
47
|
end
|
43
48
|
|
@@ -46,6 +51,7 @@ module YNAB
|
|
46
51
|
Set.new([
|
47
52
|
:'name',
|
48
53
|
:'note',
|
54
|
+
:'goal_target'
|
49
55
|
])
|
50
56
|
end
|
51
57
|
|
@@ -75,6 +81,10 @@ module YNAB
|
|
75
81
|
if attributes.key?(:'category_group_id')
|
76
82
|
self.category_group_id = attributes[:'category_group_id']
|
77
83
|
end
|
84
|
+
|
85
|
+
if attributes.key?(:'goal_target')
|
86
|
+
self.goal_target = attributes[:'goal_target']
|
87
|
+
end
|
78
88
|
end
|
79
89
|
|
80
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -97,7 +107,8 @@ module YNAB
|
|
97
107
|
self.class == o.class &&
|
98
108
|
name == o.name &&
|
99
109
|
note == o.note &&
|
100
|
-
category_group_id == o.category_group_id
|
110
|
+
category_group_id == o.category_group_id &&
|
111
|
+
goal_target == o.goal_target
|
101
112
|
end
|
102
113
|
|
103
114
|
# @see the `==` method
|
@@ -109,7 +120,7 @@ module YNAB
|
|
109
120
|
# Calculates hash code according to all attributes.
|
110
121
|
# @return [Integer] Hash code
|
111
122
|
def hash
|
112
|
-
[name, note, category_group_id].hash
|
123
|
+
[name, note, category_group_id, goal_target].hash
|
113
124
|
end
|
114
125
|
|
115
126
|
# Builds the object from hash
|
@@ -23,8 +23,12 @@ module YNAB
|
|
23
23
|
|
24
24
|
attr_accessor :payee_id
|
25
25
|
|
26
|
+
attr_accessor :payee_name
|
27
|
+
|
26
28
|
attr_accessor :category_id
|
27
29
|
|
30
|
+
attr_accessor :category_name
|
31
|
+
|
28
32
|
# If a transfer, the account_id which the scheduled subtransaction transfers to
|
29
33
|
attr_accessor :transfer_account_id
|
30
34
|
|
@@ -39,7 +43,9 @@ module YNAB
|
|
39
43
|
:'amount' => :'amount',
|
40
44
|
:'memo' => :'memo',
|
41
45
|
:'payee_id' => :'payee_id',
|
46
|
+
:'payee_name' => :'payee_name',
|
42
47
|
:'category_id' => :'category_id',
|
48
|
+
:'category_name' => :'category_name',
|
43
49
|
:'transfer_account_id' => :'transfer_account_id',
|
44
50
|
:'deleted' => :'deleted'
|
45
51
|
}
|
@@ -58,7 +64,9 @@ module YNAB
|
|
58
64
|
:'amount' => :'Integer',
|
59
65
|
:'memo' => :'String',
|
60
66
|
:'payee_id' => :'String',
|
67
|
+
:'payee_name' => :'String',
|
61
68
|
:'category_id' => :'String',
|
69
|
+
:'category_name' => :'String',
|
62
70
|
:'transfer_account_id' => :'String',
|
63
71
|
:'deleted' => :'Boolean'
|
64
72
|
}
|
@@ -69,7 +77,9 @@ module YNAB
|
|
69
77
|
Set.new([
|
70
78
|
:'memo',
|
71
79
|
:'payee_id',
|
80
|
+
:'payee_name',
|
72
81
|
:'category_id',
|
82
|
+
:'category_name',
|
73
83
|
:'transfer_account_id',
|
74
84
|
])
|
75
85
|
end
|
@@ -109,10 +119,18 @@ module YNAB
|
|
109
119
|
self.payee_id = attributes[:'payee_id']
|
110
120
|
end
|
111
121
|
|
122
|
+
if attributes.key?(:'payee_name')
|
123
|
+
self.payee_name = attributes[:'payee_name']
|
124
|
+
end
|
125
|
+
|
112
126
|
if attributes.key?(:'category_id')
|
113
127
|
self.category_id = attributes[:'category_id']
|
114
128
|
end
|
115
129
|
|
130
|
+
if attributes.key?(:'category_name')
|
131
|
+
self.category_name = attributes[:'category_name']
|
132
|
+
end
|
133
|
+
|
116
134
|
if attributes.key?(:'transfer_account_id')
|
117
135
|
self.transfer_account_id = attributes[:'transfer_account_id']
|
118
136
|
end
|
@@ -149,7 +167,9 @@ module YNAB
|
|
149
167
|
amount == o.amount &&
|
150
168
|
memo == o.memo &&
|
151
169
|
payee_id == o.payee_id &&
|
170
|
+
payee_name == o.payee_name &&
|
152
171
|
category_id == o.category_id &&
|
172
|
+
category_name == o.category_name &&
|
153
173
|
transfer_account_id == o.transfer_account_id &&
|
154
174
|
deleted == o.deleted
|
155
175
|
end
|
@@ -163,7 +183,7 @@ module YNAB
|
|
163
183
|
# Calculates hash code according to all attributes.
|
164
184
|
# @return [Integer] Hash code
|
165
185
|
def hash
|
166
|
-
[id, scheduled_transaction_id, amount, memo, payee_id, category_id, transfer_account_id, deleted].hash
|
186
|
+
[id, scheduled_transaction_id, amount, memo, payee_id, payee_name, category_id, category_name, transfer_account_id, deleted].hash
|
167
187
|
end
|
168
188
|
|
169
189
|
# Builds the object from hash
|
@@ -310,7 +310,7 @@ module YNAB
|
|
310
310
|
return false if @cleared.nil?
|
311
311
|
return false if @approved.nil?
|
312
312
|
return false if @account_id.nil?
|
313
|
-
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"
|
313
|
+
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"])
|
314
314
|
return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
|
315
315
|
return false if @deleted.nil?
|
316
316
|
return false if @account_name.nil?
|
@@ -18,10 +18,9 @@ module YNAB
|
|
18
18
|
GREEN = "green".freeze
|
19
19
|
BLUE = "blue".freeze
|
20
20
|
PURPLE = "purple".freeze
|
21
|
-
NULL = "null".freeze
|
22
21
|
|
23
22
|
def self.all_vars
|
24
|
-
@all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE
|
23
|
+
@all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE].freeze
|
25
24
|
end
|
26
25
|
|
27
26
|
# Builds the enum from string
|
@@ -265,7 +265,7 @@ module YNAB
|
|
265
265
|
return false if @cleared.nil?
|
266
266
|
return false if @approved.nil?
|
267
267
|
return false if @account_id.nil?
|
268
|
-
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"
|
268
|
+
debt_transaction_type_validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balanceAdjustment", "credit", "charge"])
|
269
269
|
return false unless debt_transaction_type_validator.valid?(@debt_transaction_type)
|
270
270
|
return false if @deleted.nil?
|
271
271
|
true
|
data/lib/ynab/version.rb
CHANGED
data/lib/ynab.rb
CHANGED
@@ -72,6 +72,7 @@ require 'ynab/models/payees_response_data'
|
|
72
72
|
require 'ynab/models/post_account_wrapper'
|
73
73
|
require 'ynab/models/post_scheduled_transaction_wrapper'
|
74
74
|
require 'ynab/models/post_transactions_wrapper'
|
75
|
+
require 'ynab/models/put_scheduled_transaction_wrapper'
|
75
76
|
require 'ynab/models/put_transaction_wrapper'
|
76
77
|
require 'ynab/models/save_account'
|
77
78
|
require 'ynab/models/save_category'
|
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.74.0
|
10
10
|
servers:
|
11
11
|
- url: https://api.ynab.com/v1
|
12
12
|
security:
|
@@ -1580,6 +1580,85 @@ paths:
|
|
1580
1580
|
schema:
|
1581
1581
|
$ref: "#/components/schemas/ErrorResponse"
|
1582
1582
|
x-codegen-request-body-name: data
|
1583
|
+
put:
|
1584
|
+
tags:
|
1585
|
+
- Scheduled Transactions
|
1586
|
+
summary: Updates an existing scheduled transaction
|
1587
|
+
description: Updates a single scheduled transaction
|
1588
|
+
operationId: updateScheduledTransaction
|
1589
|
+
parameters:
|
1590
|
+
- name: budget_id
|
1591
|
+
in: path
|
1592
|
+
description: >-
|
1593
|
+
The id of the budget. "last-used" can be used to specify the last
|
1594
|
+
used budget and "default" can be used if default budget selection is
|
1595
|
+
enabled (see: https://api.ynab.com/#oauth-default-budget).
|
1596
|
+
required: true
|
1597
|
+
schema:
|
1598
|
+
type: string
|
1599
|
+
- name: scheduled_transaction_id
|
1600
|
+
in: path
|
1601
|
+
description: The id of the scheduled transaction
|
1602
|
+
required: true
|
1603
|
+
schema:
|
1604
|
+
type: string
|
1605
|
+
requestBody:
|
1606
|
+
description: The scheduled transaction to update
|
1607
|
+
content:
|
1608
|
+
"application/json":
|
1609
|
+
schema:
|
1610
|
+
$ref: "#/components/schemas/PutScheduledTransactionWrapper"
|
1611
|
+
required: true
|
1612
|
+
responses:
|
1613
|
+
"200":
|
1614
|
+
description: The scheduled transaction was successfully updated
|
1615
|
+
content:
|
1616
|
+
application/json:
|
1617
|
+
schema:
|
1618
|
+
$ref: "#/components/schemas/ScheduledTransactionResponse"
|
1619
|
+
"400":
|
1620
|
+
description: >-
|
1621
|
+
The request could not be understood due to malformed syntax or
|
1622
|
+
validation error(s)
|
1623
|
+
content:
|
1624
|
+
application/json:
|
1625
|
+
schema:
|
1626
|
+
$ref: "#/components/schemas/ErrorResponse"
|
1627
|
+
delete:
|
1628
|
+
tags:
|
1629
|
+
- Scheduled Transactions
|
1630
|
+
summary: Deletes an existing scheduled transaction
|
1631
|
+
description: Deletes a scheduled transaction
|
1632
|
+
operationId: deleteScheduledTransaction
|
1633
|
+
parameters:
|
1634
|
+
- name: budget_id
|
1635
|
+
in: path
|
1636
|
+
description: >-
|
1637
|
+
The id of the budget. "last-used" can be used to specify the last
|
1638
|
+
used budget and "default" can be used if default budget selection is
|
1639
|
+
enabled (see: https://api.ynab.com/#oauth-default-budget).
|
1640
|
+
required: true
|
1641
|
+
schema:
|
1642
|
+
type: string
|
1643
|
+
- name: scheduled_transaction_id
|
1644
|
+
in: path
|
1645
|
+
description: The id of the scheduled transaction
|
1646
|
+
required: true
|
1647
|
+
schema:
|
1648
|
+
type: string
|
1649
|
+
responses:
|
1650
|
+
"200":
|
1651
|
+
description: The scheduled transaction was successfully deleted
|
1652
|
+
content:
|
1653
|
+
application/json:
|
1654
|
+
schema:
|
1655
|
+
$ref: "#/components/schemas/ScheduledTransactionResponse"
|
1656
|
+
"404":
|
1657
|
+
description: The scheduled transaction was not found
|
1658
|
+
content:
|
1659
|
+
application/json:
|
1660
|
+
schema:
|
1661
|
+
$ref: "#/components/schemas/ErrorResponse"
|
1583
1662
|
/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}:
|
1584
1663
|
get:
|
1585
1664
|
tags:
|
@@ -2836,6 +2915,11 @@ components:
|
|
2836
2915
|
category_group_id:
|
2837
2916
|
type: string
|
2838
2917
|
format: uuid
|
2918
|
+
goal_target:
|
2919
|
+
type: integer
|
2920
|
+
description: The goal target amount in milliunits format. This amount can only be changed if the category already has a configured goal (goal_type != null).
|
2921
|
+
format: int64
|
2922
|
+
nullable: true
|
2839
2923
|
PatchMonthCategoryWrapper:
|
2840
2924
|
required:
|
2841
2925
|
- category
|
@@ -2986,6 +3070,13 @@ components:
|
|
2986
3070
|
properties:
|
2987
3071
|
scheduled_transaction:
|
2988
3072
|
$ref: "#/components/schemas/ScheduledTransactionDetail"
|
3073
|
+
PutScheduledTransactionWrapper:
|
3074
|
+
required:
|
3075
|
+
- scheduled_transaction
|
3076
|
+
type: object
|
3077
|
+
properties:
|
3078
|
+
scheduled_transaction:
|
3079
|
+
$ref: "#/components/schemas/SaveScheduledTransaction"
|
2989
3080
|
PostScheduledTransactionWrapper:
|
2990
3081
|
required:
|
2991
3082
|
- scheduled_transaction
|
@@ -3165,10 +3256,16 @@ components:
|
|
3165
3256
|
type: string
|
3166
3257
|
nullable: true
|
3167
3258
|
format: uuid
|
3259
|
+
payee_name:
|
3260
|
+
type: string
|
3261
|
+
nullable: true
|
3168
3262
|
category_id:
|
3169
3263
|
type: string
|
3170
3264
|
nullable: true
|
3171
3265
|
format: uuid
|
3266
|
+
category_name:
|
3267
|
+
type: string
|
3268
|
+
nullable: true
|
3172
3269
|
transfer_account_id:
|
3173
3270
|
type: string
|
3174
3271
|
nullable: true
|
@@ -1,7 +1,7 @@
|
|
1
1
|
gemName: ynab
|
2
2
|
moduleName: YNAB
|
3
|
-
gemSummary:
|
4
|
-
gemDescription: Ruby
|
3
|
+
gemSummary: Official Ruby client for the YNAB API
|
4
|
+
gemDescription: Official Ruby client for the YNAB API. API documentation available at https://api.ynab.com.
|
5
5
|
gemHomepage: https://github.com/ynab/ynab-sdk-ruby
|
6
6
|
gemLicense: Apache-2.0
|
7
7
|
gemAuthor: YNAB
|
data/templates/gemspec.mustache
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.email = ["{{gemAuthorEmail}}{{^gemAuthorEmail}}{{infoEmail}}{{/gemAuthorEmail}}"]
|
16
16
|
s.homepage = "{{gemHomepage}}{{^gemHomepage}}https://openapi-generator.tech{{/gemHomepage}}"
|
17
17
|
s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}"
|
18
|
-
s.description = "{{gemDescription}}{{^gemDescription}}{{
|
18
|
+
s.description = "{{gemDescription}}{{^gemDescription}}{{/gemDescription}} Generated from server specification version {{version}}."
|
19
19
|
s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}"
|
20
20
|
s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}"
|
21
21
|
s.metadata = {{{gemMetadata}}}{{^gemMetadata}}{}{{/gemMetadata}}
|
data/ynab.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.authors = ["YNAB"]
|
20
20
|
s.email = ["api@ynab.com"]
|
21
21
|
s.homepage = "https://github.com/ynab/ynab-sdk-ruby"
|
22
|
-
s.summary = "
|
23
|
-
s.description = "Ruby
|
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.74.0."
|
24
24
|
s.license = "Apache-2.0"
|
25
25
|
s.required_ruby_version = ">= 3.3"
|
26
26
|
s.metadata = {}
|
metadata
CHANGED
@@ -1,14 +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.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YNAB
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: typhoeus
|
@@ -50,9 +49,8 @@ dependencies:
|
|
50
49
|
- - ">="
|
51
50
|
- !ruby/object:Gem::Version
|
52
51
|
version: 3.6.0
|
53
|
-
description: Ruby
|
54
|
-
Generated from server specification version 1.
|
55
|
-
7.7.0.
|
52
|
+
description: Official Ruby client for the YNAB API. API documentation available at
|
53
|
+
https://api.ynab.com. Generated from server specification version 1.74.0.
|
56
54
|
email:
|
57
55
|
- api@ynab.com
|
58
56
|
executables: []
|
@@ -65,7 +63,6 @@ files:
|
|
65
63
|
- LICENSE.md
|
66
64
|
- README.md
|
67
65
|
- Rakefile
|
68
|
-
- config.yaml
|
69
66
|
- docs/Account.md
|
70
67
|
- docs/AccountResponse.md
|
71
68
|
- docs/AccountResponseData.md
|
@@ -130,6 +127,7 @@ files:
|
|
130
127
|
- docs/PostAccountWrapper.md
|
131
128
|
- docs/PostScheduledTransactionWrapper.md
|
132
129
|
- docs/PostTransactionsWrapper.md
|
130
|
+
- docs/PutScheduledTransactionWrapper.md
|
133
131
|
- docs/PutTransactionWrapper.md
|
134
132
|
- docs/SaveAccount.md
|
135
133
|
- docs/SaveCategory.md
|
@@ -249,6 +247,7 @@ files:
|
|
249
247
|
- lib/ynab/models/post_account_wrapper.rb
|
250
248
|
- lib/ynab/models/post_scheduled_transaction_wrapper.rb
|
251
249
|
- lib/ynab/models/post_transactions_wrapper.rb
|
250
|
+
- lib/ynab/models/put_scheduled_transaction_wrapper.rb
|
252
251
|
- lib/ynab/models/put_transaction_wrapper.rb
|
253
252
|
- lib/ynab/models/save_account.rb
|
254
253
|
- lib/ynab/models/save_category.rb
|
@@ -289,6 +288,7 @@ files:
|
|
289
288
|
- lib/ynab/overrides/transactions_api.rb
|
290
289
|
- lib/ynab/version.rb
|
291
290
|
- open_api_spec.yaml
|
291
|
+
- openapi-generator-config.yaml
|
292
292
|
- spec/api/accounts_spec.rb
|
293
293
|
- spec/api/budgets_spec.rb
|
294
294
|
- spec/api/categories_spec.rb
|
@@ -353,7 +353,6 @@ homepage: https://github.com/ynab/ynab-sdk-ruby
|
|
353
353
|
licenses:
|
354
354
|
- Apache-2.0
|
355
355
|
metadata: {}
|
356
|
-
post_install_message:
|
357
356
|
rdoc_options: []
|
358
357
|
require_paths:
|
359
358
|
- lib
|
@@ -368,56 +367,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
368
367
|
- !ruby/object:Gem::Version
|
369
368
|
version: '0'
|
370
369
|
requirements: []
|
371
|
-
rubygems_version: 3.5
|
372
|
-
signing_key:
|
370
|
+
rubygems_version: 3.6.5
|
373
371
|
specification_version: 4
|
374
|
-
summary:
|
372
|
+
summary: Official Ruby client for the YNAB API
|
375
373
|
test_files:
|
374
|
+
- spec/api/budgets_spec.rb
|
376
375
|
- spec/api/payees_spec.rb
|
376
|
+
- spec/api/accounts_spec.rb
|
377
|
+
- spec/api/months_spec.rb
|
377
378
|
- spec/api/payee_locations_spec.rb
|
378
|
-
- spec/api/transactions_spec.rb
|
379
379
|
- spec/api/scheduled_transactions_spec.rb
|
380
|
-
- spec/api/
|
380
|
+
- spec/api/transactions_spec.rb
|
381
381
|
- spec/api/categories_spec.rb
|
382
|
-
- spec/api/accounts_spec.rb
|
383
|
-
- spec/api/budgets_spec.rb
|
384
382
|
- spec/api_error_spec.rb
|
385
|
-
- spec/fixtures/vcr_cassettes/
|
386
|
-
- spec/fixtures/vcr_cassettes/
|
387
|
-
- spec/fixtures/vcr_cassettes/
|
388
|
-
- spec/fixtures/vcr_cassettes/
|
389
|
-
- spec/fixtures/vcr_cassettes/
|
390
|
-
- spec/fixtures/vcr_cassettes/
|
391
|
-
- spec/fixtures/vcr_cassettes/bulk_transactions.yml
|
392
|
-
- spec/fixtures/vcr_cassettes/month.yml
|
383
|
+
- spec/fixtures/vcr_cassettes/category.yml
|
384
|
+
- spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
|
385
|
+
- spec/fixtures/vcr_cassettes/accounts_unauthorized.yml
|
386
|
+
- spec/fixtures/vcr_cassettes/accounts.yml
|
387
|
+
- spec/fixtures/vcr_cassettes/create_account.yml
|
388
|
+
- spec/fixtures/vcr_cassettes/transactions.yml
|
393
389
|
- spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
|
394
|
-
- spec/fixtures/vcr_cassettes/
|
390
|
+
- spec/fixtures/vcr_cassettes/import_transactions.yml
|
395
391
|
- spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml
|
396
|
-
- spec/fixtures/vcr_cassettes/month_transactions.yml
|
397
|
-
- spec/fixtures/vcr_cassettes/update_transaction.yml
|
398
|
-
- spec/fixtures/vcr_cassettes/transaction.yml
|
399
392
|
- spec/fixtures/vcr_cassettes/category_transactions.yml
|
400
|
-
- spec/fixtures/vcr_cassettes/
|
401
|
-
- spec/fixtures/vcr_cassettes/
|
402
|
-
- spec/fixtures/vcr_cassettes/
|
403
|
-
- spec/fixtures/vcr_cassettes/
|
404
|
-
- spec/fixtures/vcr_cassettes/
|
405
|
-
- spec/fixtures/vcr_cassettes/transactions_invalid_flags.yml
|
406
|
-
- spec/fixtures/vcr_cassettes/payee_transactions.yml
|
407
|
-
- spec/fixtures/vcr_cassettes/accounts.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
|
397
|
+
- spec/fixtures/vcr_cassettes/budgets.yml
|
408
398
|
- spec/fixtures/vcr_cassettes/categories_unauthorized.yml
|
409
|
-
- spec/fixtures/vcr_cassettes/
|
410
|
-
- spec/fixtures/vcr_cassettes/
|
399
|
+
- spec/fixtures/vcr_cassettes/month.yml
|
400
|
+
- spec/fixtures/vcr_cassettes/payee.yml
|
401
|
+
- spec/fixtures/vcr_cassettes/categories.yml
|
411
402
|
- spec/fixtures/vcr_cassettes/months.yml
|
412
|
-
- spec/fixtures/vcr_cassettes/payee_locations.yml
|
413
|
-
- spec/fixtures/vcr_cassettes/budgets.yml
|
414
403
|
- spec/fixtures/vcr_cassettes/account.yml
|
415
|
-
- spec/fixtures/vcr_cassettes/
|
416
|
-
- spec/fixtures/vcr_cassettes/
|
417
|
-
- spec/fixtures/vcr_cassettes/
|
418
|
-
- spec/fixtures/vcr_cassettes/
|
419
|
-
- spec/fixtures/vcr_cassettes/
|
420
|
-
- spec/fixtures/vcr_cassettes/
|
404
|
+
- spec/fixtures/vcr_cassettes/budgets_unauthorized.yml
|
405
|
+
- spec/fixtures/vcr_cassettes/update_transactions.yml
|
406
|
+
- spec/fixtures/vcr_cassettes/payees.yml
|
407
|
+
- spec/fixtures/vcr_cassettes/scheduled_transactions.yml
|
408
|
+
- spec/fixtures/vcr_cassettes/patch_month_category.yml
|
409
|
+
- spec/fixtures/vcr_cassettes/update_transaction.yml
|
410
|
+
- spec/fixtures/vcr_cassettes/payee_locations.yml
|
421
411
|
- spec/fixtures/vcr_cassettes/create_transaction.yml
|
422
|
-
- spec/fixtures/vcr_cassettes/
|
412
|
+
- spec/fixtures/vcr_cassettes/months_unauthorized.yml
|
413
|
+
- spec/fixtures/vcr_cassettes/payee_transactions.yml
|
414
|
+
- spec/fixtures/vcr_cassettes/payee_location.yml
|
415
|
+
- spec/fixtures/vcr_cassettes/multiple_transactions.yml
|
416
|
+
- spec/fixtures/vcr_cassettes/transactions_invalid_flags.yml
|
417
|
+
- spec/fixtures/vcr_cassettes/transaction.yml
|
418
|
+
- spec/fixtures/vcr_cassettes/month_transactions.yml
|
419
|
+
- spec/fixtures/vcr_cassettes/budget.yml
|
420
|
+
- spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml
|
423
421
|
- spec/spec_helper.rb
|