quaderno 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,169 +2,206 @@
|
|
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
|
+
- '1901'
|
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
|
+
- ! '"0caa665340ca3fbfd0127f8d8d146941"'
|
27
31
|
cache-control:
|
28
32
|
- max-age=0, private, must-revalidate
|
29
33
|
x-request-id:
|
30
|
-
-
|
34
|
+
- 47955f60aca17da2717b43f379d4e975
|
31
35
|
x-runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.541702'
|
37
|
+
server:
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
39
|
+
date:
|
40
|
+
- Tue, 04 Feb 2014 14:50:54 GMT
|
41
|
+
content-length:
|
42
|
+
- '2759'
|
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"},{"id":7,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
55
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/7.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
|
56
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Very
|
57
|
+
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
|
58
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"2,230.00 \u20ac"}],"subtotal":"2,230.00
|
59
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-200.70
|
60
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"468.30 \u20ac"}],"total":"2,497.60
|
61
|
+
\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
|
62
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"145.00 \u20ac"}],"subtotal":"145.00
|
63
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-13.05
|
64
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"30.45 \u20ac"}],"total":"162.40
|
65
|
+
\u20ac","payments":[],"notes":"Hello","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/5.json"}]'
|
46
66
|
http_version: '1.1'
|
47
|
-
recorded_at: Tue,
|
67
|
+
recorded_at: Tue, 04 Feb 2014 14:50:54 GMT
|
48
68
|
- request:
|
49
69
|
method: get
|
50
|
-
uri: http://
|
70
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/contacts.json
|
51
71
|
body:
|
52
72
|
encoding: US-ASCII
|
53
73
|
string: ''
|
54
74
|
headers:
|
55
75
|
authorization:
|
56
|
-
- Basic
|
76
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
57
77
|
response:
|
58
78
|
status:
|
59
79
|
code: 200
|
60
|
-
message: OK
|
80
|
+
message: ! 'OK '
|
61
81
|
headers:
|
62
82
|
x-ratelimit-limit:
|
63
|
-
- '
|
83
|
+
- '2000'
|
64
84
|
x-ratelimit-remaining:
|
65
|
-
- '
|
85
|
+
- '1900'
|
86
|
+
x-pages-currentpage:
|
87
|
+
- '1'
|
88
|
+
x-pages-totalpages:
|
89
|
+
- '1'
|
66
90
|
content-type:
|
67
91
|
- application/json; charset=utf-8
|
68
92
|
x-ua-compatible:
|
69
93
|
- IE=Edge
|
70
94
|
etag:
|
71
|
-
- ! '"
|
95
|
+
- ! '"71b79c1b45cfb58a71172c277dd004b5"'
|
72
96
|
cache-control:
|
73
97
|
- max-age=0, private, must-revalidate
|
74
98
|
x-request-id:
|
75
|
-
-
|
99
|
+
- ba4a54090d9bb88267c70d41dab2906a
|
76
100
|
x-runtime:
|
77
|
-
- '0.
|
101
|
+
- '0.161818'
|
102
|
+
server:
|
103
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
104
|
+
date:
|
105
|
+
- Tue, 04 Feb 2014 14:50:54 GMT
|
106
|
+
content-length:
|
107
|
+
- '1879'
|
78
108
|
connection:
|
79
109
|
- close
|
80
|
-
server:
|
81
|
-
- thin 1.5.0 codename Knife
|
82
110
|
body:
|
83
111
|
encoding: US-ASCII
|
84
|
-
string: ! '[{"id":
|
85
|
-
|
86
|
-
|
87
|
-
|
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"}]'
|
112
|
+
string: ! '[{"id":2,"kind":"company","full_name":"Another Test Contact","contact_name":"","street_line_1":"Kamiya
|
113
|
+
Kashin Ryu no Dojo","street_line_2":"","postal_code":"876-0854","city":"Tokyo","region":"Tokyo","country":"JP","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/2"},{"id":1,"kind":"company","full_name":"API
|
114
|
+
Test Contact","contact_name":"","street_line_1":"Evergreen Terrace","street_line_2":"","postal_code":"K0A
|
115
|
+
1B0","city":"Springfield","region":"Canada","country":"ES","phone_1":"","phone_2":"","fax":"","email":"dummy@email.test","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/1"},{"id":4,"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/4"},{"id":6,"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/6"},{"id":3,"kind":"company","full_name":"TSM","contact_name":"Reginald","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"reggie@tsm.com","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/3"}]'
|
91
116
|
http_version: '1.1'
|
92
|
-
recorded_at: Tue,
|
117
|
+
recorded_at: Tue, 04 Feb 2014 14:50:54 GMT
|
93
118
|
- request:
|
94
119
|
method: post
|
95
|
-
uri: http://
|
120
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/expenses.json
|
96
121
|
body:
|
97
122
|
encoding: US-ASCII
|
98
|
-
string: contact_id=
|
123
|
+
string: contact_id=2&contact_name=Another%20Test%20Contact¤cy=EUR&items_attributes[][description]=Aircraft&items_attributes[][quantity]=1.0&items_attributes[][unit_price]=0.0&tags=tnt&payment_details=¬es=
|
99
124
|
headers:
|
100
125
|
authorization:
|
101
|
-
- Basic
|
126
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
102
127
|
response:
|
103
128
|
status:
|
104
129
|
code: 201
|
105
|
-
message: Created
|
130
|
+
message: ! 'Created '
|
106
131
|
headers:
|
107
132
|
x-ratelimit-limit:
|
108
|
-
- '
|
133
|
+
- '2000'
|
109
134
|
x-ratelimit-remaining:
|
110
|
-
- '
|
135
|
+
- '1899'
|
111
136
|
content-type:
|
112
137
|
- application/json; charset=utf-8
|
113
138
|
x-ua-compatible:
|
114
139
|
- IE=Edge
|
115
140
|
etag:
|
116
|
-
- ! '"
|
141
|
+
- ! '"7b9955b919cc73f22f402916831b7258"'
|
117
142
|
cache-control:
|
118
143
|
- max-age=0, private, must-revalidate
|
119
144
|
x-request-id:
|
120
|
-
-
|
145
|
+
- 03c24321b8c9ce39c9ff1952dbf7aa8f
|
121
146
|
x-runtime:
|
122
|
-
- '0.
|
147
|
+
- '0.497389'
|
148
|
+
server:
|
149
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
150
|
+
date:
|
151
|
+
- Tue, 04 Feb 2014 14:50:55 GMT
|
152
|
+
content-length:
|
153
|
+
- '605'
|
123
154
|
connection:
|
124
155
|
- close
|
125
|
-
|
126
|
-
-
|
156
|
+
set-cookie:
|
157
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTVhN2Q3MWY0N2FkMmFhYzg2ZDczY2YyYWRkZDA4YTQyBjsAVA%3D%3D--31f270447238af1a1c684d85eab40952944644d1;
|
158
|
+
path=/; HttpOnly
|
127
159
|
body:
|
128
160
|
encoding: US-ASCII
|
129
|
-
string: ! '{"id":
|
161
|
+
string: ! '{"id":22,"number":null,"issue_date":"2014-02-04","contact":{"id":2,"full_name":"Another
|
162
|
+
Test Contact"},"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,"reference":null,"subtotal":"0.00
|
163
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"0.00 \u20ac"}],"subtotal":"0.00
|
164
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"0.00 \u20ac","payments":[],"notes":"","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/22.json"}'
|
130
165
|
http_version: '1.1'
|
131
|
-
recorded_at: Tue,
|
166
|
+
recorded_at: Tue, 04 Feb 2014 14:50:55 GMT
|
132
167
|
- request:
|
133
168
|
method: delete
|
134
|
-
uri: http://
|
169
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/expenses/22.json
|
135
170
|
body:
|
136
171
|
encoding: US-ASCII
|
137
172
|
string: ''
|
138
173
|
headers:
|
139
174
|
authorization:
|
140
|
-
- Basic
|
175
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
141
176
|
response:
|
142
177
|
status:
|
143
178
|
code: 204
|
144
|
-
message: No Content
|
179
|
+
message: ! 'No Content '
|
145
180
|
headers:
|
146
181
|
x-ratelimit-limit:
|
147
|
-
- '
|
182
|
+
- '2000'
|
148
183
|
x-ratelimit-remaining:
|
149
|
-
- '
|
184
|
+
- '1898'
|
150
185
|
x-ua-compatible:
|
151
186
|
- IE=Edge
|
152
187
|
cache-control:
|
153
188
|
- no-cache
|
154
|
-
set-cookie:
|
155
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFiNDM1OWY3YTRiZWQ0ZDQwZjUzMmYzNGJmZGJmNjFkBjsAVA%3D%3D--2f60f4e0451de26bdf6a674bf55834707dcd0260;
|
156
|
-
path=/; HttpOnly
|
157
189
|
x-request-id:
|
158
|
-
-
|
190
|
+
- 347bf0d3e2bc2046425dae535b53470a
|
159
191
|
x-runtime:
|
160
|
-
- '0.
|
192
|
+
- '0.460193'
|
193
|
+
server:
|
194
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
195
|
+
date:
|
196
|
+
- Tue, 04 Feb 2014 14:50:55 GMT
|
161
197
|
connection:
|
162
198
|
- close
|
163
|
-
|
164
|
-
-
|
199
|
+
set-cookie:
|
200
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTc3Y2E2ZTQ3NWU0YjI4Y2M3ZWI2ZTY4NWRhYmU4MTM0BjsAVA%3D%3D--24d7fd268d05b1793cafaab948180f5171eadbc8;
|
201
|
+
path=/; HttpOnly
|
165
202
|
body:
|
166
203
|
encoding: US-ASCII
|
167
204
|
string: ''
|
168
205
|
http_version: '1.1'
|
169
|
-
recorded_at: Tue,
|
206
|
+
recorded_at: Tue, 04 Feb 2014 14:50:55 GMT
|
170
207
|
recorded_with: VCR 2.3.0
|
@@ -2,124 +2,141 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@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 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
|
+
- '1881'
|
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
|
+
- ! '"71b79c1b45cfb58a71172c277dd004b5"'
|
27
31
|
cache-control:
|
28
32
|
- max-age=0, private, must-revalidate
|
29
33
|
x-request-id:
|
30
|
-
-
|
34
|
+
- dc526359d31c82f535630c7e90692fce
|
31
35
|
x-runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.166930'
|
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
|
+
- '1879'
|
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
|
-
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"}]'
|
47
|
+
string: ! '[{"id":2,"kind":"company","full_name":"Another Test Contact","contact_name":"","street_line_1":"Kamiya
|
48
|
+
Kashin Ryu no Dojo","street_line_2":"","postal_code":"876-0854","city":"Tokyo","region":"Tokyo","country":"JP","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/2"},{"id":1,"kind":"company","full_name":"API
|
49
|
+
Test Contact","contact_name":"","street_line_1":"Evergreen Terrace","street_line_2":"","postal_code":"K0A
|
50
|
+
1B0","city":"Springfield","region":"Canada","country":"ES","phone_1":"","phone_2":"","fax":"","email":"dummy@email.test","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/1"},{"id":4,"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/4"},{"id":6,"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/6"},{"id":3,"kind":"company","full_name":"TSM","contact_name":"Reginald","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"reggie@tsm.com","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/3"}]'
|
46
51
|
http_version: '1.1'
|
47
|
-
recorded_at: Tue,
|
52
|
+
recorded_at: Tue, 04 Feb 2014 14:52:01 GMT
|
48
53
|
- request:
|
49
54
|
method: post
|
50
|
-
uri: http://
|
55
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/invoices.json
|
51
56
|
body:
|
52
57
|
encoding: US-ASCII
|
53
|
-
string: contact_id=
|
58
|
+
string: contact_id=2&contact_name=Another%20Test%20Contact¤cy=EUR&items_attributes[][description]=Aircraft&items_attributes[][quantity]=1.0&items_attributes[][unit_price]=0.0&tags=tnt&payment_details=¬es=
|
54
59
|
headers:
|
55
60
|
authorization:
|
56
|
-
- Basic
|
61
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
57
62
|
response:
|
58
63
|
status:
|
59
64
|
code: 201
|
60
|
-
message: Created
|
65
|
+
message: ! 'Created '
|
61
66
|
headers:
|
62
67
|
x-ratelimit-limit:
|
63
|
-
- '
|
68
|
+
- '2000'
|
64
69
|
x-ratelimit-remaining:
|
65
|
-
- '
|
70
|
+
- '1880'
|
66
71
|
content-type:
|
67
72
|
- application/json; charset=utf-8
|
68
73
|
x-ua-compatible:
|
69
74
|
- IE=Edge
|
70
75
|
etag:
|
71
|
-
- ! '"
|
76
|
+
- ! '"82034b725bcb1665de21a5595d0acf35"'
|
72
77
|
cache-control:
|
73
78
|
- max-age=0, private, must-revalidate
|
74
79
|
x-request-id:
|
75
|
-
-
|
80
|
+
- ba359c93f2dba8b8439eb30c1cdfc84a
|
76
81
|
x-runtime:
|
77
|
-
- '0.
|
82
|
+
- '0.560384'
|
83
|
+
server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
85
|
+
date:
|
86
|
+
- Tue, 04 Feb 2014 14:52:02 GMT
|
87
|
+
content-length:
|
88
|
+
- '726'
|
78
89
|
connection:
|
79
90
|
- close
|
80
|
-
|
81
|
-
-
|
91
|
+
set-cookie:
|
92
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTU0OTE1MmEyYTI5ZDA3NTc0ZmRkMGYwNWY5ZTdiMzQ0BjsAVA%3D%3D--a30af728f33a39a4c31d6d95957ec77f494dc7b7;
|
93
|
+
path=/; HttpOnly
|
82
94
|
body:
|
83
95
|
encoding: US-ASCII
|
84
|
-
string: ! '{"id":
|
96
|
+
string: ! '{"id":25,"number":"0000004","issue_date":"2014-02-04","contact":{"id":2,"full_name":"Another
|
97
|
+
Test Contact"},"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,"reference":null,"subtotal":"0.00
|
98
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"0.00 \u20ac"}],"subtotal":"0.00
|
99
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"0.00 \u20ac","payments":[],"payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/invoice/6be08bee13894a94e9161d996c633b3841ff4624","url":"http://localhost:3000/recrea/api/v1/invoices/25.json"}'
|
85
100
|
http_version: '1.1'
|
86
|
-
recorded_at: Tue,
|
101
|
+
recorded_at: Tue, 04 Feb 2014 14:52:02 GMT
|
87
102
|
- request:
|
88
103
|
method: delete
|
89
|
-
uri: http://
|
104
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/invoices/25.json
|
90
105
|
body:
|
91
106
|
encoding: US-ASCII
|
92
107
|
string: ''
|
93
108
|
headers:
|
94
109
|
authorization:
|
95
|
-
- Basic
|
110
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
96
111
|
response:
|
97
112
|
status:
|
98
113
|
code: 204
|
99
|
-
message: No Content
|
114
|
+
message: ! 'No Content '
|
100
115
|
headers:
|
101
116
|
x-ratelimit-limit:
|
102
|
-
- '
|
117
|
+
- '2000'
|
103
118
|
x-ratelimit-remaining:
|
104
|
-
- '
|
119
|
+
- '1879'
|
105
120
|
x-ua-compatible:
|
106
121
|
- IE=Edge
|
107
122
|
cache-control:
|
108
123
|
- no-cache
|
109
|
-
set-cookie:
|
110
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTgxYzhmOGFjN2UzNTMyZGU3YmZiYzA5NDBkMjBlNTAwBjsAVA%3D%3D--e2550a25f54092eabdd012011bdf91e0ac2837f6;
|
111
|
-
path=/; HttpOnly
|
112
124
|
x-request-id:
|
113
|
-
-
|
125
|
+
- ce3e2d7cfbc5162cd6d5f1e48bf4b4f3
|
114
126
|
x-runtime:
|
115
|
-
- '0.
|
127
|
+
- '0.480237'
|
128
|
+
server:
|
129
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
130
|
+
date:
|
131
|
+
- Tue, 04 Feb 2014 14:52:02 GMT
|
116
132
|
connection:
|
117
133
|
- close
|
118
|
-
|
119
|
-
-
|
134
|
+
set-cookie:
|
135
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTgwNTZmOWQzYTE3NDMzZjQ4NmIzYWVjZmJhN2Q3MWZiBjsAVA%3D%3D--d25166caa1dd70547eafa06e8aaa561c4792c645;
|
136
|
+
path=/; HttpOnly
|
120
137
|
body:
|
121
138
|
encoding: US-ASCII
|
122
139
|
string: ''
|
123
140
|
http_version: '1.1'
|
124
|
-
recorded_at: Tue,
|
141
|
+
recorded_at: Tue, 04 Feb 2014 14:52:02 GMT
|
125
142
|
recorded_with: VCR 2.3.0
|
@@ -2,41 +2,48 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/items.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: code=000000&name=Test_Skynet&unit_cost=21.0
|
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
|
+
- '1862'
|
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
|
+
- ! '"20022f45ad6a47be1296a2bb0ae7d965"'
|
27
27
|
cache-control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
x-request-id:
|
30
|
-
-
|
30
|
+
- 70573cf566812c993f356878b8041fc3
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.473481'
|
33
|
+
server:
|
34
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
35
|
+
date:
|
36
|
+
- Tue, 04 Feb 2014 14:52:20 GMT
|
37
|
+
content-length:
|
38
|
+
- '116'
|
33
39
|
connection:
|
34
40
|
- close
|
35
|
-
|
36
|
-
-
|
41
|
+
set-cookie:
|
42
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFjOTNlZDA2ZGZjOGNkNGY0NjcwNGIwYzAwMGUxY2ZiBjsAVA%3D%3D--f9f1d28ce2529772f9c808c989cc47ae626206e2;
|
43
|
+
path=/; HttpOnly
|
37
44
|
body:
|
38
45
|
encoding: US-ASCII
|
39
|
-
string: ! '{"id":
|
46
|
+
string: ! '{"id":4,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","url":"http://localhost:3000/recrea/api/v1/items/4"}'
|
40
47
|
http_version: '1.1'
|
41
|
-
recorded_at: Tue,
|
48
|
+
recorded_at: Tue, 04 Feb 2014 14:52:20 GMT
|
42
49
|
recorded_with: VCR 2.3.0
|