recurly 0.4.2 → 0.4.3

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 (71) hide show
  1. data/lib/recurly.rb +1 -0
  2. data/lib/recurly/base.rb +92 -12
  3. data/lib/recurly/formats/xml_with_errors.rb +132 -0
  4. data/lib/recurly/version.rb +1 -1
  5. data/spec/config/recurly.yml +4 -4
  6. data/spec/integration/transaction_spec.rb +4 -3
  7. data/spec/vcr/account/accept-language-account/1297746103.yml +6 -6
  8. data/spec/vcr/account/close/1297746103.yml +17 -17
  9. data/spec/vcr/account/create-blank/1297746103.yml +4 -4
  10. data/spec/vcr/account/create-duplicate/1297746103.yml +10 -10
  11. data/spec/vcr/account/create-min/1297746103.yml +6 -6
  12. data/spec/vcr/account/create/1297746103.yml +6 -6
  13. data/spec/vcr/account/find/1297746103.yml +16 -16
  14. data/spec/vcr/account/list/1297746103.yml +204 -156
  15. data/spec/vcr/account/update/1297746103.yml +29 -29
  16. data/spec/vcr/billing/create/1298594128.yml +21 -21
  17. data/spec/vcr/billing/destroy/1298594128.yml +28 -28
  18. data/spec/vcr/billing/find/1298594128.yml +28 -28
  19. data/spec/vcr/billing/update/1298594128.yml +29 -29
  20. data/spec/vcr/charge/create/1297746103.yml +29 -29
  21. data/spec/vcr/charge/delete-uninvoiced/1297746103.yml +32 -32
  22. data/spec/vcr/charge/list-all/1297746103.yml +41 -41
  23. data/spec/vcr/charge/list-invoiced/1297746103.yml +68 -68
  24. data/spec/vcr/charge/list-pending/1297746103.yml +41 -41
  25. data/spec/vcr/charge/lookup/1297746103.yml +21 -21
  26. data/spec/vcr/coupon/create/1299714521.yml +25 -25
  27. data/spec/vcr/coupon/destroy/1299714521.yml +22 -22
  28. data/spec/vcr/credit/create/1299714599.yml +21 -21
  29. data/spec/vcr/credit/delete/1299714599.yml +28 -28
  30. data/spec/vcr/credit/list/1299714599.yml +41 -41
  31. data/spec/vcr/credit/lookup/1299714599.yml +21 -21
  32. data/spec/vcr/invoice/create-no-charges/1297746103.yml +18 -18
  33. data/spec/vcr/invoice/create/1297746103.yml +42 -42
  34. data/spec/vcr/invoice/list/1297746103.yml +61 -61
  35. data/spec/vcr/invoice/lookup/1297746103.yml +43 -43
  36. data/spec/vcr/plan/all.yml +65 -52
  37. data/spec/vcr/plan/find.yml +58 -34
  38. data/spec/vcr/plan/update.yml +28 -29
  39. data/spec/vcr/subscription/addons/add/1297746103.yml +293 -335
  40. data/spec/vcr/subscription/addons/add/1301884213.yml +480 -0
  41. data/spec/vcr/subscription/addons/create/1297746103.yml +134 -335
  42. data/spec/vcr/subscription/addons/create/1301884213.yml +321 -0
  43. data/spec/vcr/subscription/addons/remove/1297746103.yml +262 -335
  44. data/spec/vcr/subscription/addons/remove/1301884213.yml +449 -0
  45. data/spec/vcr/subscription/cancel-with-code/{1297746103.yml → 1301881900.yml} +104 -92
  46. data/spec/vcr/subscription/cancel/{1297746103.yml → 1301881900.yml} +90 -78
  47. data/spec/vcr/subscription/change1/{1297746103.yml → 1301881900.yml} +86 -74
  48. data/spec/vcr/subscription/change2/{1297746103.yml → 1301881900.yml} +86 -74
  49. data/spec/vcr/subscription/create/{1297746103.yml → 1301881900.yml} +50 -38
  50. data/spec/vcr/subscription/find/{1297746103.yml → 1301881900.yml} +62 -50
  51. data/spec/vcr/subscription/reactivate/{1297746103.yml → 1301881900.yml} +95 -83
  52. data/spec/vcr/subscription/refund-full/{1297746103.yml → 1301881900.yml} +79 -67
  53. data/spec/vcr/subscription/refund-none/{1297746103.yml → 1301881900.yml} +79 -67
  54. data/spec/vcr/subscription/refund-partial/{1297746103.yml → 1301881900.yml} +79 -67
  55. data/spec/vcr/transaction/all/1301883347.yml +387 -0
  56. data/spec/vcr/transaction/create-no-account/{1300473500.yml → 1301883347.yml} +18 -18
  57. data/spec/vcr/transaction/create-with-account/{1300473500.yml → 1301883347.yml} +37 -37
  58. data/spec/vcr/transaction/list-filled/{1300473500.yml → 1301883347.yml} +169 -169
  59. data/spec/vcr/transaction/list-initial/{1300473500.yml → 1301883347.yml} +39 -39
  60. data/spec/vcr/transaction/lookup/{1300473500.yml → 1301883347.yml} +119 -119
  61. data/spec/vcr/transaction/refund/{1300473500.yml → 1301883347.yml} +53 -53
  62. data/spec/vcr/transaction/void/1301883347.yml +365 -0
  63. data/spec/vcr/transparent/post-url/{1300476053.yml → 1301879142.yml} +19 -19
  64. metadata +66 -58
  65. data/spec/vcr/transaction/all/1300473500.yml +0 -387
  66. data/spec/vcr/transaction/void/1300473500.yml +0 -620
  67. data/spec/vcr/transparent/post-url/1300475927.yml +0 -41
  68. data/spec/vcr/transparent/post-url/1300475952.yml +0 -41
  69. data/spec/vcr/transparent/post-url/1300476034.yml +0 -125
  70. data/spec/vcr/transparent/post-url/1300476102.yml +0 -125
  71. data/spec/vcr/transparent/post-url/1300476126.yml +0 -125
