jortt 4.2.0 → 5.0.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.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -3
  4. data/README.md +45 -151
  5. data/Rakefile +0 -1
  6. data/jortt.gemspec +6 -6
  7. data/lib/jortt.rb +0 -1
  8. data/lib/jortt/client.rb +65 -16
  9. data/lib/jortt/client/customers.rb +56 -49
  10. data/lib/jortt/client/error.rb +33 -0
  11. data/lib/jortt/client/invoices.rb +41 -38
  12. data/lib/jortt/client/ledger_accounts.rb +27 -0
  13. data/lib/jortt/client/version.rb +1 -2
  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 +82 -37
  33. data/spec/jortt/client/invoices_spec.rb +105 -26
  34. data/spec/jortt/client/ledger_accounts_spec.rb +19 -0
  35. data/spec/jortt/client_spec.rb +5 -27
  36. data/spec/jortt_spec.rb +2 -3
  37. data/spec/spec_helper.rb +18 -4
  38. metadata +72 -37
  39. data/.rubocop.yml +0 -26
  40. data/lib/jortt/client/invoice.rb +0 -50
  41. data/spec/jortt/client/invoice_spec.rb +0 -23
@@ -0,0 +1,33 @@
1
+ module Jortt # :nodoc:
2
+ class Client # :nodoc:
3
+ class Error < StandardError # :nodoc:
4
+ attr_reader :response, :code, :key, :message, :details
5
+
6
+ def self.from_response(response)
7
+ Error.new(
8
+ response.parsed.dig('error', 'code'),
9
+ response.parsed.dig('error', 'key'),
10
+ response.parsed.dig('error', 'message'),
11
+ response.parsed.dig('error', 'details')
12
+ )
13
+ end
14
+
15
+ def initialize(code, key, message, details)
16
+ @code = code
17
+ @key = key
18
+ @message = message
19
+ @details = details
20
+
21
+ super(error_message)
22
+ end
23
+
24
+ def error_message
25
+ [message].tap do |m|
26
+ details.each do |detail|
27
+ m << "#{detail['param']} #{detail['message']}"
28
+ end
29
+ end.join("\n")
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,62 +1,65 @@
1
- # encoding: UTF-8
2
- require 'rest-client'
3
-
4
1
  module Jortt # :nodoc:
5
2
  class Client # :nodoc:
6
-
7
3
  ##
8
4
  # Exposes the operations available for a collection of invoices.
9
5
  #
10
6
  # @see { Jortt::Client.invoices }
11
7
  class Invoices
8
+ attr_accessor :client
9
+
10
+ def initialize(client)
11
+ @client = client
12
+ end
13
+
14
+ ##
15
+ # Returns all invoices using the GET /invoices endpoint.
16
+ # https://developer.jortt.nl/#list-invoices
17
+ #
18
+ # @example
19
+ # client.invoices.index(query: 'Jane')
20
+ #
21
+ def index(query: nil, invoice_status: nil)
22
+ client.paginated('/invoices', query: query, invoice_status: invoice_status)
23
+ end
12
24
 
13
- def initialize(config)
14
- @resource = RestClient::Resource.new(
15
- "#{config.base_url}/invoices",
16
- user: config.app_name,
17
- password: config.api_key,
18
- )
25
+ ##
26
+ # Returns a invoice using the GET /invoices/{invoice_id} endpoint.
27
+ # https://developer.jortt.nl/#get-invoice-by-id
28
+ #
29
+ # @example
30
+ # client.invoices.show("9afcd96e-caf8-40a1-96c9-1af16d0bc804")
31
+ #
32
+ def show(id)
33
+ client.get("/invoices/#{id}")
19
34
  end
20
35
 
21
36
  ##
22
37
  # Creates an Invoice using the POST /invoices endpoint.
23
- # See https://app.jortt.nl/api-documentatie#factuur-aanmaken
38
+ # https://developer.jortt.nl/#create-and-optionally-send-an-invoice
24
39
  #
25
40
  # @example
26
- # Jortt::Client.invoices.create(
27
- # customer_id: 'customer_id', # optional
28
- # delivery_period: '31-12-2015', # optional
29
- # reference: 'reference', # optional
41
+ # client.invoices.create(
30
42
  # line_items: [{
