jortt 2.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -3
  4. data/README.md +86 -48
  5. data/Rakefile +0 -1
  6. data/jortt.gemspec +24 -13
  7. data/lib/jortt.rb +21 -0
  8. data/lib/jortt/client.rb +121 -0
  9. data/lib/jortt/client/customers.rb +91 -0
  10. data/lib/jortt/client/error.rb +33 -0
  11. data/lib/jortt/client/invoices.rb +65 -0
  12. data/lib/jortt/client/ledger_accounts.rb +27 -0
  13. data/lib/jortt/client/version.rb +6 -0
  14. data/spec/fixtures/vcr_cassettes/Jortt/_client/1_1_1.yml +64 -0
  15. data/spec/fixtures/vcr_cassettes/Jortt_Client/configured/_customers/1_1_1_1.yml +64 -0
  16. data/spec/fixtures/vcr_cassettes/Jortt_Client/configured/_invoices/1_1_2_1.yml +64 -0
  17. data/spec/fixtures/vcr_cassettes/Jortt_Client/configured/_ledger_accounts/1_1_3_1.yml +64 -0
  18. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/faulty_payload/shows_a_nice_error.yml +413 -0
  19. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/valid_payload/creates_the_customer.yml +505 -0
  20. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_delete/deletes_the_customer.yml +505 -0
  21. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_direct_debit_mandate/sends_direct_debit_mandate_to_the_customer_or_responds_with_an_error_when_not_possible.yml +470 -0
  22. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/query/returns_the_queried_customers.yml +464 -0
  23. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/without_params/returns_customers.yml +415 -0
  24. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_show/returns_the_customer.yml +464 -0
  25. data/spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_update/updates_the_customer.yml +603 -0
  26. data/spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_create/creates_the_invoice.yml +170 -0
  27. data/spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_download/returns_the_invoice_download_link.yml +168 -0
  28. data/spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/invoice_status/returns_those_invoices.yml +776 -0
  29. data/spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/query/returns_the_queried_invoices.yml +315 -0
  30. data/spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_show/returns_the_invoice.yml +421 -0
  31. data/spec/fixtures/vcr_cassettes/Jortt_Client_LedgerAccounts/_index/returns_invoices.yml +118 -0
  32. data/spec/jortt/client/customers_spec.rb +104 -0
  33. data/spec/jortt/client/invoices_spec.rb +119 -0
  34. data/spec/jortt/client/ledger_accounts_spec.rb +19 -0
  35. data/spec/jortt/client_spec.rb +22 -0
  36. data/spec/{freemle_spec.rb → jortt_spec.rb} +2 -3
  37. data/spec/spec_helper.rb +22 -10
  38. metadata +99 -42
  39. data/.rubocop.yml +0 -26
  40. data/lib/freemle.rb +0 -22
  41. data/lib/freemle/client.rb +0 -69
  42. data/lib/freemle/client/resource.rb +0 -140
  43. data/lib/freemle/client/version.rb +0 -7
  44. data/spec/freemle/client/resource_spec.rb +0 -31
  45. data/spec/freemle/client_spec.rb +0 -43
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app.jortt.nl/oauth-provider/oauth/token
6
+ body:
7
+ encoding: UTF-8
8
+ string: grant_type=client_credentials&scope=invoices%3Aread+invoices%3Awrite+customers%3Aread+customers%3Awrite
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.0.1
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Thu, 24 Sep 2020 15:03:35 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 200 OK
33
+ Cache-Control:
34
+ - private, no-store
35
+ Referrer-Policy:
36
+ - strict-origin-when-cross-origin
37
+ X-Permitted-Cross-Domain-Policies:
38
+ - none
39
+ Pragma:
40
+ - no-cache
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Request-Id:
44
+ - d83ae9ab-c629-46a3-8536-3d48345bbc24
45
+ X-Download-Options:
46
+ - noopen
47
+ Etag:
48
+ - W/"0fb39157c79bce6700240fe1ea97876e"
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Runtime:
52
+ - '0.333943'
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Powered-By:
56
+ - Phusion Passenger
57
+ Server:
58
+ - nginx + Phusion Passenger
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"access_token":"-OQjJQikSmMhA9USfhfgESp3DKCWUUOGBfclpyF0oic","token_type":"Bearer","expires_in":7200,"scope":"invoices:read
62
+ invoices:write customers:read customers:write","created_at":1600959815}'
63
+ recorded_at: Thu, 24 Sep 2020 15:03:35 GMT
64
+ - request:
65
+ method: get
66
+ uri: https://api.jortt.nl/ledger_accounts/invoices
67
+ body:
68
+ encoding: US-ASCII
69
+ string: ''
70
+ headers:
71
+ User-Agent:
72
+ - Faraday v1.0.1
73
+ Accept-Encoding:
74
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
75
+ Accept:
76
+ - "*/*"
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: OK
81
+ headers:
82
+ Date:
83
+ - Thu, 24 Sep 2020 15:03:35 GMT
84
+ Content-Type:
85
+ - application/json
86
+ Content-Length:
87
+ - '1011'
88
+ Connection:
89
+ - keep-alive
90
+ Server:
91
+ - Apache
92
+ Status:
93
+ - 200 OK
94
+ Content-Security-Policy:
95
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
96
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
97
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
98
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
99
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
100
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
101
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
102
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
103
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
104
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
105
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
106
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
107
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
108
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
109
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
110
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
111
+ body:
112
+ encoding: UTF-8
113
+ string: '{"data":[{"ledger_account_id":"05a59e27-489f-466d-adf7-fc06f576d4ec","parent_ledger_account_id":"105ea7d7-8bb5-499e-9823-8324826b6563","name":"Omzet","selectable":false},{"ledger_account_id":"fcabf6bf-cccc-4a6d-b04e-7b2369d04a79","parent_ledger_account_id":"05a59e27-489f-466d-adf7-fc06f576d4ec","name":"Diverse
114
+ omzet","selectable":true},{"ledger_account_id":"05ba2a61-a0cc-4736-9000-89fb361e85c8","parent_ledger_account_id":"05a59e27-489f-466d-adf7-fc06f576d4ec","name":"Omzet
115
+ uit facturen","selectable":true},{"ledger_account_id":"92cb5ad4-e2e7-4c41-8e17-bf7db69c7b9a","parent_ledger_account_id":"986e5b45-dae6-48cc-b4c9-a2f30fbd7bfe","name":"Inkoopkosten","selectable":false},{"ledger_account_id":"424d222d-f8cb-4d38-82c0-24674a2dcf75","parent_ledger_account_id":"92cb5ad4-e2e7-4c41-8e17-bf7db69c7b9a","name":"Inkoop","selectable":true},{"ledger_account_id":"a5c08fb4-0a22-4f53-9ee2-d7682bba10f7","parent_ledger_account_id":"92cb5ad4-e2e7-4c41-8e17-bf7db69c7b9a","name":"Uitbesteed
116
+ werk","selectable":true}]}'
117
+ recorded_at: Thu, 24 Sep 2020 15:03:35 GMT
118
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,104 @@
1
+ require 'spec_helper'
2
+
3
+ describe Jortt::Client::Customers, :vcr do
4
+ let(:client) { Jortt.client(ENV['JORTT_CLIENT_ID'], ENV['JORTT_CLIENT_SECRET']) }
5
+
6
+ let(:params) do
7
+ {
8
+ is_private: false,
9
+ customer_name: 'Nuka-Cola Corporation',
10
+ address_street: 'Vault 11',
11
+ address_postal_code: '1111AA',
12
+ address_city: 'Mojave Wasteland'
13
+ }
14
+ end
15
+
16
+ let!(:jane) { client.customers.create(is_private: true, customer_name: 'Jane Doe')['id'] }
17
+ let!(:john) { client.customers.create(is_private: true, customer_name: 'John Doe')['id'] }
18
+
19
+ after do
20
+ client.customers.delete(jane)
21
+ client.customers.delete(john)
22
+ end
23
+
24
+ describe '#index' do
25
+ context 'without params' do
26
+ subject { client.customers.index.to_a }
27
+
28
+ it "returns customers" do
29
+ expect(subject.count).to eq(3)
30
+ expect(subject[0]['customer_name']).to eq('Jane Doe')
31
+ expect(subject[1]['customer_name']).to eq('John Doe')
32
+ expect(subject[2]['customer_name']).to eq('Search target')
33
+ end
34
+ end
35
+
36
+ context 'query' do
37
+ subject { client.customers.index(query: 'Search target') }
38
+
39
+ it "returns the queried customers" do
40
+ expect(subject.count).to eq(1)
41
+ expect(subject.first['customer_name']).to eq("Search target")
42
+ end
43
+ end
44
+ end
45
+
46
+ describe '#show' do
47
+ subject { client.customers.show(jane) }
48
+
49
+ it "returns the customer" do
50
+ expect(subject['customer_name']).to eq("Jane Doe")
51
+ end
52
+ end
53
+
54
+ describe '#create' do
55
+ context "valid payload" do
56
+ subject { client.customers.create(params) }
57
+ after { client.customers.delete(subject['id']) }
58
+
59
+ it "creates the customer" do
60
+ uuid_length = 36
61
+ expect(subject['id'].length).to eq(uuid_length)
62
+ end
63
+ end
64
+
65
+ context "faulty payload" do
66
+ subject { client.customers.create({}) }
67
+
68
+ it "shows a nice error" do
69
+ expect { subject }.to raise_error(Jortt::Client::Error)
70
+ end
71
+ end
72
+ end
73
+
74
+ describe '#update' do
75
+ let(:uuid) { client.customers.create(params).fetch('id') }
76
+ subject { client.customers.update(uuid, params.merge(address_extra_information: 'Extra...')) }
77
+ after { client.customers.delete(uuid) }
78
+
79
+ it "updates the customer" do
80
+ expect(subject).to eq(true)
81
+ end
82
+ end
83
+
84
+ describe '#delete' do
85
+ let(:uuid) { client.customers.create(params).fetch('id') }
86
+ subject { client.customers.delete(uuid) }
87
+
88
+ it "deletes the customer" do
89
+ expect(subject).to eq(true)
90
+ end
91
+ end
92
+
93
+ describe '#direct_debit_mandate' do
94
+ subject { client.customers.direct_debit_mandate(jane) }
95
+
96
+ it "sends direct debit mandate to the customer or responds with an error when not possible" do
97
+ begin
98
+ subject
99
+ rescue Jortt::Client::Error => e
100
+ expect(e.details.first['key']).to eq("DirectDebit::NotEnabled")
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,119 @@
1
+ require 'spec_helper'
2
+
3
+ describe Jortt::Client::Invoices, :vcr do
4
+ let(:client) { Jortt.client(ENV['JORTT_CLIENT_ID'], ENV['JORTT_CLIENT_SECRET']) }
5
+
6
+ let(:customer) { client.customers.index(query: 'Search target').first }
7
+
8
+ let(:params) do
9
+ {
10
+ customer_id: customer.fetch('id'),
11
+ send_method: 'self',
12
+ line_items: [{
13
+ vat: 21,
14
+ amount_per_unit: {
15
+ value: 499,
16
+ currency: 'EUR'
17
+ },
18
+ units: 4,
19
+ description: 'Your product'
20
+ }]
21
+ }
22
+ end
23
+
24
+ describe '#index' do
25
+ context 'pagination', vcr: false do
26
+ subject { client.invoices.index }
27
+
28
+ before do
29
+ VCR.turn_off!
30
+
31
+ stub_request(:any, "https://app.jortt.nl/oauth-provider/oauth/token").
32
+ to_return(
33
+ headers: {content_type: 'application/json'},
34
+ body: {access_token: 'abc'}.to_json)
35
+
36
+ stub_request(:get, "https://api.jortt.nl/invoices?invoice_status&page=1&query").
37
+ to_return(
38
+ headers: {content_type: 'application/json'},
39
+ body: {
40
+ 'data': [{id: 1}, {id: 2}],
41
+ _links: {next: "https://api.jortt.nl/invoices?page=2"}
42
+ }.to_json
43
+ )
44
+
45
+ stub_request(:get, "https://api.jortt.nl/invoices?invoice_status&page=2&query").
46
+ to_return(
47
+ headers: {content_type: 'application/json'},
48
+ body: {
49
+ data: [{id: 3}, {id: 4}],
50
+ _links: {next: "https://api.jortt.nl/invoices?page=3"}
51
+ }.to_json
52
+ )
53
+
54
+ stub_request(:get, "https://api.jortt.nl/invoices?invoice_status&page=3&query").
55
+ to_return(
56
+ headers: {content_type: 'application/json'},
57
+ body: {
58
+ data: [{id: 5}],
59
+ _links: {next: nil}
60
+ }.to_json
61
+ )
62
+ end
63
+
64
+ after { VCR.turn_on! }
65
+
66
+ it "returns the first page" do
67
+ expect(subject.first.fetch('id')).to eq(1)
68
+ end
69
+
70
+ it "seamlessly returns results from the other pages" do
71
+ expect(subject.to_a.count).to eq(5)
72
+ end
73
+ end
74
+
75
+ context 'invoice_status' do
76
+ subject { client.invoices.index(invoice_status: 'sent') }
77
+
78
+ it "returns those invoices" do
79
+ expect(subject.count).to be > 0
80
+ expect(subject.first.fetch('invoice_status')).to eq('sent')
81
+ end
82
+ end
83
+
84
+ context 'query' do
85
+ subject { client.invoices.index(query: 'Search target') }
86
+
87
+ it "returns the queried invoices" do
88
+ expect(subject.first.dig('invoice_due_amount', 'value')).to eq("2415.16")
89
+ end
90
+ end
91
+ end
92
+
93
+ describe '#create' do
94
+ subject { client.invoices.create(params) }
95
+
96
+ it "creates the invoice" do
97
+ uuid_length = 36
98
+ expect(subject['id'].length).to eq(uuid_length)
99
+ end
100
+ end
101
+
102
+ describe '#show' do
103
+ let(:uuid) { client.invoices.index(query: 'Search target').first.fetch('id') }
104
+ subject { client.invoices.show(uuid) }
105
+
106
+ it "returns the invoice" do
107
+ expect(subject.dig('invoice_due_amount', 'value')).to eq("2415.16")
108
+ end
109
+ end
110
+
111
+ describe '#download' do
112
+ let(:uuid) { client.invoices.index(query: 'Download test').first.fetch('id') }
113
+ subject { client.invoices.download(uuid) }
114
+
115
+ it "returns the invoice download link" do
116
+ expect(subject.fetch('download_location')).to match(/https:\/\/files\.jortt\.nl\/.*/)
117
+ end
118
+ end
119
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe Jortt::Client::LedgerAccounts, :vcr do
4
+ let(:client) { Jortt.client(ENV['JORTT_CLIENT_ID'], ENV['JORTT_CLIENT_SECRET']) }
5
+
6
+ describe '#index' do
7
+ subject { client.ledger_accounts.index }
8
+
9
+ it "returns invoices" do
10
+ expect(subject.count).to be > 0
11
+ expect(subject.first).to eq(
12
+ "ledger_account_id" => "05a59e27-489f-466d-adf7-fc06f576d4ec",
13
+ "name" => "Omzet",
14
+ "parent_ledger_account_id" => "105ea7d7-8bb5-499e-9823-8324826b6563",
15
+ "selectable" => false
16
+ )
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe Jortt::Client, :vcr do
4
+ context 'configured' do
5
+ let(:client) { described_class.new(ENV['JORTT_CLIENT_ID'], ENV['JORTT_CLIENT_SECRET']) }
6
+
7
+ describe '#customers' do
8
+ subject { client.customers }
9
+ it { should be_instance_of(described_class::Customers) }
10
+ end
11
+
12
+ describe '#invoices' do
13
+ subject { client.invoices }
14
+ it { should be_instance_of(described_class::Invoices) }
15
+ end
16
+
17
+ describe '#ledger_accounts' do
18
+ subject { client.ledger_accounts }
19
+ it { should be_instance_of(described_class::LedgerAccounts) }
20
+ end
21
+ end
22
+ end
@@ -1,9 +1,8 @@
1
- # encoding: UTF-8
2
1
  require 'spec_helper'
