quaderno 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/Gemfile +6 -7
  2. data/Gemfile.lock +0 -9
  3. data/README.md +6 -2
  4. data/VERSION +1 -1
  5. data/build_install.sh +1 -1
  6. data/changelog.md +4 -0
  7. data/lib/quaderno-ruby/base.rb +10 -2
  8. data/lib/quaderno-ruby/behavior/crud.rb +0 -1
  9. data/lib/quaderno-ruby.rb +0 -2
  10. data/quaderno.gemspec +6 -25
  11. data/test/fixtures/quaderno_cassettes/all_contacts.yml +23 -18
  12. data/test/fixtures/quaderno_cassettes/all_estimates.yml +35 -18
  13. data/test/fixtures/quaderno_cassettes/all_expenses.yml +38 -18
  14. data/test/fixtures/quaderno_cassettes/all_invoices.yml +35 -29
  15. data/test/fixtures/quaderno_cassettes/all_items.yml +17 -12
  16. data/test/fixtures/quaderno_cassettes/all_webhooks.yml +84 -68
  17. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +81 -62
  18. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +96 -62
  19. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +99 -62
  20. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +96 -73
  21. data/test/fixtures/quaderno_cassettes/deleted_item.yml +49 -37
  22. data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +100 -80
  23. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +66 -45
  24. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +66 -56
  25. data/test/fixtures/quaderno_cassettes/found_contact.yml +39 -30
  26. data/test/fixtures/quaderno_cassettes/found_estimate.yml +55 -32
  27. data/test/fixtures/quaderno_cassettes/found_expense.yml +62 -30
  28. data/test/fixtures/quaderno_cassettes/found_invoice.yml +58 -42
  29. data/test/fixtures/quaderno_cassettes/found_item.yml +33 -24
  30. data/test/fixtures/quaderno_cassettes/found_webhook.yml +50 -40
  31. data/test/fixtures/quaderno_cassettes/new_contact.yml +19 -12
  32. data/test/fixtures/quaderno_cassettes/new_estimate.yml +61 -44
  33. data/test/fixtures/quaderno_cassettes/new_expense.yml +99 -62
  34. data/test/fixtures/quaderno_cassettes/new_invoice.yml +61 -44
  35. data/test/fixtures/quaderno_cassettes/new_item.yml +19 -12
  36. data/test/fixtures/quaderno_cassettes/new_webhook.yml +34 -28
  37. data/test/fixtures/quaderno_cassettes/paid_expense.yml +57 -30
  38. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +54 -41
  39. data/test/fixtures/quaderno_cassettes/rate_limit.yml +14 -10
  40. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +73 -43
  41. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +70 -54
  42. data/test/fixtures/quaderno_cassettes/updated_contact.yml +42 -30
  43. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +84 -57
  44. data/test/fixtures/quaderno_cassettes/updated_expense.yml +81 -56
  45. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +84 -57
  46. data/test/fixtures/quaderno_cassettes/updated_item.yml +36 -24
  47. data/test/fixtures/quaderno_cassettes/updated_webhook.yml +69 -55
  48. data/test/helper.rb +12 -12
  49. data/test/unit/test_quaderno_contacts.rb +4 -3
  50. data/test/unit/test_quaderno_estimates.rb +2 -1
  51. data/test/unit/test_quaderno_expenses.rb +3 -2
  52. data/test/unit/test_quaderno_invoices.rb +3 -2
  53. data/test/unit/test_quaderno_items.rb +4 -3
  54. data/test/unit/test_quaderno_webhooks.rb +4 -3
  55. metadata +10 -94
  56. data/quaderno-1.0.0.gem +0 -0
  57. data/quaderno-1.1.0.gem +0 -0
  58. data/quaderno-1.1.2.gem +0 -0
  59. data/quaderno-1.2.0.gem +0 -0
@@ -2,240 +2,260 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
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%2Fgoogle.com&events[]=created&events[]=updated
9
9
  headers:
10
10
  authorization:
11
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
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
- - '1000'
18
+ - '2000'
19
19
  x-ratelimit-remaining:
20
- - '929'
20
+ - '1851'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"41479f6abb2dc8b535664b4b55fa45e9"'
26
+ - ! '"4555700f677a7c9e4b13c85dcb6b6661"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
- set-cookie:
30
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFiZWY4YjdiOGE4MTEwOTJmNzYwNjM3MjI5ODEwZDlkBjsAVA%3D%3D--96c9ca246f226d02be6c26d8a868d525b15704b7;
31
- path=/; HttpOnly
32
29
  x-request-id:
33
- - 751dfac73b7b688e55853a1e224622e6
30
+ - 4221c70b915cb94f5d2a52802b3c3161
34
31
  x-runtime:
35
- - '0.746976'
32
+ - '1.480550'
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
35
+ date:
36
+ - Tue, 04 Feb 2014 14:53:25 GMT
37
+ content-length:
38
+ - '227'
36
39
  connection:
37
40
  - close
38
- server:
39
- - thin 1.5.0 codename Knife
41
+ set-cookie:
42
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWY4NDQ2MGNiZjBhOWRiMjExNzRlZDM1YTQzMWQ0YmMyBjsAVA%3D%3D--eba3c76f196c41a3d0722d4c3c8ec0f8c121dca7;
43
+ path=/; HttpOnly
40
44
  body:
41
45
  encoding: US-ASCII
42
- string: ! '{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"}'
46
+ string: ! '{"id":2,"url":"http://google.com","auth_key":"yISVcCmG28BKfEQgoIP7fA","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:25Z","updated_at":"2014-02-04T14:53:25Z"}'
43
47
  http_version: '1.1'
44
- recorded_at: Wed, 22 May 2013 13:03:16 GMT
48
+ recorded_at: Tue, 04 Feb 2014 14:53:25 GMT
45
49
  - request:
46
50
  method: post
47
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
51
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
48
52
  body:
49
53
  encoding: US-ASCII
50
54
  string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
51
55
  headers:
52
56
  authorization:
53
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
57
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
54
58
  response:
55
59
  status:
56
60
  code: 201
57
- message: Created
61
+ message: ! 'Created '
58
62
  headers:
59
63
  x-ratelimit-limit:
60
- - '1000'
64
+ - '2000'
61
65
  x-ratelimit-remaining:
62
- - '928'
66
+ - '1850'
63
67
  content-type:
64
68
  - application/json; charset=utf-8
65
69
  x-ua-compatible:
66
70
  - IE=Edge
67
71
  etag:
68
- - ! '"91751cad6f240bf2cd55374b21ec9c9c"'
72
+ - ! '"4fb35fc680c5c1154f2b8b759fb3c6a1"'
69
73
  cache-control:
70
74
  - max-age=0, private, must-revalidate
71
- set-cookie:
72
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA4MTVlZjYwN2E4Y2M5ZDZmODNhMTFjNmE3ZDNlOTEwBjsAVA%3D%3D--f6560d1e8177a9171e9c270baa897cad6f1b9859;
73
- path=/; HttpOnly
74
75
  x-request-id:
75
- - 44eebcec669d7dd2e4720193c175ac51
76
+ - c9fddb1e800bf55ced76a84387cf00b9
76
77
  x-runtime:
77
- - '2.037525'
78
+ - '2.248368'
79
+ server:
80
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
81
+ date:
82
+ - Tue, 04 Feb 2014 14:53:27 GMT
83
+ content-length:
84
+ - '232'
78
85
  connection:
79
86
  - close
80
- server:
81
- - thin 1.5.0 codename Knife
87
+ set-cookie:
88
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTJjMDIwYjkxYTM1YjhiYmFhN2U5MmQ2MmY1ZDVlMmM1BjsAVA%3D%3D--3dbe45aa15afeef725dc64373de80aa5c3d152ff;
89
+ path=/; HttpOnly
82
90
  body:
83
91
  encoding: US-ASCII
84
- string: ! '{"id":30,"url":"http://quadernoapp.com","auth_key":"mVSEZT81ZNwVwyHtlwAq1g","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:18Z","updated_at":"2013-05-22T13:03:18Z"}'
92
+ string: ! '{"id":3,"url":"http://quadernoapp.com","auth_key":"rmiUjrx2YZpTSg2O6UgYag","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:27Z","updated_at":"2014-02-04T14:53:27Z"}'
85
93
  http_version: '1.1'
86
- recorded_at: Wed, 22 May 2013 13:03:18 GMT
94
+ recorded_at: Tue, 04 Feb 2014 14:53:27 GMT
87
95
  - request:
88
96
  method: get
89
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
97
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
90
98
  body:
91
99
  encoding: US-ASCII
92
100
  string: ''
93
101
  headers:
94
102
  authorization:
95
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
103
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
96
104
  response:
97
105
  status:
98
106
  code: 200
99
- message: OK
107
+ message: ! 'OK '
100
108
  headers:
101
109
  x-ratelimit-limit:
102
- - '1000'
110
+ - '2000'
103
111
  x-ratelimit-remaining:
104
- - '927'
112
+ - '1849'
105
113
  content-type:
106
114
  - application/json; charset=utf-8
107
115
  x-ua-compatible:
108
116
  - IE=Edge
109
117
  etag:
110
- - ! '"ca612ba1284ac24b8347dd0dffae6109"'
118
+ - ! '"5d1505498f7a35127b522d99a23c7100"'
111
119
  cache-control:
112
120
  - max-age=0, private, must-revalidate
113
121
  x-request-id:
114
- - d0d5569d82c9be995978dcd7f8089e8d
122
+ - 548728b73b8e2c0333b681dacbfa2736
115
123
  x-runtime:
116
- - '0.193783'
124
+ - '0.142064'
125
+ server:
126
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
127
+ date:
128
+ - Tue, 04 Feb 2014 14:53:28 GMT
129
+ content-length:
130
+ - '462'
117
131
  connection:
118
132
  - close
119
- server:
120
- - thin 1.5.0 codename Knife
121
133
  body:
122
134
  encoding: US-ASCII
123
- string: ! '[{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"},{"id":30,"url":"http://quadernoapp.com","auth_key":"mVSEZT81ZNwVwyHtlwAq1g","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:18Z","updated_at":"2013-05-22T13:03:18Z"}]'
135
+ string: ! '[{"id":2,"url":"http://google.com","auth_key":"yISVcCmG28BKfEQgoIP7fA","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:25Z","updated_at":"2014-02-04T14:53:25Z"},{"id":3,"url":"http://quadernoapp.com","auth_key":"rmiUjrx2YZpTSg2O6UgYag","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:27Z","updated_at":"2014-02-04T14:53:27Z"}]'
124
136
  http_version: '1.1'
125
- recorded_at: Wed, 22 May 2013 13:03:19 GMT
137
+ recorded_at: Tue, 04 Feb 2014 14:53:28 GMT
126
138
  - request:
127
139
  method: delete
128
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/30.json
140
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks/3.json
129
141
  body:
130
142
  encoding: US-ASCII
131
143
  string: ''
132
144
  headers:
133
145
  authorization:
134
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
146
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
135
147
  response:
136
148
  status:
137
149
  code: 204
138
- message: No Content
150
+ message: ! 'No Content '
139
151
  headers:
140
152
  x-ratelimit-limit:
141
- - '1000'
153
+ - '2000'
142
154
  x-ratelimit-remaining:
143
- - '926'
155
+ - '1848'
144
156
  x-ua-compatible:
145
157
  - IE=Edge
146
158
  cache-control:
147
159
  - no-cache
148
- set-cookie:
149
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWVkZGUzZWE5YjYzNzY3NThiNzQxNmMxYTY5NTEyZTU5BjsAVA%3D%3D--19e696f976bb7946320a51be9160ea12324de4ef;
150
- path=/; HttpOnly
151
160
  x-request-id:
152
- - ee561356cfb653c5b2817ee7ca988491
161
+ - bd741af48783fac18f53c67f62911ab9
153
162
  x-runtime:
154
- - '0.058304'
163
+ - '0.120173'
164
+ server:
165
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
166
+ date:
167
+ - Tue, 04 Feb 2014 14:53:28 GMT
155
168
  connection:
156
169
  - close
157
- server:
158
- - thin 1.5.0 codename Knife
170
+ set-cookie:
171
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTk4YTNmMzVhZjkxZGNjNTkyZDkzZTdjMTM5NGUyMWRmBjsAVA%3D%3D--f2be9b8d3eecf23eb1892640d37923a5d77f9756;
172
+ path=/; HttpOnly
159
173
  body:
160
174
  encoding: US-ASCII
161
175
  string: ''
162
176
  http_version: '1.1'
163
- recorded_at: Wed, 22 May 2013 13:03:19 GMT
177
+ recorded_at: Tue, 04 Feb 2014 14:53:28 GMT
164
178
  - request:
165
179
  method: get
166
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
180
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
167
181
  body:
168
182
  encoding: US-ASCII
169
183
  string: ''
170
184
  headers:
171
185
  authorization:
172
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
186
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
173
187
  response:
174
188
  status:
175
189
  code: 200
176
- message: OK
190
+ message: ! 'OK '
177
191
  headers:
178
192
  x-ratelimit-limit:
179
- - '1000'
193
+ - '2000'
180
194
  x-ratelimit-remaining:
181
- - '925'
195
+ - '1847'
182
196
  content-type:
183
197
  - application/json; charset=utf-8
184
198
  x-ua-compatible:
185
199
  - IE=Edge
186
200
  etag:
187
- - ! '"4cbb31a140ceebe49b4a4498c4b0498d"'
201
+ - ! '"1f4e1ff7ceca5e61d6a938a27bfc2e95"'
188
202
  cache-control:
189
203
  - max-age=0, private, must-revalidate
190
204
  x-request-id:
191
- - a5fa14f7262fe2fdcaf1bd57d4e5eba9
205
+ - 4cf7369b12291329c18cb77ef891f5d4
192
206
  x-runtime:
193
- - '0.073359'
207
+ - '0.353821'
208
+ server:
209
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
210
+ date:
211
+ - Tue, 04 Feb 2014 14:53:28 GMT
212
+ content-length:
213
+ - '229'
194
214
  connection:
195
215
  - close
196
- server:
197
- - thin 1.5.0 codename Knife
198
216
  body:
199
217
  encoding: US-ASCII
200
- string: ! '[{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"}]'
218
+ string: ! '[{"id":2,"url":"http://google.com","auth_key":"yISVcCmG28BKfEQgoIP7fA","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:25Z","updated_at":"2014-02-04T14:53:25Z"}]'
201
219
  http_version: '1.1'
202
- recorded_at: Wed, 22 May 2013 13:03:19 GMT
220
+ recorded_at: Tue, 04 Feb 2014 14:53:28 GMT
203
221
  - request:
204
222
  method: delete
205
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/29.json
223
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks/2.json
206
224
  body:
207
225
  encoding: US-ASCII
208
226
  string: ''
209
227
  headers:
210
228
  authorization:
211
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
229
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
212
230
  response:
213
231
  status:
214
232
  code: 204
215
- message: No Content
233
+ message: ! 'No Content '
216
234
  headers:
217
235
  x-ratelimit-limit:
218
- - '1000'
236
+ - '2000'
219
237
  x-ratelimit-remaining:
220
- - '924'
238
+ - '1846'
221
239
  x-ua-compatible:
222
240
  - IE=Edge
223
241
  cache-control:
224
242
  - no-cache
