ynab 1.16.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/ynab.rb +12 -8
  4. data/lib/ynab/api/accounts_api.rb +63 -5
  5. data/lib/ynab/api/budgets_api.rb +5 -5
  6. data/lib/ynab/api/categories_api.rb +9 -9
  7. data/lib/ynab/api/deprecated_api.rb +3 -3
  8. data/lib/ynab/api/months_api.rb +5 -5
  9. data/lib/ynab/api/payee_locations_api.rb +9 -9
  10. data/lib/ynab/api/payees_api.rb +7 -7
  11. data/lib/ynab/api/scheduled_transactions_api.rb +5 -5
  12. data/lib/ynab/api/transactions_api.rb +71 -19
  13. data/lib/ynab/api/user_api.rb +1 -1
  14. data/lib/ynab/api_client.rb +3 -2
  15. data/lib/ynab/configuration.rb +2 -3
  16. data/lib/ynab/models/account.rb +25 -8
  17. data/lib/ynab/models/account_response.rb +4 -3
  18. data/lib/ynab/models/account_response_data.rb +4 -3
  19. data/lib/ynab/models/accounts_response.rb +4 -3
  20. data/lib/ynab/models/accounts_response_data.rb +4 -3
  21. data/lib/ynab/models/budget_detail.rb +4 -3
  22. data/lib/ynab/models/budget_detail_response.rb +4 -3
  23. data/lib/ynab/models/budget_detail_response_data.rb +4 -3
  24. data/lib/ynab/models/budget_settings.rb +4 -3
  25. data/lib/ynab/models/budget_settings_response.rb +4 -3
  26. data/lib/ynab/models/budget_settings_response_data.rb +4 -3
  27. data/lib/ynab/models/budget_summary.rb +4 -3
  28. data/lib/ynab/models/budget_summary_response.rb +4 -3
  29. data/lib/ynab/models/budget_summary_response_data.rb +4 -3
  30. data/lib/ynab/models/bulk_response.rb +4 -3
  31. data/lib/ynab/models/bulk_response_data.rb +4 -3
  32. data/lib/ynab/models/bulk_response_data_bulk.rb +4 -3
  33. data/lib/ynab/models/bulk_transactions.rb +4 -3
  34. data/lib/ynab/models/categories_response.rb +4 -3
  35. data/lib/ynab/models/categories_response_data.rb +4 -3
  36. data/lib/ynab/models/category.rb +46 -9
  37. data/lib/ynab/models/category_group.rb +4 -3
  38. data/lib/ynab/models/category_group_with_categories.rb +4 -3
  39. data/lib/ynab/models/category_response.rb +4 -3
  40. data/lib/ynab/models/category_response_data.rb +4 -3
  41. data/lib/ynab/models/currency_format.rb +4 -3
  42. data/lib/ynab/models/date_format.rb +4 -3
  43. data/lib/ynab/models/error_detail.rb +4 -3
  44. data/lib/ynab/models/error_response.rb +4 -3
  45. data/lib/ynab/models/hybrid_transaction.rb +4 -15
  46. data/lib/ynab/models/hybrid_transactions_response.rb +4 -3
  47. data/lib/ynab/models/hybrid_transactions_response_data.rb +4 -3
  48. data/lib/ynab/models/month_detail.rb +4 -3
  49. data/lib/ynab/models/month_detail_response.rb +4 -3
  50. data/lib/ynab/models/month_detail_response_data.rb +4 -3
  51. data/lib/ynab/models/month_summaries_response.rb +4 -3
  52. data/lib/ynab/models/month_summaries_response_data.rb +4 -3
  53. data/lib/ynab/models/month_summary.rb +4 -3
  54. data/lib/ynab/models/payee.rb +4 -3
  55. data/lib/ynab/models/payee_location.rb +4 -3
  56. data/lib/ynab/models/payee_location_response.rb +4 -3
  57. data/lib/ynab/models/payee_location_response_data.rb +4 -3
  58. data/lib/ynab/models/payee_locations_response.rb +4 -3
  59. data/lib/ynab/models/payee_locations_response_data.rb +4 -3
  60. data/lib/ynab/models/payee_response.rb +4 -3
  61. data/lib/ynab/models/payee_response_data.rb +4 -3
  62. data/lib/ynab/models/payees_response.rb +4 -3
  63. data/lib/ynab/models/payees_response_data.rb +4 -3
  64. data/lib/ynab/models/save_account.rb +250 -0
  65. data/lib/ynab/models/save_account_wrapper.rb +189 -0
  66. data/lib/ynab/models/save_category_response.rb +4 -3
  67. data/lib/ynab/models/save_category_response_data.rb +4 -3
  68. data/lib/ynab/models/save_month_category.rb +4 -3
  69. data/lib/ynab/models/save_month_category_wrapper.rb +4 -3
  70. data/lib/ynab/models/save_sub_transaction.rb +5 -4
  71. data/lib/ynab/models/save_transaction.rb +4 -11
  72. data/lib/ynab/models/save_transaction_wrapper.rb +4 -3
  73. data/lib/ynab/models/save_transactions_response.rb +4 -3
  74. data/lib/ynab/models/save_transactions_response_data.rb +4 -3
  75. data/lib/ynab/models/save_transactions_wrapper.rb +4 -3
  76. data/lib/ynab/models/scheduled_sub_transaction.rb +4 -3
  77. data/lib/ynab/models/scheduled_transaction_detail.rb +4 -11
  78. data/lib/ynab/models/scheduled_transaction_response.rb +4 -3
  79. data/lib/ynab/models/scheduled_transaction_response_data.rb +4 -3
  80. data/lib/ynab/models/scheduled_transaction_summary.rb +4 -11
  81. data/lib/ynab/models/scheduled_transactions_response.rb +4 -3
  82. data/lib/ynab/models/scheduled_transactions_response_data.rb +4 -3
  83. data/lib/ynab/models/sub_transaction.rb +15 -4
  84. data/lib/ynab/models/transaction_detail.rb +4 -11
  85. data/lib/ynab/models/transaction_response.rb +4 -3
  86. data/lib/ynab/models/transaction_response_data.rb +4 -3
  87. data/lib/ynab/models/transaction_summary.rb +4 -11
  88. data/lib/ynab/models/transactions_import_response.rb +189 -0
  89. data/lib/ynab/models/transactions_import_response_data.rb +192 -0
  90. data/lib/ynab/models/transactions_response.rb +4 -3
  91. data/lib/ynab/models/transactions_response_data.rb +4 -3
  92. data/lib/ynab/models/update_transaction.rb +8 -29
  93. data/lib/ynab/models/update_transactions_wrapper.rb +4 -3
  94. data/lib/ynab/models/user.rb +4 -3
  95. data/lib/ynab/models/user_response.rb +4 -3
  96. data/lib/ynab/models/user_response_data.rb +4 -3
  97. data/lib/ynab/version.rb +1 -1
  98. data/spec/api/accounts_spec.rb +19 -10
  99. data/spec/api/budgets_spec.rb +4 -4
  100. data/spec/api/categories_spec.rb +5 -5
  101. data/spec/api/months_spec.rb +4 -4
  102. data/spec/api/payee_locations_spec.rb +4 -4
  103. data/spec/api/payees_spec.rb +4 -4
  104. data/spec/api/scheduled_transactions_spec.rb +4 -4
  105. data/spec/api/transactions_spec.rb +23 -13
  106. data/spec/fixtures/vcr_cassettes/create_account.yml +51 -0
  107. data/spec/fixtures/vcr_cassettes/import_transactions.yml +50 -0
  108. data/spec/models/transaction_detail_spec.rb +11 -0
  109. metadata +12 -2
@@ -13,7 +13,7 @@ describe 'months' do
13
13
  end
14
14
 
15
15
  describe 'authorization' do
16
- it "sets the Bearer Auth header correctly" do
16
+ it 'sets the Bearer Auth header correctly' do
17
17
  VCR.use_cassette("months") do
18
18
  response = instance.get_budget_months(budget_id)
19
19
  expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
@@ -21,7 +21,7 @@ describe 'months' do
21
21
  end
22
22
  end
23
23
 
24
- it "throws when unauthorized" do
24
+ it 'throws when unauthorized' 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
@@ -35,7 +35,7 @@ describe 'months' do
35
35
  end
36
36
 
37
37
  describe 'GET /budgets/{budget_id}/months' do
38
- it "returns a list of months" do
38
+ it 'returns a list of months' do
39
39
  VCR.use_cassette("months") do
40
40
  response = instance.get_budget_months(budget_id)
41
41
  expect(client.last_request.response.options[:code]).to be 200
@@ -45,7 +45,7 @@ describe 'months' do
45
45
  end
46
46
 
47
47
  describe 'GET /budgets/{budget_id}/months/{month}' do
48
- it "returns a month" do
48
+ it 'returns a month' do
49
49
  VCR.use_cassette("month") do
50
50
  response = instance.get_budget_month(budget_id, '2018-02-01')
