recurly 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of recurly might be problematic. Click here for more details.

Files changed (67) hide show
  1. data/lib/recurly/base.rb +11 -4
  2. data/lib/recurly/billing_info.rb +2 -1
  3. data/lib/recurly/charge.rb +3 -1
  4. data/lib/recurly/credit.rb +3 -1
  5. data/lib/recurly/subscription.rb +1 -1
  6. data/lib/recurly/version.rb +1 -1
  7. data/spec/config/recurly.yml +4 -4
  8. data/spec/unit/billing_info_spec.rb +1 -0
  9. data/spec/unit/charge_spec.rb +2 -0
  10. data/spec/unit/credit_spec.rb +2 -0
  11. data/spec/unit/subscription_spec.rb +1 -1
  12. data/spec/vcr/account/accept-language-account/1301979678.yml +14 -12
  13. data/spec/vcr/account/close/1301979678.yml +41 -35
  14. data/spec/vcr/account/create-blank/1301979678.yml +11 -9
  15. data/spec/vcr/account/create-duplicate/1301979678.yml +25 -21
  16. data/spec/vcr/account/create-min/1301979678.yml +14 -12
  17. data/spec/vcr/account/create/1301979678.yml +14 -12
  18. data/spec/vcr/account/find/1301979678.yml +40 -34
  19. data/spec/vcr/account/list/1301979678.yml +348 -341
  20. data/spec/vcr/account/update/1301979678.yml +61 -53
  21. data/spec/vcr/billing/create/1302025874.yml +42 -36
  22. data/spec/vcr/billing/destroy/1302025874.yml +65 -55
  23. data/spec/vcr/billing/errors/1302025874.yml +25 -21
  24. data/spec/vcr/billing/find/1302025874.yml +56 -48
  25. data/spec/vcr/billing/update/1302025874.yml +56 -48
  26. data/spec/vcr/charge/create/1297746103.yml +65 -53
  27. data/spec/vcr/charge/delete-uninvoiced/1297746103.yml +85 -69
  28. data/spec/vcr/charge/list-all/1297746103.yml +97 -75
  29. data/spec/vcr/charge/list-invoiced/1297746103.yml +143 -115
  30. data/spec/vcr/charge/list-pending/1297746103.yml +97 -75
  31. data/spec/vcr/charge/lookup/1297746103.yml +51 -41
  32. data/spec/vcr/coupon/create/1299714521.yml +28 -88
  33. data/spec/vcr/coupon/destroy/1299714521.yml +25 -107
  34. data/spec/vcr/credit/create/1299714599.yml +51 -41
  35. data/spec/vcr/credit/delete/1299714599.yml +74 -60
  36. data/spec/vcr/credit/list/1299714599.yml +97 -75
  37. data/spec/vcr/credit/lookup/1299714599.yml +51 -41
  38. data/spec/vcr/invoice/create-no-charges/1297746103.yml +39 -33
  39. data/spec/vcr/invoice/create/1297746103.yml +86 -72
  40. data/spec/vcr/invoice/list/1297746103.yml +121 -103
  41. data/spec/vcr/invoice/lookup/1297746103.yml +84 -72
  42. data/spec/vcr/plan/all.yml +108 -134
  43. data/spec/vcr/plan/find.yml +47 -95
  44. data/spec/vcr/plan/update.yml +152 -66
  45. data/spec/vcr/subscription/addons/add/1301885121.yml +48 -310
  46. data/spec/vcr/subscription/addons/create/1301885121.yml +48 -151
  47. data/spec/vcr/subscription/addons/remove/1301885121.yml +48 -279
  48. data/spec/vcr/subscription/cancel-with-code/1301881900.yml +132 -135
  49. data/spec/vcr/subscription/cancel/1301881900.yml +111 -117
  50. data/spec/vcr/subscription/change1/1301881900.yml +107 -113
  51. data/spec/vcr/subscription/change2/1301881900.yml +107 -113
  52. data/spec/vcr/subscription/create/1301881900.yml +50 -65
  53. data/spec/vcr/subscription/find/1301881900.yml +69 -81
  54. data/spec/vcr/subscription/reactivate/1301881900.yml +122 -126
  55. data/spec/vcr/subscription/refund-full/1301881900.yml +84 -153
  56. data/spec/vcr/subscription/refund-none/1301881900.yml +101 -108
  57. data/spec/vcr/subscription/refund-partial/1301881900.yml +84 -153
  58. data/spec/vcr/transaction/all/1301883347.yml +86 -84
  59. data/spec/vcr/transaction/create-no-account/1301883347.yml +15 -13
  60. data/spec/vcr/transaction/create-with-account/1301883347.yml +43 -37
  61. data/spec/vcr/transaction/list-filled/1301883347.yml +115 -101
  62. data/spec/vcr/transaction/list-initial/1301883347.yml +43 -37
  63. data/spec/vcr/transaction/lookup/1301883347.yml +118 -102
  64. data/spec/vcr/transaction/refund/1301883347.yml +58 -50
  65. data/spec/vcr/transaction/void/1301883347.yml +75 -82
  66. data/spec/vcr/transparent/post-url/1301879142.yml +29 -25
  67. metadata +3 -3
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts.xml
5
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
@@ -20,36 +20,38 @@
20
20
 
