quaderno 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -6
  3. data/Gemfile.lock +8 -5
  4. data/README.md +7 -1
  5. data/VERSION +1 -1
  6. data/changelog.md +5 -0
  7. data/lib/quaderno-ruby/behavior/crud.rb +30 -36
  8. data/lib/quaderno-ruby/behavior/payment.rb +12 -19
  9. data/lib/quaderno-ruby/behavior/retrieve.rb +20 -0
  10. data/lib/quaderno-ruby/contact.rb +1 -0
  11. data/lib/quaderno-ruby/payment.rb +0 -2
  12. data/lib/quaderno-ruby/tax.rb +3 -3
  13. data/lib/quaderno-ruby/webhook.rb +0 -2
  14. data/lib/quaderno-ruby.rb +1 -1
  15. data/quaderno.gemspec +15 -3
  16. data/test/fixtures/quaderno_cassettes/all_contacts.yml +295 -31
  17. data/test/fixtures/quaderno_cassettes/all_estimates.yml +28 -36
  18. data/test/fixtures/quaderno_cassettes/all_expenses.yml +60 -34
  19. data/test/fixtures/quaderno_cassettes/all_invoices.yml +2888 -36
  20. data/test/fixtures/quaderno_cassettes/all_items.yml +22 -27
  21. data/test/fixtures/quaderno_cassettes/all_receipts.yml +56 -0
  22. data/test/fixtures/quaderno_cassettes/all_webhooks.yml +98 -126
  23. data/test/fixtures/quaderno_cassettes/calculate_tax.yml +38 -62
  24. data/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +428 -0
  25. data/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +510 -0
  26. data/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +432 -0
  27. data/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +193 -0
  28. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +642 -113
  29. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +385 -120
  30. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +414 -118
  31. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +3249 -120
  32. data/test/fixtures/quaderno_cassettes/deleted_item.yml +60 -75
  33. data/test/fixtures/quaderno_cassettes/deleted_receipt.yml +222 -0
  34. data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +120 -152
  35. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +76 -89
  36. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +2935 -89
  37. data/test/fixtures/quaderno_cassettes/delivered_receipt.yml +140 -0
  38. data/test/fixtures/quaderno_cassettes/found_contact.yml +319 -60
  39. data/test/fixtures/quaderno_cassettes/found_estimate.yml +53 -69
  40. data/test/fixtures/quaderno_cassettes/found_expense.yml +121 -65
  41. data/test/fixtures/quaderno_cassettes/found_invoice.yml +2916 -67
  42. data/test/fixtures/quaderno_cassettes/found_item.yml +50 -60
  43. data/test/fixtures/quaderno_cassettes/found_receipt.yml +101 -0
  44. data/test/fixtures/quaderno_cassettes/found_webhook.yml +60 -76
  45. data/test/fixtures/quaderno_cassettes/new_contact.yml +22 -29
  46. data/test/fixtures/quaderno_cassettes/new_estimate.yml +357 -84
  47. data/test/fixtures/quaderno_cassettes/new_expense.yml +414 -118
  48. data/test/fixtures/quaderno_cassettes/new_invoice.yml +361 -84
  49. data/test/fixtures/quaderno_cassettes/new_item.yml +22 -29
  50. data/test/fixtures/quaderno_cassettes/new_receipt.yml +169 -0
  51. data/test/fixtures/quaderno_cassettes/new_webhook.yml +38 -50
  52. data/test/fixtures/quaderno_cassettes/paid_expense.yml +79 -63
  53. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +2907 -65
  54. data/test/fixtures/quaderno_cassettes/rate_limit.yml +22 -26
  55. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +98 -85
  56. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +2926 -87
  57. data/test/fixtures/quaderno_cassettes/updated_contact.yml +318 -62
  58. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +402 -116
  59. data/test/fixtures/quaderno_cassettes/updated_expense.yml +395 -113
  60. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +410 -116
  61. data/test/fixtures/quaderno_cassettes/updated_item.yml +49 -61
  62. data/test/fixtures/quaderno_cassettes/updated_receipt.yml +214 -0
  63. data/test/fixtures/quaderno_cassettes/updated_webhook.yml +82 -105
  64. data/test/fixtures/quaderno_cassettes/wrong_token.yml +11 -25
  65. data/test/helper.rb +4 -0
  66. data/test/unit/test_quaderno_contacts.rb +18 -19
  67. data/test/unit/test_quaderno_estimates.rb +58 -31
  68. data/test/unit/test_quaderno_expenses.rb +68 -41
  69. data/test/unit/test_quaderno_invoices.rb +74 -47
  70. data/test/unit/test_quaderno_items.rb +27 -26
  71. data/test/unit/test_quaderno_receipts.rb +156 -0
  72. data/test/unit/test_quaderno_tax.rb +10 -10
  73. data/test/unit/test_quaderno_webhooks.rb +19 -20
  74. metadata +14 -2