51
51
  expect(response.data.month).to be
@@ -13,7 +13,7 @@ describe 'payee locations' do
13
13
  end
14
14
 
15
15
  describe 'authorization' do
16
- it "sets the Bearer Auth header correctly" do
16
+ it 'sets the Bearer Auth header correctly' do
17
17
  VCR.use_cassette("payee_locations") do
18
18
  response = instance.get_payee_locations(budget_id)
19
19
  expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
@@ -21,7 +21,7 @@ describe 'payee locations' do
21
21
  end
22
22
  end
23
23
 
24
- it "throws when unauthorized" do
24
+ it 'throws when unauthorized' 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
@@ -35,7 +35,7 @@ describe 'payee locations' do
35
35
  end
36
36
 
37
37
  describe 'GET /budgets/{budget_id}/payee_location' do
38
- it "returns a list of payee locations" do
38
+ it 'returns a list of payee locations' do
39
39
  VCR.use_cassette("payee_locations") do
40
40
  response = instance.get_payee_locations(budget_id)
41
41
  expect(client.last_request.response.options[:code]).to be 200
@@ -45,7 +45,7 @@ describe 'payee locations' do
45
45
  end
46
46
 
47
47
  describe 'GET /budgets/{budget_id}/payee_locations/{payee_id}' do
48
- it "returns a payee location" do
48
+ it 'returns a payee location' do
49
49
  VCR.use_cassette("payee_location") do
50
50
  response = instance.get_payee_location_by_id(budget_id, '052c7814-1797-44ce-9519-020e864e4928')
51
51
  expect(response.data.payee_location).to be
@@ -13,7 +13,7 @@ describe 'payees' do
13
13
  end
14
14
 
15
15
  describe 'authorization' do
16
- it "sets the Bearer Auth header correctly" do
16
+ it 'sets the Bearer Auth header correctly' do
17
17
  VCR.use_cassette("payees") do
18
18
  response = instance.get_payees(budget_id)
19
19
  expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
@@ -21,7 +21,7 @@ describe 'payees' do
21
21
  end
22
22
  end
23
23
 
24
- it "throws when unauthorized" do
24
+ it 'throws when unauthorized' 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
@@ -35,7 +35,7 @@ describe 'payees' do
35
35
  end
36
36
 
37
37
  describe 'GET /budgets/{budget_id}/payees' do
38
- it "returns a list of payees" do
38
+ it 'returns a list of payees' do
39
39
  VCR.use_cassette("payees") do
40
40
  response = instance.get_payees(budget_id)
41
41
  expect(client.last_request.response.options[:code]).to be 200
@@ -45,7 +45,7 @@ describe 'payees' do
45
45
  end
46
46
 
47
47
  describe 'GET /budgets/{budget_id}/payees/{payee_id}' do
48
- it "returns a payee" do
48
+ it 'returns a payee' do
49
49
  VCR.use_cassette("payee") do
50
50
  response = instance.get_payee_by_id(budget_id, '200e6eb1-02fc-4af6-be26-27c5740bb949')
51
51
  expect(response.data.payee).to be
@@ -13,7 +13,7 @@ describe 'scheduled transactions' do
13
13
  end
14
14
 
15
15
  describe 'authorization' do
16
- it "sets the Bearer Auth header correctly" do
16
+ it 'sets the Bearer Auth header correctly' do
17
17
  VCR.use_cassette("scheduled_transactions") do
18
18
  response = instance.get_scheduled_transactions(budget_id)
19
19
  expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
@@ -21,7 +21,7 @@ describe 'scheduled transactions' do
21
21
  end
22
22
  end
23
23
 
24
- it "throws when unauthorized" do
24
+ it 'throws when unauthorized' 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
@@ -35,7 +35,7 @@ describe 'scheduled transactions' do
35
35
  end
