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: :get
5
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/test.xml
5
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/test.xml
6
6
  body:
7
7
  headers:
8
8
  authorization:
9
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
9
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
10
10
  accept:
11
11
  - application/xml
12
12
  accept-encoding:
@@ -21,17 +21,17 @@
21
21
  message: OK
22
22
  headers:
23
23
  x-runtime:
24
- - "297"
24
+ - "80"
25
25
  content-type:
26
26
  - application/xml; charset=utf-8
27
27
  etag:
28
- - "\"ebfc9c6f5bcdfbc9ba658e70a75d94a3\""
28
+ - "\"4c5ab88ea8d9af3748453370628c8dd5\""
29
29
  cache-control:
30
30
  - private, max-age=0, must-revalidate
31
31
  content-length:
32
- - "1153"
32
+ - "1149"
33
33
  set-cookie:
34
- - _recurly_session=3adad288d8fb3965388971f237c39d6e; domain=.recurly.local; path=/; HttpOnly
34
+ - _recurly_session=2b5025e26e453a628c274019a8c1ca0d; domain=.recurly.local; path=/; HttpOnly
35
35
  connection:
36
36
  - close
37
37
  server:
@@ -44,8 +44,8 @@
44
44
  <description></description>
45
45
  <success_url></success_url>
46
46
  <cancel_url></cancel_url>
47
- <created_at type="datetime">2011-02-02T21:10:47Z</created_at>
48
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
47
+ <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
48
+ <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
49
49
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
50
50
  <plan_interval_length type="integer">1</plan_interval_length>
51
51
  <plan_interval_unit>months</plan_interval_unit>
@@ -53,13 +53,13 @@
53
53
  <trial_interval_unit>months</trial_interval_unit>
54
54
  <latest_version depreciated="true">
55
55
  <version type="integer">1</version>
56
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
56
+ <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
57
57
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
58
58
  <plan_interval_length type="integer">1</plan_interval_length>
59
59
  <plan_interval_unit>months</plan_interval_unit>
60
60
  <trial_interval_length type="integer">0</trial_interval_length>
61
61
  <trial_interval_unit>months</trial_interval_unit>
62
- <created_at type="datetime">2011-02-02T21:10:51Z</created_at>
62
+ <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
63
63
  </latest_version>
64
64
  </plan>
65
65
 
@@ -67,7 +67,7 @@
67
67
  - !ruby/struct:VCR::HTTPInteraction
68
68
  request: !ruby/struct:VCR::Request
69
69
  method: :put
70
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/test.xml
70
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/test.xml
71
71
  body: |
72
72
  <?xml version="1.0" encoding="UTF-8"?>
73
73
  <plan>
@@ -76,30 +76,29 @@
76
76
  <description type="yaml" nil="true"></description>
77
77
  <success-url type="yaml" nil="true"></success-url>
78
78
  <cancel-url type="yaml" nil="true"></cancel-url>
79
- <created-at type="datetime">2011-02-02T21:10:47Z</created-at>
80
- <unit-amount-in-cents type="integer">200</unit-amount-in-cents>
79
+ <created-at type="datetime">2011-04-03T21:51:42Z</created-at>
80
+ <unit-amount-in-cents type="integer">0</unit-amount-in-cents>
81
81
  <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
82
82
  <plan-interval-length type="integer">1</plan-interval-length>
83
83
  <plan-interval-unit>months</plan-interval-unit>
84
84
  <trial-interval-length type="integer">0</trial-interval-length>
85
85
  <trial-interval-unit>months</trial-interval-unit>
86
86
  <latest-version>
87
- <depreciated>true</depreciated>
88
87
  <version type="integer">1</version>
89
- <unit-amount-in-cents type="integer">200</unit-amount-in-cents>
88
+ <unit-amount-in-cents type="integer">0</unit-amount-in-cents>
90
89
  <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
91
90
  <plan-interval-length type="integer">1</plan-interval-length>
92
91
  <plan-interval-unit>months</plan-interval-unit>
93
92
  <trial-interval-length type="integer">0</trial-interval-length>
94
93
  <trial-interval-unit>months</trial-interval-unit>
95
- <created-at type="datetime">2011-02-02T21:10:51Z</created-at>
94
+ <created-at type="datetime">2011-04-03T21:51:42Z</created-at>
96
95
  </latest-version>
