recurly 0.4.8 → 0.4.10

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 (114) hide show
  1. data/README.md +2 -2
  2. data/lib/recurly.rb +2 -1
  3. data/lib/recurly/account.rb +2 -2
  4. data/lib/recurly/base.rb +30 -12
  5. data/lib/recurly/billing_info.rb +2 -2
  6. data/lib/recurly/exceptions.rb +13 -0
  7. data/lib/recurly/plan.rb +1 -1
  8. data/lib/recurly/subscription.rb +2 -2
  9. data/lib/recurly/transaction.rb +2 -2
  10. data/lib/recurly/transparent.rb +1 -1
  11. data/lib/recurly/verification.rb +77 -0
  12. data/lib/recurly/version.rb +1 -1
  13. data/spec/config/recurly.yml +4 -4
  14. data/spec/integration/account_spec.rb +12 -0
  15. data/spec/integration/billing_info_spec.rb +2 -2
  16. data/spec/integration/charge_spec.rb +0 -1
  17. data/spec/integration/plan_spec.rb +2 -2
  18. data/spec/support/vcr.rb +2 -2
  19. data/spec/unit/verification_spec.rb +76 -0
  20. data/spec/vcr/account/accept-language-account/1313708721.yml +39 -0
  21. data/spec/vcr/account/close/1313708721.yml +104 -0
  22. data/spec/vcr/account/create-blank/1313708721.yml +33 -0
  23. data/spec/vcr/account/create-duplicate/1313708721.yml +69 -0
  24. data/spec/vcr/account/create-min/1313708721.yml +38 -0
  25. data/spec/vcr/account/create/1313708721.yml +39 -0
  26. data/spec/vcr/account/find/1313708721.yml +107 -0
  27. data/spec/vcr/account/list/1313708721.yml +878 -0
  28. data/spec/vcr/account/update/1313708721.yml +158 -0
  29. data/spec/vcr/billing/create/1313708721.yml +118 -0
  30. data/spec/vcr/billing/destroy/1313708721.yml +177 -0
  31. data/spec/vcr/billing/errors/1313708721.yml +71 -0
  32. data/spec/vcr/billing/find/1313708721.yml +156 -0
  33. data/spec/vcr/billing/update/1313708721.yml +159 -0
  34. data/spec/vcr/charge/create/1313708721.yml +153 -0
  35. data/spec/vcr/charge/delete-uninvoiced/1313708721.yml +206 -0
  36. data/spec/vcr/charge/list-all/1313708721.yml +198 -0
  37. data/spec/vcr/charge/list-invoiced/1313708721.yml +294 -0
  38. data/spec/vcr/charge/list-pending/1313708721.yml +200 -0
  39. data/spec/vcr/charge/lookup/1313708721.yml +112 -0
  40. data/spec/vcr/coupon/create/1296774903.yml +96 -170
  41. data/spec/vcr/coupon/destroy/1296774903.yml +114 -190
  42. data/spec/vcr/credit/create/1313708090.yml +112 -0
  43. data/spec/vcr/credit/delete/1313708090.yml +171 -0
  44. data/spec/vcr/credit/list/1313708090.yml +198 -0
  45. data/spec/vcr/credit/lookup/1313708090.yml +112 -0
  46. data/spec/vcr/invoice/create-no-charges/1296674173.yml +100 -185
  47. data/spec/vcr/invoice/create/1296674173.yml +182 -328
  48. data/spec/vcr/invoice/list/1296674173.yml +255 -442
  49. data/spec/vcr/invoice/lookup/1296674173.yml +187 -331
  50. data/spec/vcr/plan/all.yml +210 -253
  51. data/spec/vcr/plan/find.yml +115 -187
  52. data/spec/vcr/plan/update.yml +105 -187
  53. data/spec/vcr/subscription/addons/add/1296674173.yml +269 -212
  54. data/spec/vcr/subscription/addons/create/1296674173.yml +172 -212
  55. data/spec/vcr/subscription/addons/remove/1296674173.yml +257 -212
  56. data/spec/vcr/subscription/cancel-with-code/1296674173.yml +271 -452
  57. data/spec/vcr/subscription/cancel/1296674173.yml +234 -394
  58. data/spec/vcr/subscription/change1/1296674173.yml +237 -402
  59. data/spec/vcr/subscription/change2/1296674173.yml +238 -402
  60. data/spec/vcr/subscription/create/1296674173.yml +123 -221
  61. data/spec/vcr/subscription/find/1296674173.yml +161 -279
  62. data/spec/vcr/subscription/reactivate/1296674173.yml +261 -431
  63. data/spec/vcr/subscription/refund-full/1296674173.yml +223 -373
  64. data/spec/vcr/subscription/refund-none/1296674173.yml +223 -373
  65. data/spec/vcr/subscription/refund-partial/1296674173.yml +223 -373
  66. data/spec/vcr/transaction/all/1311126815.yml +215 -0
  67. data/spec/vcr/transaction/create-no-account/1311126815.yml +51 -0
  68. data/spec/vcr/transaction/create-with-account/1311126815.yml +125 -0
  69. data/spec/vcr/transaction/list-filled/1311126815.yml +349 -0
  70. data/spec/vcr/transaction/list-initial/1311126815.yml +123 -0
  71. data/spec/vcr/transaction/lookup/1311126815.yml +335 -0
  72. data/spec/vcr/transaction/refund/1311126815.yml +163 -0
  73. data/spec/vcr/transaction/void/1311126815.yml +215 -0
  74. data/spec/vcr/transparent/post-url/1311239470.yml +76 -0
  75. metadata +207 -154
  76. data/spec/vcr/account/accept-language-account/1296674173.yml +0 -70
  77. data/spec/vcr/account/close/1296674173.yml +0 -164
  78. data/spec/vcr/account/create-blank/1296674173.yml +0 -52
  79. data/spec/vcr/account/create-duplicate/1296674173.yml +0 -116
  80. data/spec/vcr/account/create-min/1296674173.yml +0 -66
  81. data/spec/vcr/account/create/1296674173.yml +0 -70
  82. data/spec/vcr/account/find/1296674173.yml +0 -169
  83. data/spec/vcr/account/list/1296674173.yml +0 -55
  84. data/spec/vcr/account/update/1296674173.yml +0 -258
  85. data/spec/vcr/billing/create/1296690812.yml +0 -215
  86. data/spec/vcr/billing/destroy/1296690812.yml +0 -294
  87. data/spec/vcr/billing/find/1296690812.yml +0 -280
  88. data/spec/vcr/billing/update/1296690812.yml +0 -297
  89. data/spec/vcr/charge/create/1296674173.yml +0 -262
  90. data/spec/vcr/charge/delete-uninvoiced/1296674173.yml +0 -307
  91. data/spec/vcr/charge/list-all/1296674173.yml +0 -316
  92. data/spec/vcr/charge/list-invoiced/1296674173.yml +0 -468
  93. data/spec/vcr/charge/list-pending/1296674173.yml +0 -316
  94. data/spec/vcr/charge/lookup/1296674173.yml +0 -180
  95. data/spec/vcr/coupon/create/1296688818.yml +0 -183
  96. data/spec/vcr/coupon/destroy/1296688818.yml +0 -207
  97. data/spec/vcr/credit/create/1296674173.yml +0 -121
  98. data/spec/vcr/credit/delete/1296674173.yml +0 -121
  99. data/spec/vcr/credit/list/1296674173.yml +0 -121
  100. data/spec/vcr/credit/lookup/1296674173.yml +0 -121
  101. data/spec/vcr/plan/delete/1296674173.yml +0 -225
  102. data/spec/vcr/transaction/all/1296674173.yml +0 -389
  103. data/spec/vcr/transaction/create-no-account/1296674173.yml +0 -93
  104. data/spec/vcr/transaction/create-with-account/1296674173.yml +0 -225
  105. data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
  106. data/spec/vcr/transaction/list-initial/1296674173.yml +0 -217
  107. data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
  108. data/spec/vcr/transaction/refund/1296674173.yml +0 -287
  109. data/spec/vcr/transaction/void/1296674173.yml +0 -352
  110. data/spec/vcr/transparent/post-url/1311127536.yml +0 -0
  111. data/spec/vcr/transparent/post-url/1311127583.yml +0 -0
  112. data/spec/vcr/transparent/post-url/1311128042.yml +0 -0
  113. data/spec/vcr/transparent/post-url/1311128073.yml +0 -0
  114. data/spec/vcr/transparent/post-url/1311128087.yml +0 -0
