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>transaction-list-initial-
|
9
|
+
<account-code>transaction-list-initial-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/transaction-list-initial-1297746103
|
37
41
|
x-runtime:
|
38
|
-
- "
|
42
|
+
- "702"
|
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:56:02 GMT
|
47
51
|
connection:
|
48
52
|
- close
|
49
53
|
set-cookie:
|
50
|
-
- account_credentials=
|
51
|
-
-
|
52
|
-
- _recurly_session=f57d7a5025dcbecf7a145f204d26f094; domain=.recurly.local; path=/; HttpOnly
|
54
|
+
- account_credentials=775131bae3f7cb52828fde81c1c134523f8291daa60739c0ae06644dc2c8a0017b81f02ad7a1b958b4d08ce4289fcb536c56485524236667cbf69e8ecae272e1%3A%3A; domain=.recurly.local; path=/
|
55
|
+
- _recurly_session=7fa8476c29f115ca45b71ddb87cc22ce; domain=.recurly.local; path=/; HttpOnly
|
53
56
|
body: |
|
54
57
|
<?xml version="1.0" encoding="UTF-8"?>
|
55
58
|
<account>
|
56
|
-
<id>transaction-list-initial-
|
57
|
-
<account_code>transaction-list-initial-
|
59
|
+
<id>transaction-list-initial-1297746103</id>
|
60
|
+
<account_code>transaction-list-initial-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>5ff0bddfb7a7499a942f85eb755038cd</hosted_login_token>
|
69
|
+
<created_at type="datetime">2011-03-11T18:56:02Z</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/transaction-list-initial-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>transaction-list-initial-
|
90
|
-
<first-name>Verena</first-name>
|
91
|
-
<last-name>Test</last-name>
|
94
|
+
<account-code>transaction-list-initial-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
|
+
- "3181"
|
112
115
|
content-type:
|
113
116
|
- application/xml; charset=utf-8
|
114
117
|
etag:
|
115
|
-
- "\"
|
118
|
+
- "\"4ec99dbe572aecace619ed3e9aaebd7c\""
|
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:56:08 GMT
|
124
127
|
connection:
|
125
128
|
- close
|
126
129
|
set-cookie:
|
127
|
-
- _recurly_session=
|
130
|
+
- _recurly_session=210cddf17aa45b59dad4f477d3ec3c3d; domain=.recurly.local; path=/; HttpOnly
|
128
131
|
body: |
|
129
132
|
<?xml version="1.0" encoding="UTF-8"?>
|
130
133
|
<billing_info>
|
131
|
-
<account_code>transaction-list-initial-
|
134
|
+
<account_code>transaction-list-initial-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,21 +146,21 @@
|
|
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:56:08Z</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: :get
|
156
|
-
uri: http://
|
159
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/transaction-list-initial-1297746103/transactions
|
157
160
|
body:
|
158
161
|
headers:
|
159
162
|
authorization:
|
160
|
-
- Basic
|
163
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
161
164
|
accept:
|
162
165
|
- application/xml
|
163
166
|
accept-encoding:
|
@@ -172,11 +175,11 @@
|
|
172
175
|
message: "OK "
|
173
176
|
headers:
|
174
177
|
x-runtime:
|
175
|
-
- "
|
178
|
+
- "278"
|
176
179
|
content-type:
|
177
180
|
- application/xml; charset=utf-8
|
178
181
|
etag:
|
179
|
-
- "\"
|
182
|
+
- "\"4e16708d77cf1dcc43d76ebdd0a19397\""
|
180
183
|
cache-control:
|
181
184
|
- private, max-age=0, must-revalidate
|
182
185
|
content-length:
|
@@ -184,11 +187,11 @@
|
|
184
187
|
server:
|
185
188
|
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
186
189
|
date:
|
187
|
-
-
|
190
|
+
- Fri, 11 Mar 2011 18:56:10 GMT
|
188
191
|
connection:
|
189
192
|
- close
|
190
193
|
set-cookie:
|
191
|
-
- _recurly_session=
|
194
|
+
- _recurly_session=88d6b92607f150b26c2bd32610f431f0; domain=.recurly.local; path=/; HttpOnly
|
192
195
|
body: |
|
193
196
|
<?xml version="1.0" encoding="UTF-8"?>
|
194
197
|
<transactions type="collection">
|
@@ -196,10 +199,10 @@
|
|
196
199
|
<per_page type="integer">50</per_page>
|
197
200
|
<total_entries type="integer">1</total_entries>
|
198
201
|
<transaction type="Payment">
|
199
|
-
<id>
|
200
|
-
<account_code>transaction-list-initial-
|
202
|
+
<id>ae768b53826543f98f81379f504b3922</id>
|
203
|
+
<account_code>transaction-list-initial-1297746103</account_code>
|
201
204
|
<action>authorization</action>
|
202
|
-
<date type="datetime">2011-
|
205
|
+
<date type="datetime">2011-03-11T18:56:07Z</date>
|
203
206
|
<amount_in_cents type="integer">0</amount_in_cents>
|
204
207
|
<status>success</status>
|
205
208
|
<message>Test Gateway: Successful test transaction</message>
|
@@ -0,0 +1,213 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<account-code>transaction-lookup-1297746103</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
|
+
<billing-info>
|
15
|
+
<credit-card>
|
16
|
+
</credit-card>
|
17
|
+
</billing-info>
|
18
|
+
<accept-language type="yaml" nil="true"></accept-language>
|
19
|
+
</account>
|
20
|
+
|
21
|
+
headers:
|
22
|
+
authorization:
|
23
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
24
|
+
content-type:
|
25
|
+
- application/xml
|
26
|
+
accept:
|
27
|
+
- "*/*"
|
28
|
+
user-agent:
|
29
|
+
- Ruby
|
30
|
+
connection:
|
31
|
+
- close
|
32
|
+
response: !ruby/struct:VCR::Response
|
33
|
+
status: !ruby/struct:VCR::ResponseStatus
|
34
|
+
code: 201
|
35
|
+
message: "Created "
|
36
|
+
headers:
|
37
|
+
cache-control:
|
38
|
+
- no-cache
|
39
|
+
location:
|
40
|
+
- http://app.recurly.local:3000/accounts/transaction-lookup-1297746103
|
41
|
+
x-runtime:
|
42
|
+
- "738"
|
43
|
+
content-type:
|
44
|
+
- application/xml; charset=utf-8
|
45
|
+
content-length:
|
46
|
+
- "591"
|
47
|
+
server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
49
|
+
date:
|
50
|
+
- Fri, 11 Mar 2011 18:56:24 GMT
|
51
|
+
connection:
|
52
|
+
- close
|
53
|
+
set-cookie:
|
54
|
+
- account_credentials=3cc012577c8e6e008041d962b6b06b5fb8096676c3f6851eb2420d284b31eae78ad4514caa9bdd7d2a222c0ca7ce09c72b3d619b7396a0c03f00e4d5190842c8%3A%3A; domain=.recurly.local; path=/
|
55
|
+
- _recurly_session=93067e8e027ebd527c7fea5fd1047f41; domain=.recurly.local; path=/; HttpOnly
|
56
|
+
body: |
|
57
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
58
|
+
<account>
|
59
|
+
<id>transaction-lookup-1297746103</id>
|
60
|
+
<account_code>transaction-lookup-1297746103</account_code>
|
61
|
+
<username></username>
|
62
|
+
<email>verena@test.com</email>
|
63
|
+
<first_name>Verena</first_name>
|
64
|
+
<last_name>Test</last_name>
|
65
|
+
<company_name>Recurly Ruby Gem</company_name>
|
66
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
67
|
+
<closed type="boolean">false</closed>
|
68
|
+
<hosted_login_token>c4c00a7f872b491d96717f1413e53056</hosted_login_token>
|
69
|
+
<created_at type="datetime">2011-03-11T18:56:24Z</created_at>
|
70
|
+
<state>active</state>
|
71
|
+
</account>
|
72
|
+
|
73
|
+
http_version: "1.1"
|
74
|
+
- !ruby/struct:VCR::HTTPInteraction
|
75
|
+
request: !ruby/struct:VCR::Request
|
76
|
+
method: :put
|
77
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/transaction-lookup-1297746103/billing_info.xml
|
78
|
+
body: |
|
79
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
80
|
+
<billing-info>
|
81
|
+
<first-name>Verena</first-name>
|
82
|
+
<last-name>Test</last-name>
|
83
|
+
<address1>123 Test St</address1>
|
84
|
+
<city>San Francisco</city>
|
85
|
+
<state>CA</state>
|
86
|
+
<zip>94115</zip>
|
87
|
+
<country>US</country>
|
88
|
+
<credit-card>
|
89
|
+
<number>4111111111111111</number>
|
90
|
+
<year type="integer">2012</year>
|
91
|
+
<month type="integer">3</month>
|
92
|
+
<verification-value>123</verification-value>
|
93
|
+
</credit-card>
|
94
|
+
<account-code>transaction-lookup-1297746103</account-code>
|
95
|
+
</billing-info>
|
96
|
+
|
97
|
+
headers:
|
98
|
+
authorization:
|
99
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
100
|
+
content-type:
|
101
|
+
- application/xml
|
102
|
+
accept:
|
103
|
+
- "*/*"
|
104
|
+
user-agent:
|
105
|
+
- Ruby
|
106
|
+
connection:
|
107
|
+
- close
|
108
|
+
response: !ruby/struct:VCR::Response
|
109
|
+
status: !ruby/struct:VCR::ResponseStatus
|
110
|
+
code: 200
|
111
|
+
message: "OK "
|
112
|
+
headers:
|
113
|
+
x-runtime:
|
114
|
+
- "2016"
|
115
|
+
content-type:
|
116
|
+
- application/xml; charset=utf-8
|
117
|
+
etag:
|
118
|
+
- "\"ca78ebb73f0343a14b9a57fe4f5c76f2\""
|
119
|
+
cache-control:
|
120
|
+
- private, max-age=0, must-revalidate
|
121
|
+
content-length:
|
122
|
+
- "644"
|
123
|
+
server:
|
124
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
125
|
+
date:
|
126
|
+
- Fri, 11 Mar 2011 18:56:28 GMT
|
127
|
+
connection:
|
128
|
+
- close
|
129
|
+
set-cookie:
|
130
|
+
- _recurly_session=75698b706e1c0ea3e9b40fdaa9fd0971; domain=.recurly.local; path=/; HttpOnly
|
131
|
+
body: |
|
132
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
133
|
+
<billing_info>
|
134
|
+
<account_code>transaction-lookup-1297746103</account_code>
|
135
|
+
<first_name>Verena</first_name>
|
136
|
+
<last_name>Test</last_name>
|
137
|
+
<address1>123 Test St</address1>
|
138
|
+
<address2></address2>
|
139
|
+
<city>San Francisco</city>
|
140
|
+
<state>CA</state>
|
141
|
+
<country>US</country>
|
142
|
+
<zip>94115</zip>
|
143
|
+
<phone></phone>
|
144
|
+
<vat_number></vat_number>
|
145
|
+
<ip_address></ip_address>
|
146
|
+
<credit_card>
|
147
|
+
<type>visa</type>
|
148
|
+
<last_four>1111</last_four>
|
149
|
+
<month type="integer">3</month>
|
150
|
+
<year type="integer">2012</year>
|
151
|
+
</credit_card>
|
152
|
+
<updated_at type="datetime">2011-03-11T18:56:28Z</updated_at>
|
153
|
+
</billing_info>
|
154
|
+
|
155
|
+
http_version: "1.1"
|
156
|
+
- !ruby/struct:VCR::HTTPInteraction
|
157
|
+
request: !ruby/struct:VCR::Request
|
158
|
+
method: :post
|
159
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/transactions.xml
|
160
|
+
body: |
|
161
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
162
|
+
<transaction>
|
163
|
+
<account>
|
164
|
+
<account-code>transaction-lookup-1297746103</account-code>
|
165
|
+
<billing-info>
|
166
|
+
<credit-card>
|
167
|
+
</credit-card>
|
168
|
+
</billing-info>
|
169
|
+
</account>
|
170
|
+
<amount-in-cents type="integer">100</amount-in-cents>
|
171
|
+
<description>one</description>
|
172
|
+
</transaction>
|
173
|
+
|
174
|
+
headers:
|
175
|
+
authorization:
|
176
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
177
|
+
content-type:
|
178
|
+
- application/xml
|
179
|
+
accept:
|
180
|
+
- "*/*"
|
181
|
+
user-agent:
|
182
|
+
- Ruby
|
183
|
+
connection:
|
184
|
+
- close
|
185
|
+
response: !ruby/struct:VCR::Response
|
186
|
+
status: !ruby/struct:VCR::ResponseStatus
|
187
|
+
code: 422
|
188
|
+
message: ""
|
189
|
+
headers:
|
190
|
+
cache-control:
|
191
|
+
- no-cache
|
192
|
+
x-runtime:
|
193
|
+
- "988"
|
194
|
+
content-type:
|
195
|
+
- application/xml; charset=utf-8
|
196
|
+
content-length:
|
197
|
+
- "232"
|
198
|
+
server:
|
199
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
200
|
+
date:
|
201
|
+
- Fri, 11 Mar 2011 18:56:32 GMT
|
202
|
+
connection:
|
203
|
+
- close
|
204
|
+
set-cookie:
|
205
|
+
- _recurly_session=6a8d5685e99de22bd3b52b7c586e3c13; domain=.recurly.local; path=/; HttpOnly
|
206
|
+
body: |
|
207
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
208
|
+
<errors>
|
209
|
+
<error field="billing_info.first_name">Billing info.first name can't be blank</error>
|
210
|
+
<error field="billing_info.last_name">Billing info.last name can't be blank</error>
|
211
|
+
</errors>
|
212
|
+
|
213
|
+
http_version: "1.1"
|
@@ -0,0 +1,213 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<account-code>transaction-refund-1297746103</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
|
+
<billing-info>
|
15
|
+
<credit-card>
|
16
|
+
</credit-card>
|
17
|
+
</billing-info>
|
18
|
+
<accept-language type="yaml" nil="true"></accept-language>
|
19
|
+
</account>
|
20
|
+
|
21
|
+
headers:
|
22
|
+
authorization:
|
23
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
24
|
+
content-type:
|
25
|
+
- application/xml
|
26
|
+
accept:
|
27
|
+
- "*/*"
|
28
|
+
user-agent:
|
29
|
+
- Ruby
|
30
|
+
connection:
|
31
|
+
- close
|
32
|
+
response: !ruby/struct:VCR::Response
|
33
|
+
status: !ruby/struct:VCR::ResponseStatus
|
34
|
+
code: 201
|
35
|
+
message: "Created "
|
36
|
+
headers:
|
37
|
+
cache-control:
|
38
|
+
- no-cache
|
39
|
+
location:
|
40
|
+
- http://app.recurly.local:3000/accounts/transaction-refund-1297746103
|
41
|
+
x-runtime:
|
42
|
+
- "595"
|
43
|
+
content-type:
|
44
|
+
- application/xml; charset=utf-8
|
45
|
+
content-length:
|
46
|
+
- "591"
|
47
|
+
server:
|
48
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
49
|
+
date:
|
50
|
+
- Fri, 11 Mar 2011 18:56:45 GMT
|
51
|
+
connection:
|
52
|
+
- close
|
53
|
+
set-cookie:
|
54
|
+
- account_credentials=f259725b830fa518ab927e4b38f3b6d500a8c926b22ab8df3d67b260a0c257d0f12eeba8a8107114ecde824695aca0d4e1bcfa5e3f83428ccafa810cf5429554%3A%3A; domain=.recurly.local; path=/
|
55
|
+
- _recurly_session=9a9c5a1bc90cfc97e9e0dc5ebdd84d24; domain=.recurly.local; path=/; HttpOnly
|
56
|
+
body: |
|
57
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
58
|
+
<account>
|
59
|
+
<id>transaction-refund-1297746103</id>
|
60
|
+
<account_code>transaction-refund-1297746103</account_code>
|
61
|
+
<username></username>
|
62
|
+
<email>verena@test.com</email>
|
63
|
+
<first_name>Verena</first_name>
|
64
|
+
<last_name>Test</last_name>
|
65
|
+
<company_name>Recurly Ruby Gem</company_name>
|
66
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
67
|
+
<closed type="boolean">false</closed>
|
68
|
+
<hosted_login_token>41332c19aaa24361a72d22d7f37a897e</hosted_login_token>
|
69
|
+
<created_at type="datetime">2011-03-11T18:56:45Z</created_at>
|
70
|
+
<state>active</state>
|
71
|
+
</account>
|
72
|
+
|
73
|
+
http_version: "1.1"
|
74
|
+
- !ruby/struct:VCR::HTTPInteraction
|
75
|
+
request: !ruby/struct:VCR::Request
|
76
|
+
method: :put
|
77
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/transaction-refund-1297746103/billing_info.xml
|
78
|
+
body: |
|
79
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
80
|
+
<billing-info>
|
81
|
+
<first-name>Verena</first-name>
|
82
|
+
<last-name>Test</last-name>
|
83
|
+
<address1>123 Test St</address1>
|
84
|
+
<city>San Francisco</city>
|
85
|
+
<state>CA</state>
|
86
|
+
<zip>94115</zip>
|
87
|
+
<country>US</country>
|
88
|
+
<credit-card>
|
89
|
+
<number>4111111111111111</number>
|
90
|
+
<year type="integer">2012</year>
|
91
|
+
<month type="integer">3</month>
|
92
|
+
<verification-value>123</verification-value>
|
93
|
+
</credit-card>
|
94
|
+
<account-code>transaction-refund-1297746103</account-code>
|
95
|
+
</billing-info>
|
96
|
+
|
97
|
+
headers:
|
98
|
+
authorization:
|
99
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
100
|
+
content-type:
|
101
|
+
- application/xml
|
102
|
+
accept:
|
103
|
+
- "*/*"
|
104
|
+
user-agent:
|
105
|
+
- Ruby
|
106
|
+
connection:
|
107
|
+
- close
|
108
|
+
response: !ruby/struct:VCR::Response
|
109
|
+
status: !ruby/struct:VCR::ResponseStatus
|
110
|
+
code: 200
|
111
|
+
message: "OK "
|
112
|
+
headers:
|
113
|
+
x-runtime:
|
114
|
+
- "2297"
|
115
|
+
content-type:
|
116
|
+
- application/xml; charset=utf-8
|
117
|
+
etag:
|
118
|
+
- "\"da7fc862c22c86c3edf24850f9601418\""
|
119
|
+
cache-control:
|
120
|
+
- private, max-age=0, must-revalidate
|
121
|
+
content-length:
|
122
|
+
- "644"
|
123
|
+
server:
|
124
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
125
|
+
date:
|
126
|
+
- Fri, 11 Mar 2011 18:56:50 GMT
|
127
|
+
connection:
|
128
|
+
- close
|
129
|
+
set-cookie:
|
130
|
+
- _recurly_session=f11b067d801f9749a06ebc875a4b103c; domain=.recurly.local; path=/; HttpOnly
|
131
|
+
body: |
|
132
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
133
|
+
<billing_info>
|
134
|
+
<account_code>transaction-refund-1297746103</account_code>
|
135
|
+
<first_name>Verena</first_name>
|
136
|
+
<last_name>Test</last_name>
|
137
|
+
<address1>123 Test St</address1>
|
138
|
+
<address2></address2>
|
139
|
+
<city>San Francisco</city>
|
140
|
+
<state>CA</state>
|
141
|
+
<country>US</country>
|
142
|
+
<zip>94115</zip>
|
143
|
+
<phone></phone>
|
144
|
+
<vat_number></vat_number>
|
145
|
+
<ip_address></ip_address>
|
146
|
+
<credit_card>
|
147
|
+
<type>visa</type>
|
148
|
+
<last_four>1111</last_four>
|
149
|
+
<month type="integer">3</month>
|
150
|
+
<year type="integer">2012</year>
|
151
|
+
</credit_card>
|
152
|
+
<updated_at type="datetime">2011-03-11T18:56:50Z</updated_at>
|
153
|
+
</billing_info>
|
154
|
+
|
155
|
+
http_version: "1.1"
|
156
|
+
- !ruby/struct:VCR::HTTPInteraction
|
157
|
+
request: !ruby/struct:VCR::Request
|
158
|
+
method: :post
|
159
|
+
uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/transactions.xml
|
160
|
+
body: |
|
161
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
162
|
+
<transaction>
|
163
|
+
<account>
|
164
|
+
<account-code>transaction-refund-1297746103</account-code>
|
165
|
+
<billing-info>
|
166
|
+
<credit-card>
|
167
|
+
</credit-card>
|
168
|
+
</billing-info>
|
169
|
+
</account>
|
170
|
+
<amount-in-cents type="integer">1000</amount-in-cents>
|
171
|
+
<description>one</description>
|
172
|
+
</transaction>
|
173
|
+
|
174
|
+
headers:
|
175
|
+
authorization:
|
176
|
+
- Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
|
177
|
+
content-type:
|
178
|
+
- application/xml
|
179
|
+
accept:
|
180
|
+
- "*/*"
|
181
|
+
user-agent:
|
182
|
+
- Ruby
|
183
|
+
connection:
|
184
|
+
- close
|
185
|
+
response: !ruby/struct:VCR::Response
|
186
|
+
status: !ruby/struct:VCR::ResponseStatus
|
187
|
+
code: 422
|
188
|
+
message: ""
|
189
|
+
headers:
|
190
|
+
cache-control:
|
191
|
+
- no-cache
|
192
|
+
x-runtime:
|
193
|
+
- "948"
|
194
|
+
content-type:
|
195
|
+
- application/xml; charset=utf-8
|
196
|
+
content-length:
|
197
|
+
- "232"
|
198
|
+
server:
|
199
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
200
|
+
date:
|
201
|
+
- Fri, 11 Mar 2011 18:56:54 GMT
|
202
|
+
connection:
|
203
|
+
- close
|
204
|
+
set-cookie:
|
205
|
+
- _recurly_session=2bd3cc913a4d5763184c09fc1b6a843e; domain=.recurly.local; path=/; HttpOnly
|
206
|
+
body: |
|
207
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
208
|
+
<errors>
|
209
|
+
<error field="billing_info.first_name">Billing info.first name can't be blank</error>
|
210
|
+
<error field="billing_info.last_name">Billing info.last name can't be blank</error>
|
211
|
+
</errors>
|
212
|
+
|
213
|
+
http_version: "1.1"
|