@@ -2,50 +2,45 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/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: ''
9
9
  headers:
10
+ accept:
11
+ - application/json
10
12
  authorization:
11
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
13
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
12
14
  response:
13
15
  status:
14
16
  code: 200
15
17
  message: OK
16
18
  headers:
17
- server:
18
- - nginx/1.4.5
19
- date:
20
- - Tue, 01 Jul 2014 09:08:05 GMT
21
- content-type:
22
- - application/json; charset=utf-8
23
- transfer-encoding:
24
- - chunked
25
- connection:
26
- - close
27
- status:
28
- - 200 OK
19
+ x-frame-options:
20
+ - ALLOWALL
29
21
  x-ratelimit-limit:
30
22
  - '2000'
23
+ x-ratelimit-reset:
24
+ - '2'
31
25
  x-ratelimit-remaining:
32
- - '1926'
33
- x-ua-compatible:
34
- - IE=Edge,chrome=1
26
+ - '88'
27
+ content-type:
28
+ - application/json; charset=utf-8
35
29
  etag:
36
- - ! '"484111898eb77f3321009a9c45671d7c"'
30
+ - '"27a591deda02411d613300d55f5efa7e"'
37
31
  cache-control:
38
- - must-revalidate, private, max-age=0
32
+ - max-age=0, private, must-revalidate
39
33
  x-request-id:
40
- - 78613347ebbf6bd80cc2886d829f04fd
34
+ - 19fe0f9b-d009-4c10-9dea-ac69773df112
41
35
  x-runtime:
42
- - '0.057344'
43
- x-rack-cache:
44
- - miss
36
+ - '0.509324'
37
+ connection:
38
+ - close
39
+ server:
40
+ - thin
45
41
  body:
46
- encoding: US-ASCII
47
- string: ! '[{"id":23943,"code":"008","name":"Pizza the Hutt","unit_cost":"0.0","stock":null,"url":"http://uruk-1066.sandbox-quadernoapp.com/api/v1/items/23943"},{"id":23942,"code":"007","name":"Techtoys
48
- MechaGodzilla 13cm fully posable","unit_cost":"0.0","stock":null,"url":"http://uruk-1066.sandbox-quadernoapp.com/api/v1/items/23942"}]'
42
+ encoding: UTF-8
43
+ string: '[{"id":4,"code":"1466679103","name":"Test_OCP","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/4"},{"id":7,"code":"1466679630","name":"Test_OCP","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/7"},{"id":10,"code":"1466680676","name":"Test_OCP","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/10"},{"id":3,"code":"1466679102","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/3"},{"id":6,"code":"1466679628","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/6"},{"id":9,"code":"1466680674","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/9"},{"id":12,"code":"1466681270","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/12"}]'
49
44
  http_version: '1.1'
50
- recorded_at: Tue, 01 Jul 2014 09:08:05 GMT
45
+ recorded_at: Thu, 23 Jun 2016 11:27:52 GMT
51
46
  recorded_with: VCR 2.9.2