@@ -2,11 +2,11 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
5
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>subscription-refund-partial-1297746103</account-code>
9
+ <account-code>subscription-refund-partial-1301881900</account-code>
10
10
  <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
@@ -20,7 +20,7 @@
20
20
 
21
21
  headers:
22
22
  authorization:
23
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
23
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
24
24
  content-type:
25
25
  - application/xml
26
26
  accept:
@@ -37,15 +37,15 @@
37
37
  cache-control:
38
38
  - no-cache
39
39
  location:
40
- - http://app.recurly.local:3000/accounts/subscription-refund-partial-1297746103
40
+ - http://app.recurly.local:3000/accounts/subscription-refund-partial-1301881900
41
41
  x-runtime:
42
- - "361"
42
+ - "585"
43
43
  content-type:
44
44
  - application/xml; charset=utf-8
45
45
  content-length:
46
46
  - "609"
47
47
  set-cookie:
48
- - _recurly_session=aa1e28d4a483ba1087d38f74098d0319; domain=.recurly.local; path=/; HttpOnly
48
+ - _recurly_session=ad0d5bd2cdffbb2cbeffb01e72266eed; domain=.recurly.local; path=/; HttpOnly
49
49
  connection:
50
50
  - close
51
51
  server:
@@ -53,8 +53,8 @@
53
53
  body: |
54
54
  <?xml version="1.0" encoding="UTF-8"?>
55
55
  <account>
56
- <id>subscription-refund-partial-1297746103</id>
57
- <account_code>subscription-refund-partial-1297746103</account_code>
56
+ <id>subscription-refund-partial-1301881900</id>
57
+ <account_code>subscription-refund-partial-1301881900</account_code>
58
58
  <username></username>
59
59
  <email>verena@test.com</email>
60
60
  <first_name>Verena</first_name>
@@ -62,8 +62,8 @@
62
62
  <company_name>Recurly Ruby Gem</company_name>
63
63
  <balance_in_cents type="integer">0</balance_in_cents>
64
64
  <closed type="boolean">false</closed>
65
- <hosted_login_token>c987d227d7e64d14b9ca4d9972f5277b</hosted_login_token>
66
- <created_at type="datetime">2011-03-18T18:55:14Z</created_at>
65
+ <hosted_login_token>77c5464c624a4305a740b8e1c5158df5</hosted_login_token>
66
+ <created_at type="datetime">2011-04-04T02:25:17Z</created_at>
67
67
  <state>active</state>
68
68
  </account>
69
69
 
@@ -71,11 +71,11 @@
71
71
  - !ruby/struct:VCR::HTTPInteraction
72
72
  request: !ruby/struct:VCR::Request
73
73
  method: :get
74
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/paid.xml
74
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/paid.xml
75
75
  body:
76
76
  headers:
77
77
  authorization:
78
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
78
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
79
79
  accept:
80
80
  - application/xml
81
81
  accept-encoding:
@@ -90,17 +90,17 @@
90
90
  message: OK
91
91
  headers:
92
92
  x-runtime:
93
- - "92"
93
+ - "310"
94
94
  content-type:
95
95
  - application/xml; charset=utf-8
96
96
  etag:
97
- - "\"dc04fba13f15d49d04ca6692abb21ff9\""
97
+ - "\"eea146faf9def8e0ad1bce0a43411f13\""
98
98
  cache-control:
99
99
  - private, max-age=0, must-revalidate
100
100
  content-length:
101
- - "1146"
101
+ - "1558"
102
102
  set-cookie:
103
- - _recurly_session=c92e429496ddf4878c4c2cb1c6b779a4; domain=.recurly.local; path=/; HttpOnly
103
+ - _recurly_session=a52ac030b4048d6686ca813593e3f2ac; domain=.recurly.local; path=/; HttpOnly
104
104
  connection:
105
105
  - close
106
106
  server:
@@ -113,37 +113,49 @@
113
113
  <description></description>
114
114
  <success_url></success_url>
115
115
  <cancel_url></cancel_url>
116
- <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
117
- <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
116
+ <created_at type="datetime">2011-04-03T21:46:48Z</created_at>
117
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
118
118
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
119
119
  <plan_interval_length type="integer">1</plan_interval_length>
120
- <plan_interval_unit>days</plan_interval_unit>
120
+ <plan_interval_unit>months</plan_interval_unit>
121
121
  <trial_interval_length type="integer">0</trial_interval_length>
122
122
  <trial_interval_unit>months</trial_interval_unit>
123
123
  <latest_version depreciated="true">
124
124
  <version type="integer">1</version>
125
- <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
125
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
126
126
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
127
127
  <plan_interval_length type="integer">1</plan_interval_length>
128
- <plan_interval_unit>days</plan_interval_unit>
128
+ <plan_interval_unit>months</plan_interval_unit>
129
129
  <trial_interval_length type="integer">0</trial_interval_length>
