ynab 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0db932ecbce95c269779a53c4afaa25ae46d2f79
4
- data.tar.gz: f23014b51453a6aef7924f53009c9515b7ecf0b4
3
+ metadata.gz: 376bb75fca456bf3ba82dd270046c29ce04bd996
4
+ data.tar.gz: fc32c27e5b11ebcc328a8036eb25c3eeb18ba071
5
5
  SHA512:
6
- metadata.gz: 1d466d8f2ac544eaa865aa955c259db885f0ac04cd75d6b8a8c3e2f9e5d2603a62cdb1008124743241494246de875441c5c856714e3bfa8f9fa8554f47f4643d
7
- data.tar.gz: 91d206caa1621b865fba3dfad82be870c51ca08c30ce6138690fe8ecce61463df2aacdabee0fe80536be6a1a5d4684948c54f9cb692b8f06124af37fb8843424
6
+ metadata.gz: 024ff0011d213e50b231ab6b2f441418311776f201b903c03995b991f7ebd372da19a5aa44dd5bff4a08edd8340ab61751835934147614bb222710f5f33d4a64
7
+ data.tar.gz: 2c4a36e461f406ff51fffaa43afdc4632a932169c170ebbdcf5a3d48ec4ad1b40fcbcc11c0de737bb7435a640edab0084b4132c60c7d09f92640ad8ce8584de2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ynab (1.3.0)
4
+ ynab (1.4.0)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
data/README.md CHANGED
@@ -48,30 +48,30 @@ The following methods are available in this library.
48
48
 
49
49
  | | Method | Description |
50
50
  |------------------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
