quaderno 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/README.md +1 -1
  2. data/VERSION +1 -1
  3. data/build_install.sh +2 -2
  4. data/lib/quaderno-ruby/behavior/crud.rb +7 -3
  5. data/lib/quaderno-ruby/document_item.rb +4 -0
  6. data/lib/quaderno-ruby/item.rb +6 -2
  7. data/lib/quaderno-ruby.rb +1 -1
  8. data/quaderno-1.0.0.gem +0 -0
  9. data/{quaderno-ruby.gemspec → quaderno.gemspec} +14 -6
  10. data/test/fixtures/quaderno_cassettes/all_contacts.yml +14 -12
  11. data/test/fixtures/quaderno_cassettes/all_estimates.yml +14 -10
  12. data/test/fixtures/quaderno_cassettes/all_expenses.yml +14 -10
  13. data/test/fixtures/quaderno_cassettes/all_invoices.yml +25 -10
  14. data/test/fixtures/quaderno_cassettes/all_items.yml +42 -0
  15. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +75 -31
  16. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +74 -27
  17. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +74 -27
  18. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +85 -28
  19. data/test/fixtures/quaderno_cassettes/deleted_item.yml +119 -0
  20. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +30 -29
  21. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +41 -29
  22. data/test/fixtures/quaderno_cassettes/found_contact.yml +22 -22
  23. data/test/fixtures/quaderno_cassettes/found_estimate.yml +24 -20
  24. data/test/fixtures/quaderno_cassettes/found_expense.yml +22 -20
  25. data/test/fixtures/quaderno_cassettes/found_invoice.yml +34 -20
  26. data/test/fixtures/quaderno_cassettes/found_item.yml +81 -0
  27. data/test/fixtures/quaderno_cassettes/new_contact.yml +10 -12
  28. data/test/fixtures/quaderno_cassettes/new_estimate.yml +63 -25
  29. data/test/fixtures/quaderno_cassettes/new_expense.yml +77 -35
  30. data/test/fixtures/quaderno_cassettes/new_invoice.yml +63 -25
  31. data/test/fixtures/quaderno_cassettes/new_item.yml +42 -0
  32. data/test/fixtures/quaderno_cassettes/paid_expense.yml +25 -23
  33. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +36 -24
  34. data/test/fixtures/quaderno_cassettes/rate_limit.yml +6 -8
  35. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +32 -30
  36. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +43 -30
  37. data/test/fixtures/quaderno_cassettes/updated_contact.yml +22 -22
  38. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +100 -21
  39. data/test/fixtures/quaderno_cassettes/updated_expense.yml +99 -20
  40. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +100 -21
  41. data/test/fixtures/quaderno_cassettes/updated_item.yml +81 -0
  42. data/test/unit/test_quaderno_contacts.rb +5 -4
  43. data/test/unit/test_quaderno_estimates.rb +37 -9
  44. data/test/unit/test_quaderno_expenses.rb +38 -14
  45. data/test/unit/test_quaderno_invoices.rb +40 -12
  46. data/test/unit/test_quaderno_items.rb +82 -0
  47. metadata +12 -4
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/contacts.json
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/contacts.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
12
  response:
13
13
  status:
14
14
  code: 200
@@ -17,71 +17,109 @@ http_interactions:
17
17
  x-ratelimit-limit:
18
18
  - '1000'
19
19
  x-ratelimit-remaining:
20
- - '981'
20
+ - '853'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"6256b44327f6cf39d0add7e666b7be78"'
26
+ - ! '"d251a198e8a45af2dac75b448e48bbce"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
29
  x-request-id:
30
- - 7af1ef795b3a909140a55a1f8e0389b7
30
+ - 91db6322200bd2ebeb300076e56c5c94
31
31
  x-runtime:
32
- - '0.088016'
33
- content-length:
34
- - '4527'
32
+ - '0.141534'
35
33
  connection:
36
34
  - close
37
35
  server:
38
36
  - thin 1.5.0 codename Knife
39
37
  body:
40
38
  encoding: US-ASCII