130
130
  <trial_interval_unit>months</trial_interval_unit>
131
- <created_at type="datetime">2011-02-21T01:06:56Z</created_at>
131
+ <created_at type="datetime">2011-04-04T02:15:00Z</created_at>
132
132
  </latest_version>
133
+ <add_ons type="array">
134
+ <add_on>
135
+ <add_on_code>special</add_on_code>
136
+ <default_unit_amount_in_cents>1000</default_unit_amount_in_cents>
137
+ <default_quantity>1</default_quantity>
138
+ </add_on>
139
+ <add_on>
140
+ <add_on_code>special2</add_on_code>
141
+ <default_unit_amount_in_cents>50000</default_unit_amount_in_cents>
142
+ <default_quantity>1</default_quantity>
143
+ </add_on>
144
+ </add_ons>
133
145
  </plan>
134
146
 
135
147
  http_version: "1.1"
136
148
  - !ruby/struct:VCR::HTTPInteraction
137
149
  request: !ruby/struct:VCR::Request
138
150
  method: :post
139
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-refund-partial-1297746103/subscription.xml
151
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml
140
152
  body: |
141
153
  <?xml version="1.0" encoding="UTF-8"?>
142
154
  <subscription>
143
155
  <plan-code>paid</plan-code>
144
156
  <quantity type="integer">1</quantity>
145
157
  <account>
146
- <account-code>subscription-refund-partial-1297746103</account-code>
158
+ <account-code>subscription-refund-partial-1301881900</account-code>
147
159
  <first-name>Verena</first-name>
148
160
  <last-name>Test</last-name>
149
161
  <email>verena@test.com</email>
@@ -159,17 +171,17 @@
159
171
  <credit-card>
160
172
  <number>4111111111111111</number>
161
173
  <year type="integer">2012</year>
162
- <month type="integer">3</month>
174
+ <month type="integer">4</month>
163
175
  <verification-value>123</verification-value>
164
176
  </credit-card>
165
177
  </billing-info>
166
178
  <accept-language type="yaml" nil="true"></accept-language>
167
- <id>subscription-refund-partial-1297746103</id>
179
+ <id>subscription-refund-partial-1301881900</id>
168
180
  <username type="yaml" nil="true"></username>
169
181
  <balance-in-cents type="integer">0</balance-in-cents>
170
182
  <closed type="boolean">false</closed>
171
- <hosted-login-token>c987d227d7e64d14b9ca4d9972f5277b</hosted-login-token>
172
- <created-at type="datetime">2011-03-18T18:55:14Z</created-at>
183
+ <hosted-login-token>77c5464c624a4305a740b8e1c5158df5</hosted-login-token>
184
+ <created-at type="datetime">2011-04-04T02:25:17Z</created-at>
173
185
  <state>active</state>
174
186
  </account>
175
187
  <addons type="array"/>
@@ -177,7 +189,7 @@
177
189
 
178
190
  headers:
179
191
  authorization:
180
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
192
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
181
193
  content-type:
182
194
  - application/xml
183
195
  accept:
@@ -194,13 +206,13 @@
194
206
  cache-control:
195
207
  - no-cache
196
208
  x-runtime:
197
- - "7307"
209
+ - "5119"
198
210
  content-type:
199
211
  - application/xml; charset=utf-8
200
212
  content-length:
201
- - "924"
213
+ - "923"
202
214
  set-cookie:
203
- - _recurly_session=c40361afad762f1cb8fafc533aa2f6d0; domain=.recurly.local; path=/; HttpOnly
215
+ - _recurly_session=a3a3cbe6a734f8cb1d521fde2b37c887; domain=.recurly.local; path=/; HttpOnly
204
216
  connection:
205
217
  - close
206
218
  server:
@@ -208,20 +220,20 @@
208
220
  body: |
209
221
  <?xml version="1.0" encoding="UTF-8"?>
210
222
  <subscription>
211
- <id>subscription-refund-partial-1297746103</id>
212
- <account_code>subscription-refund-partial-1297746103</account_code>
223
+ <id>subscription-refund-partial-1301881900</id>
224
+ <account_code>subscription-refund-partial-1301881900</account_code>
213
225
  <plan>
214
226
  <plan_code>paid</plan_code>
215
227
  <name>Paid</name>
216
228
  </plan>
217
229
  <state>active</state>
218
230
  <quantity type="integer">1</quantity>
219
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
220
- <activated_at type="datetime">2011-03-18T18:55:19Z</activated_at>
231
+ <total_amount_in_cents type="integer">200</total_amount_in_cents>
232
+ <activated_at type="datetime">2011-04-04T02:25:22Z</activated_at>
221
233
  <canceled_at nil="true" type="datetime"></canceled_at>
222
234
  <expires_at nil="true" type="datetime"></expires_at>
223
- <current_period_started_at type="datetime">2011-03-18T18:55:19Z</current_period_started_at>
224
- <current_period_ends_at type="datetime">2011-03-19T18:55:19Z</current_period_ends_at>
235
+ <current_period_started_at type="datetime">2011-04-04T02:25:22Z</current_period_started_at>
236
+ <current_period_ends_at type="datetime">2011-05-04T02:25:22Z</current_period_ends_at>
225
237
  <trial_started_at nil="true" type="datetime"></trial_started_at>
226
238
  <trial_ends_at nil="true" type="datetime"></trial_ends_at>
