quaderno 1.13.2 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +56 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +2 -15
  6. data/README.md +120 -42
  7. data/Rakefile +4 -50
  8. data/changelog.md +67 -41
  9. data/lib/quaderno-ruby.rb +5 -5
  10. data/lib/quaderno-ruby/base.rb +112 -107
  11. data/lib/quaderno-ruby/behavior/block.rb +20 -19
  12. data/lib/quaderno-ruby/behavior/crud.rb +108 -95
  13. data/lib/quaderno-ruby/behavior/deliver.rb +20 -18
  14. data/lib/quaderno-ruby/behavior/payment.rb +38 -34
  15. data/lib/quaderno-ruby/behavior/retrieve.rb +26 -25
  16. data/lib/quaderno-ruby/checkout_session.rb +4 -0
  17. data/lib/quaderno-ruby/collection.rb +1 -0
  18. data/lib/quaderno-ruby/contact.rb +6 -8
  19. data/lib/quaderno-ruby/credit.rb +10 -12
  20. data/lib/quaderno-ruby/document_item.rb +1 -3
  21. data/lib/quaderno-ruby/estimate.rb +5 -7
  22. data/lib/quaderno-ruby/evidence.rb +5 -7
  23. data/lib/quaderno-ruby/exceptions/exceptions.rb +50 -44
  24. data/lib/quaderno-ruby/expense.rb +6 -8
  25. data/lib/quaderno-ruby/helpers/authentication.rb +16 -18
  26. data/lib/quaderno-ruby/helpers/rate_limit.rb +12 -0
  27. data/lib/quaderno-ruby/income.rb +8 -10
  28. data/lib/quaderno-ruby/invoice.rb +9 -11
  29. data/lib/quaderno-ruby/item.rb +3 -6
  30. data/lib/quaderno-ruby/payment.rb +2 -3
  31. data/lib/quaderno-ruby/receipt.rb +6 -8
  32. data/lib/quaderno-ruby/recurring.rb +4 -7
  33. data/lib/quaderno-ruby/report.rb +67 -29
  34. data/lib/quaderno-ruby/tax.rb +51 -46
  35. data/lib/quaderno-ruby/version.rb +3 -0
  36. data/lib/quaderno-ruby/webhook.rb +3 -5
  37. data/quaderno.gemspec +28 -148
  38. metadata +92 -92
  39. data/Gemfile.lock +0 -91
  40. data/VERSION +0 -1
  41. data/test/fixtures/quaderno_cassettes/.DS_Store +0 -0
  42. data/test/fixtures/quaderno_cassettes/all_contacts.yml +0 -52
  43. data/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml +0 -56
  44. data/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml +0 -57
  45. data/test/fixtures/quaderno_cassettes/all_estimates.yml +0 -52
  46. data/test/fixtures/quaderno_cassettes/all_expenses.yml +0 -55
  47. data/test/fixtures/quaderno_cassettes/all_invoices.yml +0 -56
  48. data/test/fixtures/quaderno_cassettes/all_items.yml +0 -46
  49. data/test/fixtures/quaderno_cassettes/all_receipts.yml +0 -53
  50. data/test/fixtures/quaderno_cassettes/all_webhooks.yml +0 -214
  51. data/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +0 -156
  52. data/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +0 -278
  53. data/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +0 -159
  54. data/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +0 -196
  55. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +0 -187
  56. data/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml +0 -199
  57. data/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml +0 -199
  58. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +0 -187
  59. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +0 -189
  60. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +0 -190
  61. data/test/fixtures/quaderno_cassettes/deleted_item.yml +0 -128
  62. data/test/fixtures/quaderno_cassettes/deleted_receipt.yml +0 -223
  63. data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +0 -257
  64. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +0 -136
  65. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +0 -143
  66. data/test/fixtures/quaderno_cassettes/delivered_receipt.yml +0 -140
  67. data/test/fixtures/quaderno_cassettes/evidence_invoice.yml +0 -98
  68. data/test/fixtures/quaderno_cassettes/found_contact.yml +0 -95
  69. data/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml +0 -99
  70. data/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml +0 -100
  71. data/test/fixtures/quaderno_cassettes/found_estimate.yml +0 -97
  72. data/test/fixtures/quaderno_cassettes/found_expense.yml +0 -99
  73. data/test/fixtures/quaderno_cassettes/found_invoice.yml +0 -100
  74. data/test/fixtures/quaderno_cassettes/found_item.yml +0 -91
  75. data/test/fixtures/quaderno_cassettes/found_receipt.yml +0 -98
  76. data/test/fixtures/quaderno_cassettes/found_webhook.yml +0 -130
  77. data/test/fixtures/quaderno_cassettes/new_contact.yml +0 -48
  78. data/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml +0 -48
  79. data/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml +0 -48
  80. data/test/fixtures/quaderno_cassettes/new_estimate.yml +0 -137
  81. data/test/fixtures/quaderno_cassettes/new_evidence.yml +0 -48
  82. data/test/fixtures/quaderno_cassettes/new_expense.yml +0 -189
  83. data/test/fixtures/quaderno_cassettes/new_invoice.yml +0 -137
  84. data/test/fixtures/quaderno_cassettes/new_item.yml +0 -48
  85. data/test/fixtures/quaderno_cassettes/new_receipt.yml +0 -173
  86. data/test/fixtures/quaderno_cassettes/new_webhook.yml +0 -87
  87. data/test/fixtures/quaderno_cassettes/paid_expense.yml +0 -98
  88. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +0 -99
  89. data/test/fixtures/quaderno_cassettes/rate_limit.yml +0 -46
  90. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +0 -138
  91. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +0 -138
  92. data/test/fixtures/quaderno_cassettes/updated_contact.yml +0 -97
  93. data/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml +0 -101
  94. data/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml +0 -102
  95. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +0 -185
  96. data/test/fixtures/quaderno_cassettes/updated_expense.yml +0 -184
  97. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +0 -184
  98. data/test/fixtures/quaderno_cassettes/updated_item.yml +0 -93
  99. data/test/fixtures/quaderno_cassettes/updated_receipt.yml +0 -220
  100. data/test/fixtures/quaderno_cassettes/updated_webhook.yml +0 -175
  101. data/test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml +0 -44
  102. data/test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml +0 -44
  103. data/test/helper.rb +0 -32
  104. data/test/unit/test_quaderno_contacts.rb +0 -83
  105. data/test/unit/test_quaderno_contacts_thread_safe.rb +0 -104
  106. data/test/unit/test_quaderno_estimates.rb +0 -155
  107. data/test/unit/test_quaderno_evidences.rb +0 -41
  108. data/test/unit/test_quaderno_expenses.rb +0 -162
  109. data/test/unit/test_quaderno_invoices.rb +0 -177
  110. data/test/unit/test_quaderno_items.rb +0 -84
  111. data/test/unit/test_quaderno_receipts.rb +0 -156
  112. data/test/unit/test_quaderno_tax.rb +0 -46
  113. data/test/unit/test_quaderno_webhooks.rb +0 -93