@@ -1,462 +1,292 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>subscription-reactivate-1296674173</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
- <accept-language type="yaml" nil="true"></accept-language>
15
- </account>
16
-
17
- headers:
18
- authorization:
19
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
20
- content-type:
5
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts.xml
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <account-code>subscription-reactivate-1296674173</account-code>\n
7
+ \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
8
+ \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <credit-card>\n
9
+ \ </credit-card>\n </billing-info>\n <accept-language nil=\"true\"></accept-language>\n</account>\n"
10
+ headers:
11
+ user-agent:
12
+ - Recurly Ruby Client v0.4.10
13
+ content-type:
21
14
  - application/xml
22
- accept:
23
- - "*/*"
24
- user-agent:
25
- - Ruby
26
- connection:
27
- - close
28
- response: !ruby/struct:VCR::Response
29
- status: !ruby/struct:VCR::ResponseStatus
15
+ response: !ruby/struct:VCR::Response
16
+ status: !ruby/struct:VCR::ResponseStatus
30
17
  code: 201
31
- message: "Created "
32
- headers:
33
- cache-control:
34
- - no-cache
35
- location:
36
- - http://litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173
37
- x-runtime:
38
- - "735"
39
- content-type:
18
+ message: Created
19
+ headers:
20
+ location:
21
+ - http://app.lvh.me:3000/accounts/subscription-reactivate-1296674173
22
+ content-type:
40
23
  - application/xml; charset=utf-8