@@ -0,0 +1,56 @@
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
+ - '14'
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
+ - '"b3b66954c987c74b8ebbdba19fda50af"'
35
+ cache-control:
36
+ - max-age=0, private, must-revalidate
37
+ x-request-id:
38
+ - c679c09b-7755-4b16-b000-f70f4a721b49
39
+ x-runtime:
40
+ - '0.856346'
41
+ connection:
42
+ - close
43
+ server:
44
+ - thin
45
+ body:
46
+ encoding: UTF-8
47
+ string: '[{"id":1056,"number":"0000005","issue_date":"2016-06-23","created_at":1466680696,"contact":{"id":85,"full_name":"Test
48
+ 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":3075,"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":27,"date":"2016-06-23","payment_method":"cash","amount_cents":0}],"notes":"Show
49
+ me the moneeeeeeeyy!!!!","state":"paid","tag_list":[],"secure_id":"24c7be97cfdae58052852e11a7df8f5968f90e06","permalink":"http://development.lvh.me:3000/receipt/24c7be97cfdae58052852e11a7df8f5968f90e06","pdf":"http://development.lvh.me:3000/receipt/24c7be97cfdae58052852e11a7df8f5968f90e06.pdf","url":"http://development.lvh.me:3000/api/receipts/1056.json","processor":null,"processor_id":null},{"id":1055,"number":"0000004","issue_date":"2016-06-23","created_at":1466680690,"contact":{"id":84,"full_name":"Test
50
+ 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":3074,"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":26,"date":"2016-06-23","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"2e21a8451f234c2a673d3576f178faab516ec017","permalink":"http://development.lvh.me:3000/receipt/2e21a8451f234c2a673d3576f178faab516ec017","pdf":"http://development.lvh.me:3000/receipt/2e21a8451f234c2a673d3576f178faab516ec017.pdf","url":"http://development.lvh.me:3000/api/receipts/1055.json","processor":null,"processor_id":null},{"id":1054,"number":"0000003","issue_date":"2016-06-23","created_at":1466680679,"contact":{"id":82,"full_name":"Test
51
+ 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
52
+ 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.
53
+ 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}]'
54
+ http_version: '1.1'
55
+ recorded_at: Thu, 23 Jun 2016 11:28:11 GMT
56
+ recorded_with: VCR 2.9.2
@@ -2,237 +2,209 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/webhooks.json
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: url=http%3A%2F%2Fgoogle.com&events_types[]=invoice.created&events_types[]=invoice.updated
9
9
  headers:
10
+ accept:
11
+ - application/json
10
12
  authorization:
11
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
13
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
12
14
  response:
13
15
  status:
14
16
  code: 201
15
17
  message: Created
16
18
  headers:
17
- server:
18
- - nginx/1.4.5
19
- date:
20
- - Tue, 01 Jul 2014 09:08:29 GMT
21
- content-type:
22
- - application/json; charset=utf-8
23
- transfer-encoding:
24
- - chunked
25
- connection:
26
- - close
27
- status:
28
- - 201 Created
19
+ x-frame-options:
20
+ - ALLOWALL
29
21
  x-ratelimit-limit:
30
22
  - '2000'
23
+ x-ratelimit-reset:
24
+ - '15'
31
25
  x-ratelimit-remaining:
32
- - '1912'
33
- x-ua-compatible:
34
- - IE=Edge,chrome=1
26
+ - '100'
27
+ content-type:
28
+ - application/json; charset=utf-8
35
29
  etag:
36
- - ! '"71ece29e194ba64459eacffea8d4b824"'
30
+ - '"19a9ebe0725a93dbd7241a587565feca"'
37
31
  cache-control:
38
32
  - max-age=0, private, must-revalidate
39
- set-cookie:
40
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTY2MTA2YTlmZGY4N2I5MmZmZDI5ZWI5NjNjYTQ5NTI2BjsAVA%3D%3D--45f96d4e6a1a4197efa85ed99c6a1380e3555bb2;
41
- domain=sandbox-quadernoapp.com; path=/; HttpOnly
42
33
  x-request-id:
43
- - e966052e52bc3a8df5209cfc0abac030
34
+ - 52039227-1063-443f-aac3-f0ec4bd6d55e
44
35
  x-runtime:
45
- - '0.223725'
46
- x-rack-cache:
47
- - invalidate, pass
36
+ - '8.547812'
37
+ connection:
38
+ - close
39
+ server:
40
+ - thin
48
41
  body:
49
- encoding: US-ASCII
50
- string: ! '{"id":89,"url":"http://google.com","auth_key":"QvIB4-EZSm9zvfth-L9DKw","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-07-01T09:08:29Z","updated_at":"2014-07-01T09:08:29Z"}'
42
+ encoding: UTF-8
43
+ string: '{"id":33,"url":"http://google.com","auth_key":"49YaaBdA3hsjU0MG4xnQ-g","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:13.366Z","updated_at":"2016-06-23T11:29:13.366Z"}'
51
44
  http_version: '1.1'
