ynab 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,8 @@
1
+ # YnabApi::CategoryGroupsWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **category_groups** | [**Array<CategoryGroupWithCategories>**](CategoryGroupWithCategories.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::CategoryResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**CategoryWrapper**](CategoryWrapper.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::CategoryWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **category** | [**Category**](Category.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::CurrencyFormat
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **locale** | **String** | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::DateFormat
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **locale** | **String** | |
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # YnabApi::ErrorDetail
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **name** | **String** | |
8
+ **detail** | **String** | |
9
+
10
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::ErrorResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**ErrorDetail**](ErrorDetail.md) | |
7
+
8
+
@@ -0,0 +1,12 @@
1
+ # YnabApi::MonthDetail
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **month** | **Date** | |
7
+ **note** | **String** | |
8
+ **to_be_budgeted** | **Float** | The current balance of the account in milliunits format |
9
+ **age_of_money** | **Float** | |
10
+ **categories** | [**Array<Category>**](Category.md) | The budget month categories |
11
+
12
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::MonthDetailResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**MonthDetailWrapper**](MonthDetailWrapper.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::MonthDetailWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **month** | [**MonthDetail**](MonthDetail.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::MonthSummariesResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**MonthSummariesWrapper**](MonthSummariesWrapper.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::MonthSummariesWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **months** | [**Array<MonthSummary>**](MonthSummary.md) | |
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # YnabApi::MonthSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **month** | **Date** | |
7
+ **note** | **String** | |
8
+ **to_be_budgeted** | **Float** | The current balance of the account in milliunits format |
9
+ **age_of_money** | **Float** | |
10
+
11
+
data/docs/MonthsApi.md ADDED
@@ -0,0 +1,121 @@
1
+ # YnabApi::MonthsApi
2
+
3
+ All URIs are relative to *https://api.youneedabudget.com/papi/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_budget_month**](MonthsApi.md#get_budget_month) | **GET** /budgets/{budget_id}/months/{month} | Single budget month
8
+ [**get_budget_months**](MonthsApi.md#get_budget_months) | **GET** /budgets/{budget_id}/months | List budget months
9
+
10
+
11
+ # **get_budget_month**
12
+ > MonthDetailResponse get_budget_month(budget_id, month)
13
+
14
+ Single budget month
15
+
16
+ Returns a single budget month
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'ynab'
22
+ # setup authorization
23
+ YnabApi.configure do |config|
24
+ # Configure API key authorization: bearer
25
+ config.api_key['Authorization'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Authorization'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = YnabApi::MonthsApi.new
31
+
32
+ budget_id = "budget_id_example" # String | The ID of the Budget.
33
+
34
+ month = Date.parse("2013-10-20") # Date | The Budget Month. \"current\" can also be used to specify the current calendar month (UTC).
35
+
36
+
37
+ begin
38
+ #Single budget month
39
+ result = api_instance.get_budget_month(budget_id, month)
40
+ p result
41
+ rescue YnabApi::ApiError => e
42
+ puts "Exception when calling MonthsApi->get_budget_month: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
51
+ **month** | **Date**| The Budget Month. \"current\" can also be used to specify the current calendar month (UTC). |
52
+
53
+ ### Return type
54
+
55
+ [**MonthDetailResponse**](MonthDetailResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [bearer](../README.md#bearer)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: Not defined
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **get_budget_months**
69
+ > MonthSummariesResponse get_budget_months(budget_id)
70
+
71
+ List budget months
72
+
73
+ Returns all budget months
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'ynab'
79
+ # setup authorization
80
+ YnabApi.configure do |config|
81
+ # Configure API key authorization: bearer
82
+ config.api_key['Authorization'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Authorization'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = YnabApi::MonthsApi.new
88
+
89
+ budget_id = "budget_id_example" # String | The ID of the Budget.
90
+
91
+
92
+ begin
93
+ #List budget months
94
+ result = api_instance.get_budget_months(budget_id)
95
+ p result
96
+ rescue YnabApi::ApiError => e
97
+ puts "Exception when calling MonthsApi->get_budget_months: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
106
+
107
+ ### Return type
108
+
109
+ [**MonthSummariesResponse**](MonthSummariesResponse.md)
110
+
111
+ ### Authorization
112
+
113
+ [bearer](../README.md#bearer)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: Not defined
118
+ - **Accept**: application/json
119
+
120
+
121
+
data/docs/Payee.md ADDED
@@ -0,0 +1,10 @@
1
+ # YnabApi::Payee
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **name** | **String** | |
8
+ **transfer_account_id** | **String** | If a transfer payee, the account_id to which this payee transfers to |
9
+
10
+
@@ -0,0 +1,11 @@
1
+ # YnabApi::PayeeLocation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **payee_id** | **String** | |
8
+ **latitude** | **String** | |
9
+ **longitude** | **String** | |
10
+
11
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::PayeeLocationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**PayeeLocationWrapper**](PayeeLocationWrapper.md) | |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # YnabApi::PayeeLocationWrapper
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **payee_location** | [**PayeeLocation**](PayeeLocation.md) | |
7
+
8
+
@@ -0,0 +1,179 @@
1
+ # YnabApi::PayeeLocationsApi
2
+
3
+ All URIs are relative to *https://api.youneedabudget.com/papi/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_payee_location_by_id**](PayeeLocationsApi.md#get_payee_location_by_id) | **GET** /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location
8
+ [**get_payee_locations**](PayeeLocationsApi.md#get_payee_locations) | **GET** /budgets/{budget_id}/payee_locations | List payee locations
9
+ [**get_payee_locations_by_payee**](PayeeLocationsApi.md#get_payee_locations_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee
10
+
11
+
12
+ # **get_payee_location_by_id**
13
+ > PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id)
14
+
15
+ Single payee location
16
+
17
+ Returns a single payee location
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'ynab'
23
+ # setup authorization
24
+ YnabApi.configure do |config|
25
+ # Configure API key authorization: bearer
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = YnabApi::PayeeLocationsApi.new
32
+
33
+ budget_id = "budget_id_example" # String | The ID of the Budget.
34
+
35
+ payee_location_id = "payee_location_id_example" # String | ID of payee location
36
+
37
+
38
+ begin
39
+ #Single payee location
40
+ result = api_instance.get_payee_location_by_id(budget_id, payee_location_id)
41
+ p result
42
+ rescue YnabApi::ApiError => e
43
+ puts "Exception when calling PayeeLocationsApi->get_payee_location_by_id: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
52
+ **payee_location_id** | [**String**](.md)| ID of payee location |
53
+
54
+ ### Return type
55
+
56
+ [**PayeeLocationResponse**](PayeeLocationResponse.md)
57
+
58
+ ### Authorization
59
+
60
+ [bearer](../README.md#bearer)
61
+
62
+ ### HTTP request headers
63
+
64
+ - **Content-Type**: Not defined
65
+ - **Accept**: application/json
66
+
67
+
68
+
69
+ # **get_payee_locations**
70
+ > PayeeLocationsResponse get_payee_locations(budget_id)
71
+
72
+ List payee locations
73
+
74
+ Returns all payee locations
75
+
76
+ ### Example
77
+ ```ruby
78
+ # load the gem
79
+ require 'ynab'
80
+ # setup authorization
81
+ YnabApi.configure do |config|
82
+ # Configure API key authorization: bearer
83
+ config.api_key['Authorization'] = 'YOUR API KEY'
84
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
85
+ #config.api_key_prefix['Authorization'] = 'Bearer'
86
+ end
87
+
88
+ api_instance = YnabApi::PayeeLocationsApi.new
89
+
90
+ budget_id = "budget_id_example" # String | The ID of the Budget.
91
+
92
+
93
+ begin
94
+ #List payee locations
95
+ result = api_instance.get_payee_locations(budget_id)
96
+ p result
97
+ rescue YnabApi::ApiError => e
98
+ puts "Exception when calling PayeeLocationsApi->get_payee_locations: #{e}"
99
+ end
100
+ ```
101
+
102
+ ### Parameters
103
+
104
+ Name | Type | Description | Notes
105
+ ------------- | ------------- | ------------- | -------------
106
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
107
+
108
+ ### Return type
109
+
110
+ [**PayeeLocationsResponse**](PayeeLocationsResponse.md)
111
+
112
+ ### Authorization
113
+
114
+ [bearer](../README.md#bearer)
115
+
116
+ ### HTTP request headers
117
+
118
+ - **Content-Type**: Not defined
119
+ - **Accept**: application/json
120
+
121
+
122
+
123
+ # **get_payee_locations_by_payee**
124
+ > PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id)
125
+
126
+ List locations for a payee
127
+
128
+ Returns all payee locations for the specified payee
129
+
130
+ ### Example
131
+ ```ruby
132
+ # load the gem
133
+ require 'ynab'
134
+ # setup authorization
135
+ YnabApi.configure do |config|
136
+ # Configure API key authorization: bearer
137
+ config.api_key['Authorization'] = 'YOUR API KEY'
138
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
139
+ #config.api_key_prefix['Authorization'] = 'Bearer'
140
+ end
141
+
142
+ api_instance = YnabApi::PayeeLocationsApi.new
143
+
144
+ budget_id = "budget_id_example" # String | The ID of the Budget.
145
+
146
+ payee_id = "payee_id_example" # String | ID of payee
147
+
148
+
149
+ begin
150
+ #List locations for a payee
151
+ result = api_instance.get_payee_locations_by_payee(budget_id, payee_id)
152
+ p result
153
+ rescue YnabApi::ApiError => e
154
+ puts "Exception when calling PayeeLocationsApi->get_payee_locations_by_payee: #{e}"
155
+ end
156
+ ```
157
+
158
+ ### Parameters
159
+
160
+ Name | Type | Description | Notes
161
+ ------------- | ------------- | ------------- | -------------
162
+ **budget_id** | [**String**](.md)| The ID of the Budget. |
163
+ **payee_id** | [**String**](.md)| ID of payee |
164
+
165
+ ### Return type
166
+
167
+ [**PayeeLocationsResponse**](PayeeLocationsResponse.md)
168
+
169
+ ### Authorization
170
+
171
+ [bearer](../README.md#bearer)
172
+
173
+ ### HTTP request headers
174
+
175
+ - **Content-Type**: Not defined
176
+ - **Accept**: application/json
177
+
178
+
179
+