quaderno 1.11.2 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -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/estimates.json
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.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
- - '10'
24
+ - '11'
25
25
  x-ratelimit-remaining:
26
- - '95'
26
+ - '91'
27
27
  x-pages-currentpage:
28
28
  - '1'
29
29
  x-pages-totalpages:
@@ -31,31 +31,27 @@ http_interactions:
31
31
  content-type:
32
32
  - application/json; charset=utf-8
33
33
  etag:
34
- - '"74819ab6a2b52790377d5890e49d72fa"'
34
+ - '"b1aa095a3d37cb3a66bdf93f658ff2ee"'
35
35
  cache-control:
36
36
  - max-age=0, private, must-revalidate
37
37
  x-request-id:
38
- - 85c9df7e-bb45-496c-b861-4eee4ad711f1
38
+ - b218a3b4-227d-4501-adf2-83397e2f16af
39
39
  x-runtime:
40
- - '1.291450'
40
+ - '0.357928'
41
41
  connection:
42
42
  - close
43
43
  server:
44
44
  - thin
45
45
  body:
46
46
  encoding: UTF-8
47
- string: '[{"id":999,"number":"0000003","issue_date":"2016-06-08","created_at":1465391771,"contact":{"id":58,"full_name":"Test_OCP
48
- Diepstraten"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":1012,"description":"1","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"BTW","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"},{"id":1013,"description":"2","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"BTW
49
- (21.00%)","amount_cents":210}],"total_cents":2210,"payment_details":null,"notes":null,"state":"invoiced","tag_list":[],"secure_id":"3ba0301fb141753b1a9e81f8e2e87f8e4d27436b","permalink":"http://development.lvh.me:3000/estimate/3ba0301fb141753b1a9e81f8e2e87f8e4d27436b","url":"http://development.lvh.me:3000/api/estimates/999.json"},{"id":995,"number":"0000002","issue_date":"2016-06-08","created_at":1465391049,"contact":{"id":58,"full_name":"Test_OCP
50
- Diepstraten"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":1005,"description":"1","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"BTW","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"},{"id":1006,"description":"2","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"BTW
51
- (21.00%)","amount_cents":210}],"total_cents":2210,"payment_details":null,"notes":null,"state":"invoiced","tag_list":[],"secure_id":"a95cc19fd4def0024964a8d6aedd6d24de960e3f","permalink":"http://development.lvh.me:3000/estimate/a95cc19fd4def0024964a8d6aedd6d24de960e3f","url":"http://development.lvh.me:3000/api/estimates/995.json"},{"id":992,"number":"0000001","issue_date":"2016-06-02","created_at":1464869069,"contact":{"id":58,"full_name":"Test_OCP
52
- Diepstraten"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":1000,"description":"1","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"BTW","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"},{"id":1001,"description":"2","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[{"label":"BTW
53
- (21.00%)","amount_cents":0}],"total_cents":0,"payment_details":null,"notes":null,"state":"invoiced","tag_list":[],"secure_id":"91e361b2d900856d8e7e230b4175956d0f163162","permalink":"http://development.lvh.me:3000/estimate/91e361b2d900856d8e7e230b4175956d0f163162","url":"http://development.lvh.me:3000/api/estimates/992.json"}]'
47
+ string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi
48
+ Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA
49
+ (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]'
54
50
  http_version: '1.1'
55
- recorded_at: Thu, 23 Jun 2016 11:25:33 GMT
51
+ recorded_at: Fri, 09 Jun 2017 13:02:42 GMT
56
52
  - request:
57
53
  method: get
58
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/999.json
54
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/175.json
59
55
  body:
60
56
  encoding: US-ASCII
61
57
  string: ''
@@ -74,28 +70,28 @@ http_interactions:
74
70
  x-ratelimit-limit:
75
71
  - '2000'
76
72
  x-ratelimit-reset:
77
- - '9'
73
+ - '11'
78
74
  x-ratelimit-remaining:
79
- - '94'
75
+ - '90'
80
76
  content-type:
81
77
  - application/json; charset=utf-8
82
78
  etag:
83
- - '"43f7c2dd01f5e6810fc4d610a8ea68e3"'
79
+ - '"1a7031a245f247b2890d7e65631f4522"'
84
80
  cache-control:
85
81
  - max-age=0, private, must-revalidate
86
82
  x-request-id:
87
- - 261827c4-92c0-4453-8a2f-259fcb1d46ff
83
+ - 558e9b5b-b600-4e65-9a22-a5a80d97e4eb
88
84
  x-runtime:
89
- - '0.379356'
85
+ - '0.396195'
90
86
  connection:
91
87
  - close
92
88
  server:
93
89
  - thin
94
90
  body:
95
91
  encoding: UTF-8
96
- string: '{"id":999,"number":"0000003","issue_date":"2016-06-08","created_at":1465391771,"contact":{"id":58,"full_name":"Test_OCP
97
- Diepstraten"},"street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":1012,"description":"1","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"BTW","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"},{"id":1013,"description":"2","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount":"1000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"BTW
98
- (21.00%)","amount_cents":210}],"total_cents":2210,"payment_details":null,"notes":null,"state":"invoiced","tag_list":[],"secure_id":"3ba0301fb141753b1a9e81f8e2e87f8e4d27436b","permalink":"http://development.lvh.me:3000/estimate/3ba0301fb141753b1a9e81f8e2e87f8e4d27436b","url":"http://development.lvh.me:3000/api/estimates/999.json"}'
92
+ string: '{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi
93
+ Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA
94
+ (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}'
99
95
  http_version: '1.1'
100
- recorded_at: Thu, 23 Jun 2016 11:25:34 GMT
96
+ recorded_at: Fri, 09 Jun 2017 13:02:43 GMT
101
97
  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/expenses.json
5
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.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
- - '2'
24
+ - '11'
25
25
  x-ratelimit-remaining:
26
- - '88'
26
+ - '98'
27
27
  x-pages-currentpage:
28
28
  - '1'
29
29
  x-pages-totalpages:
@@ -31,63 +31,30 @@ http_interactions:
31
31
  content-type:
32
32
  - application/json; charset=utf-8
33
33
  etag:
34
- - '"8d78811bffbec882d3a115c0c1cd55f7"'
34
+ - '"1096b389a8934c3608b59ed5c52ff5c1"'
35
35
  cache-control:
36
36
  - max-age=0, private, must-revalidate
37
37
  x-request-id:
38
- - 8224e6f9-0b28-46da-b126-6a0c80949d94
38
+ - 30dec817-cd9a-4d08-bd39-3ff3431cdea7
39
39
  x-runtime:
40
- - '0.785573'
40
+ - '3.485057'
41
41
  connection:
42
42
  - close
43
43
  server:
44
44
  - thin
45
45
  body:
46
- encoding: ASCII-8BIT
47
- string: !binary |-
48
- W3siaWQiOjk5NCwiaXNzdWVfZGF0ZSI6IjIwMTYtMDYtMDgiLCJjcmVhdGVk
49
- X2F0IjoxNDY1Mzg1NjQwLCJjb250YWN0Ijp7ImlkIjo1MywiZnVsbF9uYW1l
50
- IjoiVGVzdF9PQ1AgVW1wacOpcnJleiJ9LCJzdHJlZXRfbGluZV8xIjpudWxs
51
- LCJzdHJlZXRfbGluZV8yIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24iOm51
52
- bGwsInBvc3RhbF9jb2RlIjpudWxsLCJwb19udW1iZXIiOm51bGwsImN1cnJl
53
- bmN5IjoiRVVSIiwiZXhjaGFuZ2VfcmF0ZSI6IjEuMCIsIml0ZW1zIjpbeyJp
54
- ZCI6MTAwNCwiZGVzY3JpcHRpb24iOiJTb21ldGhpbmciLCJxdWFudGl0eSI6
55
- IjEuMCIsInVuaXRfcHJpY2VfY2VudHMiOiIyMDAwLjAiLCJkaXNjb3VudF9y
56
- YXRlIjoiMC4wIiwidGF4XzFfbmFtZSI6Ik13U3QuL1VTdC4iLCJ0YXhfMV9y
57
- YXRlIjoxOS4wLCJ0YXhfMl9uYW1lIjoiIiwidGF4XzJfcmF0ZSI6bnVsbCwi
58
- cmVmZXJlbmNlIjpudWxsLCJzdWJ0b3RhbF9jZW50cyI6IjIwMDAuMCIsImRp
59
- c2NvdW50X2NlbnRzIjoiMC4wIiwiZ3Jvc3NfYW1vdW50X2NlbnRzIjoiMjAw
60
- MC4wIn1dLCJzdWJ0b3RhbF9jZW50cyI6IjIwMDAuMCIs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9tZXRob2QiOiJjYXNoIiwiYW1v
78
- dW50X2NlbnRzIjoxMDAwMDAwLCJ1cmwiOiJodHRwOi8vZGV2ZWxvcG1lbnQu
79
- bHZoLm1lOjMwMDAvYXBpL2V4cGVuc2VzLzk5NC9wYXltZW50cy8yMS5qc29u
80
- In0seyJpZCI6MjgsImRhdGUiOiIyMDE2LTA2LTIzIiwicGF5bWVudF9tZXRo
81
- b2QiOiJjYXNoIiwiYW1vdW50X2NlbnRzIjoxMDAwMDAwLCJ1cmwiOiJodHRw
82
- Oi8vZGV2ZWxvcG1lbnQubHZoLm1lOjMwMDAvYXBpL2V4cGVuc2VzLzk5NC9w
83
- YXltZW50cy8yOC5qc29uIn1dLCJub3RlcyI6bnVsbCwic3RhdGUiOiJwYWlk
84
- IiwidGFnX2xpc3QiOltdLCJ1cmwiOiJodHRwOi8vZGV2ZWxvcG1lbnQubHZo
85
- Lm1lOjMwMDAvYXBpL2V4cGVuc2VzLzk5NC5qc29uIn1d
46
+ encoding: UTF-8
47
+ string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"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":185,"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":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi
49
+ Campidocti"},"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":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi
50
+ Campidocti"},"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":136,"description":"Dreamhack
51
+ valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi
52
+ Campidocti"},"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":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]'
86
53
  http_version: '1.1'
87
- recorded_at: Thu, 23 Jun 2016 11:25:59 GMT
54
+ recorded_at: Mon, 12 Jun 2017 11:38:29 GMT
88
55
  - request:
89
56
  method: get
90
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/994.json
57
+ uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/184.json
91
58
  body:
92
59
  encoding: US-ASCII
93
60
  string: ''
@@ -106,64 +73,27 @@ http_interactions:
106
73
  x-ratelimit-limit:
107
74
  - '2000'
108
75
  x-ratelimit-reset:
109
- - '1'
76
+ - '8'
110
77
  x-ratelimit-remaining:
111
- - '87'
78
+ - '97'
112
79
  content-type:
113
80
  - application/json; charset=utf-8
114
81
  etag:
115
- - '"9336b6f7fc3ce3401ea624b4d7c0202d"'
82
+ - '"37b5f9d49ed3d5abfd0c53251866ed35"'
116
83
  cache-control:
117
84
  - max-age=0, private, must-revalidate
118
85
  x-request-id:
119
- - 4f332b6f-926e-4fe7-b200-1086edd6e7ed
86
+ - bdeddee1-f073-461e-bffe-c66c380f0979
120
87
  x-runtime:
121
- - '0.717276'
88
+ - '1.381088'
122
89
  connection:
123
90
  - close
124
91
  server:
125
92
  - thin
126
93
  body:
127
- encoding: ASCII-8BIT
128
- string: !binary |-
129
- eyJpZCI6OTk0LCJpc3N1ZV9kYXRlIjoiMjAxNi0wNi0wOCIsImNyZWF0ZWRf
130
- YXQiOjE0NjUzODU2NDAsImNvbnRhY3QiOnsiaWQiOjUzLCJmdWxsX25hbWUi
131
- OiJUZXN0X09DUCBVbXBpw6lycmV6In0sInN0cmVldF9saW5lXzEiOm51bGws
132
- InN0cmVldF9saW5lXzIiOm51bGwsImNpdHkiOm51bGwsInJlZ2lvbiI6bnVs
133
- bCwicG9zdGFsX2NvZGUiOm51bGwsInBvX251bWJlciI6bnVsbCwiY3VycmVu
134
- Y3kiOiJFVVIiLCJleGNoYW5nZV9yYXRlIjoiMS4wIiwiaXRlbXMiOlt7Imlk
135
- IjoxMDA0LCJkZXNjcmlwdGlvbiI6IlNvbWV0aGluZyIsInF1YW50aXR5Ijoi
136
- MS4wIiwidW5pdF9wcmljZV9jZW50cyI6IjIwMDAuMCIsImRpc2NvdW50X3Jh
137
- dGUiOiIwLjAiLCJ0YXhfMV9uYW1lIjoiTXdTdC4vVVN0LiIsInRheF8xX3Jh
138
- dGUiOjE5LjAsInRheF8yX25hbWUiOiIiLCJ0YXhfMl9yYXRlIjpudWxsLCJy
139
- ZWZlcmVuY2UiOm51bGwsInN1YnRvdGFsX2NlbnRzIjoiMjAwMC4wIiwiZGlz
140
- Y291bnRfY2VudHMiOiIwLjAiLCJncm9zc19hbW91bnRfY2VudHMiOiIyMDAw
141
- LjAifV0sInN1YnRvdGFsX2NlbnRzIjoiMjAwMC4wIiwiZGlzY291bnRfY2Vu
142
- dHMiOiIwLjAiLCJ0YXhlcyI6W3sibGFiZWwiOiJNd1N0Li9VU3QuICgxOS4w
143
- MCUpIiwiYW1vdW50X2NlbnRzIjozODB9XSwiZXh0cmFjdCI6eyJ0b3RhbF9j
144
- ZW50cyI6MjM4MH0sInBheW1lbnRzIjpbeyJpZCI6OCwiZGF0ZSI6IjIwMTYt
145
- MDYtMDgiLCJwYXltZW50X21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ImNhc2giLCJhbW91bnRfY2VudHMiOjEwMDAwMDAsInVybCI6Imh0dHA6
163
- Ly9kZXZlbG9wbWVudC5sdmgubWU6MzAwMC9hcGkvZXhwZW5zZXMvOTk0L3Bh
164
- eW1lbnRzLzI4Lmpzb24ifV0sIm5vdGVzIjpudWxsLCJzdGF0ZSI6InBhaWQi
165
- LCJ0YWdfbGlzdCI6W10sInVybCI6Imh0dHA6Ly9kZXZlbG9wbWVudC5sdmgu
166
- bWU6MzAwMC9hcGkvZXhwZW5zZXMvOTk0Lmpzb24ifQ==
94
+ encoding: UTF-8
95
+ string: '{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus
96
+ 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":185,"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":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}}'
167
97
  http_version: '1.1'
168
- recorded_at: Thu, 23 Jun 2016 11:26:00 GMT
98
+ recorded_at: Mon, 12 Jun 2017 11:38:30 GMT
169
99
  recorded_with: VCR 2.9.2