quaderno 1.13.2 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +56 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +2 -15
- data/README.md +120 -42
- data/Rakefile +4 -50
- data/changelog.md +67 -41
- data/lib/quaderno-ruby.rb +5 -5
- data/lib/quaderno-ruby/base.rb +112 -107
- data/lib/quaderno-ruby/behavior/block.rb +20 -19
- data/lib/quaderno-ruby/behavior/crud.rb +108 -95
- data/lib/quaderno-ruby/behavior/deliver.rb +20 -18
- data/lib/quaderno-ruby/behavior/payment.rb +38 -34
- data/lib/quaderno-ruby/behavior/retrieve.rb +26 -25
- data/lib/quaderno-ruby/checkout_session.rb +4 -0
- data/lib/quaderno-ruby/collection.rb +1 -0
- data/lib/quaderno-ruby/contact.rb +6 -8
- data/lib/quaderno-ruby/credit.rb +10 -12
- data/lib/quaderno-ruby/document_item.rb +1 -3
- data/lib/quaderno-ruby/estimate.rb +5 -7
- data/lib/quaderno-ruby/evidence.rb +5 -7
- data/lib/quaderno-ruby/exceptions/exceptions.rb +50 -44
- data/lib/quaderno-ruby/expense.rb +6 -8
- data/lib/quaderno-ruby/helpers/authentication.rb +16 -18
- data/lib/quaderno-ruby/helpers/rate_limit.rb +12 -0
- data/lib/quaderno-ruby/income.rb +8 -10
- data/lib/quaderno-ruby/invoice.rb +9 -11
- data/lib/quaderno-ruby/item.rb +3 -6
- data/lib/quaderno-ruby/payment.rb +2 -3
- data/lib/quaderno-ruby/receipt.rb +6 -8
- data/lib/quaderno-ruby/recurring.rb +4 -7
- data/lib/quaderno-ruby/report.rb +67 -29
- data/lib/quaderno-ruby/tax.rb +51 -46
- data/lib/quaderno-ruby/version.rb +3 -0
- data/lib/quaderno-ruby/webhook.rb +3 -5
- data/quaderno.gemspec +28 -148
- metadata +92 -92
- data/Gemfile.lock +0 -91
- data/VERSION +0 -1
- data/test/fixtures/quaderno_cassettes/.DS_Store +0 -0
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +0 -52
- data/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml +0 -56
- data/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml +0 -57
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +0 -52
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +0 -55
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +0 -56
- data/test/fixtures/quaderno_cassettes/all_items.yml +0 -46
- data/test/fixtures/quaderno_cassettes/all_receipts.yml +0 -53
- data/test/fixtures/quaderno_cassettes/all_webhooks.yml +0 -214
- data/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +0 -156
- data/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +0 -278
- data/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +0 -159
- data/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +0 -196
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +0 -187
- data/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml +0 -199
- data/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml +0 -199
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +0 -187
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +0 -189
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +0 -190
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +0 -128
- data/test/fixtures/quaderno_cassettes/deleted_receipt.yml +0 -223
- data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +0 -257
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +0 -136
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +0 -143
- data/test/fixtures/quaderno_cassettes/delivered_receipt.yml +0 -140
- data/test/fixtures/quaderno_cassettes/evidence_invoice.yml +0 -98
- data/test/fixtures/quaderno_cassettes/found_contact.yml +0 -95
- data/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml +0 -99
- data/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml +0 -100
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +0 -97
- data/test/fixtures/quaderno_cassettes/found_expense.yml +0 -99
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +0 -100
- data/test/fixtures/quaderno_cassettes/found_item.yml +0 -91
- data/test/fixtures/quaderno_cassettes/found_receipt.yml +0 -98
- data/test/fixtures/quaderno_cassettes/found_webhook.yml +0 -130
- data/test/fixtures/quaderno_cassettes/new_contact.yml +0 -48
- data/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml +0 -48
- data/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml +0 -48
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +0 -137
- data/test/fixtures/quaderno_cassettes/new_evidence.yml +0 -48
- data/test/fixtures/quaderno_cassettes/new_expense.yml +0 -189
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +0 -137
- data/test/fixtures/quaderno_cassettes/new_item.yml +0 -48
- data/test/fixtures/quaderno_cassettes/new_receipt.yml +0 -173
- data/test/fixtures/quaderno_cassettes/new_webhook.yml +0 -87
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +0 -98
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +0 -99
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +0 -46
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +0 -138
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +0 -138
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +0 -97
- data/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml +0 -101
- data/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml +0 -102
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +0 -185
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +0 -184
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +0 -184
- data/test/fixtures/quaderno_cassettes/updated_item.yml +0 -93
- data/test/fixtures/quaderno_cassettes/updated_receipt.yml +0 -220
- data/test/fixtures/quaderno_cassettes/updated_webhook.yml +0 -175
- data/test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml +0 -44
- data/test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml +0 -44
- data/test/helper.rb +0 -32
- data/test/unit/test_quaderno_contacts.rb +0 -83
- data/test/unit/test_quaderno_contacts_thread_safe.rb +0 -104
- data/test/unit/test_quaderno_estimates.rb +0 -155
- data/test/unit/test_quaderno_evidences.rb +0 -41
- data/test/unit/test_quaderno_expenses.rb +0 -162
- data/test/unit/test_quaderno_invoices.rb +0 -177
- data/test/unit/test_quaderno_items.rb +0 -84
- data/test/unit/test_quaderno_receipts.rb +0 -156
- data/test/unit/test_quaderno_tax.rb +0 -46
- data/test/unit/test_quaderno_webhooks.rb +0 -93
@@ -1,136 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept:
|
11
|
-
- application/json
|
12
|
-
authorization:
|
13
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
|
-
response:
|
15
|
-
status:
|
16
|
-
code: 200
|
17
|
-
message: OK
|
18
|
-
headers:
|
19
|
-
x-frame-options:
|
20
|
-
- ALLOWALL
|
21
|
-
x-ratelimit-limit:
|
22
|
-
- '2000'
|
23
|
-
x-ratelimit-reset:
|
24
|
-
- '15'
|
25
|
-
x-ratelimit-remaining:
|
26
|
-
- '100'
|
27
|
-
x-pages-currentpage:
|
28
|
-
- '1'
|
29
|
-
x-pages-totalpages:
|
30
|
-
- '1'
|
31
|
-
content-type:
|
32
|
-
- application/json; charset=utf-8
|
33
|
-
etag:
|
34
|
-
- '"b1aa095a3d37cb3a66bdf93f658ff2ee"'
|
35
|
-
cache-control:
|
36
|
-
- max-age=0, private, must-revalidate
|
37
|
-
x-request-id:
|
38
|
-
- 4b668b53-4776-45f0-b6f3-515e65e9a5d4
|
39
|
-
x-runtime:
|
40
|
-
- '0.395275'
|
41
|
-
connection:
|
42
|
-
- close
|
43
|
-
server:
|
44
|
-
- thin
|
45
|
-
body:
|
46
|
-
encoding: UTF-8
|
47
|
-
string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi
|
48
|
-
Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA
|
49
|
-
(21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]'
|
50
|
-
http_version: '1.1'
|
51
|
-
recorded_at: Fri, 09 Jun 2017 13:06:24 GMT
|
52
|
-
- request:
|
53
|
-
method: get
|
54
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json
|
55
|
-
body:
|
56
|
-
encoding: US-ASCII
|
57
|
-
string: ''
|
58
|
-
headers:
|
59
|
-
accept:
|
60
|
-
- application/json
|
61
|
-
authorization:
|
62
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
63
|
-
response:
|
64
|
-
status:
|
65
|
-
code: 200
|
66
|
-
message: OK
|
67
|
-
headers:
|
68
|
-
x-frame-options:
|
69
|
-
- ALLOWALL
|
70
|
-
x-ratelimit-limit:
|
71
|
-
- '2000'
|
72
|
-
x-ratelimit-reset:
|
73
|
-
- '15'
|
74
|
-
x-ratelimit-remaining:
|
75
|
-
- '99'
|
76
|
-
content-type:
|
77
|
-
- application/json; charset=utf-8
|
78
|
-
etag:
|
79
|
-
- '"0c776997933eb60833b37beaf43814c8"'
|
80
|
-
cache-control:
|
81
|
-
- max-age=0, private, must-revalidate
|
82
|
-
x-request-id:
|
83
|
-
- 90fc57c3-a86a-48e5-8045-5b7024ff5a67
|
84
|
-
x-runtime:
|
85
|
-
- '0.166282'
|
86
|
-
connection:
|
87
|
-
- close
|
88
|
-
server:
|
89
|
-
- thin
|
90
|
-
body:
|
91
|
-
encoding: UTF-8
|
92
|
-
string: '{"status":"OK"}'
|
93
|
-
http_version: '1.1'
|
94
|
-
recorded_at: Fri, 09 Jun 2017 13:06:24 GMT
|
95
|
-
- request:
|
96
|
-
method: get
|
97
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/175/deliver.json
|
98
|
-
body:
|
99
|
-
encoding: US-ASCII
|
100
|
-
string: ''
|
101
|
-
headers:
|
102
|
-
accept:
|
103
|
-
- application/json
|
104
|
-
authorization:
|
105
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
106
|
-
response:
|
107
|
-
status:
|
108
|
-
code: 422
|
109
|
-
message: Unprocessable Entity
|
110
|
-
headers:
|
111
|
-
x-frame-options:
|
112
|
-
- ALLOWALL
|
113
|
-
x-ratelimit-limit:
|
114
|
-
- '2000'
|
115
|
-
x-ratelimit-reset:
|
116
|
-
- '14'
|
117
|
-
x-ratelimit-remaining:
|
118
|
-
- '98'
|
119
|
-
content-type:
|
120
|
-
- application/json; charset=utf-8
|
121
|
-
cache-control:
|
122
|
-
- no-cache
|
123
|
-
x-request-id:
|
124
|
-
- 69f5b9c7-d537-4660-97a4-bbd07df6f0eb
|
125
|
-
x-runtime:
|
126
|
-
- '0.308794'
|
127
|
-
connection:
|
128
|
-
- close
|
129
|
-
server:
|
130
|
-
- thin
|
131
|
-
body:
|
132
|
-
encoding: UTF-8
|
133
|
-
string: '{"delivery_recipients":["can''t be blank","is invalid"]}'
|
134
|
-
http_version: '1.1'
|
135
|
-
recorded_at: Fri, 09 Jun 2017 13:06:24 GMT
|
136
|
-
recorded_with: VCR 2.9.2
|
@@ -1,143 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept:
|
11
|
-
- application/json
|
12
|
-
authorization:
|
13
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
|
-
response:
|
15
|
-
status:
|
16
|
-
code: 200
|
17
|
-
message: OK
|
18
|
-
headers:
|
19
|
-
x-frame-options:
|
20
|
-
- ALLOWALL
|
21
|
-
x-ratelimit-limit:
|
22
|
-
- '2000'
|
23
|
-
x-ratelimit-reset:
|
24
|
-
- '10'
|
25
|
-
x-ratelimit-remaining:
|
26
|
-
- '98'
|
27
|
-
x-pages-currentpage:
|
28
|
-
- '1'
|
29
|
-
x-pages-totalpages:
|
30
|
-
- '1'
|
31
|
-
content-type:
|
32
|
-
- application/json; charset=utf-8
|
33
|
-
etag:
|
34
|
-
- '"47582ab138340fc16e49091c677bd6a5"'
|
35
|
-
cache-control:
|
36
|
-
- max-age=0, private, must-revalidate
|
37
|
-
x-request-id:
|
38
|
-
- 532d6271-81fe-42c4-b773-42c0a857f764
|
39
|
-
x-runtime:
|
40
|
-
- '4.151245'
|
41
|
-
connection:
|
42
|
-
- close
|
43
|
-
server:
|
44
|
-
- thin
|
45
|
-
body:
|
46
|
-
encoding: UTF-8
|
47
|
-
string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus
|
48
|
-
Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA
|
49
|
-
(21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA
|
50
|
-
(21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi
|
51
|
-
Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA
|
52
|
-
(21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus
|
53
|
-
Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]'
|
54
|
-
http_version: '1.1'
|
55
|
-
recorded_at: Mon, 12 Jun 2017 11:44:35 GMT
|
56
|
-
- request:
|
57
|
-
method: get
|
58
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json
|
59
|
-
body:
|
60
|
-
encoding: US-ASCII
|
61
|
-
string: ''
|
62
|
-
headers:
|
63
|
-
accept:
|
64
|
-
- application/json
|
65
|
-
authorization:
|
66
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
67
|
-
response:
|
68
|
-
status:
|
69
|
-
code: 200
|
70
|
-
message: OK
|
71
|
-
headers:
|
72
|
-
x-frame-options:
|
73
|
-
- ALLOWALL
|
74
|
-
x-ratelimit-limit:
|
75
|
-
- '2000'
|
76
|
-
x-ratelimit-reset:
|
77
|
-
- '6'
|
78
|
-
x-ratelimit-remaining:
|
79
|
-
- '97'
|
80
|
-
content-type:
|
81
|
-
- application/json; charset=utf-8
|
82
|
-
etag:
|
83
|
-
- '"0c776997933eb60833b37beaf43814c8"'
|
84
|
-
cache-control:
|
85
|
-
- max-age=0, private, must-revalidate
|
86
|
-
x-request-id:
|
87
|
-
- 3f3848ed-e7b0-4d1e-b816-3de7870a1b85
|
88
|
-
x-runtime:
|
89
|
-
- '0.841116'
|
90
|
-
connection:
|
91
|
-
- close
|
92
|
-
server:
|
93
|
-
- thin
|
94
|
-
body:
|
95
|
-
encoding: UTF-8
|
96
|
-
string: '{"status":"OK"}'
|
97
|
-
http_version: '1.1'
|
98
|
-
recorded_at: Mon, 12 Jun 2017 11:44:36 GMT
|
99
|
-
- request:
|
100
|
-
method: get
|
101
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180/deliver.json
|
102
|
-
body:
|
103
|
-
encoding: US-ASCII
|
104
|
-
string: ''
|
105
|
-
headers:
|
106
|
-
accept:
|
107
|
-
- application/json
|
108
|
-
authorization:
|
109
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
110
|
-
response:
|
111
|
-
status:
|
112
|
-
code: 200
|
113
|
-
message: OK
|
114
|
-
headers:
|
115
|
-
x-frame-options:
|
116
|
-
- ALLOWALL
|
117
|
-
x-ratelimit-limit:
|
118
|
-
- '2000'
|
119
|
-
x-ratelimit-reset:
|
120
|
-
- '5'
|
121
|
-
x-ratelimit-remaining:
|
122
|
-
- '96'
|
123
|
-
content-type:
|
124
|
-
- application/json; charset=utf-8
|
125
|
-
etag:
|
126
|
-
- '"074a3d2686ff1d99dbf981e8328f05ae"'
|
127
|
-
cache-control:
|
128
|
-
- max-age=0, private, must-revalidate
|
129
|
-
x-request-id:
|
130
|
-
- bc4d1421-eaf5-44ba-b068-729c7f663b92
|
131
|
-
x-runtime:
|
132
|
-
- '2.232292'
|
133
|
-
connection:
|
134
|
-
- close
|
135
|
-
server:
|
136
|
-
- thin
|
137
|
-
body:
|
138
|
-
encoding: UTF-8
|
139
|
-
string: '{"id":180,"account_id":9,"contact_id":44,"document_id":null,"number":"0005","issue_date":"2017-06-09","contact_name":"Albus
|
140
|
-
Dumbledoge","currency":"EUR","gross_amount_cents":0,"total_cents":0,"amount_paid_cents":10000000000,"exchange_rate":"1.0","exchange_cents":null,"po_number":null,"due_days":null,"due_date":null,"valid_until":null,"payment_details":null,"notes":null,"permalink":"8ba033c910a376319e4b383de66d6934abcfe6a4","recurring_document":null,"start_date":null,"end_date":null,"renewal_date":null,"frequency":null,"delivery":null,"state":"paid","created_at":"2017-06-09T13:07:04.000Z","updated_at":"2017-06-12T11:44:38.213Z","attachments_count":0,"processor_id":null,"subject":null,"transaction_id":null,"street_line_1":null,"street_line_2":null,"city":null,"postal_code":null,"region":null,"country":"BE","processor":null,"processor_fee_cents":null,"interval_count":0,"delivery_state":"delivered","vat_number":null,"tax_id":null,"metadata":{},"blocked":false}'
|
141
|
-
http_version: '1.1'
|
142
|
-
recorded_at: Mon, 12 Jun 2017 11:44:38 GMT
|
143
|
-
recorded_with: VCR 2.9.2
|
@@ -1,140 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept:
|
11
|
-
- application/json
|
12
|
-
authorization:
|
13
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
|
-
response:
|
15
|
-
status:
|
16
|
-
code: 200
|
17
|
-
message: OK
|
18
|
-
headers:
|
19
|
-
x-frame-options:
|
20
|
-
- ALLOWALL
|
21
|
-
x-ratelimit-limit:
|
22
|
-
- '2000'
|
23
|
-
x-ratelimit-reset:
|
24
|
-
- '12'
|
25
|
-
x-ratelimit-remaining:
|
26
|
-
- '97'
|
27
|
-
x-pages-currentpage:
|
28
|
-
- '1'
|
29
|
-
x-pages-totalpages:
|
30
|
-
- '1'
|
31
|
-
content-type:
|
32
|
-
- application/json; charset=utf-8
|
33
|
-
etag:
|
34
|
-
- '"2fbe5b66d01a5d67afd7be37b64c395a"'
|
35
|
-
cache-control:
|
36
|
-
- max-age=0, private, must-revalidate
|
37
|
-
x-request-id:
|
38
|
-
- 49c9cbce-9946-4c82-85d1-867e02a37eab
|
39
|
-
x-runtime:
|
40
|
-
- '2.123997'
|
41
|
-
connection:
|
42
|
-
- close
|
43
|
-
server:
|
44
|
-
- thin
|
45
|
-
body:
|
46
|
-
encoding: UTF-8
|
47
|
-
string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus
|
48
|
-
Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey,
|
49
|
-
Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":199,"blocked":false,"number":"0001","issue_date":"2017-06-12","created_at":1497267995,"contact":{"id":50,"full_name":"Test
|
50
|
-
customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":200,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":49,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f62c1beb598394e6072fa18af8a3eed0ba05833b","permalink":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b","pdf":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b.pdf","url":"http://development.lvh.me:3000/api/receipts/199.json","processor":null,"processor_id":null,"custom_metadata":{}}]'
|
51
|
-
http_version: '1.1'
|
52
|
-
recorded_at: Mon, 12 Jun 2017 11:49:30 GMT
|
53
|
-
- request:
|
54
|
-
method: get
|
55
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json
|
56
|
-
body:
|
57
|
-
encoding: US-ASCII
|
58
|
-
string: ''
|
59
|
-
headers:
|
60
|
-
accept:
|
61
|
-
- application/json
|
62
|
-
authorization:
|
63
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
64
|
-
response:
|
65
|
-
status:
|
66
|
-
code: 200
|
67
|
-
message: OK
|
68
|
-
headers:
|
69
|
-
x-frame-options:
|
70
|
-
- ALLOWALL
|
71
|
-
x-ratelimit-limit:
|
72
|
-
- '2000'
|
73
|
-
x-ratelimit-reset:
|
74
|
-
- '10'
|
75
|
-
x-ratelimit-remaining:
|
76
|
-
- '96'
|
77
|
-
content-type:
|
78
|
-
- application/json; charset=utf-8
|
79
|
-
etag:
|
80
|
-
- '"0c776997933eb60833b37beaf43814c8"'
|
81
|
-
cache-control:
|
82
|
-
- max-age=0, private, must-revalidate
|
83
|
-
x-request-id:
|
84
|
-
- 135bafe4-45a9-4acb-b6a1-3d26f5d8432b
|
85
|
-
x-runtime:
|
86
|
-
- '0.501923'
|
87
|
-
connection:
|
88
|
-
- close
|
89
|
-
server:
|
90
|
-
- thin
|
91
|
-
body:
|
92
|
-
encoding: UTF-8
|
93
|
-
string: '{"status":"OK"}'
|
94
|
-
http_version: '1.1'
|
95
|
-
recorded_at: Mon, 12 Jun 2017 11:49:31 GMT
|
96
|
-
- request:
|
97
|
-
method: get
|
98
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/200/deliver.json
|
99
|
-
body:
|
100
|
-
encoding: US-ASCII
|
101
|
-
string: ''
|
102
|
-
headers:
|
103
|
-
accept:
|
104
|
-
- application/json
|
105
|
-
authorization:
|
106
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
107
|
-
response:
|
108
|
-
status:
|
109
|
-
code: 200
|
110
|
-
message: OK
|
111
|
-
headers:
|
112
|
-
x-frame-options:
|
113
|
-
- ALLOWALL
|
114
|
-
x-ratelimit-limit:
|
115
|
-
- '2000'
|
116
|
-
x-ratelimit-reset:
|
117
|
-
- '9'
|
118
|
-
x-ratelimit-remaining:
|
119
|
-
- '95'
|
120
|
-
content-type:
|
121
|
-
- application/json; charset=utf-8
|
122
|
-
etag:
|
123
|
-
- '"e750aaba03eb7eb3639f8684e5465fc7"'
|
124
|
-
cache-control:
|
125
|
-
- max-age=0, private, must-revalidate
|
126
|
-
x-request-id:
|
127
|
-
- 0c756416-5973-4ab2-a638-7fd7df96839c
|
128
|
-
x-runtime:
|
129
|
-
- '1.825039'
|
130
|
-
connection:
|
131
|
-
- close
|
132
|
-
server:
|
133
|
-
- thin
|
134
|
-
body:
|
135
|
-
encoding: UTF-8
|
136
|
-
string: '{"id":200,"account_id":9,"contact_id":44,"document_id":null,"number":"0002","issue_date":"2017-06-12","contact_name":"Albus
|
137
|
-
Dumbledoge","currency":"EUR","gross_amount_cents":1000,"total_cents":1000,"amount_paid_cents":1000,"exchange_rate":"1.0","exchange_cents":null,"po_number":null,"due_days":null,"due_date":null,"valid_until":null,"payment_details":null,"notes":null,"permalink":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","recurring_document":null,"start_date":null,"end_date":null,"renewal_date":null,"frequency":null,"delivery":null,"state":"paid","created_at":"2017-06-12T11:48:52.000Z","updated_at":"2017-06-12T11:49:32.728Z","attachments_count":0,"processor_id":null,"subject":null,"transaction_id":null,"street_line_1":null,"street_line_2":null,"city":null,"postal_code":null,"region":null,"country":"BE","processor":null,"processor_fee_cents":null,"interval_count":0,"delivery_state":"delivered","vat_number":null,"tax_id":null,"metadata":{},"blocked":false}'
|
138
|
-
http_version: '1.1'
|
139
|
-
recorded_at: Mon, 12 Jun 2017 11:49:33 GMT
|
140
|
-
recorded_with: VCR 2.9.2
|
@@ -1,98 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json?
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept:
|
11
|
-
- application/json
|
12
|
-
authorization:
|
13
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
|
-
response:
|
15
|
-
status:
|
16
|
-
code: 200
|
17
|
-
message: OK
|
18
|
-
headers:
|
19
|
-
x-frame-options:
|
20
|
-
- ALLOWALL
|
21
|
-
x-ratelimit-limit:
|
22
|
-
- '2000'
|
23
|
-
x-ratelimit-reset:
|
24
|
-
- '15'
|
25
|
-
x-ratelimit-remaining:
|
26
|
-
- '100'
|
27
|
-
x-pages-currentpage:
|
28
|
-
- '1'
|
29
|
-
x-pages-totalpages:
|
30
|
-
- '1'
|
31
|
-
content-type:
|
32
|
-
- application/json; charset=utf-8
|
33
|
-
etag:
|
34
|
-
- '"9f61db3c521dbbd6fa0aec27f6813410"'
|
35
|
-
cache-control:
|
36
|
-
- max-age=0, private, must-revalidate
|
37
|
-
x-request-id:
|
38
|
-
- 722d2bf8-1215-4998-9759-8fc073d47352
|
39
|
-
x-runtime:
|
40
|
-
- '0.320278'
|
41
|
-
connection:
|
42
|
-
- close
|
43
|
-
server:
|
44
|
-
- thin
|
45
|
-
body:
|
46
|
-
encoding: UTF-8
|
47
|
-
string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus
|
48
|
-
Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi
|
49
|
-
Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]'
|
50
|
-
http_version: '1.1'
|
51
|
-
recorded_at: Fri, 09 Jun 2017 13:07:03 GMT
|
52
|
-
- request:
|
53
|
-
method: post
|
54
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json
|
55
|
-
body:
|
56
|
-
encoding: UTF-8
|
57
|
-
string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}'
|
58
|
-
headers:
|
59
|
-
accept:
|
60
|
-
- application/json
|
61
|
-
content-type:
|
62
|
-
- application/json
|
63
|
-
authorization:
|
64
|
-
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
65
|
-
response:
|
66
|
-
status:
|
67
|
-
code: 201
|
68
|
-
message: Created
|
69
|
-
headers:
|
70
|
-
x-frame-options:
|
71
|
-
- ALLOWALL
|
72
|
-
x-ratelimit-limit:
|
73
|
-
- '2000'
|
74
|
-
x-ratelimit-reset:
|
75
|
-
- '15'
|
76
|
-
x-ratelimit-remaining:
|
77
|
-
- '99'
|
78
|
-
content-type:
|
79
|
-
- application/json; charset=utf-8
|
80
|
-
etag:
|
81
|
-
- '"ac4541b1070edae1af15b6002a78bb2f"'
|
82
|
-
cache-control:
|
83
|
-
- max-age=0, private, must-revalidate
|
84
|
-
x-request-id:
|
85
|
-
- 8175b611-d7fd-4104-a4d0-85714db17957
|
86
|
-
x-runtime:
|
87
|
-
- '1.002273'
|
88
|
-
connection:
|
89
|
-
- close
|
90
|
-
server:
|
91
|
-
- thin
|
92
|
-
body:
|
93
|
-
encoding: UTF-8
|
94
|
-
string: '{"id":180,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus
|
95
|
-
Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}}'
|
96
|
-
http_version: '1.1'
|
97
|
-
recorded_at: Fri, 09 Jun 2017 13:07:05 GMT
|
98
|
-
recorded_with: VCR 2.9.2
|