36
36
 
37
37
  describe 'GET /budgets/{budget_id}/transactions' do
38
- it "returns a list of transactions" do
38
+ it 'returns a list of transactions' do
39
39
  VCR.use_cassette("scheduled_transactions") do
40
40
  response = instance.get_scheduled_transactions(budget_id)
41
41
  expect(client.last_request.response.options[:code]).to be 200
@@ -45,7 +45,7 @@ describe 'scheduled transactions' do
45
45
  end
46
46
 
47
47
  describe 'GET /budgets/{budget_id}/transaction/{payee_id}' do
48
- it "returns a payee" do
48
+ it 'returns a payee' do
49
49
  VCR.use_cassette("scheduled_transaction") do
50
50
  response = instance.get_scheduled_transaction_by_id(budget_id, '1a8e4929-3ad1-4859-8443-2aeeab0684ab')
51
51
  expect(response.data.scheduled_transaction).to be
@@ -1,5 +1,4 @@
1
1
  require 'spec_helper'
2
- require 'pp'
3
2
 
4
3
  describe 'transactions' do
5
4
  let(:access_token) { '9f1a2c4842b614a771aaae9220fc54ae835e298c4654dc2c9205fc1d7bd1a045' }
@@ -16,7 +15,7 @@ describe 'transactions' do
16
15
  end
17
16
 
18
17
  describe 'authorization' do
19
- it "sets the Bearer Auth header correctly" do
18
+ it 'sets the Bearer Auth header correctly' do
20
19
  VCR.use_cassette("transactions") do
21
20
  response = instance.get_transactions(budget_id)
22
21
  expect(client.last_request.options[:headers]["Authorization"]).to eq "Bearer #{access_token}"
@@ -24,7 +23,7 @@ describe 'transactions' do
24
23
  end
25
24
  end
26
25
 
27
- it "throws when unauthorized" do
26
+ it 'throws when unauthorized' do
28
27
  VCR.use_cassette("transactions_unauthorized") do
29
28
  client = YNAB::API.new('not_valid_access_token', 'api.localhost:3000', false)
30
29
  begin
@@ -38,7 +37,7 @@ describe 'transactions' do
38
37
  end
39
38
 
40
39
  describe 'GET /budgets/{budget_id}/transactions' do
41
- it "returns a list of transactions" do
40
+ it 'returns a list of transactions' do
42
41
  VCR.use_cassette("transactions") do
43
42
  response = instance.get_transactions(budget_id)
44
43
  expect(client.last_request.response.options[:code]).to be 200
@@ -48,7 +47,7 @@ describe 'transactions' do
48
47
  end
49
48
 
50
49
  describe 'GET /budgets/{budget_id}/category/{category_id}/transactions' do
51
- it "returns a list of transactions for a category" do
50
+ it 'returns a list of transactions for a category' do
52
51
  VCR.use_cassette("category_transactions") do
53
52
  response = instance.get_transactions_by_category(budget_id, category_id)
54
53
  expect(client.last_request.response.options[:code]).to be 200
@@ -58,7 +57,7 @@ describe 'transactions' do
58
57
  end
59
58
 
60
59
  describe 'GET /budgets/{budget_id}/category/{payee_id}/transactions' do
61
- it "returns a list of transactions for a payee" do
60
+ it 'returns a list of transactions for a payee' do
62
61
  VCR.use_cassette("payee_transactions") do
63
62
  response = instance.get_transactions_by_payee(budget_id, payee_id)
64
63
  expect(client.last_request.response.options[:code]).to be 200
@@ -68,7 +67,7 @@ describe 'transactions' do
68
67
  end
69
68
 
70
69
  describe 'GET /budgets/{budget_id}/transaction/{transaction_id}' do
71
- it "returns a transaction" do
70
+ it 'returns a transaction' do
72
71
  VCR.use_cassette("transaction") do
73
72
  response = instance.get_transaction_by_id(budget_id, '81c374ff-74ab-4d6d-8d5a-ba3ad3fa68e4')
74
73
  expect(response.data.transaction).to be
@@ -78,7 +77,7 @@ describe 'transactions' do
78
77
  end
79
78
 
80
79
  describe 'POST /budgets/{budget_id}/transactions' do