@@ -1,137 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json?
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- accept:
11
- - application/json
12
- authorization:
13
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- x-frame-options:
20
- - ALLOWALL
21
- x-ratelimit-limit:
22
- - '2000'
23
- x-ratelimit-reset:
24
- - '13'
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
- - '"9f61db3c521dbbd6fa0aec27f6813410"'
35
- cache-control:
36
- - max-age=0, private, must-revalidate
37
- x-request-id:
38
- - 5f55939e-dff8-4bca-b69b-f845ed448083
39
- x-runtime:
40
- - '1.159593'
41
- connection:
42
- - close
43
- server:
44
- - thin
45
- body:
46
- encoding: UTF-8
47
- string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus
48
- Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi
49
- Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]'
50
- http_version: '1.1'
51
- recorded_at: Mon, 12 Jun 2017 11:44:11 GMT
52
- - request:
53
- method: post
54
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json
55
- body:
56
- encoding: UTF-8
57
- string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}'
58
- headers:
59
- accept:
60
- - application/json
61
- content-type:
62
- - application/json
63
- authorization:
64
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
65
- response:
66
- status:
67
- code: 201
68
- message: Created
69
- headers:
70
- x-frame-options:
71
- - ALLOWALL
72
- x-ratelimit-limit:
73
- - '2000'
74
- x-ratelimit-reset:
75
- - '12'
76
- x-ratelimit-remaining:
77
- - '97'
78
- content-type:
79
- - application/json; charset=utf-8
80
- etag:
81
- - '"4d338c88d5eac57d13d211099c4c8954"'
82
- cache-control:
83
- - max-age=0, private, must-revalidate
84
- x-request-id:
85
- - 716a7db7-82ac-4ec0-8df5-369bcc704733
86
- x-runtime:
87
- - '4.541294'
88
- connection:
89
- - close
90
- server:
91
- - thin
92
- body:
93
- encoding: UTF-8
94
- string: '{"id":193,"blocked":false,"number":"0006","issue_date":"2017-06-12","created_at":1497267853,"contact":{"id":44,"full_name":"Albus
95
- Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":194,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"a87a9a9fb8fb5e4ee724175556480167798377cf","permalink":"http://development.lvh.me:3000/invoice/a87a9a9fb8fb5e4ee724175556480167798377cf","pdf":"http://development.lvh.me:3000/invoice/a87a9a9fb8fb5e4ee724175556480167798377cf.pdf","url":"http://development.lvh.me:3000/api/invoices/193.json","processor":null,"processor_id":null,"custom_metadata":{}}'
96
- http_version: '1.1'
97
- recorded_at: Mon, 12 Jun 2017 11:44:16 GMT
98
- - request:
99
- method: delete
100
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/193.json
101
- body:
102
- encoding: US-ASCII
103
- string: ''
104
- headers:
105
- accept:
106
- - application/json
107
- authorization:
108
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
109
- response:
110
- status:
111
- code: 204
112
- message: No Content
113
- headers:
114
- x-frame-options:
115
- - ALLOWALL
116
- x-ratelimit-limit:
117
- - '2000'
118
- x-ratelimit-reset:
119
- - '7'
120
- x-ratelimit-remaining:
121
- - '96'
122
- cache-control:
123
- - no-cache
124
- x-request-id:
125
- - 838bf07f-794d-43e2-bcd9-07f00cc7d948
126
- x-runtime:
127
- - '2.274649'
128
- connection:
129
- - close
130
- server:
131
- - thin
132
- body:
133
- encoding: US-ASCII
134
- string: ''
135
- http_version: '1.1'
136
- recorded_at: Mon, 12 Jun 2017 11:44:18 GMT
137
- recorded_with: VCR 2.9.2
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json
6
- body:
7
- encoding: UTF-8
8
- string: '{"code":"000000","name":"Test_Skynet","unit_cost":21.0}'
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
- - '15'
27
- x-ratelimit-remaining:
28
- - '100'
29
- content-type:
30
- - application/json; charset=utf-8
31
- etag:
32
- - '"b67748dbc7a4b108905719a11ac088b2"'
33
- cache-control:
34
- - max-age=0, private, must-revalidate
35
- x-request-id:
36
- - 89015e0b-0035-42a9-96f0-55ac879cdc6d
37
- x-runtime:
38
- - '1.702892'
39
- connection:
40
- - close
41
- server:
42
- - thin
43
- body:
44
- encoding: UTF-8
45
- string: '{"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"}'
46
- http_version: '1.1'
47
- recorded_at: Mon, 12 Jun 2017 11:45:33 GMT
48
- recorded_with: VCR 2.9.2
@@ -1,173 +0,0 @@
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: '{"first_name":"Test customer"}'
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
- - '15'
27
- x-ratelimit-remaining:
28
- - '100'
29
- content-type:
30
- - application/json; charset=utf-8
31
- etag:
32
- - '"a7a06d6ea36e5b87a92a79c5d10e8a7f"'
33
- cache-control:
34
- - max-age=0, private, must-revalidate
35
- x-request-id:
36
- - ea7fcbd2-73bc-4540-9d37-120b98a767f9
37
- x-runtime:
38
- - '5.209221'
39
- connection:
40
- - close
41
- server:
42
- - thin
43
- body:
44
- encoding: UTF-8
45
- string: '{"id":51,"kind":"company","created_at":1497268145,"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":"ca8beeb0198d77c285b368c6283bba7cee19eb7b","permalink":"http://development.lvh.me:3000/billing/ca8beeb0198d77c285b368c6283bba7cee19eb7b","url":"http://development.lvh.me:3000/api/contacts/51"}'
47
- http_version: '1.1'
48
- recorded_at: Mon, 12 Jun 2017 11:49:05 GMT
49
- - request:
50
- method: post
51
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json
52
- body:
53
- encoding: UTF-8
54
- string: '{"contact_id":51,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}'
55
- headers:
56
- accept:
57
- - application/json
58
- content-type:
59
- - application/json
60
- authorization:
61
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
62
- response:
63
- status:
64
- code: 201
65
- message: Created
66
- headers:
67
- x-frame-options:
68
- - ALLOWALL
69
- x-ratelimit-limit:
70
- - '2000'
71
- x-ratelimit-reset:
72
- - '15'
73
- x-ratelimit-remaining:
74
- - '99'
75
- content-type:
76
- - application/json; charset=utf-8
77
- etag:
78
- - '"95debeefc46c3c2ee8c67ae0c31b63e3"'
79
- cache-control:
80
- - max-age=0, private, must-revalidate
81
- x-request-id:
82
- - 4d1a56cc-30ec-489e-81b1-b332c074228b
83
- x-runtime:
84
- - '5.086502'
85
- connection:
86
- - close
87
- server:
88
- - thin
89
- body:
90
- encoding: UTF-8
91
- string: '{"id":201,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268147,"contact":{"id":51,"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":202,"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":51,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"5a9831bd31d5fb6dfa2f253c6a96c3e65f443146","permalink":"http://development.lvh.me:3000/receipt/5a9831bd31d5fb6dfa2f253c6a96c3e65f443146","pdf":"http://development.lvh.me:3000/receipt/5a9831bd31d5fb6dfa2f253c6a96c3e65f443146.pdf","url":"http://development.lvh.me:3000/api/receipts/201.json","processor":null,"processor_id":null,"custom_metadata":{}}'
93
- http_version: '1.1'
94
- recorded_at: Mon, 12 Jun 2017 11:49:10 GMT
95
- - request:
96
- method: delete
97
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/201.json
98
- body:
99
- encoding: US-ASCII
100
- string: ''
101
- headers:
102
- accept:
103
- - application/json
104
- authorization:
105
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
106
- response:
107
- status:
108
- code: 204
109
- message: No Content
110
- headers:
111
- x-frame-options:
112
- - ALLOWALL
113
- x-ratelimit-limit:
114
- - '2000'
115
- x-ratelimit-reset:
116
- - '9'
117
- x-ratelimit-remaining:
118
- - '98'
119
- cache-control:
120
- - no-cache
121
- x-request-id:
122
- - fc02265d-a576-48d2-a6bd-53b7b57a5a3b
123
- x-runtime:
124
- - '4.080019'
125
- connection:
126
- - close
127
- server:
128
- - thin
129
- body:
130
- encoding: US-ASCII
131
- string: ''
132
- http_version: '1.1'
133
- recorded_at: Mon, 12 Jun 2017 11:49:14 GMT
134
- - request:
135
- method: delete
136
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/51.json
137
- body:
138
- encoding: US-ASCII
139
- string: ''
140
- headers:
141
- accept:
142
- - application/json
143
- authorization:
144
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
145
- response:
146
- status:
147
- code: 204
148
- message: No Content
149
- headers:
150
- x-frame-options:
151
- - ALLOWALL
152
- x-ratelimit-limit:
153
- - '2000'
154
- x-ratelimit-reset:
155
- - '6'
156
- x-ratelimit-remaining:
157
- - '97'
158
- cache-control:
159
- - no-cache
160
- x-request-id:
161
- - 8fe818c8-b018-4c97-9762-40cc274070fd
162
- x-runtime:
163
- - '1.543748'
164
- connection:
165
- - close
166
- server:
167
- - thin
168
- body:
169
- encoding: US-ASCII
170
- string: ''
171
- http_version: '1.1'
172
- recorded_at: Mon, 12 Jun 2017 11:49:16 GMT
173
- recorded_with: VCR 2.9.2
@@ -1,87 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json
6
- body:
7
- encoding: UTF-8
8
- string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}'
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
- - '15'
27
- x-ratelimit-remaining:
28
- - '99'
29
- content-type:
30
- - application/json; charset=utf-8
31
- etag:
32
- - '"91b6be83c4e4a2d47fb90561fe7c4f2f"'
33
- cache-control:
34
- - max-age=0, private, must-revalidate
35
- x-request-id:
36
- - 8073f345-66c4-466c-821c-7215445b37d5
37
- x-runtime:
38
- - '4.655960'
39
- connection:
40
- - close
41
- server:
42
- - thin
43
- body:
44
- encoding: UTF-8
45
- string: '{"id":2,"url":"http://quadernoapp.com","auth_key":"YbgPZCXR-7M5Y3sN5SI9qg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:12.622Z","updated_at":"2017-06-12T11:54:12.622Z"}'
46
- http_version: '1.1'
47
- recorded_at: Mon, 12 Jun 2017 11:54:12 GMT
48
- - request:
49
- method: delete
50
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/2.json
51
- body:
52
- encoding: US-ASCII
53
- string: ''
54
- headers:
55
- accept:
56
- - application/json
57
- authorization:
58
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
59
- response:
60
- status:
61
- code: 204
62
- message: No Content
63
- headers:
64
- x-frame-options:
65
- - ALLOWALL
66
- x-ratelimit-limit:
67
- - '2000'
68
- x-ratelimit-reset:
69
- - '10'
70
- x-ratelimit-remaining:
71
- - '98'
72
- cache-control:
73
- - no-cache
74
- x-request-id:
75
- - b61a6386-ff61-4ad8-82a8-72473f13889e
76
- x-runtime:
77
- - '0.977874'
78
- connection:
79
- - close
80
- server:
81
- - thin
82
- body:
83
- encoding: US-ASCII
84
- string: ''
85
- http_version: '1.1'
86
- recorded_at: Mon, 12 Jun 2017 11:54:13 GMT
87
- recorded_with: VCR 2.9.2
@@ -1,98 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json?
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- accept:
11
- - application/json
12
- authorization:
13
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- x-frame-options:
20
- - ALLOWALL
21
- x-ratelimit-limit:
22
- - '2000'
23
- x-ratelimit-reset:
24
- - '15'
25
- x-ratelimit-remaining:
26
- - '100'
27
- x-pages-currentpage:
28
- - '1'
29
- x-pages-totalpages:
30
- - '1'
31
- content-type:
32
- - application/json; charset=utf-8
33
- etag:
34
- - '"04eba45c4062d412570b79904d65d4c7"'
35
- cache-control:
36
- - max-age=0, private, must-revalidate
37
- x-request-id:
38
- - 3a8c1ecc-a2a8-46e1-a8fa-09a26b1f7833
39
- x-runtime:
40
- - '4.103498'
41
- connection:
42
- - close
43
- server:
44
- - thin
45
- body:
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"}],"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":{}}]'
53
- http_version: '1.1'
54
- recorded_at: Mon, 12 Jun 2017 11:38:02 GMT
55
- - request:
56
- method: post
57
- uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/184/payments.json
58
- body:
59
- encoding: UTF-8
60
- string: payment_method=cash&amount=10000
61
- headers:
62
- accept:
63
- - application/json
64
- authorization:
65
- - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo=
66
- response:
67
- status:
68
- code: 201
69
- message: Created
70
- headers:
71
- x-frame-options:
72
- - ALLOWALL
73
- x-ratelimit-limit:
74
- - '2000'
75
- x-ratelimit-reset:
76
- - '15'
77
- x-ratelimit-remaining:
78
- - '99'
79
- content-type:
80
- - application/json; charset=utf-8
81
- etag:
82
- - '"cdd717fecdd357b86d86cc70298657c1"'
83
- cache-control:
84
- - max-age=0, private, must-revalidate
85
- x-request-id:
86
- - e3ae0b07-2a32-4dab-962c-554209c21bc9
87
- x-runtime:
88
- - '2.063114'
89
- connection:
90
- - close
91
- server:
92
- - thin
93
- body:
94
- encoding: UTF-8
95
- string: '{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}'
96
- http_version: '1.1'
97
- recorded_at: Mon, 12 Jun 2017 11:38:04 GMT
98
- recorded_with: VCR 2.9.2