41
- string: ! '[{"id":"50a23cb22f412eae4f000003","kind":"company","full_name":"100-499","contact_name":"","street_line_1":"Evergreen
42
- Terrace","street_line_2":"","postal_code":"K0A 1B0","city":"Springfield","region":"Canada","country":"CA","phone_1":"3447277","phone_2":"3447277","fax":"","email":"vidadelaempresa@gmail.com","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50a23cb22f412eae4f000003"},{"id":"50a0d1eb2f412e58a700000b","kind":"company","full_name":"ACME","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0d1eb2f412e58a700000b"},{"id":"50a21c9e2f412e1a68000026","kind":"company","full_name":"Test_OCP","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50a21c9e2f412e1a68000026"},{"id":"50a0f5612f412ef720000019","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":"Evergreen
43
- Terrace","street_line_2":"","postal_code":"K0A 1B0","city":"Springfield","region":"Canada","country":"CA","phone_1":"3447277","phone_2":null,"fax":null,"email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"ES","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0f5612f412ef720000019"},{"id":"50aa3de82f412ec2ab000014","kind":"person","first_name":"Test_OCP","last_name":"","full_name":"Test_OCP","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50aa3de82f412ec2ab000014"},{"id":"50aa3e162f412ec2ab000019","kind":"company","full_name":"Test_OCP","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50aa3e162f412ec2ab000019"},{"id":"50a21bf72f412e1a68000017","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a21bf72f412e1a68000017"},{"id":"50a0d2e82f412e15bf000004","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50a0d2e82f412e15bf000004"},{"id":"50acb2b72f412eda52000041","kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50acb2b72f412eda52000041"},{"id":"50acc9842f412eda52000068","kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/50acc9842f412eda52000068"},{"id":"50acb16e2f412eda5200003e","kind":"person","first_name":"Zed","last_name":"","full_name":"Zed","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"US","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/50acb16e2f412eda5200003e"}]'
39
+ string: ! '[{"id":3,"kind":"company","full_name":"100-499","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/3"},{"id":6,"kind":"company","full_name":"ACME","contact_name":"","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/6"},{"id":1,"kind":"company","full_name":"Recrea
40
+ Systems, SLU","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":"info@recreahq.com","web":null,"discount":null,"tax_id":"B35635648","bank_account":null,"language":"ES","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/1"},{"id":5,"kind":"company","full_name":"Stark
41
+ Industries","contact_name":"Tony","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/5"},{"id":2,"kind":"company","full_name":"Test_OCP","contact_name":"","street_line_1":"C/Bernardo
42
+ de la Torre n\u00ba 104","street_line_2":"apartamento 201","postal_code":"35007","city":"Las
43
+ Palmas de Gran Canaria","region":"Las Palmas","country":"ES","phone_1":"653157684","phone_2":"653157684","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/2"},{"id":7,"kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/7"},{"id":4,"kind":"person","first_name":"Test_OCP","last_name":"Doe","full_name":"Test_OCP
44
+ Doe","street_line_1":"Bernardo de la Torre 104","street_line_2":"","postal_code":"35007","city":"Las
45
+ Palmas de Gran Canaria","region":"Las Palmas","country":"ES","phone_1":"653157684","phone_2":"653157684","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/4"},{"id":12,"kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/12"},{"id":15,"kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/15"},{"id":8,"kind":"company","full_name":"Toby","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/8"}]'
44
46
  http_version: '1.1'
45
- recorded_at: Thu, 22 Nov 2012 11:27:23 GMT
47
+ recorded_at: Tue, 14 May 2013 10:48:51 GMT
46
48
  - request:
47
49
  method: post
48
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices.json
50
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/invoices.json
49
51
  body:
50
52
  encoding: US-ASCII
51
- string: contact_id=50a23cb22f412eae4f000003&contact_name=100-499&currency=EUR&items[][description]=Aircraft&items[][quantity]=1.0&items[][unit_price]=0.0&tags=tnt&payment_details=&notes=
53
+ string: contact_id=3&contact_name=100-499&currency=EUR&items_attributes[][description]=Aircraft&items_attributes[][quantity]=1.0&items_attributes[][unit_price]=0.0&tags=tnt&payment_details=&notes=
52
54
  headers:
53
55
  authorization:
54
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
56
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
55
57
  response:
56
58
  status:
57
- code: 200
58
- message: OK
59
+ code: 201
60
+ message: Created
59
61
  headers:
60
62
  x-ratelimit-limit:
61
63
  - '1000'
62
64
  x-ratelimit-remaining:
63
- - '980'
65
+ - '852'
64
66
  content-type:
65
67
  - application/json; charset=utf-8
66
68
  x-ua-compatible:
67
69
  - IE=Edge
68
70
  etag:
69
- - ! '"7e2e7660df3db20338ca9e36d92605ce"'
71
+ - ! '"647ab2d1790b97870cf47cd1acc763da"'
70
72
  cache-control:
71
73
  - max-age=0, private, must-revalidate
72
74
  x-request-id:
73
- - 4c2c31a749938647b0f74121edcd2668
75
+ - 80eaa51c785bed6afe6a33979d64e1c3
74
76
  x-runtime:
75
- - '0.078578'
76
- content-length:
77
- - '672'
77
+ - '0.515162'
78
78
  connection:
79
79
  - close
80
80
  server:
81
81
  - thin 1.5.0 codename Knife
82
82
  body:
83
83
  encoding: US-ASCII
84
- string: ! '{"id":"50ae0c1b2f412eeb20000003","number":"0000009","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","url":"http://localhost:3000/recrea/api/v1/invoices/50ae0c1b2f412eeb20000003.json"}'
84
+ string: ! '{"id":175,"number":"Especial 2o","issue_date":"2013-05-14","contact":{"id":3,"full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/88a5685c1becceef3d60dba1d04cffe270c8501a","url":"http://localhost:3000/recrea/api/v1/invoices/175.json"}'
85
+ http_version: '1.1'
86
+ recorded_at: Tue, 14 May 2013 10:48:52 GMT
87
+ - request:
88
+ method: delete
89
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/invoices/175.json
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ authorization:
95
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
96
+ response:
97
+ status:
98
+ code: 204
99
+ message: No Content
100
+ headers:
101
+ x-ratelimit-limit:
102
+ - '1000'
103
+ x-ratelimit-remaining:
104
+ - '851'
105
+ x-ua-compatible:
106
+ - IE=Edge
107
+ cache-control:
108
+ - no-cache
109
+ set-cookie:
110
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTgxYzhmOGFjN2UzNTMyZGU3YmZiYzA5NDBkMjBlNTAwBjsAVA%3D%3D--e2550a25f54092eabdd012011bdf91e0ac2837f6;
111
+ path=/; HttpOnly
112
+ x-request-id:
113
+ - 530553c06fa88d8b4dacb17cbc53b427
114
+ x-runtime:
115
+ - '0.393908'
116
+ connection:
117
+ - close
118
+ server:
119
+ - thin 1.5.0 codename Knife
120
+ body:
121
+ encoding: US-ASCII
122
+ string: ''
85
123
  http_version: '1.1'
86
- recorded_at: Thu, 22 Nov 2012 11:27:23 GMT
124
+ recorded_at: Tue, 14 May 2013 10:48:52 GMT
87
125
  recorded_with: VCR 2.3.0
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/items.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: code=000000&name=Test_Skynet&unit_cost=21.0
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '834'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"5f370de0875ee4a55bb8774576cf5847"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ x-request-id:
30
+ - 6dd6f016a7006e210897c68a8d3a3b41
31
+ x-runtime:
32
+ - '0.590143'
33
+ connection:
34
+ - close
35
+ server:
36
+ - thin 1.5.0 codename Knife
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '{"id":22,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","url":"http://localhost:3000/recrea/api/v1/items/22"}'
40
+ http_version: '1.1'
41
+ recorded_at: Tue, 14 May 2013 10:49:13 GMT
42
+ recorded_with: VCR 2.3.0
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/expenses.json
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/expenses.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
12
  response:
13
13
  status:
14
14
  code: 200
@@ -17,69 +17,71 @@ http_interactions:
17
17
  x-ratelimit-limit:
18
18
  - '1000'
19
19
  x-ratelimit-remaining:
20
- - '999'
20
+ - '875'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"94305b70697d0d66c7f31743db89d583"'
26
+ - ! '"0aa745f9657d87b1dc99e77d5edd000e"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
29
  x-request-id:
30
- - a1d9b7907c17b6bc316047a3325fa6e4
30
+ - d236cf020871a09f2bb763794da911c2
31
31
  x-runtime:
32
- - '0.670575'
33
- content-length:
34
- - '7055'
32
+ - '0.943009'
35
33
  connection:
36
34
  - close
37
35
  server:
38
36
  - thin 1.5.0 codename Knife
39
37
  body:
40
38
  encoding: US-ASCII
41
- string: ! '[{"id":"50adf88a2f412ec28100005a","number":"0003","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":"","currency":"EUR","items":[{"description":"fyfjhj","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":"","tax_2_name":"","tax_2_rate":"","subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":"50adfb422f412ec281000062","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfb422f412ec281000062.json"},{"id":"50adfc9c2f412ec28100006a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfc9c2f412ec28100006a.json"},{"id":"50adfd232f412ec281000072","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfd232f412ec281000072.json"},{"id":"50adfe012f412ec28100007a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe012f412ec28100007a.json"},{"id":"50adfe382f412ec281000082","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfe382f412ec281000082.json"},{"id":"50adfec72f412ec28100008a","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50adfec72f412ec28100008a.json"},{"id":"50ae001e2f412ec281000093","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae001e2f412ec281000093.json"},{"id":"50ae01172f412ec28100009c","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae01172f412ec28100009c.json"},{"id":"50ae07652f412ec2810000d8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07652f412ec2810000d8.json"},{"id":"50ae07bf2f412ec2810000e0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07bf2f412ec2810000e0.json"},{"id":"50ae07f42f412ec2810000e8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae07f42f412ec2810000e8.json"},{"id":"50ae086e2f412ec2810000f0","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae086e2f412ec2810000f0.json"},{"id":"50ae08e42f412ec2810000f8","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae08e42f412ec2810000f8.json"},{"id":"50ae092e2f412ec281000100","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae092e2f412ec281000100.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a.json"},{"id":"50adf26b2f412ec28100002a","number":"2","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":"50adf3562f412ec281000030","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3562f412ec281000030.json"},{"id":"50adf3582f412ec281000035","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3582f412ec281000035.json"},{"id":"50adf3902f412ec281000037","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf3902f412ec281000037.json"},{"id":"50adf4372f412ec28100003e","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf4372f412ec28100003e.json"},{"id":"50adf49a2f412ec281000045","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf49a2f412ec281000045.json"},{"id":"50adf6d62f412ec28100004c","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf6d62f412ec28100004c.json"},{"id":"50adf8552f412ec281000053","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a/payments/50adf8552f412ec281000053.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adf26b2f412ec28100002a.json"},{"id":"50adeefe2f412ec28100000b","number":"002","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":"","currency":"USD","items":[{"description":"mamamama","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":"","tax_2_name":"","tax_2_rate":"","subtotal":"$0.00","discount":"$0.00","gross_amount":"$0.00"}],"subtotal":"$0.00","discount":"$0.00","taxes":[],"total":"$0.00","payments":[{"id":"50adef1e2f412ec28100000e","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b/payments/50adef1e2f412ec28100000e.json"},{"id":"50adf26b2f412ec281000028","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b/payments/50adf26b2f412ec281000028.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/50adeefe2f412ec28100000b.json"}]'
39
+ string: ! '[{"id":156,"number":null,"issue_date":"2013-05-14","contact":{"id":3,"full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":5,"date":"2013-05-14","payment_method":"cash","amount":"\u20ac10,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/156/payments/5.json"},{"id":7,"date":"2013-05-14","payment_method":"cash","amount":"\u20ac10,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/156/payments/7.json"}],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/156.json"},{"id":159,"number":null,"issue_date":"2013-05-14","contact":{"id":3,"full_name":"100-499"},"po_number":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/159.json"},{"id":162,"number":null,"issue_date":"2013-05-14","contact":{"id":3,"full_name":"100-499"},"po_number":null,"currency":"USD","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"$0.00","discount":"$0.00","gross_amount":"$0.00"}],"subtotal":"$0.00","discount":"$0.00","taxes":[],"total":"$0.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/162.json"},{"id":16,"number":null,"issue_date":"2013-04-25","contact":{"id":1,"full_name":"Recrea
40
+ Systems, SLU"},"po_number":"","currency":"EUR","items":[{"description":"Algo","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/16.json"},{"id":25,"number":null,"issue_date":"2013-04-24","contact":{"id":4,"full_name":"Test_OCP
41
+ Doe"},"po_number":"","currency":"EUR","items":[{"description":"Esta\u00f1o","quantity":"1.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac5.00","discount":"\u20ac0.00","gross_amount":"\u20ac5.00"}],"subtotal":"\u20ac5.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac5.00","payments":[{"id":4,"date":"2013-04-24","payment_method":"credit_card","amount":"\u20ac5.00","url":"http://localhost:3000/recrea/api/v1/expenses/25/payments/4.json"}],"tags":[],"notes":"","state":"paid","url":"http://localhost:3000/recrea/api/v1/expenses/25.json"},{"id":27,"number":null,"issue_date":"2013-04-24","contact":{"id":4,"full_name":"Test_OCP
42
+ Doe"},"po_number":"","currency":"EUR","items":[{"description":"Mercurio para
43
+ beber","quantity":"1.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac5.00","discount":"\u20ac0.00","gross_amount":"\u20ac5.00"}],"subtotal":"\u20ac5.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac5.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/27.json"},{"id":28,"number":null,"issue_date":"2013-04-24","contact":{"id":1,"full_name":"Recrea
44
+ Systems, SLU"},"po_number":"","currency":"EUR","items":[{"description":"Mercurio
45
+ para beber","quantity":"1.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac5.00","discount":"\u20ac0.00","gross_amount":"\u20ac5.00"}],"subtotal":"\u20ac5.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac5.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/28.json"},{"id":26,"number":null,"issue_date":"2013-03-24","contact":{"id":8,"full_name":"Toby"},"po_number":"","currency":"EUR","items":[{"description":"Cobre","quantity":"1.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac5.00","discount":"\u20ac0.00","gross_amount":"\u20ac5.00"}],"subtotal":"\u20ac5.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac5.00","payments":[],"tags":[],"notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/expenses/26.json"}]'
42
46
  http_version: '1.1'
43
- recorded_at: Thu, 22 Nov 2012 11:23:35 GMT
47
+ recorded_at: Tue, 14 May 2013 10:48:12 GMT
44
48
  - request:
45
49
  method: post
46
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments.json
50
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/expenses/156/payments.json
47
51
  body:
48
52
  encoding: US-ASCII
49
- string: payment_method=cash&number=100000000
53
+ string: payment_method=cash&amount=10000
50
54
  headers:
51
55
  authorization:
52
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
56
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
53
57
  response:
54
58
  status:
55
- code: 200
56
- message: OK
59
+ code: 201
60
+ message: Created
57
61
  headers:
58
62
  x-ratelimit-limit:
59
63
  - '1000'
60
64
  x-ratelimit-remaining:
61
- - '998'
65
+ - '874'
62
66
  content-type:
63
67
  - application/json; charset=utf-8
64
68
  x-ua-compatible:
65
69
  - IE=Edge
66
70
  etag:
67
- - ! '"897ed40aae22880713186feaf583e9ce"'
71
+ - ! '"f09d1da083b3ca75d3a59f84b7e7acf3"'
68
72
  cache-control:
69
73
  - max-age=0, private, must-revalidate
70
74
  x-request-id:
71
- - d47a56967b4627607b7820a02ef06006
75
+ - f2295987982a98b0a75db21df67cf677
72
76
  x-runtime:
73
- - '0.437252'
74
- content-length:
75
- - '226'
77
+ - '0.446375'
76
78
  connection:
77
79
  - close
78
80
  server:
79
81
  - thin 1.5.0 codename Knife
80
82
  body:
81
83
  encoding: US-ASCII
82
- string: ! '{"id":"50ae0b382f412ec281000107","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/50adf88a2f412ec28100005a/payments/50ae0b382f412ec281000107.json"}'
84
+ string: ! '{"id":11,"date":"2013-05-14","payment_method":"cash","amount":"\u20ac10,000.00","url":"http://localhost:3000/recrea/api/v1/expenses/156/payments/11.json"}'
83
85
  http_version: '1.1'
84
- recorded_at: Thu, 22 Nov 2012 11:23:36 GMT
86
+ recorded_at: Tue, 14 May 2013 10:48:12 GMT
85
87
  recorded_with: VCR 2.3.0
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices.json
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/invoices.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
12
  response:
13
13
  status:
14
14
  code: 200
@@ -17,70 +17,82 @@ http_interactions:
17
17
  x-ratelimit-limit:
18
18
  - '1000'
19
19
  x-ratelimit-remaining:
20
- - '983'
20
+ - '855'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"fe442d03b42673de37d2306e74595551"'
26
+ - ! '"ae878524ccbcae37e1f69bfff6cf9450"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
29
  x-request-id:
30
- - c0f6c4995e866d1bfc516de39ff97357
30
+ - 79809ac9f96d61cbdfddf0dbc661c85f
31
31
  x-runtime:
32
- - '1.041396'
33
- content-length:
34
- - '708'
32
+ - '1.784136'
35
33
  connection:
36
34
  - close
37
35
  server:
38
36
  - thin 1.5.0 codename Knife
39
37
  body:
40
38
  encoding: US-ASCII
41
- string: ! '[{"id":"50ae02c62f412ec2810000cd","number":"0000008","issue_date":"2012-11-22","contact":{"id":"50a23cb22f412eae4f000003","full_name":"100-499"},"po_number":null,"due_date":null,"currency":"EUR","items":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"Show
42
- me the moneeeeeeeyy!!!!","notes":"","state":"outstanding","url":"http://localhost:3000/recrea/api/v1/invoices/50ae02c62f412ec2810000cd.json"}]'
39
+ string: ! '[{"id":145,"number":"Especial 2n","issue_date":"2013-05-13","contact":{"id":4,"full_name":"Test_OCP
40
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Argo","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[{"id":9,"date":"2013-05-14","payment_method":"cash","amount":"\u20ac21,474,836.47","url":"http://localhost:3000/recrea/api/v1/invoices/145/payments/9.json"}],"tags":[],"payment_details":"","notes":"","state":"sent","permalink":"http://localhost:3000/invoice/fbdd4529b5d28bff9df7447cb1dcf7688c0667ad","url":"http://localhost:3000/recrea/api/v1/invoices/145.json"},{"id":144,"number":"Especial
41
+ 1","issue_date":"2013-05-13","contact":{"id":4,"full_name":"Test_OCP Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Argo","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/40453f9f6a2b8e40ad656e7c944164506b453697","url":"http://localhost:3000/recrea/api/v1/invoices/144.json"},{"id":143,"number":"Especial","issue_date":"2013-05-13","contact":{"id":4,"full_name":"Test_OCP
42
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Esto
43
+ es una prueba","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/51f2bdaafd44f519bc62a48022373b33c3ce1a82","url":"http://localhost:3000/recrea/api/v1/invoices/143.json"},{"id":142,"number":"Albar\u00e1n","issue_date":"2013-05-13","contact":{"id":4,"full_name":"Test_OCP
44
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Argo","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/1e71c9841124cb281cb03285eeb5ffb598cf0a7d","url":"http://localhost:3000/recrea/api/v1/invoices/142.json"},{"id":36,"number":"0000015","issue_date":"2013-05-07","contact":{"id":4,"full_name":"Test_OCP
45
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Fruta
46
+ confitada extinta","quantity":"1.0","unit_price":"1020.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac1,020.00","discount":"\u20ac0.00","gross_amount":"\u20ac1,020.00"}],"subtotal":"\u20ac1,020.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac1,020.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/c0459b81a77dbf8ee70a154043620a7a746c28dc","url":"http://localhost:3000/recrea/api/v1/invoices/36.json"},{"id":34,"number":"0000014","issue_date":"2013-05-03","contact":{"id":1,"full_name":"Recrea
47
+ Systems, SLU"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Algo","quantity":"1.0","unit_price":"33.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac33.00","discount":"\u20ac0.00","gross_amount":"\u20ac33.00"}],"subtotal":"\u20ac33.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac33.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/1cb73ebbd8edfa4b56de4b48f8207b9d46f0e8ea","url":"http://localhost:3000/recrea/api/v1/invoices/34.json"},{"id":33,"number":"0000013","issue_date":"2013-04-25","contact":{"id":2,"full_name":"Test_OCP"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"500.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac500.00","discount":"\u20ac0.00","gross_amount":"\u20ac500.00"}],"subtotal":"\u20ac500.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac500.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/7abb69050e67dcb9193f1b0d7adabb4ab41a9369","url":"http://localhost:3000/recrea/api/v1/invoices/33.json"},{"id":6,"number":"0000006","issue_date":"2013-04-25","contact":{"id":5,"full_name":"Stark
48
+ Industries"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"1.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac1.00","discount":"\u20ac0.00","gross_amount":"\u20ac1.00"}],"subtotal":"\u20ac1.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac1.00","payments":[{"id":2,"date":"2013-04-25","payment_method":"credit_card","amount":"\u20ac1.00","url":"http://localhost:3000/recrea/api/v1/invoices/6/payments/2.json"}],"tags":[],"payment_details":"","notes":"","state":"paid","permalink":"http://localhost:3000/invoice/424dee0dee657ea34e1d7986e0e61d2aa819d3ca","url":"http://localhost:3000/recrea/api/v1/invoices/6.json"},{"id":5,"number":"0000005","issue_date":"2013-04-25","contact":{"id":6,"full_name":"ACME"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"500.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac500.00","discount":"\u20ac0.00","gross_amount":"\u20ac500.00"}],"subtotal":"\u20ac500.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac500.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/743ce168d9f722ce3c76bbe11d4fdf71023595c1","url":"http://localhost:3000/recrea/api/v1/invoices/5.json"},{"id":4,"number":"0000004","issue_date":"2013-04-25","contact":{"id":5,"full_name":"Stark
49
+ Industries"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/60004740156eeaa8eb30557e3e00de4114665214","url":"http://localhost:3000/recrea/api/v1/invoices/4.json"},{"id":3,"number":"0000003","issue_date":"2013-04-25","contact":{"id":2,"full_name":"Test_OCP"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"300.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac300.00","discount":"\u20ac0.00","gross_amount":"\u20ac300.00"}],"subtotal":"\u20ac300.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac300.00","payments":[{"id":1,"date":"2013-04-25","payment_method":"credit_card","amount":"\u20ac200.00","url":"http://localhost:3000/recrea/api/v1/invoices/3/payments/1.json"}],"tags":[],"payment_details":"","notes":"","state":"partial","permalink":"http://localhost:3000/invoice/f79f2bbf9cc77a4ed40cadbe6a28bfccd7434f59","url":"http://localhost:3000/recrea/api/v1/invoices/3.json"},{"id":2,"number":"0000002","issue_date":"2013-04-25","contact":{"id":1,"full_name":"Recrea
50
+ Systems, SLU"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/000b601d72e4746709615cfde2dda5d00d6cd96c","url":"http://localhost:3000/recrea/api/v1/invoices/2.json"},{"id":1,"number":"0000001","issue_date":"2013-04-25","contact":{"id":4,"full_name":"Test_OCP
51
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/4591356c9941530887dfa0bf64d70e3182a0e17f","url":"http://localhost:3000/recrea/api/v1/invoices/1.json"},{"id":23,"number":"0000011","issue_date":"2013-04-24","contact":{"id":4,"full_name":"Test_OCP
52
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Tarta
53
+ de fresa","quantity":"1.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac5.00","discount":"\u20ac0.00","gross_amount":"\u20ac5.00"}],"subtotal":"\u20ac5.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac5.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/cde1cd7fec93f0c7f161cd2652e80366ac82f6f2","url":"http://localhost:3000/recrea/api/v1/invoices/23.json"},{"id":20,"number":"0000010","issue_date":"2013-04-24","contact":{"id":4,"full_name":"Test_OCP
54
+ Doe"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Tarta","quantity":"1.0","unit_price":"10.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac10.00","discount":"\u20ac0.00","gross_amount":"\u20ac10.00"}],"subtotal":"\u20ac10.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac10.00","payments":[{"id":3,"date":"2013-04-24","payment_method":"credit_card","amount":"\u20ac10.00","url":"http://localhost:3000/recrea/api/v1/invoices/20/payments/3.json"}],"tags":[],"payment_details":"","notes":"","state":"paid","permalink":"http://localhost:3000/invoice/a734db784992e0d6a338950747596c4a7b49cf4a","url":"http://localhost:3000/recrea/api/v1/invoices/20.json"},{"id":18,"number":"0000008","issue_date":"2013-04-24","contact":{"id":1,"full_name":"Recrea
55
+ Systems, SLU"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Pizza","quantity":"1.0","unit_price":"20.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac20.00","discount":"\u20ac0.00","gross_amount":"\u20ac20.00"}],"subtotal":"\u20ac20.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac20.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/8cdeb9921a94dab43ec8085c10f0f2f640433b9e","url":"http://localhost:3000/recrea/api/v1/invoices/18.json"},{"id":17,"number":"0000007","issue_date":"2013-04-24","contact":{"id":7,"full_name":"Test_OCP"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Hola","quantity":"1.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac0.00","discount":"\u20ac0.00","gross_amount":"\u20ac0.00"}],"subtotal":"\u20ac0.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac0.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/7717368283d6469873012547c9a16755e51bcfa6","url":"http://localhost:3000/recrea/api/v1/invoices/17.json"},{"id":24,"number":"0000012","issue_date":"2013-03-24","contact":{"id":5,"full_name":"Stark
56
+ Industries"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"tornillos","quantity":"100.0","unit_price":"5.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac500.00","discount":"\u20ac0.00","gross_amount":"\u20ac500.00"}],"subtotal":"\u20ac500.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac500.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/06bf2c3d7c635925bf41385e7baa411dbab36b4d","url":"http://localhost:3000/recrea/api/v1/invoices/24.json"},{"id":19,"number":"0000009","issue_date":"2013-02-23","contact":{"id":2,"full_name":"Test_OCP"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Tarta","quantity":"1.0","unit_price":"10.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"subtotal":"\u20ac10.00","discount":"\u20ac0.00","gross_amount":"\u20ac10.00"}],"subtotal":"\u20ac10.00","discount":"\u20ac0.00","taxes":[],"total":"\u20ac10.00","payments":[],"tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/invoice/e6511ed82cdcb6eec8d3eac322080fdbe2b8a02e","url":"http://localhost:3000/recrea/api/v1/invoices/19.json"}]'
43
57
  http_version: '1.1'
44
- recorded_at: Thu, 22 Nov 2012 11:27:22 GMT
58
+ recorded_at: Tue, 14 May 2013 10:48:51 GMT
45
59
  - request:
46
60
  method: post
47
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/invoices/50ae02c62f412ec2810000cd/payments.json
61
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/invoices/145/payments.json
48
62
  body:
49
63
  encoding: US-ASCII
50
- string: payment_method=cash&number=100000000
64
+ string: payment_method=cash&amount=100000000
51
65
  headers:
52
66
  authorization:
53
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
67
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
68
  response:
55
69
  status:
56
- code: 200
57
- message: OK
70
+ code: 201
71
+ message: Created
58
72
  headers:
59
73
  x-ratelimit-limit:
60
74
  - '1000'
61
75
  x-ratelimit-remaining:
62
- - '982'
76
+ - '854'
63
77
  content-type:
64
78
  - application/json; charset=utf-8
65
79
  x-ua-compatible:
66
80
  - IE=Edge
67
81
  etag:
68
- - ! '"206d6f4e8881c1c92caeb1086fd5663b"'
82
+ - ! '"620431064d879eae86d8645d8b2cb322"'
69
83
  cache-control:
70
84
  - max-age=0, private, must-revalidate
71
85
  x-request-id:
72
- - 3a3b0c66ac0d4c5eaa4ce711acba99b7
86
+ - e17f879f6d26c8e1cd39b700356658f4
73
87
  x-runtime:
74
- - '0.499512'
75
- content-length:
76
- - '226'
88
+ - '0.416375'
77
89
  connection:
78
90
  - close
79
91
  server:
80
92
  - thin 1.5.0 codename Knife
81
93
  body:
82
94
  encoding: US-ASCII
83
- string: ! '{"id":"50ae0c1b2f412eeb20000001","date":"2012-11-22","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/invoices/50ae02c62f412ec2810000cd/payments/50ae0c1b2f412eeb20000001.json"}'
95
+ string: ! '{"id":13,"date":"2013-05-14","payment_method":"cash","amount":"\u20ac100,000,000.00","url":"http://localhost:3000/recrea/api/v1/invoices/145/payments/13.json"}'
84
96
  http_version: '1.1'
85
- recorded_at: Thu, 22 Nov 2012 11:27:23 GMT
97
+ recorded_at: Tue, 14 May 2013 10:48:51 GMT
86
98
  recorded_with: VCR 2.3.0
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://xiZvifX5hwsxAiymYPk2@localhost:3000/recrea/api/v1/ping.json
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/ping.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic eGladmlmWDVod3N4QWl5bVlQazI6
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
12
  response:
13
13
  status:
14
14
  code: 200
@@ -17,7 +17,7 @@ http_interactions:
17
17
  x-ratelimit-limit:
18
18
  - '1000'
19
19
  x-ratelimit-remaining:
20
- - '447'
20
+ - '894'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
@@ -27,11 +27,9 @@ http_interactions:
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
29
  x-request-id:
30
- - bd5affbcba1c2196be8985c80f6251ca
30
+ - 80c37f15c73f5ae4035211ea15ae8aef
31
31
  x-runtime:
32
- - '0.030080'
33
- content-length:
34
- - '15'
32
+ - '0.072009'
35
33
  connection:
36
34
  - close
37
35
  server:
@@ -40,5 +38,5 @@ http_interactions:
40
38
  encoding: US-ASCII
41
39
  string: ! '{"status":"OK"}'
42
40
  http_version: '1.1'
43
- recorded_at: Thu, 22 Nov 2012 09:37:38 GMT
41
+ recorded_at: Tue, 14 May 2013 10:47:51 GMT
44
42
  recorded_with: VCR 2.3.0