81
- it "creates a transaction" do
80
+ it 'creates a transaction' do
82
81
  VCR.use_cassette("create_transaction") do
83
82
  response = instance.create_transaction(budget_id, {
84
83
  transaction: {
@@ -93,7 +92,7 @@ describe 'transactions' do
93
92
  end
94
93
  end
95
94
 
96
- it "creates multiple transactions" do
95
+ it 'creates multiple transactions' do
97
96
  VCR.use_cassette("create_transaction") do
98
97
  response = instance.create_transactions(budget_id, {
99
98
  transactions: [
@@ -117,7 +116,7 @@ describe 'transactions' do
117
116
  end
118
117
 
119
118
  describe 'PUT /budgets/{budget_id}/transactions/{transaction_id}' do
120
- it "updates a transaction" do
119
+ it 'updates a transaction' do
121
120
  VCR.use_cassette("update_transaction") do
122
121
  response = instance.update_transaction(budget_id, '4cd63d34-3814-4f50-abd0-59ce05b40d91', {
123
122
  transaction: {
@@ -134,7 +133,7 @@ describe 'transactions' do
134
133
  end
135
134
 
136
135
  describe 'PATCH /budgets/{budget_id}/transactions' do
137
- it "updates multiple transactions" do
136
+ it 'updates multiple transactions' do
138
137
  VCR.use_cassette("update_transactions") do
139
138
  response = instance.update_transactions(budget_id, {
140
139
  transactions: [
@@ -158,7 +157,7 @@ describe 'transactions' do
158
157
  end
159
158
 
160
159
  describe 'POST /budgets/{budget_id}/transactions' do
161
- it "create multiple transactions" do
160
+ it 'create multiple transactions' do
162
161
  VCR.use_cassette("multiple_transactions") do
163
162
  response = instance.create_transaction(budget_id, {
164
163
  transactions: [
@@ -188,8 +187,19 @@ describe 'transactions' do
188
187
  end
189
188
  end
190
189
 
190
+ describe 'POST /budgets/{budget_id}/transactions/import' do
191
+ it 'import transactions' do
192
+ VCR.use_cassette("import_transactions") do
193
+ response = instance.import_transactions(budget_id)
194
+ expect(client.last_request.response.options[:code]).to be 201
195
+ expect(response.data.transaction_ids.length).to eq 1
196
+ expect(response.data.transaction_ids).to include '07b68f11-98bd-4184-8866-83268a654318'
197
+ end
198
+ end
199
+ end
200
+
191
201
  describe 'POST /budgets/{budget_id}/transactions/bulk' do
192
- it "bulk creations transactions" do
202
+ it 'bulk creations transactions' do
193
203
  VCR.use_cassette("bulk_transactions") do
194
204
  response = instance.bulk_create_transactions(budget_id, {
195
205
  transactions: [
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/accounts
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"account":{"name":"New Checking Account","type":"checking","balance":215000}}'
9
+ headers:
10
+ User-Agent:
11
+ - api_client/ruby/1.19.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: 201
23
+ message: Created
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ X-Frame-Options:
30
+ - deny
31
+ Vary:
32
+ - Accept-Encoding, Origin
33
+ ETag:
34
+ - W/"8b7ba673cfda40fd762ec996f0c8e515"
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ X-Request-Id:
38
+ - b651ff3a-84d3-4f3a-b83d-e5738cfd8507
39
+ X-Runtime:
40
+ - '0.293182'
41
+ Transfer-Encoding:
42
+ - chunked
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"data":{"account":{"id":"77d219fc-51e9-415e-89b4-e0d893529580","name":"New
46
+ Checking Account","type":"checking","on_budget":true,"closed":false,"note":null,"balance":215000,"cleared_balance":215000,"uncleared_balance":0,"transfer_payee_id":"50031af4-c7b0-4a97-a202-daeccf8e0b2f","deleted":false},"server_knowledge":45}}'
47
+ http_version: '1.1'
48
+ adapter_metadata:
49
+ effective_url: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/accounts
50
+ recorded_at: Wed, 12 Aug 2020 15:04:29 GMT
51
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/transactions/import
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - api_client/ruby/1.17.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: 201
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ X-Frame-Options:
30
+ - deny
31
+ Vary:
32
+ - Accept-Encoding, Origin
33
+ ETag:
34
+ - W/"59dad611fef6101f6355d263fe3c332d"
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ X-Request-Id:
38
+ - b9d42c37-15d3-4c4c-98d3-7b33da03a745
39
+ X-Runtime:
40
+ - '0.518840'
41
+ Transfer-Encoding:
42
+ - chunked
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"data":{"transaction_ids":["07b68f11-98bd-4184-8866-83268a654318"]}}'
46
+ http_version: '1.1'
47
+ adapter_metadata:
48
+ effective_url: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/transactions/import
49
+ recorded_at: Tue, 28 Apr 2020 19:10:16 GMT
50
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe YNAB::TransactionDetail do
4
+ subject(:transaction) { described_class.new() }
5
+
6
+ describe '#flag_color' do
7
+ it 'allows setting an unsupported value' do
8
+ expect { transaction.flag_color = 'invalidFlagName' }.not_to raise_error
9
+ end
10
+ end
11
+ end
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.16.0
4
+ version: 1.21.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: 2020-03-11 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -161,6 +161,8 @@ files:
161
161
  - lib/ynab/models/payee_response_data.rb
162
162
  - lib/ynab/models/payees_response.rb
163
163
  - lib/ynab/models/payees_response_data.rb
164
+ - lib/ynab/models/save_account.rb
165
+ - lib/ynab/models/save_account_wrapper.rb
164
166
  - lib/ynab/models/save_category_response.rb
165
167
  - lib/ynab/models/save_category_response_data.rb
166
168
  - lib/ynab/models/save_month_category.rb
@@ -183,6 +185,8 @@ files:
183
185
  - lib/ynab/models/transaction_response.rb
184
186
  - lib/ynab/models/transaction_response_data.rb
185
187
  - lib/ynab/models/transaction_summary.rb
188
+ - lib/ynab/models/transactions_import_response.rb
189
+ - lib/ynab/models/transactions_import_response_data.rb
186
190
  - lib/ynab/models/transactions_response.rb
187
191
  - lib/ynab/models/transactions_response_data.rb
188
192
  - lib/ynab/models/update_transaction.rb
@@ -212,8 +216,10 @@ files:
212
216
  - spec/fixtures/vcr_cassettes/categories_unauthorized.yml
213
217
  - spec/fixtures/vcr_cassettes/category.yml
214
218
  - spec/fixtures/vcr_cassettes/category_transactions.yml
219
+ - spec/fixtures/vcr_cassettes/create_account.yml
215
220
  - spec/fixtures/vcr_cassettes/create_transaction.yml
216
221
  - spec/fixtures/vcr_cassettes/create_transactions.yml
222
+ - spec/fixtures/vcr_cassettes/import_transactions.yml
217
223
  - spec/fixtures/vcr_cassettes/month.yml
218
224
  - spec/fixtures/vcr_cassettes/months.yml
219
225
  - spec/fixtures/vcr_cassettes/months_unauthorized.yml
@@ -234,6 +240,7 @@ files:
234
240
  - spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
235
241
  - spec/fixtures/vcr_cassettes/update_transaction.yml
236
242
  - spec/fixtures/vcr_cassettes/update_transactions.yml
243
+ - spec/models/transaction_detail_spec.rb
237
244
  - spec/spec_helper.rb
238
245
  homepage: https://github.com/ynab/ynab-sdk-ruby
239
246
  licenses:
@@ -286,6 +293,7 @@ test_files:
286
293
  - spec/fixtures/vcr_cassettes/payee.yml
287
294
  - spec/fixtures/vcr_cassettes/payee_location.yml
288
295
  - spec/fixtures/vcr_cassettes/update_transactions.yml
296
+ - spec/fixtures/vcr_cassettes/import_transactions.yml
289
297
  - spec/fixtures/vcr_cassettes/bulk_transactions.yml
290
298
  - spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
291
299
  - spec/fixtures/vcr_cassettes/payees.yml
@@ -301,4 +309,6 @@ test_files:
301
309
  - spec/fixtures/vcr_cassettes/month.yml
302
310
  - spec/fixtures/vcr_cassettes/categories_unauthorized.yml
303
311
  - spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
312
+ - spec/fixtures/vcr_cassettes/create_account.yml
313
+ - spec/models/transaction_detail_spec.rb
304
314
  - spec/spec_helper.rb