3
2
 
4
- describe Freemle do
3
+ describe Jortt, :vcr do
5
4
  describe '.client' do
6
- subject { described_class.client(app_name: 'name', api_key: 'secret') }
5
+ subject { described_class.client(ENV['JORTT_CLIENT_ID'], ENV['JORTT_CLIENT_SECRET']) }
7
6
  it { should be_instance_of(described_class::Client) }
8
7
  end
9
8
  end
@@ -1,15 +1,27 @@
1
- # encoding: UTF-8
2
1
  require 'simplecov'
3
- require 'coveralls'
2
+ require 'rspec'
3
+ require 'rspec/its'
4
+ require 'webmock/rspec'
5
+ require 'vcr'
6
+ require 'jortt'
4
7
 
5
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6
- SimpleCov::Formatter::HTMLFormatter,
7
- Coveralls::SimpleCov::Formatter
8
- ]
9
8
  SimpleCov.start
10
- # Coveralls.wear!
9
+ if ENV['CI'] == 'true'
10
+ require 'codecov'
11
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
12
+ end
11
13
 
12
- require 'rspec'
13
- require 'webmock/rspec'
14
+ VCR.configure do |c|
15
+ c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
16
+ c.hook_into :webmock
17
+ c.configure_rspec_metadata!
18
+ c.default_cassette_options = { record: :once }
19
+
20
+ c.before_record do |i|
21
+ i.response.headers.delete('Set-Cookie')
22
+ i.request.headers.delete('Authorization')
23
+ end
24
+ end
14
25
 