52
- recorded_at: Tue, 01 Jul 2014 09:08:29 GMT
45
+ recorded_at: Thu, 23 Jun 2016 11:29:13 GMT
53
46
  - request:
54
47
  method: post
55
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/webhooks.json
48
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
56
49
  body:
57
- encoding: US-ASCII
50
+ encoding: UTF-8
58
51
  string: url=http%3A%2F%2Fquadernoapp.com&events_types[]=expense.created&events_types[]=expense.updated&events_types[]=contact.deleted
59
52
  headers:
53
+ accept:
54
+ - application/json
60
55
  authorization:
61
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
56
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
62
57
  response:
63
58
  status:
64
59
  code: 201
65
60
  message: Created
66
61
  headers:
67
- server:
68
- - nginx/1.4.5
69
- date:
70
- - Tue, 01 Jul 2014 09:08:30 GMT
71
- content-type:
72
- - application/json; charset=utf-8
73
- transfer-encoding:
74
- - chunked
75
- connection:
76
- - close
77
- status:
78
- - 201 Created
62
+ x-frame-options:
63
+ - ALLOWALL
79
64
  x-ratelimit-limit:
80
65
  - '2000'
66
+ x-ratelimit-reset:
67
+ - '15'
81
68
  x-ratelimit-remaining:
82
- - '1911'
83
- x-ua-compatible:
84
- - IE=Edge,chrome=1
69
+ - '99'
70
+ content-type:
71
+ - application/json; charset=utf-8
85
72
  etag:
86
- - ! '"003d50fd156c79c84d7a5f4db390f98c"'
73
+ - '"6cc5058b3bf6a910d3e39e540a85089e"'
87
74
  cache-control:
88
75
  - max-age=0, private, must-revalidate
89
- set-cookie:
90
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWQ0ZDhlNzM4OGE3ZjcxMTU5NGRjMGUyM2NjMzkxZjU4BjsAVA%3D%3D--0efecdf193af78163eb774c1168f59d3ec702d9b;
91
- domain=sandbox-quadernoapp.com; path=/; HttpOnly
92
76
  x-request-id:
93
- - d1449ef206ca9d17a74690e10f4e1d1a
77
+ - 8a8e8704-5ffc-47da-93e9-2b308e6942ea
94
78
  x-runtime:
95
- - '0.397624'
96
- x-rack-cache:
97
- - invalidate, pass
79
+ - '21.846827'
80
+ connection:
81
+ - close
82
+ server:
83
+ - thin
98
84
  body:
99
- encoding: US-ASCII
100
- string: ! '{"id":90,"url":"http://quadernoapp.com","auth_key":"QF2sx16_Pgn_hobSR56mdg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-07-01T09:08:30Z","updated_at":"2014-07-01T09:08:30Z"}'
85
+ encoding: UTF-8
86
+ string: '{"id":34,"url":"http://quadernoapp.com","auth_key":"qtG4iS-MfSc6ljKKgHoSFg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:34.929Z","updated_at":"2016-06-23T11:29:34.929Z"}'
101
87
  http_version: '1.1'
102
- recorded_at: Tue, 01 Jul 2014 09:08:30 GMT
88
+ recorded_at: Thu, 23 Jun 2016 11:29:35 GMT
103
89
  - request:
104
90
  method: get
105
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/webhooks.json
91
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
106
92
  body:
107
93
  encoding: US-ASCII
108
94
  string: ''
109
95
  headers:
96
+ accept:
97
+ - application/json
110
98
  authorization:
111
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
99
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
112
100
  response:
113
101
  status:
114
102
  code: 200
115
103
  message: OK
116
104
  headers:
117
- server:
118
- - nginx/1.4.5
119
- date:
120
- - Tue, 01 Jul 2014 09:08:31 GMT
121
- content-type:
122
- - application/json; charset=utf-8
123
- transfer-encoding:
124
- - chunked
125
- connection:
126
- - close
127
- status:
128
- - 200 OK
105
+ x-frame-options:
106
+ - ALLOWALL
129
107
  x-ratelimit-limit:
130
108
  - '2000'
109
+ x-ratelimit-reset:
110
+ - '15'
131
111
  x-ratelimit-remaining:
132
- - '1910'
133
- x-ua-compatible:
134
- - IE=Edge,chrome=1
112
+ - '100'
113
+ content-type:
114
+ - application/json; charset=utf-8
135
115
  etag:
136
- - ! '"3b0be0b9811b2650ff5d2cd742d651c1"'
116
+ - '"75801c98392c0388b0528379885394ba"'
137
117
  cache-control:
138
- - must-revalidate, private, max-age=0
118
+ - max-age=0, private, must-revalidate
139
119
  x-request-id:
140
- - bb301ef8cbaf3472550c7f742c5aaaf5
120
+ - c8b40512-763f-4c2b-a608-ad17fbfdf091
141
121
  x-runtime:
142
- - '0.081421'
143
- x-rack-cache:
144
- - miss
122
+ - '1.077442'
123
+ connection:
124
+ - close
125
+ server:
126
+ - thin
145
127
  body:
146
- encoding: US-ASCII
147
- string: ! '[{"id":89,"url":"http://google.com","auth_key":"QvIB4-EZSm9zvfth-L9DKw","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-07-01T09:08:29Z","updated_at":"2014-07-01T09:08:29Z"},{"id":90,"url":"http://quadernoapp.com","auth_key":"QF2sx16_Pgn_hobSR56mdg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-07-01T09:08:30Z","updated_at":"2014-07-01T09:08:30Z"}]'
128
+ encoding: UTF-8
129
+ string: '[{"id":33,"url":"http://google.com","auth_key":"49YaaBdA3hsjU0MG4xnQ-g","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:13.000Z","updated_at":"2016-06-23T11:29:13.000Z"},{"id":34,"url":"http://quadernoapp.com","auth_key":"qtG4iS-MfSc6ljKKgHoSFg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:34.000Z","updated_at":"2016-06-23T11:29:34.000Z"}]'
148
130
  http_version: '1.1'
149
- recorded_at: Tue, 01 Jul 2014 09:08:31 GMT
131
+ recorded_at: Thu, 23 Jun 2016 11:29:36 GMT
150
132
  - request:
151
133
  method: delete
152
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/webhooks/89.json
134
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/33.json
153
135
  body:
154
136
  encoding: US-ASCII
155
137
  string: ''
156
138
  headers:
139
+ accept:
140
+ - application/json
157
141
  authorization:
158
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
142
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
159
143
  response:
160
144
  status:
161
145
  code: 204
162
146
  message: No Content
163
147
  headers:
164
- server:
165
- - nginx/1.4.5
166
- date:
167
- - Tue, 01 Jul 2014 09:08:31 GMT
168
- connection:
169
- - close
170
- status:
171
- - 204 No Content
148
+ x-frame-options:
149
+ - ALLOWALL
172
150
  x-ratelimit-limit:
173
151
  - '2000'
152
+ x-ratelimit-reset:
153
+ - '15'
174
154
  x-ratelimit-remaining:
175
- - '1909'
176
- x-ua-compatible:
177
- - IE=Edge,chrome=1
155
+ - '99'
178
156
  cache-control:
179
157
  - no-cache
180
- set-cookie:
181
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTIzZDFkZGJhMmVmMTA5YjQzMjc1MmE3OGRkYTVmOGFkBjsAVA%3D%3D--cb9e7ea099f3e6dd3de4a16562de102466f70b4c;
182
- domain=sandbox-quadernoapp.com; path=/; HttpOnly
183
158
  x-request-id:
184
- - 762013c75c10a3c82ad4e6d510f31e44
159
+ - 59caeeba-fb53-4a73-baf8-7b813bee6f07
185
160
  x-runtime:
186
- - '0.073228'
187
- x-rack-cache:
188
- - invalidate, pass
161
+ - '2.309395'
162
+ connection:
163
+ - close
164
+ server:
165
+ - thin
189
166
  body:
190
167
  encoding: US-ASCII
191
168
  string: ''
192
169
  http_version: '1.1'
