recurly 0.4.7 → 0.4.8

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 (77) hide show
  1. data/README.md +6 -0
  2. data/lib/recurly/base.rb +15 -14
  3. data/lib/recurly/subscription.rb +2 -0
  4. data/lib/recurly/version.rb +1 -1
  5. data/spec/config/recurly.yml +4 -10
  6. data/spec/integration/transparent_spec.rb +72 -0
  7. data/spec/unit/transparent_spec.rb +6 -6
  8. data/spec/vcr/account/accept-language-account/{1301979678.yml → 1296674173.yml} +16 -18
  9. data/spec/vcr/account/close/{1301979678.yml → 1296674173.yml} +37 -39
  10. data/spec/vcr/account/create-blank/{1301979678.yml → 1296674173.yml} +8 -12
  11. data/spec/vcr/account/create-duplicate/{1301979678.yml → 1296674173.yml} +21 -27
  12. data/spec/vcr/account/create-min/{1301979678.yml → 1296674173.yml} +16 -18
  13. data/spec/vcr/account/create/{1301979678.yml → 1296674173.yml} +16 -18
  14. data/spec/vcr/account/find/{1301979678.yml → 1296674173.yml} +36 -38
  15. data/spec/vcr/account/list/1296674173.yml +55 -0
  16. data/spec/vcr/account/update/{1301979678.yml → 1296674173.yml} +59 -65
  17. data/spec/vcr/billing/create/{1302025874.yml → 1296690812.yml} +43 -45
  18. data/spec/vcr/billing/destroy/{1302025874.yml → 1296690812.yml} +58 -60
  19. data/spec/vcr/billing/find/{1302025874.yml → 1296690812.yml} +56 -58
  20. data/spec/vcr/billing/update/{1302025874.yml → 1296690812.yml} +59 -61
  21. data/spec/vcr/charge/create/{1297746103.yml → 1296674173.yml} +58 -64
  22. data/spec/vcr/charge/delete-uninvoiced/{1297746103.yml → 1296674173.yml} +66 -72
  23. data/spec/vcr/charge/list-all/{1297746103.yml → 1296674173.yml} +77 -91
  24. data/spec/vcr/charge/list-invoiced/{1297746103.yml → 1296674173.yml} +115 -131
  25. data/spec/vcr/charge/list-pending/{1297746103.yml → 1296674173.yml} +77 -91
  26. data/spec/vcr/charge/lookup/{1297746103.yml → 1296674173.yml} +43 -49
  27. data/spec/vcr/coupon/create/1296688818.yml +183 -0
  28. data/spec/vcr/coupon/create/1296774903.yml +183 -0
  29. data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
  30. data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
  31. data/spec/vcr/{coupon/create/1299714521.yml → credit/create/1296674173.yml} +34 -32
  32. data/spec/vcr/{billing/errors/1302025874.yml → credit/delete/1296674173.yml} +33 -42
  33. data/spec/vcr/{coupon/destroy/1299714521.yml → credit/list/1296674173.yml} +35 -33
  34. data/spec/vcr/credit/lookup/1296674173.yml +121 -0
  35. data/spec/vcr/invoice/create-no-charges/{1297746103.yml → 1296674173.yml} +40 -42
  36. data/spec/vcr/invoice/create/{1297746103.yml → 1296674173.yml} +77 -83
  37. data/spec/vcr/invoice/list/{1297746103.yml → 1296674173.yml} +107 -113
  38. data/spec/vcr/invoice/lookup/{1297746103.yml → 1296674173.yml} +77 -81
  39. data/spec/vcr/plan/all.yml +117 -98
  40. data/spec/vcr/plan/delete/1296674173.yml +225 -0
  41. data/spec/vcr/plan/find.yml +66 -36
  42. data/spec/vcr/plan/update.yml +64 -144
  43. data/spec/vcr/subscription/addons/add/{1301885121.yml → 1296674173.yml} +58 -51
  44. data/spec/vcr/subscription/addons/create/{1301885121.yml → 1296674173.yml} +58 -51
  45. data/spec/vcr/subscription/addons/remove/{1301885121.yml → 1296674173.yml} +58 -51
  46. data/spec/vcr/subscription/cancel-with-code/{1301881900.yml → 1296674173.yml} +135 -133
  47. data/spec/vcr/subscription/cancel/{1301881900.yml → 1296674173.yml} +117 -114
  48. data/spec/vcr/subscription/change1/{1301881900.yml → 1296674173.yml} +113 -110
  49. data/spec/vcr/subscription/change2/{1301881900.yml → 1296674173.yml} +112 -109
  50. data/spec/vcr/subscription/create/{1301881900.yml → 1296674173.yml} +65 -59
  51. data/spec/vcr/subscription/find/{1301881900.yml → 1296674173.yml} +81 -76
  52. data/spec/vcr/subscription/reactivate/{1301881900.yml → 1296674173.yml} +127 -124
  53. data/spec/vcr/subscription/refund-full/1296674173.yml +400 -0
  54. data/spec/vcr/subscription/refund-none/{1301881900.yml → 1296674173.yml} +106 -102
  55. data/spec/vcr/subscription/refund-partial/1296674173.yml +400 -0
  56. data/spec/vcr/transaction/all/{1301883347.yml → 1296674173.yml} +126 -126
  57. data/spec/vcr/transaction/create-no-account/{1301883347.yml → 1296674173.yml} +16 -16
  58. data/spec/vcr/transaction/create-with-account/{1301883347.yml → 1296674173.yml} +45 -51
  59. data/spec/vcr/transaction/list-filled/{1301883347.yml → 1296674173.yml} +91 -221
  60. data/spec/vcr/transaction/list-initial/{1301883347.yml → 1296674173.yml} +44 -46
  61. data/spec/vcr/transaction/lookup/{1301883347.yml → 1296674173.yml} +107 -121
  62. data/spec/vcr/transaction/refund/{1301883347.yml → 1296674173.yml} +57 -63
  63. data/spec/vcr/transaction/void/{1301883347.yml → 1296674173.yml} +69 -75
  64. data/spec/vcr/transparent/post-url/1311127536.yml +0 -0
  65. data/spec/vcr/transparent/post-url/1311127583.yml +0 -0
  66. data/spec/vcr/transparent/post-url/1311128042.yml +0 -0
  67. data/spec/vcr/transparent/post-url/1311128073.yml +0 -0
  68. data/spec/vcr/transparent/post-url/1311128087.yml +0 -0
  69. metadata +97 -155
  70. data/spec/vcr/account/list/1301979678.yml +0 -1588
  71. data/spec/vcr/credit/create/1299714599.yml +0 -186
  72. data/spec/vcr/credit/delete/1299714599.yml +0 -265
  73. data/spec/vcr/credit/list/1299714599.yml +0 -330
  74. data/spec/vcr/credit/lookup/1299714599.yml +0 -186
  75. data/spec/vcr/subscription/refund-full/1301881900.yml +0 -334
  76. data/spec/vcr/subscription/refund-partial/1301881900.yml +0 -334
  77. data/spec/vcr/transparent/post-url/1301879142.yml +0 -129
