ynab 0.1.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.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +44 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +57 -0
  6. data/Rakefile +31 -0
  7. data/config.json +10 -0
  8. data/docs/Account.md +16 -0
  9. data/docs/AccountResponse.md +8 -0
  10. data/docs/AccountWrapper.md +8 -0
  11. data/docs/AccountsApi.md +121 -0
  12. data/docs/AccountsResponse.md +8 -0
  13. data/docs/AccountsWrapper.md +8 -0
  14. data/docs/BudgetDetail.md +22 -0
  15. data/docs/BudgetDetailResponse.md +8 -0
  16. data/docs/BudgetDetailWrapper.md +9 -0
  17. data/docs/BudgetSummary.md +12 -0
  18. data/docs/BudgetSummaryResponse.md +8 -0
  19. data/docs/BudgetSummaryWrapper.md +8 -0
  20. data/docs/BudgetsApi.md +116 -0
  21. data/docs/BulkIdWrapper.md +8 -0
  22. data/docs/BulkIds.md +9 -0
  23. data/docs/BulkResponse.md +8 -0
  24. data/docs/BulkTransactionCreateResponse.md +8 -0
  25. data/docs/BulkTransactionIds.md +8 -0
  26. data/docs/BulkTransactions.md +8 -0
  27. data/docs/CategoriesApi.md +121 -0
  28. data/docs/CategoriesResponse.md +8 -0
  29. data/docs/Category.md +15 -0
  30. data/docs/CategoryGroup.md +10 -0
  31. data/docs/CategoryGroupWithCategories.md +11 -0
  32. data/docs/CategoryGroupsWrapper.md +8 -0
  33. data/docs/CategoryResponse.md +8 -0
  34. data/docs/CategoryWrapper.md +8 -0
  35. data/docs/CurrencyFormat.md +8 -0
  36. data/docs/DateFormat.md +8 -0
  37. data/docs/ErrorDetail.md +10 -0
  38. data/docs/ErrorResponse.md +8 -0
  39. data/docs/MonthDetail.md +12 -0
  40. data/docs/MonthDetailResponse.md +8 -0
  41. data/docs/MonthDetailWrapper.md +8 -0
  42. data/docs/MonthSummariesResponse.md +8 -0
  43. data/docs/MonthSummariesWrapper.md +8 -0
  44. data/docs/MonthSummary.md +11 -0
  45. data/docs/MonthsApi.md +121 -0
  46. data/docs/Payee.md +10 -0
  47. data/docs/PayeeLocation.md +11 -0
  48. data/docs/PayeeLocationResponse.md +8 -0
  49. data/docs/PayeeLocationWrapper.md +8 -0
  50. data/docs/PayeeLocationsApi.md +179 -0
  51. data/docs/PayeeLocationsResponse.md +8 -0
  52. data/docs/PayeeLocationsWrapper.md +8 -0
  53. data/docs/PayeeResponse.md +8 -0
  54. data/docs/PayeeWrapper.md +8 -0
  55. data/docs/PayeesApi.md +121 -0
  56. data/docs/PayeesResponse.md +8 -0
  57. data/docs/PayeesWrapper.md +8 -0
  58. data/docs/SaveTransaction.md +18 -0
  59. data/docs/SaveTransactionWrapper.md +8 -0
  60. data/docs/ScheduledSubTransaction.md +14 -0
  61. data/docs/ScheduledTransactionDetail.md +19 -0
  62. data/docs/ScheduledTransactionResponse.md +8 -0
  63. data/docs/ScheduledTransactionSummary.md +18 -0
  64. data/docs/ScheduledTransactionWrapper.md +8 -0
  65. data/docs/ScheduledTransactionsApi.md +121 -0
  66. data/docs/ScheduledTransactionsResponse.md +8 -0
  67. data/docs/ScheduledTransactionsWrapper.md +8 -0
  68. data/docs/SubTransaction.md +14 -0
  69. data/docs/TransactionDetail.md +20 -0
  70. data/docs/TransactionResponse.md +8 -0
  71. data/docs/TransactionSummary.md +19 -0
  72. data/docs/TransactionWrapper.md +8 -0
  73. data/docs/TransactionsApi.md +428 -0
  74. data/docs/TransactionsResponse.md +8 -0
  75. data/docs/TransactionsWrapper.md +8 -0
  76. data/examples/budget-list.rb +25 -0
  77. data/examples/budget-month.rb +36 -0
  78. data/examples/category-balance.rb +27 -0
  79. data/lib/ynab.rb +136 -0
  80. data/lib/ynab/api/accounts_api.rb +135 -0
  81. data/lib/ynab/api/budgets_api.rb +126 -0
  82. data/lib/ynab/api/categories_api.rb +135 -0
  83. data/lib/ynab/api/months_api.rb +135 -0
  84. data/lib/ynab/api/payee_locations_api.rb +194 -0
  85. data/lib/ynab/api/payees_api.rb +135 -0
  86. data/lib/ynab/api/scheduled_transactions_api.rb +135 -0
  87. data/lib/ynab/api/transactions_api.rb +451 -0
  88. data/lib/ynab/api_client.rb +392 -0
  89. data/lib/ynab/api_error.rb +38 -0
  90. data/lib/ynab/configuration.rb +209 -0
  91. data/lib/ynab/models/account.rb +343 -0
  92. data/lib/ynab/models/account_response.rb +193 -0
  93. data/lib/ynab/models/account_wrapper.rb +193 -0
  94. data/lib/ynab/models/accounts_response.rb +193 -0
  95. data/lib/ynab/models/accounts_wrapper.rb +195 -0
  96. data/lib/ynab/models/budget_detail.rb +345 -0
  97. data/lib/ynab/models/budget_detail_response.rb +193 -0
  98. data/lib/ynab/models/budget_detail_wrapper.rb +208 -0
  99. data/lib/ynab/models/budget_summary.rb +235 -0
  100. data/lib/ynab/models/budget_summary_response.rb +193 -0
  101. data/lib/ynab/models/budget_summary_wrapper.rb +195 -0
  102. data/lib/ynab/models/bulk_id_wrapper.rb +193 -0
  103. data/lib/ynab/models/bulk_ids.rb +213 -0
  104. data/lib/ynab/models/bulk_response.rb +193 -0
  105. data/lib/ynab/models/bulk_transaction_create_response.rb +193 -0
  106. data/lib/ynab/models/bulk_transaction_ids.rb +195 -0
  107. data/lib/ynab/models/bulk_transactions.rb +195 -0
  108. data/lib/ynab/models/categories_response.rb +193 -0
  109. data/lib/ynab/models/category.rb +295 -0
  110. data/lib/ynab/models/category_group.rb +222 -0
  111. data/lib/ynab/models/category_group_with_categories.rb +239 -0
  112. data/lib/ynab/models/category_groups_wrapper.rb +195 -0
  113. data/lib/ynab/models/category_response.rb +193 -0
  114. data/lib/ynab/models/category_wrapper.rb +193 -0
  115. data/lib/ynab/models/currency_format.rb +193 -0
  116. data/lib/ynab/models/date_format.rb +193 -0
  117. data/lib/ynab/models/error_detail.rb +221 -0
  118. data/lib/ynab/models/error_response.rb +193 -0
  119. data/lib/ynab/models/month_detail.rb +253 -0
  120. data/lib/ynab/models/month_detail_response.rb +193 -0
  121. data/lib/ynab/models/month_detail_wrapper.rb +193 -0
  122. data/lib/ynab/models/month_summaries_response.rb +193 -0
  123. data/lib/ynab/models/month_summaries_wrapper.rb +195 -0
  124. data/lib/ynab/models/month_summary.rb +236 -0
  125. data/lib/ynab/models/payee.rb +222 -0
  126. data/lib/ynab/models/payee_location.rb +235 -0
  127. data/lib/ynab/models/payee_location_response.rb +193 -0
  128. data/lib/ynab/models/payee_location_wrapper.rb +193 -0
  129. data/lib/ynab/models/payee_locations_response.rb +193 -0
  130. data/lib/ynab/models/payee_locations_wrapper.rb +195 -0
  131. data/lib/ynab/models/payee_response.rb +193 -0
  132. data/lib/ynab/models/payee_wrapper.rb +193 -0
  133. data/lib/ynab/models/payees_response.rb +193 -0
  134. data/lib/ynab/models/payees_wrapper.rb +195 -0
  135. data/lib/ynab/models/save_transaction.rb +346 -0
  136. data/lib/ynab/models/save_transaction_wrapper.rb +193 -0
  137. data/lib/ynab/models/scheduled_sub_transaction.rb +279 -0
  138. data/lib/ynab/models/scheduled_transaction_detail.rb +387 -0
  139. data/lib/ynab/models/scheduled_transaction_response.rb +193 -0
  140. data/lib/ynab/models/scheduled_transaction_summary.rb +370 -0
  141. data/lib/ynab/models/scheduled_transaction_wrapper.rb +193 -0
  142. data/lib/ynab/models/scheduled_transactions_response.rb +193 -0
  143. data/lib/ynab/models/scheduled_transactions_wrapper.rb +195 -0
  144. data/lib/ynab/models/sub_transaction.rb +279 -0
  145. data/lib/ynab/models/transaction_detail.rb +401 -0
  146. data/lib/ynab/models/transaction_response.rb +193 -0
  147. data/lib/ynab/models/transaction_summary.rb +384 -0
  148. data/lib/ynab/models/transaction_wrapper.rb +193 -0
  149. data/lib/ynab/models/transactions_response.rb +193 -0
  150. data/lib/ynab/models/transactions_wrapper.rb +195 -0
  151. data/lib/ynab/version.rb +15 -0
  152. data/pkg/ynab-0.1.0.gem +0 -0
  153. data/spec-v1-swagger.json +2121 -0
  154. data/spec/api/accounts_spec.rb +56 -0
  155. data/spec/api/budgets_spec.rb +55 -0
  156. data/spec/api/categories_spec.rb +57 -0
  157. data/spec/api/months_spec.rb +57 -0
  158. data/spec/api/payee_locations_spec.rb +57 -0
  159. data/spec/api/payees_spec.rb +56 -0
  160. data/spec/api/scheduled_transactions_spec.rb +56 -0
  161. data/spec/api/transactions_spec.rb +122 -0
  162. data/spec/fixtures/.DS_Store +0 -0
  163. data/spec/fixtures/vcr_cassettes/account.yml +46 -0
  164. data/spec/fixtures/vcr_cassettes/accounts.yml +46 -0
  165. data/spec/fixtures/vcr_cassettes/accounts_unauthorized.yml +49 -0
  166. data/spec/fixtures/vcr_cassettes/budget.yml +1413 -0
  167. data/spec/fixtures/vcr_cassettes/budgets.yml +49 -0
  168. data/spec/fixtures/vcr_cassettes/budgets_unauthorized.yml +49 -0
  169. data/spec/fixtures/vcr_cassettes/bulk_transactions.yml +46 -0
  170. data/spec/fixtures/vcr_cassettes/categories.yml +67 -0
  171. data/spec/fixtures/vcr_cassettes/categories_unauthorized.yml +49 -0
  172. data/spec/fixtures/vcr_cassettes/category.yml +46 -0
  173. data/spec/fixtures/vcr_cassettes/create_transaction.yml +46 -0
  174. data/spec/fixtures/vcr_cassettes/month.yml +59 -0
  175. data/spec/fixtures/vcr_cassettes/months.yml +47 -0
  176. data/spec/fixtures/vcr_cassettes/months_unauthorized.yml +49 -0
  177. data/spec/fixtures/vcr_cassettes/payee.yml +47 -0
  178. data/spec/fixtures/vcr_cassettes/payee_location.yml +46 -0
  179. data/spec/fixtures/vcr_cassettes/payee_locations.yml +46 -0
  180. data/spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml +49 -0
  181. data/spec/fixtures/vcr_cassettes/payees.yml +51 -0
  182. data/spec/fixtures/vcr_cassettes/payees_unauthorized.yml +49 -0
  183. data/spec/fixtures/vcr_cassettes/scheduled_transaction.yml +46 -0
  184. data/spec/fixtures/vcr_cassettes/scheduled_transactions.yml +46 -0
  185. data/spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml +49 -0
  186. data/spec/fixtures/vcr_cassettes/transaction.yml +46 -0
  187. data/spec/fixtures/vcr_cassettes/transactions.yml +46 -0
  188. data/spec/fixtures/vcr_cassettes/transactions_unauthorized.yml +49 -0
  189. data/spec/fixtures/vcr_cassettes/update_transaction.yml +46 -0
  190. data/spec/spec_helper.rb +18 -0
  191. data/swagger-templates/api_client.mustache +386 -0
  192. data/swagger-templates/gemspec.mustache +37 -0
  193. data/ynab.gemspec +40 -0
  194. metadata +353 -0