21
21
  headers:
22
22
  authorization:
23
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
23
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
24
+ user-agent:
25
+ - Recurly Ruby Client v0.4.6
24
26
  content-type:
25
27
  - application/xml
26
28
  accept:
27
29
  - "*/*"
28
- user-agent:
29
- - Ruby
30
30
  connection:
31
31
  - close
32
32
  response: !ruby/struct:VCR::Response
33
33
  status: !ruby/struct:VCR::ResponseStatus
34
34
  code: 201
35
- message: Created
35
+ message: "Created "
36
36
  headers:
37
37
  cache-control:
38
38
  - no-cache
39
39
  location:
40
40
  - http://app.recurly.local:3000/accounts/invoice-lookup-1297746103
41
41
  x-runtime:
42
- - "414"
42
+ - "266"
43
43
  content-type:
44
44
  - application/xml; charset=utf-8
45
45
  content-length:
46
46
  - "583"
47
- set-cookie:
48
- - _recurly_session=45ade44f1f967e4b4eb1a19143ef9c82; domain=.recurly.local; path=/; HttpOnly
47
+ server:
48
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
49
+ date:
50
+ - Thu, 21 Apr 2011 18:02:00 GMT
49
51
  connection:
50
52
  - close
51
- server:
52
- - thin 1.2.7 codename No Hup
53
+ set-cookie:
54
+ - _recurly_session=736e0887afc03d78597eb65599bd320b; domain=.recurly.local; path=/; HttpOnly
53
55
  body: |
54
56
  <?xml version="1.0" encoding="UTF-8"?>
55
57
  <account>
@@ -62,8 +64,8 @@
62
64
  <company_name>Recurly Ruby Gem</company_name>
63
65
  <balance_in_cents type="integer">0</balance_in_cents>
64
66
  <closed type="boolean">false</closed>
65
- <hosted_login_token>4042a17451954e0ca22171983a90b062</hosted_login_token>
66
- <created_at type="datetime">2011-04-05T19:44:15Z</created_at>
67
+ <hosted_login_token>3bb33601f00b43eea691600c8cc94853</hosted_login_token>
68
+ <created_at type="datetime">2011-04-21T18:02:00Z</created_at>
67
69
  <state>active</state>
68
70
  </account>
69
71
 
@@ -71,7 +73,7 @@
71
73
  - !ruby/struct:VCR::HTTPInteraction
72
74
  request: !ruby/struct:VCR::Request
73
75
  method: :put
74
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/billing_info.xml
76
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/billing_info.xml
75
77
  body: |
76
78
  <?xml version="1.0" encoding="UTF-8"?>
77
79
  <billing-info>
@@ -93,36 +95,38 @@
93
95
 
94
96
  headers:
95
97
  authorization:
96
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
98
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
99
+ user-agent:
100
+ - Recurly Ruby Client v0.4.6
97
101
  content-type:
98
102
  - application/xml
99
103
  accept:
100
104
  - "*/*"
101
- user-agent:
102
- - Ruby
103
105
  connection:
104
106
  - close
105
107
  response: !ruby/struct:VCR::Response
106
108
  status: !ruby/struct:VCR::ResponseStatus
107
109
  code: 200
108
- message: OK
110
+ message: "OK "
109
111
  headers:
110
112
  x-runtime:
111
- - "1616"
113
+ - "1471"
112
114
  content-type:
113
115
  - application/xml; charset=utf-8
114
116
  etag:
115
- - "\"a01ac79af94a1e8e0d0d95280fd747aa\""
117
+ - "\"ffa4a8f66e6e905424641cfc36bf64c3\""
116
118
  cache-control:
117
119
  - private, max-age=0, must-revalidate
118
120
  content-length:
119
121
  - "640"
120
- set-cookie:
121
- - _recurly_session=c4af66a6f4267f2a671bcd3afe45b9f9; domain=.recurly.local; path=/; HttpOnly
122
+ server:
123
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
124
+ date:
125
+ - Thu, 21 Apr 2011 18:02:03 GMT
122
126
  connection:
123
127
  - close
124
- server:
125
- - thin 1.2.7 codename No Hup
128
+ set-cookie:
129
+ - _recurly_session=5cc9ef54c3f60f8e05ac39bb81b2c36c; domain=.recurly.local; path=/; HttpOnly
126
130
  body: |
127
131
  <?xml version="1.0" encoding="UTF-8"?>
128
132
  <billing_info>
@@ -144,14 +148,14 @@
144
148
  <month type="integer">4</month>
145
149
  <year type="integer">2012</year>
146
150
  </credit_card>
147
- <updated_at type="datetime">2011-04-05T19:44:19Z</updated_at>
151
+ <updated_at type="datetime">2011-04-21T18:02:03Z</updated_at>
148
152
  </billing_info>
149
153
 
150
154
  http_version: "1.1"
151
155
  - !ruby/struct:VCR::HTTPInteraction
152
156
  request: !ruby/struct:VCR::Request
153
157
  method: :post
154
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/charges.xml
158
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/charges.xml
155
159
  body: |
156
160
  <?xml version="1.0" encoding="UTF-8"?>
157
161
  <charge>
@@ -161,52 +165,56 @@
161
165
 
162
166
  headers:
163
167
  authorization:
164
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
168
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
169
+ user-agent:
170
+ - Recurly Ruby Client v0.4.6
165
171
  content-type:
166
172
  - application/xml
167
173
  accept:
168
174
  - "*/*"
169
- user-agent:
170
- - Ruby
171
175
  connection:
172
176
  - close
173
177
  response: !ruby/struct:VCR::Response
174
178
  status: !ruby/struct:VCR::ResponseStatus
175
179
  code: 201
176
- message: Created
180
+ message: "Created "
177
181
  headers:
178
182
  cache-control:
179
183
  - no-cache
180
184
  x-runtime:
181
- - "388"
185
+ - "229"
182
186
  content-type:
183
187
  - application/xml; charset=utf-8
184
188
  content-length:
185
- - "519"
186
- set-cookie:
187
- - _recurly_session=53df76cffde2a3bd7c6acc637775c47b; domain=.recurly.local; path=/; HttpOnly
189
+ - "626"
190
+ server:
191
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
192
+ date:
193
+ - Thu, 21 Apr 2011 18:02:05 GMT
188
194
  connection:
189
195
  - close
190
- server:
191
- - thin 1.2.7 codename No Hup
196
+ set-cookie:
197
+ - _recurly_session=20e44adb595733e63adda7dfd47456cf; domain=.recurly.local; path=/; HttpOnly
192
198
  body: |
193
199
  <?xml version="1.0" encoding="UTF-8"?>
194
200
  <charge type="charge">
195
- <id>c2d4eb09f3544d5d88df17895220e858</id>
201
+ <id>cc80cf90bd314af6afde7fb336b56d55</id>
196
202
  <account_code>invoice-lookup-1297746103</account_code>
203
+ <quantity type="integer">1</quantity>
204
+ <unit_amount_in_cents type="integer">1500</unit_amount_in_cents>
197
205
  <amount_in_cents type="integer">1500</amount_in_cents>
198
- <start_date type="datetime">2011-04-05T19:44:22Z</start_date>
206
+ <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
199
207
  <end_date nil="true" type="datetime"></end_date>
200
208
  <invoice_number nil="true" type="integer"></invoice_number>
201
209
  <description>charge description</description>
202
- <created_at type="datetime">2011-04-05T19:44:22Z</created_at>
210
+ <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
203
211
  </charge>
204
212
 
205
213
  http_version: "1.1"
206
214
  - !ruby/struct:VCR::HTTPInteraction
207
215
  request: !ruby/struct:VCR::Request
208
216
  method: :post
209
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/invoices.xml
217
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/invoices.xml
210
218
  body: |
