ynab 1.4.0 → 1.5.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 +5 -5
- data/Gemfile.lock +2 -2
- data/README.md +37 -27
- data/Rakefile +0 -6
- data/config.json +1 -1
- data/docs/Account.md +1 -0
- data/docs/AccountsApi.md +3 -3
- data/docs/BudgetsApi.md +4 -4
- data/docs/CategoriesApi.md +45 -4
- data/docs/HybridTransaction.md +2 -1
- data/docs/MonthDetail.md +1 -1
- data/docs/MonthsApi.md +3 -3
- data/docs/PayeeLocationsApi.md +4 -4
- data/docs/PayeesApi.md +3 -3
- data/docs/SaveMonthCategory.md +8 -0
- data/docs/SaveMonthCategoryWrapper.md +8 -0
- data/docs/SaveTransaction.md +2 -2
- data/docs/SaveTransactionsResponse.md +8 -0
- data/docs/SaveTransactionsResponseData.md +11 -0
- data/docs/SaveTransactionsWrapper.md +9 -0
- data/docs/ScheduledTransactionsApi.md +3 -3
- data/docs/TransactionDetail.md +2 -1
- data/docs/TransactionSummary.md +2 -1
- data/docs/TransactionsApi.md +25 -25
- data/docs/UserApi.md +1 -1
- data/examples/create-multiple-transactions.rb +44 -0
- data/examples/update-category-budgeted.rb +23 -0
- data/lib/ynab.rb +5 -0
- data/lib/ynab/api/accounts_api.rb +6 -6
- data/lib/ynab/api/budgets_api.rb +8 -8
- data/lib/ynab/api/categories_api.rb +142 -8
- data/lib/ynab/api/months_api.rb +6 -6
- data/lib/ynab/api/payee_locations_api.rb +8 -8
- data/lib/ynab/api/payees_api.rb +6 -6
- data/lib/ynab/api/scheduled_transactions_api.rb +6 -6
- data/lib/ynab/api/transactions_api.rb +54 -54
- data/lib/ynab/api/user_api.rb +2 -2
- data/lib/ynab/models/account.rb +16 -1
- data/lib/ynab/models/hybrid_transaction.rb +17 -1
- data/lib/ynab/models/month_detail.rb +1 -1
- data/lib/ynab/models/save_month_category.rb +189 -0
- data/lib/ynab/models/save_month_category_wrapper.rb +188 -0
- data/lib/ynab/models/save_transaction.rb +2 -2
- data/lib/ynab/models/save_transactions_response.rb +188 -0
- data/lib/ynab/models/save_transactions_response_data.rb +225 -0
- data/lib/ynab/models/save_transactions_wrapper.rb +194 -0
- data/lib/ynab/models/transaction_detail.rb +17 -1
- data/lib/ynab/models/transaction_summary.rb +17 -1
- data/lib/ynab/version.rb +1 -1
- data/pkg/ynab-1.4.0.gem +0 -0
- data/spec-v1-swagger.json +413 -245
- data/spec/api/categories_spec.rb +14 -2
- data/spec/api/transactions_spec.rb +31 -0
- data/spec/fixtures/vcr_cassettes/category.yml +1 -1
- data/spec/fixtures/vcr_cassettes/multiple_transactions.yml +46 -0
- data/spec/fixtures/vcr_cassettes/patch_month_category.yml +46 -0
- metadata +20 -3
data/lib/ynab/api/months_api.rb
CHANGED
@@ -21,8 +21,8 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Single budget month
|
23
23
|
# Returns a single budget month
|
24
|
-
# @param budget_id The
|
25
|
-
# @param month
|
24
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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]
|
28
28
|
def get_budget_month(budget_id, month, opts = {})
|
@@ -32,8 +32,8 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single budget month
|
34
34
|
# Returns a single budget month
|
35
|
-
# @param budget_id The
|
36
|
-
# @param month
|
35
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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
|
39
39
|
def get_budget_month_with_http_info(budget_id, month, opts = {})
|
@@ -79,7 +79,7 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List budget months
|
81
81
|
# Returns all budget months
|
82
|
-
# @param budget_id The
|
82
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
84
|
# @return [MonthSummariesResponse]
|
85
85
|
def get_budget_months(budget_id, opts = {})
|
@@ -89,7 +89,7 @@ module YNAB
|
|
89
89
|
|
90
90
|
# List budget months
|
91
91
|
# Returns all budget months
|
92
|
-
# @param budget_id The
|
92
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [Array<(MonthSummariesResponse, Fixnum, Hash)>] MonthSummariesResponse data, response status code and response headers
|
95
95
|
def get_budget_months_with_http_info(budget_id, opts = {})
|
@@ -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
|
24
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used 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
|
35
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used 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
|
82
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used 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
|
92
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used 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,8 +131,8 @@ 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
|
135
|
-
# @param payee_id
|
134
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
135
|
+
# @param payee_id id of payee
|
136
136
|
# @param [Hash] opts the optional parameters
|
137
137
|
# @return [PayeeLocationsResponse]
|
138
138
|
def get_payee_locations_by_payee(budget_id, payee_id, opts = {})
|
@@ -142,8 +142,8 @@ 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
|
146
|
-
# @param payee_id
|
145
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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
|
149
149
|
def get_payee_locations_by_payee_with_http_info(budget_id, payee_id, opts = {})
|
data/lib/ynab/api/payees_api.rb
CHANGED
@@ -21,8 +21,8 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Single payee
|
23
23
|
# Returns single payee
|
24
|
-
# @param budget_id The
|
25
|
-
# @param payee_id The
|
24
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
25
|
+
# @param payee_id The id of the payee
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [PayeeResponse]
|
28
28
|
def get_payee_by_id(budget_id, payee_id, opts = {})
|
@@ -32,8 +32,8 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single payee
|
34
34
|
# Returns single payee
|
35
|
-
# @param budget_id The
|
36
|
-
# @param payee_id The
|
35
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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
|
39
39
|
def get_payee_by_id_with_http_info(budget_id, payee_id, opts = {})
|
@@ -79,7 +79,7 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List payees
|
81
81
|
# Returns all payees
|
82
|
-
# @param budget_id The
|
82
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
84
|
# @return [PayeesResponse]
|
85
85
|
def get_payees(budget_id, opts = {})
|
@@ -89,7 +89,7 @@ module YNAB
|
|
89
89
|
|
90
90
|
# List payees
|
91
91
|
# Returns all payees
|
92
|
-
# @param budget_id The
|
92
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [Array<(PayeesResponse, Fixnum, Hash)>] PayeesResponse data, response status code and response headers
|
95
95
|
def get_payees_with_http_info(budget_id, opts = {})
|
@@ -21,8 +21,8 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Single scheduled transaction
|
23
23
|
# Returns a single scheduled transaction
|
24
|
-
# @param budget_id The
|
25
|
-
# @param scheduled_transaction_id The
|
24
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
25
|
+
# @param scheduled_transaction_id The id of the scheduled transaction
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [ScheduledTransactionResponse]
|
28
28
|
def get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id, opts = {})
|
@@ -32,8 +32,8 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Single scheduled transaction
|
34
34
|
# Returns a single scheduled transaction
|
35
|
-
# @param budget_id The
|
36
|
-
# @param scheduled_transaction_id The
|
35
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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
|
39
39
|
def get_scheduled_transaction_by_id_with_http_info(budget_id, scheduled_transaction_id, opts = {})
|
@@ -79,7 +79,7 @@ module YNAB
|
|
79
79
|
end
|
80
80
|
# List scheduled transactions
|
81
81
|
# Returns all scheduled transactions
|
82
|
-
# @param budget_id The
|
82
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
84
|
# @return [ScheduledTransactionsResponse]
|
85
85
|
def get_scheduled_transactions(budget_id, opts = {})
|
@@ -89,7 +89,7 @@ module YNAB
|
|
89
89
|
|
90
90
|
# List scheduled transactions
|
91
91
|
# Returns all scheduled transactions
|
92
|
-
# @param budget_id The
|
92
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [Array<(ScheduledTransactionsResponse, Fixnum, Hash)>] ScheduledTransactionsResponse data, response status code and response headers
|
95
95
|
def get_scheduled_transactions_with_http_info(budget_id, opts = {})
|
@@ -21,8 +21,8 @@ module YNAB
|
|
21
21
|
end
|
22
22
|
# Bulk create transactions
|
23
23
|
# Creates multiple transactions
|
24
|
-
# @param budget_id The
|
25
|
-
# @param transactions The list of
|
24
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
25
|
+
# @param transactions The list of transactions to create
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [BulkResponse]
|
28
28
|
def bulk_create_transactions(budget_id, transactions, opts = {})
|
@@ -32,8 +32,8 @@ module YNAB
|
|
32
32
|
|
33
33
|
# Bulk create transactions
|
34
34
|
# Creates multiple transactions
|
35
|
-
# @param budget_id The
|
36
|
-
# @param transactions The list of
|
35
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
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
|
39
39
|
def bulk_create_transactions_with_http_info(budget_id, transactions, opts = {})
|
@@ -77,24 +77,24 @@ module YNAB
|
|
77
77
|
end
|
78
78
|
return data, status_code, headers
|
79
79
|
end
|
80
|
-
# Create
|
81
|
-
# Creates a transaction
|
82
|
-
# @param budget_id The
|
83
|
-
# @param
|
80
|
+
# Create a single transaction or multiple transactions
|
81
|
+
# 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.
|
82
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
|
+
# @param save_transactions The transaction or transactions to create
|
84
84
|
# @param [Hash] opts the optional parameters
|
85
|
-
# @return [
|
86
|
-
def create_transaction(budget_id,
|
87
|
-
data, _status_code, _headers = create_transaction_with_http_info(budget_id,
|
85
|
+
# @return [SaveTransactionsResponse]
|
86
|
+
def create_transaction(budget_id, save_transactions, opts = {})
|
87
|
+
data, _status_code, _headers = create_transaction_with_http_info(budget_id, save_transactions, opts)
|
88
88
|
data
|
89
89
|
end
|
90
90
|
|
91
|
-
# Create
|
92
|
-
# Creates a transaction
|
93
|
-
# @param budget_id The
|
94
|
-
# @param
|
91
|
+
# Create a single transaction or multiple transactions
|
92
|
+
# 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.
|
93
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
94
|
+
# @param save_transactions The transaction or transactions to create
|
95
95
|
# @param [Hash] opts the optional parameters
|
96
|
-
# @return [Array<(
|
97
|
-
def create_transaction_with_http_info(budget_id,
|
96
|
+
# @return [Array<(SaveTransactionsResponse, Fixnum, Hash)>] SaveTransactionsResponse data, response status code and response headers
|
97
|
+
def create_transaction_with_http_info(budget_id, save_transactions, opts = {})
|
98
98
|
if @api_client.config.debugging
|
99
99
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.create_transaction ...'
|
100
100
|
end
|
@@ -102,9 +102,9 @@ module YNAB
|
|
102
102
|
if @api_client.config.client_side_validation && budget_id.nil?
|
103
103
|
fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.create_transaction"
|
104
104
|
end
|
105
|
-
# verify the required parameter '
|
106
|
-
if @api_client.config.client_side_validation &&
|
107
|
-
fail ArgumentError, "Missing the required parameter '
|
105
|
+
# verify the required parameter 'save_transactions' is set
|
106
|
+
if @api_client.config.client_side_validation && save_transactions.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'save_transactions' when calling TransactionsApi.create_transaction"
|
108
108
|
end
|
109
109
|
# resource path
|
110
110
|
local_var_path = '/budgets/{budget_id}/transactions'.sub('{' + 'budget_id' + '}', budget_id.to_s)
|
@@ -121,7 +121,7 @@ module YNAB
|
|
121
121
|
form_params = {}
|
122
122
|
|
123
123
|
# http body (model)
|
124
|
-
post_body = @api_client.object_to_http_body(
|
124
|
+
post_body = @api_client.object_to_http_body(save_transactions)
|
125
125
|
auth_names = ['bearer']
|
126
126
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
127
127
|
:header_params => header_params,
|
@@ -129,7 +129,7 @@ module YNAB
|
|
129
129
|
:form_params => form_params,
|
130
130
|
:body => post_body,
|
131
131
|
:auth_names => auth_names,
|
132
|
-
:return_type => '
|
132
|
+
:return_type => 'SaveTransactionsResponse')
|
133
133
|
if @api_client.config.debugging
|
134
134
|
@api_client.config.logger.debug "API called: TransactionsApi#create_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
135
|
end
|
@@ -137,8 +137,8 @@ module YNAB
|
|
137
137
|
end
|
138
138
|
# Single transaction
|
139
139
|
# Returns a single transaction
|
140
|
-
# @param budget_id The
|
141
|
-
# @param transaction_id The
|
140
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
141
|
+
# @param transaction_id The id of the transaction
|
142
142
|
# @param [Hash] opts the optional parameters
|
143
143
|
# @return [TransactionResponse]
|
144
144
|
def get_transaction_by_id(budget_id, transaction_id, opts = {})
|
@@ -148,8 +148,8 @@ module YNAB
|
|
148
148
|
|
149
149
|
# Single transaction
|
150
150
|
# Returns a single transaction
|
151
|
-
# @param budget_id The
|
152
|
-
# @param transaction_id The
|
151
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
152
|
+
# @param transaction_id The id of the transaction
|
153
153
|
# @param [Hash] opts the optional parameters
|
154
154
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
155
155
|
def get_transaction_by_id_with_http_info(budget_id, transaction_id, opts = {})
|
@@ -195,9 +195,9 @@ module YNAB
|
|
195
195
|
end
|
196
196
|
# List transactions
|
197
197
|
# Returns budget transactions
|
198
|
-
# @param budget_id The
|
198
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
199
199
|
# @param [Hash] opts the optional parameters
|
200
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
200
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
201
201
|
# @option opts [String] :type Only return transactions of a certain type ('uncategorized' and 'unapproved' are currently supported)
|
202
202
|
# @return [TransactionsResponse]
|
203
203
|
def get_transactions(budget_id, opts = {})
|
@@ -207,9 +207,9 @@ module YNAB
|
|
207
207
|
|
208
208
|
# List transactions
|
209
209
|
# Returns budget transactions
|
210
|
-
# @param budget_id The
|
210
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
211
211
|
# @param [Hash] opts the optional parameters
|
212
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
212
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
213
213
|
# @option opts [String] :type Only return transactions of a certain type ('uncategorized' and 'unapproved' are currently supported)
|
214
214
|
# @return [Array<(TransactionsResponse, Fixnum, Hash)>] TransactionsResponse data, response status code and response headers
|
215
215
|
def get_transactions_with_http_info(budget_id, opts = {})
|
@@ -256,10 +256,10 @@ module YNAB
|
|
256
256
|
end
|
257
257
|
# List account transactions
|
258
258
|
# Returns all transactions for a specified account
|
259
|
-
# @param budget_id The
|
260
|
-
# @param account_id The
|
259
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
260
|
+
# @param account_id The id of the account
|
261
261
|
# @param [Hash] opts the optional parameters
|
262
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
262
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
263
263
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
264
264
|
# @return [TransactionsResponse]
|
265
265
|
def get_transactions_by_account(budget_id, account_id, opts = {})
|
@@ -269,10 +269,10 @@ module YNAB
|
|
269
269
|
|
270
270
|
# List account transactions
|
271
271
|
# Returns all transactions for a specified account
|
272
|
-
# @param budget_id The
|
273
|
-
# @param account_id The
|
272
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
273
|
+
# @param account_id The id of the account
|
274
274
|
# @param [Hash] opts the optional parameters
|
275
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
275
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
276
276
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
277
277
|
# @return [Array<(TransactionsResponse, Fixnum, Hash)>] TransactionsResponse data, response status code and response headers
|
278
278
|
def get_transactions_by_account_with_http_info(budget_id, account_id, opts = {})
|
@@ -323,10 +323,10 @@ module YNAB
|
|
323
323
|
end
|
324
324
|
# List category transactions
|
325
325
|
# Returns all transactions for a specified category
|
326
|
-
# @param budget_id The
|
327
|
-
# @param category_id The
|
326
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
327
|
+
# @param category_id The id of the category
|
328
328
|
# @param [Hash] opts the optional parameters
|
329
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
329
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
330
330
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
331
331
|
# @return [HybridTransactionsResponse]
|
332
332
|
def get_transactions_by_category(budget_id, category_id, opts = {})
|
@@ -336,10 +336,10 @@ module YNAB
|
|
336
336
|
|
337
337
|
# List category transactions
|
338
338
|
# Returns all transactions for a specified category
|
339
|
-
# @param budget_id The
|
340
|
-
# @param category_id The
|
339
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
340
|
+
# @param category_id The id of the category
|
341
341
|
# @param [Hash] opts the optional parameters
|
342
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
342
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
343
343
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
344
344
|
# @return [Array<(HybridTransactionsResponse, Fixnum, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
345
345
|
def get_transactions_by_category_with_http_info(budget_id, category_id, opts = {})
|
@@ -390,10 +390,10 @@ module YNAB
|
|
390
390
|
end
|
391
391
|
# List payee transactions
|
392
392
|
# Returns all transactions for a specified payee
|
393
|
-
# @param budget_id The
|
394
|
-
# @param payee_id The
|
393
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
394
|
+
# @param payee_id The id of the payee
|
395
395
|
# @param [Hash] opts the optional parameters
|
396
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
396
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
397
397
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
398
398
|
# @return [HybridTransactionsResponse]
|
399
399
|
def get_transactions_by_payee(budget_id, payee_id, opts = {})
|
@@ -403,10 +403,10 @@ module YNAB
|
|
403
403
|
|
404
404
|
# List payee transactions
|
405
405
|
# Returns all transactions for a specified payee
|
406
|
-
# @param budget_id The
|
407
|
-
# @param payee_id The
|
406
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
407
|
+
# @param payee_id The id of the payee
|
408
408
|
# @param [Hash] opts the optional parameters
|
409
|
-
# @option opts [Date] :since_date Only return transactions on or after this date
|
409
|
+
# @option opts [Date] :since_date Only return transactions on or after this date
|
410
410
|
# @option opts [String] :type Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
|
411
411
|
# @return [Array<(HybridTransactionsResponse, Fixnum, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
412
412
|
def get_transactions_by_payee_with_http_info(budget_id, payee_id, opts = {})
|
@@ -457,9 +457,9 @@ module YNAB
|
|
457
457
|
end
|
458
458
|
# Updates an existing transaction
|
459
459
|
# Updates a transaction
|
460
|
-
# @param budget_id The
|
461
|
-
# @param transaction_id The
|
462
|
-
# @param transaction The
|
460
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
461
|
+
# @param transaction_id The id of the transaction
|
462
|
+
# @param transaction The transaction to update
|
463
463
|
# @param [Hash] opts the optional parameters
|
464
464
|
# @return [TransactionResponse]
|
465
465
|
def update_transaction(budget_id, transaction_id, transaction, opts = {})
|
@@ -469,9 +469,9 @@ module YNAB
|
|
469
469
|
|
470
470
|
# Updates an existing transaction
|
471
471
|
# Updates a transaction
|
472
|
-
# @param budget_id The
|
473
|
-
# @param transaction_id The
|
474
|
-
# @param transaction The
|
472
|
+
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
473
|
+
# @param transaction_id The id of the transaction
|
474
|
+
# @param transaction The transaction to update
|
475
475
|
# @param [Hash] opts the optional parameters
|
476
476
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
477
477
|
def update_transaction_with_http_info(budget_id, transaction_id, transaction, opts = {})
|
data/lib/ynab/api/user_api.rb
CHANGED
@@ -20,7 +20,7 @@ module YNAB
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# User info
|
23
|
-
# Returns authenticated user information
|
23
|
+
# Returns authenticated user information
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [UserResponse]
|
26
26
|
def get_user(opts = {})
|
@@ -29,7 +29,7 @@ module YNAB
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# User info
|
32
|
-
# Returns authenticated user information
|
32
|
+
# Returns authenticated user information
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(UserResponse, Fixnum, Hash)>] UserResponse data, response status code and response headers
|
35
35
|
def get_user_with_http_info(opts = {})
|
data/lib/ynab/models/account.rb
CHANGED
@@ -38,6 +38,9 @@ module YNAB
|
|
38
38
|
# The current uncleared balance of the account in milliunits format
|
39
39
|
attr_accessor :uncleared_balance
|
40
40
|
|
41
|
+
# The payee id which should be used when transferring to this account
|
42
|
+
attr_accessor :transfer_payee_id
|
43
|
+
|
41
44
|
# Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
|
42
45
|
attr_accessor :deleted
|
43
46
|
|
@@ -75,6 +78,7 @@ module YNAB
|
|
75
78
|
:'balance' => :'balance',
|
76
79
|
:'cleared_balance' => :'cleared_balance',
|
77
80
|
:'uncleared_balance' => :'uncleared_balance',
|
81
|
+
:'transfer_payee_id' => :'transfer_payee_id',
|
78
82
|
:'deleted' => :'deleted'
|
79
83
|
}
|
80
84
|
end
|
@@ -91,6 +95,7 @@ module YNAB
|
|
91
95
|
:'balance' => :'Integer',
|
92
96
|
:'cleared_balance' => :'Integer',
|
93
97
|
:'uncleared_balance' => :'Integer',
|
98
|
+
:'transfer_payee_id' => :'String',
|
94
99
|
:'deleted' => :'BOOLEAN'
|
95
100
|
}
|
96
101
|
end
|
@@ -139,6 +144,10 @@ module YNAB
|
|
139
144
|
self.uncleared_balance = attributes[:'uncleared_balance']
|
140
145
|
end
|
141
146
|
|
147
|
+
if attributes.has_key?(:'transfer_payee_id')
|
148
|
+
self.transfer_payee_id = attributes[:'transfer_payee_id']
|
149
|
+
end
|
150
|
+
|
142
151
|
if attributes.has_key?(:'deleted')
|
143
152
|
self.deleted = attributes[:'deleted']
|
144
153
|
end
|
@@ -184,6 +193,10 @@ module YNAB
|
|
184
193
|
invalid_properties.push('invalid value for "uncleared_balance", uncleared_balance cannot be nil.')
|
185
194
|
end
|
186
195
|
|
196
|
+
if @transfer_payee_id.nil?
|
197
|
+
invalid_properties.push('invalid value for "transfer_payee_id", transfer_payee_id cannot be nil.')
|
198
|
+
end
|
199
|
+
|
187
200
|
if @deleted.nil?
|
188
201
|
invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
|
189
202
|
end
|
@@ -205,6 +218,7 @@ module YNAB
|
|
205
218
|
return false if @balance.nil?
|
206
219
|
return false if @cleared_balance.nil?
|
207
220
|
return false if @uncleared_balance.nil?
|
221
|
+
return false if @transfer_payee_id.nil?
|
208
222
|
return false if @deleted.nil?
|
209
223
|
true
|
210
224
|
end
|
@@ -233,6 +247,7 @@ module YNAB
|
|
233
247
|
balance == o.balance &&
|
234
248
|
cleared_balance == o.cleared_balance &&
|
235
249
|
uncleared_balance == o.uncleared_balance &&
|
250
|
+
transfer_payee_id == o.transfer_payee_id &&
|
236
251
|
deleted == o.deleted
|
237
252
|
end
|
238
253
|
|
@@ -245,7 +260,7 @@ module YNAB
|
|
245
260
|
# Calculates hash code according to all attributes.
|
246
261
|
# @return [Fixnum] Hash code
|
247
262
|
def hash
|
248
|
-
[id, name, type, on_budget, closed, note, balance, cleared_balance, uncleared_balance, deleted].hash
|
263
|
+
[id, name, type, on_budget, closed, note, balance, cleared_balance, uncleared_balance, transfer_payee_id, deleted].hash
|
249
264
|
end
|
250
265
|
|
251
266
|
# Builds the object from hash
|