@@ -0,0 +1,20 @@
1
+ # YnabApi::TransactionDetail
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **date** | **Date** | |
8
+ **amount** | **Float** | The transaction amount in milliunits format |
9
+ **memo** | **String** | |
10
+ **cleared** | **String** | The cleared status of the transaction |
11
+ **approved** | **BOOLEAN** | Whether or not the transaction is approved |
12
+ **flag_color** | **String** | |
13
+ **account_id** | **String** | |
14
+ **payee_id** | **String** | |
15
+ **category_id** | **String** | |
16
+ **transfer_account_id** | **String** | |
17
+ **import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurance]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. |
18
+ **subtransactions** | [**Array<SubTransaction>**](SubTransaction.md) | If a split transaction, the sub-transactions. |
19
+
20
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::TransactionResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**TransactionWrapper**](TransactionWrapper.md) | |
7
+
8
+
@@ -0,0 +1,19 @@
1
+ # YnabApi::TransactionSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **date** | **Date** | |
8
+ **amount** | **Float** | The transaction amount in milliunits format |
9
+ **memo** | **String** | |
10
+ **cleared** | **String** | The cleared status of the transaction |
11
+ **approved** | **BOOLEAN** | Whether or not the transaction is approved |
12
+ **flag_color** | **String** | |
13
+ **account_id** | **String** | |
14
+ **payee_id** | **String** | |
15
+ **category_id** | **String** | |
16
+ **transfer_account_id** | **String** | |
17
+ **import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurance]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. |
18
+
19
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::TransactionWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **transaction** | [**TransactionDetail**](TransactionDetail.md) | |
7
+
8
+
@@ -0,0 +1,428 @@
1
+ # YnabApi::TransactionsApi
2
+
3
+ All URIs are relative to *https://api.youneedabudget.com/papi/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**bulk_create_transactions**](TransactionsApi.md#bulk_create_transactions) | **POST** /budgets/{budget_id}/transactions/bulk | Bulk create transactions
8
+ [**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /budgets/{budget_id}/transactions | Create new transaction
9
+ [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions
10
+ [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions
11
+ [**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
+ [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction
14
+
15
+
16
+ # **bulk_create_transactions**
17
+ > BulkResponse bulk_create_transactions(budget_id, transactions)
18
+
19
+ Bulk create transactions
20
+
21
+ Creates multiple transactions
22
+
23
+ ### Example
24
+ ```ruby
25
+ # load the gem
26
+ require 'ynab'
27
+ # setup authorization
28
+ YnabApi.configure do |config|
29
+ # Configure API key authorization: bearer
30
+ config.api_key['Authorization'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ #config.api_key_prefix['Authorization'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = YnabApi::TransactionsApi.new
36
+
37
+ budget_id = "budget_id_example" # String | The ID of the Budget.
38
+
39
+ transactions = YnabApi::BulkTransactions.new # BulkTransactions | The list of Transactions to create.
40
+
41
+
42
+ begin
43
+ #Bulk create transactions
44
+ result = api_instance.bulk_create_transactions(budget_id, transactions)
45
+ p result
46
+ rescue YnabApi::ApiError => e
47
+ puts "Exception when calling TransactionsApi->bulk_create_transactions: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
56
+ **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of Transactions to create. |
57
+
58
+ ### Return type
59
+
60
+ [**BulkResponse**](BulkResponse.md)
61
+
62
+ ### Authorization
63
+
64
+ [bearer](../README.md#bearer)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: application/json
70
+
71
+
72
+
73
+ # **create_transaction**
74
+ > TransactionResponse create_transaction(budget_id, transaction)
75
+
76
+ Create new transaction
77
+
78
+ Creates a transaction
79
+
80
+ ### Example
81
+ ```ruby
82
+ # load the gem
83
+ require 'ynab'
84
+ # setup authorization
85
+ YnabApi.configure do |config|
86
+ # Configure API key authorization: bearer
87
+ config.api_key['Authorization'] = 'YOUR API KEY'
88
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
89
+ #config.api_key_prefix['Authorization'] = 'Bearer'
90
+ end
91
+
92
+ api_instance = YnabApi::TransactionsApi.new
93
+
94
+ budget_id = "budget_id_example" # String | The ID of the Budget.
95
+
96
+ transaction = YnabApi::SaveTransactionWrapper.new # SaveTransactionWrapper | The Transaction to create.
97
+
98
+
99
+ begin
100
+ #Create new transaction
101
+ result = api_instance.create_transaction(budget_id, transaction)
102
+ p result
103
+ rescue YnabApi::ApiError => e
104
+ puts "Exception when calling TransactionsApi->create_transaction: #{e}"
105
+ end
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ Name | Type | Description | Notes
111
+ ------------- | ------------- | ------------- | -------------
112
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
113
+ **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to create. |
114
+
115
+ ### Return type
116
+
117
+ [**TransactionResponse**](TransactionResponse.md)
118
+
119
+ ### Authorization
120
+
121
+ [bearer](../README.md#bearer)
122
+
123
+ ### HTTP request headers
124
+
125
+ - **Content-Type**: Not defined
126
+ - **Accept**: application/json
127
+
128
+
129
+
130
+ # **get_transactions**
131
+ > TransactionsResponse get_transactions(budget_id, opts)
132
+
133
+ List transactions
134
+
135
+ Returns budget transactions
136
+
137
+ ### Example
138
+ ```ruby
139
+ # load the gem
140
+ require 'ynab'
141
+ # setup authorization
142
+ YnabApi.configure do |config|
143
+ # Configure API key authorization: bearer
144
+ config.api_key['Authorization'] = 'YOUR API KEY'
145
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
146
+ #config.api_key_prefix['Authorization'] = 'Bearer'
147
+ end
148
+
149
+ api_instance = YnabApi::TransactionsApi.new
150
+
151
+ budget_id = "budget_id_example" # String | The ID of the Budget.
152
+
153
+ opts = {
154
+ since_date: Date.parse("2013-10-20"), # Date | Only return transactions on or after this date.
155
+ type: "type_example" # String | Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')
156
+ }
157
+
158
+ begin
159
+ #List transactions
160
+ result = api_instance.get_transactions(budget_id, opts)
161
+ p result
162
+ rescue YnabApi::ApiError => e
163
+ puts "Exception when calling TransactionsApi->get_transactions: #{e}"
164
+ end
165
+ ```
166
+
167
+ ### Parameters
168
+
169
+ Name | Type | Description | Notes
170
+ ------------- | ------------- | ------------- | -------------
171
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
172
+ **since_date** | **Date**| Only return transactions on or after this date. | [optional]
173
+ **type** | **String**| Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') | [optional]
174
+
175
+ ### Return type
176
+
177
+ [**TransactionsResponse**](TransactionsResponse.md)
178
+
179
+ ### Authorization
180
+
181
+ [bearer](../README.md#bearer)
182
+
183
+ ### HTTP request headers
184
+
185
+ - **Content-Type**: Not defined
186
+ - **Accept**: application/json
187
+
188
+
189
+
190
+ # **get_transactions_by_account**
191
+ > TransactionsResponse get_transactions_by_account(budget_id, account_id, opts)
192
+
193
+ List account transactions
194
+
195
+ Returns all transactions for a specified account
196
+
197
+ ### Example
198
+ ```ruby
199
+ # load the gem
200
+ require 'ynab'
201
+ # setup authorization
202
+ YnabApi.configure do |config|
203
+ # Configure API key authorization: bearer
204
+ config.api_key['Authorization'] = 'YOUR API KEY'
205
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
206
+ #config.api_key_prefix['Authorization'] = 'Bearer'
207
+ end
208
+
209
+ api_instance = YnabApi::TransactionsApi.new
210
+
211
+ budget_id = "budget_id_example" # String | The ID of the Budget.
212
+
213
+ account_id = "account_id_example" # String | The ID of the Account.
214
+
215
+ opts = {
216
+ since_date: Date.parse("2013-10-20") # Date | Only return transactions on or after this date.
217
+ }
218
+
219
+ begin
220
+ #List account transactions
221
+ result = api_instance.get_transactions_by_account(budget_id, account_id, opts)
222
+ p result
223
+ rescue YnabApi::ApiError => e
224
+ puts "Exception when calling TransactionsApi->get_transactions_by_account: #{e}"
225
+ end
226
+ ```
227
+
228
+ ### Parameters
229
+
230
+ Name | Type | Description | Notes
231
+ ------------- | ------------- | ------------- | -------------
232
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
233
+ **account_id** | [**String**](.md)| The ID of the Account. |
234
+ **since_date** | **Date**| Only return transactions on or after this date. | [optional]
235
+
236
+ ### Return type
237
+
238
+ [**TransactionsResponse**](TransactionsResponse.md)
239
+
240
+ ### Authorization
241
+
242
+ [bearer](../README.md#bearer)
243
+
244
+ ### HTTP request headers
245
+
246
+ - **Content-Type**: Not defined
247
+ - **Accept**: application/json
248
+
249
+
250
+
251
+ # **get_transactions_by_category**
252
+ > TransactionsResponse get_transactions_by_category(budget_id, category_id, opts)
253
+
254
+ List category transactions
255
+
256
+ Returns all transactions for a specified category
257
+
258
+ ### Example
259
+ ```ruby
260
+ # load the gem
261
+ require 'ynab'
262
+ # setup authorization
263
+ YnabApi.configure do |config|
264
+ # Configure API key authorization: bearer
265
+ config.api_key['Authorization'] = 'YOUR API KEY'
266
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
267
+ #config.api_key_prefix['Authorization'] = 'Bearer'
268
+ end
269
+
270
+ api_instance = YnabApi::TransactionsApi.new
271
+
272
+ budget_id = "budget_id_example" # String | The ID of the Budget.
273
+
274
+ category_id = "category_id_example" # String | The ID of the Category.
275
+
276
+ opts = {
277
+ since_date: Date.parse("2013-10-20") # Date | Only return transactions on or after this date.
278
+ }
279
+
280
+ begin
281
+ #List category transactions
282
+ result = api_instance.get_transactions_by_category(budget_id, category_id, opts)
283
+ p result
284
+ rescue YnabApi::ApiError => e
285
+ puts "Exception when calling TransactionsApi->get_transactions_by_category: #{e}"
286
+ end
287
+ ```
288
+
289
+ ### Parameters
290
+
291
+ Name | Type | Description | Notes
292
+ ------------- | ------------- | ------------- | -------------
293
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
294
+ **category_id** | [**String**](.md)| The ID of the Category. |
295
+ **since_date** | **Date**| Only return transactions on or after this date. | [optional]
296
+
297
+ ### Return type
298
+
299
+ [**TransactionsResponse**](TransactionsResponse.md)
300
+
301
+ ### Authorization
302
+
303
+ [bearer](../README.md#bearer)
304
+
305
+ ### HTTP request headers
306
+
307
+ - **Content-Type**: Not defined
308
+ - **Accept**: application/json
309
+
310
+
311
+
312
+ # **get_transactions_by_id**
313
+ > TransactionResponse get_transactions_by_id(budget_id, transaction_id)
314
+
315
+ Single transaction
316
+
317
+ Returns a single transaction
318
+
319
+ ### Example
320
+ ```ruby
321
+ # load the gem
322
+ require 'ynab'
323
+ # setup authorization
324
+ YnabApi.configure do |config|
325
+ # Configure API key authorization: bearer
326
+ config.api_key['Authorization'] = 'YOUR API KEY'
327
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
328
+ #config.api_key_prefix['Authorization'] = 'Bearer'
329
+ end
330
+
331
+ api_instance = YnabApi::TransactionsApi.new
332
+
333
+ budget_id = "budget_id_example" # String | The ID of the Budget.
334
+
335
+ transaction_id = "transaction_id_example" # String | The ID of the Transaction.
336
+
337
+
338
+ begin
339
+ #Single transaction
340
+ result = api_instance.get_transactions_by_id(budget_id, transaction_id)
341
+ p result
342
+ rescue YnabApi::ApiError => e
343
+ puts "Exception when calling TransactionsApi->get_transactions_by_id: #{e}"
344
+ end
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+ Name | Type | Description | Notes
350
+ ------------- | ------------- | ------------- | -------------
351
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
352
+ **transaction_id** | [**String**](.md)| The ID of the Transaction. |
353
+
354
+ ### Return type
355
+
356
+ [**TransactionResponse**](TransactionResponse.md)
357
+
358
+ ### Authorization
359
+
360
+ [bearer](../README.md#bearer)
361
+
362
+ ### HTTP request headers
363
+
364
+ - **Content-Type**: Not defined
365
+ - **Accept**: application/json
366
+
367
+
368
+
369
+ # **update_transaction**
370
+ > TransactionResponse update_transaction(budget_id, transaction_id, transaction)
371
+
372
+ Updates an existing transaction
373
+
374
+ Updates a transaction
375
+
376
+ ### Example
377
+ ```ruby
378
+ # load the gem
379
+ require 'ynab'
380
+ # setup authorization
381
+ YnabApi.configure do |config|
382
+ # Configure API key authorization: bearer
383
+ config.api_key['Authorization'] = 'YOUR API KEY'
384
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
385
+ #config.api_key_prefix['Authorization'] = 'Bearer'
386
+ end
387
+
388
+ api_instance = YnabApi::TransactionsApi.new
389
+
390
+ budget_id = "budget_id_example" # String | The ID of the Budget.
391
+
392
+ transaction_id = "transaction_id_example" # String | The ID of the Transaction.
393
+
394
+ transaction = YnabApi::SaveTransactionWrapper.new # SaveTransactionWrapper | The Transaction to update.
395
+
396
+
397
+ begin
398
+ #Updates an existing transaction
399
+ result = api_instance.update_transaction(budget_id, transaction_id, transaction)
400
+ p result
401
+ rescue YnabApi::ApiError => e
402
+ puts "Exception when calling TransactionsApi->update_transaction: #{e}"
403
+ end
404
+ ```
405
+
406
+ ### Parameters
407
+
408
+ Name | Type | Description | Notes
409
+ ------------- | ------------- | ------------- | -------------
410
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
411
+ **transaction_id** | [**String**](.md)| The ID of the Transaction. |
412
+ **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to update. |
413
+
414
+ ### Return type
415
+
416
+ [**TransactionResponse**](TransactionResponse.md)
417
+
418
+ ### Authorization
419
+
420
+ [bearer](../README.md#bearer)
421
+
422
+ ### HTTP request headers
423
+
424
+ - **Content-Type**: Not defined
425
+ - **Accept**: application/json
426
+
427
+
428
+