15
- require 'freemle'
26
+ ENV['JORTT_CLIENT_ID'] ||= 'client-id'
27
+ ENV['JORTT_CLIENT_SECRET'] ||= 'client-secret'
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jortt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Forma
8
- - Steven Weller
8
+ - Michael Franken
9
9
  - Lars Vonk
10
- autorequire:
10
+ - Stephan van Diepen
11
+ autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2015-08-19 00:00:00.000000000 Z
14
+ date: 2020-09-28 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: rest-client
@@ -18,123 +19,137 @@ dependencies:
18
19
  requirements:
19
20
  - - "~>"
20
21
  - !ruby/object:Gem::Version
21
- version: '1.6'
22
+ version: '2.0'
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
26
  requirements:
26
27
  - - "~>"
27
28
  - !ruby/object:Gem::Version
28
- version: '1.6'
29
+ version: '2.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: oauth2
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: 1.4.4
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: 1.4.4
29
44
  - !ruby/object:Gem::Dependency
30
45
  name: bundler
31
46
  requirement: !ruby/object:Gem::Requirement
32
47
  requirements:
33
48
  - - "~>"
34
49
  - !ruby/object:Gem::Version
35
- version: '1.0'
50
+ version: '2.0'
36
51
  type: :development
37
52
  prerelease: false