211
219
  <?xml version="1.0" encoding="UTF-8"?>
212
220
  <invoice>
@@ -214,43 +222,45 @@
214
222
 
215
223
  headers:
216
224
  authorization:
217
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
225
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
226
+ user-agent:
227
+ - Recurly Ruby Client v0.4.6
218
228
  content-type:
219
229
  - application/xml
220
230
  accept:
221
231
  - "*/*"
222
- user-agent:
223
- - Ruby
224
232
  connection:
225
233
  - close
226
234
  response: !ruby/struct:VCR::Response
227
235
  status: !ruby/struct:VCR::ResponseStatus
228
236
  code: 201
229
- message: Created
237
+ message: "Created "
230
238
  headers:
231
239
  cache-control:
232
240
  - no-cache
233
241
  location:
234
- - http://app.recurly.local:3000/invoices/fa40c224d06548378cdac66a24bacc26
242
+ - http://app.recurly.local:3000/invoices/cc5204bd7be84e4e8927bf97bceb61f1
235
243
  x-runtime:
236
- - "774"
244
+ - "457"
237
245
  content-type:
238
246
  - application/xml; charset=utf-8
239
247
  content-length:
240
248
  - "1214"
241
- set-cookie:
242
- - _recurly_session=95e19290bfca5ebd7c1beb048708c5b0; domain=.recurly.local; path=/; HttpOnly
249
+ server:
250
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
251
+ date:
252
+ - Thu, 21 Apr 2011 18:02:08 GMT
243
253
  connection:
244
254
  - close
245
- server:
246
- - thin 1.2.7 codename No Hup
255
+ set-cookie:
256
+ - _recurly_session=fae95f308d6909b2cb9347b714870c13; domain=.recurly.local; path=/; HttpOnly
247
257
  body: |
248
258
  <?xml version="1.0" encoding="UTF-8"?>
249
259
  <invoice>
250
- <id>fa40c224d06548378cdac66a24bacc26</id>
260
+ <id>cc5204bd7be84e4e8927bf97bceb61f1</id>
251
261
  <account_code>invoice-lookup-1297746103</account_code>
252
- <date type="datetime">2011-04-05T19:44:25Z</date>
253
- <invoice_number type="integer">1404</invoice_number>
262
+ <date type="datetime">2011-04-21T18:02:07Z</date>
263
+ <invoice_number type="integer">1015</invoice_number>
254
264
  <vat_number></vat_number>
255
265
  <status>open</status>
256
266
  <subtotal_in_cents type="integer">1500</subtotal_in_cents>
@@ -261,13 +271,13 @@
261
271
  <discount_in_cents type="integer">0</discount_in_cents>
262
272
  <line_items type="array">
263
273
  <line_item>
264
- <id>c2d4eb09f3544d5d88df17895220e858</id>
274
+ <id>cc80cf90bd314af6afde7fb336b56d55</id>
265
275
  <type>charge</type>
266
276
  <amount_in_cents type="integer">1500</amount_in_cents>
267
- <start_date type="datetime">2011-04-05T19:44:22Z</start_date>
277
+ <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
268
278
  <end_date nil="true" type="datetime"></end_date>
269
279
  <description>charge description</description>
270
- <created_at type="datetime">2011-04-05T19:44:22Z</created_at>
280
+ <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
271
281
  <applied_coupon_code></applied_coupon_code>
272
282
  </line_item>
273
283
  </line_items>
@@ -279,47 +289,49 @@
279
289
  - !ruby/struct:VCR::HTTPInteraction
280
290
  request: !ruby/struct:VCR::Request
281
291
  method: :get
282
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/invoices/fa40c224d06548378cdac66a24bacc26.xml
292
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/invoices/cc5204bd7be84e4e8927bf97bceb61f1.xml
283
293
  body:
284
294
  headers:
285
295
  authorization:
286
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
296
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
297
+ user-agent:
298
+ - Recurly Ruby Client v0.4.6
287
299
  accept:
288
300
  - application/xml
289
301
  accept-encoding:
290
302
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
291
- user-agent:
292
- - Ruby
293
303
  connection:
294
304
  - close
295
305
  response: !ruby/struct:VCR::Response
296
306
  status: !ruby/struct:VCR::ResponseStatus
297
307
  code: 200
298
- message: OK
308
+ message: "OK "
299
309
  headers:
300
310
  x-runtime:
301
- - "384"
311
+ - "221"
302
312
  content-type:
303
313
  - application/xml; charset=utf-8
304
314
  etag:
305
- - "\"7e22484de50c33a47107e9d1fcdb0536\""
315
+ - "\"f6cfaab4c619b62284af66f02e0175af\""
306
316
  cache-control:
307
317
  - private, max-age=0, must-revalidate
308
318
  content-length:
309
319
  - "1214"
310
- set-cookie:
311
- - _recurly_session=4c33fb9e008693f664392c46b5d9591f; domain=.recurly.local; path=/; HttpOnly
320
+ server:
321
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
322
+ date:
323
+ - Thu, 21 Apr 2011 18:02:09 GMT
312
324
  connection:
313
325
  - close
314
- server:
315
- - thin 1.2.7 codename No Hup
326
+ set-cookie:
327
+ - _recurly_session=10f1960f7b92a159d05e0ed2119af579; domain=.recurly.local; path=/; HttpOnly
316
328
  body: |
317
329
  <?xml version="1.0" encoding="UTF-8"?>
318
330
  <invoice>
319
- <id>fa40c224d06548378cdac66a24bacc26</id>
331
+ <id>cc5204bd7be84e4e8927bf97bceb61f1</id>
320
332
  <account_code>invoice-lookup-1297746103</account_code>
321
- <date type="datetime">2011-04-05T19:44:25Z</date>
322
- <invoice_number type="integer">1404</invoice_number>
333
+ <date type="datetime">2011-04-21T18:02:07Z</date>
334
+ <invoice_number type="integer">1015</invoice_number>
323
335
  <vat_number></vat_number>
324
336
  <status>open</status>
325
337
  <subtotal_in_cents type="integer">1500</subtotal_in_cents>
@@ -330,13 +342,13 @@
330
342
  <discount_in_cents type="integer">0</discount_in_cents>
331
343
  <line_items type="array">
332
344
  <line_item>
333
- <id>c2d4eb09f3544d5d88df17895220e858</id>
345
+ <id>cc80cf90bd314af6afde7fb336b56d55</id>
334
346
  <type>charge</type>
335
347
  <amount_in_cents type="integer">1500</amount_in_cents>
336
- <start_date type="datetime">2011-04-05T19:44:22Z</start_date>
348
+ <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
337
349
  <end_date nil="true" type="datetime"></end_date>
338
350
  <description>charge description</description>
339
- <created_at type="datetime">2011-04-05T19:44:22Z</created_at>
351
+ <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
340
352
  <applied_coupon_code></applied_coupon_code>
341
353
  </line_item>
342
354
  </line_items>
@@ -2,40 +2,42 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/paid.xml
5
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
6
6
  body:
7
7
  headers:
8
8
  authorization:
9
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
9
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
10
+ user-agent:
11
+ - Recurly Ruby Client v0.4.6
10
12
  accept:
11
13
  - application/xml
12
14
  accept-encoding:
13
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- user-agent:
15
- - Ruby
16
16
  connection:
17
17
  - close
18
18
  response: !ruby/struct:VCR::Response
19
19
  status: !ruby/struct:VCR::ResponseStatus
20
20
  code: 200
21
- message: OK
21
+ message: "OK "
22
22
  headers:
23
23
  x-runtime:
24
- - "383"
24
+ - "226"
25
25
  content-type:
26
26
  - application/xml; charset=utf-8
27
27
  etag:
28
- - "\"eea146faf9def8e0ad1bce0a43411f13\""
28
+ - "\"3888306c167f105a4e165433ee427264\""
29
29
  cache-control:
30
30
  - private, max-age=0, must-revalidate
31
31
  content-length:
32
- - "1558"
33
- set-cookie:
34
- - _recurly_session=3844da3a0c6a363c500272d8c2cb6e73; domain=.recurly.local; path=/; HttpOnly
32
+ - "612"
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
35
+ date:
36
+ - Thu, 21 Apr 2011 18:02:11 GMT
35
37
  connection:
36
38
  - close
37
- server:
38
- - thin 1.2.7 codename No Hup
39
+ set-cookie:
40
+ - _recurly_session=eed110838468472735b2fc170bcb748a; domain=.recurly.local; path=/; HttpOnly
39
41
  body: |
40
42
  <?xml version="1.0" encoding="UTF-8"?>
41
43
  <plan>
@@ -44,75 +46,108 @@
44
46
  <description></description>
45
47
  <success_url></success_url>
46
48
  <cancel_url></cancel_url>
47
- <created_at type="datetime">2011-04-03T21:46:48Z</created_at>
48
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
49
+ <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
50
+ <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
49
51
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
50
52
  <plan_interval_length type="integer">1</plan_interval_length>
51
53
  <plan_interval_unit>months</plan_interval_unit>
52
54
  <trial_interval_length type="integer">0</trial_interval_length>
53
55
  <trial_interval_unit>months</trial_interval_unit>
54
- <latest_version depreciated="true">
55
- <version type="integer">1</version>
56
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
57
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
58
- <plan_interval_length type="integer">1</plan_interval_length>
59
- <plan_interval_unit>months</plan_interval_unit>
60
- <trial_interval_length type="integer">0</trial_interval_length>
61
- <trial_interval_unit>months</trial_interval_unit>
62
- <created_at type="datetime">2011-04-04T02:15:00Z</created_at>
63
- </latest_version>
64
- <add_ons type="array">
65
- <add_on>
66
- <add_on_code>special</add_on_code>
67
- <default_unit_amount_in_cents>1000</default_unit_amount_in_cents>
68
- <default_quantity>1</default_quantity>
69
- </add_on>
70
- <add_on>
71
- <add_on_code>special2</add_on_code>
72
- <default_unit_amount_in_cents>50000</default_unit_amount_in_cents>
73
- <default_quantity>1</default_quantity>
74
- </add_on>
75
- </add_ons>
76
56
  </plan>
77
57
 
78
58
  http_version: "1.1"
79
59
  - !ruby/struct:VCR::HTTPInteraction
80
60
  request: !ruby/struct:VCR::Request
81
61
  method: :get
82
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/trial.xml
62
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/trial.xml
83
63
  body:
84
64
  headers:
85
65
  authorization:
86
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
66
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
67
+ user-agent:
68
+ - Recurly Ruby Client v0.4.6
87
69
  accept:
88
70
  - application/xml
89
71
  accept-encoding:
90
72
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
91
- user-agent:
92
- - Ruby
93
73
  connection:
94
74
  - close
95
75
  response: !ruby/struct:VCR::Response
96
76
  status: !ruby/struct:VCR::ResponseStatus
97
- code: 200
98
- message: OK
77
+ code: 404
78
+ message: "Not Found "
99
79
  headers:
100
- x-runtime:
101
- - "77"
80
+ cache-control:
81
+ - no-cache
102
82
  content-type:
103
83
  - application/xml; charset=utf-8
104
- etag:
105
- - "\"995fca2f7808cee6e53965e86a9f24b9\""
106
- cache-control:
107
- - private, max-age=0, must-revalidate
108
84
  content-length:
109
- - "1146"
85
+ - "90"
86
+ server:
87
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
88
+ date:
89
+ - Thu, 21 Apr 2011 18:02:13 GMT
90
+ connection:
91
+ - close
110
92
  set-cookie:
111
- - _recurly_session=fc87f6d0ea9725025d08c26439fbe35d; domain=.recurly.local; path=/; HttpOnly
93
+ - _recurly_session=6689c78d65b24a3c0a070f99f346c121; domain=.recurly.local; path=/; HttpOnly
94
+ body: |
95
+ <?xml version="1.0" encoding="UTF-8"?>
96
+ <errors>
97
+ <error>Plan not found</error>
98
+ </errors>
99
+
100
+ http_version: "1.1"
101
+ - !ruby/struct:VCR::HTTPInteraction
102
+ request: !ruby/struct:VCR::Request
103
+ method: :post
104
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans.xml
105
+ body: |
106
+ <?xml version="1.0" encoding="UTF-8"?>
107
+ <plan>
108
+ <plan-code>trial</plan-code>
109
+ <name>Trial</name>
110
+ <amount-in-cents type="integer">1000</amount-in-cents>
111
+ <plan-interval-length type="integer">1</plan-interval-length>
112
+ <plan-interval-unit>months</plan-interval-unit>
113
+ <trial-interval-length type="integer">1</trial-interval-length>
114
+ <trial-interval-unit>months</trial-interval-unit>
115
+ </plan>
116
+
117
+ headers:
118
+ authorization:
119
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
120
+ user-agent:
121
+ - Recurly Ruby Client v0.4.6
122
+ content-type:
123
+ - application/xml
124
+ accept:
125
+ - "*/*"
112
126
  connection:
113
127
  - close
128
+ response: !ruby/struct:VCR::Response
129
+ status: !ruby/struct:VCR::ResponseStatus
130
+ code: 201
131
+ message: "Created "
132
+ headers:
133
+ cache-control:
134
+ - no-cache
135
+ location:
136
+ - http://app.recurly.local:3000/company/plans/trial
137
+ x-runtime:
138
+ - "258"
139
+ content-type:
140
+ - application/xml; charset=utf-8
141
+ content-length:
142
+ - "614"
114
143
  server:
115
- - thin 1.2.7 codename No Hup
144
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
145
+ date:
146
+ - Thu, 21 Apr 2011 18:02:15 GMT
147
+ connection:
148
+ - close
149
+ set-cookie:
150
+ - _recurly_session=61f874ecb4280951cc58c35b3b93eb1d; domain=.recurly.local; path=/; HttpOnly
116
151
  body: |
117
152
  <?xml version="1.0" encoding="UTF-8"?>
118
153
  <plan>
@@ -121,154 +156,93 @@
121
156
  <description></description>
122
157
  <success_url></success_url>
123
158
  <cancel_url></cancel_url>
124
- <created_at type="datetime">2011-04-03T21:51:32Z</created_at>
159
+ <created_at type="datetime">2011-04-21T18:02:14Z</created_at>
125
160
  <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
126
161
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
127
162
  <plan_interval_length type="integer">1</plan_interval_length>
128
163
  <plan_interval_unit>months</plan_interval_unit>
129
164
  <trial_interval_length type="integer">1</trial_interval_length>
130
165
  <trial_interval_unit>months</trial_interval_unit>
131
- <latest_version depreciated="true">
132
- <version type="integer">1</version>
133
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
134
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
135
- <plan_interval_length type="integer">1</plan_interval_length>
136
- <plan_interval_unit>months</plan_interval_unit>
137
- <trial_interval_length type="integer">1</trial_interval_length>
138
- <trial_interval_unit>months</trial_interval_unit>
139
- <created_at type="datetime">2011-04-03T21:51:32Z</created_at>
140
- </latest_version>
141
166
  </plan>
142
167
 
143
168
  http_version: "1.1"
144
169
  - !ruby/struct:VCR::HTTPInteraction
145
170
  request: !ruby/struct:VCR::Request
146
171
  method: :get
147
- uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans.xml
172
+ uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans.xml
148
173
  body:
149
174
  headers:
150
175
  authorization:
151
- - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
176
+ - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
177
+ user-agent:
178
+ - Recurly Ruby Client v0.4.6
152
179
  accept:
153
180
  - application/xml
154
181
  accept-encoding:
155
182
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
156
- user-agent:
157
- - Ruby
158
183
  connection:
159
184
  - close
160
185
  response: !ruby/struct:VCR::Response
161
186
  status: !ruby/struct:VCR::ResponseStatus
162
187
  code: 200
163
- message: OK
188
+ message: "OK "
164
189
  headers:
165
190
  x-runtime:
166
- - "66"
191
+ - "218"
167
192
  content-type:
168
193
  - application/xml; charset=utf-8
169
194
  etag:
170
- - "\"118c086e4d129d6e77cff325f37e97b6\""
195
+ - "\"164cb5ad4e6383e6a998dd989abbb985\""
171
196
  cache-control:
172
197
  - private, max-age=0, must-revalidate
173
198
  content-length:
174
- - "4454"
175
- set-cookie:
176
- - _recurly_session=f1c1053728acb09b1f6f957290f649ff; domain=.recurly.local; path=/; HttpOnly
199
+ - "1689"
200
+ server:
201
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
202
+ date:
203
+ - Thu, 21 Apr 2011 18:02:17 GMT
177
204
  connection:
178
205
  - close
179
- server:
180
- - thin 1.2.7 codename No Hup
206
+ set-cookie:
207
+ - _recurly_session=5e5b362dc0de47b88c4af55458a12202; domain=.recurly.local; path=/; HttpOnly
181
208
  body: |
182
209
  <?xml version="1.0" encoding="UTF-8"?>
183
210
  <plans type="array">
184
211
  <plan>
185
212
  <plan_code>gold</plan_code>
186
- <name>gold</name>
187
- <description>
188
- </description>
189
- <created_at type="datetime">2011-02-10T05:56:45Z</created_at>
190
- <unit_amount_in_cents type="integer">1500</unit_amount_in_cents>
191
- <setup_fee_in_cents type="integer">1200</setup_fee_in_cents>
213
+ <name>Gold</name>
214
+ <description></description>
215
+ <created_at type="datetime">2011-04-13T20:36:50Z</created_at>
216
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
217
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
192
218
  <plan_interval_length type="integer">1</plan_interval_length>
193
219
  <plan_interval_unit>months</plan_interval_unit>
194
220
  <trial_interval_length type="integer">0</trial_interval_length>
195
221
  <trial_interval_unit>days</trial_interval_unit>
196
- <latest_version depreciated="true">
197
- <version type="integer">1</version>
198
- <unit_amount_in_cents type="integer">1500</unit_amount_in_cents>
199
- <setup_fee_in_cents type="integer">1200</setup_fee_in_cents>
200
- <plan_interval_length type="integer">1</plan_interval_length>
201
- <plan_interval_unit>months</plan_interval_unit>
202
- <trial_interval_length type="integer">0</trial_interval_length>
203
- <trial_interval_unit>days</trial_interval_unit>
204
- <created_at type="datetime">2011-02-10T05:56:45Z</created_at>
205
- </latest_version>
206
222
  </plan>
207
223
  <plan>
208
224
  <plan_code>paid</plan_code>
209
225
  <name>Paid</name>
210
226
  <description></description>
211
- <created_at type="datetime">2011-04-03T21:46:48Z</created_at>
212
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
213
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
214
- <plan_interval_length type="integer">1</plan_interval_length>
215
- <plan_interval_unit>months</plan_interval_unit>
216
- <trial_interval_length type="integer">0</trial_interval_length>
217
- <trial_interval_unit>months</trial_interval_unit>
218
- <latest_version depreciated="true">
219
- <version type="integer">1</version>
220
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
221
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
222
- <plan_interval_length type="integer">1</plan_interval_length>
223
- <plan_interval_unit>months</plan_interval_unit>
224
- <trial_interval_length type="integer">0</trial_interval_length>
225
- <trial_interval_unit>months</trial_interval_unit>
226
- <created_at type="datetime">2011-04-04T02:15:00Z</created_at>
227
- </latest_version>
228
- </plan>
229
- <plan>
230
- <plan_code>test</plan_code>
231
- <name>Test Plan</name>
232
- <description></description>
233
- <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
227
+ <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
234
228
  <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
235
229
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
236
230
  <plan_interval_length type="integer">1</plan_interval_length>
237
231
  <plan_interval_unit>months</plan_interval_unit>
238
232
  <trial_interval_length type="integer">0</trial_interval_length>
239
233
  <trial_interval_unit>months</trial_interval_unit>
240
- <latest_version depreciated="true">
241
- <version type="integer">1</version>
242
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
243
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
244
- <plan_interval_length type="integer">1</plan_interval_length>
245
- <plan_interval_unit>months</plan_interval_unit>
246
- <trial_interval_length type="integer">0</trial_interval_length>
247
- <trial_interval_unit>months</trial_interval_unit>
248
- <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
249
- </latest_version>
250
234
  </plan>
251
235
  <plan>
252
236
  <plan_code>trial</plan_code>
253
237
  <name>Trial</name>
254
238
  <description></description>
255
- <created_at type="datetime">2011-04-03T21:51:32Z</created_at>
239
+ <created_at type="datetime">2011-04-21T18:02:14Z</created_at>
256
240
  <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
257
241
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
258
242
  <plan_interval_length type="integer">1</plan_interval_length>
259
243
  <plan_interval_unit>months</plan_interval_unit>
260
244
  <trial_interval_length type="integer">1</trial_interval_length>
261
245
  <trial_interval_unit>months</trial_interval_unit>
262
- <latest_version depreciated="true">
263
- <version type="integer">1</version>
264
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
265
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
266
- <plan_interval_length type="integer">1</plan_interval_length>
267
- <plan_interval_unit>months</plan_interval_unit>
268
- <trial_interval_length type="integer">1</trial_interval_length>
269
- <trial_interval_unit>months</trial_interval_unit>
270
- <created_at type="datetime">2011-04-03T21:51:32Z</created_at>
271
- </latest_version>
272
246
  </plan>
273
247
  </plans>
274
248