31
- # vat: 21, # mandatory, percentage
32
- # amount: 499, # mandatory, ex vat
33
- # quantity: 4, # mandatory
34
- # description: 'Your Thinkas' # mandatory
43
+ # vat: 21,
44
+ # amount: 499,
45
+ # units: 4,
46
+ # description: 'Your product'
35
47
  # }]
36
48
  # )
37
49
  def create(payload)
38
- resource.post(JSON.generate('invoice' => payload)) do |response|
39
- JSON.parse(response.body)
40
- end
41
- end
42
-
43
- def get(id)
44
- resource["id/#{id}"].get do |response|
45
- JSON.parse(response.body)
46
- end
50
+ client.post('/invoices', payload)
47
51
  end
48
52
 
49
- def search(query)
50
- resource['search'].get(params: {query: query}) do |response|
51
- JSON.parse(response.body)
52
- end
53
+ ##
54
+ # Returns an invoice PDF download link using the GET /invoices/{invoice_id}/download endpoint.
55
+ # https://developer.jortt.nl/#download-invoice-pdf
56
+ #
57
+ # @example
58
+ # client.invoices.download("9afcd96e-caf8-40a1-96c9-1af16d0bc804")
59
+ #
60
+ def download(id)
61
+ client.get("/invoices/#{id}/download")
53
62
  end
54
-
55
- private
56
-
57
- attr_reader :resource
58
-
59
63
  end
60
-
61
64
  end
62
65
  end
@@ -0,0 +1,27 @@
1
+ module Jortt # :nodoc:
2
+ class Client # :nodoc:
3
+ ##
4
+ # Exposes the operations available for a collection of customers.
5
+ #
6
+ # @see { Jortt::Client.customers }
7
+ class LedgerAccounts
8
+ attr_accessor :client
9
+
10
+ def initialize(client)
11
+ @client = client
12
+ end
13
+
14
+ ##
15
+ # Returns the list of Ledger Accounts that can be used to categorize Line Items on an Invoice
16
+ # for in your Profit and Loss report using the GET /ledger_accounts/invoices endpoint.
17
+ # https://developer.jortt.nl/#list-invoice-ledger-accounts
18
+ #
19
+ # @example
20
+ # client.ledger_accounts.index
21
+ #
22
+ def index
23
+ client.get('/ledger_accounts/invoices')
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,7 +1,6 @@
1
- # encoding: UTF-8
2
1
  module Jortt
3
2
  # Define the version of +Jortt::Client+
4
3
  class Client
5
- VERSION = '4.2.0'
4
+ VERSION = '5.0.0'
6
5
  end
7
6
  end
