quaderno 1.11.2 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +53 -1
  4. data/VERSION +1 -1
  5. data/changelog.md +3 -0
  6. data/lib/quaderno-ruby/base.rb +12 -2
  7. data/lib/quaderno-ruby/behavior/crud.rb +56 -11
  8. data/lib/quaderno-ruby/behavior/deliver.rb +10 -2
  9. data/lib/quaderno-ruby/behavior/payment.rb +23 -4
  10. data/lib/quaderno-ruby/behavior/retrieve.rb +11 -2
  11. data/lib/quaderno-ruby/collection.rb +22 -0
  12. data/lib/quaderno-ruby/helpers/authentication.rb +26 -0
  13. data/lib/quaderno-ruby.rb +4 -1
  14. data/quaderno.gemspec +16 -5
  15. data/test/fixtures/quaderno_cassettes/all_contacts.yml +11 -282
  16. data/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml +56 -0
  17. data/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml +57 -0
  18. data/test/fixtures/quaderno_cassettes/all_estimates.yml +10 -14
  19. data/test/fixtures/quaderno_cassettes/all_expenses.yml +14 -47
  20. data/test/fixtures/quaderno_cassettes/all_invoices.yml +13 -2873
  21. data/test/fixtures/quaderno_cassettes/all_items.yml +8 -8
  22. data/test/fixtures/quaderno_cassettes/all_receipts.yml +11 -14
  23. data/test/fixtures/quaderno_cassettes/all_webhooks.yml +40 -36
  24. data/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +46 -318
  25. data/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +125 -357
  26. data/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +45 -318
  27. data/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +56 -53
  28. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +40 -592
  29. data/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml +199 -0
  30. data/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml +199 -0
  31. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +40 -334
  32. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +43 -364
  33. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +44 -3199
  34. data/test/fixtures/quaderno_cassettes/deleted_item.yml +22 -22
  35. data/test/fixtures/quaderno_cassettes/deleted_receipt.yml +43 -42
  36. data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +48 -44
  37. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +25 -32
  38. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +29 -2888
  39. data/test/fixtures/quaderno_cassettes/delivered_receipt.yml +29 -29
  40. data/test/fixtures/quaderno_cassettes/evidence_invoice.yml +19 -354
  41. data/test/fixtures/quaderno_cassettes/found_contact.yml +19 -291
  42. data/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml +99 -0
  43. data/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml +100 -0
  44. data/test/fixtures/quaderno_cassettes/found_estimate.yml +20 -24
  45. data/test/fixtures/quaderno_cassettes/found_expense.yml +24 -94
  46. data/test/fixtures/quaderno_cassettes/found_invoice.yml +22 -2886
  47. data/test/fixtures/quaderno_cassettes/found_item.yml +18 -16
  48. data/test/fixtures/quaderno_cassettes/found_receipt.yml +21 -24
  49. data/test/fixtures/quaderno_cassettes/found_webhook.yml +24 -22
  50. data/test/fixtures/quaderno_cassettes/new_contact.yml +9 -7
  51. data/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml +48 -0
  52. data/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml +48 -0
  53. data/test/fixtures/quaderno_cassettes/new_estimate.yml +29 -320
  54. data/test/fixtures/quaderno_cassettes/new_evidence.yml +10 -8
  55. data/test/fixtures/quaderno_cassettes/new_expense.yml +42 -363
  56. data/test/fixtures/quaderno_cassettes/new_invoice.yml +29 -324
  57. data/test/fixtures/quaderno_cassettes/new_item.yml +10 -8
  58. data/test/fixtures/quaderno_cassettes/new_receipt.yml +28 -24
  59. data/test/fixtures/quaderno_cassettes/new_webhook.yml +16 -14
  60. data/test/fixtures/quaderno_cassettes/paid_expense.yml +22 -52
  61. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +22 -2879
  62. data/test/fixtures/quaderno_cassettes/rate_limit.yml +5 -5
  63. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +29 -61
  64. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +28 -2888
  65. data/test/fixtures/quaderno_cassettes/updated_contact.yml +22 -292
  66. data/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml +101 -0
  67. data/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml +102 -0
  68. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +44 -353
  69. data/test/fixtures/quaderno_cassettes/updated_expense.yml +43 -346
  70. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +43 -361
  71. data/test/fixtures/quaderno_cassettes/updated_item.yml +21 -17
  72. data/test/fixtures/quaderno_cassettes/updated_receipt.yml +47 -41
  73. data/test/fixtures/quaderno_cassettes/updated_webhook.yml +35 -31
  74. data/test/helper.rb +2 -1
  75. data/test/unit/test_quaderno_contacts.rb +1 -1
  76. data/test/unit/test_quaderno_contacts_thread_safe.rb +104 -0
  77. data/test/unit/test_quaderno_expenses.rb +5 -5
  78. metadata +15 -4
  79. data/test/fixtures/quaderno_cassettes/calculate_tax.yml +0 -85
  80. data/test/fixtures/quaderno_cassettes/wrong_token.yml +0 -36
