quaderno 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +3 -2
- data/Gemfile.lock +27 -22
- data/README.md +7 -2
- data/Rakefile +5 -6
- data/VERSION +1 -1
- data/build_install.sh +1 -1
- data/changelog.md +5 -0
- data/lib/quaderno-ruby/base.rb +24 -8
- data/lib/quaderno-ruby/behavior/crud.rb +5 -5
- data/lib/quaderno-ruby/behavior/deliver.rb +1 -1
- data/lib/quaderno-ruby/behavior/payment.rb +2 -2
- data/quaderno.gemspec +8 -7
- data/test/fixtures/.DS_Store +0 -0
- data/test/fixtures/quaderno_cassettes/.DS_Store +0 -0
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +44 -26
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +29 -37
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +30 -40
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +108 -36
- data/test/fixtures/quaderno_cassettes/all_items.yml +27 -23
- data/test/fixtures/quaderno_cassettes/all_webhooks.yml +124 -104
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +135 -92
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +125 -105
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +126 -108
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +203 -104
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +74 -62
- data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +149 -125
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +75 -75
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +159 -77
- data/test/fixtures/quaderno_cassettes/found_contact.yml +71 -49
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +59 -64
- data/test/fixtures/quaderno_cassettes/found_expense.yml +61 -71
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +145 -66
- data/test/fixtures/quaderno_cassettes/found_item.yml +54 -46
- data/test/fixtures/quaderno_cassettes/found_webhook.yml +75 -63
- data/test/fixtures/quaderno_cassettes/new_contact.yml +28 -24
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +97 -69
- data/test/fixtures/quaderno_cassettes/new_expense.yml +126 -108
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +96 -69
- data/test/fixtures/quaderno_cassettes/new_item.yml +28 -24
- data/test/fixtures/quaderno_cassettes/new_webhook.yml +50 -42
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +57 -63
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +135 -59
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +24 -20
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +79 -81
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +157 -77
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +71 -49
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +126 -94
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +125 -93
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +125 -94
- data/test/fixtures/quaderno_cassettes/updated_item.yml +54 -46
- data/test/fixtures/quaderno_cassettes/updated_webhook.yml +103 -87
- data/test/unit/test_quaderno_contacts.rb +5 -9
- data/test/unit/test_quaderno_estimates.rb +3 -3
- data/test/unit/test_quaderno_expenses.rb +3 -3
- data/test/unit/test_quaderno_invoices.rb +3 -3
- data/test/unit/test_quaderno_items.rb +6 -6
- data/test/unit/test_quaderno_webhooks.rb +14 -14
- metadata +8 -7
- data/test/test_quaderno-ruby.rb +0 -4
@@ -2,217 +2,237 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://
|
5
|
+
uri: http://kAppsMggGcw8psUwdZBV@sandbox-quadernoapp.com/ninive-688/api/v1/webhooks.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: url=http%3A%2F%2Fgoogle.com&
|
8
|
+
string: url=http%3A%2F%2Fgoogle.com&events_types[]=invoice.created&events_types[]=invoice.updated
|
9
9
|
headers:
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic a0FwcHNNZ2dHY3c4cHNVd2RaQlY6
|
12
12
|
response:
|
13
13
|
status:
|
14
14
|
code: 201
|
15
|
-
message:
|
15
|
+
message: Created
|
16
16
|
headers:
|
17
|
+
server:
|
18
|
+
- nginx/1.4.5
|
19
|
+
date:
|
20
|
+
- Fri, 13 Jun 2014 12:34:28 GMT
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
transfer-encoding:
|
24
|
+
- chunked
|
25
|
+
connection:
|
26
|
+
- close
|
27
|
+
status:
|
28
|
+
- 201 Created
|
17
29
|
x-ratelimit-limit:
|
18
30
|
- '2000'
|
19
31
|
x-ratelimit-remaining:
|
20
|
-
- '
|
21
|
-
content-type:
|
22
|
-
- application/json; charset=utf-8
|
32
|
+
- '1492'
|
23
33
|
x-ua-compatible:
|
24
|
-
- IE=Edge
|
34
|
+
- IE=Edge,chrome=1
|
25
35
|
etag:
|
26
|
-
- ! '"
|
36
|
+
- ! '"1b018226dfb9197f0a6abcdb56a49a7a"'
|
27
37
|
cache-control:
|
28
38
|
- max-age=0, private, must-revalidate
|
39
|
+
set-cookie:
|
40
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTMyMjdkYzM3YTliOThlNDhkZDljNmQ3NDZiYjMyNzM5BjsAVA%3D%3D--126cc4bb6c49d9547b8249feb07fd8029ad5d05d;
|
41
|
+
domain=sandbox-quadernoapp.com; path=/; HttpOnly
|
29
42
|
x-request-id:
|
30
|
-
-
|
43
|
+
- b845e8588dc45643096112084aa5b429
|
31
44
|
x-runtime:
|
32
|
-
- '0.
|
33
|
-
|
34
|
-
-
|
35
|
-
date:
|
36
|
-
- Tue, 04 Feb 2014 14:53:32 GMT
|
37
|
-
content-length:
|
38
|
-
- '227'
|
39
|
-
connection:
|
40
|
-
- close
|
41
|
-
set-cookie:
|
42
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTY4NWY5ODE0NWQ0OTU4YWI1OWYzODYxZDViZWQzOTIxBjsAVA%3D%3D--febd7021d04b40d2c97d61edda5bdd5e038d5684;
|
43
|
-
path=/; HttpOnly
|
45
|
+
- '0.263191'
|
46
|
+
x-rack-cache:
|
47
|
+
- invalidate, pass
|
44
48
|
body:
|
45
49
|
encoding: US-ASCII
|
46
|
-
string: ! '{"id":
|
50
|
+
string: ! '{"id":31,"url":"http://google.com","auth_key":"yb2e3cFegrOV1dG9JZxcvg","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-06-13T12:34:28Z","updated_at":"2014-06-13T12:34:28Z"}'
|
47
51
|
http_version: '1.1'
|
48
|
-
recorded_at:
|
52
|
+
recorded_at: Fri, 13 Jun 2014 12:34:28 GMT
|
49
53
|
- request:
|
50
54
|
method: post
|
51
|
-
uri: http://
|
55
|
+
uri: http://kAppsMggGcw8psUwdZBV@sandbox-quadernoapp.com/ninive-688/api/v1/webhooks.json
|
52
56
|
body:
|
53
57
|
encoding: US-ASCII
|
54
|
-
string: url=http%3A%2F%2Fquadernoapp.com&
|
58
|
+
string: url=http%3A%2F%2Fquadernoapp.com&events_types[]=expense.created&events_types[]=expense.updated&events_types[]=contact.deleted
|
55
59
|
headers:
|
56
60
|
authorization:
|
57
|
-
- Basic
|
61
|
+
- Basic a0FwcHNNZ2dHY3c4cHNVd2RaQlY6
|
58
62
|
response:
|
59
63
|
status:
|
60
64
|
code: 201
|
61
|
-
message:
|
65
|
+
message: Created
|
62
66
|
headers:
|
67
|
+
server:
|
68
|
+
- nginx/1.4.5
|
69
|
+
date:
|
70
|
+
- Fri, 13 Jun 2014 12:34:29 GMT
|
71
|
+
content-type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
transfer-encoding:
|
74
|
+
- chunked
|
75
|
+
connection:
|
76
|
+
- close
|
77
|
+
status:
|
78
|
+
- 201 Created
|
63
79
|
x-ratelimit-limit:
|
64
80
|
- '2000'
|
65
81
|
x-ratelimit-remaining:
|
66
|
-
- '
|
67
|
-
content-type:
|
68
|
-
- application/json; charset=utf-8
|
82
|
+
- '1491'
|
69
83
|
x-ua-compatible:
|
70
|
-
- IE=Edge
|
84
|
+
- IE=Edge,chrome=1
|
71
85
|
etag:
|
72
|
-
- ! '"
|
86
|
+
- ! '"bfc1bf966e1335580804a4e3163e756f"'
|
73
87
|
cache-control:
|
74
88
|
- max-age=0, private, must-revalidate
|
89
|
+
set-cookie:
|
90
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTJhZDk1Njk3OTM2YjYzOGNlZGU3MDk3Nzk0N2Y5Y2FmBjsAVA%3D%3D--329566d674bf5ab5a66157cb559c28d8dd16cab5;
|
91
|
+
domain=sandbox-quadernoapp.com; path=/; HttpOnly
|
75
92
|
x-request-id:
|
76
|
-
-
|
93
|
+
- 91dd2c90662c503543c1c6409c802e01
|
77
94
|
x-runtime:
|
78
|
-
- '
|
79
|
-
|
80
|
-
-
|
81
|
-
date:
|
82
|
-
- Tue, 04 Feb 2014 14:53:34 GMT
|
83
|
-
content-length:
|
84
|
-
- '242'
|
85
|
-
connection:
|
86
|
-
- close
|
87
|
-
set-cookie:
|
88
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWU1NTcxNGMzYmU0MWRmYzJiMjY3ZWY4OGY2MzE3NGE4BjsAVA%3D%3D--493a9a145278d56bb7de2b86115e4c34e4341627;
|
89
|
-
path=/; HttpOnly
|
95
|
+
- '0.813012'
|
96
|
+
x-rack-cache:
|
97
|
+
- invalidate, pass
|
90
98
|
body:
|
91
99
|
encoding: US-ASCII
|
92
|
-
string: ! '{"id":
|
100
|
+
string: ! '{"id":32,"url":"http://quadernoapp.com","auth_key":"BF4TOv35AkXHWHTwyqOSDg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-06-13T12:34:29Z","updated_at":"2014-06-13T12:34:29Z"}'
|
93
101
|
http_version: '1.1'
|
94
|
-
recorded_at:
|
102
|
+
recorded_at: Fri, 13 Jun 2014 12:34:29 GMT
|
95
103
|
- request:
|
96
104
|
method: get
|
97
|
-
uri: http://
|
105
|
+
uri: http://kAppsMggGcw8psUwdZBV@sandbox-quadernoapp.com/ninive-688/api/v1/webhooks.json
|
98
106
|
body:
|
99
107
|
encoding: US-ASCII
|
100
108
|
string: ''
|
101
109
|
headers:
|
102
110
|
authorization:
|
103
|
-
- Basic
|
111
|
+
- Basic a0FwcHNNZ2dHY3c4cHNVd2RaQlY6
|
104
112
|
response:
|
105
113
|
status:
|
106
114
|
code: 200
|
107
|
-
message:
|
115
|
+
message: OK
|
108
116
|
headers:
|
117
|
+
server:
|
118
|
+
- nginx/1.4.5
|
119
|
+
date:
|
120
|
+
- Fri, 13 Jun 2014 12:34:30 GMT
|
121
|
+
content-type:
|
122
|
+
- application/json; charset=utf-8
|
123
|
+
transfer-encoding:
|
124
|
+
- chunked
|
125
|
+
connection:
|
126
|
+
- close
|
127
|
+
status:
|
128
|
+
- 200 OK
|
109
129
|
x-ratelimit-limit:
|
110
130
|
- '2000'
|
111
131
|
x-ratelimit-remaining:
|
112
|
-
- '
|
113
|
-
content-type:
|
114
|
-
- application/json; charset=utf-8
|
132
|
+
- '1490'
|
115
133
|
x-ua-compatible:
|
116
|
-
- IE=Edge
|
134
|
+
- IE=Edge,chrome=1
|
117
135
|
etag:
|
118
|
-
- ! '"
|
136
|
+
- ! '"6b76c7ab82dd4fa67bb4653e77976a7f"'
|
119
137
|
cache-control:
|
120
|
-
-
|
138
|
+
- must-revalidate, private, max-age=0
|
121
139
|
x-request-id:
|
122
|
-
-
|
140
|
+
- f0e5fa3217c2ba525bbb008689589ca3
|
123
141
|
x-runtime:
|
124
|
-
- '0.
|
125
|
-
|
126
|
-
-
|
127
|
-
date:
|
128
|
-
- Tue, 04 Feb 2014 14:53:34 GMT
|
129
|
-
content-length:
|
130
|
-
- '472'
|
131
|
-
connection:
|
132
|
-
- close
|
142
|
+
- '0.074528'
|
143
|
+
x-rack-cache:
|
144
|
+
- miss
|
133
145
|
body:
|
134
146
|
encoding: US-ASCII
|
135
|
-
string: ! '[{"id":
|
147
|
+
string: ! '[{"id":6,"url":"http://quadernoapp.com","auth_key":"ebL7LVbbJBVOwMSZCQz75A","events_types":["invoice.created","expense.updated"],"last_sent_at":"2014-06-13T12:29:43Z","last_error":null,"events_sent":7,"created_at":"2014-06-13T12:09:20Z","updated_at":"2014-06-13T12:09:20Z"},{"id":12,"url":"http://quadernoapp.com","auth_key":"CyZRqDK-ypNmYYeL0l1B0Q","events_types":["invoice.created","invoice.updated","contact.deleted"],"last_sent_at":"2014-06-13T12:33:03Z","last_error":null,"events_sent":16,"created_at":"2014-06-13T12:09:32Z","updated_at":"2014-06-13T12:09:34Z"},{"id":31,"url":"http://google.com","auth_key":"yb2e3cFegrOV1dG9JZxcvg","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-06-13T12:34:28Z","updated_at":"2014-06-13T12:34:28Z"},{"id":32,"url":"http://quadernoapp.com","auth_key":"BF4TOv35AkXHWHTwyqOSDg","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-06-13T12:34:29Z","updated_at":"2014-06-13T12:34:29Z"}]'
|
136
148
|
http_version: '1.1'
|
137
|
-
recorded_at:
|
149
|
+
recorded_at: Fri, 13 Jun 2014 12:34:30 GMT
|
138
150
|
- request:
|
139
151
|
method: delete
|
140
|
-
uri: http://
|
152
|
+
uri: http://kAppsMggGcw8psUwdZBV@sandbox-quadernoapp.com/ninive-688/api/v1/webhooks/31.json
|
141
153
|
body:
|
142
154
|
encoding: US-ASCII
|
143
155
|
string: ''
|
144
156
|
headers:
|
145
157
|
authorization:
|
146
|
-
- Basic
|
158
|
+
- Basic a0FwcHNNZ2dHY3c4cHNVd2RaQlY6
|
147
159
|
response:
|
148
160
|
status:
|
149
161
|
code: 204
|
150
|
-
message:
|
162
|
+
message: No Content
|
151
163
|
headers:
|
164
|
+
server:
|
165
|
+
- nginx/1.4.5
|
166
|
+
date:
|
167
|
+
- Fri, 13 Jun 2014 12:34:30 GMT
|
168
|
+
connection:
|
169
|
+
- close
|
170
|
+
status:
|
171
|
+
- 204 No Content
|
152
172
|
x-ratelimit-limit:
|
153
173
|
- '2000'
|
154
174
|
x-ratelimit-remaining:
|
155
|
-
- '
|
175
|
+
- '1489'
|
156
176
|
x-ua-compatible:
|
157
|
-
- IE=Edge
|
177
|
+
- IE=Edge,chrome=1
|
158
178
|
cache-control:
|
159
179
|
- no-cache
|
180
|
+
set-cookie:
|
181
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWI4MDEyYTUxYTRhYzJlYTcyZjUxNWM4ZGQ0OWNhMWNhBjsAVA%3D%3D--6e24cc95b5171e9e98273893da850beb974a86a4;
|
182
|
+
domain=sandbox-quadernoapp.com; path=/; HttpOnly
|
160
183
|
x-request-id:
|
161
|
-
-
|
184
|
+
- 90b82aee257ad06a11b38b8bcd9bda63
|
162
185
|
x-runtime:
|
163
|
-
- '0.
|
164
|
-
|
165
|
-
-
|
166
|
-
date:
|
167
|
-
- Tue, 04 Feb 2014 14:53:34 GMT
|
168
|
-
connection:
|
169
|
-
- close
|
170
|
-
set-cookie:
|
171
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTFjYjE4NGQ1ZTEwNTVlZThjZDE5NDczZjE3ZjMwOTYzBjsAVA%3D%3D--25f862316ea069a3ca7e99aea63357f73ae5b6c6;
|
172
|
-
path=/; HttpOnly
|
186
|
+
- '0.066085'
|
187
|
+
x-rack-cache:
|
188
|
+
- invalidate, pass
|
173
189
|
body:
|
174
190
|
encoding: US-ASCII
|
175
191
|
string: ''
|
176
192
|
http_version: '1.1'
|
177
|
-
recorded_at:
|
193
|
+
recorded_at: Fri, 13 Jun 2014 12:34:30 GMT
|
178
194
|
- request:
|
179
195
|
method: delete
|
180
|
-
uri: http://
|
196
|
+
uri: http://kAppsMggGcw8psUwdZBV@sandbox-quadernoapp.com/ninive-688/api/v1/webhooks/32.json
|
181
197
|
body:
|
182
198
|
encoding: US-ASCII
|
183
199
|
string: ''
|
184
200
|
headers:
|
185
201
|
authorization:
|
186
|
-
- Basic
|
202
|
+
- Basic a0FwcHNNZ2dHY3c4cHNVd2RaQlY6
|
187
203
|
response:
|
188
204
|
status:
|
189
205
|
code: 204
|
190
|
-
message:
|
206
|
+
message: No Content
|
191
207
|
headers:
|
208
|
+
server:
|
209
|
+
- nginx/1.4.5
|
210
|
+
date:
|
211
|
+
- Fri, 13 Jun 2014 12:34:31 GMT
|
212
|
+
connection:
|
213
|
+
- close
|
214
|
+
status:
|
215
|
+
- 204 No Content
|
192
216
|
x-ratelimit-limit:
|
193
217
|
- '2000'
|
194
218
|
x-ratelimit-remaining:
|
195
|
-
- '
|
219
|
+
- '1488'
|
196
220
|
x-ua-compatible:
|
197
|
-
- IE=Edge
|
221
|
+
- IE=Edge,chrome=1
|
198
222
|
cache-control:
|
199
223
|
- no-cache
|
224
|
+
set-cookie:
|
225
|
+
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWFiYzFiMzc4MGFlZGU5OGEyMzcwNjM4MDcyYzY5ODE5BjsAVA%3D%3D--ad06c3ce72953f269cf29cb7911635cd6a8eae85;
|
226
|
+
domain=sandbox-quadernoapp.com; path=/; HttpOnly
|
200
227
|
x-request-id:
|
201
|
-
-
|
228
|
+
- 85bcfc897207a8d4a5363e1e532a7f83
|
202
229
|
x-runtime:
|
203
|
-
- '0.
|
204
|
-
|
205
|
-
-
|
206
|
-
date:
|
207
|
-
- Tue, 04 Feb 2014 14:53:34 GMT
|
208
|
-
connection:
|
209
|
-
- close
|
210
|
-
set-cookie:
|
211
|
-
- _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA5ZDA1OGIwNjVhNjkzNTM4MTIyNTA4OTQ2MDdlNzIzBjsAVA%3D%3D--8f401b0afa66d88c0cca2f20d71522456ef60665;
|
212
|
-
path=/; HttpOnly
|
230
|
+
- '0.064684'
|
231
|
+
x-rack-cache:
|
232
|
+
- invalidate, pass
|
213
233
|
body:
|
214
234
|
encoding: US-ASCII
|
215
235
|
string: ''
|
216
236
|
http_version: '1.1'
|
217
|
-
recorded_at:
|
218
|
-
recorded_with: VCR 2.
|
237
|
+
recorded_at: Fri, 13 Jun 2014 12:34:31 GMT
|
238
|
+
recorded_with: VCR 2.9.2
|