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
@@ -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 payee location
|
23
23
|
# Returns a single payee location
|
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 payee_location_id id of payee location
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [PayeeLocationResponse]
|
@@ -32,7 +32,7 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single payee location
|
34
34
|
# Returns a single payee location
|
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 payee_location_id id of payee location
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(PayeeLocationResponse, Fixnum, Hash)>] PayeeLocationResponse data, response status code and response headers
|
@@ -79,7 +79,7 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List payee locations
|
81
81
|
# Returns all payee locations
|
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
84
|
# @return [PayeeLocationsResponse]
|
85
85
|
def get_payee_locations(budget_id, opts = {})
|
@@ -89,7 +89,7 @@ module YNAB
|
|
89
89
|
|
90
90
|
# List payee locations
|
91
91
|
# Returns all payee locations
|
92
|
-
# @param budget_id The id of the budget
|
92
|
+
# @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).
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [Array<(PayeeLocationsResponse, Fixnum, Hash)>] PayeeLocationsResponse data, response status code and response headers
|
95
95
|
def get_payee_locations_with_http_info(budget_id, opts = {})
|
@@ -131,7 +131,7 @@ module YNAB
|
|
131
131
|
end
|
132
132
|
# List locations for a payee
|
133
133
|
# Returns all payee locations for the specified payee
|
134
|
-
# @param budget_id The id of the budget
|
134
|
+
# @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).
|
135
135
|
# @param payee_id id of payee
|
136
136
|
# @param [Hash] opts the optional parameters
|
137
137
|
# @return [PayeeLocationsResponse]
|
@@ -142,7 +142,7 @@ module YNAB
|
|
142
142
|
|
143
143
|
# List locations for a payee
|
144
144
|
# Returns all payee locations for the specified payee
|
145
|
-
# @param budget_id The id of the budget
|
145
|
+
# @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).
|
146
146
|
# @param payee_id id of payee
|
147
147
|
# @param [Hash] opts the optional parameters
|
148
148
|
# @return [Array<(PayeeLocationsResponse, Fixnum, Hash)>] PayeeLocationsResponse data, response status code and response headers
|
data/lib/ynab/api/payees_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 payee
|
23
23
|
# Returns single payee
|
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 payee_id The id of the payee
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [PayeeResponse]
|
@@ -32,7 +32,7 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single payee
|
34
34
|
# Returns single payee
|
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 payee_id The id of the payee
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(PayeeResponse, Fixnum, Hash)>] PayeeResponse data, response status code and response headers
|
@@ -79,9 +79,9 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List payees
|
81
81
|
# Returns all payees
|
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 [PayeesResponse]
|
86
86
|
def get_payees(budget_id, opts = {})
|
87
87
|
data, _status_code, _headers = get_payees_with_http_info(budget_id, opts)
|
@@ -90,9 +90,9 @@ module YNAB
|
|
90
90
|
|
91
91
|
# List payees
|
92
92
|
# Returns all payees
|
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<(PayeesResponse, Fixnum, Hash)>] PayeesResponse data, response status code and response headers
|
97
97
|
def get_payees_with_http_info(budget_id, opts = {})
|
98
98
|
if @api_client.config.debugging
|
@@ -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 scheduled transaction
|
23
23
|
# Returns a single scheduled transaction
|
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 scheduled_transaction_id The id of the scheduled transaction
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [ScheduledTransactionResponse]
|
@@ -32,7 +32,7 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single scheduled transaction
|
34
34
|
# Returns a single scheduled transaction
|
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 scheduled_transaction_id The id of the scheduled transaction
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(ScheduledTransactionResponse, Fixnum, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
@@ -79,9 +79,9 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List scheduled transactions
|
81
81
|
# Returns all scheduled transactions
|
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 [ScheduledTransactionsResponse]
|
86
86
|
def get_scheduled_transactions(budget_id, opts = {})
|
87
87
|
data, _status_code, _headers = get_scheduled_transactions_with_http_info(budget_id, opts)
|
@@ -90,9 +90,9 @@ module YNAB
|
|
90
90
|
|
91
91
|
# List scheduled transactions
|
92
92
|
# Returns all scheduled transactions
|
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<(ScheduledTransactionsResponse, Fixnum, Hash)>] ScheduledTransactionsResponse data, response status code and response headers
|
97
97
|
def get_scheduled_transactions_with_http_info(budget_id, opts = {})
|
98
98
|
if @api_client.config.debugging
|
@@ -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
|
|
@@ -20,9 +20,9 @@ module YNAB
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create a single transaction or multiple transactions
|
23
|
-
# Creates a single transaction or multiple transactions. If you provide a body containing a
|
24
|
-
# @param budget_id The id of the budget
|
25
|
-
# @param data The transaction or transactions to create. To create a single transaction you can specify a value for the &#
|
23
|
+
# Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
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 transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [SaveTransactionsResponse]
|
28
28
|
def create_transaction(budget_id, data, opts = {})
|
@@ -31,9 +31,9 @@ module YNAB
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Create a single transaction or multiple transactions
|
34
|
-
# Creates a single transaction or multiple transactions. If you provide a body containing a &#
|
35
|
-
# @param budget_id The id of the budget
|
36
|
-
# @param data The transaction or transactions to create. To create a single transaction you can specify a value for the &#
|
34
|
+
# Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
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 transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(SaveTransactionsResponse, Fixnum, Hash)>] SaveTransactionsResponse data, response status code and response headers
|
39
39
|
def create_transaction_with_http_info(budget_id, data, opts = {})
|
@@ -79,7 +79,7 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# Single transaction
|
81
81
|
# Returns a single transaction
|
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 transaction_id The id of the transaction
|
84
84
|
# @param [Hash] opts the optional parameters
|
85
85
|
# @return [TransactionResponse]
|
@@ -90,7 +90,7 @@ module YNAB
|
|
90
90
|
|
91
91
|
# Single transaction
|
92
92
|
# Returns a single transaction
|
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 transaction_id The id of the transaction
|
95
95
|
# @param [Hash] opts the optional parameters
|
96
96
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
@@ -137,11 +137,11 @@ module YNAB
|
|
137
137
|
end
|
138
138
|
# List transactions
|
139
139
|
# Returns budget transactions
|
140
|
-
# @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).
|
141
141
|
# @param [Hash] opts the optional parameters
|
142
142
|
# @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).
|
143
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
144
|
-
# @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.
|
143
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
144
|
+
# @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.
|
145
145
|
# @return [TransactionsResponse]
|
146
146
|
def get_transactions(budget_id, opts = {})
|
147
147
|
data, _status_code, _headers = get_transactions_with_http_info(budget_id, opts)
|
@@ -150,11 +150,11 @@ module YNAB
|
|
150
150
|
|
151
151
|
# List transactions
|
152
152
|
# Returns budget transactions
|
153
|
-
# @param budget_id The id of the budget
|
153
|
+
# @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).
|
154
154
|
# @param [Hash] opts the optional parameters
|
155
155
|
# @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).
|
156
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
157
|
-
# @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.
|
156
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
157
|
+
# @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.
|
158
158
|
# @return [Array<(TransactionsResponse, Fixnum, Hash)>] TransactionsResponse data, response status code and response headers
|
159
159
|
def get_transactions_with_http_info(budget_id, opts = {})
|
160
160
|
if @api_client.config.debugging
|
@@ -201,12 +201,12 @@ module YNAB
|
|
201
201
|
end
|
202
202
|
# List account transactions
|
203
203
|
# Returns all transactions for a specified account
|
204
|
-
# @param budget_id The id of the budget
|
204
|
+
# @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).
|
205
205
|
# @param account_id The id of the account
|
206
206
|
# @param [Hash] opts the optional parameters
|
207
207
|
# @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).
|
208
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
209
|
-
# @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.
|
208
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
209
|
+
# @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.
|
210
210
|
# @return [TransactionsResponse]
|
211
211
|
def get_transactions_by_account(budget_id, account_id, opts = {})
|
212
212
|
data, _status_code, _headers = get_transactions_by_account_with_http_info(budget_id, account_id, opts)
|
@@ -215,12 +215,12 @@ module YNAB
|
|
215
215
|
|
216
216
|
# List account transactions
|
217
217
|
# Returns all transactions for a specified account
|
218
|
-
# @param budget_id The id of the budget
|
218
|
+
# @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).
|
219
219
|
# @param account_id The id of the account
|
220
220
|
# @param [Hash] opts the optional parameters
|
221
221
|
# @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).
|
222
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
223
|
-
# @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.
|
222
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
223
|
+
# @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.
|
224
224
|
# @return [Array<(TransactionsResponse, Fixnum, Hash)>] TransactionsResponse data, response status code and response headers
|
225
225
|
def get_transactions_by_account_with_http_info(budget_id, account_id, opts = {})
|
226
226
|
if @api_client.config.debugging
|
@@ -271,12 +271,12 @@ module YNAB
|
|
271
271
|
end
|
272
272
|
# List category transactions
|
273
273
|
# Returns all transactions for a specified category
|
274
|
-
# @param budget_id The id of the budget
|
274
|
+
# @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).
|
275
275
|
# @param category_id The id of the category
|
276
276
|
# @param [Hash] opts the optional parameters
|
277
277
|
# @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).
|
278
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
279
|
-
# @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.
|
278
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
279
|
+
# @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.
|
280
280
|
# @return [HybridTransactionsResponse]
|
281
281
|
def get_transactions_by_category(budget_id, category_id, opts = {})
|
282
282
|
data, _status_code, _headers = get_transactions_by_category_with_http_info(budget_id, category_id, opts)
|
@@ -285,12 +285,12 @@ module YNAB
|
|
285
285
|
|
286
286
|
# List category transactions
|
287
287
|
# Returns all transactions for a specified category
|
288
|
-
# @param budget_id The id of the budget
|
288
|
+
# @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).
|
289
289
|
# @param category_id The id of the category
|
290
290
|
# @param [Hash] opts the optional parameters
|
291
291
|
# @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).
|
292
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
293
|
-
# @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.
|
292
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
293
|
+
# @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.
|
294
294
|
# @return [Array<(HybridTransactionsResponse, Fixnum, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
295
295
|
def get_transactions_by_category_with_http_info(budget_id, category_id, opts = {})
|
296
296
|
if @api_client.config.debugging
|
@@ -341,12 +341,12 @@ module YNAB
|
|
341
341
|
end
|
342
342
|
# List payee transactions
|
343
343
|
# Returns all transactions for a specified payee
|
344
|
-
# @param budget_id The id of the budget
|
344
|
+
# @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).
|
345
345
|
# @param payee_id The id of the payee
|
346
346
|
# @param [Hash] opts the optional parameters
|
347
347
|
# @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).
|
348
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
349
|
-
# @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.
|
348
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
349
|
+
# @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.
|
350
350
|
# @return [HybridTransactionsResponse]
|
351
351
|
def get_transactions_by_payee(budget_id, payee_id, opts = {})
|
352
352
|
data, _status_code, _headers = get_transactions_by_payee_with_http_info(budget_id, payee_id, opts)
|
@@ -355,12 +355,12 @@ module YNAB
|
|
355
355
|
|
356
356
|
# List payee transactions
|
357
357
|
# Returns all transactions for a specified payee
|
358
|
-
# @param budget_id The id of the budget
|
358
|
+
# @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).
|
359
359
|
# @param payee_id The id of the payee
|
360
360
|
# @param [Hash] opts the optional parameters
|
361
361
|
# @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).
|
362
|
-
# @option opts [String] :type If specified, only transactions of the specified type will be included.
|
363
|
-
# @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.
|
362
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
363
|
+
# @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.
|
364
364
|
# @return [Array<(HybridTransactionsResponse, Fixnum, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
365
365
|
def get_transactions_by_payee_with_http_info(budget_id, payee_id, opts = {})
|
366
366
|
if @api_client.config.debugging
|
@@ -409,9 +409,61 @@ module YNAB
|
|
409
409
|
end
|
410
410
|
return data, status_code, headers
|
411
411
|
end
|
412
|
+
# Import transactions
|
413
|
+
# Imports transactions.
|
414
|
+
# @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).
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @return [TransactionsImportResponse]
|
417
|
+
def import_transactions(budget_id, opts = {})
|
418
|
+
data, _status_code, _headers = import_transactions_with_http_info(budget_id, opts)
|
419
|
+
data
|
420
|
+
end
|
421
|
+
|
422
|
+
# Import transactions
|
423
|
+
# Imports transactions.
|
424
|
+
# @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).
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(TransactionsImportResponse, Fixnum, Hash)>] TransactionsImportResponse data, response status code and response headers
|
427
|
+
def import_transactions_with_http_info(budget_id, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.import_transactions ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'budget_id' is set
|
432
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.import_transactions"
|
434
|
+
end
|
435
|
+
# resource path
|
436
|
+
local_var_path = '/budgets/{budget_id}/transactions/import'.sub('{' + 'budget_id' + '}', budget_id.to_s)
|
437
|
+
|
438
|
+
# query parameters
|
439
|
+
query_params = {}
|
440
|
+
|
441
|
+
# header parameters
|
442
|
+
header_params = {}
|
443
|
+
# HTTP header 'Accept' (if needed)
|
444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
445
|
+
|
446
|
+
# form parameters
|
447
|
+
form_params = {}
|
448
|
+
|
449
|
+
# http body (model)
|
450
|
+
post_body = nil
|
451
|
+
auth_names = ['bearer']
|
452
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
453
|
+
:header_params => header_params,
|
454
|
+
:query_params => query_params,
|
455
|
+
:form_params => form_params,
|
456
|
+
:body => post_body,
|
457
|
+
:auth_names => auth_names,
|
458
|
+
:return_type => 'TransactionsImportResponse')
|
459
|
+
if @api_client.config.debugging
|
460
|
+
@api_client.config.logger.debug "API called: TransactionsApi#import_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
461
|
+
end
|
462
|
+
return data, status_code, headers
|
463
|
+
end
|
412
464
|
# Updates an existing transaction
|
413
465
|
# Updates a transaction
|
414
|
-
# @param budget_id The id of the budget
|
466
|
+
# @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).
|
415
467
|
# @param transaction_id The id of the transaction
|
416
468
|
# @param data The transaction to update
|
417
469
|
# @param [Hash] opts the optional parameters
|
@@ -423,7 +475,7 @@ module YNAB
|
|
423
475
|
|
424
476
|
# Updates an existing transaction
|
425
477
|
# Updates a transaction
|
426
|
-
# @param budget_id The id of the budget
|
478
|
+
# @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).
|
427
479
|
# @param transaction_id The id of the transaction
|
428
480
|
# @param data The transaction to update
|
429
481
|
# @param [Hash] opts the optional parameters
|
@@ -474,9 +526,9 @@ module YNAB
|
|
474
526
|
return data, status_code, headers
|
475
527
|
end
|
476
528
|
# Update multiple transactions
|
477
|
-
# Updates multiple transactions, by
|
478
|
-
# @param budget_id The id of the budget
|
479
|
-
# @param data The transactions to update. Each transaction must have either an &#
|
529
|
+
# Updates multiple transactions, by `id` or `import_id`.
|
530
|
+
# @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).
|
531
|
+
# @param data The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
480
532
|
# @param [Hash] opts the optional parameters
|
481
533
|
# @return [SaveTransactionsResponse]
|
482
534
|
def update_transactions(budget_id, data, opts = {})
|
@@ -485,9 +537,9 @@ module YNAB
|
|
485
537
|
end
|
486
538
|
|
487
539
|
# Update multiple transactions
|
488
|
-
# Updates multiple transactions, by &#
|
489
|
-
# @param budget_id The id of the budget
|
490
|
-
# @param data The transactions to update. Each transaction must have either an &#
|
540
|
+
# Updates multiple transactions, by `id` or `import_id`.
|
541
|
+
# @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).
|
542
|
+
# @param data The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
|
491
543
|
# @param [Hash] opts the optional parameters
|
492
544
|
# @return [Array<(SaveTransactionsResponse, Fixnum, Hash)>] SaveTransactionsResponse data, response status code and response headers
|
493
545
|
def update_transactions_with_http_info(budget_id, data, opts = {})
|
data/lib/ynab/api/user_api.rb
CHANGED
data/lib/ynab/api_client.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
|
|
@@ -267,7 +267,8 @@ module YNAB
|
|
267
267
|
def build_request_url(path)
|
268
268
|
# Add leading and trailing slashes to path
|
269
269
|
path = "/#{path}".gsub(/\/+/, '/')
|
270
|
-
URI.
|
270
|
+
URI.encode_www_form_component(path).gsub('+', '%20')
|
271
|
+
@config.base_url + path
|
271
272
|
end
|
272
273
|
|
273
274
|
# Builds the HTTP request body
|