quaderno 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/build_install.sh +2 -2
- data/lib/quaderno-ruby/behavior/crud.rb +7 -3
- data/lib/quaderno-ruby/document_item.rb +4 -0
- data/lib/quaderno-ruby/item.rb +6 -2
- data/lib/quaderno-ruby.rb +1 -1
- data/quaderno-1.0.0.gem +0 -0
- data/{quaderno-ruby.gemspec → quaderno.gemspec} +14 -6
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +14 -12
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +14 -10
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +14 -10
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +25 -10
- data/test/fixtures/quaderno_cassettes/all_items.yml +42 -0
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +75 -31
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +74 -27
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +74 -27
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +85 -28
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +119 -0
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +30 -29
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +41 -29
- data/test/fixtures/quaderno_cassettes/found_contact.yml +22 -22
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +24 -20
- data/test/fixtures/quaderno_cassettes/found_expense.yml +22 -20
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +34 -20
- data/test/fixtures/quaderno_cassettes/found_item.yml +81 -0
- data/test/fixtures/quaderno_cassettes/new_contact.yml +10 -12
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +63 -25
- data/test/fixtures/quaderno_cassettes/new_expense.yml +77 -35
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +63 -25
- data/test/fixtures/quaderno_cassettes/new_item.yml +42 -0
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +25 -23
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +36 -24
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +6 -8
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +32 -30
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +43 -30
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +22 -22
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +100 -21
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +99 -20
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +100 -21
- data/test/fixtures/quaderno_cassettes/updated_item.yml +81 -0
- data/test/unit/test_quaderno_contacts.rb +5 -4
- data/test/unit/test_quaderno_estimates.rb +37 -9
- data/test/unit/test_quaderno_expenses.rb +38 -14
- data/test/unit/test_quaderno_invoices.rb +40 -12
- data/test/unit/test_quaderno_items.rb +82 -0
- metadata +12 -4
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/items.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
authorization:
|
11
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
x-ratelimit-limit:
|
18
|
+
- '1000'
|
19
|
+
x-ratelimit-remaining:
|
20
|
+
- '830'
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
x-ua-compatible:
|
24
|
+
- IE=Edge
|
25
|
+
etag:
|
26
|
+
- ! '"a55a5c75cee2f6b8eeca35cec8ed8fe8"'
|
27
|
+
cache-control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
x-request-id:
|
30
|
+
- d60f76c68d807841b62d58404bd8648b
|
31
|
+
x-runtime:
|
32
|
+
- '0.559384'
|
33
|
+
connection:
|
34
|
+
- close
|
35
|
+
server:
|
36
|
+
- thin 1.5.0 codename Knife
|
37
|
+
body:
|
38
|
+
encoding: US-ASCII
|
39
|
+
string: ! '[{"id":4,"code":"00001","name":"Airdrone","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/4"},{"id":6,"code":"XXXXXXXX","name":"byAPI","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/6"},{"id":1,"code":"00001","name":"Test_OCP","unit_cost":"1.0","url":"http://localhost:3000/recrea/api/v1/items/1"},{"id":3,"code":"00001","name":"Test_OCP","unit_cost":"10.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"IRPF","tax_2_rate":-9.0,"url":"http://localhost:3000/recrea/api/v1/items/3"},{"id":5,"code":"FF","name":"Test_OCP","unit_cost":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"IRPF","tax_2_rate":-21.0,"url":"http://localhost:3000/recrea/api/v1/items/5"},{"id":7,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/7"},{"id":8,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/8"},{"id":9,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/9"},{"id":10,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"10.0","url":"http://localhost:3000/recrea/api/v1/items/10"},{"id":11,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"10.0","url":"http://localhost:3000/recrea/api/v1/items/11"},{"id":17,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","url":"http://localhost:3000/recrea/api/v1/items/17"}]'
|
40
|
+
http_version: '1.1'
|
41
|
+
recorded_at: Tue, 14 May 2013 10:49:15 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/items/1.json
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
authorization:
|
50
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
51
|
+
response:
|
52
|
+
status:
|
53
|
+
code: 200
|
54
|
+
message: OK
|
55
|
+
headers:
|
56
|
+
x-ratelimit-limit:
|
57
|
+
- '1000'
|
58
|
+
x-ratelimit-remaining:
|
59
|
+
- '829'
|
60
|
+
content-type:
|
61
|
+
- application/json; charset=utf-8
|
62
|
+
x-ua-compatible:
|
63
|
+
- IE=Edge
|
64
|
+
etag:
|
65
|
+
- ! '"6df0b7ce66846edbad36a13a946d1e24"'
|
66
|
+
cache-control:
|
67
|
+
- max-age=0, private, must-revalidate
|
68
|
+
x-request-id:
|
69
|
+
- a1bf98579b2c4c4bcd3b49492335f90a
|
70
|
+
x-runtime:
|
71
|
+
- '0.111684'
|
72
|
+
connection:
|
73
|
+
- close
|
74
|
+
server:
|
75
|
+
- thin 1.5.0 codename Knife
|
76
|
+
body:
|
77
|
+
encoding: US-ASCII
|
78
|
+
string: ! '{"id":1,"code":"00001","name":"Test_OCP","unit_cost":"1.0","url":"http://localhost:3000/recrea/api/v1/items/1"}'
|
79
|
+
http_version: '1.1'
|
80
|
+
recorded_at: Tue, 14 May 2013 10:49:15 GMT
|
81
|
+
recorded_with: VCR 2.3.0
|
@@ -2,43 +2,41 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://
|
5
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/contacts.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: kind=company&first_name=Test_Skynet&email=my_little%40po.ny
|
9
9
|
headers:
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
12
12
|
response:
|
13
13
|
status:
|
14
|
-
code:
|
15
|
-
message:
|
14
|
+
code: 201
|
15
|
+
message: Created
|
16
16
|
headers:
|
17
17
|
x-ratelimit-limit:
|
18
18
|
- '1000'
|
19
19
|
x-ratelimit-remaining:
|
20
|
-
- '
|
20
|
+
- '901'
|
21
21
|
content-type:
|
22
22
|
- application/json; charset=utf-8
|
23
23
|
x-ua-compatible:
|
24
24
|
- IE=Edge
|
25
25
|
etag:
|
26
|
-
- ! '"
|
26
|
+
- ! '"b70b7b1eeb598f310cf02a0836eb39dd"'
|
27
27
|
cache-control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
x-request-id:
|
30
|
-
-
|
30
|
+
- 2f3d715f1e37585554284e6d3d3ebca9
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
33
|
-
content-length:
|
34
|
-
- '413'
|
32
|
+
- '0.769979'
|
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":
|
39
|
+
string: ! '{"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"}'
|
42
40
|
http_version: '1.1'
|
43
|
-
recorded_at:
|
41
|
+
recorded_at: Tue, 14 May 2013 10:47:49 GMT
|
44
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://
|
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
|
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
|
-
- '
|
20
|
+
- '891'
|
21
21
|
content-type:
|
22
22
|
- application/json; charset=utf-8
|
23
23
|
x-ua-compatible:
|
24
24
|
- IE=Edge
|
25
25
|
etag:
|
26
|
-
- ! '"
|
26
|
+
- ! '"d251a198e8a45af2dac75b448e48bbce"'
|
27
27
|
cache-control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
x-request-id:
|
30
|
-
-
|
30
|
+
- 41f333a0c7e25d92363ecd95598df92e
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
33
|
-
content-length:
|
34
|
-
- '4505'
|
32
|
+
- '0.143150'
|
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":
|
42
|
-
|
43
|
-
|
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:
|
47
|
+
recorded_at: Tue, 14 May 2013 10:47:58 GMT
|
46
48
|
- request:
|
47
49
|
method: post
|
48
|
-
uri: http://
|
50
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/estimates.json
|
49
51
|
body:
|
50
52
|
encoding: US-ASCII
|
51
|
-
string: contact_id=
|
53
|
+
string: contact_id=3&number=test%20number%2042&contact_name=100-499¤cy=EUR&items_attributes[][description]=Aircraft&items_attributes[][quantity]=1.0&items_attributes[][unit_price]=0.0&tags=tnt&payment_details=¬es=
|
52
54
|
headers:
|
53
55
|
authorization:
|
54
|
-
- Basic
|
56
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
55
57
|
response:
|
56
58
|
status:
|
57
|
-
code:
|
58
|
-
message:
|
59
|
+
code: 201
|
60
|
+
message: Created
|
59
61
|
headers:
|
60
62
|
x-ratelimit-limit:
|
61
63
|
- '1000'
|
62
64
|
x-ratelimit-remaining:
|
63
|
-
- '
|
65
|
+
- '890'
|
64
66
|
content-type:
|
65
67
|
- application/json; charset=utf-8
|
66
68
|
x-ua-compatible:
|
67
69
|
- IE=Edge
|
68
70
|
etag:
|
69
|
-
- ! '"
|
71
|
+
- ! '"4cb13c21e470a6cc393e96ad78a03fb5"'
|
70
72
|
cache-control:
|
71
73
|
- max-age=0, private, must-revalidate
|
72
74
|
x-request-id:
|
73
|
-
-
|
75
|
+
- 048c8ad4c5a21b03fae8a209285ba684
|
74
76
|
x-runtime:
|
75
|
-
- '0.
|
76
|
-
content-length:
|
77
|
-
- '643'
|
77
|
+
- '0.489653'
|
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":
|
84
|
+
string: ! '{"id":169,"number":"test number 42","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","tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/615de810948fefda293d02dc927f0ea6e50ae8f8","url":"http://localhost:3000/recrea/api/v1/estimates/169.json"}'
|
85
|
+
http_version: '1.1'
|
86
|
+
recorded_at: Tue, 14 May 2013 10:47:59 GMT
|
87
|
+
- request:
|
88
|
+
method: delete
|
89
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/estimates/169.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
|
+
- '889'
|
105
|
+
x-ua-compatible:
|
106
|
+
- IE=Edge
|
107
|
+
cache-control:
|
108
|
+
- no-cache
|
109
|
+
set-cookie:
|
110
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTJjY2UyOTAyYjY5YWQ0YmY5NmM5NDA4ZmU4ZjExNGZmBjsAVA%3D%3D--2dd1e2e07e8c3425277c3c4fd44e5927317b6f5d;
|
111
|
+
path=/; HttpOnly
|
112
|
+
x-request-id:
|
113
|
+
- 63906e47aa4a685a0ae2a500056d5faf
|
114
|
+
x-runtime:
|
115
|
+
- '0.370236'
|
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:
|
124
|
+
recorded_at: Tue, 14 May 2013 10:47:59 GMT
|
87
125
|
recorded_with: VCR 2.3.0
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
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
|
11
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
12
12
|
response:
|
13
13
|
status:
|
14
14
|
code: 200
|
@@ -17,39 +17,43 @@ http_interactions:
|
|
17
17
|
x-ratelimit-limit:
|
18
18
|
- '1000'
|
19
19
|
x-ratelimit-remaining:
|
20
|
-
- '
|
20
|
+
- '873'
|
21
21
|
content-type:
|
22
22
|
- application/json; charset=utf-8
|
23
23
|
x-ua-compatible:
|
24
24
|
- IE=Edge
|
25
25
|
etag:
|
26
|
-
- ! '"
|
26
|
+
- ! '"0343d45fbd7e9ebd87c36d92a32f7014"'
|
27
27
|
cache-control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
x-request-id:
|
30
|
-
-
|
30
|
+
- 0f2f8a409f8ef466d704d7c52c93077a
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
33
|
-
content-length:
|
34
|
-
- '7282'
|
32
|
+
- '0.820699'
|
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":
|
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"},{"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"}],"tags":[],"notes":"","state":"paid","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:
|
47
|
+
recorded_at: Tue, 14 May 2013 10:48:13 GMT
|
44
48
|
- request:
|
45
49
|
method: get
|
46
|
-
uri: http://
|
50
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/contacts.json
|
47
51
|
body:
|
48
52
|
encoding: US-ASCII
|
49
53
|
string: ''
|
50
54
|
headers:
|
51
55
|
authorization:
|
52
|
-
- Basic
|
56
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
53
57
|
response:
|
54
58
|
status:
|
55
59
|
code: 200
|
@@ -58,71 +62,109 @@ http_interactions:
|
|
58
62
|
x-ratelimit-limit:
|
59
63
|
- '1000'
|
60
64
|
x-ratelimit-remaining:
|
61
|
-
- '
|
65
|
+
- '872'
|
62
66
|
content-type:
|
63
67
|
- application/json; charset=utf-8
|
64
68
|
x-ua-compatible:
|
65
69
|
- IE=Edge
|
66
70
|
etag:
|
67
|
-
- ! '"
|
71
|
+
- ! '"d251a198e8a45af2dac75b448e48bbce"'
|
68
72
|
cache-control:
|
69
73
|
- max-age=0, private, must-revalidate
|
70
74
|
x-request-id:
|
71
|
-
-
|
75
|
+
- d6919e0daa7da7cb303f7f3e9f8475cc
|
72
76
|
x-runtime:
|
73
|
-
- '0.
|
74
|
-
content-length:
|
75
|
-
- '4527'
|
77
|
+
- '0.359784'
|
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":
|
83
|
-
|
84
|
-
|
84
|
+
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
|
85
|
+
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
|
86
|
+
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
|
87
|
+
de la Torre n\u00ba 104","street_line_2":"apartamento 201","postal_code":"35007","city":"Las
|
88
|
+
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
|
89
|
+
Doe","street_line_1":"Bernardo de la Torre 104","street_line_2":"","postal_code":"35007","city":"Las
|
90
|
+
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"}]'
|
85
91
|
http_version: '1.1'
|
86
|
-
recorded_at:
|
92
|
+
recorded_at: Tue, 14 May 2013 10:48:13 GMT
|
87
93
|
- request:
|
88
94
|
method: post
|
89
|
-
uri: http://
|
95
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/expenses.json
|
90
96
|
body:
|
91
97
|
encoding: US-ASCII
|
92
|
-
string:
|
98
|
+
string: contact_id=3&contact_name=100-499¤cy=EUR&items_attributes[][description]=Aircraft&items_attributes[][quantity]=1.0&items_attributes[][unit_price]=0.0&tags=tnt&payment_details=¬es=
|
93
99
|
headers:
|
94
100
|
authorization:
|
95
|
-
- Basic
|
101
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
96
102
|
response:
|
97
103
|
status:
|
98
|
-
code:
|
99
|
-
message:
|
104
|
+
code: 201
|
105
|
+
message: Created
|
100
106
|
headers:
|
101
107
|
x-ratelimit-limit:
|
102
108
|
- '1000'
|
103
109
|
x-ratelimit-remaining:
|
104
|
-
- '
|
110
|
+
- '871'
|
105
111
|
content-type:
|
106
112
|
- application/json; charset=utf-8
|
107
113
|
x-ua-compatible:
|
108
114
|
- IE=Edge
|
109
115
|
etag:
|
110
|
-
- ! '"
|
116
|
+
- ! '"db6a5256ef9416622a6a1f4be2c89b19"'
|
111
117
|
cache-control:
|
112
118
|
- max-age=0, private, must-revalidate
|
113
119
|
x-request-id:
|
114
|
-
-
|
120
|
+
- 343760edd6d748871c9ab0696bd6e13e
|
115
121
|
x-runtime:
|
116
|
-
- '0.
|
117
|
-
content-length:
|
118
|
-
- '635'
|
122
|
+
- '0.440980'
|
119
123
|
connection:
|
120
124
|
- close
|
121
125
|
server:
|
122
126
|
- thin 1.5.0 codename Knife
|
123
127
|
body:
|
124
128
|
encoding: US-ASCII
|
125
|
-
string: ! '{"id":
|
129
|
+
string: ! '{"id":172,"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/172.json"}'
|
130
|
+
http_version: '1.1'
|
131
|
+
recorded_at: Tue, 14 May 2013 10:48:14 GMT
|
132
|
+
- request:
|
133
|
+
method: delete
|
134
|
+
uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/expenses/172.json
|
135
|
+
body:
|
136
|
+
encoding: US-ASCII
|
137
|
+
string: ''
|
138
|
+
headers:
|
139
|
+
authorization:
|
140
|
+
- Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
|
141
|
+
response:
|
142
|
+
status:
|
143
|
+
code: 204
|
144
|
+
message: No Content
|
145
|
+
headers:
|
146
|
+
x-ratelimit-limit:
|
147
|
+
- '1000'
|
148
|
+
x-ratelimit-remaining:
|
149
|
+
- '870'
|
150
|
+
x-ua-compatible:
|
151
|
+
- IE=Edge
|
152
|
+
cache-control:
|
153
|
+
- no-cache
|
154
|
+
set-cookie:
|
155
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFiNDM1OWY3YTRiZWQ0ZDQwZjUzMmYzNGJmZGJmNjFkBjsAVA%3D%3D--2f60f4e0451de26bdf6a674bf55834707dcd0260;
|
156
|
+
path=/; HttpOnly
|
157
|
+
x-request-id:
|
158
|
+
- 689d3d729b1e99aae68b3b585385e501
|
159
|
+
x-runtime:
|
160
|
+
- '0.166684'
|
161
|
+
connection:
|
162
|
+
- close
|
163
|
+
server:
|
164
|
+
- thin 1.5.0 codename Knife
|
165
|
+
body:
|
166
|
+
encoding: US-ASCII
|
167
|
+
string: ''
|
126
168
|
http_version: '1.1'
|
127
|
-
recorded_at:
|
169
|
+
recorded_at: Tue, 14 May 2013 10:48:14 GMT
|
128
170
|
recorded_with: VCR 2.3.0
|