quaderno 1.11.2 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +53 -1
- data/VERSION +1 -1
- data/changelog.md +3 -0
- data/lib/quaderno-ruby/base.rb +12 -2
- data/lib/quaderno-ruby/behavior/crud.rb +56 -11
- data/lib/quaderno-ruby/behavior/deliver.rb +10 -2
- data/lib/quaderno-ruby/behavior/payment.rb +23 -4
- data/lib/quaderno-ruby/behavior/retrieve.rb +11 -2
- data/lib/quaderno-ruby/collection.rb +22 -0
- data/lib/quaderno-ruby/helpers/authentication.rb +26 -0
- data/lib/quaderno-ruby.rb +4 -1
- data/quaderno.gemspec +16 -5
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +11 -282
- data/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml +56 -0
- data/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml +57 -0
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +10 -14
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +14 -47
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +13 -2873
- data/test/fixtures/quaderno_cassettes/all_items.yml +8 -8
- data/test/fixtures/quaderno_cassettes/all_receipts.yml +11 -14
- data/test/fixtures/quaderno_cassettes/all_webhooks.yml +40 -36
- data/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +46 -318
- data/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +125 -357
- data/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +45 -318
- data/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +56 -53
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +40 -592
- data/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml +199 -0
- data/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml +199 -0
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +40 -334
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +43 -364
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +44 -3199
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +22 -22
- data/test/fixtures/quaderno_cassettes/deleted_receipt.yml +43 -42
- data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +48 -44
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +25 -32
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +29 -2888
- data/test/fixtures/quaderno_cassettes/delivered_receipt.yml +29 -29
- data/test/fixtures/quaderno_cassettes/evidence_invoice.yml +19 -354
- data/test/fixtures/quaderno_cassettes/found_contact.yml +19 -291
- data/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml +99 -0
- data/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml +100 -0
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +20 -24
- data/test/fixtures/quaderno_cassettes/found_expense.yml +24 -94
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +22 -2886
- data/test/fixtures/quaderno_cassettes/found_item.yml +18 -16
- data/test/fixtures/quaderno_cassettes/found_receipt.yml +21 -24
- data/test/fixtures/quaderno_cassettes/found_webhook.yml +24 -22
- data/test/fixtures/quaderno_cassettes/new_contact.yml +9 -7
- data/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml +48 -0
- data/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml +48 -0
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +29 -320
- data/test/fixtures/quaderno_cassettes/new_evidence.yml +10 -8
- data/test/fixtures/quaderno_cassettes/new_expense.yml +42 -363
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +29 -324
- data/test/fixtures/quaderno_cassettes/new_item.yml +10 -8
- data/test/fixtures/quaderno_cassettes/new_receipt.yml +28 -24
- data/test/fixtures/quaderno_cassettes/new_webhook.yml +16 -14
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +22 -52
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +22 -2879
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +5 -5
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +29 -61
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +28 -2888
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +22 -292
- data/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml +101 -0
- data/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml +102 -0
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +44 -353
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +43 -346
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +43 -361
- data/test/fixtures/quaderno_cassettes/updated_item.yml +21 -17
- data/test/fixtures/quaderno_cassettes/updated_receipt.yml +47 -41
- data/test/fixtures/quaderno_cassettes/updated_webhook.yml +35 -31
- data/test/helper.rb +2 -1
- data/test/unit/test_quaderno_contacts.rb +1 -1
- data/test/unit/test_quaderno_contacts_thread_safe.rb +104 -0
- data/test/unit/test_quaderno_expenses.rb +5 -5
- metadata +15 -4
- data/test/fixtures/quaderno_cassettes/calculate_tax.yml +0 -85
- data/test/fixtures/quaderno_cassettes/wrong_token.yml +0 -36
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json
|
5
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json?
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -21,31 +21,31 @@ http_interactions:
|
|
21
21
|
x-ratelimit-limit:
|
22
22
|
- '2000'
|
23
23
|
x-ratelimit-reset:
|
24
|
-
- '
|
24
|
+
- '15'
|
25
25
|
x-ratelimit-remaining:
|
26
|
-
- '
|
26
|
+
- '99'
|
27
27
|
content-type:
|
28
28
|
- application/json; charset=utf-8
|
29
29
|
etag:
|
30
|
-
- '"
|
30
|
+
- '"f91316e7f780493dafbffc5affac5ef5"'
|
31
31
|
cache-control:
|
32
32
|
- max-age=0, private, must-revalidate
|
33
33
|
x-request-id:
|
34
|
-
-
|
34
|
+
- e0541210-c4f1-4f14-a3bf-8d2db1b12f0f
|
35
35
|
x-runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.982967'
|
37
37
|
connection:
|
38
38
|
- close
|
39
39
|
server:
|
40
40
|
- thin
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string: '[{"id":
|
43
|
+
string: '[{"id":1,"code":"12345","name":"6","unit_cost":"10.0","stock":null,"tax_class":"standard","url":"http://development.lvh.me:3000/api/items/1"},{"id":2,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/2"}]'
|
44
44
|
http_version: '1.1'
|
45
|
-
recorded_at:
|
45
|
+
recorded_at: Mon, 12 Jun 2017 11:45:34 GMT
|
46
46
|
- request:
|
47
47
|
method: delete
|
48
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/
|
48
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/2.json
|
49
49
|
body:
|
50
50
|
encoding: US-ASCII
|
51
51
|
string: ''
|
@@ -64,15 +64,15 @@ http_interactions:
|
|
64
64
|
x-ratelimit-limit:
|
65
65
|
- '2000'
|
66
66
|
x-ratelimit-reset:
|
67
|
-
- '
|
67
|
+
- '14'
|
68
68
|
x-ratelimit-remaining:
|
69
|
-
- '
|
69
|
+
- '98'
|
70
70
|
cache-control:
|
71
71
|
- no-cache
|
72
72
|
x-request-id:
|
73
|
-
-
|
73
|
+
- b02b174b-6cef-42b9-9a03-125a496d48ad
|
74
74
|
x-runtime:
|
75
|
-
- '0.
|
75
|
+
- '0.771036'
|
76
76
|
connection:
|
77
77
|
- close
|
78
78
|
server:
|
@@ -81,10 +81,10 @@ http_interactions:
|
|
81
81
|
encoding: US-ASCII
|
82
82
|
string: ''
|
83
83
|
http_version: '1.1'
|
84
|
-
recorded_at:
|
84
|
+
recorded_at: Mon, 12 Jun 2017 11:45:34 GMT
|
85
85
|
- request:
|
86
86
|
method: get
|
87
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json
|
87
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json?
|
88
88
|
body:
|
89
89
|
encoding: US-ASCII
|
90
90
|
string: ''
|
@@ -103,26 +103,26 @@ http_interactions:
|
|
103
103
|
x-ratelimit-limit:
|
104
104
|
- '2000'
|
105
105
|
x-ratelimit-reset:
|
106
|
-
- '
|
106
|
+
- '11'
|
107
107
|
x-ratelimit-remaining:
|
108
|
-
- '
|
108
|
+
- '97'
|
109
109
|
content-type:
|
110
110
|
- application/json; charset=utf-8
|
111
111
|
etag:
|
112
|
-
- '"
|
112
|
+
- '"d5fb0568852b913d126a096f525890b5"'
|
113
113
|
cache-control:
|
114
114
|
- max-age=0, private, must-revalidate
|
115
115
|
x-request-id:
|
116
|
-
-
|
116
|
+
- 66f021ff-bed9-41a6-a7e1-4c5593578ef7
|
117
117
|
x-runtime:
|
118
|
-
- '
|
118
|
+
- '2.202393'
|
119
119
|
connection:
|
120
120
|
- close
|
121
121
|
server:
|
122
122
|
- thin
|
123
123
|
body:
|
124
124
|
encoding: UTF-8
|
125
|
-
string: '[{"id":
|
125
|
+
string: '[{"id":1,"code":"12345","name":"6","unit_cost":"10.0","stock":null,"tax_class":"standard","url":"http://development.lvh.me:3000/api/items/1"}]'
|
126
126
|
http_version: '1.1'
|
127
|
-
recorded_at:
|
127
|
+
recorded_at: Mon, 12 Jun 2017 11:45:37 GMT
|
128
128
|
recorded_with: VCR 2.9.2
|
@@ -5,10 +5,12 @@ http_interactions:
|
|
5
5
|
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: first_name
|
8
|
+
string: '{"first_name":"Test customer"}'
|
9
9
|
headers:
|
10
10
|
accept:
|
11
11
|
- application/json
|
12
|
+
content-type:
|
13
|
+
- application/json
|
12
14
|
authorization:
|
13
15
|
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
16
|
response:
|
@@ -21,38 +23,40 @@ http_interactions:
|
|
21
23
|
x-ratelimit-limit:
|
22
24
|
- '2000'
|
23
25
|
x-ratelimit-reset:
|
24
|
-
- '
|
26
|
+
- '4'
|
25
27
|
x-ratelimit-remaining:
|
26
28
|
- '96'
|
27
29
|
content-type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
etag:
|
30
|
-
- '"
|
32
|
+
- '"00e9b556a65a3fe049e04c6e0cc45cf9"'
|
31
33
|
cache-control:
|
32
34
|
- max-age=0, private, must-revalidate
|
33
35
|
x-request-id:
|
34
|
-
-
|
36
|
+
- 28d558d4-7134-4c59-9e8b-4144547b1c5b
|
35
37
|
x-runtime:
|
36
|
-
- '
|
38
|
+
- '1.447786'
|
37
39
|
connection:
|
38
40
|
- close
|
39
41
|
server:
|
40
42
|
- thin
|
41
43
|
body:
|
42
44
|
encoding: UTF-8
|
43
|
-
string: '{"id":
|
44
|
-
customer","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":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"
|
45
|
+
string: '{"id":52,"kind":"company","created_at":1497268157,"full_name":"Test
|
46
|
+
customer","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":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e72cf732a53d6cd1f45ad096edd602758b6691a3","permalink":"http://development.lvh.me:3000/billing/e72cf732a53d6cd1f45ad096edd602758b6691a3","url":"http://development.lvh.me:3000/api/contacts/52"}'
|
45
47
|
http_version: '1.1'
|
46
|
-
recorded_at:
|
48
|
+
recorded_at: Mon, 12 Jun 2017 11:49:17 GMT
|
47
49
|
- request:
|
48
50
|
method: post
|
49
51
|
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json
|
50
52
|
body:
|
51
53
|
encoding: UTF-8
|
52
|
-
string: contact_id
|
54
|
+
string: '{"contact_id":52,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}'
|
53
55
|
headers:
|
54
56
|
accept:
|
55
57
|
- application/json
|
58
|
+
content-type:
|
59
|
+
- application/json
|
56
60
|
authorization:
|
57
61
|
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
58
62
|
response:
|
@@ -65,32 +69,32 @@ http_interactions:
|
|
65
69
|
x-ratelimit-limit:
|
66
70
|
- '2000'
|
67
71
|
x-ratelimit-reset:
|
68
|
-
- '
|
72
|
+
- '3'
|
69
73
|
x-ratelimit-remaining:
|
70
74
|
- '95'
|
71
75
|
content-type:
|
72
76
|
- application/json; charset=utf-8
|
73
77
|
etag:
|
74
|
-
- '"
|
78
|
+
- '"ec0b74f722f8e042fcdfdcb1d0699d14"'
|
75
79
|
cache-control:
|
76
80
|
- max-age=0, private, must-revalidate
|
77
81
|
x-request-id:
|
78
|
-
-
|
82
|
+
- b6fe3743-024e-4323-a44f-276e7ab4903b
|
79
83
|
x-runtime:
|
80
|
-
- '
|
84
|
+
- '4.733173'
|
81
85
|
connection:
|
82
86
|
- close
|
83
87
|
server:
|
84
88
|
- thin
|
85
89
|
body:
|
86
90
|
encoding: UTF-8
|
87
|
-
string: '{"id":
|
88
|
-
customer"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","
|
91
|
+
string: '{"id":202,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268159,"contact":{"id":52,"full_name":"Test
|
92
|
+
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":203,"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":52,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f400dc836b1488441b69d084fb25a89403ffc5de","permalink":"http://development.lvh.me:3000/receipt/f400dc836b1488441b69d084fb25a89403ffc5de","pdf":"http://development.lvh.me:3000/receipt/f400dc836b1488441b69d084fb25a89403ffc5de.pdf","url":"http://development.lvh.me:3000/api/receipts/202.json","processor":null,"processor_id":null,"custom_metadata":{}}'
|
89
93
|
http_version: '1.1'
|
90
|
-
recorded_at:
|
94
|
+
recorded_at: Mon, 12 Jun 2017 11:49:22 GMT
|
91
95
|
- request:
|
92
96
|
method: delete
|
93
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/
|
97
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/202.json
|
94
98
|
body:
|
95
99
|
encoding: US-ASCII
|
96
100
|
string: ''
|
@@ -109,15 +113,15 @@ http_interactions:
|
|
109
113
|
x-ratelimit-limit:
|
110
114
|
- '2000'
|
111
115
|
x-ratelimit-reset:
|
112
|
-
- '
|
116
|
+
- '15'
|
113
117
|
x-ratelimit-remaining:
|
114
|
-
- '
|
118
|
+
- '100'
|
115
119
|
cache-control:
|
116
120
|
- no-cache
|
117
121
|
x-request-id:
|
118
|
-
-
|
122
|
+
- bbd75591-2904-4cdb-af4e-94c108e6b6ed
|
119
123
|
x-runtime:
|
120
|
-
- '
|
124
|
+
- '2.767408'
|
121
125
|
connection:
|
122
126
|
- close
|
123
127
|
server:
|
@@ -126,10 +130,10 @@ http_interactions:
|
|
126
130
|
encoding: US-ASCII
|
127
131
|
string: ''
|
128
132
|
http_version: '1.1'
|
129
|
-
recorded_at:
|
133
|
+
recorded_at: Mon, 12 Jun 2017 11:49:25 GMT
|
130
134
|
- request:
|
131
135
|
method: delete
|
132
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/
|
136
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/52.json
|
133
137
|
body:
|
134
138
|
encoding: US-ASCII
|
135
139
|
string: ''
|
@@ -148,15 +152,15 @@ http_interactions:
|
|
148
152
|
x-ratelimit-limit:
|
149
153
|
- '2000'
|
150
154
|
x-ratelimit-reset:
|
151
|
-
- '
|
155
|
+
- '15'
|
152
156
|
x-ratelimit-remaining:
|
153
|
-
- '
|
157
|
+
- '99'
|
154
158
|
cache-control:
|
155
159
|
- no-cache
|
156
160
|
x-request-id:
|
157
|
-
-
|
161
|
+
- 243f91d9-9aaa-4566-98c9-71f0c32e7eb4
|
158
162
|
x-runtime:
|
159
|
-
- '
|
163
|
+
- '1.163710'
|
160
164
|
connection:
|
161
165
|
- close
|
162
166
|
server:
|
@@ -165,10 +169,10 @@ http_interactions:
|
|
165
169
|
encoding: US-ASCII
|
166
170
|
string: ''
|
167
171
|
http_version: '1.1'
|
168
|
-
recorded_at:
|
172
|
+
recorded_at: Mon, 12 Jun 2017 11:49:26 GMT
|
169
173
|
- request:
|
170
174
|
method: get
|
171
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json
|
175
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json?
|
172
176
|
body:
|
173
177
|
encoding: US-ASCII
|
174
178
|
string: ''
|
@@ -187,9 +191,9 @@ http_interactions:
|
|
187
191
|
x-ratelimit-limit:
|
188
192
|
- '2000'
|
189
193
|
x-ratelimit-reset:
|
190
|
-
- '
|
194
|
+
- '14'
|
191
195
|
x-ratelimit-remaining:
|
192
|
-
- '
|
196
|
+
- '98'
|
193
197
|
x-pages-currentpage:
|
194
198
|
- '1'
|
195
199
|
x-pages-totalpages:
|
@@ -197,26 +201,23 @@ http_interactions:
|
|
197
201
|
content-type:
|
198
202
|
- application/json; charset=utf-8
|
199
203
|
etag:
|
200
|
-
- '"
|
204
|
+
- '"2fbe5b66d01a5d67afd7be37b64c395a"'
|
201
205
|
cache-control:
|
202
206
|
- max-age=0, private, must-revalidate
|
203
207
|
x-request-id:
|
204
|
-
-
|
208
|
+
- b98c0b87-40cd-4325-8714-a6d044edec8e
|
205
209
|
x-runtime:
|
206
|
-
- '
|
210
|
+
- '2.125325'
|
207
211
|
connection:
|
208
212
|
- close
|
209
213
|
server:
|
210
214
|
- thin
|
211
215
|
body:
|
212
216
|
encoding: UTF-8
|
213
|
-
string: '[{"id":
|
214
|
-
|
215
|
-
|
216
|
-
customer"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","
|
217
|
-
customer"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","exchange_rate":"1.9558","items":[{"id":3073,"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":25,"date":"2016-06-23","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"80ff611baa512d72f5132b28feacce20997adb4e","permalink":"http://development.lvh.me:3000/receipt/80ff611baa512d72f5132b28feacce20997adb4e","pdf":"http://development.lvh.me:3000/receipt/80ff611baa512d72f5132b28feacce20997adb4e.pdf","url":"http://development.lvh.me:3000/api/receipts/1054.json","processor":null,"processor_id":null},{"id":985,"number":"0000002","issue_date":"2016-06-01","created_at":1464785121,"contact":{"id":56,"full_name":"William
|
218
|
-
Tell"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","exchange_rate":"1.0","items":[{"id":991,"description":"Something","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":4,"date":"2016-06-01","payment_method":"credit_card","amount_cents":0}],"notes":null,"state":"invoiced","tag_list":[],"secure_id":"885fc61e0b83f9d507fcbb6fa9495ba0dcc31d96","permalink":"http://development.lvh.me:3000/receipt/885fc61e0b83f9d507fcbb6fa9495ba0dcc31d96","pdf":"http://development.lvh.me:3000/receipt/885fc61e0b83f9d507fcbb6fa9495ba0dcc31d96.pdf","url":"http://development.lvh.me:3000/api/receipts/985.json","processor":null,"processor_id":null},{"id":983,"number":"0000001","issue_date":"2016-05-30","created_at":1464785067,"contact":{"id":52,"full_name":"A.
|
219
|
-
Lucas Mayoral"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","exchange_rate":"1.0","items":[{"id":989,"description":"Something","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":2,"date":"2016-05-30","payment_method":"credit_card","amount_cents":0}],"notes":null,"state":"invoiced","tag_list":[],"secure_id":"9d00a9c881965f04758c4d5627c38cc8d4182713","permalink":"http://development.lvh.me:3000/receipt/9d00a9c881965f04758c4d5627c38cc8d4182713","pdf":"http://development.lvh.me:3000/receipt/9d00a9c881965f04758c4d5627c38cc8d4182713.pdf","url":"http://development.lvh.me:3000/api/receipts/983.json","processor":null,"processor_id":null}]'
|
217
|
+
string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus
|
218
|
+
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,
|
219
|
+
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
|
220
|
+
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":{}}]'
|
220
221
|
http_version: '1.1'
|
221
|
-
recorded_at:
|
222
|
+
recorded_at: Mon, 12 Jun 2017 11:49:28 GMT
|
222
223
|
recorded_with: VCR 2.9.2
|
@@ -5,10 +5,12 @@ http_interactions:
|
|
5
5
|
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: url
|
8
|
+
string: '{"url":"http://google.com","events_types":["invoice.created","expense.updated"]}'
|
9
9
|
headers:
|
10
10
|
accept:
|
11
11
|
- application/json
|
12
|
+
content-type:
|
13
|
+
- application/json
|
12
14
|
authorization:
|
13
15
|
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
14
16
|
response:
|
@@ -21,37 +23,39 @@ http_interactions:
|
|
21
23
|
x-ratelimit-limit:
|
22
24
|
- '2000'
|
23
25
|
x-ratelimit-reset:
|
24
|
-
- '
|
26
|
+
- '9'
|
25
27
|
x-ratelimit-remaining:
|
26
|
-
- '
|
28
|
+
- '97'
|
27
29
|
content-type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
etag:
|
30
|
-
- '"
|
32
|
+
- '"9ed2c299de9bfb455be4f92f91a751bb"'
|
31
33
|
cache-control:
|
32
34
|
- max-age=0, private, must-revalidate
|
33
35
|
x-request-id:
|
34
|
-
-
|
36
|
+
- 56b4d038-9c97-4faf-bcf1-c0146ed2282e
|
35
37
|
x-runtime:
|
36
|
-
- '
|
38
|
+
- '1.133878'
|
37
39
|
connection:
|
38
40
|
- close
|
39
41
|
server:
|
40
42
|
- thin
|
41
43
|
body:
|
42
44
|
encoding: UTF-8
|
43
|
-
string: '{"id":
|
45
|
+
string: '{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.841Z","updated_at":"2017-06-12T11:54:14.841Z"}'
|
44
46
|
http_version: '1.1'
|
45
|
-
recorded_at:
|
47
|
+
recorded_at: Mon, 12 Jun 2017 11:54:15 GMT
|
46
48
|
- request:
|
47
49
|
method: post
|
48
50
|
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
|
49
51
|
body:
|
50
52
|
encoding: UTF-8
|
51
|
-
string: url
|
53
|
+
string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}'
|
52
54
|
headers:
|
53
55
|
accept:
|
54
56
|
- application/json
|
57
|
+
content-type:
|
58
|
+
- application/json
|
55
59
|
authorization:
|
56
60
|
- Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
|
57
61
|
response:
|
@@ -64,31 +68,31 @@ http_interactions:
|
|
64
68
|
x-ratelimit-limit:
|
65
69
|
- '2000'
|
66
70
|
x-ratelimit-reset:
|
67
|
-
- '
|
71
|
+
- '7'
|
68
72
|
x-ratelimit-remaining:
|
69
|
-
- '
|
73
|
+
- '96'
|
70
74
|
content-type:
|
71
75
|
- application/json; charset=utf-8
|
72
76
|
etag:
|
73
|
-
- '"
|
77
|
+
- '"efc1e4c767dae7155fd7062f869b6864"'
|
74
78
|
cache-control:
|
75
79
|
- max-age=0, private, must-revalidate
|
76
80
|
x-request-id:
|
77
|
-
-
|
81
|
+
- fb379d20-89c7-4f44-b03a-8218e8ba6876
|
78
82
|
x-runtime:
|
79
|
-
- '
|
83
|
+
- '1.651680'
|
80
84
|
connection:
|
81
85
|
- close
|
82
86
|
server:
|
83
87
|
- thin
|
84
88
|
body:
|
85
89
|
encoding: UTF-8
|
86
|
-
string: '{"id":
|
90
|
+
string: '{"id":4,"url":"http://quadernoapp.com","auth_key":"PPhqTNGnksKmkLIE-HN12w","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:16.816Z","updated_at":"2017-06-12T11:54:16.816Z"}'
|
87
91
|
http_version: '1.1'
|
88
|
-
recorded_at:
|
92
|
+
recorded_at: Mon, 12 Jun 2017 11:54:17 GMT
|
89
93
|
- request:
|
90
94
|
method: get
|
91
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
|
95
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json?
|
92
96
|
body:
|
93
97
|
encoding: US-ASCII
|
94
98
|
string: ''
|
@@ -107,31 +111,31 @@ http_interactions:
|
|
107
111
|
x-ratelimit-limit:
|
108
112
|
- '2000'
|
109
113
|
x-ratelimit-reset:
|
110
|
-
- '
|
114
|
+
- '5'
|
111
115
|
x-ratelimit-remaining:
|
112
|
-
- '
|
116
|
+
- '95'
|
113
117
|
content-type:
|
114
118
|
- application/json; charset=utf-8
|
115
119
|
etag:
|
116
|
-
- '"
|
120
|
+
- '"7724af66c58f04bb8d43b34af89cbeb0"'
|
117
121
|
cache-control:
|
118
122
|
- max-age=0, private, must-revalidate
|
119
123
|
x-request-id:
|
120
|
-
-
|
124
|
+
- a83a42c7-1de0-4f2a-85ef-e98d38079d83
|
121
125
|
x-runtime:
|
122
|
-
- '
|
126
|
+
- '0.967519'
|
123
127
|
connection:
|
124
128
|
- close
|
125
129
|
server:
|
126
130
|
- thin
|
127
131
|
body:
|
128
132
|
encoding: UTF-8
|
129
|
-
string: '[{"id":
|
133
|
+
string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.000Z","updated_at":"2017-06-12T11:54:14.000Z"},{"id":4,"url":"http://quadernoapp.com","auth_key":"PPhqTNGnksKmkLIE-HN12w","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:16.000Z","updated_at":"2017-06-12T11:54:16.000Z"}]'
|
130
134
|
http_version: '1.1'
|
131
|
-
recorded_at:
|
135
|
+
recorded_at: Mon, 12 Jun 2017 11:54:18 GMT
|
132
136
|
- request:
|
133
137
|
method: delete
|
134
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/
|
138
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/4.json
|
135
139
|
body:
|
136
140
|
encoding: US-ASCII
|
137
141
|
string: ''
|
@@ -150,15 +154,15 @@ http_interactions:
|
|
150
154
|
x-ratelimit-limit:
|
151
155
|
- '2000'
|
152
156
|
x-ratelimit-reset:
|
153
|
-
- '
|
157
|
+
- '4'
|
154
158
|
x-ratelimit-remaining:
|
155
|
-
- '
|
159
|
+
- '94'
|
156
160
|
cache-control:
|
157
161
|
- no-cache
|
158
162
|
x-request-id:
|
159
|
-
-
|
163
|
+
- d9d2a591-b3e2-4ba2-af85-e6d5fa634e46
|
160
164
|
x-runtime:
|
161
|
-
- '0.
|
165
|
+
- '0.969496'
|
162
166
|
connection:
|
163
167
|
- close
|
164
168
|
server:
|
@@ -167,10 +171,10 @@ http_interactions:
|
|
167
171
|
encoding: US-ASCII
|
168
172
|
string: ''
|
169
173
|
http_version: '1.1'
|
170
|
-
recorded_at:
|
174
|
+
recorded_at: Mon, 12 Jun 2017 11:54:19 GMT
|
171
175
|
- request:
|
172
176
|
method: get
|
173
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
|
177
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json?
|
174
178
|
body:
|
175
179
|
encoding: US-ASCII
|
176
180
|
string: ''
|
@@ -189,31 +193,31 @@ http_interactions:
|
|
189
193
|
x-ratelimit-limit:
|
190
194
|
- '2000'
|
191
195
|
x-ratelimit-reset:
|
192
|
-
- '
|
196
|
+
- '3'
|
193
197
|
x-ratelimit-remaining:
|
194
|
-
- '
|
198
|
+
- '93'
|
195
199
|
content-type:
|
196
200
|
- application/json; charset=utf-8
|
197
201
|
etag:
|
198
|
-
- '"
|
202
|
+
- '"49b2fb709af079dc34bb5ae479d17052"'
|
199
203
|
cache-control:
|
200
204
|
- max-age=0, private, must-revalidate
|
201
205
|
x-request-id:
|
202
|
-
-
|
206
|
+
- b43f132e-1500-4cfa-87cf-d76232257163
|
203
207
|
x-runtime:
|
204
|
-
- '0.
|
208
|
+
- '0.938838'
|
205
209
|
connection:
|
206
210
|
- close
|
207
211
|
server:
|
208
212
|
- thin
|
209
213
|
body:
|
210
214
|
encoding: UTF-8
|
211
|
-
string: '[{"id":
|
215
|
+
string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.000Z","updated_at":"2017-06-12T11:54:14.000Z"}]'
|
212
216
|
http_version: '1.1'
|
213
|
-
recorded_at:
|
217
|
+
recorded_at: Mon, 12 Jun 2017 11:54:20 GMT
|
214
218
|
- request:
|
215
219
|
method: delete
|
216
|
-
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/
|
220
|
+
uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/3.json
|
217
221
|
body:
|
218
222
|
encoding: US-ASCII
|
219
223
|
string: ''
|
@@ -232,15 +236,15 @@ http_interactions:
|
|
232
236
|
x-ratelimit-limit:
|
233
237
|
- '2000'
|
234
238
|
x-ratelimit-reset:
|
235
|
-
- '
|
239
|
+
- '3'
|
236
240
|
x-ratelimit-remaining:
|
237
|
-
- '
|
241
|
+
- '92'
|
238
242
|
cache-control:
|
239
243
|
- no-cache
|
240
244
|
x-request-id:
|
241
|
-
-
|
245
|
+
- 4ace2036-ebde-4c54-a6ba-92e9fe57c39c
|
242
246
|
x-runtime:
|
243
|
-
- '0.
|
247
|
+
- '0.948995'
|
244
248
|
connection:
|
245
249
|
- close
|
246
250
|
server:
|
@@ -249,5 +253,5 @@ http_interactions:
|
|
249
253
|
encoding: US-ASCII
|
250
254
|
string: ''
|
251
255
|
http_version: '1.1'
|
252
|
-
recorded_at:
|
256
|
+
recorded_at: Mon, 12 Jun 2017 11:54:21 GMT
|
253
257
|
recorded_with: VCR 2.9.2
|