227
239
  <add_ons type="array">
@@ -232,11 +244,11 @@
232
244
  - !ruby/struct:VCR::HTTPInteraction
233
245
  request: !ruby/struct:VCR::Request
234
246
  method: :get
235
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-refund-partial-1297746103/subscription.xml
247
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml
236
248
  body:
237
249
  headers:
238
250
  authorization:
239
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
251
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
240
252
  accept:
241
253
  - application/xml
242
254
  accept-encoding:
@@ -251,17 +263,17 @@
251
263
  message: OK
252
264
  headers:
253
265
  x-runtime:
254
- - "354"
266
+ - "303"
255
267
  content-type:
256
268
  - application/xml; charset=utf-8
257
269
  etag:
258
- - "\"f79be5b046ccf33f92651818ae3f3966\""
270
+ - "\"84010c058a3ea668aa116f4c9c607ffd\""
259
271
  cache-control:
260
272
  - private, max-age=0, must-revalidate
261
273
  content-length:
262
- - "924"
274
+ - "923"
263
275
  set-cookie:
264
- - _recurly_session=c3e82d98b3479da3e3894bc32ea71a39; domain=.recurly.local; path=/; HttpOnly
276
+ - _recurly_session=77b71c5bb4c1b3ba0e338429e762a2f9; domain=.recurly.local; path=/; HttpOnly
265
277
  connection:
266
278
  - close
267
279
  server:
@@ -269,20 +281,20 @@
269
281
  body: |
270
282
  <?xml version="1.0" encoding="UTF-8"?>
271
283
  <subscription>
272
- <id>subscription-refund-partial-1297746103</id>
273
- <account_code>subscription-refund-partial-1297746103</account_code>
284
+ <id>subscription-refund-partial-1301881900</id>
285
+ <account_code>subscription-refund-partial-1301881900</account_code>
274
286
  <plan>
275
287
  <plan_code>paid</plan_code>
276
288
  <name>Paid</name>
277
289
  </plan>
278
290
  <state>active</state>
279
291
  <quantity type="integer">1</quantity>
280
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
281
- <activated_at type="datetime">2011-03-18T18:55:19Z</activated_at>
292
+ <total_amount_in_cents type="integer">200</total_amount_in_cents>
293
+ <activated_at type="datetime">2011-04-04T02:25:22Z</activated_at>
282
294
  <canceled_at nil="true" type="datetime"></canceled_at>
283
295
  <expires_at nil="true" type="datetime"></expires_at>
284
- <current_period_started_at type="datetime">2011-03-18T18:55:19Z</current_period_started_at>
285
- <current_period_ends_at type="datetime">2011-03-19T18:55:19Z</current_period_ends_at>
296
+ <current_period_started_at type="datetime">2011-04-04T02:25:22Z</current_period_started_at>
297
+ <current_period_ends_at type="datetime">2011-05-04T02:25:22Z</current_period_ends_at>
286
298
  <trial_started_at nil="true" type="datetime"></trial_started_at>
287
299
  <trial_ends_at nil="true" type="datetime"></trial_ends_at>
288
300
  <add_ons type="array">
@@ -293,11 +305,11 @@
293
305
  - !ruby/struct:VCR::HTTPInteraction
294
306
  request: !ruby/struct:VCR::Request
295
307
  method: :delete
296
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-refund-partial-1297746103/subscription.xml?refund=partial
308
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml?refund=partial
297
309
  body:
298
310
  headers:
299
311
  authorization:
300
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
312
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
301
313
  accept:
302
314
  - application/xml
303
315
  user-agent:
@@ -310,17 +322,17 @@
310
322
  message: OK
311
323
  headers:
312
324
  x-runtime:
313
- - "2478"
325
+ - "637"
314
326
  content-type:
315
327
  - application/xml; charset=utf-8
316
328
  etag:
317
- - "\"def9dd49cd9f85d7fb2b91784ee6d918\""
329
+ - "\"6b1ab433c1e0ea121bf150047006ec9f\""
318
330
  cache-control:
319
331
  - private, max-age=0, must-revalidate
320
332
  content-length:
321
- - "943"
333
+ - "942"
322
334
  set-cookie:
323
- - _recurly_session=9f62dbd9c61280309a306398f39fbc0c; domain=.recurly.local; path=/; HttpOnly
335
+ - _recurly_session=3f9d2ed0c1e05208e3b9a5c5d0f368f7; domain=.recurly.local; path=/; HttpOnly
324
336
  connection:
325
337
  - close
326
338
  server:
@@ -328,20 +340,20 @@
328
340
  body: |
329
341
  <?xml version="1.0" encoding="UTF-8"?>
330
342
  <subscription>
331
- <id>subscription-refund-partial-1297746103</id>
332
- <account_code>subscription-refund-partial-1297746103</account_code>
343
+ <id>subscription-refund-partial-1301881900</id>
344
+ <account_code>subscription-refund-partial-1301881900</account_code>
333
345
  <plan>
334
346
  <plan_code>paid</plan_code>
335
347
  <name>Paid</name>
336
348
  </plan>
337
349
  <state>expired</state>
338
350
  <quantity type="integer">1</quantity>
