recurly 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of recurly might be problematic. Click here for more details.
- data/lib/recurly/base.rb +11 -4
- data/lib/recurly/billing_info.rb +2 -1
- data/lib/recurly/charge.rb +3 -1
- data/lib/recurly/credit.rb +3 -1
- data/lib/recurly/subscription.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/spec/config/recurly.yml +4 -4
- data/spec/unit/billing_info_spec.rb +1 -0
- data/spec/unit/charge_spec.rb +2 -0
- data/spec/unit/credit_spec.rb +2 -0
- data/spec/unit/subscription_spec.rb +1 -1
- data/spec/vcr/account/accept-language-account/1301979678.yml +14 -12
- data/spec/vcr/account/close/1301979678.yml +41 -35
- data/spec/vcr/account/create-blank/1301979678.yml +11 -9
- data/spec/vcr/account/create-duplicate/1301979678.yml +25 -21
- data/spec/vcr/account/create-min/1301979678.yml +14 -12
- data/spec/vcr/account/create/1301979678.yml +14 -12
- data/spec/vcr/account/find/1301979678.yml +40 -34
- data/spec/vcr/account/list/1301979678.yml +348 -341
- data/spec/vcr/account/update/1301979678.yml +61 -53
- data/spec/vcr/billing/create/1302025874.yml +42 -36
- data/spec/vcr/billing/destroy/1302025874.yml +65 -55
- data/spec/vcr/billing/errors/1302025874.yml +25 -21
- data/spec/vcr/billing/find/1302025874.yml +56 -48
- data/spec/vcr/billing/update/1302025874.yml +56 -48
- data/spec/vcr/charge/create/1297746103.yml +65 -53
- data/spec/vcr/charge/delete-uninvoiced/1297746103.yml +85 -69
- data/spec/vcr/charge/list-all/1297746103.yml +97 -75
- data/spec/vcr/charge/list-invoiced/1297746103.yml +143 -115
- data/spec/vcr/charge/list-pending/1297746103.yml +97 -75
- data/spec/vcr/charge/lookup/1297746103.yml +51 -41
- data/spec/vcr/coupon/create/1299714521.yml +28 -88
- data/spec/vcr/coupon/destroy/1299714521.yml +25 -107
- data/spec/vcr/credit/create/1299714599.yml +51 -41
- data/spec/vcr/credit/delete/1299714599.yml +74 -60
- data/spec/vcr/credit/list/1299714599.yml +97 -75
- data/spec/vcr/credit/lookup/1299714599.yml +51 -41
- data/spec/vcr/invoice/create-no-charges/1297746103.yml +39 -33
- data/spec/vcr/invoice/create/1297746103.yml +86 -72
- data/spec/vcr/invoice/list/1297746103.yml +121 -103
- data/spec/vcr/invoice/lookup/1297746103.yml +84 -72
- data/spec/vcr/plan/all.yml +108 -134
- data/spec/vcr/plan/find.yml +47 -95
- data/spec/vcr/plan/update.yml +152 -66
- data/spec/vcr/subscription/addons/add/1301885121.yml +48 -310
- data/spec/vcr/subscription/addons/create/1301885121.yml +48 -151
- data/spec/vcr/subscription/addons/remove/1301885121.yml +48 -279
- data/spec/vcr/subscription/cancel-with-code/1301881900.yml +132 -135
- data/spec/vcr/subscription/cancel/1301881900.yml +111 -117
- data/spec/vcr/subscription/change1/1301881900.yml +107 -113
- data/spec/vcr/subscription/change2/1301881900.yml +107 -113
- data/spec/vcr/subscription/create/1301881900.yml +50 -65
- data/spec/vcr/subscription/find/1301881900.yml +69 -81
- data/spec/vcr/subscription/reactivate/1301881900.yml +122 -126
- data/spec/vcr/subscription/refund-full/1301881900.yml +84 -153
- data/spec/vcr/subscription/refund-none/1301881900.yml +101 -108
- data/spec/vcr/subscription/refund-partial/1301881900.yml +84 -153
- data/spec/vcr/transaction/all/1301883347.yml +86 -84
- data/spec/vcr/transaction/create-no-account/1301883347.yml +15 -13
- data/spec/vcr/transaction/create-with-account/1301883347.yml +43 -37
- data/spec/vcr/transaction/list-filled/1301883347.yml +115 -101
- data/spec/vcr/transaction/list-initial/1301883347.yml +43 -37
- data/spec/vcr/transaction/lookup/1301883347.yml +118 -102
- data/spec/vcr/transaction/refund/1301883347.yml +58 -50
- data/spec/vcr/transaction/void/1301883347.yml +75 -82
- data/spec/vcr/transparent/post-url/1301879142.yml +29 -25
- metadata +3 -3
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://api-test%
|
5
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
|
6
6
|
body: |
|
7
7
|
<?xml version="1.0" encoding="UTF-8"?>
|
8
8
|
<account>
|
@@ -20,36 +20,38 @@
|
|
20
20
|
|
21
21
|
headers:
|
22
22
|
authorization:
|
23
|
-
- Basic
|
23
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
24
|
+
user-agent:
|
25
|
+
- Recurly Ruby Client v0.4.6
|
24
26
|
content-type:
|
25
27
|
- application/xml
|
26
28
|
accept:
|
27
29
|
- "*/*"
|
28
|
-
user-agent:
|
29
|
-
- Ruby
|
30
30
|
connection:
|
31
31
|
- close
|
32
32
|
response: !ruby/struct:VCR::Response
|
33
33
|
status: !ruby/struct:VCR::ResponseStatus
|
34
34
|
code: 201
|
35
|
-
message: Created
|
35
|
+
message: "Created "
|
36
36
|
headers:
|
37
37
|
cache-control:
|
38
38
|
- no-cache
|
39
39
|
location:
|
40
40
|
- http://app.recurly.local:3000/accounts/subscription-addons-create-1301885121
|
41
41
|
x-runtime:
|
42
|
-
- "
|
42
|
+
- "238"
|
43
43
|
content-type:
|
44
44
|
- application/xml; charset=utf-8
|
45
45
|
content-length:
|
46
46
|
- "607"
|
47
|
-
|
48
|
-
-
|
47
|
+
server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
49
|
+
date:
|
50
|
+
- Thu, 21 Apr 2011 17:58:56 GMT
|
49
51
|
connection:
|
50
52
|
- close
|
51
|
-
|
52
|
-
-
|
53
|
+
set-cookie:
|
54
|
+
- _recurly_session=65b3e2f39a5de751f19e2745193d3b71; domain=.recurly.local; path=/; HttpOnly
|
53
55
|
body: |
|
54
56
|
<?xml version="1.0" encoding="UTF-8"?>
|
55
57
|
<account>
|
@@ -62,8 +64,8 @@
|
|
62
64
|
<company_name>Recurly Ruby Gem</company_name>
|
63
65
|
<balance_in_cents type="integer">0</balance_in_cents>
|
64
66
|
<closed type="boolean">false</closed>
|
65
|
-
<hosted_login_token>
|
66
|
-
<created_at type="datetime">2011-04-
|
67
|
+
<hosted_login_token>ac261e89b34c458ca7fcecdfc290ac4e</hosted_login_token>
|
68
|
+
<created_at type="datetime">2011-04-21T17:58:56Z</created_at>
|
67
69
|
<state>active</state>
|
68
70
|
</account>
|
69
71
|
|
@@ -71,40 +73,42 @@
|
|
71
73
|
- !ruby/struct:VCR::HTTPInteraction
|
72
74
|
request: !ruby/struct:VCR::Request
|
73
75
|
method: :get
|
74
|
-
uri: http://api-test%
|
76
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
|
75
77
|
body:
|
76
78
|
headers:
|
77
79
|
authorization:
|
78
|
-
- Basic
|
80
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
81
|
+
user-agent:
|
82
|
+
- Recurly Ruby Client v0.4.6
|
79
83
|
accept:
|
80
84
|
- application/xml
|
81
85
|
accept-encoding:
|
82
86
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
83
|
-
user-agent:
|
84
|
-
- Ruby
|
85
87
|
connection:
|
86
88
|
- close
|
87
89
|
response: !ruby/struct:VCR::Response
|
88
90
|
status: !ruby/struct:VCR::ResponseStatus
|
89
91
|
code: 200
|
90
|
-
message: OK
|
92
|
+
message: "OK "
|
91
93
|
headers:
|
92
94
|
x-runtime:
|
93
|
-
- "
|
95
|
+
- "199"
|
94
96
|
content-type:
|
95
97
|
- application/xml; charset=utf-8
|
96
98
|
etag:
|
97
|
-
- "\"
|
99
|
+
- "\"3888306c167f105a4e165433ee427264\""
|
98
100
|
cache-control:
|
99
101
|
- private, max-age=0, must-revalidate
|
100
102
|
content-length:
|
101
|
-
- "
|
102
|
-
|
103
|
-
-
|
103
|
+
- "612"
|
104
|
+
server:
|
105
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
106
|
+
date:
|
107
|
+
- Thu, 21 Apr 2011 17:58:58 GMT
|
104
108
|
connection:
|
105
109
|
- close
|
106
|
-
|
107
|
-
-
|
110
|
+
set-cookie:
|
111
|
+
- _recurly_session=0c4c7f81bdc06eacf5d712b5c84ec2dc; domain=.recurly.local; path=/; HttpOnly
|
108
112
|
body: |
|
109
113
|
<?xml version="1.0" encoding="UTF-8"?>
|
110
114
|
<plan>
|
@@ -113,42 +117,20 @@
|
|
113
117
|
<description></description>
|
114
118
|
<success_url></success_url>
|
115
119
|
<cancel_url></cancel_url>
|
116
|
-
<created_at type="datetime">2011-04-
|
117
|
-
<unit_amount_in_cents type="integer">
|
120
|
+
<created_at type="datetime">2011-04-21T17:57:33Z</created_at>
|
121
|
+
<unit_amount_in_cents type="integer">0</unit_amount_in_cents>
|
118
122
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
119
123
|
<plan_interval_length type="integer">1</plan_interval_length>
|
120
124
|
<plan_interval_unit>months</plan_interval_unit>
|
121
125
|
<trial_interval_length type="integer">0</trial_interval_length>
|
122
126
|
<trial_interval_unit>months</trial_interval_unit>
|
123
|
-
<latest_version depreciated="true">
|
124
|
-
<version type="integer">1</version>
|
125
|
-
<unit_amount_in_cents type="integer">200</unit_amount_in_cents>
|
126
|
-
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
127
|
-
<plan_interval_length type="integer">1</plan_interval_length>
|
128
|
-
<plan_interval_unit>months</plan_interval_unit>
|
129
|
-
<trial_interval_length type="integer">0</trial_interval_length>
|
130
|
-
<trial_interval_unit>months</trial_interval_unit>
|
131
|
-
<created_at type="datetime">2011-04-04T02:15:00Z</created_at>
|
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>
|
145
127
|
</plan>
|
146
128
|
|
147
129
|
http_version: "1.1"
|
148
130
|
- !ruby/struct:VCR::HTTPInteraction
|
149
131
|
request: !ruby/struct:VCR::Request
|
150
132
|
method: :post
|
151
|
-
uri: http://api-test%
|
133
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-addons-create-1301885121/subscription.xml
|
152
134
|
body: |
|
153
135
|
<?xml version="1.0" encoding="UTF-8"?>
|
154
136
|
<subscription>
|
@@ -180,8 +162,8 @@
|
|
180
162
|
<username type="yaml" nil="true"></username>
|
181
163
|
<balance-in-cents type="integer">0</balance-in-cents>
|
182
164
|
<closed type="boolean">false</closed>
|
183
|
-
<hosted-login-token>
|
184
|
-
<created-at type="datetime">2011-04-
|
165
|
+
<hosted-login-token>ac261e89b34c458ca7fcecdfc290ac4e</hosted-login-token>
|
166
|
+
<created-at type="datetime">2011-04-21T17:58:56Z</created-at>
|
185
167
|
<state>active</state>
|
186
168
|
</account>
|
187
169
|
<add-ons type="array">
|
@@ -196,126 +178,41 @@
|
|
196
178
|
|
197
179
|
headers:
|
198
180
|
authorization:
|
199
|
-
- Basic
|
181
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
182
|
+
user-agent:
|
183
|
+
- Recurly Ruby Client v0.4.6
|
200
184
|
content-type:
|
201
185
|
- application/xml
|
202
186
|
accept:
|
203
187
|
- "*/*"
|
204
|
-
user-agent:
|
205
|
-
- Ruby
|
206
188
|
connection:
|
207
189
|
- close
|
208
190
|
response: !ruby/struct:VCR::Response
|
209
191
|
status: !ruby/struct:VCR::ResponseStatus
|
210
|
-
code:
|
211
|
-
message:
|
192
|
+
code: 422
|
193
|
+
message: ""
|
212
194
|
headers:
|
213
195
|
cache-control:
|
214
196
|
- no-cache
|
215
197
|
x-runtime:
|
216
|
-
- "
|
198
|
+
- "775"
|
217
199
|
content-type:
|
218
200
|
- application/xml; charset=utf-8
|
219
201
|
content-length:
|
220
|
-
- "
|
221
|
-
set-cookie:
|
222
|
-
- _recurly_session=6c3b937cac34636c1c4a1527efa2f73b; domain=.recurly.local; path=/; HttpOnly
|
223
|
-
connection:
|
224
|
-
- close
|
202
|
+
- "228"
|
225
203
|
server:
|
226
|
-
-
|
227
|
-
|
228
|
-
|
229
|
-
<subscription>
|
230
|
-
<id>subscription-addons-create-1301885121</id>
|
231
|
-
<account_code>subscription-addons-create-1301885121</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-05T19:39:16Z</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-05T19:39:16Z</current_period_started_at>
|
243
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:16Z</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-create-1301885121/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
|
204
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
205
|
+
date:
|
206
|
+
- Thu, 21 Apr 2011 17:59:00 GMT
|
270
207
|
connection:
|
271
208
|
- 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
|
-
- "407"
|
279
|
-
content-type:
|
280
|
-
- application/xml; charset=utf-8
|
281
|
-
etag:
|
282
|
-
- "\"617159d399466053e7403f4dfd810d78\""
|
283
|
-
cache-control:
|
284
|
-
- private, max-age=0, must-revalidate
|
285
|
-
content-length:
|
286
|
-
- "1105"
|
287
209
|
set-cookie:
|
288
|
-
- _recurly_session=
|
289
|
-
connection:
|
290
|
-
- close
|
291
|
-
server:
|
292
|
-
- thin 1.2.7 codename No Hup
|
210
|
+
- _recurly_session=53993398d9a952ec30898f01d87b2a20; domain=.recurly.local; path=/; HttpOnly
|
293
211
|
body: |
|
294
212
|
<?xml version="1.0" encoding="UTF-8"?>
|
295
|
-
<
|
296
|
-
<
|
297
|
-
<
|
298
|
-
|
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-05T19:39:16Z</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-05T19:39:16Z</current_period_started_at>
|
309
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:16Z</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>
|
213
|
+
<errors>
|
214
|
+
<error field="subscriptions">Subscriptions is invalid</error>
|
215
|
+
<error field="subscription_add_ons.add_on_id">Subscription add ons.add on Add On Code not found</error>
|
216
|
+
</errors>
|
320
217
|
|
321
218
|
http_version: "1.1"
|
@@ -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%
|
5
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
|
6
6
|
body: |
|
7
7
|
<?xml version="1.0" encoding="UTF-8"?>
|
8
8
|
<account>
|
@@ -20,36 +20,38 @@
|
|
20
20
|
|
21
21
|
headers:
|
22
22
|
authorization:
|
23
|
-
- Basic
|
23
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
24
|
+
user-agent:
|
25
|
+
- Recurly Ruby Client v0.4.6
|
24
26
|
content-type:
|
25
27
|
- application/xml
|
26
28
|
accept:
|
27
29
|
- "*/*"
|
28
|
-
user-agent:
|
29
|
-
- Ruby
|
30
30
|
connection:
|
31
31
|
- close
|
32
32
|
response: !ruby/struct:VCR::Response
|
33
33
|
status: !ruby/struct:VCR::ResponseStatus
|
34
34
|
code: 201
|
35
|
-
message: Created
|
35
|
+
message: "Created "
|
36
36
|
headers:
|
37
37
|
cache-control:
|
38
38
|
- no-cache
|
39
39
|
location:
|
40
40
|
- http://app.recurly.local:3000/accounts/subscription-addons-remove-1301885121
|
41
41
|
x-runtime:
|
42
|
-
- "
|
42
|
+
- "361"
|
43
43
|
content-type:
|
44
44
|
- application/xml; charset=utf-8
|
45
45
|
content-length:
|
46
46
|
- "607"
|
47
|
-
|
48
|
-
-
|
47
|
+
server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
49
|
+
date:
|
50
|
+
- Thu, 21 Apr 2011 17:59:07 GMT
|
49
51
|
connection:
|
50
52
|
- close
|
51
|
-
|
52
|
-
-
|
53
|
+
set-cookie:
|
54
|
+
- _recurly_session=c25125ef1213d54887aee84a3329b1a5; domain=.recurly.local; path=/; HttpOnly
|
53
55
|
body: |
|
54
56
|
<?xml version="1.0" encoding="UTF-8"?>
|
55
57
|
<account>
|
@@ -62,8 +64,8 @@
|
|
62
64
|
<company_name>Recurly Ruby Gem</company_name>
|
63
65
|
<balance_in_cents type="integer">0</balance_in_cents>
|
64
66
|
<closed type="boolean">false</closed>
|
65
|
-
<hosted_login_token>
|
66
|
-
<created_at type="datetime">2011-04-
|
67
|
+
<hosted_login_token>d0df6c8251a1458b9188cfebb447a07a</hosted_login_token>
|
68
|
+
<created_at type="datetime">2011-04-21T17:59:07Z</created_at>
|
67
69
|
<state>active</state>
|
68
70
|
</account>
|
69
71
|
|
@@ -71,40 +73,42 @@
|
|
71
73
|
- !ruby/struct:VCR::HTTPInteraction
|
72
74
|
request: !ruby/struct:VCR::Request
|
73
75
|
method: :get
|
74
|
-
uri: http://api-test%
|
76
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
|
75
77
|
body:
|
76
78
|
headers:
|
77
79
|
authorization:
|
78
|
-
- Basic
|
80
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
81
|
+
user-agent:
|
82
|
+
- Recurly Ruby Client v0.4.6
|
79
83
|
accept:
|
80
84
|
- application/xml
|
81
85
|
accept-encoding:
|
82
86
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
83
|
-
user-agent:
|
84
|
-
- Ruby
|
85
87
|
connection:
|
86
88
|
- close
|
87
89
|
response: !ruby/struct:VCR::Response
|
88
90
|
status: !ruby/struct:VCR::ResponseStatus
|
89
91
|
code: 200
|
90
|
-
message: OK
|
92
|
+
message: "OK "
|
91
93
|
headers:
|
92
94
|
x-runtime:
|
93
|
-
- "
|
95
|
+
- "105"
|
94
96
|
content-type:
|
95
97
|
- application/xml; charset=utf-8
|
96
98
|
etag:
|
97
|
-
- "\"
|
99
|
+
- "\"3888306c167f105a4e165433ee427264\""
|
98
100
|
cache-control:
|
99
101
|
- private, max-age=0, must-revalidate
|
100
102
|
content-length:
|
101
|
-
- "
|
102
|
-
|
103
|
-
-
|
103
|
+
- "612"
|
104
|
+
server:
|
105
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
106
|
+
date:
|
107
|
+
- Thu, 21 Apr 2011 17:59:09 GMT
|
104
108
|
connection:
|
105
109
|
- close
|
106
|
-
|
107
|
-
-
|
110
|
+
set-cookie:
|
111
|
+
- _recurly_session=d63d8173d028891078df5d73bb0a12d5; domain=.recurly.local; path=/; HttpOnly
|
108
112
|
body: |
|
109
113
|
<?xml version="1.0" encoding="UTF-8"?>
|
110
114
|
<plan>
|
@@ -113,42 +117,20 @@
|
|
113
117
|
<description></description>
|
114
118
|
<success_url></success_url>
|
115
119
|
<cancel_url></cancel_url>
|
116
|
-
<created_at type="datetime">2011-04-
|
117
|
-
<unit_amount_in_cents type="integer">
|
120
|
+
<created_at type="datetime">2011-04-21T17:57:33Z</created_at>
|
121
|
+
<unit_amount_in_cents type="integer">0</unit_amount_in_cents>
|
118
122
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
119
123
|
<plan_interval_length type="integer">1</plan_interval_length>
|
120
124
|
<plan_interval_unit>months</plan_interval_unit>
|
121
125
|
<trial_interval_length type="integer">0</trial_interval_length>
|
122
126
|
<trial_interval_unit>months</trial_interval_unit>
|
123
|
-
<latest_version depreciated="true">
|
124
|
-
<version type="integer">1</version>
|
125
|
-
<unit_amount_in_cents type="integer">200</unit_amount_in_cents>
|
126
|
-
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
127
|
-
<plan_interval_length type="integer">1</plan_interval_length>
|
128
|
-
<plan_interval_unit>months</plan_interval_unit>
|
129
|
-
<trial_interval_length type="integer">0</trial_interval_length>
|
130
|
-
<trial_interval_unit>months</trial_interval_unit>
|
131
|
-
<created_at type="datetime">2011-04-04T02:15:00Z</created_at>
|
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>
|
145
127
|
</plan>
|
146
128
|
|
147
129
|
http_version: "1.1"
|
148
130
|
- !ruby/struct:VCR::HTTPInteraction
|
149
131
|
request: !ruby/struct:VCR::Request
|
150
132
|
method: :post
|
151
|
-
uri: http://api-test%
|
133
|
+
uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/subscription-addons-remove-1301885121/subscription.xml
|
152
134
|
body: |
|
153
135
|
<?xml version="1.0" encoding="UTF-8"?>
|
154
136
|
<subscription>
|
@@ -180,8 +162,8 @@
|
|
180
162
|
<username type="yaml" nil="true"></username>
|
181
163
|
<balance-in-cents type="integer">0</balance-in-cents>
|
182
164
|
<closed type="boolean">false</closed>
|
183
|
-
<hosted-login-token>
|
184
|
-
<created-at type="datetime">2011-04-
|
165
|
+
<hosted-login-token>d0df6c8251a1458b9188cfebb447a07a</hosted-login-token>
|
166
|
+
<created-at type="datetime">2011-04-21T17:59:07Z</created-at>
|
185
167
|
<state>active</state>
|
186
168
|
</account>
|
187
169
|
<add-ons type="array">
|
@@ -196,254 +178,41 @@
|
|
196
178
|
|
197
179
|
headers:
|
198
180
|
authorization:
|
199
|
-
- Basic
|
181
|
+
- Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
|
182
|
+
user-agent:
|
183
|
+
- Recurly Ruby Client v0.4.6
|
200
184
|
content-type:
|
201
185
|
- application/xml
|
202
186
|
accept:
|
203
187
|
- "*/*"
|
204
|
-
user-agent:
|
205
|
-
- Ruby
|
206
188
|
connection:
|
207
189
|
- close
|
208
190
|
response: !ruby/struct:VCR::Response
|
209
191
|
status: !ruby/struct:VCR::ResponseStatus
|
210
|
-
code:
|
211
|
-
message:
|
192
|
+
code: 422
|
193
|
+
message: ""
|
212
194
|
headers:
|
213
195
|
cache-control:
|
214
196
|
- no-cache
|
215
197
|
x-runtime:
|
216
|
-
- "
|
217
|
-
content-type:
|
218
|
-
- application/xml; charset=utf-8
|
219
|
-
content-length:
|
220
|
-
- "1109"
|
221
|
-
set-cookie:
|
222
|
-
- _recurly_session=409d91f3789cad7c305adcf984e9dd3c; domain=.recurly.local; path=/; HttpOnly
|
223
|
-
connection:
|
224
|
-
- close
|
225
|
-
server:
|
226
|
-
- thin 1.2.7 codename No Hup
|
227
|
-
body: |
|
228
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
229
|
-
<subscription>
|
230
|
-
<id>subscription-addons-remove-1301885121</id>
|
231
|
-
<account_code>subscription-addons-remove-1301885121</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">100200</total_amount_in_cents>
|
239
|
-
<activated_at type="datetime">2011-04-05T19:39:54Z</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-05T19:39:54Z</current_period_started_at>
|
243
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:54Z</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">100000</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-remove-1301885121/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
|
-
- "399"
|
279
|
-
content-type:
|
280
|
-
- application/xml; charset=utf-8
|
281
|
-
etag:
|
282
|
-
- "\"e18e45f6e26f0c04a1a34fba0412cf62\""
|
283
|
-
cache-control:
|
284
|
-
- private, max-age=0, must-revalidate
|
285
|
-
content-length:
|
286
|
-
- "1109"
|
287
|
-
set-cookie:
|
288
|
-
- _recurly_session=aefe11a14c2f757c2a1fd1ccba5f7910; 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-remove-1301885121</id>
|
297
|
-
<account_code>subscription-addons-remove-1301885121</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">100200</total_amount_in_cents>
|
305
|
-
<activated_at type="datetime">2011-04-05T19:39:54Z</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-05T19:39:54Z</current_period_started_at>
|
309
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:54Z</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">100000</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-remove-1301885121/subscription.xml
|
326
|
-
body: |
|
327
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
328
|
-
<subscription>
|
329
|
-
<add-ons type="array"/>
|
330
|
-
<timeframe>now</timeframe>
|
331
|
-
</subscription>
|
332
|
-
|
333
|
-
headers:
|
334
|
-
authorization:
|
335
|
-
- Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
|
336
|
-
content-type:
|
337
|
-
- application/xml
|
338
|
-
accept:
|
339
|
-
- "*/*"
|
340
|
-
user-agent:
|
341
|
-
- Ruby
|
342
|
-
connection:
|
343
|
-
- close
|
344
|
-
response: !ruby/struct:VCR::Response
|
345
|
-
status: !ruby/struct:VCR::ResponseStatus
|
346
|
-
code: 200
|
347
|
-
message: OK
|
348
|
-
headers:
|
349
|
-
x-runtime:
|
350
|
-
- "2554"
|
198
|
+
- "829"
|
351
199
|
content-type:
|
352
200
|
- application/xml; charset=utf-8
|
353
|
-
etag:
|
354
|
-
- "\"a325e97c8a37fe1dd41343535c33c23f\""
|
355
|
-
cache-control:
|
356
|
-
- private, max-age=0, must-revalidate
|
357
201
|
content-length:
|
358
|
-
- "
|
359
|
-
set-cookie:
|
360
|
-
- _recurly_session=344573e9117bec266b5250c347fbe5e2; domain=.recurly.local; path=/; HttpOnly
|
361
|
-
connection:
|
362
|
-
- close
|
202
|
+
- "228"
|
363
203
|
server:
|
364
|
-
-
|
365
|
-
|
366
|
-
|
367
|
-
<subscription>
|
368
|
-
<id>subscription-addons-remove-1301885121</id>
|
369
|
-
<account_code>subscription-addons-remove-1301885121</account_code>
|
370
|
-
<plan>
|
371
|
-
<plan_code>paid</plan_code>
|
372
|
-
<name>Paid</name>
|
373
|
-
</plan>
|
374
|
-
<state>active</state>
|
375
|
-
<quantity type="integer">1</quantity>
|
376
|
-
<total_amount_in_cents type="integer">200</total_amount_in_cents>
|
377
|
-
<activated_at type="datetime">2011-04-05T19:40:04Z</activated_at>
|
378
|
-
<canceled_at nil="true" type="datetime"></canceled_at>
|
379
|
-
<expires_at nil="true" type="datetime"></expires_at>
|
380
|
-
<current_period_started_at type="datetime">2011-04-05T19:39:54Z</current_period_started_at>
|
381
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:54Z</current_period_ends_at>
|
382
|
-
<trial_started_at nil="true" type="datetime"></trial_started_at>
|
383
|
-
<trial_ends_at nil="true" type="datetime"></trial_ends_at>
|
384
|
-
<add_ons type="array">
|
385
|
-
</add_ons>
|
386
|
-
</subscription>
|
387
|
-
|
388
|
-
http_version: "1.1"
|
389
|
-
- !ruby/struct:VCR::HTTPInteraction
|
390
|
-
request: !ruby/struct:VCR::Request
|
391
|
-
method: :get
|
392
|
-
uri: http://api-test%40hello-test.com:50a5b8a69a2545db84ac4112ba8cac6f@app.recurly.local:3000/accounts/subscription-addons-remove-1301885121/subscription.xml
|
393
|
-
body:
|
394
|
-
headers:
|
395
|
-
authorization:
|
396
|
-
- Basic YXBpLXRlc3RAaGVsbG8tdGVzdC5jb206NTBhNWI4YTY5YTI1NDVkYjg0YWM0MTEyYmE4Y2FjNmY=
|
397
|
-
accept:
|
398
|
-
- application/xml
|
399
|
-
accept-encoding:
|
400
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
401
|
-
user-agent:
|
402
|
-
- Ruby
|
204
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
|
205
|
+
date:
|
206
|
+
- Thu, 21 Apr 2011 17:59:11 GMT
|
403
207
|
connection:
|
404
208
|
- close
|
405
|
-
response: !ruby/struct:VCR::Response
|
406
|
-
status: !ruby/struct:VCR::ResponseStatus
|
407
|
-
code: 200
|
408
|
-
message: OK
|
409
|
-
headers:
|
410
|
-
x-runtime:
|
411
|
-
- "393"
|
412
|
-
content-type:
|
413
|
-
- application/xml; charset=utf-8
|
414
|
-
etag:
|
415
|
-
- "\"a325e97c8a37fe1dd41343535c33c23f\""
|
416
|
-
cache-control:
|
417
|
-
- private, max-age=0, must-revalidate
|
418
|
-
content-length:
|
419
|
-
- "921"
|
420
209
|
set-cookie:
|
421
|
-
- _recurly_session=
|
422
|
-
connection:
|
423
|
-
- close
|
424
|
-
server:
|
425
|
-
- thin 1.2.7 codename No Hup
|
210
|
+
- _recurly_session=c7b899748a095dfb63c6065fd18dd634; domain=.recurly.local; path=/; HttpOnly
|
426
211
|
body: |
|
427
212
|
<?xml version="1.0" encoding="UTF-8"?>
|
428
|
-
<
|
429
|
-
<
|
430
|
-
<
|
431
|
-
|
432
|
-
<plan_code>paid</plan_code>
|
433
|
-
<name>Paid</name>
|
434
|
-
</plan>
|
435
|
-
<state>active</state>
|
436
|
-
<quantity type="integer">1</quantity>
|
437
|
-
<total_amount_in_cents type="integer">200</total_amount_in_cents>
|
438
|
-
<activated_at type="datetime">2011-04-05T19:40:04Z</activated_at>
|
439
|
-
<canceled_at nil="true" type="datetime"></canceled_at>
|
440
|
-
<expires_at nil="true" type="datetime"></expires_at>
|
441
|
-
<current_period_started_at type="datetime">2011-04-05T19:39:54Z</current_period_started_at>
|
442
|
-
<current_period_ends_at type="datetime">2011-05-05T19:39:54Z</current_period_ends_at>
|
443
|
-
<trial_started_at nil="true" type="datetime"></trial_started_at>
|
444
|
-
<trial_ends_at nil="true" type="datetime"></trial_ends_at>
|
445
|
-
<add_ons type="array">
|
446
|
-
</add_ons>
|
447
|
-
</subscription>
|
213
|
+
<errors>
|
214
|
+
<error field="subscriptions">Subscriptions is invalid</error>
|
215
|
+
<error field="subscription_add_ons.add_on_id">Subscription add ons.add on Add On Code not found</error>
|
216
|
+
</errors>
|
448
217
|
|
449
218
|
http_version: "1.1"
|