@@ -0,0 +1,64 @@
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:37 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
+ - dfa7330e-2975-4637-8d0b-fee35ed40cac
45
+ X-Download-Options:
46
+ - noopen
47
+ Etag:
48
+ - W/"97e5c8d5cedcea8cd8407a1a0a6f21c1"
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Runtime:
52
+ - '0.319627'
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":"OCU8keLfHRLh6MQ1GdpTxDF9fvnRHge-h8IuDo1fx5M","token_type":"Bearer","expires_in":7200,"scope":"invoices:read
62
+ invoices:write customers:read customers:write","created_at":1600959817}'
63
+ recorded_at: Thu, 24 Sep 2020 15:03:37 GMT
64
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,64 @@
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
+ - 68b40955-bca3-4ef1-a33a-b688de73e738
45
+ X-Download-Options:
46
+ - noopen
47
+ Etag:
48
+ - W/"c977a25cd5737656d676c943a553cb29"
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Runtime:
52
+ - '0.319920'
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":"Ck844kAGSr1df34pT_5YnvgKKZxa50ZzDsBHpwDTjk8","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
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,64 @@
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:36 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
+ - 6bc1cab8-2244-4e71-9660-756eb0151c4e
45
+ X-Download-Options:
46
+ - noopen
47
+ Etag:
48
+ - W/"d0f9e4a84aa7b9af1d36a01aa38cf13a"
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Runtime:
52
+ - '0.321558'
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":"Ap-1PU0Vghk01uEbz8mEP-Iaoc9eZygDcLwvEphpFqU","token_type":"Bearer","expires_in":7200,"scope":"invoices:read
62
+ invoices:write customers:read customers:write","created_at":1600959816}'
63
+ recorded_at: Thu, 24 Sep 2020 15:03:36 GMT
64
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,64 @@
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:36 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
+ - 290ef5a5-d238-4a03-bfdb-5e811fbd9461
45
+ X-Download-Options:
46
+ - noopen
47
+ Etag:
48
+ - W/"e1784d286681a5ff4135f3ca0a76ee57"
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Runtime:
52
+ - '0.319839'
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":"tTXpHoM9jl-_hp7rEr3_9SsUQWtvg0Pfw-re3HsbgZo","token_type":"Bearer","expires_in":7200,"scope":"invoices:read
62
+ invoices:write customers:read customers:write","created_at":1600959816}'
63
+ recorded_at: Thu, 24 Sep 2020 15:03:36 GMT
64
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,413 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.jortt.nl/customers/d22ad827-5e47-4f08-b437-37bf1b5f0e9a
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.0.1
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ Date:
22
+ - Thu, 24 Sep 2020 15:02:52 GMT
23
+ Connection:
24
+ - keep-alive
25
+ Server:
26
+ - Apache
27
+ Status:
28
+ - 204 No Content
29
+ Content-Security-Policy:
30
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
31
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
32
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
33
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
34
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
35
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
36
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
37
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
38
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
39
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
40
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
41
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
42
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
43
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
44
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
45
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
46
+ body:
47
+ encoding: UTF-8
48
+ string: ''
49
+ recorded_at: Thu, 24 Sep 2020 15:02:52 GMT
50
+ - request:
51
+ method: delete
52
+ uri: https://api.jortt.nl/customers/f0ccee86-e357-4be9-998c-06fb1aeae55d
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ User-Agent:
58
+ - Faraday v1.0.1
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ Accept:
62
+ - "*/*"
63
+ response:
64
+ status:
65
+ code: 204
66
+ message: No Content
67
+ headers:
68
+ Date:
69
+ - Thu, 24 Sep 2020 15:02:52 GMT
70
+ Connection:
71
+ - keep-alive
72
+ Server:
73
+ - Apache
74
+ Status:
75
+ - 204 No Content
76
+ Content-Security-Policy:
77
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
78
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
79
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
80
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
81
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
82
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
83
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
84
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
85
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
86
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
87
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
88
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
89
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
90
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
91
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
92
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
93
+ body:
94
+ encoding: UTF-8
95
+ string: ''
96
+ recorded_at: Thu, 24 Sep 2020 15:02:52 GMT
97
+ - request:
98
+ method: post
99
+ uri: https://app.jortt.nl/oauth-provider/oauth/token
100
+ body:
101
+ encoding: UTF-8
102
+ string: grant_type=client_credentials&scope=invoices%3Aread+invoices%3Awrite+customers%3Aread+customers%3Awrite
103
+ headers:
104
+ User-Agent:
105
+ - Faraday v1.0.1
106
+ Content-Type:
107
+ - application/x-www-form-urlencoded
108
+ Accept-Encoding:
109
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
110
+ Accept:
111
+ - "*/*"
112
+ response:
113
+ status:
114
+ code: 200
115
+ message: OK
116
+ headers:
117
+ Date:
118
+ - Thu, 24 Sep 2020 15:03:26 GMT
119
+ Content-Type:
120
+ - application/json; charset=utf-8
121
+ Transfer-Encoding:
122
+ - chunked
123
+ Connection:
124
+ - keep-alive
125
+ Status:
126
+ - 200 OK
127
+ Cache-Control:
128
+ - private, no-store
129
+ Referrer-Policy:
130
+ - strict-origin-when-cross-origin
131
+ X-Permitted-Cross-Domain-Policies:
132
+ - none
133
+ Pragma:
134
+ - no-cache
135
+ X-Xss-Protection:
136
+ - 1; mode=block
137
+ X-Request-Id:
138
+ - 26b03967-b7a5-46ee-8781-33e4495c5329
139
+ X-Download-Options:
140
+ - noopen
141
+ Etag:
142
+ - W/"c5e9681895930dfa5794b6e3994801b2"
143
+ X-Frame-Options:
144
+ - SAMEORIGIN
145
+ X-Runtime:
146
+ - '0.320727'
147
+ X-Content-Type-Options:
148
+ - nosniff
149
+ X-Powered-By:
150
+ - Phusion Passenger
151
+ Server:
152
+ - nginx + Phusion Passenger
153
+ body:
154
+ encoding: UTF-8
155
+ string: '{"access_token":"89ct_RTsKQnjgeN25HYNKKjdc2O441_CgTi08HGkEWU","token_type":"Bearer","expires_in":7200,"scope":"invoices:read
156
+ invoices:write customers:read customers:write","created_at":1600959806}'
157
+ recorded_at: Thu, 24 Sep 2020 15:03:26 GMT
158
+ - request:
159
+ method: post
160
+ uri: https://api.jortt.nl/customers?customer_name=Jane%20Doe&is_private=true
161
+ body:
162
+ encoding: UTF-8
163
+ string: ''
164
+ headers:
165
+ User-Agent:
166
+ - Faraday v1.0.1
167
+ Content-Length:
168
+ - '0'
169
+ Accept-Encoding:
170
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
171
+ Accept:
172
+ - "*/*"
173
+ response:
174
+ status:
175
+ code: 201
176
+ message: Created
177
+ headers:
178
+ Date:
179
+ - Thu, 24 Sep 2020 15:03:26 GMT
180
+ Content-Type:
181
+ - application/json
182
+ Content-Length:
183
+ - '54'
184
+ Connection:
185
+ - keep-alive
186
+ Server:
187
+ - Apache
188
+ Status:
189
+ - 201 Created
190
+ Content-Security-Policy:
191
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
192
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
193
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
194
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
195
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
196
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
197
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
198
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
199
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
200
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
201
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
202
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
203
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
204
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
205
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
206
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
207
+ body:
208
+ encoding: UTF-8
209
+ string: '{"data":{"id":"f231a06f-dc7e-4513-9fac-ace2b2d20a18"}}'
210
+ recorded_at: Thu, 24 Sep 2020 15:03:26 GMT
211
+ - request:
212
+ method: post
213
+ uri: https://api.jortt.nl/customers?customer_name=John%20Doe&is_private=true
214
+ body:
215
+ encoding: UTF-8
216
+ string: ''
217
+ headers:
218
+ User-Agent:
219
+ - Faraday v1.0.1
220
+ Content-Length:
221
+ - '0'
222
+ Accept-Encoding:
223
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
224
+ Accept:
225
+ - "*/*"
226
+ response:
227
+ status:
228
+ code: 201
229
+ message: Created
230
+ headers:
231
+ Date:
232
+ - Thu, 24 Sep 2020 15:03:26 GMT
233
+ Content-Type:
234
+ - application/json
235
+ Content-Length:
236
+ - '54'
237
+ Connection:
238
+ - keep-alive
239
+ Server:
240
+ - Apache
241
+ Status:
242
+ - 201 Created
243
+ Content-Security-Policy:
244
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
245
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
246
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
247
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
248
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
249
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
250
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
251
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
252
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
253
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
254
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
255
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
256
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
257
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
258
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
259
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
260
+ body:
261
+ encoding: UTF-8
262
+ string: '{"data":{"id":"22a8af7e-3497-4b77-be0d-7f5e881770c9"}}'
263
+ recorded_at: Thu, 24 Sep 2020 15:03:26 GMT
264
+ - request:
265
+ method: post
266
+ uri: https://api.jortt.nl/customers
267
+ body:
268
+ encoding: UTF-8
269
+ string: ''
270
+ headers:
271
+ User-Agent:
272
+ - Faraday v1.0.1
273
+ Content-Length:
274
+ - '0'
275
+ Accept-Encoding:
276
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
277
+ Accept:
278
+ - "*/*"
279
+ response:
280
+ status:
281
+ code: 422
282
+ message: Unprocessable Entity
283
+ headers:
284
+ Date:
285
+ - Thu, 24 Sep 2020 15:03:26 GMT
286
+ Content-Type:
287
+ - application/json
288
+ Content-Length:
289
+ - '292'
290
+ Connection:
291
+ - keep-alive
292
+ Server:
293
+ - Apache
294
+ Status:
295
+ - 422 Unprocessable Entity
296
+ Content-Security-Policy:
297
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
298
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
299
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
300
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
301
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
302
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
303
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
304
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
305
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
306
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
307
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
308
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
309
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
310
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
311
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
312
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
313
+ body:
314
+ encoding: UTF-8
315
+ string: '{"error":{"code":422,"key":"params.invalid","message":"The parameters
316
+ are invalid (either missing, not of the correct type or incorrect format).","details":[{"key":"is_missing","param":"is_private","message":"is
317
+ missing"},{"key":"is_missing","param":"customer_name","message":"is missing"}]}}'
318
+ recorded_at: Thu, 24 Sep 2020 15:03:26 GMT
319
+ - request:
320
+ method: delete
321
+ uri: https://api.jortt.nl/customers/f231a06f-dc7e-4513-9fac-ace2b2d20a18
322
+ body:
323
+ encoding: US-ASCII
324
+ string: ''
325
+ headers:
326
+ User-Agent:
327
+ - Faraday v1.0.1
328
+ Accept-Encoding:
329
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
330
+ Accept:
331
+ - "*/*"
332
+ response:
333
+ status:
334
+ code: 204
335
+ message: No Content
336
+ headers:
337
+ Date:
338
+ - Thu, 24 Sep 2020 15:03:27 GMT
339
+ Connection:
340
+ - keep-alive
341
+ Server:
342
+ - Apache
343
+ Status:
344
+ - 204 No Content
345
+ Content-Security-Policy:
346
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
347
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
348
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
349
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
350
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
351
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
352
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
353
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
354
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
355
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
356
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
357
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
358
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
359
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
360
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
361
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
362
+ body:
363
+ encoding: UTF-8
364
+ string: ''
365
+ recorded_at: Thu, 24 Sep 2020 15:03:27 GMT
366
+ - request:
367
+ method: delete
368
+ uri: https://api.jortt.nl/customers/22a8af7e-3497-4b77-be0d-7f5e881770c9
369
+ body:
370
+ encoding: US-ASCII
371
+ string: ''
372
+ headers:
373
+ User-Agent:
374
+ - Faraday v1.0.1
375
+ Accept-Encoding:
376
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
377
+ Accept:
378
+ - "*/*"
379
+ response:
380
+ status:
381
+ code: 204
382
+ message: No Content
383
+ headers:
384
+ Date:
385
+ - Thu, 24 Sep 2020 15:03:27 GMT
386
+ Connection:
387
+ - keep-alive
388
+ Server:
389
+ - Apache
390
+ Status:
391
+ - 204 No Content
392
+ Content-Security-Policy:
393
+ - 'default-src ''self'' ''unsafe-inline'' blob: data: *.jortt.nl; script-src
394
+ ''self'' ''unsafe-eval'' blob: ''unsafe-inline'' files.jortt.nl *.googletagmanager.com
395
+ *.uservoice.com inlinemanual.com *.google-analytics.com *.googleadservices.com
396
+ bat.bing.com tapfiliate.com static.ads-twitter.com tagmanager.google.com analytics.twitter.com
397
+ https://connect.facebook.net https://app.inlinemanual.com; connect-src
398
+ ''self'' https://*.jortt.nl wss://*.jortt.nl analytics.inlinemanual.com files.jortt.nl
399
+ www.google-analytics.com stats.g.doubleclick.net file-storage-app-production.s3.eu-central-1.amazonaws.com
400
+ https://app.inlinemanual.com; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
401
+ files.jortt.nl tagmanager.google.com https://app.inlinemanual.com; font-src
402
+ ''self'' data: fonts.gstatic.com files.jortt.nl https://app.inlinemanual.com; frame-src
403
+ ''self'' *.jortt.nl files.jortt.nl b.frstre.com beacon.tapfiliate.com jortt.uservoice.com
404
+ *.vimeo.com https://connect.facebook.net; img-src ''self'' blob: data:
405
+ *.jortt.nl https://www.facebook.com files.jortt.nl www.google-analytics.com
406
+ stats.g.doubleclick.net www.google.nl www.google.com bat.bing.com googleads.g.doubleclick.net
407
+ https://www.googletagmanager.com https://widget.uservoice.com www.google.de
408
+ t.co *.gstatic.com https://ssl.google-analytics.com https://app.inlinemanual.com'
409
+ body:
410
+ encoding: UTF-8
411
+ string: ''
412
+ recorded_at: Thu, 24 Sep 2020 15:03:27 GMT
413
+ recorded_with: VCR 6.0.0