51
- | **User** | [budgets.get_user()](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/UserApi.md#get_user) | Returns authenticated user information
51
+ | **User** | [user.get_user()](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/UserApi.md#get_user) | Returns authenticated user information
52
52
  | **Budgets** | [budgets.get_budgets()](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budgets) | Returns budgets list with summary information |
53
- | | [budgets.get_budget_by_id(id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_by_id) | Returns a single budget with all related entities |
54
- | | [budgets.get_budget_settings_by_id(id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_settings_by_id) | Returns settings for a budget |
53
+ | | [budgets.get_budget_by_id(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_by_id) | Returns a single budget with all related entities |
54
+ | | [budgets.get_budget_settings_by_id(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/BudgetsApi.md#get_budget_settings_by_id) | Returns settings for a budget |
55
55
  | **Accounts** | [accounts.get_accounts(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/AccountsApi.md#get_accounts) | Returns all accounts |
56
- | | [accounts.get_account_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/AccountsApi.md#get_account_by_id) | Returns a single account |
56
+ | | [accounts.get_account_by_id(budget_id, account_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/AccountsApi.md#get_account_by_id) | Returns a single account |
57
57
  | **Categories** | [categories.get_categories(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#get_categories) | Returns all categories grouped by category group. |
58
- | | [categories.get_category_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#get_category_by_id) | Returns a single category |
58
+ | | [categories.get_category_by_id(budget_id, category_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/CategoriesApi.md#get_category_by_id) | Returns a single category |
59
59
  | **Payees** | [payees.get_payees(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeesApi.md#get_payees) | Returns all payees |
60
- | | [payees.get_payee_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeesApi.md#get_payee_by_id) | Returns single payee |
60
+ | | [payees.get_payee_by_id(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeesApi.md#get_payee_by_id) | Returns single payee |
61
61
  | **Payee Locations** | [payee_locations.get_payee_locations(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_locations) | Returns all payee locations |
62
- | | [payee_locations.get_payee_location_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_location_by_id) | Returns a single payee location |
63
- | | [payee_locations.get_payee_locations_by_payee(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | Returns all payee locations for the specified payee |
62
+ | | [payee_locations.get_payee_location_by_id(budget_id, payee_location_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_location_by_id) | Returns a single payee location |
63
+ | | [payee_locations.get_payee_locations_by_payee(budget_id, payee_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | Returns all payee locations for the specified payee |
64
64
  | **Months** | [months.get_budget_months(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/MonthsApi.md#get_budget_months) | Returns all budget months |
65
65
  | | [months.get_budget_month(budget_id, month)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/MonthsApi.md#get_budget_month) | Returns a single budget month |
66
66
  | **Transactions** | [transactions.get_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions) | Returns budget transactions |
67
- | | [transactions.get_transactions_by_account(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_account) | Returns all transactions for a specified account |
68
- | | [transactions.get_transactions_by_category(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_category) | Returns all transactions for a specified category |
69
- | | [transactions.get_transactions_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_id) | Returns a single transaction |
67
+ | | [transactions.get_transactions_by_account(budget_id, account_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_account) | Returns all transactions for a specified account |
68
+ | | [transactions.get_transactions_by_category(budget_id, category_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_category) | Returns all transactions for a specified category |
69
+ | | [transactions.get_transaction_by_id(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transaction_by_id) | Returns a single transaction |
70
70
  | | [transactions.update_transaction(budget_id, id, transaction)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#update_transaction) | Updates a transaction |
71
71
  | | [transactions.create_transaction(budget_id, transaction)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#create_transaction) | Creates a new transaction |
72
72
  | | [transactions.bulk_create_transactions(budget_id, transactions)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#bulk_create_transactions) | Creates multiple transactions |
73
73
  | **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 |
74
- | | [scheduled_transactions.get_scheduled_transaction_by_id(budget_id, id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Returns a single scheduled transaction |
74
+ | | [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 |
75
75
 
76
76
  ## Development
77
77
 
data/config.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "gemName": "ynab",
3
3
  "moduleName": "YNAB",
4
- "gemVersion": "1.3.0",
4
+ "gemVersion": "1.4.0",
5
5
  "gemDescription": "Ruby gem wrapper for the YNAB API. Read the documentation at https://api.youneedabudget.com",
6
6
  "gemHomepage": "https://github.com/ynab/ynab-sdk-ruby",
7
7
  "gemLicense": "Apache-2.0",
data/docs/AccountsApi.md CHANGED
@@ -19,7 +19,7 @@ Returns a single account
19
19
 
20
20
  Name | Type | Description | Notes
21
21
  ------------- | ------------- | ------------- | -------------
22
- **budget_id** | [**String**](.md)| The ID of the Budget. |
22
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
23
23
  **account_id** | [**String**](.md)| The ID of the Account. |
24
24
 
25
25
  ### Return type
@@ -37,7 +37,7 @@ Returns all accounts
37
37
 
38
38
  Name | Type | Description | Notes
39
39
  ------------- | ------------- | ------------- | -------------
40
- **budget_id** | [**String**](.md)| The ID of the Budget. |
40
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
41
41
 
42
42
  ### Return type
43
43
 
data/docs/BudgetsApi.md CHANGED
@@ -20,7 +20,7 @@ Returns a single budget with all related entities. This resource is effectively
20
20
 
21
21
  Name | Type | Description | Notes
22
22
  ------------- | ------------- | ------------- | -------------
23
- **budget_id** | [**String**](.md)| The ID of the Budget. |
23
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
24
24
  **last_knowledge_of_server** | **Integer**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | [optional]
25
25
 
26
26
  ### Return type
@@ -38,7 +38,7 @@ Returns settings for a budget.
38
38
 
39
39
  Name | Type | Description | Notes
40
40
  ------------- | ------------- | ------------- | -------------
41
- **budget_id** | [**String**](.md)| The ID of the Budget. |
41
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
42
42
 
43
43
  ### Return type
44
44
 
@@ -19,7 +19,7 @@ Returns all categories grouped by category group.
19
19
 
20
20
  Name | Type | Description | Notes
21
21
  ------------- | ------------- | ------------- | -------------
22
- **budget_id** | [**String**](.md)| The ID of the Budget. |
22
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
23
23
 
24
24
  ### Return type
25
25
 
@@ -36,7 +36,7 @@ Returns a single category
36
36
 
37
37
  Name | Type | Description | Notes
38
38
  ------------- | ------------- | ------------- | -------------
39
- **budget_id** | [**String**](.md)| The ID of the Budget. |
39
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
40
40
  **category_id** | [**String**](.md)| The ID of the Category. |
41
41
 
42
42
  ### Return type
data/docs/MonthsApi.md CHANGED
@@ -19,7 +19,7 @@ Returns a single budget month
19
19
 
20
20
  Name | Type | Description | Notes
21
21
  ------------- | ------------- | ------------- | -------------
22
- **budget_id** | [**String**](.md)| The ID of the Budget. |
22
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
23
23
  **month** | **Date**| The Budget Month in ISO format (e.g. 2016-12-01). \"current\" can also be used to specify the current calendar month (UTC). |
24
24
 
25
25
  ### Return type
@@ -37,7 +37,7 @@ Returns all budget months
37
37
 
38
38
  Name | Type | Description | Notes
39
39
  ------------- | ------------- | ------------- | -------------
40
- **budget_id** | [**String**](.md)| The ID of the Budget. |
40
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
41
41
 
42
42
  ### Return type
43
43
 
@@ -20,7 +20,7 @@ Returns a single payee location
20
20
 
21
21
  Name | Type | Description | Notes
22
22
  ------------- | ------------- | ------------- | -------------
23
- **budget_id** | [**String**](.md)| The ID of the Budget. |
23
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
24
24
  **payee_location_id** | [**String**](.md)| ID of payee location |
25
25
 
26
26
  ### Return type
@@ -38,7 +38,7 @@ Returns all payee locations
38
38
 
39
39
  Name | Type | Description | Notes
40
40
  ------------- | ------------- | ------------- | -------------
41
- **budget_id** | [**String**](.md)| The ID of the Budget. |
41
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
42
42
 
43
43
  ### Return type
44
44
 
@@ -55,7 +55,7 @@ Returns all payee locations for the specified payee
55
55
 
56
56
  Name | Type | Description | Notes
57
57
  ------------- | ------------- | ------------- | -------------
58
- **budget_id** | [**String**](.md)| The ID of the Budget. |
58
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
59
59
  **payee_id** | [**String**](.md)| ID of payee |
60
60
 
61
61
  ### Return type
data/docs/PayeesApi.md CHANGED
@@ -19,7 +19,7 @@ Returns single payee
19
19
 
20
20
  Name | Type | Description | Notes
21
21
  ------------- | ------------- | ------------- | -------------
22
- **budget_id** | [**String**](.md)| The ID of the Budget. |
22
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
23
23
  **payee_id** | [**String**](.md)| The ID of the Payee. |
24
24
 
25
25
  ### Return type
@@ -37,7 +37,7 @@ Returns all payees
37
37
 
38
38
  Name | Type | Description | Notes
39
39
  ------------- | ------------- | ------------- | -------------
40
- **budget_id** | [**String**](.md)| The ID of the Budget. |
40
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
41
41
 
42
42
  ### Return type
43
43
 
@@ -19,7 +19,7 @@ Returns a single scheduled transaction
19
19
 
20
20
  Name | Type | Description | Notes
21
21
  ------------- | ------------- | ------------- | -------------
22
- **budget_id** | [**String**](.md)| The ID of the Budget. |
22
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
23
23
  **scheduled_transaction_id** | [**String**](.md)| The ID of the Scheduled Transaction. |
24
24
 
25
25
  ### Return type
@@ -37,7 +37,7 @@ Returns all scheduled transactions
37
37
 
38
38
  Name | Type | Description | Notes
39
39
  ------------- | ------------- | ------------- | -------------
40
- **budget_id** | [**String**](.md)| The ID of the Budget. |
40
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
41
41
 
42
42
  ### Return type
43
43
 
@@ -6,10 +6,10 @@ Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**bulk_create_transactions**](TransactionsApi.md#bulk_create_transactions) | **POST** /budgets/{budget_id}/transactions/bulk | Bulk create transactions
8
8
  [**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /budgets/{budget_id}/transactions | Create new transaction
9
+ [**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction
9
10
  [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions
10
11
  [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions
11
12
  [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions
12
- [**get_transactions_by_id**](TransactionsApi.md#get_transactions_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction
13
13
  [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions
14
14
  [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction
15
15
 
@@ -25,7 +25,7 @@ Creates multiple transactions
25
25
 
26
26
  Name | Type | Description | Notes
27
27
  ------------- | ------------- | ------------- | -------------
28
- **budget_id** | [**String**](.md)| The ID of the Budget. |
28
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
29
29
  **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of Transactions to create. |
30
30
 
31
31
  ### Return type
@@ -43,13 +43,31 @@ Creates a transaction
43
43
 
44
44
  Name | Type | Description | Notes
45
45
  ------------- | ------------- | ------------- | -------------
46
- **budget_id** | [**String**](.md)| The ID of the Budget. |
46
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
47
47
  **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to create. |
48
48
 
49
49
  ### Return type
50
50
 
51
51
  [**TransactionResponse**](TransactionResponse.md)
52
52
 
53
+ # **get_transaction_by_id**
54
+ > TransactionResponse get_transaction_by_id(budget_id, transaction_id)
55
+
56
+ Single transaction
57
+
58
+ Returns a single transaction
59
+
60
+ ### Parameters
61
+
62
+ Name | Type | Description | Notes
63
+ ------------- | ------------- | ------------- | -------------
64
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
65
+ **transaction_id** | [**String**](.md)| The ID of the Transaction. |
66
+
67
+ ### Return type
68
+
69
+ [**TransactionResponse**](TransactionResponse.md)
70
+
53
71
  # **get_transactions**
54
72
  > TransactionsResponse get_transactions(budget_id, opts)
55
73
 
@@ -61,7 +79,7 @@ Returns budget transactions
61
79
 
62
80
  Name | Type | Description | Notes
63
81
  ------------- | ------------- | ------------- | -------------
64
- **budget_id** | [**String**](.md)| The ID of the Budget. |
82
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
65
83
  **since_date** | **Date**| Only return transactions on or after this date. | [optional]
66
84
  **type** | **String**| Only return transactions of a certain type ('uncategorized' and 'unapproved' are currently supported) | [optional]
67
85
 
@@ -80,7 +98,7 @@ Returns all transactions for a specified account
80
98
 
81
99
  Name | Type | Description | Notes
82
100
  ------------- | ------------- | ------------- | -------------
83
- **budget_id** | [**String**](.md)| The ID of the Budget. |
101
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
84
102
  **account_id** | [**String**](.md)| The ID of the Account. |
85
103
  **since_date** | **Date**| Only return transactions on or after this date. | [optional]
86
104
  **type** | **String**| Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') | [optional]
@@ -100,7 +118,7 @@ Returns all transactions for a specified category
100
118
 
101
119
  Name | Type | Description | Notes
102
120
  ------------- | ------------- | ------------- | -------------
103
- **budget_id** | [**String**](.md)| The ID of the Budget. |
121
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
104
122
  **category_id** | [**String**](.md)| The ID of the Category. |
105
123
  **since_date** | **Date**| Only return transactions on or after this date. | [optional]
106
124
  **type** | **String**| Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') | [optional]
@@ -109,24 +127,6 @@ Name | Type | Description | Notes
109
127
 
110
128
  [**HybridTransactionsResponse**](HybridTransactionsResponse.md)
111
129
 
112
- # **get_transactions_by_id**
113
- > TransactionResponse get_transactions_by_id(budget_id, transaction_id)
114
-
115
- Single transaction
116
-
117
- Returns a single transaction
118
-
119
- ### Parameters
120
-
121
- Name | Type | Description | Notes
122
- ------------- | ------------- | ------------- | -------------
123
- **budget_id** | [**String**](.md)| The ID of the Budget. |
124
- **transaction_id** | [**String**](.md)| The ID of the Transaction. |
125
-
126
- ### Return type
127
-
128
- [**TransactionResponse**](TransactionResponse.md)
129
-
130
130
  # **get_transactions_by_payee**
131
131
  > HybridTransactionsResponse get_transactions_by_payee(budget_id, payee_id, opts)
132
132
 
@@ -138,7 +138,7 @@ Returns all transactions for a specified payee
138
138
 
139
139
  Name | Type | Description | Notes
140
140
  ------------- | ------------- | ------------- | -------------
141
- **budget_id** | [**String**](.md)| The ID of the Budget. |
141
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
142
142
  **payee_id** | [**String**](.md)| The ID of the Payee. |
143
143
  **since_date** | **Date**| Only return transactions on or after this date. | [optional]
144
144
  **type** | **String**| Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') | [optional]
@@ -158,7 +158,7 @@ Updates a transaction
158
158
 
159
159
  Name | Type | Description | Notes
160
160
  ------------- | ------------- | ------------- | -------------
161
- **budget_id** | [**String**](.md)| The ID of the Budget. |
161
+ **budget_id** | [**String**](.md)| The ID of the Budget. \"last-used\" can also be used to specify the last used budget. |
162
162
  **transaction_id** | [**String**](.md)| The ID of the Transaction. |
163
163
  **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to update. |
164
164
 
data/lib/ynab.rb CHANGED
@@ -109,7 +109,7 @@ module YNAB
109
109
  @client = ApiClient.new(config)
110
110
  end
111
111
 
112
- def users
112
+ def user
113
113
  UserApi.new(@client)
114
114
  end
115
115
 
@@ -21,7 +21,7 @@ module YNAB
21
21
  end
22
22
  # Single account
23
23
  # Returns a single account
24
- # @param budget_id The ID of the Budget.
24
+ # @param budget_id The ID of the Budget. \"last-used\" can also be used to specify the last used budget.
25
25
  # @param account_id The ID of the Account.
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [AccountResponse]
@@ -32,7 +32,7 @@ module YNAB
32
32
 
33
33
  # Single account
34
34
  # Returns a single account
35
- # @param budget_id The ID of the Budget.
35
+ # @param budget_id The ID of the Budget. \"last-used\" can also be used to specify the last used budget.
36
36
  # @param account_id The ID of the Account.
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(AccountResponse, Fixnum, Hash)>] AccountResponse data, response status code and response headers
@@ -79,7 +79,7 @@ module YNAB
79
79
  end
80
80
  # Account list
81
81
  # Returns all accounts
82
- # @param budget_id The ID of the Budget.
82
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
83
83
  # @param [Hash] opts the optional parameters
84
84
  # @return [AccountsResponse]
85
85
  def get_accounts(budget_id, opts = {})
@@ -89,7 +89,7 @@ module YNAB
89
89
 
90
90
  # Account list
91
91
  # Returns all accounts
92
- # @param budget_id The ID of the Budget.
92
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
93
93
  # @param [Hash] opts the optional parameters
94
94
  # @return [Array<(AccountsResponse, Fixnum, Hash)>] AccountsResponse data, response status code and response headers
95
95
  def get_accounts_with_http_info(budget_id, opts = {})
@@ -21,7 +21,7 @@ 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. \&quot;last-used\&quot; can also be used to specify the last used budget.
25
25
  # @param [Hash] opts the optional parameters
26
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]
@@ -32,7 +32,7 @@ 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. \&quot;last-used\&quot; can also be used to specify the last used budget.
36
36
  # @param [Hash] opts the optional parameters
37
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
@@ -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. \&quot;last-used\&quot; can also be used to specify the last used 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. \&quot;last-used\&quot; can also be used to specify the last used 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 = {})
@@ -21,7 +21,7 @@ module YNAB
21
21
  end
22
22
  # List categories
23
23
  # Returns all categories grouped by category group.
24
- # @param budget_id The ID of the Budget.
24
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [CategoriesResponse]
27
27
  def get_categories(budget_id, opts = {})
@@ -31,7 +31,7 @@ module YNAB
31
31
 
32
32
  # List categories
33
33
  # Returns all categories grouped by category group.
34
- # @param budget_id The ID of the Budget.
34
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(CategoriesResponse, Fixnum, Hash)>] CategoriesResponse data, response status code and response headers
37
37
  def get_categories_with_http_info(budget_id, opts = {})
@@ -73,7 +73,7 @@ module YNAB
73
73
  end
74
74
  # Single category
75
75
  # Returns a single category
76
- # @param budget_id The ID of the Budget.
76
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
77
77
  # @param category_id The ID of the Category.
78
78
  # @param [Hash] opts the optional parameters
79
79
  # @return [CategoryResponse]
@@ -84,7 +84,7 @@ module YNAB
84
84
 
85
85
  # Single category
86
86
  # Returns a single category
87
- # @param budget_id The ID of the Budget.
87
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
88
88
  # @param category_id The ID of the Category.
89
89
  # @param [Hash] opts the optional parameters
90
90
  # @return [Array<(CategoryResponse, Fixnum, Hash)>] CategoryResponse data, response status code and response headers
@@ -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. \&quot;last-used\&quot; can also be used to specify the last used budget.
25
25
  # @param month The Budget Month in ISO format (e.g. 2016-12-01). \&quot;current\&quot; 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. \&quot;last-used\&quot; can also be used to specify the last used budget.
36
36
  # @param month The Budget Month in ISO format (e.g. 2016-12-01). \&quot;current\&quot; 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,7 +79,7 @@ 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. \&quot;last-used\&quot; 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 ID of the Budget.
92
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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 ID of the Budget.
24
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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 ID of the Budget.
35
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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 ID of the Budget.
82
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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 ID of the Budget.
92
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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,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. \&quot;last-used\&quot; can also be used to specify the last used 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. \&quot;last-used\&quot; can also be used to specify the last used 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
@@ -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. \&quot;last-used\&quot; can also be used to specify the last used 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. \&quot;last-used\&quot; can also be used to specify the last used 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,7 +79,7 @@ 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. \&quot;last-used\&quot; 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 ID of the Budget.
92
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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,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. \&quot;last-used\&quot; can also be used to specify the last used 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. \&quot;last-used\&quot; can also be used to specify the last used 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,7 +79,7 @@ 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. \&quot;last-used\&quot; 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 ID of the Budget.
92
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; 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,7 +21,7 @@ module YNAB
21
21
  end
22
22
  # Bulk create transactions
23
23
  # Creates multiple transactions
24
- # @param budget_id The ID of the Budget.
24
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used 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
35
- # @param budget_id The ID of the Budget.
35
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used 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
@@ -79,7 +79,7 @@ module YNAB
79
79
  end
80
80
  # Create new transaction
81
81
  # Creates a transaction
82
- # @param budget_id The ID of the Budget.
82
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
83
83
  # @param transaction The Transaction to create.
84
84
  # @param [Hash] opts the optional parameters
85
85
  # @return [TransactionResponse]
@@ -90,7 +90,7 @@ module YNAB
90
90
 
91
91
  # Create new transaction
92
92
  # Creates a transaction
93
- # @param budget_id The ID of the Budget.
93
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
94
94
  # @param transaction The Transaction to create.
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
@@ -135,9 +135,67 @@ module YNAB
135
135
  end
136
136
  return data, status_code, headers
137
137
  end
138
+ # Single transaction
139
+ # Returns a single transaction
140
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
141
+ # @param transaction_id The ID of the Transaction.
142
+ # @param [Hash] opts the optional parameters
143
+ # @return [TransactionResponse]
144
+ def get_transaction_by_id(budget_id, transaction_id, opts = {})
145
+ data, _status_code, _headers = get_transaction_by_id_with_http_info(budget_id, transaction_id, opts)
146
+ data
147
+ end
148
+
149
+ # Single transaction
150
+ # Returns a single transaction
151
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
152
+ # @param transaction_id The ID of the Transaction.
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
155
+ def get_transaction_by_id_with_http_info(budget_id, transaction_id, opts = {})
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.get_transaction_by_id ...'
158
+ end
159
+ # verify the required parameter 'budget_id' is set
160
+ if @api_client.config.client_side_validation && budget_id.nil?
161
+ fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transaction_by_id"
162
+ end
163
+ # verify the required parameter 'transaction_id' is set
164
+ if @api_client.config.client_side_validation && transaction_id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.get_transaction_by_id"
166
+ end
167
+ # resource path
168
+ local_var_path = '/budgets/{budget_id}/transactions/{transaction_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
169
+
170
+ # query parameters
171
+ query_params = {}
172
+
173
+ # header parameters
174
+ header_params = {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
177
+
178
+ # form parameters
179
+ form_params = {}
180
+
181
+ # http body (model)
182
+ post_body = nil
183
+ auth_names = ['bearer']
184
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
185
+ :header_params => header_params,
186
+ :query_params => query_params,
187
+ :form_params => form_params,
188
+ :body => post_body,
189
+ :auth_names => auth_names,
190
+ :return_type => 'TransactionResponse')
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug "API called: TransactionsApi#get_transaction_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
193
+ end
194
+ return data, status_code, headers
195
+ end
138
196
  # List transactions
139
197
  # Returns budget transactions
140
- # @param budget_id The ID of the Budget.
198
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
141
199
  # @param [Hash] opts the optional parameters
142
200
  # @option opts [Date] :since_date Only return transactions on or after this date.
143
201
  # @option opts [String] :type Only return transactions of a certain type (&#39;uncategorized&#39; and &#39;unapproved&#39; are currently supported)
@@ -149,7 +207,7 @@ module YNAB
149
207
 
150
208
  # List transactions
151
209
  # Returns budget transactions
152
- # @param budget_id The ID of the Budget.
210
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
153
211
  # @param [Hash] opts the optional parameters
154
212
  # @option opts [Date] :since_date Only return transactions on or after this date.
155
213
  # @option opts [String] :type Only return transactions of a certain type (&#39;uncategorized&#39; and &#39;unapproved&#39; are currently supported)
@@ -198,7 +256,7 @@ module YNAB
198
256
  end
199
257
  # List account transactions
200
258
  # Returns all transactions for a specified account
201
- # @param budget_id The ID of the Budget.
259
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
202
260
  # @param account_id The ID of the Account.
203
261
  # @param [Hash] opts the optional parameters
204
262
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -211,7 +269,7 @@ module YNAB
211
269
 
212
270
  # List account transactions
213
271
  # Returns all transactions for a specified account
214
- # @param budget_id The ID of the Budget.
272
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
215
273
  # @param account_id The ID of the Account.
216
274
  # @param [Hash] opts the optional parameters
217
275
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -265,7 +323,7 @@ module YNAB
265
323
  end
266
324
  # List category transactions
267
325
  # Returns all transactions for a specified category
268
- # @param budget_id The ID of the Budget.
326
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
269
327
  # @param category_id The ID of the Category.
270
328
  # @param [Hash] opts the optional parameters
271
329
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -278,7 +336,7 @@ module YNAB
278
336
 
279
337
  # List category transactions
280
338
  # Returns all transactions for a specified category
281
- # @param budget_id The ID of the Budget.
339
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
282
340
  # @param category_id The ID of the Category.
283
341
  # @param [Hash] opts the optional parameters
284
342
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -330,67 +388,9 @@ module YNAB
330
388
  end
331
389
  return data, status_code, headers
332
390
  end
333
- # Single transaction
334
- # Returns a single transaction
335
- # @param budget_id The ID of the Budget.
336
- # @param transaction_id The ID of the Transaction.
337
- # @param [Hash] opts the optional parameters
338
- # @return [TransactionResponse]
339
- def get_transactions_by_id(budget_id, transaction_id, opts = {})
340
- data, _status_code, _headers = get_transactions_by_id_with_http_info(budget_id, transaction_id, opts)
341
- data
342
- end
343
-
344
- # Single transaction
345
- # Returns a single transaction
346
- # @param budget_id The ID of the Budget.
347
- # @param transaction_id The ID of the Transaction.
348
- # @param [Hash] opts the optional parameters
349
- # @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
350
- def get_transactions_by_id_with_http_info(budget_id, transaction_id, opts = {})
351
- if @api_client.config.debugging
352
- @api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_id ...'
353
- end
354
- # verify the required parameter 'budget_id' is set
355
- if @api_client.config.client_side_validation && budget_id.nil?
356
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_id"
357
- end
358
- # verify the required parameter 'transaction_id' is set
359
- if @api_client.config.client_side_validation && transaction_id.nil?
360
- fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.get_transactions_by_id"
361
- end
362
- # resource path
363
- local_var_path = '/budgets/{budget_id}/transactions/{transaction_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
364
-
365
- # query parameters
366
- query_params = {}
367
-
368
- # header parameters
369
- header_params = {}
370
- # HTTP header 'Accept' (if needed)
371
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
372
-
373
- # form parameters
374
- form_params = {}
375
-
376
- # http body (model)
377
- post_body = nil
378
- auth_names = ['bearer']
379
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
380
- :header_params => header_params,
381
- :query_params => query_params,
382
- :form_params => form_params,
383
- :body => post_body,
384
- :auth_names => auth_names,
385
- :return_type => 'TransactionResponse')
386
- if @api_client.config.debugging
387
- @api_client.config.logger.debug "API called: TransactionsApi#get_transactions_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
- end
389
- return data, status_code, headers
390
- end
391
391
  # List payee transactions
392
392
  # Returns all transactions for a specified payee
393
- # @param budget_id The ID of the Budget.
393
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
394
394
  # @param payee_id The ID of the Payee.
395
395
  # @param [Hash] opts the optional parameters
396
396
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -403,7 +403,7 @@ module YNAB
403
403
 
404
404
  # List payee transactions
405
405
  # Returns all transactions for a specified payee
406
- # @param budget_id The ID of the Budget.
406
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
407
407
  # @param payee_id The ID of the Payee.
408
408
  # @param [Hash] opts the optional parameters
409
409
  # @option opts [Date] :since_date Only return transactions on or after this date.
@@ -457,7 +457,7 @@ module YNAB
457
457
  end
458
458
  # Updates an existing transaction
459
459
  # Updates a transaction
460
- # @param budget_id The ID of the Budget.
460
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
461
461
  # @param transaction_id The ID of the Transaction.
462
462
  # @param transaction The Transaction to update.
463
463
  # @param [Hash] opts the optional parameters
@@ -469,7 +469,7 @@ module YNAB
469
469
 
470
470
  # Updates an existing transaction
471
471
  # Updates a transaction
472
- # @param budget_id The ID of the Budget.
472
+ # @param budget_id The ID of the Budget. \&quot;last-used\&quot; can also be used to specify the last used budget.
473
473
  # @param transaction_id The ID of the Transaction.
474
474
  # @param transaction The Transaction to update.
475
475
  # @param [Hash] opts the optional parameters
data/lib/ynab/version.rb CHANGED
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module YNAB
14
- VERSION = '1.3.0'
14
+ VERSION = '1.4.0'
15
15
  end
data/pkg/ynab-1.3.0.gem CHANGED
Binary file
data/spec-v1-swagger.json CHANGED
@@ -118,7 +118,7 @@
118
118
  {
119
119
  "name": "budget_id",
120
120
  "in": "path",
121
- "description": "The ID of the Budget.",
121
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
122
122
  "required": true,
123
123
  "type": "string",
124
124
  "format": "uuid"
@@ -166,7 +166,7 @@
166
166
  {
167
167
  "name": "budget_id",
168
168
  "in": "path",
169
- "description": "The ID of the Budget.",
169
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
170
170
  "required": true,
171
171
  "type": "string",
172
172
  "format": "uuid"
@@ -205,7 +205,7 @@
205
205
  {
206
206
  "name": "budget_id",
207
207
  "in": "path",
208
- "description": "The ID of the Budget.",
208
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
209
209
  "required": true,
210
210
  "type": "string",
211
211
  "format": "uuid"
@@ -244,7 +244,7 @@
244
244
  {
245
245
  "name": "budget_id",
246
246
  "in": "path",
247
- "description": "The ID of the Budget.",
247
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
248
248
  "required": true,
249
249
  "type": "string",
250
250
  "format": "uuid"
@@ -291,7 +291,7 @@
291
291
  {
292
292
  "name": "budget_id",
293
293
  "in": "path",
294
- "description": "The ID of the Budget.",
294
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
295
295
  "required": true,
296
296
  "type": "string",
297
297
  "format": "uuid"
@@ -330,7 +330,7 @@
330
330
  {
331
331
  "name": "budget_id",
332
332
  "in": "path",
333
- "description": "The ID of the Budget.",
333
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
334
334
  "required": true,
335
335
  "type": "string",
336
336
  "format": "uuid"
@@ -377,7 +377,7 @@
377
377
  {
378
378
  "name": "budget_id",
379
379
  "in": "path",
380
- "description": "The ID of the Budget.",
380
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
381
381
  "required": true,
382
382
  "type": "string",
383
383
  "format": "uuid"
@@ -416,7 +416,7 @@
416
416
  {
417
417
  "name": "budget_id",
418
418
  "in": "path",
419
- "description": "The ID of the Budget.",
419
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
420
420
  "required": true,
421
421
  "type": "string",
422
422
  "format": "uuid"
@@ -463,7 +463,7 @@
463
463
  {
464
464
  "name": "budget_id",
465
465
  "in": "path",
466
- "description": "The ID of the Budget.",
466
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
467
467
  "required": true,
468
468
  "type": "string",
469
469
  "format": "uuid"
@@ -502,7 +502,7 @@
502
502
  {
503
503
  "name": "budget_id",
504
504
  "in": "path",
505
- "description": "The ID of the Budget.",
505
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
506
506
  "required": true,
507
507
  "type": "string",
508
508
  "format": "uuid"
@@ -549,7 +549,7 @@
549
549
  {
550
550
  "name": "budget_id",
551
551
  "in": "path",
552
- "description": "The ID of the Budget.",
552
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
553
553
  "required": true,
554
554
  "type": "string",
555
555
  "format": "uuid"
@@ -596,7 +596,7 @@
596
596
  {
597
597
  "name": "budget_id",
598
598
  "in": "path",
599
- "description": "The ID of the Budget.",
599
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
600
600
  "required": true,
601
601
  "type": "string",
602
602
  "format": "uuid"
@@ -635,7 +635,7 @@
635
635
  {
636
636
  "name": "budget_id",
637
637
  "in": "path",
638
- "description": "The ID of the Budget.",
638
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
639
639
  "required": true,
640
640
  "type": "string",
641
641
  "format": "uuid"
@@ -683,7 +683,7 @@
683
683
  {
684
684
  "name": "budget_id",
685
685
  "in": "path",
686
- "description": "The ID of the Budget.",
686
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
687
687
  "required": true,
688
688
  "type": "string",
689
689
  "format": "uuid"
@@ -737,7 +737,7 @@
737
737
  {
738
738
  "name": "budget_id",
739
739
  "in": "path",
740
- "description": "The ID of the Budget.",
740
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
741
741
  "required": true,
742
742
  "type": "string",
743
743
  "format": "uuid"
@@ -785,7 +785,7 @@
785
785
  {
786
786
  "name": "budget_id",
787
787
  "in": "path",
788
- "description": "The ID of the Budget.",
788
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
789
789
  "required": true,
790
790
  "type": "string",
791
791
  "format": "uuid"
@@ -827,7 +827,7 @@
827
827
  {
828
828
  "name": "budget_id",
829
829
  "in": "path",
830
- "description": "The ID of the Budget.",
830
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
831
831
  "required": true,
832
832
  "type": "string",
833
833
  "format": "uuid"
@@ -891,7 +891,7 @@
891
891
  {
892
892
  "name": "budget_id",
893
893
  "in": "path",
894
- "description": "The ID of the Budget.",
894
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
895
895
  "required": true,
896
896
  "type": "string",
897
897
  "format": "uuid"
@@ -955,7 +955,7 @@
955
955
  {
956
956
  "name": "budget_id",
957
957
  "in": "path",
958
- "description": "The ID of the Budget.",
958
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
959
959
  "required": true,
960
960
  "type": "string",
961
961
  "format": "uuid"
@@ -1013,13 +1013,13 @@
1013
1013
  "tags": ["Transactions"],
1014
1014
  "summary": "Single transaction",
1015
1015
  "description": "Returns a single transaction",
1016
- "operationId": "getTransactionsById",
1016
+ "operationId": "getTransactionById",
1017
1017
  "produces": ["application/json"],
1018
1018
  "parameters": [
1019
1019
  {
1020
1020
  "name": "budget_id",
1021
1021
  "in": "path",
1022
- "description": "The ID of the Budget.",
1022
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
1023
1023
  "required": true,
1024
1024
  "type": "string",
1025
1025
  "format": "uuid"
@@ -1064,7 +1064,7 @@
1064
1064
  {
1065
1065
  "name": "budget_id",
1066
1066
  "in": "path",
1067
- "description": "The ID of the Budget.",
1067
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
1068
1068
  "required": true,
1069
1069
  "type": "string",
1070
1070
  "format": "uuid"
@@ -1114,7 +1114,7 @@
1114
1114
  {
1115
1115
  "name": "budget_id",
1116
1116
  "in": "path",
1117
- "description": "The ID of the Budget.",
1117
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
1118
1118
  "required": true,
1119
1119
  "type": "string",
1120
1120
  "format": "uuid"
@@ -1153,7 +1153,7 @@
1153
1153
  {
1154
1154
  "name": "budget_id",
1155
1155
  "in": "path",
1156
- "description": "The ID of the Budget.",
1156
+ "description": "The ID of the Budget. \"last-used\" can also be used to specify the last used budget.",
1157
1157
  "required": true,
1158
1158
  "type": "string",
1159
1159
  "format": "uuid"
@@ -70,7 +70,7 @@ describe 'transactions' do
70
70
  describe 'GET /budgets/{budget_id}/transaction/{transaction_id}' do
71
71
  it "returns a transaction" do
72
72
  VCR.use_cassette("transaction") do
73
- response = instance.get_transactions_by_id(budget_id, '81c374ff-74ab-4d6d-8d5a-ba3ad3fa68e4')
73
+ response = instance.get_transaction_by_id(budget_id, '81c374ff-74ab-4d6d-8d5a-ba3ad3fa68e4')
74
74
  expect(response.data.transaction).to be
75
75
  expect(response.data.transaction.amount).to eq -2000
76
76
  end
@@ -34,7 +34,7 @@ module {{moduleName}}
34
34
  @client = ApiClient.new(config)
35
35
  end
36
36
 
37
- def users
37
+ def user
38
38
  UserApi.new(@client)
39
39
  end
40
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ynab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - You Need A Budget, LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-09 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus