recurly 0.3.3 → 0.3.4
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/README.md +15 -11
- data/lib/patches/active_resource/connection.rb +10 -0
- data/lib/recurly.rb +35 -9
- data/lib/recurly/account.rb +22 -1
- data/lib/recurly/account_base.rb +35 -0
- data/lib/recurly/base.rb +26 -39
- data/lib/recurly/billing_info.rb +40 -1
- data/lib/recurly/charge.rb +12 -1
- data/lib/recurly/coupon.rb +8 -0
- data/lib/recurly/credit.rb +12 -1
- data/lib/recurly/exceptions.rb +19 -0
- data/lib/recurly/invoice.rb +1 -1
- data/lib/recurly/plan.rb +13 -1
- data/lib/recurly/rails3/recurly.rake +5 -3
- data/lib/recurly/subscription.rb +21 -3
- data/lib/recurly/transaction.rb +29 -1
- data/lib/recurly/transparent.rb +140 -0
- data/lib/recurly/version.rb +1 -1
- data/spec/config/recurly.yml +12 -0
- data/spec/config/test1.yml +3 -1
- data/spec/config/test2.yml +4 -2
- data/spec/integration/credit_spec.rb +6 -6
- data/spec/integration/plan_spec.rb +2 -2
- data/spec/support/factory.rb +5 -3
- data/spec/unit/account_spec.rb +19 -0
- data/spec/unit/billing_info_spec.rb +38 -0
- data/spec/unit/charge_spec.rb +18 -0
- data/spec/unit/config_spec.rb +10 -6
- data/spec/unit/coupon_spec.rb +13 -0
- data/spec/unit/credit_spec.rb +18 -0
- data/spec/unit/plan_spec.rb +18 -0
- data/spec/unit/subscription_spec.rb +25 -0
- data/spec/unit/transaction_spec.rb +32 -0
- data/spec/unit/transparent_spec.rb +114 -0
- data/spec/vcr/account/accept-language-account/{1296674173.yml → 1297746103.yml} +16 -13
- data/spec/vcr/account/close/{1296674173.yml → 1297746103.yml} +31 -28
- data/spec/vcr/account/create-blank/{1296674173.yml → 1297746103.yml} +9 -5
- data/spec/vcr/account/create-duplicate/{1296674173.yml → 1297746103.yml} +22 -15
- data/spec/vcr/account/create-min/{1296674173.yml → 1297746103.yml} +16 -13
- data/spec/vcr/account/create/{1296674173.yml → 1297746103.yml} +16 -13
- data/spec/vcr/account/find/{1296674173.yml → 1297746103.yml} +29 -26
- data/spec/vcr/account/list/1297746103.yml +1579 -0
- data/spec/vcr/account/update/{1296674173.yml → 1297746103.yml} +54 -47
- data/spec/vcr/billing/create/{1296690812.yml → 1298594128.yml} +37 -34
- data/spec/vcr/billing/destroy/{1296690812.yml → 1298594128.yml} +46 -43
- data/spec/vcr/billing/find/{1296690812.yml → 1298594128.yml} +47 -44
- data/spec/vcr/billing/update/{1296690812.yml → 1298594128.yml} +50 -47
- data/spec/vcr/charge/create/{1296674173.yml → 1297746103.yml} +48 -45
- data/spec/vcr/charge/delete-uninvoiced/{1296674173.yml → 1297746103.yml} +49 -46
- data/spec/vcr/charge/list-all/{1296674173.yml → 1297746103.yml} +61 -58
- data/spec/vcr/charge/list-invoiced/{1296674173.yml → 1297746103.yml} +92 -89
- data/spec/vcr/charge/list-pending/{1296674173.yml → 1297746103.yml} +61 -58
- data/spec/vcr/charge/lookup/{1296674173.yml → 1297746103.yml} +34 -31
- data/spec/vcr/coupon/create/{1296774903.yml → 1299714521.yml} +35 -32
- data/spec/vcr/coupon/destroy/{1296688818.yml → 1299714521.yml} +34 -31
- data/spec/vcr/{coupon/create/1296688818.yml → credit/create/1299714599.yml} +53 -53
- data/spec/vcr/credit/delete/1299714599.yml +262 -0
- data/spec/vcr/credit/list/1299714599.yml +319 -0
- data/spec/vcr/credit/lookup/1299714599.yml +183 -0
- data/spec/vcr/invoice/create-no-charges/{1296674173.yml → 1297746103.yml} +34 -31
- data/spec/vcr/invoice/create/{1296674173.yml → 1297746103.yml} +63 -60
- data/spec/vcr/invoice/list/{1296674173.yml → 1297746103.yml} +87 -84
- data/spec/vcr/invoice/lookup/{1296674173.yml → 1297746103.yml} +64 -61
- data/spec/vcr/plan/all.yml +30 -30
- data/spec/vcr/plan/find.yml +25 -25
- data/spec/vcr/plan/update.yml +16 -15
- data/spec/vcr/subscription/addons/add/{1296674173.yml → 1297746103.yml} +44 -40
- data/spec/vcr/subscription/addons/create/{1296674173.yml → 1297746103.yml} +44 -40
- data/spec/vcr/subscription/addons/remove/{1296674173.yml → 1297746103.yml} +44 -40
- data/spec/vcr/subscription/cancel-with-code/{1296674173.yml → 1297746103.yml} +99 -95
- data/spec/vcr/subscription/cancel/{1296674173.yml → 1297746103.yml} +86 -82
- data/spec/vcr/subscription/change1/{1296674173.yml → 1297746103.yml} +82 -78
- data/spec/vcr/subscription/change2/{1296674173.yml → 1297746103.yml} +82 -78
- data/spec/vcr/subscription/create/{1296674173.yml → 1297746103.yml} +49 -45
- data/spec/vcr/subscription/find/{1296674173.yml → 1297746103.yml} +60 -56
- data/spec/vcr/subscription/reactivate/{1296674173.yml → 1297746103.yml} +93 -89
- data/spec/vcr/subscription/refund-full/{1296674173.yml → 1297746103.yml} +77 -73
- data/spec/vcr/subscription/refund-none/{1296674173.yml → 1297746103.yml} +77 -73
- data/spec/vcr/subscription/refund-partial/{1296674173.yml → 1297746103.yml} +77 -73
- data/spec/vcr/transaction/all/{1296674173.yml → 1297746103.yml} +107 -107
- data/spec/vcr/transaction/create-no-account/{1296674173.yml → 1297746103.yml} +14 -13
- data/spec/vcr/transaction/create-with-account/{1296674173.yml → 1297746103.yml} +46 -58
- data/spec/vcr/transaction/list-filled/1297746103.yml +213 -0
- data/spec/vcr/transaction/list-initial/{1296674173.yml → 1297746103.yml} +38 -35
- data/spec/vcr/transaction/lookup/1297746103.yml +213 -0
- data/spec/vcr/transaction/refund/1297746103.yml +213 -0
- data/spec/vcr/transaction/void/1297746103.yml +213 -0
- metadata +146 -139
- data/spec/vcr/account/list/1296674173.yml +0 -55
- data/spec/vcr/coupon/destroy/1296774903.yml +0 -207
- data/spec/vcr/credit/create/1296674173.yml +0 -121
- data/spec/vcr/credit/delete/1296674173.yml +0 -121
- data/spec/vcr/credit/list/1296674173.yml +0 -121
- data/spec/vcr/credit/lookup/1296674173.yml +0 -121
- data/spec/vcr/plan/delete/1296674173.yml +0 -225
- data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
- data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
- data/spec/vcr/transaction/refund/1296674173.yml +0 -287
- data/spec/vcr/transaction/void/1296674173.yml +0 -352
@@ -2,21 +2,25 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://
|
5
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
|
6
6
|
body: |
|
7
7
|
<?xml version="1.0" encoding="UTF-8"?>
|
8
8
|
<account>
|
9
|
-
<account-code>invoice-lookup-
|
9
|
+
<account-code>invoice-lookup-1297746103</account-code>
|
10
10
|
<first-name>Verena</first-name>
|
11
11
|
<last-name>Test</last-name>
|
12
12
|
<email>verena@test.com</email>
|
13
13
|
<company-name>Recurly Ruby Gem</company-name>
|
14
|
+
<billing-info>
|
15
|
+
<credit-card>
|
16
|
+
</credit-card>
|
17
|
+
</billing-info>
|
14
18
|
<accept-language type="yaml" nil="true"></accept-language>
|
15
19
|
</account>
|
16
20
|
|
17
21
|
headers:
|
18
22
|
authorization:
|
19
|
-
- Basic
|
23
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
20
24
|
content-type:
|
21
25
|
- application/xml
|
22
26
|
accept:
|
@@ -33,9 +37,9 @@
|
|
33
37
|
cache-control:
|
34
38
|
- no-cache
|
35
39
|
location:
|
36
|
-
- http://
|
40
|
+
- http://app.recurly.local:3000/accounts/invoice-lookup-1297746103
|
37
41
|
x-runtime:
|
38
|
-
- "
|
42
|
+
- "465"
|
39
43
|
content-type:
|
40
44
|
- application/xml; charset=utf-8
|
41
45
|
content-length:
|
@@ -43,18 +47,17 @@
|
|
43
47
|
server:
|
44
48
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
45
49
|
date:
|
46
|
-
-
|
50
|
+
- Fri, 11 Mar 2011 18:51:15 GMT
|
47
51
|
connection:
|
48
52
|
- close
|
49
53
|
set-cookie:
|
50
|
-
- account_credentials=
|
51
|
-
-
|
52
|
-
- _recurly_session=2732f2a17e24fe7694ac8ed3c64d0258; domain=.recurly.local; path=/; HttpOnly
|
54
|
+
- account_credentials=dc4f71bbcf9c2a30ec3fea02e7c35d57f60b3fd9e5330c72d1d17236cb6a7245631e5612ca0036613ad7ce2ea27135cec8d3c556baea1de9778a8f2ab6128aad%3A%3A; domain=.recurly.local; path=/
|
55
|
+
- _recurly_session=4585aa5ba31fb276909ef2272bb04da0; domain=.recurly.local; path=/; HttpOnly
|
53
56
|
body: |
|
54
57
|
<?xml version="1.0" encoding="UTF-8"?>
|
55
58
|
<account>
|
56
|
-
<id>invoice-lookup-
|
57
|
-
<account_code>invoice-lookup-
|
59
|
+
<id>invoice-lookup-1297746103</id>
|
60
|
+
<account_code>invoice-lookup-1297746103</account_code>
|
58
61
|
<username></username>
|
59
62
|
<email>verena@test.com</email>
|
60
63
|
<first_name>Verena</first_name>
|
@@ -62,8 +65,8 @@
|
|
62
65
|
<company_name>Recurly Ruby Gem</company_name>
|
63
66
|
<balance_in_cents type="integer">0</balance_in_cents>
|
64
67
|
<closed type="boolean">false</closed>
|
65
|
-
<hosted_login_token>
|
66
|
-
<created_at type="datetime">2011-
|
68
|
+
<hosted_login_token>6e5fcc3c0d5b4953be000903abfb62cb</hosted_login_token>
|
69
|
+
<created_at type="datetime">2011-03-11T18:51:15Z</created_at>
|
67
70
|
<state>active</state>
|
68
71
|
</account>
|
69
72
|
|
@@ -71,10 +74,12 @@
|
|
71
74
|
- !ruby/struct:VCR::HTTPInteraction
|
72
75
|
request: !ruby/struct:VCR::Request
|
73
76
|
method: :put
|
74
|
-
uri: http://
|
77
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/invoice-lookup-1297746103/billing_info.xml
|
75
78
|
body: |
|
76
79
|
<?xml version="1.0" encoding="UTF-8"?>
|
77
80
|
<billing-info>
|
81
|
+
<first-name>Verena</first-name>
|
82
|
+
<last-name>Test</last-name>
|
78
83
|
<address1>123 Test St</address1>
|
79
84
|
<city>San Francisco</city>
|
80
85
|
<state>CA</state>
|
@@ -83,17 +88,15 @@
|
|
83
88
|
<credit-card>
|
84
89
|
<number>4111111111111111</number>
|
85
90
|
<year type="integer">2012</year>
|
86
|
-
<month type="integer">
|
91
|
+
<month type="integer">3</month>
|
87
92
|
<verification-value>123</verification-value>
|
88
93
|
</credit-card>
|
89
|
-
<account-code>invoice-lookup-
|
90
|
-
<first-name>Verena</first-name>
|
91
|
-
<last-name>Test</last-name>
|
94
|
+
<account-code>invoice-lookup-1297746103</account-code>
|
92
95
|
</billing-info>
|
93
96
|
|
94
97
|
headers:
|
95
98
|
authorization:
|
96
|
-
- Basic
|
99
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
97
100
|
content-type:
|
98
101
|
- application/xml
|
99
102
|
accept:
|
@@ -108,11 +111,11 @@
|
|
108
111
|
message: "OK "
|
109
112
|
headers:
|
110
113
|
x-runtime:
|
111
|
-
- "
|
114
|
+
- "2416"
|
112
115
|
content-type:
|
113
116
|
- application/xml; charset=utf-8
|
114
117
|
etag:
|
115
|
-
- "\"
|
118
|
+
- "\"65edf419b99011212dec178e83bc06bc\""
|
116
119
|
cache-control:
|
117
120
|
- private, max-age=0, must-revalidate
|
118
121
|
content-length:
|
@@ -120,15 +123,15 @@
|
|
120
123
|
server:
|
121
124
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
122
125
|
date:
|
123
|
-
-
|
126
|
+
- Fri, 11 Mar 2011 18:51:20 GMT
|
124
127
|
connection:
|
125
128
|
- close
|
126
129
|
set-cookie:
|
127
|
-
- _recurly_session=
|
130
|
+
- _recurly_session=4b67400061dbcd2f456bd7e8ea8e3886; domain=.recurly.local; path=/; HttpOnly
|
128
131
|
body: |
|
129
132
|
<?xml version="1.0" encoding="UTF-8"?>
|
130
133
|
<billing_info>
|
131
|
-
<account_code>invoice-lookup-
|
134
|
+
<account_code>invoice-lookup-1297746103</account_code>
|
132
135
|
<first_name>Verena</first_name>
|
133
136
|
<last_name>Test</last_name>
|
134
137
|
<address1>123 Test St</address1>
|
@@ -143,17 +146,17 @@
|
|
143
146
|
<credit_card>
|
144
147
|
<type>visa</type>
|
145
148
|
<last_four>1111</last_four>
|
146
|
-
<month type="integer">
|
149
|
+
<month type="integer">3</month>
|
147
150
|
<year type="integer">2012</year>
|
148
151
|
</credit_card>
|
149
|
-
<updated_at type="datetime">2011-
|
152
|
+
<updated_at type="datetime">2011-03-11T18:51:20Z</updated_at>
|
150
153
|
</billing_info>
|
151
154
|
|
152
155
|
http_version: "1.1"
|
153
156
|
- !ruby/struct:VCR::HTTPInteraction
|
154
157
|
request: !ruby/struct:VCR::Request
|
155
158
|
method: :post
|
156
|
-
uri: http://
|
159
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/invoice-lookup-1297746103/charges.xml
|
157
160
|
body: |
|
158
161
|
<?xml version="1.0" encoding="UTF-8"?>
|
159
162
|
<charge>
|
@@ -163,7 +166,7 @@
|
|
163
166
|
|
164
167
|
headers:
|
165
168
|
authorization:
|
166
|
-
- Basic
|
169
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
167
170
|
content-type:
|
168
171
|
- application/xml
|
169
172
|
accept:
|
@@ -180,7 +183,7 @@
|
|
180
183
|
cache-control:
|
181
184
|
- no-cache
|
182
185
|
x-runtime:
|
183
|
-
- "
|
186
|
+
- "285"
|
184
187
|
content-type:
|
185
188
|
- application/xml; charset=utf-8
|
186
189
|
content-length:
|
@@ -188,29 +191,29 @@
|
|
188
191
|
server:
|
189
192
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
190
193
|
date:
|
191
|
-
-
|
194
|
+
- Fri, 11 Mar 2011 18:51:22 GMT
|
192
195
|
connection:
|
193
196
|
- close
|
194
197
|
set-cookie:
|
195
|
-
- _recurly_session=
|
198
|
+
- _recurly_session=249fc58f756f44791be1ac9a46eef6ed; domain=.recurly.local; path=/; HttpOnly
|
196
199
|
body: |
|
197
200
|
<?xml version="1.0" encoding="UTF-8"?>
|
198
201
|
<charge type="charge">
|
199
|
-
<id>
|
200
|
-
<account_code>invoice-lookup-
|
202
|
+
<id>6a1d0181135341a2a36480a53cde75b6</id>
|
203
|
+
<account_code>invoice-lookup-1297746103</account_code>
|
201
204
|
<amount_in_cents type="integer">1500</amount_in_cents>
|
202
|
-
<start_date type="datetime">2011-
|
205
|
+
<start_date type="datetime">2011-03-11T18:51:22Z</start_date>
|
203
206
|
<end_date nil="true" type="datetime"></end_date>
|
204
207
|
<invoice_number nil="true" type="integer"></invoice_number>
|
205
208
|
<description>charge description</description>
|
206
|
-
<created_at type="datetime">2011-
|
209
|
+
<created_at type="datetime">2011-03-11T18:51:22Z</created_at>
|
207
210
|
</charge>
|
208
211
|
|
209
212
|
http_version: "1.1"
|
210
213
|
- !ruby/struct:VCR::HTTPInteraction
|
211
214
|
request: !ruby/struct:VCR::Request
|
212
215
|
method: :post
|
213
|
-
uri: http://
|
216
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/invoice-lookup-1297746103/invoices.xml
|
214
217
|
body: |
|
215
218
|
<?xml version="1.0" encoding="UTF-8"?>
|
216
219
|
<invoice>
|
@@ -218,7 +221,7 @@
|
|
218
221
|
|
219
222
|
headers:
|
220
223
|
authorization:
|
221
|
-
- Basic
|
224
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
222
225
|
content-type:
|
223
226
|
- application/xml
|
224
227
|
accept:
|
@@ -235,9 +238,9 @@
|
|
235
238
|
cache-control:
|
236
239
|
- no-cache
|
237
240
|
location:
|
238
|
-
- http://
|
241
|
+
- http://app.recurly.local:3000/invoices/c613ae619a224e28a65d47de10fdc215
|
239
242
|
x-runtime:
|
240
|
-
- "
|
243
|
+
- "570"
|
241
244
|
content-type:
|
242
245
|
- application/xml; charset=utf-8
|
243
246
|
content-length:
|
@@ -245,18 +248,18 @@
|
|
245
248
|
server:
|
246
249
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
247
250
|
date:
|
248
|
-
-
|
251
|
+
- Fri, 11 Mar 2011 18:51:24 GMT
|
249
252
|
connection:
|
250
253
|
- close
|
251
254
|
set-cookie:
|
252
|
-
- _recurly_session=
|
255
|
+
- _recurly_session=a20490342d605d0ae3e393cca9f12173; domain=.recurly.local; path=/; HttpOnly
|
253
256
|
body: |
|
254
257
|
<?xml version="1.0" encoding="UTF-8"?>
|
255
258
|
<invoice>
|
256
|
-
<id>
|
257
|
-
<account_code>invoice-lookup-
|
258
|
-
<date type="datetime">2011-
|
259
|
-
<invoice_number type="integer">
|
259
|
+
<id>c613ae619a224e28a65d47de10fdc215</id>
|
260
|
+
<account_code>invoice-lookup-1297746103</account_code>
|
261
|
+
<date type="datetime">2011-03-11T18:51:24Z</date>
|
262
|
+
<invoice_number type="integer">1530</invoice_number>
|
260
263
|
<vat_number></vat_number>
|
261
264
|
<status>open</status>
|
262
265
|
<subtotal_in_cents type="integer">1500</subtotal_in_cents>
|
@@ -267,13 +270,13 @@
|
|
267
270
|
<discount_in_cents type="integer">0</discount_in_cents>
|
268
271
|
<line_items type="array">
|
269
272
|
<line_item>
|
270
|
-
<id>
|
273
|
+
<id>6a1d0181135341a2a36480a53cde75b6</id>
|
271
274
|
<type>charge</type>
|
272
275
|
<amount_in_cents type="integer">1500</amount_in_cents>
|
273
|
-
<start_date type="datetime">2011-
|
276
|
+
<start_date type="datetime">2011-03-11T18:51:22Z</start_date>
|
274
277
|
<end_date nil="true" type="datetime"></end_date>
|
275
278
|
<description>charge description</description>
|
276
|
-
<created_at type="datetime">2011-
|
279
|
+
<created_at type="datetime">2011-03-11T18:51:22Z</created_at>
|
277
280
|
<applied_coupon_code></applied_coupon_code>
|
278
281
|
</line_item>
|
279
282
|
</line_items>
|
@@ -285,11 +288,11 @@
|
|
285
288
|
- !ruby/struct:VCR::HTTPInteraction
|
286
289
|
request: !ruby/struct:VCR::Request
|
287
290
|
method: :get
|
288
|
-
uri: http://
|
291
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/invoices/c613ae619a224e28a65d47de10fdc215.xml
|
289
292
|
body:
|
290
293
|
headers:
|
291
294
|
authorization:
|
292
|
-
- Basic
|
295
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
293
296
|
accept:
|
294
297
|
- application/xml
|
295
298
|
accept-encoding:
|
@@ -304,11 +307,11 @@
|
|
304
307
|
message: "OK "
|
305
308
|
headers:
|
306
309
|
x-runtime:
|
307
|
-
- "
|
310
|
+
- "220"
|
308
311
|
content-type:
|
309
312
|
- application/xml; charset=utf-8
|
310
313
|
etag:
|
311
|
-
- "\"
|
314
|
+
- "\"d25363df0e1fb6ee7dde2c074f3b44cb\""
|
312
315
|
cache-control:
|
313
316
|
- private, max-age=0, must-revalidate
|
314
317
|
content-length:
|
@@ -316,18 +319,18 @@
|
|
316
319
|
server:
|
317
320
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
318
321
|
date:
|
319
|
-
-
|
322
|
+
- Fri, 11 Mar 2011 18:51:26 GMT
|
320
323
|
connection:
|
321
324
|
- close
|
322
325
|
set-cookie:
|
323
|
-
- _recurly_session=
|
326
|
+
- _recurly_session=f5fe4aedf5d888b5180da79be14ac5f7; domain=.recurly.local; path=/; HttpOnly
|
324
327
|
body: |
|
325
328
|
<?xml version="1.0" encoding="UTF-8"?>
|
326
329
|
<invoice>
|
327
|
-
<id>
|
328
|
-
<account_code>invoice-lookup-
|
329
|
-
<date type="datetime">2011-
|
330
|
-
<invoice_number type="integer">
|
330
|
+
<id>c613ae619a224e28a65d47de10fdc215</id>
|
331
|
+
<account_code>invoice-lookup-1297746103</account_code>
|
332
|
+
<date type="datetime">2011-03-11T18:51:24Z</date>
|
333
|
+
<invoice_number type="integer">1530</invoice_number>
|
331
334
|
<vat_number></vat_number>
|
332
335
|
<status>open</status>
|
333
336
|
<subtotal_in_cents type="integer">1500</subtotal_in_cents>
|
@@ -338,13 +341,13 @@
|
|
338
341
|
<discount_in_cents type="integer">0</discount_in_cents>
|
339
342
|
<line_items type="array">
|
340
343
|
<line_item>
|
341
|
-
<id>
|
344
|
+
<id>6a1d0181135341a2a36480a53cde75b6</id>
|
342
345
|
<type>charge</type>
|
343
346
|
<amount_in_cents type="integer">1500</amount_in_cents>
|
344
|
-
<start_date type="datetime">2011-
|
347
|
+
<start_date type="datetime">2011-03-11T18:51:22Z</start_date>
|
345
348
|
<end_date nil="true" type="datetime"></end_date>
|
346
349
|
<description>charge description</description>
|
347
|
-
<created_at type="datetime">2011-
|
350
|
+
<created_at type="datetime">2011-03-11T18:51:22Z</created_at>
|
348
351
|
<applied_coupon_code></applied_coupon_code>
|
349
352
|
</line_item>
|
350
353
|
</line_items>
|
data/spec/vcr/plan/all.yml
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: http://
|
5
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/paid.xml
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
authorization:
|
9
|
-
- Basic
|
9
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
10
10
|
accept:
|
11
11
|
- application/xml
|
12
12
|
accept-encoding:
|
@@ -21,23 +21,23 @@
|
|
21
21
|
message: "OK "
|
22
22
|
headers:
|
23
23
|
x-runtime:
|
24
|
-
- "
|
24
|
+
- "220"
|
25
25
|
content-type:
|
26
26
|
- application/xml; charset=utf-8
|
27
27
|
etag:
|
28
|
-
- "\"
|
28
|
+
- "\"dc04fba13f15d49d04ca6692abb21ff9\""
|
29
29
|
cache-control:
|
30
30
|
- private, max-age=0, must-revalidate
|
31
31
|
content-length:
|
32
|
-
- "
|
32
|
+
- "1146"
|
33
33
|
server:
|
34
34
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
35
35
|
date:
|
36
|
-
-
|
36
|
+
- Fri, 11 Mar 2011 18:51:29 GMT
|
37
37
|
connection:
|
38
38
|
- close
|
39
39
|
set-cookie:
|
40
|
-
- _recurly_session=
|
40
|
+
- _recurly_session=3f5428aba91d7e62f8b6639bac0fa117; domain=.recurly.local; path=/; HttpOnly
|
41
41
|
body: |
|
42
42
|
<?xml version="1.0" encoding="UTF-8"?>
|
43
43
|
<plan>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
|
51
51
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
52
52
|
<plan_interval_length type="integer">1</plan_interval_length>
|
53
|
-
<plan_interval_unit>
|
53
|
+
<plan_interval_unit>days</plan_interval_unit>
|
54
54
|
<trial_interval_length type="integer">0</trial_interval_length>
|
55
55
|
<trial_interval_unit>months</trial_interval_unit>
|
56
56
|
<latest_version depreciated="true">
|
@@ -58,10 +58,10 @@
|
|
58
58
|
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
|
59
59
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
60
60
|
<plan_interval_length type="integer">1</plan_interval_length>
|
61
|
-
<plan_interval_unit>
|
61
|
+
<plan_interval_unit>days</plan_interval_unit>
|
62
62
|
<trial_interval_length type="integer">0</trial_interval_length>
|
63
63
|
<trial_interval_unit>months</trial_interval_unit>
|
64
|
-
<created_at type="datetime">2011-02-
|
64
|
+
<created_at type="datetime">2011-02-21T01:06:56Z</created_at>
|
65
65
|
</latest_version>
|
66
66
|
</plan>
|
67
67
|
|
@@ -69,11 +69,11 @@
|
|
69
69
|
- !ruby/struct:VCR::HTTPInteraction
|
70
70
|
request: !ruby/struct:VCR::Request
|
71
71
|
method: :get
|
72
|
-
uri: http://
|
72
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/trial.xml
|
73
73
|
body:
|
74
74
|
headers:
|
75
75
|
authorization:
|
76
|
-
- Basic
|
76
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
77
77
|
accept:
|
78
78
|
- application/xml
|
79
79
|
accept-encoding:
|
@@ -88,7 +88,7 @@
|
|
88
88
|
message: "OK "
|
89
89
|
headers:
|
90
90
|
x-runtime:
|
91
|
-
- "
|
91
|
+
- "218"
|
92
92
|
content-type:
|
93
93
|
- application/xml; charset=utf-8
|
94
94
|
etag:
|
@@ -100,11 +100,11 @@
|
|
100
100
|
server:
|
101
101
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
102
102
|
date:
|
103
|
-
-
|
103
|
+
- Fri, 11 Mar 2011 18:51:31 GMT
|
104
104
|
connection:
|
105
105
|
- close
|
106
106
|
set-cookie:
|
107
|
-
- _recurly_session=
|
107
|
+
- _recurly_session=3a961936ca59e82c07eb55bd30d8b06f; domain=.recurly.local; path=/; HttpOnly
|
108
108
|
body: |
|
109
109
|
<?xml version="1.0" encoding="UTF-8"?>
|
110
110
|
<plan>
|
@@ -136,11 +136,11 @@
|
|
136
136
|
- !ruby/struct:VCR::HTTPInteraction
|
137
137
|
request: !ruby/struct:VCR::Request
|
138
138
|
method: :get
|
139
|
-
uri: http://
|
139
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans.xml
|
140
140
|
body:
|
141
141
|
headers:
|
142
142
|
authorization:
|
143
|
-
- Basic
|
143
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
144
144
|
accept:
|
145
145
|
- application/xml
|
146
146
|
accept-encoding:
|
@@ -155,23 +155,23 @@
|
|
155
155
|
message: "OK "
|
156
156
|
headers:
|
157
157
|
x-runtime:
|
158
|
-
- "
|
158
|
+
- "212"
|
159
159
|
content-type:
|
160
160
|
- application/xml; charset=utf-8
|
161
161
|
etag:
|
162
|
-
- "\"
|
162
|
+
- "\"831c2e50ec8634abee5c55657ec1a964\""
|
163
163
|
cache-control:
|
164
164
|
- private, max-age=0, must-revalidate
|
165
165
|
content-length:
|
166
|
-
- "
|
166
|
+
- "4456"
|
167
167
|
server:
|
168
168
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
169
169
|
date:
|
170
|
-
-
|
170
|
+
- Fri, 11 Mar 2011 18:51:33 GMT
|
171
171
|
connection:
|
172
172
|
- close
|
173
173
|
set-cookie:
|
174
|
-
- _recurly_session=
|
174
|
+
- _recurly_session=08ccab649761ba4326ede93adfb6164d; domain=.recurly.local; path=/; HttpOnly
|
175
175
|
body: |
|
176
176
|
<?xml version="1.0" encoding="UTF-8"?>
|
177
177
|
<plans type="array">
|
@@ -180,21 +180,21 @@
|
|
180
180
|
<name>Gold</name>
|
181
181
|
<description></description>
|
182
182
|
<created_at type="datetime">2011-02-01T19:28:50Z</created_at>
|
183
|
-
<unit_amount_in_cents type="integer">
|
183
|
+
<unit_amount_in_cents type="integer">1400</unit_amount_in_cents>
|
184
184
|
<setup_fee_in_cents type="integer">2000</setup_fee_in_cents>
|
185
185
|
<plan_interval_length type="integer">1</plan_interval_length>
|
186
|
-
<plan_interval_unit>
|
186
|
+
<plan_interval_unit>days</plan_interval_unit>
|
187
187
|
<trial_interval_length type="integer">0</trial_interval_length>
|
188
188
|
<trial_interval_unit>days</trial_interval_unit>
|
189
189
|
<latest_version depreciated="true">
|
190
190
|
<version type="integer">1</version>
|
191
|
-
<unit_amount_in_cents type="integer">
|
191
|
+
<unit_amount_in_cents type="integer">1400</unit_amount_in_cents>
|
192
192
|
<setup_fee_in_cents type="integer">2000</setup_fee_in_cents>
|
193
193
|
<plan_interval_length type="integer">1</plan_interval_length>
|
194
|
-
<plan_interval_unit>
|
194
|
+
<plan_interval_unit>days</plan_interval_unit>
|
195
195
|
<trial_interval_length type="integer">0</trial_interval_length>
|
196
196
|
<trial_interval_unit>days</trial_interval_unit>
|
197
|
-
<created_at type="datetime">2011-02-
|
197
|
+
<created_at type="datetime">2011-02-21T01:04:12Z</created_at>
|
198
198
|
</latest_version>
|
199
199
|
</plan>
|
200
200
|
<plan>
|
@@ -205,7 +205,7 @@
|
|
205
205
|
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
|
206
206
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
207
207
|
<plan_interval_length type="integer">1</plan_interval_length>
|
208
|
-
<plan_interval_unit>
|
208
|
+
<plan_interval_unit>days</plan_interval_unit>
|
209
209
|
<trial_interval_length type="integer">0</trial_interval_length>
|
210
210
|
<trial_interval_unit>months</trial_interval_unit>
|
211
211
|
<latest_version depreciated="true">
|
@@ -213,10 +213,10 @@
|
|
213
213
|
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
|
214
214
|
<setup_fee_in_cents type="integer">0</setup_fee_in_cents>
|
215
215
|
<plan_interval_length type="integer">1</plan_interval_length>
|
216
|
-
<plan_interval_unit>
|
216
|
+
<plan_interval_unit>days</plan_interval_unit>
|
217
217
|
<trial_interval_length type="integer">0</trial_interval_length>
|
218
218
|
<trial_interval_unit>months</trial_interval_unit>
|
219
|
-
<created_at type="datetime">2011-02-
|
219
|
+
<created_at type="datetime">2011-02-21T01:06:56Z</created_at>
|
220
220
|
</latest_version>
|
221
221
|
</plan>
|
222
222
|
<plan>
|