41
- content-length:
42
- - "601"
43
- server:
44
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
- date:
46
- - Thu, 03 Feb 2011 22:22:16 GMT
47
- connection:
48
- - close
49
- set-cookie:
50
- - account_credentials=89e89e72a3e1859edaaa6a1b92d2d5b9393e79644a0b741dd02387bd031b20d5af713cfa445f94aea2fe28b464588d24fd3c6b7efbf6035dc17f35c6964b891f%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=bea95b9e7cf86945439879f0c99bc023; domain=.recurly.local; path=/; HttpOnly
53
- body: |
54
- <?xml version="1.0" encoding="UTF-8"?>
55
- <account>
56
- <id>subscription-reactivate-1296674173</id>
57
- <account_code>subscription-reactivate-1296674173</account_code>
58
- <username></username>
59
- <email>verena@test.com</email>
60
- <first_name>Verena</first_name>
61
- <last_name>Test</last_name>
62
- <company_name>Recurly Ruby Gem</company_name>
63
- <balance_in_cents type="integer">0</balance_in_cents>
64
- <closed type="boolean">false</closed>
65
- <hosted_login_token>a24735117e1143c0b27d962fe9ec23c1</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:22:16Z</created_at>
67
- <state>active</state>
68
- </account>
69
-
70
- http_version: "1.1"
71
- - !ruby/struct:VCR::HTTPInteraction
72
- request: !ruby/struct:VCR::Request
24
+ cache-control:
25
+ - no-cache
26
+ x-ua-compatible:
27
+ - IE=Edge
28
+ set-cookie:
29
+ - _recurly_session=48769820ecc70e0ad9373b77626d0a25; domain=.lvh.me; path=/;
30
+ HttpOnly
31
+ server:
32
+ - thin 1.2.11 codename Bat-Shit Crazy
33
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <id>subscription-reactivate-1296674173</id>\n
34
+ \ <account_code>subscription-reactivate-1296674173</account_code>\n <username></username>\n
35
+ \ <email>verena@test.com</email>\n <first_name>Verena</first_name>\n <last_name>Test</last_name>\n
36
+ \ <company_name>Recurly Ruby Gem</company_name>\n <balance_in_cents type=\"integer\">0</balance_in_cents>\n
37
+ \ <closed type=\"boolean\">false</closed>\n <hosted_login_token>549cef67181247688c6256806c26f3a4</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:02:17Z</created_at>\n <state>active</state>\n</account>\n"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
73
42
  method: :get
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/company/plans/paid.xml
75
- body:
76
- headers:
77
- authorization:
78
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
79
- accept:
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/site/plans/paid.xml
44
+ body: !!null
45
+ headers:
46
+ user-agent:
47
+ - Recurly Ruby Client v0.4.10
48
+ accept:
80
49
  - application/xml
81
- accept-encoding:
50
+ accept-encoding:
82
51
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
83
- user-agent:
84
- - Ruby
85
- connection:
86
- - close
87
- response: !ruby/struct:VCR::Response
88
- status: !ruby/struct:VCR::ResponseStatus
52
+ response: !ruby/struct:VCR::Response
53
+ status: !ruby/struct:VCR::ResponseStatus
89
54
  code: 200
90
- message: "OK "
91
- headers:
92
- x-runtime:
93
- - "237"
94
- content-type:
55
+ message: OK
56
+ headers:
57
+ content-type:
95
58
  - application/xml; charset=utf-8