225
- set-cookie:
226
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTUxMGJmNDQ1NmM0ZTg4MWZlMTAzZDc2MGE2MjlkNWFjBjsAVA%3D%3D--019868e990c5a4465f8b240425e31832f3a7dab1;
227
- path=/; HttpOnly
228
243
  x-request-id:
229
- - da8630d8a68ccc310dfa5027028a7e3f
244
+ - 1e3b1b6451c0b314e2bd75652329e8ce
230
245
  x-runtime:
231
- - '0.105922'
246
+ - '0.107987'
247
+ server:
248
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
249
+ date:
250
+ - Tue, 04 Feb 2014 14:53:28 GMT
232
251
  connection:
233
252
  - close
234
- server:
235
- - thin 1.5.0 codename Knife
253
+ set-cookie:
254
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTUzMWFjMjkwMjRiMTdlYjgyZmUyYmExOGY3MGM2MzBmBjsAVA%3D%3D--d35abc22fadb8e9e16ea00bd72d3f9014f47669b;
255
+ path=/; HttpOnly
236
256
  body:
237
257
  encoding: US-ASCII
238
258
  string: ''
239
259
  http_version: '1.1'
240
- recorded_at: Wed, 22 May 2013 13:03:19 GMT
260
+ recorded_at: Tue, 04 Feb 2014 14:53:28 GMT
241
261
  recorded_with: VCR 2.3.0
@@ -2,67 +2,84 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/estimates.json
5
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/estimates.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
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
- - '1000'
18
+ - '2000'
19
19
  x-ratelimit-remaining:
20
- - '884'
20
+ - '1972'
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
- - ! '"5b7ecba12d39953a997fc60af9f8dc2c"'
30
+ - ! '"e381d87821899056ec8529c9f9bb5f0a"'
27
31
  cache-control:
28
32
  - max-age=0, private, must-revalidate
29
33
  x-request-id:
30
- - beefac59cfd987f2870d59068046d8ff
34
+ - 7c1dc5db1dbcd0ea053cc4daf32d0d36
31
35
  x-runtime:
32
- - '0.844291'
36
+ - '0.324561'
37
+ server:
38
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
39
+ date:
40
+ - Tue, 04 Feb 2014 14:39:54 GMT
41
+ content-length:
42
+ - '2872'
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":15,"number":"0000007","issue_date":"2013-04-25","contact":{"id":4,"full_name":"Test_OCP
40
- Doe"},"po_number":"","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","tags":[],"payment_details":"Show
41
- me the moneeeeeeeyy!!!!","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/91b1ab60bc88b87973bb9c03d668f6ceebb30137","url":"http://localhost:3000/recrea/api/v1/estimates/15.json"},{"id":14,"number":"0000006","issue_date":"2013-04-25","contact":{"id":5,"full_name":"Stark
42
- Industries"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"declined","permalink":"http://localhost:3000/estimate/4dae199225447e31626848012ca892b69d507262","url":"http://localhost:3000/recrea/api/v1/estimates/14.json"},{"id":13,"number":"0000005","issue_date":"2013-04-25","contact":{"id":3,"full_name":"100-499"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"accepted","permalink":"http://localhost:3000/estimate/b70a0607dee9da936bbc941f3f5d9d88dd49952f","url":"http://localhost:3000/recrea/api/v1/estimates/13.json"},{"id":12,"number":"0000004","issue_date":"2013-04-25","contact":{"id":6,"full_name":"ACME"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/d877d05d92046a69fe737fa5b43053c23975ea4d","url":"http://localhost:3000/recrea/api/v1/estimates/12.json"},{"id":11,"number":"0000003","issue_date":"2013-04-25","contact":{"id":5,"full_name":"Stark
43
- Industries"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/f7d4b0db4eb44df4c64717de9a8fce4358552156","url":"http://localhost:3000/recrea/api/v1/estimates/11.json"},{"id":10,"number":"0000002","issue_date":"2013-04-25","contact":{"id":2,"full_name":"Test_OCP"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/f40fd3dc4d2e6b597d2c45897eb8af605fd3b9b0","url":"http://localhost:3000/recrea/api/v1/estimates/10.json"},{"id":9,"number":"0000001","issue_date":"2013-04-25","contact":{"id":1,"full_name":"Recrea
44
- Systems, SLU"},"po_number":"","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","tags":[],"payment_details":"","notes":"","state":"invoiced","permalink":"http://localhost:3000/estimate/2219c272c3aa91e6ed27f8e8cfe2c905c81f6e2f","url":"http://localhost:3000/recrea/api/v1/estimates/9.json"},{"id":21,"number":"0000008","issue_date":"2013-04-24","contact":{"id":7,"full_name":"Test_OCP"},"po_number":"","currency":"EUR","items":[{"description":"Fresones","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","tags":[],"payment_details":"","notes":"","state":"draft","permalink":"http://localhost:3000/estimate/f049036ab6504548aed34d59ad58fea7bc08d266","url":"http://localhost:3000/recrea/api/v1/estimates/21.json"},{"id":22,"number":"0000009","issue_date":"2013-03-24","contact":{"id":4,"full_name":"Test_OCP
45
- Doe"},"po_number":"","currency":"EUR","items":[{"description":"Tarta 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","tags":[],"payment_details":"","notes":"","state":"invoiced","permalink":"http://localhost:3000/estimate/91992f05a4762c0a253ea34b51cbbe720fad82f4","url":"http://localhost:3000/recrea/api/v1/estimates/22.json"}]'
47
+ string: ! '[{"id":9,"number":"0000003","issue_date":"2014-02-04","contact":{"id":2,"full_name":"Another
48
+ Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Bread
49
+ pack","quantity":"1.0","unit_price":"2.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"2.00
50
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"2.00 \u20ac"}],"subtotal":"2.00
51
+ \u20ac","discount":"0.00 \u20ac","taxes":[],"total":"2.00 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/43cb8820f8901ce8ee208a79f2a4c4d6eef63eb6","url":"http://localhost:3000/recrea/api/v1/estimates/9.json"},{"id":8,"number":"0000002","issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
52
+ Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Paint","quantity":"1.0","unit_price":"50.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"50.00
53
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"50.00 \u20ac"},{"description":"Brushes","quantity":"1.0","unit_price":"12.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"12.00
54
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"12.00 \u20ac"},{"description":"Working
55
+ suits","quantity":"1.0","unit_price":"20.99","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"20.99
56
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"20.99 \u20ac"}],"subtotal":"82.99
57
+ \u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IVA (21.00%)","amount":"2.52
58
+ \u20ac"}],"total":"85.51 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/749d695e7c7b0fd8545416fa30346ca3c69f5658","url":"http://localhost:3000/recrea/api/v1/estimates/8.json"},{"id":7,"number":"0000001","issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
59
+ Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Paint","quantity":"1.0","unit_price":"50.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"50.00
60
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"50.00 \u20ac"},{"description":"Brushes","quantity":"1.0","unit_price":"12.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"12.00
61
+ \u20ac","discount":"0.00 \u20ac","gross_amount":"12.00 \u20ac"}],"subtotal":"62.00
62
+ \u20ac","discount":"0.00 \u20ac","taxes":[],"total":"62.00 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/8a4c4788bf7cbb1ecf13e875176864a9b02f5d7f","url":"http://localhost:3000/recrea/api/v1/estimates/7.json"}]'
46
63
  http_version: '1.1'
47
- recorded_at: Tue, 14 May 2013 10:48:01 GMT
64
+ recorded_at: Tue, 04 Feb 2014 14:39:54 GMT
48
65
  - request:
49
66
  method: get
50
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/ping.json
67
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/ping.json
51
68
  body:
52
69
  encoding: US-ASCII
53
70
  string: ''
54
71
  headers:
55
72
  authorization:
56
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
73
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
57
74
  response:
58
75
  status:
59
76
  code: 200
60
- message: OK
77
+ message: ! 'OK '
61
78
  headers:
62
79
  x-ratelimit-limit:
63
- - '1000'
80
+ - '2000'
64
81
  x-ratelimit-remaining:
65
- - '884'
82
+ - '1972'
66
83
  content-type:
67
84
  - application/json; charset=utf-8
68
85
  x-ua-compatible:
@@ -72,57 +89,61 @@ http_interactions:
72
89
  cache-control:
73
90
  - max-age=0, private, must-revalidate
74
91
  x-request-id:
75
- - 6f9a3329a7229ac686425c804117225c
92
+ - 5e3bbfdc76614c8b78edffffa317542e
76
93
  x-runtime:
77
- - '0.059732'
94
+ - '0.041701'
95
+ server:
96
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
97
+ date:
98
+ - Tue, 04 Feb 2014 14:39:54 GMT
99
+ content-length:
100
+ - '15'
78
101
  connection:
79
102
  - close
80
- server:
81
- - thin 1.5.0 codename Knife
82
103
  body:
83
104
  encoding: US-ASCII
84
105
  string: ! '{"status":"OK"}'
85
106
  http_version: '1.1'
86
- recorded_at: Tue, 14 May 2013 10:48:01 GMT
107
+ recorded_at: Tue, 04 Feb 2014 14:39:54 GMT
87
108
  - request:
88
109
  method: get
89
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/estimates/15/deliver.json
110
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/estimates/9/deliver.json
90
111
  body:
91
112
  encoding: US-ASCII
92
113
  string: ''
93
114
  headers:
94
115
  authorization:
95
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
116
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
96
117
  response:
97
118
  status:
98
- code: 200
99
- message: OK
119
+ code: 422
120
+ message: ''
100
121
  headers:
101
122
  x-ratelimit-limit:
102
- - '1000'
123
+ - '2000'
103
124
  x-ratelimit-remaining:
104
- - '883'
125
+ - '1971'
105
126
  content-type:
106
127
  - application/json; charset=utf-8
107
128
  x-ua-compatible:
108
129
  - IE=Edge
109
- etag:
110
- - ! '"17a6d164f3d008afd60b2f10a7535828"'
111
130
  cache-control:
112
- - max-age=0, private, must-revalidate
131
+ - no-cache
113
132
  x-request-id:
114
- - 27caeab8414c4deecf37a3fac4137b50
133
+ - d936886238707d07e349b4467cec4e63
115
134
  x-runtime:
116
- - '0.138798'
135
+ - '0.342419'
136
+ server:
137
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
138
+ date:
139
+ - Tue, 04 Feb 2014 14:39:54 GMT
140
+ content-length:
141
+ - '55'
117
142
  connection:
118
143
  - close
119
- server:
120
- - thin 1.5.0 codename Knife
121
144
  body:
122
145
  encoding: US-ASCII
123
- string: ! '{"estimate":{"account_id":1,"amount_paid_cents":0,"contact_id":4,"contact_name":"Test_OCP
124
- Doe","created_at":"2013-04-25T10:41:51Z","currency":"EUR","delivery":null,"document_id":null,"due_date":null,"due_days":null,"end_date":null,"exchange_cents":null,"exchange_rate":"1.0","frequency":null,"gross_amount_cents":3300,"id":15,"issue_date":"2013-04-25","notes":"","number":"0000007","payment_details":"Show
125
- me the moneeeeeeeyy!!!!","permalink":"91b1ab60bc88b87973bb9c03d668f6ceebb30137","po_number":"","recurring_document":null,"renewal_date":null,"start_date":null,"state":"draft","total_cents":3300,"updated_at":"2013-05-14T10:00:48Z","valid_until":null}}'
146
+ string: ! '{"delivery_recipients":["can''t be blank","is invalid"]}'
126
147
  http_version: '1.1'
127
- recorded_at: Tue, 14 May 2013 10:48:02 GMT
148
+ recorded_at: Tue, 04 Feb 2014 14:39:54 GMT
128
149
  recorded_with: VCR 2.3.0