38
53
  version_requirements: !ruby/object:Gem::Requirement
39
54
  requirements:
40
55
  - - "~>"
41
56
  - !ruby/object:Gem::Version
42
- version: '1.0'
57
+ version: '2.0'
43
58
  - !ruby/object:Gem::Dependency
44
- name: coveralls
59
+ name: codecov
45
60
  requirement: !ruby/object:Gem::Requirement
46
61
  requirements:
47
62
  - - "~>"
48
63
  - !ruby/object:Gem::Version
49
- version: '0.7'
64
+ version: '0.1'
50
65
  type: :development
51
66
  prerelease: false
52
67
  version_requirements: !ruby/object:Gem::Requirement
53
68
  requirements:
54
69
  - - "~>"
55
70
  - !ruby/object:Gem::Version
56
- version: '0.7'
71
+ version: '0.1'
57
72
  - !ruby/object:Gem::Dependency
58
73
  name: rake
59
74
  requirement: !ruby/object:Gem::Requirement
60
75
  requirements:
61
76
  - - "~>"
62
77
  - !ruby/object:Gem::Version
63
- version: '10.0'
78
+ version: '13.0'
64
79
  type: :development
65
80
  prerelease: false
66
81
  version_requirements: !ruby/object:Gem::Requirement
67
82
  requirements:
68
83
  - - "~>"
69
84
  - !ruby/object:Gem::Version
70
- version: '10.0'
85
+ version: '13.0'
71
86
  - !ruby/object:Gem::Dependency
72
87
  name: rspec
73
88
  requirement: !ruby/object:Gem::Requirement
74
89
  requirements:
75
90
  - - "~>"
76
91
  - !ruby/object:Gem::Version
77
- version: '2.14'
92
+ version: '3.7'
78
93
  type: :development
79
94
  prerelease: false
80
95
  version_requirements: !ruby/object:Gem::Requirement
81
96
  requirements:
82
97
  - - "~>"
83
98
  - !ruby/object:Gem::Version
84
- version: '2.14'
99
+ version: '3.7'
85
100
  - !ruby/object:Gem::Dependency
86
- name: webmock
101
+ name: rspec-its
87
102
  requirement: !ruby/object:Gem::Requirement
88
103
  requirements:
89
104
  - - "~>"
90
105
  - !ruby/object:Gem::Version
91
- version: '1.17'
106
+ version: '1.2'
92
107
  type: :development
93
108
  prerelease: false
94
109
  version_requirements: !ruby/object:Gem::Requirement
95
110
  requirements:
96
111
  - - "~>"
97
112
  - !ruby/object:Gem::Version
