ynab 3.9.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +3 -1
- data/README.md +47 -39
- data/Rakefile +1 -1
- data/docs/Account.md +3 -3
- data/docs/AccountsApi.md +12 -12
- data/docs/CategoriesApi.md +89 -25
- data/docs/Category.md +4 -3
- data/docs/CategoryGroupWithCategories.md +1 -1
- data/docs/ExistingCategory.md +12 -0
- data/docs/MoneyMovement.md +16 -0
- data/docs/MoneyMovementGroup.md +12 -0
- data/docs/MoneyMovementGroupsResponse.md +8 -0
- data/docs/MoneyMovementGroupsResponseData.md +9 -0
- data/docs/MoneyMovementsApi.md +89 -0
- data/docs/{BudgetSettingsResponse.md → MoneyMovementsResponse.md} +2 -2
- data/docs/MoneyMovementsResponseData.md +9 -0
- data/docs/MonthDetail.md +2 -2
- data/docs/MonthSummary.md +1 -1
- data/docs/MonthsApi.md +13 -13
- data/docs/NewCategory.md +12 -0
- data/docs/PatchCategoryGroupWrapper.md +8 -0
- data/docs/PatchCategoryWrapper.md +1 -1
- data/docs/PayeeLocationsApi.md +12 -12
- data/docs/PayeesApi.md +11 -11
- data/docs/{BudgetDetail.md → PlanDetail.md} +4 -4
- data/docs/PlanDetailResponse.md +8 -0
- data/docs/{BudgetDetailResponseData.md → PlanDetailResponseData.md} +2 -2
- data/docs/{BudgetSettings.md → PlanSettings.md} +1 -1
- data/docs/{BudgetDetailResponse.md → PlanSettingsResponse.md} +2 -2
- data/docs/PlanSettingsResponseData.md +8 -0
- data/docs/PlanSummary.md +15 -0
- data/docs/PlanSummaryResponse.md +8 -0
- data/docs/PlanSummaryResponseData.md +9 -0
- data/docs/PlansApi.md +68 -0
- data/docs/PostCategoryGroupWrapper.md +8 -0
- data/docs/PostCategoryWrapper.md +8 -0
- data/docs/SaveCategory.md +2 -1
- data/docs/SaveCategoryGroup.md +8 -0
- data/docs/SaveCategoryGroupResponse.md +8 -0
- data/docs/SaveCategoryGroupResponseData.md +9 -0
- data/docs/SaveMonthCategory.md +1 -1
- data/docs/ScheduledTransactionsApi.md +20 -20
- data/docs/TransactionsApi.md +48 -48
- data/docs/UserApi.md +2 -2
- data/examples/category-balance.rb +2 -2
- data/examples/create-multiple-transactions.rb +2 -2
- data/examples/create-transaction.rb +2 -2
- data/examples/{budget-list.rb → plan-list.rb} +6 -6
- data/examples/{budget-month.rb → plan-month.rb} +9 -10
- data/examples/update-category-budgeted.rb +2 -2
- data/examples/update-multiple-transactions.rb +3 -3
- data/lib/ynab/api/accounts_api.rb +33 -34
- data/lib/ynab/api/categories_api.rb +293 -66
- data/lib/ynab/api/deprecated_api.rb +11 -11
- data/lib/ynab/api/money_movements_api.rb +282 -0
- data/lib/ynab/api/months_api.rb +35 -36
- data/lib/ynab/api/payee_locations_api.rb +33 -34
- data/lib/ynab/api/payees_api.rb +31 -32
- data/lib/ynab/api/{budgets_api.rb → plans_api.rb} +54 -55
- data/lib/ynab/api/scheduled_transactions_api.rb +55 -56
- data/lib/ynab/api/transactions_api.rb +130 -131
- data/lib/ynab/api/user_api.rb +2 -3
- data/lib/ynab/api_client.rb +0 -2
- data/lib/ynab/api_model_base.rb +85 -0
- data/lib/ynab/models/account.rb +4 -81
- data/lib/ynab/models/account_response.rb +1 -75
- data/lib/ynab/models/account_response_data.rb +1 -75
- data/lib/ynab/models/accounts_response.rb +1 -75
- data/lib/ynab/models/accounts_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response.rb +1 -75
- data/lib/ynab/models/bulk_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -75
- data/lib/ynab/models/bulk_transactions.rb +1 -75
- data/lib/ynab/models/categories_response.rb +1 -75
- data/lib/ynab/models/categories_response_data.rb +1 -75
- data/lib/ynab/models/category.rb +16 -79
- data/lib/ynab/models/category_group.rb +1 -75
- data/lib/ynab/models/category_group_with_categories.rb +2 -76
- data/lib/ynab/models/category_response.rb +1 -75
- data/lib/ynab/models/category_response_data.rb +1 -75
- data/lib/ynab/models/currency_format.rb +2 -76
- data/lib/ynab/models/date_format.rb +2 -76
- data/lib/ynab/models/error_detail.rb +1 -75
- data/lib/ynab/models/error_response.rb +1 -75
- data/lib/ynab/models/existing_category.rb +180 -0
- data/lib/ynab/models/existing_transaction.rb +1 -79
- data/lib/ynab/models/hybrid_transaction.rb +1 -85
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -75
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -75
- data/lib/ynab/models/money_movement.rb +223 -0
- data/lib/ynab/models/money_movement_group.rb +179 -0
- data/lib/ynab/models/{budget_summary_response.rb → money_movement_groups_response.rb} +4 -78
- data/lib/ynab/models/money_movement_groups_response_data.rb +149 -0
- data/lib/ynab/models/{budget_settings_response.rb → money_movements_response.rb} +4 -78
- data/lib/ynab/models/money_movements_response_data.rb +149 -0
- data/lib/ynab/models/month_detail.rb +3 -79
- data/lib/ynab/models/month_detail_response.rb +1 -75
- data/lib/ynab/models/month_detail_response_data.rb +1 -75
- data/lib/ynab/models/month_summaries_response.rb +1 -75
- data/lib/ynab/models/month_summaries_response_data.rb +1 -75
- data/lib/ynab/models/month_summary.rb +2 -76
- data/lib/ynab/models/new_category.rb +180 -0
- data/lib/ynab/models/new_transaction.rb +1 -79
- data/lib/ynab/models/patch_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/patch_category_wrapper.rb +2 -76
- data/lib/ynab/models/patch_month_category_wrapper.rb +1 -75
- data/lib/ynab/models/patch_payee_wrapper.rb +1 -75
- data/lib/ynab/models/patch_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/payee.rb +1 -75
- data/lib/ynab/models/payee_location.rb +1 -75
- data/lib/ynab/models/payee_location_response.rb +1 -75
- data/lib/ynab/models/payee_location_response_data.rb +1 -75
- data/lib/ynab/models/payee_locations_response.rb +1 -75
- data/lib/ynab/models/payee_locations_response_data.rb +1 -75
- data/lib/ynab/models/payee_response.rb +1 -75
- data/lib/ynab/models/payee_response_data.rb +1 -75
- data/lib/ynab/models/payees_response.rb +1 -75
- data/lib/ynab/models/payees_response_data.rb +1 -75
- data/lib/ynab/models/{budget_detail.rb → plan_detail.rb} +7 -83
- data/lib/ynab/models/plan_detail_response.rb +136 -0
- data/lib/ynab/models/{budget_detail_response_data.rb → plan_detail_response_data.rb} +4 -78
- data/lib/ynab/models/{budget_settings.rb → plan_settings.rb} +5 -79
- data/lib/ynab/models/{budget_detail_response.rb → plan_settings_response.rb} +4 -78
- data/lib/ynab/models/{budget_settings_response_data.rb → plan_settings_response_data.rb} +4 -78
- data/lib/ynab/models/{budget_summary.rb → plan_summary.rb} +7 -83
- data/lib/ynab/models/plan_summary_response.rb +136 -0
- data/lib/ynab/models/{budget_summary_response_data.rb → plan_summary_response_data.rb} +5 -79
- data/lib/ynab/models/post_account_wrapper.rb +1 -75
- data/lib/ynab/models/post_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/post_category_wrapper.rb +136 -0
- data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/post_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/put_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/save_account.rb +1 -75
- data/lib/ynab/models/save_category.rb +18 -81
- data/lib/ynab/models/save_category_group.rb +148 -0
- data/lib/ynab/models/save_category_group_response.rb +136 -0
- data/lib/ynab/models/save_category_group_response_data.rb +147 -0
- data/lib/ynab/models/save_category_response.rb +1 -75
- data/lib/ynab/models/save_category_response_data.rb +1 -75
- data/lib/ynab/models/save_month_category.rb +2 -76
- data/lib/ynab/models/save_payee.rb +1 -75
- data/lib/ynab/models/save_payee_response.rb +1 -75
- data/lib/ynab/models/save_payee_response_data.rb +1 -75
- data/lib/ynab/models/save_scheduled_transaction.rb +1 -75
- data/lib/ynab/models/save_sub_transaction.rb +1 -75
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +1 -79
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +1 -75
- data/lib/ynab/models/save_transactions_response.rb +1 -75
- data/lib/ynab/models/save_transactions_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -80
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -75
- data/lib/ynab/models/sub_transaction.rb +1 -75
- data/lib/ynab/models/transaction_detail.rb +1 -85
- data/lib/ynab/models/transaction_response.rb +1 -75
- data/lib/ynab/models/transaction_response_data.rb +1 -75
- data/lib/ynab/models/transaction_summary.rb +1 -75
- data/lib/ynab/models/transactions_import_response.rb +1 -75
- data/lib/ynab/models/transactions_import_response_data.rb +1 -75
- data/lib/ynab/models/transactions_response.rb +1 -75
- data/lib/ynab/models/transactions_response_data.rb +1 -75
- data/lib/ynab/models/user.rb +1 -75
- data/lib/ynab/models/user_response.rb +1 -75
- data/lib/ynab/models/user_response_data.rb +1 -75
- data/lib/ynab/overrides/transactions_api.rb +6 -6
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +28 -13
- data/open_api_spec.yaml +1155 -910
- data/spec/api/accounts_spec.rb +9 -9
- data/spec/api/categories_spec.rb +9 -9
- data/spec/api/months_spec.rb +7 -7
- data/spec/api/payee_locations_spec.rb +7 -7
- data/spec/api/payees_spec.rb +7 -7
- data/spec/api/{budgets_spec.rb → plans_spec.rb} +12 -12
- data/spec/api/scheduled_transactions_spec.rb +9 -9
- data/spec/api/transactions_spec.rb +27 -27
- data/spec/fixtures/vcr_cassettes/plans.yml +49 -0
- data/spec/fixtures/vcr_cassettes/plans_unauthorized.yml +49 -0
- data/templates/gem.mustache +3 -2
- data/templates/partial_model_generic.mustache +1 -1
- data/ynab.gemspec +1 -2
- metadata +62 -27
- data/docs/BudgetSettingsResponseData.md +0 -8
- data/docs/BudgetSummary.md +0 -15
- data/docs/BudgetSummaryResponse.md +0 -8
- data/docs/BudgetSummaryResponseData.md +0 -9
- data/docs/BudgetsApi.md +0 -68
data/spec/api/accounts_spec.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'accounts' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
7
7
|
let (:instance) { client.accounts }
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ describe 'accounts' do
|
|
|
15
15
|
describe 'authorization' do
|
|
16
16
|
it 'sets the Bearer Auth header correctly' do
|
|
17
17
|
VCR.use_cassette("accounts") do
|
|
18
|
-
response = instance.get_accounts(
|
|
18
|
+
response = instance.get_accounts(plan_id)
|
|
19
19
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -25,7 +25,7 @@ describe 'accounts' do
|
|
|
25
25
|
VCR.use_cassette("accounts_unauthorized") do
|
|
26
26
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
27
27
|
begin
|
|
28
|
-
response = client.accounts.get_accounts(
|
|
28
|
+
response = client.accounts.get_accounts(plan_id)
|
|
29
29
|
rescue YNAB::ApiError => e
|
|
30
30
|
expect(e.code).to be 401
|
|
31
31
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -34,30 +34,30 @@ describe 'accounts' do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe 'GET /budgets/{
|
|
37
|
+
describe 'GET /budgets/{plan_id}/accounts' do
|
|
38
38
|
it 'returns a list of accounts' do
|
|
39
39
|
VCR.use_cassette("accounts") do
|
|
40
|
-
response = instance.get_accounts(
|
|
40
|
+
response = instance.get_accounts(plan_id)
|
|
41
41
|
expect(client.last_request.response.options[:code]).to be 200
|
|
42
42
|
expect(response.data.accounts.length).to be 1
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'GET /budgets/{
|
|
47
|
+
describe 'GET /budgets/{plan_id}/accounts/{account_id}' do
|
|
48
48
|
it 'returns an account' do
|
|
49
49
|
VCR.use_cassette("account") do
|
|
50
|
-
response = instance.get_account_by_id(
|
|
50
|
+
response = instance.get_account_by_id(plan_id, '5982e895-98e5-41ca-9681-0b6de1036a1c')
|
|
51
51
|
expect(response.data.account).to be
|
|
52
52
|
expect(response.data.account.name).to eq "Checking"
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
describe 'POST /budgets/{
|
|
57
|
+
describe 'POST /budgets/{plan_id}/accounts' do
|
|
58
58
|
it 'creates an account' do
|
|
59
59
|
VCR.use_cassette("create_account") do
|
|
60
|
-
response = instance.create_account(
|
|
60
|
+
response = instance.create_account(plan_id, {
|
|
61
61
|
account: {
|
|
62
62
|
name: 'New Checking Account',
|
|
63
63
|
type: 'checking',
|
data/spec/api/categories_spec.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'categories' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:category_id) { 'acd2a771-0a56-4dba-97bd-3952b0879282' }
|
|
7
7
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
8
8
|
let (:instance) { client.categories }
|
|
@@ -16,7 +16,7 @@ describe 'categories' do
|
|
|
16
16
|
describe 'authorization' do
|
|
17
17
|
it 'sets the Bearer Auth header correctly' do
|
|
18
18
|
VCR.use_cassette("categories") do
|
|
19
|
-
response = instance.get_categories(
|
|
19
|
+
response = instance.get_categories(plan_id)
|
|
20
20
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
21
21
|
|
|
22
22
|
end
|
|
@@ -26,7 +26,7 @@ describe 'categories' do
|
|
|
26
26
|
VCR.use_cassette("categories_unauthorized") do
|
|
27
27
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
28
28
|
begin
|
|
29
|
-
response = client.categories.get_categories(
|
|
29
|
+
response = client.categories.get_categories(plan_id)
|
|
30
30
|
rescue YNAB::ApiError => e
|
|
31
31
|
expect(e.code).to be 401
|
|
32
32
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -35,10 +35,10 @@ describe 'categories' do
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
describe 'GET /budgets/{
|
|
38
|
+
describe 'GET /budgets/{plan_id}/categories' do
|
|
39
39
|
it 'returns a list of categories' do
|
|
40
40
|
VCR.use_cassette("categories") do
|
|
41
|
-
response = instance.get_categories(
|
|
41
|
+
response = instance.get_categories(plan_id)
|
|
42
42
|
expect(client.last_request.response.options[:code]).to be 200
|
|
43
43
|
expect(response.data.category_groups.length).to be 8
|
|
44
44
|
expect(response.data.category_groups[0].categories.length).to be 3
|
|
@@ -46,20 +46,20 @@ describe 'categories' do
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
describe 'GET /budgets/{
|
|
49
|
+
describe 'GET /budgets/{plan_id}/categories/{category_id}' do
|
|
50
50
|
it 'returns a category' do
|
|
51
51
|
VCR.use_cassette("category") do
|
|
52
|
-
response = instance.get_category_by_id(
|
|
52
|
+
response = instance.get_category_by_id(plan_id, category_id)
|
|
53
53
|
expect(response.data.category).to be
|
|
54
54
|
expect(response.data.category.name).to eq 'Groceries'
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
describe 'PATCH /budgets/{
|
|
59
|
+
describe 'PATCH /budgets/{plan_id}/months/{month}/categories/{category_id}' do
|
|
60
60
|
it 'returns a category' do
|
|
61
61
|
VCR.use_cassette("patch_month_category") do
|
|
62
|
-
response = instance.update_month_category(
|
|
62
|
+
response = instance.update_month_category(plan_id, '2018-02-01', category_id, month_category: { budgeted: 20382 })
|
|
63
63
|
expect(response.data.category).to be
|
|
64
64
|
expect(response.data.category.name).to eq 'Groceries'
|
|
65
65
|
expect(response.data.category.budgeted).to eq 20382
|
data/spec/api/months_spec.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'months' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
7
7
|
let (:instance) { client.months }
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ describe 'months' do
|
|
|
15
15
|
describe 'authorization' do
|
|
16
16
|
it 'sets the Bearer Auth header correctly' do
|
|
17
17
|
VCR.use_cassette("months") do
|
|
18
|
-
response = instance.
|
|
18
|
+
response = instance.get_plan_months(plan_id)
|
|
19
19
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -25,7 +25,7 @@ describe 'months' do
|
|
|
25
25
|
VCR.use_cassette("months_unauthorized") do
|
|
26
26
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
27
27
|
begin
|
|
28
|
-
response = client.months.
|
|
28
|
+
response = client.months.get_plan_months(plan_id)
|
|
29
29
|
rescue YNAB::ApiError => e
|
|
30
30
|
expect(e.code).to be 401
|
|
31
31
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -34,20 +34,20 @@ describe 'months' do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe 'GET /budgets/{
|
|
37
|
+
describe 'GET /budgets/{plan_id}/months' do
|
|
38
38
|
it 'returns a list of months' do
|
|
39
39
|
VCR.use_cassette("months") do
|
|
40
|
-
response = instance.
|
|
40
|
+
response = instance.get_plan_months(plan_id)
|
|
41
41
|
expect(client.last_request.response.options[:code]).to be 200
|
|
42
42
|
expect(response.data.months.length).to be 3
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'GET /budgets/{
|
|
47
|
+
describe 'GET /budgets/{plan_id}/months/{month}' do
|
|
48
48
|
it 'returns a month' do
|
|
49
49
|
VCR.use_cassette("month") do
|
|
50
|
-
response = instance.
|
|
50
|
+
response = instance.get_plan_month(plan_id, '2018-02-01')
|
|
51
51
|
expect(response.data.month).to be
|
|
52
52
|
expect(response.data.month.to_be_budgeted).to eq 1000000
|
|
53
53
|
expect(response.data.month.note).to eq "Test Note"
|
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'payee locations' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
7
7
|
let (:instance) { client.payee_locations }
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ describe 'payee locations' do
|
|
|
15
15
|
describe 'authorization' do
|
|
16
16
|
it 'sets the Bearer Auth header correctly' do
|
|
17
17
|
VCR.use_cassette("payee_locations") do
|
|
18
|
-
response = instance.get_payee_locations(
|
|
18
|
+
response = instance.get_payee_locations(plan_id)
|
|
19
19
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -25,7 +25,7 @@ describe 'payee locations' do
|
|
|
25
25
|
VCR.use_cassette("payee_locations_unauthorized") do
|
|
26
26
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
27
27
|
begin
|
|
28
|
-
response = client.payee_locations.get_payee_locations(
|
|
28
|
+
response = client.payee_locations.get_payee_locations(plan_id)
|
|
29
29
|
rescue YNAB::ApiError => e
|
|
30
30
|
expect(e.code).to be 401
|
|
31
31
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -34,20 +34,20 @@ describe 'payee locations' do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe 'GET /budgets/{
|
|
37
|
+
describe 'GET /budgets/{plan_id}/payee_location' do
|
|
38
38
|
it 'returns a list of payee locations' do
|
|
39
39
|
VCR.use_cassette("payee_locations") do
|
|
40
|
-
response = instance.get_payee_locations(
|
|
40
|
+
response = instance.get_payee_locations(plan_id)
|
|
41
41
|
expect(client.last_request.response.options[:code]).to be 200
|
|
42
42
|
expect(response.data.payee_locations.length).to be 1
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'GET /budgets/{
|
|
47
|
+
describe 'GET /budgets/{plan_id}/payee_locations/{payee_id}' do
|
|
48
48
|
it 'returns a payee location' do
|
|
49
49
|
VCR.use_cassette("payee_location") do
|
|
50
|
-
response = instance.get_payee_location_by_id(
|
|
50
|
+
response = instance.get_payee_location_by_id(plan_id, '052c7814-1797-44ce-9519-020e864e4928')
|
|
51
51
|
expect(response.data.payee_location).to be
|
|
52
52
|
expect(response.data.payee_location.latitude).to eq "40.7128"
|
|
53
53
|
expect(response.data.payee_location.longitude).to eq "74.006"
|
data/spec/api/payees_spec.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'payees' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
7
7
|
let (:instance) { client.payees }
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ describe 'payees' do
|
|
|
15
15
|
describe 'authorization' do
|
|
16
16
|
it 'sets the Bearer Auth header correctly' do
|
|
17
17
|
VCR.use_cassette("payees") do
|
|
18
|
-
response = instance.get_payees(
|
|
18
|
+
response = instance.get_payees(plan_id)
|
|
19
19
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -25,7 +25,7 @@ describe 'payees' do
|
|
|
25
25
|
VCR.use_cassette("payees_unauthorized") do
|
|
26
26
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
27
27
|
begin
|
|
28
|
-
response = client.payees.get_payees(
|
|
28
|
+
response = client.payees.get_payees(plan_id)
|
|
29
29
|
rescue YNAB::ApiError => e
|
|
30
30
|
expect(e.code).to be 401
|
|
31
31
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -34,20 +34,20 @@ describe 'payees' do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe 'GET /budgets/{
|
|
37
|
+
describe 'GET /budgets/{plan_id}/payees' do
|
|
38
38
|
it 'returns a list of payees' do
|
|
39
39
|
VCR.use_cassette("payees") do
|
|
40
|
-
response = instance.get_payees(
|
|
40
|
+
response = instance.get_payees(plan_id)
|
|
41
41
|
expect(client.last_request.response.options[:code]).to be 200
|
|
42
42
|
expect(response.data.payees.length).to be 5
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'GET /budgets/{
|
|
47
|
+
describe 'GET /budgets/{plan_id}/payees/{payee_id}' do
|
|
48
48
|
it 'returns a payee' do
|
|
49
49
|
VCR.use_cassette("payee") do
|
|
50
|
-
response = instance.get_payee_by_id(
|
|
50
|
+
response = instance.get_payee_by_id(plan_id, '200e6eb1-02fc-4af6-be26-27c5740bb949')
|
|
51
51
|
expect(response.data.payee).to be
|
|
52
52
|
expect(response.data.payee.name).to eq 'Test Payee'
|
|
53
53
|
end
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe '
|
|
3
|
+
describe 'plans' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
5
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
6
|
-
let (:instance) { client.
|
|
6
|
+
let (:instance) { client.plans }
|
|
7
7
|
|
|
8
|
-
describe 'test an instance of
|
|
9
|
-
it 'should create an instance of
|
|
10
|
-
expect(instance).to be_instance_of(YNAB::
|
|
8
|
+
describe 'test an instance of PlansApi' do
|
|
9
|
+
it 'should create an instance of PlansApi' do
|
|
10
|
+
expect(instance).to be_instance_of(YNAB::PlansApi)
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
describe 'authorization' do
|
|
15
15
|
it 'sets the Bearer Auth header correctly' do
|
|
16
|
-
VCR.use_cassette("
|
|
17
|
-
response = instance.
|
|
16
|
+
VCR.use_cassette("plans") do
|
|
17
|
+
response = instance.get_plans
|
|
18
18
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
19
19
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
it 'throws when unauthorized' do
|
|
24
|
-
VCR.use_cassette("
|
|
24
|
+
VCR.use_cassette("plans_unauthorized") do
|
|
25
25
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
26
26
|
begin
|
|
27
|
-
response = client.
|
|
27
|
+
response = client.plans.get_plans
|
|
28
28
|
rescue YNAB::ApiError => e
|
|
29
29
|
expect(e.code).to be 401
|
|
30
30
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -36,17 +36,17 @@ describe 'budgets' do
|
|
|
36
36
|
describe 'GET /budgets' do
|
|
37
37
|
it 'returns a list of budgets' do
|
|
38
38
|
VCR.use_cassette("budgets") do
|
|
39
|
-
response = instance.
|
|
39
|
+
response = instance.get_plans
|
|
40
40
|
expect(client.last_request.response.options[:code]).to be 200
|
|
41
41
|
expect(response.data.budgets.length).to be 4
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
describe 'GET /budgets/{
|
|
46
|
+
describe 'GET /budgets/{plan_id}' do
|
|
47
47
|
it 'returns a budget' do
|
|
48
48
|
VCR.use_cassette("budget") do
|
|
49
|
-
response = instance.
|
|
49
|
+
response = instance.get_plan_by_id('f419ac25-6217-4175-88dc-c3136ff5f6fd')
|
|
50
50
|
expect(response.data.budget).to be
|
|
51
51
|
expect(response.data.budget.name).to eq "ABC"
|
|
52
52
|
end
|
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'scheduled transactions' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
7
7
|
let (:instance) { client.scheduled_transactions }
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ describe 'scheduled transactions' do
|
|
|
15
15
|
describe 'authorization' do
|
|
16
16
|
it 'sets the Bearer Auth header correctly' do
|
|
17
17
|
VCR.use_cassette("scheduled_transactions") do
|
|
18
|
-
response = instance.get_scheduled_transactions(
|
|
18
|
+
response = instance.get_scheduled_transactions(plan_id)
|
|
19
19
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -25,7 +25,7 @@ describe 'scheduled transactions' do
|
|
|
25
25
|
VCR.use_cassette("scheduled_transactions_unauthorized") do
|
|
26
26
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
27
27
|
begin
|
|
28
|
-
response = client.scheduled_transactions.get_scheduled_transactions(
|
|
28
|
+
response = client.scheduled_transactions.get_scheduled_transactions(plan_id)
|
|
29
29
|
rescue YNAB::ApiError => e
|
|
30
30
|
expect(e.code).to be 401
|
|
31
31
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -34,30 +34,30 @@ describe 'scheduled transactions' do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe 'GET /budgets/{
|
|
37
|
+
describe 'GET /budgets/{plan_id}/scheduled_transactions' do
|
|
38
38
|
it 'returns a list of transactions' do
|
|
39
39
|
VCR.use_cassette("scheduled_transactions") do
|
|
40
|
-
response = instance.get_scheduled_transactions(
|
|
40
|
+
response = instance.get_scheduled_transactions(plan_id)
|
|
41
41
|
expect(client.last_request.response.options[:code]).to be 200
|
|
42
42
|
expect(response.data.scheduled_transactions.length).to be 1
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'GET /budgets/{
|
|
47
|
+
describe 'GET /budgets/{plan_id}/scheduled_transactions/{payee_id}' do
|
|
48
48
|
it 'returns a payee' do
|
|
49
49
|
VCR.use_cassette("scheduled_transaction") do
|
|
50
|
-
response = instance.get_scheduled_transaction_by_id(
|
|
50
|
+
response = instance.get_scheduled_transaction_by_id(plan_id, '1a8e4929-3ad1-4859-8443-2aeeab0684ab')
|
|
51
51
|
expect(response.data.scheduled_transaction).to be
|
|
52
52
|
expect(response.data.scheduled_transaction.amount).to eq -10000
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
describe 'POST /budgets/{
|
|
57
|
+
describe 'POST /budgets/{plan_id}/scheduled_transactions' do
|
|
58
58
|
it 'creates a scheduled transaction' do
|
|
59
59
|
VCR.use_cassette("create_scheduled_transaction") do
|
|
60
|
-
response = instance.create_scheduled_transaction(
|
|
60
|
+
response = instance.create_scheduled_transaction(plan_id, {
|
|
61
61
|
scheduled_transaction: {
|
|
62
62
|
date: "#{Time.now.year + 1}-01-01",
|
|
63
63
|
account_id: '49b0c987-7d2b-46ec-ba14-f8a7e79fb830',
|
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'transactions' do
|
|
4
4
|
let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
|
|
5
|
-
let(:
|
|
5
|
+
let(:plan_id) { 'f419ac25-6217-4175-88dc-c3136ff5f6fd' }
|
|
6
6
|
let(:category_id) { '84ffe61c-081c-44db-ad23-6ee809206c40' }
|
|
7
7
|
let(:payee_id) { '2676f959-c5de-4db2-8d3f-2503777b25fb' }
|
|
8
8
|
let(:client) { YNAB::API.new(access_token, 'api.localhost:3000', false) }
|
|
@@ -17,7 +17,7 @@ describe 'transactions' do
|
|
|
17
17
|
describe 'authorization' do
|
|
18
18
|
it 'sets the Bearer Auth header correctly' do
|
|
19
19
|
VCR.use_cassette("transactions") do
|
|
20
|
-
response = instance.get_transactions(
|
|
20
|
+
response = instance.get_transactions(plan_id)
|
|
21
21
|
expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
|
|
22
22
|
|
|
23
23
|
end
|
|
@@ -27,7 +27,7 @@ describe 'transactions' do
|
|
|
27
27
|
VCR.use_cassette("transactions_unauthorized") do
|
|
28
28
|
client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
|
|
29
29
|
begin
|
|
30
|
-
response = client.transactions.get_transactions(
|
|
30
|
+
response = client.transactions.get_transactions(plan_id)
|
|
31
31
|
rescue YNAB::ApiError => e
|
|
32
32
|
expect(e.code).to be 401
|
|
33
33
|
expect(client.last_request.response.options[:code]).to be 401
|
|
@@ -36,10 +36,10 @@ describe 'transactions' do
|
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
describe 'GET /budgets/{
|
|
39
|
+
describe 'GET /budgets/{plan_id}/transactions' do
|
|
40
40
|
it 'returns a list of transactions' do
|
|
41
41
|
VCR.use_cassette("transactions") do
|
|
42
|
-
response = instance.get_transactions(
|
|
42
|
+
response = instance.get_transactions(plan_id)
|
|
43
43
|
expect(client.last_request.response.options[:code]).to be 200
|
|
44
44
|
expect(response.data.transactions.length).to be 2
|
|
45
45
|
end
|
|
@@ -48,7 +48,7 @@ describe 'transactions' do
|
|
|
48
48
|
it 'gracefully handles invalid flag_color values' do
|
|
49
49
|
# transactions_invalid_flags contains transactions with invalid/unsupported flag_color values
|
|
50
50
|
VCR.use_cassette("transactions_invalid_flags") do
|
|
51
|
-
response = instance.get_transactions(
|
|
51
|
+
response = instance.get_transactions(plan_id)
|
|
52
52
|
expect(client.last_request.response.options[:code]).to be 200
|
|
53
53
|
expect(response.data.transactions.length).to be 2
|
|
54
54
|
# We expect the flag_color to have been converted to nil for these transactions
|
|
@@ -58,50 +58,50 @@ describe 'transactions' do
|
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
describe 'GET /budgets/{
|
|
61
|
+
describe 'GET /budgets/{plan_id}/category/{category_id}/transactions' do
|
|
62
62
|
it 'returns a list of transactions for a category' do
|
|
63
63
|
VCR.use_cassette("category_transactions") do
|
|
64
|
-
response = instance.get_transactions_by_category(
|
|
64
|
+
response = instance.get_transactions_by_category(plan_id, category_id)
|
|
65
65
|
expect(client.last_request.response.options[:code]).to be 200
|
|
66
66
|
expect(response.data.transactions.length).to be 3
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
describe 'GET /budgets/{
|
|
71
|
+
describe 'GET /budgets/{plan_id}/category/{payee_id}/transactions' do
|
|
72
72
|
it 'returns a list of transactions for a payee' do
|
|
73
73
|
VCR.use_cassette("payee_transactions") do
|
|
74
|
-
response = instance.get_transactions_by_payee(
|
|
74
|
+
response = instance.get_transactions_by_payee(plan_id, payee_id)
|
|
75
75
|
expect(client.last_request.response.options[:code]).to be 200
|
|
76
76
|
expect(response.data.transactions.length).to be 2
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
describe 'GET /budgets/{
|
|
81
|
+
describe 'GET /budgets/{plan_id}/months/{month}/transactions' do
|
|
82
82
|
it 'returns a list of transactions for a month' do
|
|
83
83
|
VCR.use_cassette("month_transactions") do
|
|
84
|
-
response = instance.get_transactions_by_month(
|
|
84
|
+
response = instance.get_transactions_by_month(plan_id, "2024-07-01")
|
|
85
85
|
expect(client.last_request.response.options[:code]).to be 200
|
|
86
86
|
expect(response.data.transactions.length).to be 2
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
describe 'GET /budgets/{
|
|
91
|
+
describe 'GET /budgets/{plan_id}/transaction/{transaction_id}' do
|
|
92
92
|
it 'returns a transaction' do
|
|
93
93
|
VCR.use_cassette("transaction") do
|
|
94
|
-
response = instance.get_transaction_by_id(
|
|
94
|
+
response = instance.get_transaction_by_id(plan_id, '81c374ff-74ab-4d6d-8d5a-ba3ad3fa68e4')
|
|
95
95
|
expect(response.data.transaction).to be
|
|
96
96
|
expect(response.data.transaction.amount).to eq -2000
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
describe 'POST /budgets/{
|
|
101
|
+
describe 'POST /budgets/{plan_id}/transactions' do
|
|
102
102
|
it 'creates a transaction' do
|
|
103
103
|
VCR.use_cassette("create_transaction") do
|
|
104
|
-
response = instance.create_transaction(
|
|
104
|
+
response = instance.create_transaction(plan_id, {
|
|
105
105
|
transaction: {
|
|
106
106
|
date: '2018-01-01',
|
|
107
107
|
account_id: '5982e895-98e5-41ca-9681-0b6de1036a1c',
|
|
@@ -116,7 +116,7 @@ describe 'transactions' do
|
|
|
116
116
|
|
|
117
117
|
it 'creates multiple transactions' do
|
|
118
118
|
VCR.use_cassette("create_transaction") do
|
|
119
|
-
response = instance.create_transactions(
|
|
119
|
+
response = instance.create_transactions(plan_id, {
|
|
120
120
|
transactions: [
|
|
121
121
|
{
|
|
122
122
|
date: '2018-01-01',
|
|
@@ -137,10 +137,10 @@ describe 'transactions' do
|
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
describe 'PUT /budgets/{
|
|
140
|
+
describe 'PUT /budgets/{plan_id}/transactions/{transaction_id}' do
|
|
141
141
|
it 'updates a transaction' do
|
|
142
142
|
VCR.use_cassette("update_transaction") do
|
|
143
|
-
response = instance.update_transaction(
|
|
143
|
+
response = instance.update_transaction(plan_id, '4cd63d34-3814-4f50-abd0-59ce05b40d91', {
|
|
144
144
|
transaction: {
|
|
145
145
|
date: '2018-01-02',
|
|
146
146
|
account_id: '5982e895-98e5-41ca-9681-0b6de1036a1c',
|
|
@@ -154,10 +154,10 @@ describe 'transactions' do
|
|
|
154
154
|
end
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
-
describe 'PATCH /budgets/{
|
|
157
|
+
describe 'PATCH /budgets/{plan_id}/transactions' do
|
|
158
158
|
it 'updates multiple transactions' do
|
|
159
159
|
VCR.use_cassette("update_transactions") do
|
|
160
|
-
response = instance.update_transactions(
|
|
160
|
+
response = instance.update_transactions(plan_id, {
|
|
161
161
|
transactions: [
|
|
162
162
|
{
|
|
163
163
|
date: '2018-01-02',
|
|
@@ -178,10 +178,10 @@ describe 'transactions' do
|
|
|
178
178
|
end
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
-
describe 'POST /budgets/{
|
|
181
|
+
describe 'POST /budgets/{plan_id}/transactions' do
|
|
182
182
|
it 'create multiple transactions' do
|
|
183
183
|
VCR.use_cassette("multiple_transactions") do
|
|
184
|
-
response = instance.create_transaction(
|
|
184
|
+
response = instance.create_transaction(plan_id, {
|
|
185
185
|
transactions: [
|
|
186
186
|
{
|
|
187
187
|
date: '2018-01-01',
|
|
@@ -209,10 +209,10 @@ describe 'transactions' do
|
|
|
209
209
|
end
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
-
describe 'POST /budgets/{
|
|
212
|
+
describe 'POST /budgets/{plan_id}/transactions/import' do
|
|
213
213
|
it 'import transactions' do
|
|
214
214
|
VCR.use_cassette("import_transactions") do
|
|
215
|
-
response = instance.import_transactions(
|
|
215
|
+
response = instance.import_transactions(plan_id)
|
|
216
216
|
expect(client.last_request.response.options[:code]).to be 201
|
|
217
217
|
expect(response.data.transaction_ids.length).to eq 1
|
|
218
218
|
expect(response.data.transaction_ids).to include '07b68f11-98bd-4184-8866-83268a654318'
|
|
@@ -220,10 +220,10 @@ describe 'transactions' do
|
|
|
220
220
|
end
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
describe 'POST /budgets/{
|
|
223
|
+
describe 'POST /budgets/{plan_id}/transactions/bulk' do
|
|
224
224
|
it 'bulk creations transactions' do
|
|
225
225
|
VCR.use_cassette("bulk_transactions") do
|
|
226
|
-
response = instance.bulk_create_transactions(
|
|
226
|
+
response = instance.bulk_create_transactions(plan_id, {
|
|
227
227
|
transactions: [
|
|
228
228
|
{
|
|
229
229
|
date: '2018-01-01',
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: http://api.localhost:3000/v1/budgets
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- api_client/ruby/0.1.0
|
|
12
|
+
Content-Type:
|
|
13
|
+
- application/json
|
|
14
|
+
Accept:
|
|
15
|
+
- application/json
|
|
16
|
+
Authorization:
|
|
17
|
+
- Bearer 9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045
|
|
18
|
+
Expect:
|
|
19
|
+
- ''
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Content-Type:
|
|
26
|
+
- application/json; charset=utf-8
|
|
27
|
+
Vary:
|
|
28
|
+
- Accept-Encoding, Origin
|
|
29
|
+
ETag:
|
|
30
|
+
- W/"ab6962c846032f67f346997e36a2d21e"
|
|
31
|
+
Cache-Control:
|
|
32
|
+
- max-age=0, private, must-revalidate
|
|
33
|
+
X-Request-Id:
|
|
34
|
+
- cac5447b-f782-466a-9f0e-bf6fc725bf7f
|
|
35
|
+
X-Runtime:
|
|
36
|
+
- '0.176181'
|
|
37
|
+
Transfer-Encoding:
|
|
38
|
+
- chunked
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: '{"data":{"budgets":[{"id":"36e85244-5254-47be-a7d1-28be746a7f72","name":"Hammel
|
|
42
|
+
Budget","last_modified_on":"2018-02-14T20:28:50+00:00","date_format":{"locale":"en_US"},"currency_format":{"locale":"en_US"},"first_month":"2010-10-01","last_month":"2018-02-01"},{"id":"5b202339-ba6a-4498-bc93-f6909ec38153","name":"Household
|
|
43
|
+
Budget","last_modified_on":"2018-02-14T20:28:53+00:00","date_format":{"locale":"en_US"},"currency_format":{"locale":"en_US"},"first_month":"2013-09-01","last_month":"2018-02-01"},{"id":"9db9a05d-c61c-4ce8-95ea-06174910f332","name":"My
|
|
44
|
+
Budget","last_modified_on":"2018-02-15T18:24:02+00:00","date_format":{"format":"MM/DD/YYYY"},"currency_format":{"iso_code":"USD","example_format":"123,456.78","decimal_digits":2,"decimal_separator":".","symbol_first":true,"group_separator":",","currency_symbol":"$","display_symbol":true},"first_month":"2018-02-01","last_month":"2018-02-01"},{"id":"f419ac25-6217-4175-88dc-c3136ff5f6fd","name":"ABC","last_modified_on":"2018-02-15T18:53:19+00:00","date_format":{"format":"MM/DD/YYYY"},"currency_format":{"iso_code":"USD","example_format":"123,456.78","decimal_digits":2,"decimal_separator":".","symbol_first":true,"group_separator":",","currency_symbol":"$","display_symbol":true},"first_month":"2018-02-01","last_month":"2018-02-01"}]}}'
|
|
45
|
+
http_version: '1.1'
|
|
46
|
+
adapter_metadata:
|
|
47
|
+
effective_url: http://api.localhost:3000/v1/budgets
|
|
48
|
+
recorded_at: Thu, 15 Feb 2018 18:59:58 GMT
|
|
49
|
+
recorded_with: VCR 3.0.3
|