97
96
  <amount-in-cents type="integer">200</amount-in-cents>
98
97
  </plan>
99
98
 
100
99
  headers:
101
100
  authorization:
102
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
101
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
103
102
  content-type:
104
103
  - application/xml
105
104
  accept:
@@ -116,13 +115,13 @@
116
115
  cache-control:
117
116
  - no-cache
118
117
  x-runtime:
119
- - "339"
118
+ - "471"
120
119
  content-type:
121
120
  - application/xml; charset=utf-8
122
121
  content-length:
123
122
  - "1"
124
123
  set-cookie:
125
- - _recurly_session=6855515dafde9623be2753c169e1fa17; domain=.recurly.local; path=/; HttpOnly
124
+ - _recurly_session=d582dca666e365468960dc0943b4b60f; domain=.recurly.local; path=/; HttpOnly
126
125
  connection:
127
126
  - close
128
127
  server:
@@ -132,11 +131,11 @@
132
131
  - !ruby/struct:VCR::HTTPInteraction
133
132
  request: !ruby/struct:VCR::Request
134
133
  method: :get
135
- uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/test.xml
134
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/company/plans/test.xml
136
135
  body:
137
136
  headers:
138
137
  authorization:
139
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
138
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
140
139
  accept:
141
140
  - application/xml
142
141
  accept-encoding:
@@ -151,17 +150,17 @@
151
150
  message: OK
152
151
  headers:
153
152
  x-runtime:
154
- - "307"
153
+ - "290"
155
154
  content-type:
156
155
  - application/xml; charset=utf-8
157
156
  etag:
158
- - "\"ebfc9c6f5bcdfbc9ba658e70a75d94a3\""
157
+ - "\"4c5ab88ea8d9af3748453370628c8dd5\""
159
158
  cache-control:
160
159
  - private, max-age=0, must-revalidate
161
160
  content-length:
162
- - "1153"
161
+ - "1149"
163
162
  set-cookie:
164
- - _recurly_session=0d1bfef61888732dac952093b505f2de; domain=.recurly.local; path=/; HttpOnly
163
+ - _recurly_session=5e9f12b2224327bdeab90aefe1c8e589; domain=.recurly.local; path=/; HttpOnly
165
164
  connection:
166
165
  - close
167
166
  server:
@@ -174,8 +173,8 @@
174
173
  <description></description>
175
174
  <success_url></success_url>
176
175
  <cancel_url></cancel_url>
177
- <created_at type="datetime">2011-02-02T21:10:47Z</created_at>
178
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
176
+ <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
177
+ <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
179
178
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
180
179
  <plan_interval_length type="integer">1</plan_interval_length>
181
180
  <plan_interval_unit>months</plan_interval_unit>
@@ -183,13 +182,13 @@
183
182
  <trial_interval_unit>months</trial_interval_unit>
184
183
  <latest_version depreciated="true">
185
184
  <version type="integer">1</version>
186
- <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
185
+ <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
187
186
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
188
187
  <plan_interval_length type="integer">1</plan_interval_length>
189
188
  <plan_interval_unit>months</plan_interval_unit>
190
189
  <trial_interval_length type="integer">0</trial_interval_length>
191
190
  <trial_interval_unit>months</trial_interval_unit>
192
- <created_at type="datetime">2011-02-02T21:10:51Z</created_at>
191
+ <created_at type="datetime">2011-04-03T21:51:42Z</created_at>
193
192
  </latest_version>
194
193
  </plan>
195
194
 
@@ -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-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>
@@ -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:
@@ -39,13 +39,13 @@
39
39
  location:
40
40
  - http://app.recurly.local:3000/accounts/subscription-addons-add-1297746103
41
41
  x-runtime:
42
- - "600"
42
+ - "357"
43
43
  content-type:
44
44
  - application/xml; charset=utf-8
45
45
  content-length:
46
46
  - "601"
47
47
  set-cookie:
48
- - _recurly_session=801dbd3ec14fae430fff355955b02e80; domain=.recurly.local; path=/; HttpOnly
48
+ - _recurly_session=b2c8f189102dfda30acbf6ded25272ea; domain=.recurly.local; path=/; HttpOnly
49
49
  connection:
50
50
  - close
51
51
  server:
@@ -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>01235e075f454c61b47158e6d7557e91</hosted_login_token>
66
- <created_at type="datetime">2011-03-18T18:47:44Z</created_at>
65
+ <hosted_login_token>9eee3000f8f348b9946c634d2e57c8ae</hosted_login_token>
66
+ <created_at type="datetime">2011-04-04T02:18:13Z</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
- - "90"
93
+ - "309"
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=c3758c02f5dc3dfbda4fa52c2b248d58; domain=.recurly.local; path=/; HttpOnly
103
+ - _recurly_session=2fec8791917702588dc8d71c5947724c; domain=.recurly.local; path=/; HttpOnly
104
104
  connection:
105
105
  - close
106
106
  server:
@@ -113,30 +113,42 @@
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-addons-add-1297746103/subscription.xml
151
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-addons-add-1297746103/subscription.xml
140
152
  body: |
141
153
  <?xml version="1.0" encoding="UTF-8"?>
142
154
  <subscription>
@@ -159,7 +171,7 @@
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>
@@ -168,8 +180,8 @@
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>01235e075f454c61b47158e6d7557e91</hosted-login-token>
172
- <created-at type="datetime">2011-03-18T18:47:44Z</created-at>
183
+ <hosted-login-token>9eee3000f8f348b9946c634d2e57c8ae</hosted-login-token>
184
+ <created-at type="datetime">2011-04-04T02:18:13Z</created-at>
173
185
  <state>active</state>
174
186
  </account>
175
187
  <add-ons type="array">
@@ -184,7 +196,7 @@
184
196
 
185
197
  headers:
186
198
  authorization:
187
- - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
199
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
188
200
  content-type:
189
201
  - application/xml
190
202
  accept:
@@ -195,328 +207,274 @@
195
207
  - close
196
208
  response: !ruby/struct:VCR::Response
197
209
  status: !ruby/struct:VCR::ResponseStatus
198
- code: 500
199
- message: Internal Server Error
210
+ code: 201
211
+ message: Created
200
212
  headers:
201
213
  cache-control:
202
214
  - no-cache
215
+ x-runtime:
216
+ - "5911"
203
217
  content-type:
204
- - text/html; charset=utf-8
218
+ - application/xml; charset=utf-8
205
219
  content-length:
206
- - "19286"
220
+ - "1099"
207
221
  set-cookie:
208
- - _recurly_session=7592f0febb3c336de83c81cde6c28888; domain=.recurly.local; path=/; HttpOnly
222
+ - _recurly_session=dc5583ea722f9df8e77f28f2356ff105; domain=.recurly.local; path=/; HttpOnly
209
223
  connection:
210
224
  - close
211
225
  server:
212
226
  - thin 1.2.7 codename No Hup
213
227
  body: |