@@ -5,10 +5,12 @@ http_interactions:
5
5
  uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json
6
6
  body:
7
7
  encoding: UTF-8
8
- string: code=1466681270&name=Test_Skynet&unit_cost=21.0
8
+ string: '{"code":"1497267937","name":"Test_Skynet","unit_cost":21.0}'
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,31 +23,31 @@ http_interactions:
21
23
  x-ratelimit-limit:
22
24
  - '2000'
23
25
  x-ratelimit-reset:
24
- - '3'
26
+ - '10'
25
27
  x-ratelimit-remaining:
26
- - '90'
28
+ - '96'
27
29
  content-type:
28
30
  - application/json; charset=utf-8
29
31
  etag:
30
- - '"2b1d7621e76538bd066381618cc88d7d"'
32
+ - '"732b61bb67f0464d5c743410b75b9dd5"'
31
33
  cache-control:
32
34
  - max-age=0, private, must-revalidate
33
35
  x-request-id:
34
- - a7415359-5206-4e36-aa3e-cdc1adc5d82f
36
+ - c9a3bfda-f822-4d1f-81ff-9709765b7b16
35
37
  x-runtime:
36
- - '0.640244'
38
+ - '1.152317'
37
39
  connection:
38
40
  - close
39
41
  server:
40
42
  - thin
41
43
  body:
42
44
  encoding: UTF-8
43
- string: '{"id":12,"code":"1466681270","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/12"}'
45
+ string: '{"id":3,"code":"1497267937","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/3"}'
44
46
  http_version: '1.1'
45
- recorded_at: Thu, 23 Jun 2016 11:27:51 GMT
47
+ recorded_at: Mon, 12 Jun 2017 11:45:38 GMT
46
48
  - request:
47
49
  method: get
48
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/12.json
50
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/3.json
49
51
  body:
50
52
  encoding: US-ASCII
51
53
  string: ''
@@ -64,26 +66,26 @@ http_interactions:
64
66
  x-ratelimit-limit:
65
67
  - '2000'
66
68
  x-ratelimit-reset:
67
- - '2'
69
+ - '9'
68
70
  x-ratelimit-remaining:
69
- - '89'
71
+ - '95'
70
72
  content-type:
71
73
  - application/json; charset=utf-8
72
74
  etag:
73
- - '"2b1d7621e76538bd066381618cc88d7d"'
75
+ - '"732b61bb67f0464d5c743410b75b9dd5"'
74
76
  cache-control:
75
77
  - max-age=0, private, must-revalidate
76
78
  x-request-id:
77
- - 319d4d17-475f-4ce1-8e76-6b40f8707a48
79
+ - d80f54ce-3adc-49be-a916-df534626a43f
78
80
  x-runtime:
79
- - '0.637247'
81
+ - '0.665111'
80
82
  connection:
81
83
  - close
82
84
  server:
83
85
  - thin
84
86
  body:
85
87
  encoding: UTF-8
86
- string: '{"id":12,"code":"1466681270","name":"Test_Skynet","unit_cost":"21.0","stock":null,"url":"http://development.lvh.me:3000/api/items/12"}'
88
+ string: '{"id":3,"code":"1497267937","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/3"}'
87
89
  http_version: '1.1'
