ynab 1.15.0 → 1.20.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/README.md +1 -0
- data/lib/ynab.rb +13 -8
- data/lib/ynab/api/accounts_api.rb +65 -7
- data/lib/ynab/api/budgets_api.rb +10 -7
- data/lib/ynab/api/categories_api.rb +15 -15
- data/lib/ynab/api/deprecated_api.rb +3 -3
- data/lib/ynab/api/months_api.rb +7 -7
- data/lib/ynab/api/payee_locations_api.rb +7 -7
- data/lib/ynab/api/payees_api.rb +7 -7
- data/lib/ynab/api/scheduled_transactions_api.rb +7 -7
- data/lib/ynab/api/transactions_api.rb +93 -41
- data/lib/ynab/api/user_api.rb +1 -1
- data/lib/ynab/api_client.rb +3 -2
- data/lib/ynab/configuration.rb +2 -3
- data/lib/ynab/models/account.rb +4 -7
- data/lib/ynab/models/account_response.rb +4 -3
- data/lib/ynab/models/account_response_data.rb +4 -3
- data/lib/ynab/models/accounts_response.rb +4 -3
- data/lib/ynab/models/accounts_response_data.rb +4 -3
- data/lib/ynab/models/budget_detail.rb +4 -3
- data/lib/ynab/models/budget_detail_response.rb +4 -3
- data/lib/ynab/models/budget_detail_response_data.rb +4 -3
- data/lib/ynab/models/budget_settings.rb +4 -3
- data/lib/ynab/models/budget_settings_response.rb +4 -3
- data/lib/ynab/models/budget_settings_response_data.rb +4 -3
- data/lib/ynab/models/budget_summary.rb +20 -7
- data/lib/ynab/models/budget_summary_response.rb +4 -3
- data/lib/ynab/models/budget_summary_response_data.rb +4 -3
- data/lib/ynab/models/bulk_response.rb +4 -3
- data/lib/ynab/models/bulk_response_data.rb +4 -3
- data/lib/ynab/models/bulk_response_data_bulk.rb +5 -4
- data/lib/ynab/models/bulk_transactions.rb +4 -3
- data/lib/ynab/models/categories_response.rb +4 -3
- data/lib/ynab/models/categories_response_data.rb +4 -3
- data/lib/ynab/models/category.rb +6 -9
- data/lib/ynab/models/category_group.rb +4 -3
- data/lib/ynab/models/category_group_with_categories.rb +4 -3
- data/lib/ynab/models/category_response.rb +4 -3
- data/lib/ynab/models/category_response_data.rb +4 -3
- data/lib/ynab/models/currency_format.rb +4 -3
- data/lib/ynab/models/date_format.rb +4 -3
- data/lib/ynab/models/error_detail.rb +4 -3
- data/lib/ynab/models/error_response.rb +4 -3
- data/lib/ynab/models/hybrid_transaction.rb +4 -15
- data/lib/ynab/models/hybrid_transactions_response.rb +4 -3
- data/lib/ynab/models/hybrid_transactions_response_data.rb +4 -3
- data/lib/ynab/models/month_detail.rb +6 -5
- data/lib/ynab/models/month_detail_response.rb +4 -3
- data/lib/ynab/models/month_detail_response_data.rb +4 -3
- data/lib/ynab/models/month_summaries_response.rb +4 -3
- data/lib/ynab/models/month_summaries_response_data.rb +4 -3
- data/lib/ynab/models/month_summary.rb +6 -5
- data/lib/ynab/models/payee.rb +5 -4
- data/lib/ynab/models/payee_location.rb +4 -3
- data/lib/ynab/models/payee_location_response.rb +4 -3
- data/lib/ynab/models/payee_location_response_data.rb +4 -3
- data/lib/ynab/models/payee_locations_response.rb +4 -3
- data/lib/ynab/models/payee_locations_response_data.rb +4 -3
- data/lib/ynab/models/payee_response.rb +4 -3
- data/lib/ynab/models/payee_response_data.rb +4 -3
- data/lib/ynab/models/payees_response.rb +4 -3
- data/lib/ynab/models/payees_response_data.rb +4 -3
- data/lib/ynab/models/save_account.rb +250 -0
- data/lib/ynab/models/save_account_wrapper.rb +189 -0
- data/lib/ynab/models/save_category_response.rb +4 -3
- data/lib/ynab/models/save_category_response_data.rb +4 -3
- data/lib/ynab/models/save_month_category.rb +4 -3
- data/lib/ynab/models/save_month_category_wrapper.rb +4 -3
- data/lib/ynab/models/save_sub_transaction.rb +259 -0
- data/lib/ynab/models/save_transaction.rb +24 -19
- data/lib/ynab/models/save_transaction_wrapper.rb +4 -3
- data/lib/ynab/models/save_transactions_response.rb +4 -3
- data/lib/ynab/models/save_transactions_response_data.rb +5 -4
- data/lib/ynab/models/save_transactions_wrapper.rb +4 -3
- data/lib/ynab/models/scheduled_sub_transaction.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_detail.rb +4 -11
- data/lib/ynab/models/scheduled_transaction_response.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_response_data.rb +4 -3
- data/lib/ynab/models/scheduled_transaction_summary.rb +4 -11
- data/lib/ynab/models/scheduled_transactions_response.rb +4 -3
- data/lib/ynab/models/scheduled_transactions_response_data.rb +4 -3
- data/lib/ynab/models/sub_transaction.rb +33 -4
- data/lib/ynab/models/transaction_detail.rb +4 -11
- data/lib/ynab/models/transaction_response.rb +4 -3
- data/lib/ynab/models/transaction_response_data.rb +4 -3
- data/lib/ynab/models/transaction_summary.rb +4 -11
- data/lib/ynab/models/transactions_import_response.rb +189 -0
- data/lib/ynab/models/transactions_import_response_data.rb +192 -0
- data/lib/ynab/models/transactions_response.rb +4 -3
- data/lib/ynab/models/transactions_response_data.rb +4 -3
- data/lib/ynab/models/update_transaction.rb +18 -27
- data/lib/ynab/models/update_transactions_wrapper.rb +4 -3
- data/lib/ynab/models/user.rb +4 -3
- data/lib/ynab/models/user_response.rb +4 -3
- data/lib/ynab/models/user_response_data.rb +4 -3
- data/lib/ynab/version.rb +1 -1
- data/spec/api/accounts_spec.rb +19 -10
- data/spec/api/budgets_spec.rb +4 -4
- data/spec/api/categories_spec.rb +5 -5
- data/spec/api/months_spec.rb +4 -4
- data/spec/api/payee_locations_spec.rb +4 -4
- data/spec/api/payees_spec.rb +4 -4
- data/spec/api/scheduled_transactions_spec.rb +4 -4
- data/spec/api/transactions_spec.rb +23 -13
- data/spec/fixtures/vcr_cassettes/create_account.yml +51 -0
- data/spec/fixtures/vcr_cassettes/import_transactions.yml +50 -0
- data/spec/models/transaction_detail_spec.rb +11 -0
- metadata +26 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50c70c6eb4dfc2f8852ab1668c82c45b3cd4c9b843fbdd60dd7872a2dd1726e0
|
4
|
+
data.tar.gz: c942864319a05b4ed45559e48d0dd905878ab37747d17b38f6191dd9ea751cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a4be03029b69c7aaf0d4247cc925685e50821c23887a1544d8a5c3cc4ab54ed8cecca07a6140a5f179c5793d4af78b8c2e471588de483ff7cb2a087bb0f5e3
|
7
|
+
data.tar.gz: 3eeb6a9bb2dc7eb0d01380e86b999720c900ee3b227c6cd61cb7689ab6c1332b08acbed9f4a708662ec8d4fec6a3a0463533f505abbca9182d6afd072db85114
|
data/README.md
CHANGED
@@ -71,6 +71,7 @@ The following methods are available in this library.
|
|
71
71
|
| | [transactions.create_transactions(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#create_transaction) | Creates multiple transactions |
|
72
72
|
| | [transactions.update_transaction(budget_id, id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#update_transaction) | Updates a single transaction |
|
73
73
|
| | [transactions.update_transactions(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#update_transactions) | Updates multiple transactions |
|
74
|
+
| | [transactions.import_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#import_transactions) | Imports transactions |
|
74
75
|
| **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 |
|
75
76
|
| | [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 |
|
76
77
|
|
data/lib/ynab.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -22,6 +22,7 @@ require 'ynab/models/account_response'
|
|
22
22
|
require 'ynab/models/account_response_data'
|
23
23
|
require 'ynab/models/accounts_response'
|
24
24
|
require 'ynab/models/accounts_response_data'
|
25
|
+
require 'ynab/models/budget_detail'
|
25
26
|
require 'ynab/models/budget_detail_response'
|
26
27
|
require 'ynab/models/budget_detail_response_data'
|
27
28
|
require 'ynab/models/budget_settings'
|
@@ -38,14 +39,17 @@ require 'ynab/models/categories_response'
|
|
38
39
|
require 'ynab/models/categories_response_data'
|
39
40
|
require 'ynab/models/category'
|
40
41
|
require 'ynab/models/category_group'
|
42
|
+
require 'ynab/models/category_group_with_categories'
|
41
43
|
require 'ynab/models/category_response'
|
42
44
|
require 'ynab/models/category_response_data'
|
43
45
|
require 'ynab/models/currency_format'
|
44
46
|
require 'ynab/models/date_format'
|
45
47
|
require 'ynab/models/error_detail'
|
46
48
|
require 'ynab/models/error_response'
|
49
|
+
require 'ynab/models/hybrid_transaction'
|
47
50
|
require 'ynab/models/hybrid_transactions_response'
|
48
51
|
require 'ynab/models/hybrid_transactions_response_data'
|
52
|
+
require 'ynab/models/month_detail'
|
49
53
|
require 'ynab/models/month_detail_response'
|
50
54
|
require 'ynab/models/month_detail_response_data'
|
51
55
|
require 'ynab/models/month_summaries_response'
|
@@ -61,38 +65,39 @@ require 'ynab/models/payee_response'
|
|
61
65
|
require 'ynab/models/payee_response_data'
|
62
66
|
require 'ynab/models/payees_response'
|
63
67
|
require 'ynab/models/payees_response_data'
|
68
|
+
require 'ynab/models/save_account'
|
69
|
+
require 'ynab/models/save_account_wrapper'
|
64
70
|
require 'ynab/models/save_category_response'
|
65
71
|
require 'ynab/models/save_category_response_data'
|
66
72
|
require 'ynab/models/save_month_category'
|
67
73
|
require 'ynab/models/save_month_category_wrapper'
|
74
|
+
require 'ynab/models/save_sub_transaction'
|
68
75
|
require 'ynab/models/save_transaction'
|
69
76
|
require 'ynab/models/save_transaction_wrapper'
|
70
77
|
require 'ynab/models/save_transactions_response'
|
71
78
|
require 'ynab/models/save_transactions_response_data'
|
72
79
|
require 'ynab/models/save_transactions_wrapper'
|
73
80
|
require 'ynab/models/scheduled_sub_transaction'
|
81
|
+
require 'ynab/models/scheduled_transaction_detail'
|
74
82
|
require 'ynab/models/scheduled_transaction_response'
|
75
83
|
require 'ynab/models/scheduled_transaction_response_data'
|
76
84
|
require 'ynab/models/scheduled_transaction_summary'
|
77
85
|
require 'ynab/models/scheduled_transactions_response'
|
78
86
|
require 'ynab/models/scheduled_transactions_response_data'
|
79
87
|
require 'ynab/models/sub_transaction'
|
88
|
+
require 'ynab/models/transaction_detail'
|
80
89
|
require 'ynab/models/transaction_response'
|
81
90
|
require 'ynab/models/transaction_response_data'
|
82
91
|
require 'ynab/models/transaction_summary'
|
92
|
+
require 'ynab/models/transactions_import_response'
|
93
|
+
require 'ynab/models/transactions_import_response_data'
|
83
94
|
require 'ynab/models/transactions_response'
|
84
95
|
require 'ynab/models/transactions_response_data'
|
96
|
+
require 'ynab/models/update_transaction'
|
85
97
|
require 'ynab/models/update_transactions_wrapper'
|
86
98
|
require 'ynab/models/user'
|
87
99
|
require 'ynab/models/user_response'
|
88
100
|
require 'ynab/models/user_response_data'
|
89
|
-
require 'ynab/models/budget_detail'
|
90
|
-
require 'ynab/models/category_group_with_categories'
|
91
|
-
require 'ynab/models/hybrid_transaction'
|
92
|
-
require 'ynab/models/month_detail'
|
93
|
-
require 'ynab/models/scheduled_transaction_detail'
|
94
|
-
require 'ynab/models/transaction_detail'
|
95
|
-
require 'ynab/models/update_transaction'
|
96
101
|
|
97
102
|
# APIs
|
98
103
|
require 'ynab/api/accounts_api'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,9 +19,67 @@ module YNAB
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Create a new account
|
23
|
+
# Creates a new account.
|
24
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget)
|
25
|
+
# @param data The account to create.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [AccountResponse]
|
28
|
+
def create_account(budget_id, data, opts = {})
|
29
|
+
data, _status_code, _headers = create_account_with_http_info(budget_id, data, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new account
|
34
|
+
# Creates a new account.
|
35
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget)
|
36
|
+
# @param data The account to create.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(AccountResponse, Fixnum, Hash)>] AccountResponse data, response status code and response headers
|
39
|
+
def create_account_with_http_info(budget_id, data, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: AccountsApi.create_account ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'budget_id' is set
|
44
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountsApi.create_account"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'data' is set
|
48
|
+
if @api_client.config.client_side_validation && data.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling AccountsApi.create_account"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/budgets/{budget_id}/accounts'.sub('{' + 'budget_id' + '}', budget_id.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = @api_client.object_to_http_body(data)
|
67
|
+
auth_names = ['bearer']
|
68
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => 'AccountResponse')
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: AccountsApi#create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
22
80
|
# Single account
|
23
81
|
# Returns a single account
|
24
|
-
# @param budget_id The id of the budget
|
82
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
25
83
|
# @param account_id The id of the account
|
26
84
|
# @param [Hash] opts the optional parameters
|
27
85
|
# @return [AccountResponse]
|
@@ -32,7 +90,7 @@ module YNAB
|
|
32
90
|
|
33
91
|
# Single account
|
34
92
|
# Returns a single account
|
35
|
-
# @param budget_id The id of the budget
|
93
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
36
94
|
# @param account_id The id of the account
|
37
95
|
# @param [Hash] opts the optional parameters
|
38
96
|
# @return [Array<(AccountResponse, Fixnum, Hash)>] AccountResponse data, response status code and response headers
|
@@ -79,9 +137,9 @@ module YNAB
|
|
79
137
|
end
|
80
138
|
# Account list
|
81
139
|
# Returns all accounts
|
82
|
-
# @param budget_id The id of the budget
|
140
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
83
141
|
# @param [Hash] opts the optional parameters
|
84
|
-
# @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.
|
142
|
+
# @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.
|
85
143
|
# @return [AccountsResponse]
|
86
144
|
def get_accounts(budget_id, opts = {})
|
87
145
|
data, _status_code, _headers = get_accounts_with_http_info(budget_id, opts)
|
@@ -90,9 +148,9 @@ module YNAB
|
|
90
148
|
|
91
149
|
# Account list
|
92
150
|
# Returns all accounts
|
93
|
-
# @param budget_id The id of the budget
|
151
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
94
152
|
# @param [Hash] opts the optional parameters
|
95
|
-
# @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.
|
153
|
+
# @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.
|
96
154
|
# @return [Array<(AccountsResponse, Fixnum, Hash)>] AccountsResponse data, response status code and response headers
|
97
155
|
def get_accounts_with_http_info(budget_id, opts = {})
|
98
156
|
if @api_client.config.debugging
|
data/lib/ynab/api/budgets_api.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,9 +21,9 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Single budget
|
23
23
|
# Returns a single budget with all related entities. This resource is effectively a full budget export.
|
24
|
-
# @param budget_id The id of the budget
|
24
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
26
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
27
27
|
# @return [BudgetDetailResponse]
|
28
28
|
def get_budget_by_id(budget_id, opts = {})
|
29
29
|
data, _status_code, _headers = get_budget_by_id_with_http_info(budget_id, opts)
|
@@ -32,9 +32,9 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single budget
|
34
34
|
# Returns a single budget with all related entities. This resource is effectively a full budget export.
|
35
|
-
# @param budget_id The id of the budget
|
35
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
|
-
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
37
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
38
38
|
# @return [Array<(BudgetDetailResponse, Fixnum, Hash)>] BudgetDetailResponse data, response status code and response headers
|
39
39
|
def get_budget_by_id_with_http_info(budget_id, opts = {})
|
40
40
|
if @api_client.config.debugging
|
@@ -76,7 +76,7 @@ module YNAB
|
|
76
76
|
end
|
77
77
|
# Budget Settings
|
78
78
|
# Returns settings for a budget
|
79
|
-
# @param budget_id The id of the budget
|
79
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
80
80
|
# @param [Hash] opts the optional parameters
|
81
81
|
# @return [BudgetSettingsResponse]
|
82
82
|
def get_budget_settings_by_id(budget_id, opts = {})
|
@@ -86,7 +86,7 @@ module YNAB
|
|
86
86
|
|
87
87
|
# Budget Settings
|
88
88
|
# Returns settings for a budget
|
89
|
-
# @param budget_id The id of the budget
|
89
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
90
90
|
# @param [Hash] opts the optional parameters
|
91
91
|
# @return [Array<(BudgetSettingsResponse, Fixnum, Hash)>] BudgetSettingsResponse data, response status code and response headers
|
92
92
|
def get_budget_settings_by_id_with_http_info(budget_id, opts = {})
|
@@ -129,6 +129,7 @@ module YNAB
|
|
129
129
|
# List budgets
|
130
130
|
# Returns budgets list with summary information
|
131
131
|
# @param [Hash] opts the optional parameters
|
132
|
+
# @option opts [BOOLEAN] :include_accounts Whether to include the list of budget accounts
|
132
133
|
# @return [BudgetSummaryResponse]
|
133
134
|
def get_budgets(opts = {})
|
134
135
|
data, _status_code, _headers = get_budgets_with_http_info(opts)
|
@@ -138,6 +139,7 @@ module YNAB
|
|
138
139
|
# List budgets
|
139
140
|
# Returns budgets list with summary information
|
140
141
|
# @param [Hash] opts the optional parameters
|
142
|
+
# @option opts [BOOLEAN] :include_accounts Whether to include the list of budget accounts
|
141
143
|
# @return [Array<(BudgetSummaryResponse, Fixnum, Hash)>] BudgetSummaryResponse data, response status code and response headers
|
142
144
|
def get_budgets_with_http_info(opts = {})
|
143
145
|
if @api_client.config.debugging
|
@@ -148,6 +150,7 @@ module YNAB
|
|
148
150
|
|
149
151
|
# query parameters
|
150
152
|
query_params = {}
|
153
|
+
query_params[:'include_accounts'] = opts[:'include_accounts'] if !opts[:'include_accounts'].nil?
|
151
154
|
|
152
155
|
# header parameters
|
153
156
|
header_params = {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,9 +21,9 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# List categories
|
23
23
|
# Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
24
|
-
# @param budget_id The id of the budget
|
24
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
26
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
27
27
|
# @return [CategoriesResponse]
|
28
28
|
def get_categories(budget_id, opts = {})
|
29
29
|
data, _status_code, _headers = get_categories_with_http_info(budget_id, opts)
|
@@ -32,9 +32,9 @@ module YNAB
|
|
32
32
|
|
33
33
|
# List categories
|
34
34
|
# Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
35
|
-
# @param budget_id The id of the budget
|
35
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
|
-
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
37
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
38
38
|
# @return [Array<(CategoriesResponse, Fixnum, Hash)>] CategoriesResponse data, response status code and response headers
|
39
39
|
def get_categories_with_http_info(budget_id, opts = {})
|
40
40
|
if @api_client.config.debugging
|
@@ -76,7 +76,7 @@ module YNAB
|
|
76
76
|
end
|
77
77
|
# Single category
|
78
78
|
# Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
79
|
-
# @param budget_id The id of the budget
|
79
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
80
80
|
# @param category_id The id of the category
|
81
81
|
# @param [Hash] opts the optional parameters
|
82
82
|
# @return [CategoryResponse]
|
@@ -87,7 +87,7 @@ module YNAB
|
|
87
87
|
|
88
88
|
# Single category
|
89
89
|
# Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
90
|
-
# @param budget_id The id of the budget
|
90
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
91
91
|
# @param category_id The id of the category
|
92
92
|
# @param [Hash] opts the optional parameters
|
93
93
|
# @return [Array<(CategoryResponse, Fixnum, Hash)>] CategoryResponse data, response status code and response headers
|
@@ -134,7 +134,7 @@ module YNAB
|
|
134
134
|
end
|
135
135
|
# Single category for a specific budget month
|
136
136
|
# Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
137
|
-
# @param budget_id The id of the budget
|
137
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
138
138
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
139
139
|
# @param category_id The id of the category
|
140
140
|
# @param [Hash] opts the optional parameters
|
@@ -146,7 +146,7 @@ module YNAB
|
|
146
146
|
|
147
147
|
# Single category for a specific budget month
|
148
148
|
# Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
149
|
-
# @param budget_id The id of the budget
|
149
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
150
150
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
151
151
|
# @param category_id The id of the category
|
152
152
|
# @param [Hash] opts the optional parameters
|
@@ -197,11 +197,11 @@ module YNAB
|
|
197
197
|
return data, status_code, headers
|
198
198
|
end
|
199
199
|
# Update a category for a specific month
|
200
|
-
# Update a category for a specific month
|
201
|
-
# @param budget_id The id of the budget
|
200
|
+
# Update a category for a specific month. Only `budgeted` amount can be updated.
|
201
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
202
202
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
203
203
|
# @param category_id The id of the category
|
204
|
-
# @param data The category to update
|
204
|
+
# @param data The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
205
205
|
# @param [Hash] opts the optional parameters
|
206
206
|
# @return [SaveCategoryResponse]
|
207
207
|
def update_month_category(budget_id, month, category_id, data, opts = {})
|
@@ -210,11 +210,11 @@ module YNAB
|
|
210
210
|
end
|
211
211
|
|
212
212
|
# Update a category for a specific month
|
213
|
-
# Update a category for a specific month
|
214
|
-
# @param budget_id The id of the budget
|
213
|
+
# Update a category for a specific month. Only `budgeted` amount can be updated.
|
214
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
215
215
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
216
216
|
# @param category_id The id of the category
|
217
|
-
# @param data The category to update
|
217
|
+
# @param data The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.
|
218
218
|
# @param [Hash] opts the optional parameters
|
219
219
|
# @return [Array<(SaveCategoryResponse, Fixnum, Hash)>] SaveCategoryResponse data, response status code and response headers
|
220
220
|
def update_month_category_with_http_info(budget_id, month, category_id, data, opts = {})
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,7 +21,7 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Bulk create transactions
|
23
23
|
# Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
|
24
|
-
# @param budget_id The id of the budget
|
24
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
25
25
|
# @param transactions The list of transactions to create
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [BulkResponse]
|
@@ -32,7 +32,7 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Bulk create transactions
|
34
34
|
# Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
|
35
|
-
# @param budget_id The id of the budget
|
35
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
36
36
|
# @param transactions The list of transactions to create
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(BulkResponse, Fixnum, Hash)>] BulkResponse data, response status code and response headers
|
data/lib/ynab/api/months_api.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.15
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,7 +21,7 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Single budget month
|
23
23
|
# Returns a single budget month
|
24
|
-
# @param budget_id The id of the budget
|
24
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
25
25
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [MonthDetailResponse]
|
@@ -32,7 +32,7 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single budget month
|
34
34
|
# Returns a single budget month
|
35
|
-
# @param budget_id The id of the budget
|
35
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
36
36
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(MonthDetailResponse, Fixnum, Hash)>] MonthDetailResponse data, response status code and response headers
|
@@ -79,9 +79,9 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List budget months
|
81
81
|
# Returns all budget months
|
82
|
-
# @param budget_id The id of the budget
|
82
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
|
-
# @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.
|
84
|
+
# @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.
|
85
85
|
# @return [MonthSummariesResponse]
|
86
86
|
def get_budget_months(budget_id, opts = {})
|
87
87
|
data, _status_code, _headers = get_budget_months_with_http_info(budget_id, opts)
|
@@ -90,9 +90,9 @@ module YNAB
|
|
90
90
|
|
91
91
|
# List budget months
|
92
92
|
# Returns all budget months
|
93
|
-
# @param budget_id The id of the budget
|
93
|
+
# @param budget_id 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.youneedabudget.com/#oauth-default-budget).
|
94
94
|
# @param [Hash] opts the optional parameters
|
95
|
-
# @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.
|
95
|
+
# @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.
|
96
96
|
# @return [Array<(MonthSummariesResponse, Fixnum, Hash)>] MonthSummariesResponse data, response status code and response headers
|
97
97
|
def get_budget_months_with_http_info(budget_id, opts = {})
|
98
98
|
if @api_client.config.debugging
|