96
- etag:
97
- - "\"70b5c605373b1a4346a2d7ed46048dc4\""
98
- cache-control:
99
- - private, max-age=0, must-revalidate
100
- content-length:
101
- - "1150"
102
- server:
103
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
104
- date:
105
- - Thu, 03 Feb 2011 22:22:18 GMT
106
- connection:
107
- - close
108
- set-cookie:
109
- - _recurly_session=2cb71cbe9c204c7eddaeb8dbb0d45d54; domain=.recurly.local; path=/; HttpOnly
110
- body: |
111
- <?xml version="1.0" encoding="UTF-8"?>
112
- <plan>
113
- <plan_code>paid</plan_code>
114
- <name>Paid</name>
115
- <description></description>
116
- <success_url></success_url>
117
- <cancel_url></cancel_url>
118
- <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
119
- <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
120
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
121
- <plan_interval_length type="integer">1</plan_interval_length>
122
- <plan_interval_unit>months</plan_interval_unit>
123
- <trial_interval_length type="integer">0</trial_interval_length>
124
- <trial_interval_unit>months</trial_interval_unit>
125
- <latest_version depreciated="true">
126
- <version type="integer">1</version>
127
- <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
128
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
129
- <plan_interval_length type="integer">1</plan_interval_length>
130
- <plan_interval_unit>months</plan_interval_unit>
131
- <trial_interval_length type="integer">0</trial_interval_length>
132
- <trial_interval_unit>months</trial_interval_unit>
133
- <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
134
- </latest_version>
135
- </plan>
136
-
137
- http_version: "1.1"
138
- - !ruby/struct:VCR::HTTPInteraction
139
- request: !ruby/struct:VCR::Request
59
+ etag:
60
+ - ! '"30df1bac5befaf2f9fc4564c2103a07b"'
61
+ cache-control:
62
+ - max-age=0, private, must-revalidate
63
+ x-ua-compatible:
64
+ - IE=Edge
65
+ set-cookie:
66
+ - _recurly_session=7c1b545771752c9ca7145bc72756783e; domain=.lvh.me; path=/;
67
+ HttpOnly
68
+ server:
69
+ - thin 1.2.11 codename Bat-Shit Crazy
70
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan_code>paid</plan_code>\n
71
+ \ <name>Paid Plan</name>\n <description></description>\n <success_url></success_url>\n
72
+ \ <cancel_url></cancel_url>\n <created_at type=\"datetime\">2011-08-02T14:08:28Z</created_at>\n
73
+ \ <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n <setup_fee_in_cents
74
+ type=\"integer\">0</setup_fee_in_cents>\n <plan_interval_length type=\"integer\">1</plan_interval_length>\n
75
+ \ <plan_interval_unit>months</plan_interval_unit>\n <trial_interval_length
76
+ type=\"integer\">0</trial_interval_length>\n <trial_interval_unit>days</trial_interval_unit>\n
77
+ \ <add_ons type=\"array\">\n <add_on>\n <add_on_code>special</add_on_code>\n
78
+ \ <default_quantity type=\"integer\">1</default_quantity>\n <default_unit_amount_in_cents
79
+ type=\"integer\">400</default_unit_amount_in_cents>\n </add_on>\n <add_on>\n
80
+ \ <add_on_code>special2</add_on_code>\n <default_quantity type=\"integer\">1</default_quantity>\n
81
+ \ <default_unit_amount_in_cents type=\"integer\">1600</default_unit_amount_in_cents>\n
82
+ \ </add_on>\n </add_ons>\n</plan>\n"
83
+ http_version: '1.1'
84
+ - !ruby/struct:VCR::HTTPInteraction
85
+ request: !ruby/struct:VCR::Request
140
86
  method: :post
141
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173/subscription.xml
142
- body: |
143
- <?xml version="1.0" encoding="UTF-8"?>
144
- <subscription>
145
- <plan-code>paid</plan-code>
146
- <quantity type="integer">1</quantity>
147
- <account>
148
- <account-code>subscription-reactivate-1296674173</account-code>
149
- <first-name>Verena</first-name>
150
- <last-name>Test</last-name>
151
- <email>verena@test.com</email>
152
- <company-name>Recurly Ruby Gem</company-name>
153
- <accept-language type="yaml" nil="true"></accept-language>
154
- <id>subscription-reactivate-1296674173</id>
155
- <username type="yaml" nil="true"></username>
156
- <balance-in-cents type="integer">0</balance-in-cents>
157
- <closed type="boolean">false</closed>
158
- <hosted-login-token>a24735117e1143c0b27d962fe9ec23c1</hosted-login-token>
159
- <created-at type="datetime">2011-02-03T22:22:16Z</created-at>
160
- <state>active</state>
161
- <billing-info>
162
- <address1>123 Test St</address1>
163
- <city>San Francisco</city>
164
- <state>CA</state>
165
- <zip>94115</zip>
166
- <country>US</country>
167
- <credit-card>
168
- <number>4111111111111111</number>
169
- <year type="integer">2012</year>
170
- <month type="integer">2</month>
171
- <verification-value>123</verification-value>
172
- </credit-card>
173
- <first-name>Verena</first-name>
174
- <last-name>Test</last-name>
175
- </billing-info>
176
- </account>
177
- </subscription>
178
-
179
- headers:
180
- authorization:
181
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
182
- content-type:
87
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-reactivate-1296674173/subscription.xml
88
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <plan-code>paid</plan-code>\n
89
+ \ <quantity type=\"integer\">1</quantity>\n <account>\n <account-code>subscription-reactivate-1296674173</account-code>\n
90
+ \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
91
+ \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <first-name>Verena</first-name>\n
92
+ \ <last-name>Test</last-name>\n <address1>123 Test St</address1>\n
93
+ \ <city>San Francisco</city>\n <state>CA</state>\n <zip>94115</zip>\n
94
+ \ <country>US</country>\n <credit-card>\n <number>4111111111111111</number>\n
95
+ \ <year type=\"integer\">2012</year>\n <month type=\"integer\">8</month>\n
96
+ \ <verification-value>123</verification-value>\n </credit-card>\n
97
+ \ </billing-info>\n <accept-language nil=\"true\"></accept-language>\n
98
+ \ <id>subscription-reactivate-1296674173</id>\n <username nil=\"true\"></username>\n
99
+ \ <balance-in-cents type=\"integer\">0</balance-in-cents>\n <closed type=\"boolean\">false</closed>\n
100
+ \ <hosted-login-token>549cef67181247688c6256806c26f3a4</hosted-login-token>\n
101
+ \ <created-at type=\"datetime\">2011-08-19T20:02:17Z</created-at>\n <state>active</state>\n
102
+ \ </account>\n <addons type=\"array\"/>\n</subscription>\n"
103
+ headers:
104
+ user-agent:
105
+ - Recurly Ruby Client v0.4.10
106
+ content-type:
183
107
  - application/xml