193
- recorded_at: Tue, 01 Jul 2014 09:08:31 GMT
170
+ recorded_at: Thu, 23 Jun 2016 11:29:39 GMT
194
171
  - request:
195
172
  method: delete
196
- uri: http://RsNaLsNr1KZcdrQRKKKk@uruk-1066.sandbox-quadernoapp.com/api/v1/webhooks/90.json
173
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/34.json
197
174
  body:
198
175
  encoding: US-ASCII
199
176
  string: ''
200
177
  headers:
178
+ accept:
179
+ - application/json
201
180
  authorization:
202
- - Basic UnNOYUxzTnIxS1pjZHJRUktLS2s6
181
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
203
182
  response:
204
183
  status:
205
184
  code: 204
206
185
  message: No Content
207
186
  headers:
208
- server:
209
- - nginx/1.4.5
210
- date:
211
- - Tue, 01 Jul 2014 09:08:32 GMT
212
- connection:
213
- - close
214
- status:
215
- - 204 No Content
187
+ x-frame-options:
188
+ - ALLOWALL
216
189
  x-ratelimit-limit:
217
190
  - '2000'
191
+ x-ratelimit-reset:
192
+ - '14'
218
193
  x-ratelimit-remaining:
219
- - '1908'
220
- x-ua-compatible:
221
- - IE=Edge,chrome=1
194
+ - '98'
222
195
  cache-control:
223
196
  - no-cache
224
- set-cookie:
225
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTYzZGVjODk5OWQ3ZTg5MjliYjliNGIyZTFjOTg3MzVmBjsAVA%3D%3D--a03718e04f437a727cae05d8884e3c92ea0759b5;
226
- domain=sandbox-quadernoapp.com; path=/; HttpOnly
227
197
  x-request-id:
228
- - acfb46ad8a5c057bbc1a9b4051590d90
198
+ - 844f5b86-e754-4445-8d48-b6460a215502
229
199
  x-runtime:
230
- - '0.084668'
231
- x-rack-cache:
232
- - invalidate, pass
200
+ - '0.489229'
201
+ connection:
202
+ - close
203
+ server:
204
+ - thin
233
205
  body:
234
206
  encoding: US-ASCII
235
207
  string: ''
236
208
  http_version: '1.1'
237
- recorded_at: Tue, 01 Jul 2014 09:08:32 GMT
209
+ recorded_at: Thu, 23 Jun 2016 11:29:39 GMT
238
210
  recorded_with: VCR 2.9.2
@@ -2,108 +2,84 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://fMLf9TGWrRqNxJ4chcVi@assur-744.quadernoapp.com/api/v1/taxes/calculate.json?country=ES&postal_code=08080
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/taxes/calculate.json?country=ES&postal_code=08080
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic Zk1MZjlUR1dyUnFOeEo0Y2hjVmk6
11
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
12
12
  response:
13
13
  status:
14
14
  code: 200
15
15
  message: OK
16
16
  headers:
17
- server:
18
- - nginx/1.6.0
19
- date:
20
- - Thu, 27 Nov 2014 12:26:48 GMT
21
- content-type:
22
- - application/json; charset=utf-8
23
- transfer-encoding:
24
- - chunked
25
- connection:
26
- - close
27
- status:
28
- - 200 OK
17
+ x-frame-options:
18
+ - ALLOWALL
29
19
  x-ratelimit-limit:
30
20
  - '2000'
21
+ x-ratelimit-reset:
22
+ - '1'
31
23
  x-ratelimit-remaining:
32
- - '1972'
33
- x-ua-compatible:
34
- - IE=Edge,chrome=1
24
+ - '88'
25
+ content-type:
26
+ - application/json; charset=utf-8
35
27
  etag:
36
- - '"f878d3db85579985c01bbf45f95467be"'
28
+ - '"f296f1067b6655473bbfc04913d2a531"'
37
29
  cache-control:
38
- - must-revalidate, private, max-age=0
39
- set-cookie:
40
- - ahoy_visitor=79b5dcb1-53a0-4442-a610-9ce1b6eedc78; domain=.quadernoapp.com;
41
- path=/; expires=Sun, 27-Nov-2016 12:26:48 GMT
42
- - ahoy_visit=e7d4c176-89dc-45eb-a6ee-ec4192de018b; domain=.quadernoapp.com;
43
- path=/; expires=Thu, 27-Nov-2014 16:26:48 GMT
44
- - ahoy_track=true; domain=.quadernoapp.com; path=/
30
+ - max-age=0, private, must-revalidate
45
31
  x-request-id:
46
- - f54a921a8b1a89be6571392105406e1c
32
+ - ead16521-21c7-4972-a9a6-971887664731
47
33
  x-runtime:
48
- - '0.121124'
49
- x-rack-cache:
50
- - miss
34
+ - '0.224638'
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin
51
39
  body:
52
40
  encoding: UTF-8
53
- string: '{"name":"VAT","rate":21.0,"notes":null}'
41
+ string: '{"name":"IVA","rate":21.0,"country":"ES","notes":null}'
54
42
  http_version: '1.1'
55
- recorded_at: Thu, 27 Nov 2014 12:17:23 GMT
43
+ recorded_at: Thu, 23 Jun 2016 11:28:23 GMT
56
44
  - request:
57
45
  method: get
58
- uri: https://fMLf9TGWrRqNxJ4chcVi@assur-744.quadernoapp.com/api/v1/taxes/calculate.json?country=ES&postal_code=35007
46
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/taxes/calculate.json?country=ES&postal_code=35007
59
47
  body:
60
48
  encoding: US-ASCII
61
49
  string: ''
62
50
  headers:
63
51
  authorization:
64
- - Basic Zk1MZjlUR1dyUnFOeEo0Y2hjVmk6
52
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
65
53
  response:
66
54
  status:
67
55
  code: 200
68
56
  message: OK
69
57
  headers:
70
- server:
71
- - nginx/1.6.0
72
- date:
73
- - Thu, 27 Nov 2014 12:26:49 GMT
74
- content-type:
75
- - application/json; charset=utf-8
76
- transfer-encoding:
77
- - chunked
78
- connection:
79
- - close
80
- status:
81
- - 200 OK
58
+ x-frame-options:
59
+ - ALLOWALL
82
60
  x-ratelimit-limit:
83
61
  - '2000'
62
+ x-ratelimit-reset:
63
+ - '1'
84
64
  x-ratelimit-remaining:
85
- - '1971'
86
- x-ua-compatible:
87
- - IE=Edge,chrome=1
65
+ - '87'
66
+ content-type:
67
+ - application/json; charset=utf-8
88
68
  etag:
89
- - '"f6483dc8ea6256ea8793f35f31b443ab"'
69
+ - '"efcc87b7e1c672ccb82f88969f3ee97a"'
90
70
  cache-control:
91
- - must-revalidate, private, max-age=0
92
- set-cookie:
93
- - ahoy_visitor=70bfb475-e0d9-4e88-af9d-fb8379142175; domain=.quadernoapp.com;
94
- path=/; expires=Sun, 27-Nov-2016 12:26:49 GMT
95
- - ahoy_visit=b8e08a6f-e4b1-4063-a6ab-c55e11f30ff4; domain=.quadernoapp.com;
96
- path=/; expires=Thu, 27-Nov-2014 16:26:49 GMT
97
- - ahoy_track=true; domain=.quadernoapp.com; path=/
71
+ - max-age=0, private, must-revalidate
98
72
  x-request-id:
99
- - 76c7b54377e3eaa47c9f1f3378d46cf1
73
+ - 5e3cfdff-e027-4fb5-942e-6d1e1144d4ff
100
74
  x-runtime:
101
- - '0.087348'
102
- x-rack-cache:
103
- - miss
75
+ - '0.210198'
76
+ connection:
77
+ - close
78
+ server:
79
+ - thin
104
80
  body:
105
81
  encoding: UTF-8
106
- string: '{"name":null,"rate":0.0,"notes":"VAT reverse charged"}'
82
+ string: '{"name":"IVA","rate":0.0,"country":"ES","notes":null}'
107
83
  http_version: '1.1'
108
- recorded_at: Thu, 27 Nov 2014 12:17:24 GMT
84
+ recorded_at: Thu, 23 Jun 2016 11:28:23 GMT
109
85
  recorded_with: VCR 2.9.2