88
- recorded_at: Thu, 23 Jun 2016 11:27:52 GMT
90
+ recorded_at: Mon, 12 Jun 2017 11:45:39 GMT
89
91
  recorded_with: VCR 2.9.2
@@ -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/receipts.json
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json?
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -21,9 +21,9 @@ http_interactions:
21
21
  x-ratelimit-limit:
22
22
  - '2000'
23
23
  x-ratelimit-reset:
24
- - '15'
24
+ - '7'
25
25
  x-ratelimit-remaining:
26
- - '100'
26
+ - '94'
27
27
  x-pages-currentpage:
28
28
  - '1'
29
29
  x-pages-totalpages:
@@ -31,31 +31,28 @@ http_interactions:
31
31
  content-type:
32
32
  - application/json; charset=utf-8
33
33
  etag:
34
- - '"b3b66954c987c74b8ebbdba19fda50af"'
34
+ - '"2fbe5b66d01a5d67afd7be37b64c395a"'
35
35
  cache-control:
36
36
  - max-age=0, private, must-revalidate
37
37
  x-request-id:
38
- - af63ad5f-f655-415c-b757-1c41ba287d75
38
+ - 3897044f-91f2-45e8-9f36-6180cc75a606
39
39
  x-runtime:
40
- - '1.035304'
40
+ - '1.841290'
41
41
  connection:
42
42
  - close
43
43
  server:
44
44
  - thin
45
45
  body:
46
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}]'
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":{}}]'
54
51
  http_version: '1.1'
55
- recorded_at: Thu, 23 Jun 2016 11:28:10 GMT
52
+ recorded_at: Mon, 12 Jun 2017 11:49:35 GMT
56
53
  - request:
57
54
  method: get
58
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/1056.json
55
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/200.json
59
56
  body:
60
57
  encoding: US-ASCII
61
58
  string: ''
@@ -74,28 +71,28 @@ http_interactions:
74
71
  x-ratelimit-limit:
75
72
  - '2000'
76
73
  x-ratelimit-reset:
77
- - '15'
74
+ - '5'
78
75
  x-ratelimit-remaining:
79
- - '99'
76
+ - '93'
80
77
  content-type:
81
78
  - application/json; charset=utf-8
82
79
  etag:
83
- - '"6e98e167256652e39b10c61fa70cad98"'
80
+ - '"4884e54cccfe170b4e81103fcc5c0db3"'
84
81
  cache-control:
85
82
  - max-age=0, private, must-revalidate
86
83
  x-request-id:
87
- - 40077033-54da-42b0-b635-760121559d5b
84
+ - 33b86780-0d44-48b4-83cb-d4a508e045e9
88
85
  x-runtime:
89
- - '0.595983'
86
+ - '1.387477'
90
87
  connection:
91
88
  - close
92
89
  server:
93
90
  - thin
94
91
  body:
95
92
  encoding: UTF-8
96
- string: '{"id":1056,"number":"0000005","issue_date":"2016-06-23","created_at":1466680696,"contact":{"id":85,"full_name":"Test
97
- 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
98
- 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}'
93
+ string: '{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus
94
+ 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,
95
+ 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":{}}'
99
96
  http_version: '1.1'
100
- recorded_at: Thu, 23 Jun 2016 11:28:10 GMT
97
+ recorded_at: Mon, 12 Jun 2017 11:49:36 GMT
101
98
  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=http%3A%2F%2Fquadernoapp.com&events_types[]=invoice.created&events_types[]=expense.updated
8
+ string: '{"url":"http://quadernoapp.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,31 +23,31 @@ http_interactions:
21
23
  x-ratelimit-limit:
22
24
  - '2000'
23
25
  x-ratelimit-reset:
24
- - '13'
26
+ - '2'
25
27
  x-ratelimit-remaining:
26
- - '96'
28
+ - '91'
27
29
  content-type:
28
30
  - application/json; charset=utf-8
29
31
  etag:
30
- - '"1597f2571353f1573969bf6b8b0e3cdf"'
32
+ - '"ad33abb0a26086d6366cb6faf2f99e3d"'
31
33
  cache-control:
32
34
  - max-age=0, private, must-revalidate
33
35
  x-request-id:
34
- - 11f09934-aab7-40b6-ae1b-3f937ebb8896
36
+ - 8caa8d6e-2624-47ab-8c4d-0ddeabad142c
35
37
  x-runtime:
36
- - '10.094418'
38
+ - '1.901922'
37
39
  connection:
38
40
  - close
39
41
  server:
40
42
  - thin
41
43
  body:
42
44
  encoding: UTF-8
43
- string: '{"id":32,"url":"http://quadernoapp.com","auth_key":"_3oUDCHa7C2A5YgaCIi6VA","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:03.895Z","updated_at":"2016-06-23T11:29:03.895Z"}'
45
+ string: '{"id":5,"url":"http://quadernoapp.com","auth_key":"YcKz3CdhV2mJjE80RwIhfg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:22.409Z","updated_at":"2017-06-12T11:54:22.409Z"}'
44
46
  http_version: '1.1'
45
- recorded_at: Thu, 23 Jun 2016 11:29:04 GMT
47
+ recorded_at: Mon, 12 Jun 2017 11:54:22 GMT
46
48
  - request:
47
49
  method: get
48
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
50
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json?
49
51
  body:
50
52
  encoding: US-ASCII
51
53
  string: ''
@@ -64,31 +66,31 @@ http_interactions:
64
66
  x-ratelimit-limit:
65
67
  - '2000'
66
68
  x-ratelimit-reset:
67
- - '3'
69
+ - '15'
68
70
  x-ratelimit-remaining:
69
- - '95'
71
+ - '100'
70
72
  content-type:
71
73
  - application/json; charset=utf-8
72
74
  etag:
73
- - '"e1275952d50c8a538ea728a8ca6bb3e7"'
75
+ - '"567dcc587054d62ddc6cbb37fb0442ec"'
74
76
  cache-control:
75
77
  - max-age=0, private, must-revalidate
76
78
  x-request-id:
77
- - 2e175fc4-9c07-4939-9fae-0602557c8643
79
+ - 55d2f917-bd93-4ddd-8e98-5c29b783c5a0
78
80
  x-runtime:
79
- - '0.671506'
81
+ - '0.732996'
80
82
  connection:
81
83
  - close
82
84
  server:
83
85
  - thin
84
86
  body:
85
87
  encoding: UTF-8
86
- string: '[{"id":32,"url":"http://quadernoapp.com","auth_key":"_3oUDCHa7C2A5YgaCIi6VA","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2016-06-23T11:29:03.000Z","updated_at":"2016-06-23T11:29:03.000Z"}]'
88
+ 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":5,"url":"http://quadernoapp.com","auth_key":"YcKz3CdhV2mJjE80RwIhfg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:22.000Z","updated_at":"2017-06-12T11:54:22.000Z"}]'
87
89
  http_version: '1.1'
88
- recorded_at: Thu, 23 Jun 2016 11:29:04 GMT
90
+ recorded_at: Mon, 12 Jun 2017 11:54:23 GMT
89
91
  - request:
90
92
  method: delete
91
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/32.json
93
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/5.json
92
94
  body:
93
95
  encoding: US-ASCII
94
96
  string: ''
@@ -107,15 +109,15 @@ http_interactions:
107
109
  x-ratelimit-limit:
108
110
  - '2000'
109
111
  x-ratelimit-reset:
110
- - '2'
112
+ - '15'
111
113
  x-ratelimit-remaining:
112
- - '94'
114
+ - '99'
113
115
  cache-control:
114
116
  - no-cache
115
117
  x-request-id:
116
- - 0eb46fef-6e29-43fc-8be0-fc2277bc5f4a
118
+ - 06ebae54-e672-4161-b319-24edf0db1289
117
119
  x-runtime:
118
- - '0.419223'
120
+ - '0.711711'
119
121
  connection:
120
122
  - close
121
123
  server:
@@ -124,5 +126,5 @@ http_interactions:
124
126
  encoding: US-ASCII
125
127
  string: ''
126
128
  http_version: '1.1'
127
- recorded_at: Thu, 23 Jun 2016 11:29:05 GMT
129
+ recorded_at: Mon, 12 Jun 2017 11:54:24 GMT
128
130
  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: kind=company&first_name=Test_Skynet&email=my_little%40po.ny
8
+ string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}'
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:
@@ -23,24 +25,24 @@ http_interactions:
23
25
  x-ratelimit-reset:
24
26
  - '15'
25
27
  x-ratelimit-remaining:
26
- - '99'
28
+ - '100'
27
29
  content-type:
28
30
  - application/json; charset=utf-8
29
31
  etag:
30
- - '"4d92dd7f465d302daeb8b6eaaa7d099b"'
32
+ - '"cc86da182178ec31d29ca5ac67e1651f"'
31
33
  cache-control:
32
34
  - max-age=0, private, must-revalidate
33
35
  x-request-id:
34
- - 72f200bf-4e70-409c-8ccc-2b62e5bf4d92
36
+ - 9dedb072-e441-4d2d-ab84-3fd828a650e6
35
37
  x-runtime:
36
- - '3.015393'
38
+ - '0.730536'
37
39
  connection:
38
40
  - close
39
41
  server:
40
42
  - thin
41
43
  body:
42
44
  encoding: UTF-8
43
- string: '{"id":86,"kind":"company","created_at":1466681108,"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":"17bbf9fb5e227af4bdb792fbda7050d914cceebf","permalink":"http://development.lvh.me:3000/billing/17bbf9fb5e227af4bdb792fbda7050d914cceebf","url":"http://development.lvh.me:3000/api/contacts/86"}'
45
+ string: '{"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"}'
44
46
  http_version: '1.1'
45
- recorded_at: Thu, 23 Jun 2016 11:25:10 GMT
47
+ recorded_at: Fri, 09 Jun 2017 13:00:55 GMT
46
48
  recorded_with: VCR 2.9.2
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://development.lvh.me:3000/api/contacts.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}'
9
+ headers:
10
+ accept:
11
+ - application/json
12
+ authorization:
13
+ - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12
14
+ content-type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ x-frame-options:
22
+ - ALLOWALL
23
+ x-ratelimit-limit:
24
+ - '2000'
25
+ x-ratelimit-reset:
26
+ - '15'
27
+ x-ratelimit-remaining:
28
+ - '99'
29
+ content-type:
30
+ - application/json; charset=utf-8
31
+ etag:
32
+ - '"a795161241ec36c1573a97839c8d403f"'
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ x-request-id:
36
+ - ffea69d5-d081-408f-ab71-e4af487833c5
37
+ x-runtime:
38
+ - '1.645313'
39
+ connection:
40
+ - close
41
+ server:
42
+ - thin
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":62,"kind":"company","created_at":1497351487,"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":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"}'
46
+ http_version: '1.1'
47
+ recorded_at: Tue, 13 Jun 2017 10:58:07 GMT
48
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}'
9
+ headers:
10
+ accept:
11
+ - application/json
12
+ content-type:
13
+ - application/json
14
+ authorization:
15
+ - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ x-frame-options:
22
+ - ALLOWALL
23
+ x-ratelimit-limit:
24
+ - '2000'
25
+ x-ratelimit-reset:
26
+ - '10'
27
+ x-ratelimit-remaining:
28
+ - '92'
29
+ content-type:
30
+ - application/json; charset=utf-8
31
+ etag:
32
+ - '"32908f591a2c9a94a4b012544403fb8f"'
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ x-request-id:
36
+ - 75135e5f-6461-4a39-a30d-54a10791c43d
37
+ x-runtime:
38
+ - '0.278524'
39
+ connection:
40
+ - close
41
+ server:
42
+ - thin
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":64,"kind":"company","created_at":1497351490,"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":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"}'
46
+ http_version: '1.1'
47
+ recorded_at: Tue, 13 Jun 2017 10:58:10 GMT
48
+ recorded_with: VCR 2.9.2