184
- accept:
185
- - "*/*"
186
- user-agent:
187
- - Ruby
188
- connection:
189
- - close
190
- response: !ruby/struct:VCR::Response
191
- status: !ruby/struct:VCR::ResponseStatus
108
+ response: !ruby/struct:VCR::Response
109
+ status: !ruby/struct:VCR::ResponseStatus
192
110
  code: 201
193
- message: "Created "
194
- headers:
195
- cache-control:
196
- - no-cache
197
- x-runtime:
198
- - "4324"
199
- content-type:
111
+ message: Created
112
+ headers:
113
+ content-type:
200
114
  - application/xml; charset=utf-8
201
- content-length:
202
- - "916"
203
- server:
204
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
205
- date:
206
- - Thu, 03 Feb 2011 22:22:24 GMT
207
- connection:
208
- - close
209
- set-cookie:
210
- - _recurly_session=d525ffd5ff7d3ae222ae963563313fa5; domain=.recurly.local; path=/; HttpOnly
211
- body: |
212
- <?xml version="1.0" encoding="UTF-8"?>
213
- <subscription>
214
- <id>subscription-reactivate-1296674173</id>
215
- <account_code>subscription-reactivate-1296674173</account_code>
216
- <plan>
217
- <plan_code>paid</plan_code>
218
- <name>Paid</name>
219
- </plan>
220
- <state>active</state>
221
- <quantity type="integer">1</quantity>
222
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
223
- <activated_at type="datetime">2011-02-03T22:22:20Z</activated_at>
224
- <canceled_at nil="true" type="datetime"></canceled_at>
225
- <expires_at nil="true" type="datetime"></expires_at>
226
- <current_period_started_at type="datetime">2011-02-03T22:22:20Z</current_period_started_at>
227
- <current_period_ends_at type="datetime">2011-03-03T22:22:20Z</current_period_ends_at>
228
- <trial_started_at nil="true" type="datetime"></trial_started_at>
229
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
230
- <add_ons type="array">
231
- </add_ons>
232
- </subscription>
233
-
234
- http_version: "1.1"
235
- - !ruby/struct:VCR::HTTPInteraction
236
- request: !ruby/struct:VCR::Request
115
+ cache-control:
116
+ - no-cache
117
+ x-ua-compatible:
118
+ - IE=Edge
119
+ set-cookie:
120
+ - _recurly_session=09bd48e79f7719dd6d6a6c7f51752e50; domain=.lvh.me; path=/;
121
+ HttpOnly
122
+ server:
123
+ - thin 1.2.11 codename Bat-Shit Crazy
124
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-reactivate-1296674173</id>\n
125
+ \ <account_code>subscription-reactivate-1296674173</account_code>\n <plan>\n
126
+ \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
127
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
128
+ \ <total_amount_in_cents type=\"integer\">1200</total_amount_in_cents>\n <activated_at
129
+ type=\"datetime\">2011-08-19T20:02:18Z</activated_at>\n <canceled_at nil=\"true\"
130
+ type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
131
+ \ <current_period_started_at type=\"datetime\">2011-08-19T20:02:18Z</current_period_started_at>\n
132
+ \ <current_period_ends_at type=\"datetime\">2011-09-19T20:02:18Z</current_period_ends_at>\n
133
+ \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
134
+ nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
135
+ \ </add_ons>\n</subscription>\n"
136
+ http_version: '1.1'
137
+ - !ruby/struct:VCR::HTTPInteraction
138
+ request: !ruby/struct:VCR::Request
237
139
  method: :get
238
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173/subscription.xml
239
- body:
240
- headers:
241
- authorization:
242
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
243
- accept:
140
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-reactivate-1296674173/subscription.xml
141
+ body: !!null
142
+ headers:
143
+ user-agent:
144
+ - Recurly Ruby Client v0.4.10
145
+ accept:
244
146
  - application/xml
245
- accept-encoding:
147
+ accept-encoding:
246
148
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
247
- user-agent:
248
- - Ruby
249
- connection:
250
- - close
251
- response: !ruby/struct:VCR::Response
252
- status: !ruby/struct:VCR::ResponseStatus
149
+ response: !ruby/struct:VCR::Response
150
+ status: !ruby/struct:VCR::ResponseStatus
253
151
  code: 200
254
- message: "OK "
255
- headers:
256
- x-runtime:
257
- - "412"
258
- content-type:
152
+ message: OK
153
+ headers:
154
+ content-type:
259
155
  - application/xml; charset=utf-8
260
- etag:
261
- - "\"12dd0c385a0dc0deeb907cbf59501ba0\""
262
- cache-control:
263
- - private, max-age=0, must-revalidate
264
- content-length:
265
- - "916"
266
- server:
267
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
268
- date:
269
- - Thu, 03 Feb 2011 22:22:27 GMT
270
- connection:
271
- - close
272
- set-cookie:
273
- - _recurly_session=58f5fbaa00eecd69b98d25ed5f32a8f3; domain=.recurly.local; path=/; HttpOnly
274
- body: |
275
- <?xml version="1.0" encoding="UTF-8"?>
276
- <subscription>
277
- <id>subscription-reactivate-1296674173</id>
278
- <account_code>subscription-reactivate-1296674173</account_code>
279
- <plan>
280
- <plan_code>paid</plan_code>
281
- <name>Paid</name>
282
- </plan>
283
- <state>active</state>
284
- <quantity type="integer">1</quantity>
285
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
286
- <activated_at type="datetime">2011-02-03T22:22:20Z</activated_at>
287
- <canceled_at nil="true" type="datetime"></canceled_at>
288
- <expires_at nil="true" type="datetime"></expires_at>
289
- <current_period_started_at type="datetime">2011-02-03T22:22:20Z</current_period_started_at>
290
- <current_period_ends_at type="datetime">2011-03-03T22:22:20Z</current_period_ends_at>
291
- <trial_started_at nil="true" type="datetime"></trial_started_at>
292
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
293
- <add_ons type="array">
294
- </add_ons>
295
- </subscription>
296
-
297
- http_version: "1.1"
298
- - !ruby/struct:VCR::HTTPInteraction
299
- request: !ruby/struct:VCR::Request
156
+ etag:
157
+ - ! '"7e552ed4a85050309ec649aed0d72f13"'
158
+ cache-control:
159
+ - max-age=0, private, must-revalidate
160
+ x-ua-compatible:
161
+ - IE=Edge
162
+ set-cookie:
163
+ - _recurly_session=e897de4b41b5377aa5be8b89eeb35368; domain=.lvh.me; path=/;
164
+ HttpOnly
165
+ server:
166
+ - thin 1.2.11 codename Bat-Shit Crazy
167
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-reactivate-1296674173</id>\n
168
+ \ <account_code>subscription-reactivate-1296674173</account_code>\n <plan>\n
169
+ \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
170
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
171
+ \ <total_amount_in_cents type=\"integer\">1200</total_amount_in_cents>\n <activated_at
172
+ type=\"datetime\">2011-08-19T20:02:18Z</activated_at>\n <canceled_at nil=\"true\"
173
+ type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
174
+ \ <current_period_started_at type=\"datetime\">2011-08-19T20:02:18Z</current_period_started_at>\n
175
+ \ <current_period_ends_at type=\"datetime\">2011-09-19T20:02:18Z</current_period_ends_at>\n
176
+ \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
177
+ nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
178
+ \ </add_ons>\n</subscription>\n"
179
+ http_version: '1.1'
180
+ - !ruby/struct:VCR::HTTPInteraction
181
+ request: !ruby/struct:VCR::Request
300
182
  method: :delete
301
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173/subscription.xml
302
- body:
303
- headers:
304
- authorization:
305
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
306
- accept:
183
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-reactivate-1296674173/subscription.xml
184
+ body: !!null
185
+ headers:
186
+ user-agent:
187
+ - Recurly Ruby Client v0.4.10
188
+ accept:
307
189
  - application/xml
308
- user-agent:
309
- - Ruby
310
- connection:
311
- - close
312
- response: !ruby/struct:VCR::Response
313
- status: !ruby/struct:VCR::ResponseStatus
190
+ response: !ruby/struct:VCR::Response
191
+ status: !ruby/struct:VCR::ResponseStatus
314
192
  code: 200
315
- message: "OK "
316
- headers:
317
- x-runtime:
318
- - "2015"
319
- content-type:
193
+ message: OK
194
+ headers:
195
+ content-type:
320
196
  - application/xml; charset=utf-8
