ynab 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/ynab.rb +1 -1
- data/lib/ynab/api/accounts_api.rb +1 -1
- data/lib/ynab/api/budgets_api.rb +1 -1
- data/lib/ynab/api/categories_api.rb +1 -1
- data/lib/ynab/api/deprecated_api.rb +1 -1
- data/lib/ynab/api/months_api.rb +1 -1
- data/lib/ynab/api/payee_locations_api.rb +1 -1
- data/lib/ynab/api/payees_api.rb +1 -1
- data/lib/ynab/api/scheduled_transactions_api.rb +1 -1
- data/lib/ynab/api/transactions_api.rb +1 -1
- data/lib/ynab/api/user_api.rb +1 -1
- data/lib/ynab/api_client.rb +3 -2
- data/lib/ynab/configuration.rb +2 -3
- data/lib/ynab/models/account.rb +1 -1
- data/lib/ynab/models/account_response.rb +1 -1
- data/lib/ynab/models/account_response_data.rb +1 -1
- data/lib/ynab/models/accounts_response.rb +1 -1
- data/lib/ynab/models/accounts_response_data.rb +1 -1
- data/lib/ynab/models/budget_detail.rb +1 -1
- data/lib/ynab/models/budget_detail_response.rb +1 -1
- data/lib/ynab/models/budget_detail_response_data.rb +1 -1
- data/lib/ynab/models/budget_settings.rb +1 -1
- data/lib/ynab/models/budget_settings_response.rb +1 -1
- data/lib/ynab/models/budget_settings_response_data.rb +1 -1
- data/lib/ynab/models/budget_summary.rb +1 -1
- data/lib/ynab/models/budget_summary_response.rb +1 -1
- data/lib/ynab/models/budget_summary_response_data.rb +1 -1
- data/lib/ynab/models/bulk_response.rb +1 -1
- data/lib/ynab/models/bulk_response_data.rb +1 -1
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -1
- data/lib/ynab/models/bulk_transactions.rb +1 -1
- data/lib/ynab/models/categories_response.rb +1 -1
- data/lib/ynab/models/categories_response_data.rb +1 -1
- data/lib/ynab/models/category.rb +1 -1
- data/lib/ynab/models/category_group.rb +1 -1
- data/lib/ynab/models/category_group_with_categories.rb +1 -1
- data/lib/ynab/models/category_response.rb +1 -1
- data/lib/ynab/models/category_response_data.rb +1 -1
- data/lib/ynab/models/currency_format.rb +1 -1
- data/lib/ynab/models/date_format.rb +1 -1
- data/lib/ynab/models/error_detail.rb +1 -1
- data/lib/ynab/models/error_response.rb +1 -1
- data/lib/ynab/models/hybrid_transaction.rb +1 -1
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -1
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -1
- data/lib/ynab/models/month_detail.rb +1 -1
- data/lib/ynab/models/month_detail_response.rb +1 -1
- data/lib/ynab/models/month_detail_response_data.rb +1 -1
- data/lib/ynab/models/month_summaries_response.rb +1 -1
- data/lib/ynab/models/month_summaries_response_data.rb +1 -1
- data/lib/ynab/models/month_summary.rb +1 -1
- data/lib/ynab/models/payee.rb +1 -1
- data/lib/ynab/models/payee_location.rb +1 -1
- data/lib/ynab/models/payee_location_response.rb +1 -1
- data/lib/ynab/models/payee_location_response_data.rb +1 -1
- data/lib/ynab/models/payee_locations_response.rb +1 -1
- data/lib/ynab/models/payee_locations_response_data.rb +1 -1
- data/lib/ynab/models/payee_response.rb +1 -1
- data/lib/ynab/models/payee_response_data.rb +1 -1
- data/lib/ynab/models/payees_response.rb +1 -1
- data/lib/ynab/models/payees_response_data.rb +1 -1
- data/lib/ynab/models/save_category_response.rb +1 -1
- data/lib/ynab/models/save_category_response_data.rb +1 -1
- data/lib/ynab/models/save_month_category.rb +1 -1
- data/lib/ynab/models/save_month_category_wrapper.rb +1 -1
- data/lib/ynab/models/save_sub_transaction.rb +1 -1
- data/lib/ynab/models/save_transaction.rb +1 -1
- data/lib/ynab/models/save_transaction_wrapper.rb +1 -1
- data/lib/ynab/models/save_transactions_response.rb +1 -1
- data/lib/ynab/models/save_transactions_response_data.rb +1 -1
- data/lib/ynab/models/save_transactions_wrapper.rb +1 -1
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -1
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -1
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -1
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -1
- data/lib/ynab/models/sub_transaction.rb +1 -1
- data/lib/ynab/models/transaction_detail.rb +1 -1
- data/lib/ynab/models/transaction_response.rb +1 -1
- data/lib/ynab/models/transaction_response_data.rb +1 -1
- data/lib/ynab/models/transaction_summary.rb +1 -1
- data/lib/ynab/models/transactions_import_response.rb +1 -1
- data/lib/ynab/models/transactions_import_response_data.rb +1 -1
- data/lib/ynab/models/transactions_response.rb +1 -1
- data/lib/ynab/models/transactions_response_data.rb +1 -1
- data/lib/ynab/models/update_transaction.rb +1 -1
- data/lib/ynab/models/update_transactions_wrapper.rb +1 -1
- data/lib/ynab/models/user.rb +1 -1
- data/lib/ynab/models/user_response.rb +1 -1
- data/lib/ynab/models/user_response_data.rb +1 -1
- data/lib/ynab/version.rb +1 -1
- data/spec/api/transactions_spec.rb +11 -0
- data/spec/fixtures/vcr_cassettes/import_transactions.yml +50 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5193151bd306e6a66a71f0c58b24ebb55d2ed1c16dc33120900672790d8fc9d1
|
4
|
+
data.tar.gz: 7cfd48f3711e1da5cdafecaf184122becb49cb87c09cc1dd57447d1720b06c07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71d5b167f0c5f901bac07b64bc09724e99036aadaefd819fd257173f456665a20f382eefe36a14094c7868c562431336c060a18aae9ceb024580487809ce6c4f
|
7
|
+
data.tar.gz: 44e56b3b9b838aad74319bd0ffddec55122a4981437093fffe2bd67a09be46b671fc52af9c85bc57aab916e413ee44a3fa7bf179bf15910896e0f265567aa653
|
data/README.md
CHANGED
@@ -71,6 +71,7 @@ The following methods are available in this library.
|
|
71
71
|
| | [transactions.create_transactions(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#create_transaction) | Creates multiple transactions |
|
72
72
|
| | [transactions.update_transaction(budget_id, id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#update_transaction) | Updates a single transaction |
|
73
73
|
| | [transactions.update_transactions(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#update_transactions) | Updates multiple transactions |
|
74
|
+
| | [transactions.import_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#import_transactions) | Imports transactions |
|
74
75
|
| **Scheduled Transactions** | [scheduled_transactions.get_scheduled_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | Returns all scheduled transactions |
|
75
76
|
| | [scheduled_transactions.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Returns a single scheduled transaction |
|
76
77
|
|
data/lib/ynab.rb
CHANGED
data/lib/ynab/api/budgets_api.rb
CHANGED
data/lib/ynab/api/months_api.rb
CHANGED
data/lib/ynab/api/payees_api.rb
CHANGED
data/lib/ynab/api/user_api.rb
CHANGED
data/lib/ynab/api_client.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -267,7 +267,8 @@ module YNAB
|
|
267
267
|
def build_request_url(path)
|
268
268
|
# Add leading and trailing slashes to path
|
269
269
|
path = "/#{path}".gsub(/\/+/, '/')
|
270
|
-
URI.
|
270
|
+
URI.encode_www_form_component(path).gsub('+', '%20')
|
271
|
+
@config.base_url + path
|
271
272
|
end
|
272
273
|
|
273
274
|
# Builds the HTTP request body
|
data/lib/ynab/configuration.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -174,8 +174,7 @@ module YNAB
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def base_url
|
177
|
-
|
178
|
-
URI.encode(url)
|
177
|
+
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
179
178
|
end
|
180
179
|
|
181
180
|
# Gets API key (with prefix if set).
|
data/lib/ynab/models/account.rb
CHANGED
data/lib/ynab/models/category.rb
CHANGED
data/lib/ynab/models/payee.rb
CHANGED
data/lib/ynab/models/user.rb
CHANGED
data/lib/ynab/version.rb
CHANGED
@@ -188,6 +188,17 @@ describe 'transactions' do
|
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
+
describe 'POST /budgets/{budget_id}/transactions/import' do
|
192
|
+
it "import transactions" do
|
193
|
+
VCR.use_cassette("import_transactions") do
|
194
|
+
response = instance.import_transactions(budget_id)
|
195
|
+
expect(client.last_request.response.options[:code]).to be 201
|
196
|
+
expect(response.data.transaction_ids.length).to eq 1
|
197
|
+
expect(response.data.transaction_ids).to include '07b68f11-98bd-4184-8866-83268a654318'
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
191
202
|
describe 'POST /budgets/{budget_id}/transactions/bulk' do
|
192
203
|
it "bulk creations transactions" do
|
193
204
|
VCR.use_cassette("bulk_transactions") do
|
@@ -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
|
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.
|
4
|
+
version: 1.18.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-
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- spec/fixtures/vcr_cassettes/category_transactions.yml
|
217
217
|
- spec/fixtures/vcr_cassettes/create_transaction.yml
|
218
218
|
- spec/fixtures/vcr_cassettes/create_transactions.yml
|
219
|
+
- spec/fixtures/vcr_cassettes/import_transactions.yml
|
219
220
|
- spec/fixtures/vcr_cassettes/month.yml
|
220
221
|
- spec/fixtures/vcr_cassettes/months.yml
|
221
222
|
- spec/fixtures/vcr_cassettes/months_unauthorized.yml
|
@@ -288,6 +289,7 @@ test_files:
|
|
288
289
|
- spec/fixtures/vcr_cassettes/payee.yml
|
289
290
|
- spec/fixtures/vcr_cassettes/payee_location.yml
|
290
291
|
- spec/fixtures/vcr_cassettes/update_transactions.yml
|
292
|
+
- spec/fixtures/vcr_cassettes/import_transactions.yml
|
291
293
|
- spec/fixtures/vcr_cassettes/bulk_transactions.yml
|
292
294
|
- spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml
|
293
295
|
- spec/fixtures/vcr_cassettes/payees.yml
|