ynab 1.15.0 → 1.20.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 +1 -0
  3. data/lib/ynab.rb +13 -8
  4. data/lib/ynab/api/accounts_api.rb +65 -7
  5. data/lib/ynab/api/budgets_api.rb +10 -7
  6. data/lib/ynab/api/categories_api.rb +15 -15
  7. data/lib/ynab/api/deprecated_api.rb +3 -3
  8. data/lib/ynab/api/months_api.rb +7 -7
  9. data/lib/ynab/api/payee_locations_api.rb +7 -7
  10. data/lib/ynab/api/payees_api.rb +7 -7
  11. data/lib/ynab/api/scheduled_transactions_api.rb +7 -7
  12. data/lib/ynab/api/transactions_api.rb +93 -41
  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 +4 -7
  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 +20 -7
  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 +5 -4
  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 +6 -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 +6 -5
  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 +6 -5
  54. data/lib/ynab/models/payee.rb +5 -4
  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 +259 -0
  71. data/lib/ynab/models/save_transaction.rb +24 -19
  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 +5 -4
  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 +33 -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 +18 -27
  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 +26 -15
@@ -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.15.0
4
+ version: 1.20.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: 2019-10-08 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -34,42 +34,42 @@ dependencies:
34
34
  name: json
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 2.1.0
40
37
  - - "~>"
41
38
  - !ruby/object:Gem::Version
42
39
  version: '2.1'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.1.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: 2.1.0
50
47
  - - "~>"
51
48
  - !ruby/object:Gem::Version
52
49
  version: '2.1'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.1.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rspec
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: 3.6.0
60
57
  - - "~>"
61
58
  - !ruby/object:Gem::Version
62
59
  version: '3.6'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.6.0
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 3.6.0
70
67
  - - "~>"
71
68
  - !ruby/object:Gem::Version
72
69
  version: '3.6'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.6.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: vcr
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -161,10 +161,13 @@ 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
167
169
  - lib/ynab/models/save_month_category_wrapper.rb
170
+ - lib/ynab/models/save_sub_transaction.rb
168
171
  - lib/ynab/models/save_transaction.rb
169
172
  - lib/ynab/models/save_transaction_wrapper.rb
170
173
  - lib/ynab/models/save_transactions_response.rb
@@ -182,6 +185,8 @@ files:
182
185
  - lib/ynab/models/transaction_response.rb
183
186
  - lib/ynab/models/transaction_response_data.rb
184
187
  - lib/ynab/models/transaction_summary.rb
188
+ - lib/ynab/models/transactions_import_response.rb
189
+ - lib/ynab/models/transactions_import_response_data.rb
185
190
  - lib/ynab/models/transactions_response.rb
186
191
  - lib/ynab/models/transactions_response_data.rb
187
192
  - lib/ynab/models/update_transaction.rb
@@ -211,8 +216,10 @@ files:
211
216
  - spec/fixtures/vcr_cassettes/categories_unauthorized.yml
212
217
  - spec/fixtures/vcr_cassettes/category.yml
213
218
  - spec/fixtures/vcr_cassettes/category_transactions.yml
219
+ - spec/fixtures/vcr_cassettes/create_account.yml
214
220
  - spec/fixtures/vcr_cassettes/create_transaction.yml
215
221
  - spec/fixtures/vcr_cassettes/create_transactions.yml
222
+ - spec/fixtures/vcr_cassettes/import_transactions.yml
216
223
  - spec/fixtures/vcr_cassettes/month.yml
217
224
  - spec/fixtures/vcr_cassettes/months.yml
218
225
  - spec/fixtures/vcr_cassettes/months_unauthorized.yml
@@ -233,6 +240,7 @@ files:
233
240
  - spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
234
241
  - spec/fixtures/vcr_cassettes/update_transaction.yml
235
242
  - spec/fixtures/vcr_cassettes/update_transactions.yml
243
+ - spec/models/transaction_detail_spec.rb
236
244
  - spec/spec_helper.rb
237
245
  homepage: https://github.com/ynab/ynab-sdk-ruby
238
246
  licenses:
@@ -253,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
261
  - !ruby/object:Gem::Version
254
262
  version: '0'
255
263
  requirements: []
256
- rubygems_version: 3.0.3
264
+ rubygems_version: 3.1.2
257
265
  signing_key:
258
266
  specification_version: 4
259
267
  summary: YNAB API Endpoints Ruby Gem
@@ -285,6 +293,7 @@ test_files:
285
293
  - spec/fixtures/vcr_cassettes/payee.yml
286
294
  - spec/fixtures/vcr_cassettes/payee_location.yml
287
295
  - spec/fixtures/vcr_cassettes/update_transactions.yml
296
+ - spec/fixtures/vcr_cassettes/import_transactions.yml
288
297
  - spec/fixtures/vcr_cassettes/bulk_transactions.yml
289
298
  - spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
290
299
  - spec/fixtures/vcr_cassettes/payees.yml
@@ -300,4 +309,6 @@ test_files:
300
309
  - spec/fixtures/vcr_cassettes/month.yml
301
310
  - spec/fixtures/vcr_cassettes/categories_unauthorized.yml
302
311
  - spec/fixtures/vcr_cassettes/transactions_unauthorized.yml
312
+ - spec/fixtures/vcr_cassettes/create_account.yml
313
+ - spec/models/transaction_detail_spec.rb
303
314
  - spec/spec_helper.rb