321
- etag:
322
- - "\"b6aa8bed512df518f7d51f76baabb729\""
323
- cache-control:
324
- - private, max-age=0, must-revalidate
325
- content-length:
326
- - "936"
327
- server:
328
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
329
- date:
330
- - Thu, 03 Feb 2011 22:22:31 GMT
331
- connection:
332
- - close
333
- set-cookie:
334
- - _recurly_session=f08d194fa3189e4683657fa55eef52fa; domain=.recurly.local; path=/; HttpOnly
335
- body: |
336
- <?xml version="1.0" encoding="UTF-8"?>
337
- <subscription>
338
- <id>subscription-reactivate-1296674173</id>
339
- <account_code>subscription-reactivate-1296674173</account_code>
340
- <plan>
341
- <plan_code>paid</plan_code>
342
- <name>Paid</name>
343
- </plan>
344
- <state>canceled</state>
345
- <quantity type="integer">1</quantity>
346
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
347
- <activated_at type="datetime">2011-02-03T22:22:20Z</activated_at>
348
- <canceled_at type="datetime">2011-02-03T22:22:29Z</canceled_at>
349
- <expires_at type="datetime">2011-03-03T22:22:20Z</expires_at>
350
- <current_period_started_at type="datetime">2011-02-03T22:22:20Z</current_period_started_at>
351
- <current_period_ends_at type="datetime">2011-03-03T22:22:20Z</current_period_ends_at>
352
- <trial_started_at nil="true" type="datetime"></trial_started_at>
353
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
354
- <add_ons type="array">
355
- </add_ons>
356
- </subscription>
357
-
358
- http_version: "1.1"
359
- - !ruby/struct:VCR::HTTPInteraction
360
- request: !ruby/struct:VCR::Request
197
+ etag:
198
+ - ! '"a560e771c43a635c191986321ed330b2"'
199
+ cache-control:
200
+ - max-age=0, private, must-revalidate
201
+ x-ua-compatible:
202
+ - IE=Edge
203
+ set-cookie:
204
+ - _recurly_session=8af7cac973c30cdffc89a8e9cb5b7815; domain=.lvh.me; path=/;
205
+ HttpOnly
206
+ server:
207
+ - thin 1.2.11 codename Bat-Shit Crazy
208
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-reactivate-1296674173</id>\n
209
+ \ <account_code>subscription-reactivate-1296674173</account_code>\n <plan>\n
210
+ \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>canceled</state>\n
211
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
212
+ \ <total_amount_in_cents type=\"integer\">1200</total_amount_in_cents>\n <activated_at
213
+ type=\"datetime\">2011-08-19T20:02:18Z</activated_at>\n <canceled_at type=\"datetime\">2011-08-19T20:02:21Z</canceled_at>\n
214
+ \ <expires_at type=\"datetime\">2011-09-19T20:02:18Z</expires_at>\n <current_period_started_at
215
+ type=\"datetime\">2011-08-19T20:02:18Z</current_period_started_at>\n <current_period_ends_at
216
+ type=\"datetime\">2011-09-19T20:02:18Z</current_period_ends_at>\n <trial_started_at
217
+ nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at nil=\"true\"
218
+ type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n </add_ons>\n</subscription>\n"
219
+ http_version: '1.1'
220
+ - !ruby/struct:VCR::HTTPInteraction
221
+ request: !ruby/struct:VCR::Request
361
222
  method: :post
362
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173/subscription/reactivate
363
- body: ""
364
- headers:
365
- authorization:
366
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
367
- content-type:
223
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-reactivate-1296674173/subscription/reactivate
224
+ body: !!null
225
+ headers:
226
+ user-agent:
227
+ - Recurly Ruby Client v0.4.10
228
+ content-type:
368
229
  - application/xml
369
- accept:
370
- - "*/*"
371
- user-agent:
372
- - Ruby
373
- connection:
374
- - close
375
- response: !ruby/struct:VCR::Response
376
- status: !ruby/struct:VCR::ResponseStatus
230
+ response: !ruby/struct:VCR::Response
231
+ status: !ruby/struct:VCR::ResponseStatus
377
232
  code: 302
378
- message: "Found "
379
- headers:
380
- cache-control:
381
- - no-cache
382
- location:
383
- - http://litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173
384
- x-runtime:
385
- - "486"
386
- content-type:
233
+ message: Moved Temporarily
234
+ headers:
235
+ location:
236
+ - http://app.lvh.me:3000/accounts/subscription-reactivate-1296674173
237
+ content-type:
387
238
  - text/html; charset=utf-8