214
- <html xmlns="http://www.w3.org/1999/xhtml">
215
- <head>
216
- <title>Action Controller: Exception caught</title>
217
- <style>
218
- body { background-color: #fff; color: #333; }
219
-
220
- body, p, ol, ul, td {
221
- font-family: verdana, arial, helvetica, sans-serif;
222
- font-size: 13px;
223
- line-height: 18px;
224
- }
225
-
226
- pre {
227
- background-color: #eee;
228
- padding: 10px;
229
- font-size: 11px;
230
- }
231
-
232
- a { color: #000; }
233
- a:visited { color: #666; }
234
- a:hover { color: #fff; background-color:#000; }
235
- </style>
236
- </head>
237
- <body>
238
-
239
- <h1>
240
- NoMethodError
241
-
242
- in Accounts/subscriptionController#create
243
-
244
- </h1>
245
- <pre>You have a nil object when you didn't expect it!
246
- You might have expected an instance of Array.
247
- The error occurred while evaluating nil.slice</pre>
248
-
249
-
250
-
251
- <p><code>RAILS_ROOT: /Users/isaac/Development/recurly/app</code></p>
252
-
253
- <div id="traces">
254
-
255
-
256
- <a href="#" onclick="document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Application-Trace').style.display='block';; return false;">Application Trace</a> |
257
-
258
-
259
- <a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='block';; return false;">Framework Trace</a> |
260
-
261
-
262
- <a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='block';; return false;">Full Trace</a>
263
-
264
-
265
-
266
- <div id="Application-Trace" style="display: block;">
267
- <pre><code>/Users/isaac/Development/recurly/app/app/api/subscription_api.rb:23:in `block in sanitize_params'
268
- /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `collect'
269
- /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `sanitize_params'
270
- /Users/isaac/Development/recurly/app/app/controllers/accounts/subscription_controller.rb:250:in `init_account_and_billing_info'</code></pre>
271
- </div>
272
-
273
- <div id="Framework-Trace" style="display: none;">
274
- <pre><code>/Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:178:in `evaluate_method'
275
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:166:in `call'
276
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:225:in `call'
277
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:629:in `run_before_filters'
278
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:615:in `call_filters'
279
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
280
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
281
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
282
- /Users/isaac/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
283
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `ms'
284
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
285
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
286
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
287
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:532:in `process'
288
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:606:in `process_with_filters'
289
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/compass-0.10.6/lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process_with_compass'
290
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:391:in `process'
291
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:386:in `call'
292
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:438:in `call'
293
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:87:in `dispatch'
294
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:121:in `_call'
295
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
296
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `call'
297
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `block in call'
298
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
299
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:9:in `cache'
300
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:28:in `call'
301
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
302
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/haml-3.0.25/lib/sass/plugin/rack.rb:41:in `call'
303
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/string_coercion.rb:25:in `call'
304
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
305
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
306
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/params_parser.rb:15:in `call'
307
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/session/abstract_store.rb:177:in `call'
308
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/cache/strategy/local_cache.rb:25:in `call'
309
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/hoptoad_notifier-2.4.6/lib/hoptoad_notifier/rack.rb:27:in `call'
310
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/failsafe.rb:26:in `call'
311
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/hoptoad_notifier-2.4.6/lib/hoptoad_notifier/user_informer.rb:12:in `call'
312
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:114:in `block in call'
313
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:34:in `run'
314
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:108:in `call'
315
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/rack/fiber_pool.rb:19:in `block in call'
316
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:48:in `call'
317
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:48:in `block (3 levels) in initialize'
318
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:47:in `loop'
319
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:47:in `block (2 levels) in initialize'</code></pre>
320
- </div>
321
-
322
- <div id="Full-Trace" style="display: none;">
323
- <pre><code>/Users/isaac/Development/recurly/app/app/api/subscription_api.rb:23:in `block in sanitize_params'
324
- /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `collect'
325
- /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `sanitize_params'
326
- /Users/isaac/Development/recurly/app/app/controllers/accounts/subscription_controller.rb:250:in `init_account_and_billing_info'
327
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:178:in `evaluate_method'
328
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:166:in `call'
329
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:225:in `call'
330
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:629:in `run_before_filters'
331
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:615:in `call_filters'
332
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
333
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
334
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
335
- /Users/isaac/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
336
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `ms'
337
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
338
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
339
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
340
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:532:in `process'
341
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/filters.rb:606:in `process_with_filters'
342
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/compass-0.10.6/lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process_with_compass'
343
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:391:in `process'
344
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/base.rb:386:in `call'
345
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:438:in `call'
346
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:87:in `dispatch'
347
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:121:in `_call'
348
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
349
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `call'
350
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `block in call'
351
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
352
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:9:in `cache'
353
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:28:in `call'
354
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
355
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/haml-3.0.25/lib/sass/plugin/rack.rb:41:in `call'
356
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/string_coercion.rb:25:in `call'
357
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
358
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
359
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/params_parser.rb:15:in `call'
360
- /Users/isaac/Development/recurly/app/lib/xml_request_check.rb:10:in `call'
361
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/session/abstract_store.rb:177:in `call'
362
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/activesupport-2.3.11/lib/active_support/cache/strategy/local_cache.rb:25:in `call'
363
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/hoptoad_notifier-2.4.6/lib/hoptoad_notifier/rack.rb:27:in `call'
364
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/failsafe.rb:26:in `call'
365
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/hoptoad_notifier-2.4.6/lib/hoptoad_notifier/user_informer.rb:12:in `call'
366
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:114:in `block in call'
367
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:34:in `run'
368
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:108:in `call'
369
- /Users/isaac/Development/recurly/app/lib/rack_rails_check.rb:16:in `call'
370
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/rack/fiber_pool.rb:19:in `block in call'
371
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:48:in `call'
372
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:48:in `block (3 levels) in initialize'
373
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:47:in `loop'
374
- /Users/isaac/.rvm/gems/ruby-1.9.2-p0@recurly-app/gems/rack-fiber_pool-0.9.1/lib/fiber_pool.rb:47:in `block (2 levels) in initialize'</code></pre>
375
- </div>
376
-
377
- </div>
378
-
379
-
380
-
381
-
382
-
383
-
384
- <h2 style="margin-top: 30px">Request</h2>
385
- <p><b>Parameters</b>: <pre>{&quot;subscription&quot;=&gt;{&quot;plan_code&quot;=&gt;&quot;paid&quot;,
386
- &quot;quantity&quot;=&gt;1,
387
- &quot;account&quot;=&gt;{&quot;account_code&quot;=&gt;&quot;subscription-addons-add-1297746103&quot;,
388
- &quot;first_name&quot;=&gt;&quot;Verena&quot;,
389
- &quot;last_name&quot;=&gt;&quot;Test&quot;,
390
- &quot;email&quot;=&gt;&quot;verena@test.com&quot;,
391
- &quot;company_name&quot;=&gt;&quot;Recurly Ruby Gem&quot;,
392
- &quot;billing_info&quot;=&gt;{&quot;first_name&quot;=&gt;&quot;Verena&quot;,
393
- &quot;last_name&quot;=&gt;&quot;Test&quot;,
394
- &quot;address1&quot;=&gt;&quot;123 Test St&quot;,
395
- &quot;city&quot;=&gt;&quot;San Francisco&quot;,
396
- &quot;state&quot;=&gt;&quot;CA&quot;,
397
- &quot;zip&quot;=&gt;&quot;94115&quot;,
398
- &quot;country&quot;=&gt;&quot;US&quot;,
399
- &quot;credit_card&quot;=&gt;{&quot;number&quot;=&gt;&quot;4111111111111111&quot;,
400
- &quot;year&quot;=&gt;2012,
401
- &quot;month&quot;=&gt;3,
402
- &quot;verification_value&quot;=&gt;&quot;123&quot;}},
403
- &quot;accept_language&quot;=&gt;nil,
404
- &quot;id&quot;=&gt;&quot;subscription-addons-add-1297746103&quot;,
405
- &quot;username&quot;=&gt;nil,
406
- &quot;balance_in_cents&quot;=&gt;0,
407
- &quot;closed&quot;=&gt;false,
408
- &quot;hosted_login_token&quot;=&gt;&quot;01235e075f454c61b47158e6d7557e91&quot;,
409
- &quot;created_at&quot;=&gt;2011-03-18 18:47:44 UTC,
410
- &quot;state&quot;=&gt;&quot;active&quot;},
411
- &quot;add_ons&quot;=&gt;[{&quot;add_on_code&quot;=&gt;&quot;special&quot;,
412
- &quot;quantity&quot;=&gt;1,
413
- &quot;unit_amount&quot;=&gt;10}],
414
- &quot;addons&quot;=&gt;[]},
415
- &quot;account_id&quot;=&gt;&quot;subscription-addons-add-1297746103&quot;,
416
- &quot;format&quot;=&gt;&quot;xml&quot;}</pre></p>
417
-
418
- <p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
419
- <div id="session_dump" style="display:none"><pre class='debug_dump'>---
420
- </pre></div>
421
-
422
-
423
- <h2 style="margin-top: 30px">Response</h2>
424
- <p><b>Headers</b>: <pre>{&quot;Cache-Control&quot;=&gt;&quot;no-cache&quot;,
425
- &quot;Content-Type&quot;=&gt;&quot;&quot;}</pre></p>
426
-
427
-
428
-
429
- </body>
430
- </html><script type="text/javascript">
431
- var Hoptoad = {
432
- host : "hoptoadapp.com",
433
- api_key : "2de5471006eea4f5e5711302a6d2c4fc",
434
- notice : {"action":"create","component":"accounts/subscription","error_class":"NoMethodError","environment_name":"production","file":"[PROJECT_ROOT]/app/api/subscription_api.rb","line_number":"23"},
435
- message : 'This error exists in production!',
436
-
437
- initialize: function() {
438
- if (this.initialized) {
439
- return;
440
- } else {
441
- this.initialized = true;
442
- }
443
-
444
- var data = [];
445
-
446
- for (var key in this.notice) {
447
- data[data.length] = 'notice[' + key + ']=' + this.notice[key];
448
- }
449
-
450
- data[data.length] = 'notice[api_key]=' + this.api_key;
451
- data[data.length] = 'callback=Hoptoad.onSuccess';
452
- data[data.length] = '_=' + (new Date()).getTime();
453
-
454
- var head = document.getElementsByTagName('head')[0];
455
- var done = false;
456
-
457
- var
458
- script = document.createElement('script');
459
- script.src = 'http://' + this.host + '/notices_api/v1/notices/exist?' +
460
- data.join('&');
461
- script.type = 'text/javascript';
462
- script.onload = script.onreadystatechange = function(){
463
- if (!done && (!this.readyState ||
464
- this.readyState == 'loaded' || this.readyState == 'complete')) {
465
-
466
- done = true;
467
-
468
- // Handle memory leak in IE. (via jQuery)
469
- script.onload = script.onreadystatechange = null;
470
- head.removeChild(script);
471
- }
472
- };
473
-
474
- head.appendChild(script);
475
- },
476
-
477
- onSuccess: function(error) {
478
- var body = document.getElementsByTagName('body')[0];
479
- var text = document.createTextNode(this.message);
480
- var element = document.createElement('a');
481
-
482
- element.id = 'hoptoad';
483
- element.href = 'http://' + error.subdomain + '.' + this.host +
484
- '/projects/' + error.project_id + '/errors/' + error.id;
485
- element.appendChild(text);
486
-
487
- body.insertBefore(element, body.firstChild);
488
-
489
- var h1 = document.getElementsByTagName('h1')[0];
490
- var pre = document.getElementsByTagName('pre')[0];
491
- var wrapper = document.createElement('div');
492
-
493
- wrapper.id = 'wrapper';
494
- wrapper.appendChild(h1);
495
- wrapper.appendChild(pre);
496
-
497
- body.insertBefore(wrapper, body.children[1]);
498
- }
499
- };
500
-
501
- window.onload = function() {
502
- Hoptoad.initialize.apply(Hoptoad);
503
- };
504
- </script>
505
-
506
- <style type="text/css">
507
- #hoptoad {
508
- background: #FFF url(http://hoptoadapp.com/images/fell-off-the-toad.gif) no-repeat top right;
509
- color: #F00;
510
- padding: 45px 101px 45px 12px;
511
- font-size: 14px;
512
- font-weight: bold;
513
- display: block;
514
- float: right;
515
- }
516
-
517
- #wrapper {
518
- padding-right: 360px;
519
- }
520
- </style>
228
+ <?xml version="1.0" encoding="UTF-8"?>
229
+ <subscription>
230
+ <id>subscription-addons-add-1297746103</id>
231
+ <account_code>subscription-addons-add-1297746103</account_code>
232
+ <plan>
233
+ <plan_code>paid</plan_code>
234
+ <name>Paid</name>
235
+ </plan>
236
+ <state>active</state>
237
+ <quantity type="integer">1</quantity>
238
+ <total_amount_in_cents type="integer">1200</total_amount_in_cents>
239
+ <activated_at type="datetime">2011-04-04T02:18:18Z</activated_at>
240
+ <canceled_at nil="true" type="datetime"></canceled_at>
241
+ <expires_at nil="true" type="datetime"></expires_at>
242
+ <current_period_started_at type="datetime">2011-04-04T02:18:18Z</current_period_started_at>
243
+ <current_period_ends_at type="datetime">2011-05-04T02:18:18Z</current_period_ends_at>
244
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
245
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
246
+ <add_ons type="array">
247
+ <add_on>
248
+ <add_on_code>special</add_on_code>
249
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
250
+ <quantity type="integer">1</quantity>
251
+ </add_on>
252
+ </add_ons>
253
+ </subscription>
254
+
255
+ http_version: "1.1"
256
+ - !ruby/struct:VCR::HTTPInteraction
257
+ request: !ruby/struct:VCR::Request
258
+ method: :get
259
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-addons-add-1297746103/subscription.xml
260
+ body:
261
+ headers:
262
+ authorization:
263
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
264
+ accept:
265
+ - application/xml
266
+ accept-encoding:
267
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
268
+ user-agent:
269
+ - Ruby
270
+ connection:
271
+ - close
272
+ response: !ruby/struct:VCR::Response
273
+ status: !ruby/struct:VCR::ResponseStatus
274
+ code: 200
275
+ message: OK
276
+ headers:
277
+ x-runtime:
278
+ - "400"
279
+ content-type:
280
+ - application/xml; charset=utf-8
281
+ etag:
282
+ - "\"7a30f76ec20179dd3fb112680d43af39\""
283
+ cache-control:
284
+ - private, max-age=0, must-revalidate
285
+ content-length:
286
+ - "1099"
287
+ set-cookie:
288
+ - _recurly_session=8f710c4d5d710dd09bd6342b29d62e93; domain=.recurly.local; path=/; HttpOnly
289
+ connection:
290
+ - close
291
+ server:
292
+ - thin 1.2.7 codename No Hup
293
+ body: |
294
+ <?xml version="1.0" encoding="UTF-8"?>
295
+ <subscription>
296
+ <id>subscription-addons-add-1297746103</id>
297
+ <account_code>subscription-addons-add-1297746103</account_code>
298
+ <plan>
299
+ <plan_code>paid</plan_code>
300
+ <name>Paid</name>
301
+ </plan>
302
+ <state>active</state>
303
+ <quantity type="integer">1</quantity>
304
+ <total_amount_in_cents type="integer">1200</total_amount_in_cents>
305
+ <activated_at type="datetime">2011-04-04T02:18:18Z</activated_at>
306
+ <canceled_at nil="true" type="datetime"></canceled_at>
307
+ <expires_at nil="true" type="datetime"></expires_at>
308
+ <current_period_started_at type="datetime">2011-04-04T02:18:18Z</current_period_started_at>
309
+ <current_period_ends_at type="datetime">2011-05-04T02:18:18Z</current_period_ends_at>
310
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
311
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
312
+ <add_ons type="array">
313
+ <add_on>
314
+ <add_on_code>special</add_on_code>
315
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
316
+ <quantity type="integer">1</quantity>
317
+ </add_on>
318
+ </add_ons>
319
+ </subscription>
320
+
321
+ http_version: "1.1"
322
+ - !ruby/struct:VCR::HTTPInteraction
323
+ request: !ruby/struct:VCR::Request
324
+ method: :put
325
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-addons-add-1297746103/subscription.xml
326
+ body: |
327
+ <?xml version="1.0" encoding="UTF-8"?>
328
+ <subscription>
329
+ <add-ons type="array">
330
+ <add-on>
331
+ <add-on-code>special</add-on-code>
332
+ <unit-amount-in-cents type="integer">1000</unit-amount-in-cents>
333
+ <quantity type="integer">1</quantity>
334
+ </add-on>
335
+ <add-on>
336
+ <add-on-code>special2</add-on-code>
337
+ <quantity type="integer">2</quantity>
338
+ <unit-amount type="integer">500</unit-amount>
339
+ </add-on>
340
+ </add-ons>
341
+ <timeframe>now</timeframe>
342
+ </subscription>
343
+
344
+ headers:
345
+ authorization:
346
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
347
+ content-type:
348
+ - application/xml
349
+ accept:
350
+ - "*/*"
351
+ user-agent:
352
+ - Ruby
353
+ connection:
354
+ - close
355
+ response: !ruby/struct:VCR::Response
356
+ status: !ruby/struct:VCR::ResponseStatus
357
+ code: 200
358
+ message: OK
359
+ headers:
360
+ x-runtime:
361
+ - "3497"
362
+ content-type:
363
+ - application/xml; charset=utf-8
364
+ etag:
365
+ - "\"372eb718c0ab10dc95cac3c41f1fcdfc\""
366
+ cache-control:
367
+ - private, max-age=0, must-revalidate
368
+ content-length:
369
+ - "1286"
370
+ set-cookie:
371
+ - _recurly_session=b39473bb94d1c7990e420e7a3ca6038a; domain=.recurly.local; path=/; HttpOnly
372
+ connection:
373
+ - close
374
+ server:
375
+ - thin 1.2.7 codename No Hup
376
+ body: |
377
+ <?xml version="1.0" encoding="UTF-8"?>
378
+ <subscription>
379
+ <id>subscription-addons-add-1297746103</id>
380
+ <account_code>subscription-addons-add-1297746103</account_code>
381
+ <plan>
382
+ <plan_code>paid</plan_code>
383
+ <name>Paid</name>
384
+ </plan>
385
+ <state>active</state>
386
+ <quantity type="integer">1</quantity>
387
+ <total_amount_in_cents type="integer">101200</total_amount_in_cents>
388
+ <activated_at type="datetime">2011-04-04T02:18:28Z</activated_at>
389
+ <canceled_at nil="true" type="datetime"></canceled_at>
390
+ <expires_at nil="true" type="datetime"></expires_at>
391
+ <current_period_started_at type="datetime">2011-04-04T02:18:18Z</current_period_started_at>
392
+ <current_period_ends_at type="datetime">2011-05-04T02:18:18Z</current_period_ends_at>
393
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
394
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
395
+ <add_ons type="array">
396
+ <add_on>
397
+ <add_on_code>special</add_on_code>
398
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
399
+ <quantity type="integer">1</quantity>
400
+ </add_on>
401
+ <add_on>
402
+ <add_on_code>special2</add_on_code>
403
+ <unit_amount_in_cents type="integer">50000</unit_amount_in_cents>
404
+ <quantity type="integer">2</quantity>
405
+ </add_on>
406
+ </add_ons>
407
+ </subscription>
408
+
409
+ http_version: "1.1"
410
+ - !ruby/struct:VCR::HTTPInteraction
411
+ request: !ruby/struct:VCR::Request
412
+ method: :get
413
+ uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-addons-add-1297746103/subscription.xml
414
+ body:
415
+ headers:
416
+ authorization:
417
+ - Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
418
+ accept:
419
+ - application/xml
420
+ accept-encoding:
421
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
422
+ user-agent:
423
+ - Ruby
424
+ connection:
425
+ - close
426
+ response: !ruby/struct:VCR::Response
427
+ status: !ruby/struct:VCR::ResponseStatus
428
+ code: 200
429
+ message: OK
430
+ headers:
431
+ x-runtime:
432
+ - "372"
433
+ content-type:
434
+ - application/xml; charset=utf-8
435
+ etag:
436
+ - "\"372eb718c0ab10dc95cac3c41f1fcdfc\""
437
+ cache-control:
438
+ - private, max-age=0, must-revalidate
439
+ content-length:
440
+ - "1286"
441
+ set-cookie:
442
+ - _recurly_session=6fb151e2f6461179bc6d9395046b5e60; domain=.recurly.local; path=/; HttpOnly
443
+ connection:
444
+ - close
445
+ server:
446
+ - thin 1.2.7 codename No Hup
447
+ body: |
448
+ <?xml version="1.0" encoding="UTF-8"?>
449
+ <subscription>
450
+ <id>subscription-addons-add-1297746103</id>
451
+ <account_code>subscription-addons-add-1297746103</account_code>
452
+ <plan>
453
+ <plan_code>paid</plan_code>
454
+ <name>Paid</name>
455
+ </plan>
456
+ <state>active</state>
457
+ <quantity type="integer">1</quantity>
458
+ <total_amount_in_cents type="integer">101200</total_amount_in_cents>
459
+ <activated_at type="datetime">2011-04-04T02:18:28Z</activated_at>
460
+ <canceled_at nil="true" type="datetime"></canceled_at>
461
+ <expires_at nil="true" type="datetime"></expires_at>
462
+ <current_period_started_at type="datetime">2011-04-04T02:18:18Z</current_period_started_at>
463
+ <current_period_ends_at type="datetime">2011-05-04T02:18:18Z</current_period_ends_at>
464
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
465
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
466
+ <add_ons type="array">
467
+ <add_on>
468
+ <add_on_code>special</add_on_code>
469
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
470
+ <quantity type="integer">1</quantity>
471
+ </add_on>
472
+ <add_on>
473
+ <add_on_code>special2</add_on_code>
474
+ <unit_amount_in_cents type="integer">50000</unit_amount_in_cents>
475
+ <quantity type="integer">2</quantity>
476
+ </add_on>
477
+ </add_ons>
478
+ </subscription>
521
479
 
522
480
  http_version: "1.1"