ticketevolution-ruby 0.6.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.minimum.versions.gemfile +1 -1
- data/README.markdown +2 -2
- data/Rakefile +2 -3
- data/lib/docs/objects.markdown +1 -1
- data/lib/faraday/response/verbose_logger.rb +34 -0
- data/lib/ticket_evolution/core/connection.rb +21 -23
- data/lib/ticket_evolution/core/endpoint/request_handler.rb +19 -9
- data/lib/ticket_evolution/core/model.rb +6 -4
- data/lib/ticket_evolution/modules/update.rb +18 -5
- data/lib/ticket_evolution/version.rb +1 -1
- data/lib/ticket_evolution.rb +3 -1
- data/spec/fixtures/fake.rb +1 -1
- data/spec/fixtures/net/core/connection.yml +43 -4
- data/spec/fixtures/net/endpoints/accounts.yml +44 -0
- data/spec/fixtures/net/endpoints/brokerages.yml +44 -0
- data/spec/fixtures/net/endpoints/clients/create.yml +287 -0
- data/spec/fixtures/net/endpoints/clients/update_fail.yml +958 -0
- data/spec/fixtures/net/endpoints/clients/update_success.yml +820 -0
- data/spec/fixtures/net/endpoints/clients.yml +585 -158
- data/spec/fixtures/net/endpoints/search.yml +49 -0
- data/spec/lib/ticket_evolution/accounts_spec.rb +1 -1
- data/spec/lib/ticket_evolution/client_spec.rb +37 -1
- data/spec/lib/ticket_evolution/clients_spec.rb +2 -2
- data/spec/lib/ticket_evolution/core/connection_spec.rb +23 -15
- data/spec/lib/ticket_evolution/search_spec.rb +1 -10
- data/spec/shared_examples/endpoints/class.rb +19 -26
- data/spec/shared_examples/endpoints/update.rb +51 -12
- data/spec/support/connection.rb +2 -0
- data/ticketevolution-ruby.gemspec +2 -2
- metadata +36 -26
@@ -0,0 +1,287 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients
|
6
|
+
body: ! '{"clients":[{"name":""}]}'
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/vnd.ticketevolution.api+json; version=8
|
10
|
+
x-signature:
|
11
|
+
- p98E1mu3XCyp//XqsxaKakNHKnSqeWI0crCOVP6bPSM=
|
12
|
+
x-token:
|
13
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 422
|
17
|
+
message: Unprocessable Entity
|
18
|
+
headers:
|
19
|
+
content-type:
|
20
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
21
|
+
transfer-encoding:
|
22
|
+
- chunked
|
23
|
+
connection:
|
24
|
+
- keep-alive
|
25
|
+
status:
|
26
|
+
- '422'
|
27
|
+
x-powered-by:
|
28
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
29
|
+
x-ua-compatible:
|
30
|
+
- IE=Edge,chrome=1
|
31
|
+
x-runtime:
|
32
|
+
- '0.037097'
|
33
|
+
cache-control:
|
34
|
+
- no-cache
|
35
|
+
strict-transport-security:
|
36
|
+
- max-age=31536000
|
37
|
+
server:
|
38
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
39
|
+
body: ! '{"clients":[{"updated_at":null,"errors":{"name":["can''t be blank"]},"addresses":[],"email_addresses":[],"phone_numbers":[],"name":null,"id":null}]}'
|
40
|
+
http_version: '1.1'
|
41
|
+
- !ruby/struct:VCR::HTTPInteraction
|
42
|
+
request: !ruby/struct:VCR::Request
|
43
|
+
method: :post
|
44
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients
|
45
|
+
body: ! '{"clients":[{"name":""}]}'
|
46
|
+
headers:
|
47
|
+
accept:
|
48
|
+
- application/vnd.ticketevolution.api+json; version=8
|
49
|
+
x-signature:
|
50
|
+
- p98E1mu3XCyp//XqsxaKakNHKnSqeWI0crCOVP6bPSM=
|
51
|
+
x-token:
|
52
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
53
|
+
response: !ruby/struct:VCR::Response
|
54
|
+
status: !ruby/struct:VCR::ResponseStatus
|
55
|
+
code: 422
|
56
|
+
message: Unprocessable Entity
|
57
|
+
headers:
|
58
|
+
content-type:
|
59
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
60
|
+
transfer-encoding:
|
61
|
+
- chunked
|
62
|
+
connection:
|
63
|
+
- keep-alive
|
64
|
+
status:
|
65
|
+
- '422'
|
66
|
+
x-powered-by:
|
67
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
68
|
+
x-ua-compatible:
|
69
|
+
- IE=Edge,chrome=1
|
70
|
+
x-runtime:
|
71
|
+
- '0.037097'
|
72
|
+
cache-control:
|
73
|
+
- no-cache
|
74
|
+
strict-transport-security:
|
75
|
+
- max-age=31536000
|
76
|
+
server:
|
77
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
78
|
+
body: ! '{"clients":[{"updated_at":null,"errors":{"name":["can''t be blank"]},"addresses":[],"email_addresses":[],"phone_numbers":[],"name":null,"id":null}]}'
|
79
|
+
http_version: '1.1'
|
80
|
+
- !ruby/struct:VCR::HTTPInteraction
|
81
|
+
request: !ruby/struct:VCR::Request
|
82
|
+
method: :post
|
83
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients
|
84
|
+
body: ! '{"clients":[{"name":"Comish Gordon"}]}'
|
85
|
+
headers:
|
86
|
+
accept:
|
87
|
+
- application/vnd.ticketevolution.api+json; version=8
|
88
|
+
x-signature:
|
89
|
+
- eUQH8qJ9MDhnENYM83QehsKb5k7P/mxuThcPHVCA8lU=
|
90
|
+
x-token:
|
91
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
92
|
+
response: !ruby/struct:VCR::Response
|
93
|
+
status: !ruby/struct:VCR::ResponseStatus
|
94
|
+
code: 201
|
95
|
+
message: Created
|
96
|
+
headers:
|
97
|
+
content-type:
|
98
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
99
|
+
transfer-encoding:
|
100
|
+
- chunked
|
101
|
+
connection:
|
102
|
+
- keep-alive
|
103
|
+
status:
|
104
|
+
- '201'
|
105
|
+
x-powered-by:
|
106
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
107
|
+
x-ua-compatible:
|
108
|
+
- IE=Edge,chrome=1
|
109
|
+
x-runtime:
|
110
|
+
- '0.089761'
|
111
|
+
cache-control:
|
112
|
+
- no-cache
|
113
|
+
strict-transport-security:
|
114
|
+
- max-age=31536000
|
115
|
+
server:
|
116
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
117
|
+
body: ! '{"clients":[{"updated_at":"2012-02-22T16:05:23Z","addresses":[],"email_addresses":[],"phone_numbers":[],"name":"Comish
|
118
|
+
Gordon","url":"/clients/2366","id":"2366"}]}'
|
119
|
+
http_version: '1.1'
|
120
|
+
- !ruby/struct:VCR::HTTPInteraction
|
121
|
+
request: !ruby/struct:VCR::Request
|
122
|
+
method: :post
|
123
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients
|
124
|
+
body: ! '{"clients":[{"name":"Comish Gordon"}]}'
|
125
|
+
headers:
|
126
|
+
accept:
|
127
|
+
- application/vnd.ticketevolution.api+json; version=8
|
128
|
+
x-signature:
|
129
|
+
- eUQH8qJ9MDhnENYM83QehsKb5k7P/mxuThcPHVCA8lU=
|
130
|
+
x-token:
|
131
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
132
|
+
response: !ruby/struct:VCR::Response
|
133
|
+
status: !ruby/struct:VCR::ResponseStatus
|
134
|
+
code: 201
|
135
|
+
message: Created
|
136
|
+
headers:
|
137
|
+
content-type:
|
138
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
139
|
+
transfer-encoding:
|
140
|
+
- chunked
|
141
|
+
connection:
|
142
|
+
- keep-alive
|
143
|
+
status:
|
144
|
+
- '201'
|
145
|
+
x-powered-by:
|
146
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
147
|
+
x-ua-compatible:
|
148
|
+
- IE=Edge,chrome=1
|
149
|
+
x-runtime:
|
150
|
+
- '0.089761'
|
151
|
+
cache-control:
|
152
|
+
- no-cache
|
153
|
+
strict-transport-security:
|
154
|
+
- max-age=31536000
|
155
|
+
server:
|
156
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
157
|
+
body: ! '{"clients":[{"updated_at":"2012-02-22T16:05:23Z","addresses":[],"email_addresses":[],"phone_numbers":[],"name":"Comish
|
158
|
+
Gordon","url":"/clients/2366","id":"2366"}]}'
|
159
|
+
http_version: '1.1'
|
160
|
+
- !ruby/struct:VCR::HTTPInteraction
|
161
|
+
request: !ruby/struct:VCR::Request
|
162
|
+
method: :get
|
163
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients/2366?
|
164
|
+
body: !!null
|
165
|
+
headers:
|
166
|
+
accept:
|
167
|
+
- application/vnd.ticketevolution.api+json; version=8
|
168
|
+
x-signature:
|
169
|
+
- 9aSfCdreydgsQBoYtqNVugZjX5EsyVTvixq1KLByxAE=
|
170
|
+
x-token:
|
171
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
172
|
+
response: !ruby/struct:VCR::Response
|
173
|
+
status: !ruby/struct:VCR::ResponseStatus
|
174
|
+
code: 200
|
175
|
+
message: OK
|
176
|
+
headers:
|
177
|
+
content-type:
|
178
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
179
|
+
transfer-encoding:
|
180
|
+
- chunked
|
181
|
+
connection:
|
182
|
+
- keep-alive
|
183
|
+
status:
|
184
|
+
- '200'
|
185
|
+
x-powered-by:
|
186
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
187
|
+
etag:
|
188
|
+
- ! '"f5602239626c18d911702439807d7ea7"'
|
189
|
+
x-ua-compatible:
|
190
|
+
- IE=Edge,chrome=1
|
191
|
+
x-runtime:
|
192
|
+
- '0.035674'
|
193
|
+
cache-control:
|
194
|
+
- max-age=0, private, must-revalidate
|
195
|
+
strict-transport-security:
|
196
|
+
- max-age=31536000
|
197
|
+
server:
|
198
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
199
|
+
body: ! '{"updated_at":"2012-02-22T16:05:23Z","addresses":[],"email_addresses":[],"phone_numbers":[],"name":"Comish
|
200
|
+
Gordon","url":"/clients/2366","id":"2366"}'
|
201
|
+
http_version: '1.1'
|
202
|
+
- !ruby/struct:VCR::HTTPInteraction
|
203
|
+
request: !ruby/struct:VCR::Request
|
204
|
+
method: :get
|
205
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients/2366?
|
206
|
+
body: !!null
|
207
|
+
headers:
|
208
|
+
accept:
|
209
|
+
- application/vnd.ticketevolution.api+json; version=8
|
210
|
+
x-signature:
|
211
|
+
- 9aSfCdreydgsQBoYtqNVugZjX5EsyVTvixq1KLByxAE=
|
212
|
+
x-token:
|
213
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
214
|
+
response: !ruby/struct:VCR::Response
|
215
|
+
status: !ruby/struct:VCR::ResponseStatus
|
216
|
+
code: 200
|
217
|
+
message: OK
|
218
|
+
headers:
|
219
|
+
content-type:
|
220
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
221
|
+
transfer-encoding:
|
222
|
+
- chunked
|
223
|
+
connection:
|
224
|
+
- keep-alive
|
225
|
+
status:
|
226
|
+
- '200'
|
227
|
+
x-powered-by:
|
228
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
229
|
+
etag:
|
230
|
+
- ! '"f5602239626c18d911702439807d7ea7"'
|
231
|
+
x-ua-compatible:
|
232
|
+
- IE=Edge,chrome=1
|
233
|
+
x-runtime:
|
234
|
+
- '0.035674'
|
235
|
+
cache-control:
|
236
|
+
- max-age=0, private, must-revalidate
|
237
|
+
strict-transport-security:
|
238
|
+
- max-age=31536000
|
239
|
+
server:
|
240
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
241
|
+
body: ! '{"updated_at":"2012-02-22T16:05:23Z","addresses":[],"email_addresses":[],"phone_numbers":[],"name":"Comish
|
242
|
+
Gordon","url":"/clients/2366","id":"2366"}'
|
243
|
+
http_version: '1.1'
|
244
|
+
- !ruby/struct:VCR::HTTPInteraction
|
245
|
+
request: !ruby/struct:VCR::Request
|
246
|
+
method: :get
|
247
|
+
uri: https://api.sandbox.ticketevolution.com:443/clients/2366
|
248
|
+
body: !!null
|
249
|
+
headers:
|
250
|
+
x-signature:
|
251
|
+
- 9aSfCdreydgsQBoYtqNVugZjX5EsyVTvixq1KLByxAE=
|
252
|
+
x-token:
|
253
|
+
- b2b5a7a33b1a78896ed1b53d81c5c9cc
|
254
|
+
accept:
|
255
|
+
- application/vnd.ticketevolution.api+json; version=8
|
256
|
+
accept-encoding:
|
257
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
258
|
+
response: !ruby/struct:VCR::Response
|
259
|
+
status: !ruby/struct:VCR::ResponseStatus
|
260
|
+
code: 200
|
261
|
+
message: OK
|
262
|
+
headers:
|
263
|
+
content-type:
|
264
|
+
- application/vnd.ticketevolution.api+json; version=8; charset=utf-8
|
265
|
+
transfer-encoding:
|
266
|
+
- chunked
|
267
|
+
connection:
|
268
|
+
- keep-alive
|
269
|
+
status:
|
270
|
+
- '200'
|
271
|
+
x-powered-by:
|
272
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
273
|
+
etag:
|
274
|
+
- ! '"f5602239626c18d911702439807d7ea7"'
|
275
|
+
x-ua-compatible:
|
276
|
+
- IE=Edge,chrome=1
|
277
|
+
x-runtime:
|
278
|
+
- '0.040616'
|
279
|
+
cache-control:
|
280
|
+
- max-age=0, private, must-revalidate
|
281
|
+
strict-transport-security:
|
282
|
+
- max-age=31536000
|
283
|
+
server:
|
284
|
+
- nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
285
|
+
body: ! '{"updated_at":"2012-02-22T16:05:23Z","addresses":[],"email_addresses":[],"phone_numbers":[],"name":"Comish
|
286
|
+
Gordon","url":"/clients/2366","id":"2366"}'
|
287
|
+
http_version: '1.1'
|