98
- version: '1.17'
113
+ version: '1.2'
99
114
  - !ruby/object:Gem::Dependency
100
- name: rubocop
115
+ name: webmock
101
116
  requirement: !ruby/object:Gem::Requirement
102
117
  requirements:
103
118
  - - "~>"
104
119
  - !ruby/object:Gem::Version
105
- version: 0.24.1
120
+ version: '3.3'
106
121
  type: :development
107
122
  prerelease: false
108
123
  version_requirements: !ruby/object:Gem::Requirement
109
124
  requirements:
110
125
  - - "~>"
111
126
  - !ruby/object:Gem::Version
112
- version: 0.24.1
127
+ version: '3.3'
113
128
  - !ruby/object:Gem::Dependency
114
- name: rubocop-rspec
129
+ name: vcr
115
130
  requirement: !ruby/object:Gem::Requirement
116
131
  requirements:
117
132
  - - "~>"
118
133
  - !ruby/object:Gem::Version
119
- version: 1.1.0
134
+ version: '6.0'
120
135
  type: :development
121
136
  prerelease: false
122
137
  version_requirements: !ruby/object:Gem::Requirement
123
138
  requirements:
124
139
  - - "~>"
125
140
  - !ruby/object:Gem::Version
126
- version: 1.1.0
127
- description:
141
+ version: '6.0'
142
+ description:
128
143
  email:
129
144
  - bforma@zilverline.com
130
- - suweller@zilverline.com
145
+ - mfranken@zilverline.com
131
146
  - lvonk@zilverline.com
147
+ - svdiepen@zilverline.com
132
148
  executables: []
133
149
  extensions: []
134
150
  extra_rdoc_files: []
135
151
  files:
136
152
  - ".gitignore"
137
- - ".rubocop.yml"
138
153
  - ".ruby-version"
139
154
  - ".travis.yml"
140
155
  - Gemfile
@@ -142,19 +157,42 @@ files:
142
157
  - README.md
143
158
  - Rakefile
144
159
  - jortt.gemspec
