quaderno 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +6 -7
- data/Gemfile.lock +0 -9
- data/README.md +6 -2
- data/VERSION +1 -1
- data/build_install.sh +1 -1
- data/changelog.md +4 -0
- data/lib/quaderno-ruby/base.rb +10 -2
- data/lib/quaderno-ruby/behavior/crud.rb +0 -1
- data/lib/quaderno-ruby.rb +0 -2
- data/quaderno.gemspec +6 -25
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +23 -18
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +35 -18
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +38 -18
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +35 -29
- data/test/fixtures/quaderno_cassettes/all_items.yml +17 -12
- data/test/fixtures/quaderno_cassettes/all_webhooks.yml +84 -68
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +81 -62
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +96 -62
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +99 -62
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +96 -73
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +49 -37
- data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +100 -80
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +66 -45
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +66 -56
- data/test/fixtures/quaderno_cassettes/found_contact.yml +39 -30
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +55 -32
- data/test/fixtures/quaderno_cassettes/found_expense.yml +62 -30
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +58 -42
- data/test/fixtures/quaderno_cassettes/found_item.yml +33 -24
- data/test/fixtures/quaderno_cassettes/found_webhook.yml +50 -40
- data/test/fixtures/quaderno_cassettes/new_contact.yml +19 -12
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +61 -44
- data/test/fixtures/quaderno_cassettes/new_expense.yml +99 -62
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +61 -44
- data/test/fixtures/quaderno_cassettes/new_item.yml +19 -12
- data/test/fixtures/quaderno_cassettes/new_webhook.yml +34 -28
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +57 -30
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +54 -41
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +14 -10
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +73 -43
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +70 -54
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +42 -30
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +84 -57
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +81 -56
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +84 -57
- data/test/fixtures/quaderno_cassettes/updated_item.yml +36 -24
- data/test/fixtures/quaderno_cassettes/updated_webhook.yml +69 -55
- data/test/helper.rb +12 -12
- data/test/unit/test_quaderno_contacts.rb +4 -3
- data/test/unit/test_quaderno_estimates.rb +2 -1
- data/test/unit/test_quaderno_expenses.rb +3 -2
- data/test/unit/test_quaderno_invoices.rb +3 -2
- data/test/unit/test_quaderno_items.rb +4 -3
- data/test/unit/test_quaderno_webhooks.rb +4 -3
- metadata +10 -94
- data/quaderno-1.0.0.gem +0 -0
- data/quaderno-1.1.0.gem +0 -0
- data/quaderno-1.1.2.gem +0 -0
- data/quaderno-1.2.0.gem +0 -0
|
@@ -2,82 +2,88 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: post
|
|
5
|
-
uri: http://
|
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
|
|
6
6
|
body:
|
|
7
7
|
encoding: US-ASCII
|
|
8
8
|
string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
|
|
9
9
|
headers:
|
|
10
10
|
authorization:
|
|
11
|
-
- Basic
|
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
12
12
|
response:
|
|
13
13
|
status:
|
|
14
14
|
code: 201
|
|
15
|
-
message: Created
|
|
15
|
+
message: ! 'Created '
|
|
16
16
|
headers:
|
|
17
17
|
x-ratelimit-limit:
|
|
18
|
-
- '
|
|
18
|
+
- '2000'
|
|
19
19
|
x-ratelimit-remaining:
|
|
20
|
-
- '
|
|
20
|
+
- '1853'
|
|
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
|
+
- ! '"c497b609d0a44ff05618eff01e65ab00"'
|
|
27
27
|
cache-control:
|
|
28
28
|
- max-age=0, private, must-revalidate
|
|
29
|
-
set-cookie:
|
|
30
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWU1NDE1YjY0MjI2NmUxNmVjNzczZjVhMGFmZDUwNjMwBjsAVA%3D%3D--9611b85871f59589cd79994ec031cdd33f562c5c;
|
|
31
|
-
path=/; HttpOnly
|
|
32
29
|
x-request-id:
|
|
33
|
-
-
|
|
30
|
+
- 861cd73fa655061cb906426e7d936d75
|
|
34
31
|
x-runtime:
|
|
35
|
-
- '
|
|
32
|
+
- '3.304371'
|
|
33
|
+
server:
|
|
34
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
35
|
+
date:
|
|
36
|
+
- Tue, 04 Feb 2014 14:53:24 GMT
|
|
37
|
+
content-length:
|
|
38
|
+
- '232'
|
|
36
39
|
connection:
|
|
37
40
|
- close
|
|
38
|
-
|
|
39
|
-
-
|
|
41
|
+
set-cookie:
|
|
42
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWNhZDBmNjQyY2E0MzJiOThkNWMxMzVkYzA2NTVjNTM2BjsAVA%3D%3D--239cf66a6f6fd7c509c5609b7876f0de7e953fb9;
|
|
43
|
+
path=/; HttpOnly
|
|
40
44
|
body:
|
|
41
45
|
encoding: US-ASCII
|
|
42
|
-
string: ! '{"id":
|
|
46
|
+
string: ! '{"id":1,"url":"http://quadernoapp.com","auth_key":"8dMLvYe3NYbFpVkYrBM9gQ","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:23Z","updated_at":"2014-02-04T14:53:23Z"}'
|
|
43
47
|
http_version: '1.1'
|
|
44
|
-
recorded_at:
|
|
48
|
+
recorded_at: Tue, 04 Feb 2014 14:53:24 GMT
|
|
45
49
|
- request:
|
|
46
50
|
method: delete
|
|
47
|
-
uri: http://
|
|
51
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks/1.json
|
|
48
52
|
body:
|
|
49
53
|
encoding: US-ASCII
|
|
50
54
|
string: ''
|
|
51
55
|
headers:
|
|
52
56
|
authorization:
|
|
53
|
-
- Basic
|
|
57
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
54
58
|
response:
|
|
55
59
|
status:
|
|
56
60
|
code: 204
|
|
57
|
-
message: No Content
|
|
61
|
+
message: ! 'No Content '
|
|
58
62
|
headers:
|
|
59
63
|
x-ratelimit-limit:
|
|
60
|
-
- '
|
|
64
|
+
- '2000'
|
|
61
65
|
x-ratelimit-remaining:
|
|
62
|
-
- '
|
|
66
|
+
- '1852'
|
|
63
67
|
x-ua-compatible:
|
|
64
68
|
- IE=Edge
|
|
65
69
|
cache-control:
|
|
66
70
|
- no-cache
|
|
67
|
-
set-cookie:
|
|
68
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJThlODg0ZGYyNzBiOTMxNGE4ZjU2Y2EwZjBhNTMwMDY5BjsAVA%3D%3D--00362c60391e6a23799e3c4d9e545fe687d1c660;
|
|
69
|
-
path=/; HttpOnly
|
|
70
71
|
x-request-id:
|
|
71
|
-
-
|
|
72
|
+
- dfc5672856484be4ab0276394e622cc7
|
|
72
73
|
x-runtime:
|
|
73
|
-
- '0.
|
|
74
|
+
- '0.117808'
|
|
75
|
+
server:
|
|
76
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
77
|
+
date:
|
|
78
|
+
- Tue, 04 Feb 2014 14:53:24 GMT
|
|
74
79
|
connection:
|
|
75
80
|
- close
|
|
76
|
-
|
|
77
|
-
-
|
|
81
|
+
set-cookie:
|
|
82
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA3NWMyNzU1Y2U2YTA5MTMwMmViNmE4MmNmNzBiYmJkBjsAVA%3D%3D--921afbe599493064b3752b3f595fe8ce582f908e;
|
|
83
|
+
path=/; HttpOnly
|
|
78
84
|
body:
|
|
79
85
|
encoding: US-ASCII
|
|
80
86
|
string: ''
|
|
81
87
|
http_version: '1.1'
|
|
82
|
-
recorded_at:
|
|
88
|
+
recorded_at: Tue, 04 Feb 2014 14:53:24 GMT
|
|
83
89
|
recorded_with: VCR 2.3.0
|
|
@@ -2,86 +2,113 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: http://
|
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@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 MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
12
12
|
response:
|
|
13
13
|
status:
|
|
14
14
|
code: 200
|
|
15
|
-
message: OK
|
|
15
|
+
message: ! 'OK '
|
|
16
16
|
headers:
|
|
17
17
|
x-ratelimit-limit:
|
|
18
|
-
- '
|
|
18
|
+
- '2000'
|
|
19
19
|
x-ratelimit-remaining:
|
|
20
|
-
- '
|
|
20
|
+
- '1903'
|
|
21
|
+
x-pages-currentpage:
|
|
22
|
+
- '1'
|
|
23
|
+
x-pages-totalpages:
|
|
24
|
+
- '1'
|
|
21
25
|
content-type:
|
|
22
26
|
- application/json; charset=utf-8
|
|
23
27
|
x-ua-compatible:
|
|
24
28
|
- IE=Edge
|
|
25
29
|
etag:
|
|
26
|
-
- ! '"
|
|
30
|
+
- ! '"80a15ecdb18867e3da0bbedf18328e0a"'
|
|
27
31
|
cache-control:
|
|
28
32
|
- max-age=0, private, must-revalidate
|
|
29
33
|
x-request-id:
|
|
30
|
-
-
|
|
34
|
+
- 5c49291729cdb25d6cc2c11f94f3200d
|
|
31
35
|
x-runtime:
|
|
32
|
-
- '0.
|
|
36
|
+
- '0.505219'
|
|
37
|
+
server:
|
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
39
|
+
date:
|
|
40
|
+
- Tue, 04 Feb 2014 14:50:53 GMT
|
|
41
|
+
content-length:
|
|
42
|
+
- '2607'
|
|
33
43
|
connection:
|
|
34
44
|
- close
|
|
35
|
-
server:
|
|
36
|
-
- thin 1.5.0 codename Knife
|
|
37
45
|
body:
|
|
38
46
|
encoding: US-ASCII
|
|
39
|
-
string: ! '[{"id":
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
string: ! '[{"id":6,"number":null,"issue_date":"2014-05-04","contact":{"id":2,"full_name":"Another
|
|
48
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Honeypots","quantity":"1.3","unit_price":"19.03","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"24.74
|
|
49
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"24.74 \u20ac"}],"subtotal":"24.74
|
|
50
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-2.23
|
|
51
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"5.20 \u20ac"}],"total":"27.71 \u20ac","payments":[{"id":1,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
|
52
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/1.json"},{"id":3,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
|
53
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/3.json"},{"id":5,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
|
54
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/5.json"}],"notes":"Hello","state":"paid","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/6.json"},{"id":4,"number":null,"issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
|
|
55
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Very
|
|
56
|
+
important stuff","quantity":"1.0","unit_price":"2230.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"2,230.00
|
|
57
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"2,230.00 \u20ac"}],"subtotal":"2,230.00
|
|
58
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-200.70
|
|
59
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"468.30 \u20ac"}],"total":"2,497.60
|
|
60
|
+
\u20ac","payments":[],"notes":"Hello","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/4.json"},{"id":5,"number":null,"issue_date":"2014-02-04","contact":{"id":3,"full_name":"TSM"},"po_number":"","currency":"EUR","items":[{"description":"Bombers","quantity":"5.0","unit_price":"29.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"145.00
|
|
61
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"145.00 \u20ac"}],"subtotal":"145.00
|
|
62
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-13.05
|
|
63
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"30.45 \u20ac"}],"total":"162.40
|
|
64
|
+
\u20ac","payments":[],"notes":"Hello","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/5.json"}]'
|
|
46
65
|
http_version: '1.1'
|
|
47
|
-
recorded_at: Tue,
|
|
66
|
+
recorded_at: Tue, 04 Feb 2014 14:50:53 GMT
|
|
48
67
|
- request:
|
|
49
68
|
method: post
|
|
50
|
-
uri: http://
|
|
69
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/expenses/6/payments.json
|
|
51
70
|
body:
|
|
52
71
|
encoding: US-ASCII
|
|
53
72
|
string: payment_method=cash&amount=10000
|
|
54
73
|
headers:
|
|
55
74
|
authorization:
|
|
56
|
-
- Basic
|
|
75
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
57
76
|
response:
|
|
58
77
|
status:
|
|
59
78
|
code: 201
|
|
60
|
-
message: Created
|
|
79
|
+
message: ! 'Created '
|
|
61
80
|
headers:
|
|
62
81
|
x-ratelimit-limit:
|
|
63
|
-
- '
|
|
82
|
+
- '2000'
|
|
64
83
|
x-ratelimit-remaining:
|
|
65
|
-
- '
|
|
84
|
+
- '1902'
|
|
66
85
|
content-type:
|
|
67
86
|
- application/json; charset=utf-8
|
|
68
87
|
x-ua-compatible:
|
|
69
88
|
- IE=Edge
|
|
70
89
|
etag:
|
|
71
|
-
- ! '"
|
|
90
|
+
- ! '"e00deb7cbc99d4748e33d221fd238310"'
|
|
72
91
|
cache-control:
|
|
73
92
|
- max-age=0, private, must-revalidate
|
|
74
93
|
x-request-id:
|
|
75
|
-
-
|
|
94
|
+
- bb483ce10ea8e331d24531133b0a3d5c
|
|
76
95
|
x-runtime:
|
|
77
|
-
- '0.
|
|
96
|
+
- '0.512479'
|
|
97
|
+
server:
|
|
98
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
99
|
+
date:
|
|
100
|
+
- Tue, 04 Feb 2014 14:50:54 GMT
|
|
101
|
+
content-length:
|
|
102
|
+
- '151'
|
|
78
103
|
connection:
|
|
79
104
|
- close
|
|
80
|
-
|
|
81
|
-
-
|
|
105
|
+
set-cookie:
|
|
106
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTI2ODg5ZTBjNGY0NmQwZDg5OTQ1ZjUxMTM3NzQ1ZTRjBjsAVA%3D%3D--c92d4991f4606133764b90ab1359c06c56050b3b;
|
|
107
|
+
path=/; HttpOnly
|
|
82
108
|
body:
|
|
83
109
|
encoding: US-ASCII
|
|
84
|
-
string: ! '{"id":
|
|
110
|
+
string: ! '{"id":7,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
|
111
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/7.json"}'
|
|
85
112
|
http_version: '1.1'
|
|
86
|
-
recorded_at: Tue,
|
|
113
|
+
recorded_at: Tue, 04 Feb 2014 14:50:54 GMT
|
|
87
114
|
recorded_with: VCR 2.3.0
|
|
@@ -2,97 +2,110 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: http://
|
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@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
|
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
12
12
|
response:
|
|
13
13
|
status:
|
|
14
14
|
code: 200
|
|
15
|
-
message: OK
|
|
15
|
+
message: ! 'OK '
|
|
16
16
|
headers:
|
|
17
17
|
x-ratelimit-limit:
|
|
18
|
-
- '
|
|
18
|
+
- '2000'
|
|
19
19
|
x-ratelimit-remaining:
|
|
20
|
-
- '
|
|
20
|
+
- '1883'
|
|
21
|
+
x-pages-currentpage:
|
|
22
|
+
- '1'
|
|
23
|
+
x-pages-totalpages:
|
|
24
|
+
- '1'
|
|
21
25
|
content-type:
|
|
22
26
|
- application/json; charset=utf-8
|
|
23
27
|
x-ua-compatible:
|
|
24
28
|
- IE=Edge
|
|
25
29
|
etag:
|
|
26
|
-
- ! '"
|
|
30
|
+
- ! '"e1f72f3b2eb5c50ad6f8caa652b84bfc"'
|
|
27
31
|
cache-control:
|
|
28
32
|
- max-age=0, private, must-revalidate
|
|
29
33
|
x-request-id:
|
|
30
|
-
-
|
|
34
|
+
- 28f525599a33542caeb0302f63c588ff
|
|
31
35
|
x-runtime:
|
|
32
|
-
- '
|
|
36
|
+
- '0.653297'
|
|
37
|
+
server:
|
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
39
|
+
date:
|
|
40
|
+
- Tue, 04 Feb 2014 14:52:01 GMT
|
|
41
|
+
content-length:
|
|
42
|
+
- '2663'
|
|
33
43
|
connection:
|
|
34
44
|
- close
|
|
35
|
-
server:
|
|
36
|
-
- thin 1.5.0 codename Knife
|
|
37
45
|
body:
|
|
38
46
|
encoding: US-ASCII
|
|
39
|
-
string: ! '[{"id":
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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"}]'
|
|
47
|
+
string: ! '[{"id":3,"number":"0000003","issue_date":"2014-02-04","contact":{"id":2,"full_name":"Another
|
|
48
|
+
Test Contact"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Free
|
|
49
|
+
stuff!","quantity":"200.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"0.00
|
|
50
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"0.00 \u20ac"},{"description":"Pizza
|
|
51
|
+
bagles","quantity":"2.0","unit_price":"15.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"30.00
|
|
52
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"30.00 \u20ac"}],"subtotal":"30.00
|
|
53
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"30.00 \u20ac","payments":[],"payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/invoice/060c7204face21de13e68b33c940b030164a42b1","url":"http://localhost:3000/recrea/api/v1/invoices/3.json"},{"id":2,"number":"0000002","issue_date":"2014-02-04","contact":{"id":3,"full_name":"TSM"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Free
|
|
54
|
+
stuff!","quantity":"200.0","unit_price":"1.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"200.00
|
|
55
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"200.00 \u20ac"}],"subtotal":"200.00
|
|
56
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"200.00 \u20ac","payments":[],"payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/invoice/b59479ddd5e9d2ff72d276a1fd9ead4764343984","url":"http://localhost:3000/recrea/api/v1/invoices/2.json"},{"id":1,"number":"0000001","issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
|
|
57
|
+
Test Contact"},"po_number":"","due_date":null,"currency":"EUR","items":[{"description":"Something","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,"reference":"","subtotal":"10.00
|
|
58
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"10.00 \u20ac"},{"description":"Free
|
|
59
|
+
stuff!","quantity":"200.0","unit_price":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"0.00
|
|
60
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"0.00 \u20ac"}],"subtotal":"10.00
|
|
61
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"10.00 \u20ac","payments":[],"payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/invoice/e8a2610def0bed3cd429f45f9561853d401aa31e","url":"http://localhost:3000/recrea/api/v1/invoices/1.json"}]'
|
|
57
62
|
http_version: '1.1'
|
|
58
|
-
recorded_at: Tue,
|
|
63
|
+
recorded_at: Tue, 04 Feb 2014 14:52:01 GMT
|
|
59
64
|
- request:
|
|
60
65
|
method: post
|
|
61
|
-
uri: http://
|
|
66
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/invoices/3/payments.json
|
|
62
67
|
body:
|
|
63
68
|
encoding: US-ASCII
|
|
64
69
|
string: payment_method=cash&amount=100000000
|
|
65
70
|
headers:
|
|
66
71
|
authorization:
|
|
67
|
-
- Basic
|
|
72
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
68
73
|
response:
|
|
69
74
|
status:
|
|
70
75
|
code: 201
|
|
71
|
-
message: Created
|
|
76
|
+
message: ! 'Created '
|
|
72
77
|
headers:
|
|
73
78
|
x-ratelimit-limit:
|
|
74
|
-
- '
|
|
79
|
+
- '2000'
|
|
75
80
|
x-ratelimit-remaining:
|
|
76
|
-
- '
|
|
81
|
+
- '1882'
|
|
77
82
|
content-type:
|
|
78
83
|
- application/json; charset=utf-8
|
|
79
84
|
x-ua-compatible:
|
|
80
85
|
- IE=Edge
|
|
81
86
|
etag:
|
|
82
|
-
- ! '"
|
|
87
|
+
- ! '"d98b902e898dff5a8fce366d87c24858"'
|
|
83
88
|
cache-control:
|
|
84
89
|
- max-age=0, private, must-revalidate
|
|
85
90
|
x-request-id:
|
|
86
|
-
-
|
|
91
|
+
- bfa6140934f656024eb43cfe1fc4a771
|
|
87
92
|
x-runtime:
|
|
88
|
-
- '0.
|
|
93
|
+
- '0.683296'
|
|
94
|
+
server:
|
|
95
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
96
|
+
date:
|
|
97
|
+
- Tue, 04 Feb 2014 14:52:01 GMT
|
|
98
|
+
content-length:
|
|
99
|
+
- '156'
|
|
89
100
|
connection:
|
|
90
101
|
- close
|
|
91
|
-
|
|
92
|
-
-
|
|
102
|
+
set-cookie:
|
|
103
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTBiYmVhODY5YTQ1MGViZjM5NzUwMWEwMmUwMGNhNjFlBjsAVA%3D%3D--f15c3923c3bed60d60478c96234a1a70bf8b6791;
|
|
104
|
+
path=/; HttpOnly
|
|
93
105
|
body:
|
|
94
106
|
encoding: US-ASCII
|
|
95
|
-
string: ! '{"id":
|
|
107
|
+
string: ! '{"id":9,"date":"2014-02-04","payment_method":"cash","amount":"100,000,000.00
|
|
108
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/invoices/3/payments/9.json"}'
|
|
96
109
|
http_version: '1.1'
|
|
97
|
-
recorded_at: Tue,
|
|
110
|
+
recorded_at: Tue, 04 Feb 2014 14:52:01 GMT
|
|
98
111
|
recorded_with: VCR 2.3.0
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: http://
|
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@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
|
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
|
12
12
|
response:
|
|
13
13
|
status:
|
|
14
14
|
code: 200
|
|
15
|
-
message: OK
|
|
15
|
+
message: ! 'OK '
|
|
16
16
|
headers:
|
|
17
17
|
x-ratelimit-limit:
|
|
18
|
-
- '
|
|
18
|
+
- '2000'
|
|
19
19
|
x-ratelimit-remaining:
|
|
20
|
-
- '
|
|
20
|
+
- '1982'
|
|
21
21
|
content-type:
|
|
22
22
|
- application/json; charset=utf-8
|
|
23
23
|
x-ua-compatible:
|
|
@@ -27,16 +27,20 @@ http_interactions:
|
|
|
27
27
|
cache-control:
|
|
28
28
|
- max-age=0, private, must-revalidate
|
|
29
29
|
x-request-id:
|
|
30
|
-
-
|
|
30
|
+
- 63cdee87fb034d8a46b0b5a816feb096
|
|
31
31
|
x-runtime:
|
|
32
|
-
- '0.
|
|
32
|
+
- '0.047371'
|
|
33
|
+
server:
|
|
34
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
|
35
|
+
date:
|
|
36
|
+
- Tue, 04 Feb 2014 14:39:43 GMT
|
|
37
|
+
content-length:
|
|
38
|
+
- '15'
|
|
33
39
|
connection:
|
|
34
40
|
- close
|
|
35
|
-
server:
|
|
36
|
-
- thin 1.5.0 codename Knife
|
|
37
41
|
body:
|
|
38
42
|
encoding: US-ASCII
|
|
39
43
|
string: ! '{"status":"OK"}'
|
|
40
44
|
http_version: '1.1'
|
|
41
|
-
recorded_at: Tue,
|
|
45
|
+
recorded_at: Tue, 04 Feb 2014 14:39:43 GMT
|
|
42
46
|
recorded_with: VCR 2.3.0
|