339
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
340
- <activated_at type="datetime">2011-03-18T18:55:19Z</activated_at>
341
- <canceled_at type="datetime">2011-03-18T18:55:30Z</canceled_at>
342
- <expires_at type="datetime">2011-03-19T18:55:19Z</expires_at>
343
- <current_period_started_at type="datetime">2011-03-18T18:55:19Z</current_period_started_at>
344
- <current_period_ends_at type="datetime">2011-03-19T18:55:19Z</current_period_ends_at>
351
+ <total_amount_in_cents type="integer">200</total_amount_in_cents>
352
+ <activated_at type="datetime">2011-04-04T02:25:22Z</activated_at>
353
+ <canceled_at type="datetime">2011-04-04T02:25:31Z</canceled_at>
354
+ <expires_at type="datetime">2011-05-04T02:25:22Z</expires_at>
355
+ <current_period_started_at type="datetime">2011-04-04T02:25:22Z</current_period_started_at>
356
+ <current_period_ends_at type="datetime">2011-05-04T02:25:22Z</current_period_ends_at>
345
357
  <trial_started_at nil="true" type="datetime"></trial_started_at>
346
358
  <trial_ends_at nil="true" type="datetime"></trial_ends_at>
347
359
  <add_ons type="array">
@@ -352,11 +364,11 @@
352
364
  - !ruby/struct:VCR::HTTPInteraction
353
365
  request: !ruby/struct:VCR::Request
354
366
  method: :get
355
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-refund-partial-1297746103/subscription.xml
367
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-refund-partial-1301881900/subscription.xml
356
368
  body:
357
369
  headers:
358
370
  authorization:
359
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
371
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
360
372
  accept:
361
373
  - application/xml
362
374
  accept-encoding:
@@ -377,7 +389,7 @@
377
389
  content-length:
378
390
  - "98"
379
391
  set-cookie:
380
- - _recurly_session=498fd5a20b93d6a0cea08e93d26a4d8d; domain=.recurly.local; path=/; HttpOnly
392
+ - _recurly_session=a074d8567ab12cf6212b120a8cde0a71; domain=.recurly.local; path=/; HttpOnly
381
393
  connection:
382
394
  - close
383
395
  server:
@@ -0,0 +1,387 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/transactions.xml
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
10
+ accept:
11
+ - application/xml
12
+ accept-encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ user-agent:
15
+ - Ruby
16
+ connection:
17
+ - close
18
+ response: !ruby/struct:VCR::Response
19
+ status: !ruby/struct:VCR::ResponseStatus
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ x-runtime:
24
+ - "522"
25
+ content-type:
26
+ - application/xml; charset=utf-8
27
+ etag:
28
+ - "\"6a0f8d1524632da7b4f187dc5d122e9a\""
29
+ cache-control:
30
+ - private, max-age=0, must-revalidate
31
+ content-length:
32
+ - "15637"
33
+ set-cookie:
34
+ - _recurly_session=b2f3f730efe7b5710eaa4a42d9efae72; domain=.recurly.local; path=/; HttpOnly
35
+ connection:
36
+ - close
37
+ server:
38
+ - thin 1.2.7 codename No Hup
39
+ body: |
40
+ <?xml version="1.0" encoding="UTF-8"?>
41
+ <transactions type="collection">
42
+ <current_page type="integer">1</current_page>
43
+ <per_page type="integer">20</per_page>
44
+ <total_entries type="integer">30</total_entries>
45
+ <transaction type="Payment">
46
+ <id>bc291231b35843d9810af8c19401d6a2</id>
47
+ <account_code>transaction-create-with-account-1301883347</account_code>
48
+ <action>purchase</action>
49
+ <date type="datetime">2011-04-04T02:26:04Z</date>
50
+ <amount_in_cents type="integer">700</amount_in_cents>
51
+ <status>success</status>
52
+ <message>Test Gateway: Successful test transaction</message>
53
+ <reference>12345</reference>
54
+ <cvv_result code="M">Match</cvv_result>
55
+ <avs_result code="D">Street address and postal code match.</avs_result>
56
+ <avs_result_street>Y</avs_result_street>
57
+ <avs_result_postal>Y</avs_result_postal>
58
+ <test type="boolean">true</test>
59
+ <voidable type="boolean">true</voidable>
60
+ <refundable type="boolean">true</refundable>
61
+ </transaction>
62
+ <transaction type="Payment">
63
+ <id>03e3c4daa9b641318392ebee406ffcef</id>
64
+ <account_code>transaction-create-with-account-1301883347</account_code>
65
+ <action>authorization</action>
66
+ <date type="datetime">2011-04-04T02:26:01Z</date>
67
+ <amount_in_cents type="integer">0</amount_in_cents>
68
+ <status>success</status>
69
+ <message>Test Gateway: Successful test transaction</message>
70
+ <reference>12345</reference>
71
+ <cvv_result code="M">Match</cvv_result>
72
+ <avs_result code="D">Street address and postal code match.</avs_result>
73
+ <avs_result_street>Y</avs_result_street>
74
+ <avs_result_postal>Y</avs_result_postal>
75
+ <test type="boolean">true</test>
76
+ <voidable type="boolean">false</voidable>
77
+ <refundable type="boolean">true</refundable>
78
+ </transaction>
79
+ <transaction type="Payment">
80
+ <id>5db6cb6042f44b02bea276e4c8f9a4ad</id>
81
+ <account_code>transaction-create-with-accout-1301883347</account_code>
82
+ <action>purchase</action>
83
+ <date type="datetime">2011-04-04T02:25:54Z</date>
84
+ <amount_in_cents type="integer">700</amount_in_cents>
85
+ <status>success</status>
86
+ <message>Test Gateway: Successful test transaction</message>
87
+ <reference>12345</reference>
88
+ <cvv_result code="M">Match</cvv_result>
89
+ <avs_result code="D">Street address and postal code match.</avs_result>
90
+ <avs_result_street>Y</avs_result_street>
91
+ <avs_result_postal>Y</avs_result_postal>
92
+ <test type="boolean">true</test>
93
+ <voidable type="boolean">true</voidable>
94
+ <refundable type="boolean">true</refundable>
95
+ </transaction>
96
+ <transaction type="Payment">
97
+ <id>7aa34360d92445ed94c9d34af020dd8b</id>
98
+ <account_code>subscription-refund-none-1301881900</account_code>
99
+ <action>purchase</action>
100
+ <date type="datetime">2011-04-04T02:25:43Z</date>
101
+ <amount_in_cents type="integer">200</amount_in_cents>
102
+ <status>success</status>
103
+ <message>Test Gateway: Successful test transaction</message>
104
+ <reference>12345</reference>
105
+ <cvv_result code="M">Match</cvv_result>
106
+ <avs_result code="D">Street address and postal code match.</avs_result>
107
+ <avs_result_street>Y</avs_result_street>
108
+ <avs_result_postal>Y</avs_result_postal>
109
+ <test type="boolean">true</test>
110
+ <voidable type="boolean">true</voidable>
111
+ <refundable type="boolean">true</refundable>
112
+ </transaction>
113
+ <transaction type="Payment">
114
+ <id>d12f193dce8843178c25bb07a3d8afec</id>
115
+ <account_code>subscription-refund-partial-1301881900</account_code>
116
+ <action>purchase</action>
117
+ <date type="datetime">2011-04-04T02:25:25Z</date>
118
+ <amount_in_cents type="integer">200</amount_in_cents>
119
+ <status>success</status>
120
+ <message>Test Gateway: Successful test transaction</message>
121
+ <reference>12345</reference>
122
+ <cvv_result code="M">Match</cvv_result>
123
+ <avs_result code="D">Street address and postal code match.</avs_result>
124
+ <avs_result_street>Y</avs_result_street>
125
+ <avs_result_postal>Y</avs_result_postal>
126
+ <test type="boolean">true</test>
127
+ <voidable type="boolean">true</voidable>
128
+ <refundable type="boolean">true</refundable>
129
+ </transaction>
130
+ <transaction type="Payment">
131
+ <id>76b53b7d65264c8b99d18757235d4940</id>
132
+ <account_code>subscription-refund-full-1301881900</account_code>
133
+ <action>purchase</action>
134
+ <date type="datetime">2011-04-04T02:25:05Z</date>
135
+ <amount_in_cents type="integer">200</amount_in_cents>
136
+ <status>void</status>
137
+ <message>Test Gateway: Successful test transaction</message>
138
+ <reference>12345</reference>
139
+ <cvv_result code="M">Match</cvv_result>
140
+ <avs_result code="D">Street address and postal code match.</avs_result>
141
+ <avs_result_street>Y</avs_result_street>
142
+ <avs_result_postal>Y</avs_result_postal>
143
+ <test type="boolean">true</test>
144
+ <voidable type="boolean">false</voidable>
145
+ <refundable type="boolean">false</refundable>
146
+ </transaction>
147
+ <transaction type="Payment">
148
+ <id>1762a4cd7a3145e999e3cc9005bb0bef</id>
149
+ <account_code>subscription-cancel-with-code-1301881900</account_code>
150
+ <action>purchase</action>
151
+ <date type="datetime">2011-04-04T02:24:45Z</date>
152
+ <amount_in_cents type="integer">200</amount_in_cents>
153
+ <status>success</status>
154
+ <message>Test Gateway: Successful test transaction</message>
155
+ <reference>12345</reference>
156
+ <cvv_result code="M">Match</cvv_result>
157
+ <avs_result code="D">Street address and postal code match.</avs_result>
158
+ <avs_result_street>Y</avs_result_street>
159
+ <avs_result_postal>Y</avs_result_postal>
160
+ <test type="boolean">true</test>
161
+ <voidable type="boolean">true</voidable>
162
+ <refundable type="boolean">true</refundable>
163
+ </transaction>
164
+ <transaction type="Payment">
165
+ <id>f1fc209b40da4fa5ba6bfb57c4c84ac1</id>
166
+ <account_code>subscription-cancel-1301881900</account_code>
167
+ <action>purchase</action>
168
+ <date type="datetime">2011-04-04T02:24:30Z</date>
169
+ <amount_in_cents type="integer">200</amount_in_cents>
170
+ <status>success</status>
171
+ <message>Test Gateway: Successful test transaction</message>
172
+ <reference>12345</reference>
173
+ <cvv_result code="M">Match</cvv_result>
174
+ <avs_result code="D">Street address and postal code match.</avs_result>
175
+ <avs_result_street>Y</avs_result_street>
176
+ <avs_result_postal>Y</avs_result_postal>
177
+ <test type="boolean">true</test>
178
+ <voidable type="boolean">true</voidable>
179
+ <refundable type="boolean">true</refundable>
180
+ </transaction>
181
+ <transaction type="Payment">
182
+ <id>c69853e0761f44b0b0f62b3e8e8a86d7</id>
183
+ <account_code>subscription-reactivate-1301881900</account_code>
184
+ <action>purchase</action>
185
+ <date type="datetime">2011-04-04T02:24:10Z</date>
186
+ <amount_in_cents type="integer">200</amount_in_cents>
187
+ <status>success</status>
188
+ <message>Test Gateway: Successful test transaction</message>
189
+ <reference>12345</reference>
190
+ <cvv_result code="M">Match</cvv_result>
191
+ <avs_result code="D">Street address and postal code match.</avs_result>
192
+ <avs_result_street>Y</avs_result_street>
193
+ <avs_result_postal>Y</avs_result_postal>
194
+ <test type="boolean">true</test>
195
+ <voidable type="boolean">true</voidable>
196
+ <refundable type="boolean">true</refundable>
197
+ </transaction>
198
+ <transaction type="Payment">
199
+ <id>c99f7b5e9e8342a28d23625b1a68438f</id>
200
+ <account_code>1301881900</account_code>
201
+ <action>purchase</action>
202
+ <date type="datetime">2011-04-04T02:23:53Z</date>
203
+ <amount_in_cents type="integer">200</amount_in_cents>
204
+ <status>success</status>
205
+ <message>Test Gateway: Successful test transaction</message>
206
+ <reference>12345</reference>
207
+ <cvv_result code="M">Match</cvv_result>
208
+ <avs_result code="D">Street address and postal code match.</avs_result>
209
+ <avs_result_street>Y</avs_result_street>
210
+ <avs_result_postal>Y</avs_result_postal>
211
+ <test type="boolean">true</test>
212
+ <voidable type="boolean">true</voidable>
213
+ <refundable type="boolean">true</refundable>
214
+ </transaction>
215
+ <transaction type="Payment">
216
+ <id>76dba9e1d7664c0d879388ddb8d35128</id>
217
+ <account_code>subscription-change1-1301881900</account_code>
218
+ <action>purchase</action>
219
+ <date type="datetime">2011-04-04T02:23:35Z</date>
220
+ <amount_in_cents type="integer">200</amount_in_cents>
221
+ <status>success</status>
222
+ <message>Test Gateway: Successful test transaction</message>
223
+ <reference>12345</reference>
224
+ <cvv_result code="M">Match</cvv_result>
225
+ <avs_result code="D">Street address and postal code match.</avs_result>
226
+ <avs_result_street>Y</avs_result_street>
227
+ <avs_result_postal>Y</avs_result_postal>
228
+ <test type="boolean">true</test>
229
+ <voidable type="boolean">true</voidable>
230
+ <refundable type="boolean">true</refundable>
231
+ </transaction>
232
+ <transaction type="Payment">
233
+ <id>f2289b603fcc4ff895d59ba49882499b</id>
234
+ <account_code>subscription-create-1301881900</account_code>
235
+ <action>purchase</action>
236
+ <date type="datetime">2011-04-04T02:23:25Z</date>
237
+ <amount_in_cents type="integer">200</amount_in_cents>
238
+ <status>success</status>
239
+ <message>Test Gateway: Successful test transaction</message>
240
+ <reference>12345</reference>
241
+ <cvv_result code="M">Match</cvv_result>
242
+ <avs_result code="D">Street address and postal code match.</avs_result>
243
+ <avs_result_street>Y</avs_result_street>
244
+ <avs_result_postal>Y</avs_result_postal>
245
+ <test type="boolean">true</test>
246
+ <voidable type="boolean">true</voidable>
247
+ <refundable type="boolean">true</refundable>
248
+ </transaction>
249
+ <transaction type="Payment">
250
+ <id>790a06615e69493fb1052ab30f025dfe</id>
251
+ <account_code>subscription-find-1301881900</account_code>
252
+ <action>purchase</action>
253
+ <date type="datetime">2011-04-04T02:23:14Z</date>
254
+ <amount_in_cents type="integer">200</amount_in_cents>
255
+ <status>success</status>
256
+ <message>Test Gateway: Successful test transaction</message>
257
+ <reference>12345</reference>
258
+ <cvv_result code="M">Match</cvv_result>
259
+ <avs_result code="D">Street address and postal code match.</avs_result>
260
+ <avs_result_street>Y</avs_result_street>
261
+ <avs_result_postal>Y</avs_result_postal>
262
+ <test type="boolean">true</test>
263
+ <voidable type="boolean">true</voidable>
264
+ <refundable type="boolean">true</refundable>
265
+ </transaction>
266
+ <transaction type="Payment">
267
+ <id>5f198ab2d30a4c439c0e8c6ed394dd12</id>
268
+ <account_code>invoice-lookup-1297746103</account_code>
269
+ <action>authorization</action>
270
+ <date type="datetime">2011-04-04T02:22:44Z</date>
271
+ <amount_in_cents type="integer">0</amount_in_cents>
272
+ <status>success</status>
273
+ <message>Test Gateway: Successful test transaction</message>
274
+ <reference>12345</reference>
275
+ <cvv_result code="M">Match</cvv_result>
276
+ <avs_result code="D">Street address and postal code match.</avs_result>
277
+ <avs_result_street>Y</avs_result_street>
278
+ <avs_result_postal>Y</avs_result_postal>
279
+ <test type="boolean">true</test>
280
+ <voidable type="boolean">false</voidable>
281
+ <refundable type="boolean">true</refundable>
282
+ </transaction>
283
+ <transaction type="Payment">
284
+ <id>d0bbd6fe59e747b993eeebfa1a8cd34e</id>
285
+ <account_code>invoice-list-1297746103</account_code>
286
+ <action>authorization</action>
287
+ <date type="datetime">2011-04-04T02:22:26Z</date>
288
+ <amount_in_cents type="integer">0</amount_in_cents>
289
+ <status>success</status>
290
+ <message>Test Gateway: Successful test transaction</message>
291
+ <reference>12345</reference>
292
+ <cvv_result code="M">Match</cvv_result>
293
+ <avs_result code="D">Street address and postal code match.</avs_result>
294
+ <avs_result_street>Y</avs_result_street>
295
+ <avs_result_postal>Y</avs_result_postal>
296
+ <test type="boolean">true</test>
297
+ <voidable type="boolean">false</voidable>
298
+ <refundable type="boolean">true</refundable>
299
+ </transaction>
300
+ <transaction type="Payment">
301
+ <id>78d096163b404a63b53e028247edcccd</id>
302
+ <account_code>invoice-create-no-charges-1297746103</account_code>
303
+ <action>authorization</action>
304
+ <date type="datetime">2011-04-04T02:22:16Z</date>
305
+ <amount_in_cents type="integer">0</amount_in_cents>
306
+ <status>success</status>
307
+ <message>Test Gateway: Successful test transaction</message>
308
+ <reference>12345</reference>
309
+ <cvv_result code="M">Match</cvv_result>
310
+ <avs_result code="D">Street address and postal code match.</avs_result>
311
+ <avs_result_street>Y</avs_result_street>
312
+ <avs_result_postal>Y</avs_result_postal>
313
+ <test type="boolean">true</test>
314
+ <voidable type="boolean">false</voidable>
315
+ <refundable type="boolean">true</refundable>
316
+ </transaction>
317
+ <transaction type="Payment">
318
+ <id>e70a2bdcd6c743b0a63a00c839bd50f9</id>
319
+ <account_code>invoice-create-1297746103</account_code>
320
+ <action>authorization</action>
321
+ <date type="datetime">2011-04-04T02:22:01Z</date>
322
+ <amount_in_cents type="integer">0</amount_in_cents>
323
+ <status>success</status>
324
+ <message>Test Gateway: Successful test transaction</message>
325
+ <reference>12345</reference>
326
+ <cvv_result code="M">Match</cvv_result>
327
+ <avs_result code="D">Street address and postal code match.</avs_result>
328
+ <avs_result_street>Y</avs_result_street>
329
+ <avs_result_postal>Y</avs_result_postal>
330
+ <test type="boolean">true</test>
331
+ <voidable type="boolean">false</voidable>
332
+ <refundable type="boolean">true</refundable>
333
+ </transaction>
334
+ <transaction type="Payment">
335
+ <id>4a0ee5a7e0874d7f84dae64659f02a9c</id>
336
+ <account_code>charge-create-1297746103</account_code>
337
+ <action>authorization</action>
338
+ <date type="datetime">2011-04-04T02:20:31Z</date>
339
+ <amount_in_cents type="integer">0</amount_in_cents>
340
+ <status>success</status>
341
+ <message>Test Gateway: Successful test transaction</message>
342
+ <reference>12345</reference>
343
+ <cvv_result code="M">Match</cvv_result>
344
+ <avs_result code="D">Street address and postal code match.</avs_result>
345
+ <avs_result_street>Y</avs_result_street>
346
+ <avs_result_postal>Y</avs_result_postal>
347
+ <test type="boolean">true</test>
348
+ <voidable type="boolean">false</voidable>
349
+ <refundable type="boolean">true</refundable>
350
+ </transaction>
351
+ <transaction type="Payment">
352
+ <id>f35e28c9a480482db629774e71d58d42</id>
353
+ <account_code>billing-destroy-1298594128</account_code>
354
+ <action>authorization</action>
355
+ <date type="datetime">2011-04-04T02:19:36Z</date>
356
+ <amount_in_cents type="integer">0</amount_in_cents>
357
+ <status>success</status>
358
+ <message>Test Gateway: Successful test transaction</message>
359
+ <reference>12345</reference>
360
+ <cvv_result code="M">Match</cvv_result>
361
+ <avs_result code="D">Street address and postal code match.</avs_result>
362
+ <avs_result_street>Y</avs_result_street>
363
+ <avs_result_postal>Y</avs_result_postal>
364
+ <test type="boolean">true</test>
365
+ <voidable type="boolean">false</voidable>
366
+ <refundable type="boolean">true</refundable>
367
+ </transaction>
368
+ <transaction type="Payment">
369
+ <id>8b69d7e08e84426c9bdab836fbaff10f</id>
370
+ <account_code>billing-find-1298594128</account_code>
371
+ <action>authorization</action>
372
+ <date type="datetime">2011-04-04T02:19:24Z</date>
373
+ <amount_in_cents type="integer">0</amount_in_cents>
374
+ <status>success</status>
375
+ <message>Test Gateway: Successful test transaction</message>
376
+ <reference>12345</reference>
377
+ <cvv_result code="M">Match</cvv_result>
378
+ <avs_result code="D">Street address and postal code match.</avs_result>
379
+ <avs_result_street>Y</avs_result_street>
380
+ <avs_result_postal>Y</avs_result_postal>
381
+ <test type="boolean">true</test>
382
+ <voidable type="boolean">false</voidable>
383
+ <refundable type="boolean">true</refundable>
384
+ </transaction>
385
+ </transactions>
386
+
387
+ http_version: "1.1"