@@ -1,334 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>subscription-refund-full-1301881900</account-code>
10
- <first-name>Verena</first-name>
11
- <last-name>Test</last-name>
12
- <email>verena@test.com</email>
13
- <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
- <accept-language type="yaml" nil="true"></accept-language>
19
- </account>
20
-
21
- headers:
22
- authorization:
23
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
24
- user-agent:
25
- - Recurly Ruby Client v0.4.6
26
- content-type:
27
- - application/xml
28
- accept:
29
- - "*/*"
30
- connection:
31
- - close
32
- response: !ruby/struct:VCR::Response
33
- status: !ruby/struct:VCR::ResponseStatus
34
- code: 201
35
- message: "Created "
36
- headers:
37
- cache-control:
38
- - no-cache
39
- location:
40
- - http://app.recurly.local:3000/accounts/subscription-refund-full-1301881900
41
- x-runtime:
42
- - "274"
43
- content-type:
44
- - application/xml; charset=utf-8
45
- content-length:
46
- - "603"
47
- server:
48
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
49
- date:
50
- - Thu, 21 Apr 2011 18:04:13 GMT
51
- connection:
52
- - close
53
- set-cookie:
54
- - _recurly_session=57e48577dce739e43f5ca2600965b203; domain=.recurly.local; path=/; HttpOnly
55
- body: |
56
- <?xml version="1.0" encoding="UTF-8"?>
57
- <account>
58
- <id>subscription-refund-full-1301881900</id>
59
- <account_code>subscription-refund-full-1301881900</account_code>
60
- <username></username>
61
- <email>verena@test.com</email>
62
- <first_name>Verena</first_name>
63
- <last_name>Test</last_name>
64
- <company_name>Recurly Ruby Gem</company_name>
65
- <balance_in_cents type="integer">0</balance_in_cents>
66
- <closed type="boolean">false</closed>
67
- <hosted_login_token>8ef54d297bbd437f9cfac151cab2d790</hosted_login_token>
68
- <created_at type="datetime">2011-04-21T18:04:13Z</created_at>
69
- <state>active</state>
70
- </account>
71
-
72
- http_version: "1.1"
73
- - !ruby/struct:VCR::HTTPInteraction
74
- request: !ruby/struct:VCR::Request
75
- method: :get
76
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
77
- body:
78
- headers:
79
- authorization:
80
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
81
- user-agent:
82
- - Recurly Ruby Client v0.4.6
83
- accept:
84
- - application/xml
85
- accept-encoding:
86
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
- connection:
88
- - close
89
- response: !ruby/struct:VCR::Response
90
- status: !ruby/struct:VCR::ResponseStatus
91
- code: 200
92
- message: "OK "
93
- headers:
94
- x-runtime:
95
- - "242"
96
- content-type:
97
- - application/xml; charset=utf-8
98
- etag:
99
- - "\"3888306c167f105a4e165433ee427264\""
100
- cache-control:
101
- - private, max-age=0, must-revalidate
102
- content-length:
103
- - "612"
104
- server:
105
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
106
- date:
107
- - Thu, 21 Apr 2011 18:04:15 GMT
108
- connection:
109
- - close
110
- set-cookie:
111
- - _recurly_session=056a5c84f8dff638cf051a92493114e6; domain=.recurly.local; path=/; HttpOnly
112
- body: |
113
- <?xml version="1.0" encoding="UTF-8"?>
114
- <plan>
115
- <plan_code>paid</plan_code>
116
- <name>Paid</name>
117
- <description></description>
118
- <success_url></success_url>
119
- <cancel_url></cancel_url>
120
- <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
121
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
122
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
123
- <plan_interval_length type="integer">1</plan_interval_length>
124
- <plan_interval_unit>months</plan_interval_unit>
125
- <trial_interval_length type="integer">0</trial_interval_length>
126
- <trial_interval_unit>months</trial_interval_unit>
127
- </plan>
128
-
129
- http_version: "1.1"
130
- - !ruby/struct:VCR::HTTPInteraction
131
- request: !ruby/struct:VCR::Request
132
- method: :post
133
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-full-1301881900/subscription.xml
134
- body: |
135
- <?xml version="1.0" encoding="UTF-8"?>
136
- <subscription>
137
- <plan-code>paid</plan-code>
138
- <quantity type="integer">1</quantity>
139
- <account>
140
- <account-code>subscription-refund-full-1301881900</account-code>
141
- <first-name>Verena</first-name>
142
- <last-name>Test</last-name>
143
- <email>verena@test.com</email>
144
- <company-name>Recurly Ruby Gem</company-name>
145
- <billing-info>
146
- <first-name>Verena</first-name>
147
- <last-name>Test</last-name>
148
- <address1>123 Test St</address1>
149
- <city>San Francisco</city>
150
- <state>CA</state>
151
- <zip>94115</zip>
152
- <country>US</country>
153
- <credit-card>
154
- <number>4111111111111111</number>
155
- <year type="integer">2012</year>
156
- <month type="integer">4</month>
157
- <verification-value>123</verification-value>
158
- </credit-card>
159
- </billing-info>
160
- <accept-language type="yaml" nil="true"></accept-language>
161
- <id>subscription-refund-full-1301881900</id>
162
- <username type="yaml" nil="true"></username>
163
- <balance-in-cents type="integer">0</balance-in-cents>
164
- <closed type="boolean">false</closed>
165
- <hosted-login-token>8ef54d297bbd437f9cfac151cab2d790</hosted-login-token>
166
- <created-at type="datetime">2011-04-21T18:04:13Z</created-at>
167
- <state>active</state>
168
- </account>
169
- <addons type="array"/>
170
- </subscription>
171
-
172
- headers:
173
- authorization:
174
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
175
- user-agent:
176
- - Recurly Ruby Client v0.4.6
177
- content-type:
178
- - application/xml
179
- accept:
180
- - "*/*"
181
- connection:
182
- - close
183
- response: !ruby/struct:VCR::Response
184
- status: !ruby/struct:VCR::ResponseStatus
185
- code: 201
186
- message: "Created "
187
- headers:
188
- cache-control:
189
- - no-cache
190
- x-runtime:
191
- - "3007"
192
- content-type:
193
- - application/xml; charset=utf-8
194
- content-length:
195
- - "979"
196
- server:
197
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
198
- date:
199
- - Thu, 21 Apr 2011 18:04:20 GMT
200
- connection:
201
- - close
202
- set-cookie:
203
- - _recurly_session=ae0230f66fab3bbd46409a4e29b8565c; domain=.recurly.local; path=/; HttpOnly
204
- body: |
205
- <?xml version="1.0" encoding="UTF-8"?>
206
- <subscription>
207
- <id>subscription-refund-full-1301881900</id>
208
- <account_code>subscription-refund-full-1301881900</account_code>
209
- <plan>
210
- <plan_code>paid</plan_code>
211
- <name>Paid</name>
212
- </plan>
213
- <state>active</state>
214
- <quantity type="integer">1</quantity>
215
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
216
- <total_amount_in_cents type="integer">0</total_amount_in_cents>
217
- <activated_at type="datetime">2011-04-21T18:04:18Z</activated_at>
218
- <canceled_at nil="true" type="datetime"></canceled_at>
219
- <expires_at nil="true" type="datetime"></expires_at>
220
- <current_period_started_at type="datetime">2011-04-21T18:04:18Z</current_period_started_at>
221
- <current_period_ends_at type="datetime">2011-05-21T18:04:18Z</current_period_ends_at>
222
- <trial_started_at nil="true" type="datetime"></trial_started_at>
223
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
224
- <add_ons type="array">
225
- </add_ons>
226
- </subscription>
227
-
228
- http_version: "1.1"
229
- - !ruby/struct:VCR::HTTPInteraction
230
- request: !ruby/struct:VCR::Request
231
- method: :get
232
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-full-1301881900/subscription.xml
233
- body:
234
- headers:
235
- authorization:
236
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
237
- user-agent:
238
- - Recurly Ruby Client v0.4.6
239
- accept:
240
- - application/xml
241
- accept-encoding:
242
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
243
- connection:
244
- - close
245
- response: !ruby/struct:VCR::Response
246
- status: !ruby/struct:VCR::ResponseStatus
247
- code: 200
248
- message: "OK "
249
- headers:
250
- x-runtime:
251
- - "285"
252
- content-type:
253
- - application/xml; charset=utf-8
254
- etag:
255
- - "\"dbfdc2bc80920ddc30cfd1a8bb858ce9\""
256
- cache-control:
257
- - private, max-age=0, must-revalidate
258
- content-length:
259
- - "979"
260
- server:
261
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
262
- date:
263
- - Thu, 21 Apr 2011 18:04:22 GMT
264
- connection:
265
- - close
266
- set-cookie:
267
- - _recurly_session=ebd91d45bf4e5aeadafd7a03947fea73; domain=.recurly.local; path=/; HttpOnly
268
- body: |
269
- <?xml version="1.0" encoding="UTF-8"?>
270
- <subscription>
271
- <id>subscription-refund-full-1301881900</id>
272
- <account_code>subscription-refund-full-1301881900</account_code>
273
- <plan>
274
- <plan_code>paid</plan_code>
275
- <name>Paid</name>
276
- </plan>
277
- <state>active</state>
278
- <quantity type="integer">1</quantity>
279
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
280
- <total_amount_in_cents type="integer">0</total_amount_in_cents>
281
- <activated_at type="datetime">2011-04-21T18:04:18Z</activated_at>
282
- <canceled_at nil="true" type="datetime"></canceled_at>
283
- <expires_at nil="true" type="datetime"></expires_at>
284
- <current_period_started_at type="datetime">2011-04-21T18:04:18Z</current_period_started_at>
285
- <current_period_ends_at type="datetime">2011-05-21T18:04:18Z</current_period_ends_at>
286
- <trial_started_at nil="true" type="datetime"></trial_started_at>
287
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
288
- <add_ons type="array">
289
- </add_ons>
290
- </subscription>
291
-
292
- http_version: "1.1"
293
- - !ruby/struct:VCR::HTTPInteraction
294
- request: !ruby/struct:VCR::Request
295
- method: :delete
296
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-full-1301881900/subscription.xml?refund=full
297
- body:
298
- headers:
299
- authorization:
300
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
301
- user-agent:
302
- - Recurly Ruby Client v0.4.6
303
- accept:
304
- - application/xml
305
- connection:
306
- - close
307
- response: !ruby/struct:VCR::Response
308
- status: !ruby/struct:VCR::ResponseStatus
309
- code: 422
310
- message: ""
311
- headers:
312
- cache-control:
313
- - no-cache
314
- x-runtime:
315
- - "251"
316
- content-type:
317
- - application/xml; charset=utf-8
318
- content-length:
319
- - "135"
320
- server:
321
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
322
- date:
323
- - Thu, 21 Apr 2011 18:04:24 GMT
324
- connection:
325
- - close
326
- set-cookie:
327
- - _recurly_session=b0caafde8e9336d7258042d7250e0d75; domain=.recurly.local; path=/; HttpOnly
328
- body: |
329
- <?xml version="1.0" encoding="UTF-8"?>
330
- <errors>
331
- <error>The transaction cannot be refunded. Please contact support.</error>
332
- </errors>
333
-
334
- http_version: "1.1"
@@ -1,334 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>subscription-refund-partial-1301881900</account-code>
10
- <first-name>Verena</first-name>
11
- <last-name>Test</last-name>
12
- <email>verena@test.com</email>
13
- <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
- <accept-language type="yaml" nil="true"></accept-language>
19
- </account>
20
-
21
- headers:
22
- authorization:
23
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
24
- user-agent:
25
- - Recurly Ruby Client v0.4.6
26
- content-type:
27
- - application/xml
28
- accept:
29
- - "*/*"
30
- connection:
31
- - close
32
- response: !ruby/struct:VCR::Response
33
- status: !ruby/struct:VCR::ResponseStatus
34
- code: 201
35
- message: "Created "
36
- headers:
37
- cache-control:
38
- - no-cache
39
- location:
40
- - http://app.recurly.local:3000/accounts/subscription-refund-partial-1301881900
41
- x-runtime:
42
- - "477"
43
- content-type:
44
- - application/xml; charset=utf-8
45
- content-length:
46
- - "609"
47
- server:
48
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
49
- date:
50
- - Thu, 21 Apr 2011 18:04:26 GMT
51
- connection:
52
- - close
53
- set-cookie:
54
- - _recurly_session=aafe659c28a68e97a1ea51597764168c; domain=.recurly.local; path=/; HttpOnly
55
- body: |
56
- <?xml version="1.0" encoding="UTF-8"?>
57
- <account>
58
- <id>subscription-refund-partial-1301881900</id>
59
- <account_code>subscription-refund-partial-1301881900</account_code>
60
- <username></username>
61
- <email>verena@test.com</email>
62
- <first_name>Verena</first_name>
63
- <last_name>Test</last_name>
64
- <company_name>Recurly Ruby Gem</company_name>
65
- <balance_in_cents type="integer">0</balance_in_cents>
66
- <closed type="boolean">false</closed>
67
- <hosted_login_token>d5198a13bb5b4105900581336219f43a</hosted_login_token>
68
- <created_at type="datetime">2011-04-21T18:04:26Z</created_at>
69
- <state>active</state>
70
- </account>
71
-
72
- http_version: "1.1"
73
- - !ruby/struct:VCR::HTTPInteraction
74
- request: !ruby/struct:VCR::Request
75
- method: :get
76
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
77
- body:
78
- headers:
79
- authorization:
80
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
81
- user-agent:
82
- - Recurly Ruby Client v0.4.6
83
- accept:
84
- - application/xml
85
- accept-encoding:
86
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
- connection:
88
- - close
89
- response: !ruby/struct:VCR::Response
90
- status: !ruby/struct:VCR::ResponseStatus
91
- code: 200
92
- message: "OK "
93
- headers:
94
- x-runtime:
95
- - "327"
96
- content-type:
97
- - application/xml; charset=utf-8
98
- etag:
99
- - "\"3888306c167f105a4e165433ee427264\""
100
- cache-control:
101
- - private, max-age=0, must-revalidate
102
- content-length:
103
- - "612"
104
- server:
105
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
106
- date:
107
- - Thu, 21 Apr 2011 18:04:28 GMT
108
- connection:
109
- - close
110
- set-cookie:
111
- - _recurly_session=e9af458d1382491a53a4211910e20b7a; domain=.recurly.local; path=/; HttpOnly
112
- body: |
113
- <?xml version="1.0" encoding="UTF-8"?>
114
- <plan>
115
- <plan_code>paid</plan_code>
116
- <name>Paid</name>
117
- <description></description>
118
- <success_url></success_url>
119
- <cancel_url></cancel_url>
120
- <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
121
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
122
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
123
- <plan_interval_length type="integer">1</plan_interval_length>
124
- <plan_interval_unit>months</plan_interval_unit>
125
- <trial_interval_length type="integer">0</trial_interval_length>
126
- <trial_interval_unit>months</trial_interval_unit>
127
- </plan>
128
-
129
- http_version: "1.1"
130
- - !ruby/struct:VCR::HTTPInteraction
131
- request: !ruby/struct:VCR::Request
132
- method: :post
133
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml
134
- body: |
135
- <?xml version="1.0" encoding="UTF-8"?>
136
- <subscription>
137
- <plan-code>paid</plan-code>
138
- <quantity type="integer">1</quantity>
139
- <account>
140
- <account-code>subscription-refund-partial-1301881900</account-code>
141
- <first-name>Verena</first-name>
142
- <last-name>Test</last-name>
143
- <email>verena@test.com</email>
144
- <company-name>Recurly Ruby Gem</company-name>
145
- <billing-info>
146
- <first-name>Verena</first-name>
147
- <last-name>Test</last-name>
148
- <address1>123 Test St</address1>
149
- <city>San Francisco</city>
150
- <state>CA</state>
151
- <zip>94115</zip>
152
- <country>US</country>
153
- <credit-card>
154
- <number>4111111111111111</number>
155
- <year type="integer">2012</year>
156
- <month type="integer">4</month>
157
- <verification-value>123</verification-value>
158
- </credit-card>
159
- </billing-info>
160
- <accept-language type="yaml" nil="true"></accept-language>
161
- <id>subscription-refund-partial-1301881900</id>
162
- <username type="yaml" nil="true"></username>
163
- <balance-in-cents type="integer">0</balance-in-cents>
164
- <closed type="boolean">false</closed>
165
- <hosted-login-token>d5198a13bb5b4105900581336219f43a</hosted-login-token>
166
- <created-at type="datetime">2011-04-21T18:04:26Z</created-at>
167
- <state>active</state>
168
- </account>
169
- <addons type="array"/>
170
- </subscription>
171
-
172
- headers:
173
- authorization:
174
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
175
- user-agent:
176
- - Recurly Ruby Client v0.4.6
177
- content-type:
178
- - application/xml
179
- accept:
180
- - "*/*"
181
- connection:
182
- - close
183
- response: !ruby/struct:VCR::Response
184
- status: !ruby/struct:VCR::ResponseStatus
185
- code: 201
186
- message: "Created "
187
- headers:
188
- cache-control:
189
- - no-cache
190
- x-runtime:
191
- - "3138"
192
- content-type:
193
- - application/xml; charset=utf-8
194
- content-length:
195
- - "985"
196
- server:
197
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
198
- date:
199
- - Thu, 21 Apr 2011 18:04:34 GMT
200
- connection:
201
- - close
202
- set-cookie:
203
- - _recurly_session=e726e4b3eb95d4f29f7db023df8eff3a; domain=.recurly.local; path=/; HttpOnly
204
- body: |
205
- <?xml version="1.0" encoding="UTF-8"?>
206
- <subscription>
207
- <id>subscription-refund-partial-1301881900</id>
208
- <account_code>subscription-refund-partial-1301881900</account_code>
209
- <plan>
210
- <plan_code>paid</plan_code>
211
- <name>Paid</name>
212
- </plan>
213
- <state>active</state>
214
- <quantity type="integer">1</quantity>
215
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
216
- <total_amount_in_cents type="integer">0</total_amount_in_cents>
217
- <activated_at type="datetime">2011-04-21T18:04:31Z</activated_at>
218
- <canceled_at nil="true" type="datetime"></canceled_at>
219
- <expires_at nil="true" type="datetime"></expires_at>
220
- <current_period_started_at type="datetime">2011-04-21T18:04:31Z</current_period_started_at>
221
- <current_period_ends_at type="datetime">2011-05-21T18:04:31Z</current_period_ends_at>
222
- <trial_started_at nil="true" type="datetime"></trial_started_at>
223
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
224
- <add_ons type="array">
225
- </add_ons>
226
- </subscription>
227
-
228
- http_version: "1.1"
229
- - !ruby/struct:VCR::HTTPInteraction
230
- request: !ruby/struct:VCR::Request
231
- method: :get
232
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml
233
- body:
234
- headers:
235
- authorization:
236
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
237
- user-agent:
238
- - Recurly Ruby Client v0.4.6
239
- accept:
240
- - application/xml
241
- accept-encoding:
242
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
243
- connection:
244
- - close
245
- response: !ruby/struct:VCR::Response
246
- status: !ruby/struct:VCR::ResponseStatus
247
- code: 200
248
- message: "OK "
249
- headers:
250
- x-runtime:
251
- - "273"
252
- content-type:
253
- - application/xml; charset=utf-8
254
- etag:
255
- - "\"68ae9fa75472e998448cc34c7fed6e3f\""
256
- cache-control:
257
- - private, max-age=0, must-revalidate
258
- content-length:
259
- - "985"
260
- server:
261
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
262
- date:
263
- - Thu, 21 Apr 2011 18:04:36 GMT
264
- connection:
265
- - close
266
- set-cookie:
267
- - _recurly_session=3bc9c76a4ab09ed5c27a6d6d06d968b9; domain=.recurly.local; path=/; HttpOnly
268
- body: |
269
- <?xml version="1.0" encoding="UTF-8"?>
270
- <subscription>
271
- <id>subscription-refund-partial-1301881900</id>
272
- <account_code>subscription-refund-partial-1301881900</account_code>
273
- <plan>
274
- <plan_code>paid</plan_code>
275
- <name>Paid</name>
276
- </plan>
277
- <state>active</state>
278
- <quantity type="integer">1</quantity>
279
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
280
- <total_amount_in_cents type="integer">0</total_amount_in_cents>
281
- <activated_at type="datetime">2011-04-21T18:04:31Z</activated_at>
282
- <canceled_at nil="true" type="datetime"></canceled_at>
283
- <expires_at nil="true" type="datetime"></expires_at>
284
- <current_period_started_at type="datetime">2011-04-21T18:04:31Z</current_period_started_at>
285
- <current_period_ends_at type="datetime">2011-05-21T18:04:31Z</current_period_ends_at>
286
- <trial_started_at nil="true" type="datetime"></trial_started_at>
287
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
288
- <add_ons type="array">
289
- </add_ons>
290
- </subscription>
291
-
292
- http_version: "1.1"
293
- - !ruby/struct:VCR::HTTPInteraction
294
- request: !ruby/struct:VCR::Request
295
- method: :delete
296
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml?refund=partial
297
- body:
298
- headers:
299
- authorization:
300
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
301
- user-agent:
302
- - Recurly Ruby Client v0.4.6
303
- accept:
304
- - application/xml
305
- connection:
306
- - close
307
- response: !ruby/struct:VCR::Response
308
- status: !ruby/struct:VCR::ResponseStatus
309
- code: 422
310
- message: ""
311
- headers:
312
- cache-control:
313
- - no-cache
314
- x-runtime:
315
- - "237"
316
- content-type:
317
- - application/xml; charset=utf-8
318
- content-length:
319
- - "135"
320
- server:
321
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
322
- date:
323
- - Thu, 21 Apr 2011 18:04:38 GMT
324
- connection:
325
- - close
326
- set-cookie:
327
- - _recurly_session=ed56b3c26d5ddc7e019ca17186743758; domain=.recurly.local; path=/; HttpOnly
328
- body: |
329
- <?xml version="1.0" encoding="UTF-8"?>
330
- <errors>
331
- <error>The transaction cannot be refunded. Please contact support.</error>
332
- </errors>
333
-
334
- http_version: "1.1"