145
- - lib/freemle.rb
146
- - lib/freemle/client.rb
147
- - lib/freemle/client/resource.rb
148
- - lib/freemle/client/version.rb
149
- - spec/freemle/client/resource_spec.rb
150
- - spec/freemle/client_spec.rb
151
- - spec/freemle_spec.rb
160
+ - lib/jortt.rb
161
+ - lib/jortt/client.rb
162
+ - lib/jortt/client/customers.rb
163
+ - lib/jortt/client/error.rb
164
+ - lib/jortt/client/invoices.rb
165
+ - lib/jortt/client/ledger_accounts.rb
166
+ - lib/jortt/client/version.rb
167
+ - spec/fixtures/vcr_cassettes/Jortt/_client/1_1_1.yml
168
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_customers/1_1_1_1.yml
169
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_invoices/1_1_2_1.yml
170
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_ledger_accounts/1_1_3_1.yml
171
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/faulty_payload/shows_a_nice_error.yml
172
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/valid_payload/creates_the_customer.yml
173
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_delete/deletes_the_customer.yml
174
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_direct_debit_mandate/sends_direct_debit_mandate_to_the_customer_or_responds_with_an_error_when_not_possible.yml
175
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/query/returns_the_queried_customers.yml
176
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/without_params/returns_customers.yml
177
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_show/returns_the_customer.yml
178
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_update/updates_the_customer.yml
179
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_create/creates_the_invoice.yml
180
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_download/returns_the_invoice_download_link.yml
181
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/invoice_status/returns_those_invoices.yml
182
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/query/returns_the_queried_invoices.yml
183
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_show/returns_the_invoice.yml
184
+ - spec/fixtures/vcr_cassettes/Jortt_Client_LedgerAccounts/_index/returns_invoices.yml
185
+ - spec/jortt/client/customers_spec.rb
186
+ - spec/jortt/client/invoices_spec.rb
187
+ - spec/jortt/client/ledger_accounts_spec.rb
188
+ - spec/jortt/client_spec.rb
189
+ - spec/jortt_spec.rb
152
190
  - spec/spec_helper.rb
153
- homepage: https://www.jortt.nl/api-documentatie
191
+ homepage: https://app.jortt.nl/api-documentatie
154
192
  licenses:
155
193
  - MIT
156
194
  metadata: {}
157
- post_install_message:
195
+ post_install_message:
158
196
  rdoc_options: []
159
197
  require_paths:
160
198
  - lib
@@ -169,13 +207,32 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
207
  - !ruby/object:Gem::Version
170
208
  version: '0'
171
209
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.2.2
174
- signing_key:
210
+ rubygems_version: 3.1.2
211
+ signing_key:
175
212
  specification_version: 4
176
213
  summary: jortt.nl REST API client
177
214
  test_files:
178
- - spec/freemle/client/resource_spec.rb
179
- - spec/freemle/client_spec.rb
180
- - spec/freemle_spec.rb
215
+ - spec/fixtures/vcr_cassettes/Jortt/_client/1_1_1.yml
216
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_customers/1_1_1_1.yml
217
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_invoices/1_1_2_1.yml
218
+ - spec/fixtures/vcr_cassettes/Jortt_Client/configured/_ledger_accounts/1_1_3_1.yml
219
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/faulty_payload/shows_a_nice_error.yml
220
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_create/valid_payload/creates_the_customer.yml
221
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_delete/deletes_the_customer.yml
222
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_direct_debit_mandate/sends_direct_debit_mandate_to_the_customer_or_responds_with_an_error_when_not_possible.yml
223
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/query/returns_the_queried_customers.yml
224
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_index/without_params/returns_customers.yml
225
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_show/returns_the_customer.yml
226
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Customers/_update/updates_the_customer.yml
227
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_create/creates_the_invoice.yml
228
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_download/returns_the_invoice_download_link.yml
229
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/invoice_status/returns_those_invoices.yml
230
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_index/query/returns_the_queried_invoices.yml
231
+ - spec/fixtures/vcr_cassettes/Jortt_Client_Invoices/_show/returns_the_invoice.yml
232
+ - spec/fixtures/vcr_cassettes/Jortt_Client_LedgerAccounts/_index/returns_invoices.yml
233
+ - spec/jortt/client/customers_spec.rb
234
+ - spec/jortt/client/invoices_spec.rb
235
+ - spec/jortt/client/ledger_accounts_spec.rb
236
+ - spec/jortt/client_spec.rb
237
+ - spec/jortt_spec.rb
181
238
  - spec/spec_helper.rb