388
- content-length:
389
- - "146"
390
- server:
391
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
392
- date:
393
- - Thu, 03 Feb 2011 22:22:33 GMT
394
- connection:
395
- - close
396
- set-cookie:
397
- - _recurly_session=e4f80db37403a422d70b014e3ab008f1; domain=.recurly.local; path=/; HttpOnly
398
- body: <html><body>You are being <a href="http://litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173">redirected</a>.</body></html>
399
- http_version: "1.1"
400
- - !ruby/struct:VCR::HTTPInteraction
401
- request: !ruby/struct:VCR::Request
239
+ cache-control:
240
+ - no-cache
241
+ x-ua-compatible:
242
+ - IE=Edge
243
+ set-cookie:
244
+ - _recurly_session=ff7674a86fc09be2d4582201552c9c99; domain=.lvh.me; path=/;
245
+ HttpOnly
246
+ server:
247
+ - thin 1.2.11 codename Bat-Shit Crazy
248
+ body: <html><body>You are being <a href="http://app.lvh.me:3000/accounts/subscription-reactivate-1296674173">redirected</a>.</body></html>
249
+ http_version: '1.1'
250
+ - !ruby/struct:VCR::HTTPInteraction
251
+ request: !ruby/struct:VCR::Request
402
252
  method: :get
403
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/subscription-reactivate-1296674173/subscription.xml
404
- body:
405
- headers:
406
- authorization:
407
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
408
- accept:
253
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-reactivate-1296674173/subscription.xml
254
+ body: !!null
255
+ headers:
256
+ user-agent:
257
+ - Recurly Ruby Client v0.4.10
258
+ accept:
409
259
  - application/xml
410
- accept-encoding:
260
+ accept-encoding:
411
261
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
412
- user-agent:
413
- - Ruby
414
- connection:
415
- - close
416
- response: !ruby/struct:VCR::Response
417
- status: !ruby/struct:VCR::ResponseStatus
262
+ response: !ruby/struct:VCR::Response
263
+ status: !ruby/struct:VCR::ResponseStatus
418
264
  code: 200
419
- message: "OK "
420
- headers:
421
- x-runtime:
422
- - "273"
423
- content-type:
265
+ message: OK
266
+ headers:
267
+ content-type:
424
268
  - application/xml; charset=utf-8
425
- etag:
426
- - "\"2149a442b4684eb55f2a34a28bb4b10b\""
427
- cache-control:
428
- - private, max-age=0, must-revalidate
429
- content-length:
430
- - "925"
431
- server:
432
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
433
- date:
434
- - Thu, 03 Feb 2011 22:22:35 GMT
435
- connection:
436
- - close
437
- set-cookie:
438
- - _recurly_session=ec4918ce45e97186d194fe5b59c612c3; domain=.recurly.local; path=/; HttpOnly
439
- body: |
440
- <?xml version="1.0" encoding="UTF-8"?>
441
- <subscription>
442
- <id>subscription-reactivate-1296674173</id>
443
- <account_code>subscription-reactivate-1296674173</account_code>
444
- <plan>
445
- <plan_code>paid</plan_code>
446
- <name>Paid</name>
447
- </plan>
448
- <state>active</state>
449
- <quantity type="integer">1</quantity>
450
- <total_amount_in_cents type="integer">1000</total_amount_in_cents>
451
- <activated_at type="datetime">2011-02-03T22:22:20Z</activated_at>
452
- <canceled_at nil="true" type="datetime"></canceled_at>
453
- <expires_at type="datetime">2011-03-03T22:22:20Z</expires_at>
454
- <current_period_started_at type="datetime">2011-02-03T22:22:20Z</current_period_started_at>
455
- <current_period_ends_at type="datetime">2011-03-03T22:22:20Z</current_period_ends_at>
456
- <trial_started_at nil="true" type="datetime"></trial_started_at>
457
- <trial_ends_at nil="true" type="datetime"></trial_ends_at>
458
- <add_ons type="array">
459
- </add_ons>
460
- </subscription>
461
-
462
- http_version: "1.1"
269
+ etag:
270
+ - ! '"b46cae4c34850c345df390417ab0b1c0"'
271
+ cache-control:
272
+ - max-age=0, private, must-revalidate
273
+ x-ua-compatible:
274
+ - IE=Edge
275
+ set-cookie:
276
+ - _recurly_session=dfde1db46195e4c861af7f8f71b8131b; domain=.lvh.me; path=/;
277
+ HttpOnly
278
+ server:
279
+ - thin 1.2.11 codename Bat-Shit Crazy
280
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-reactivate-1296674173</id>\n
281
+ \ <account_code>subscription-reactivate-1296674173</account_code>\n <plan>\n
282
+ \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
283
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
284
+ \ <total_amount_in_cents type=\"integer\">1200</total_amount_in_cents>\n <activated_at
285
+ type=\"datetime\">2011-08-19T20:02:18Z</activated_at>\n <canceled_at nil=\"true\"
286
+ type=\"datetime\"></canceled_at>\n <expires_at type=\"datetime\">2011-09-19T20:02:18Z</expires_at>\n
287
+ \ <current_period_started_at type=\"datetime\">2011-08-19T20:02:18Z</current_period_started_at>\n
288
+ \ <current_period_ends_at type=\"datetime\">2011-09-19T20:02:18Z</current_period_ends_at>\n
289
+ \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
290
+ nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
291
+ \ </add_ons>\n</subscription>\n"
292
+ http_version: '1.1'