recurly 0.4.7 → 0.4.8
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 +6 -0
- data/lib/recurly/base.rb +15 -14
- data/lib/recurly/subscription.rb +2 -0
- data/lib/recurly/version.rb +1 -1
- data/spec/config/recurly.yml +4 -10
- data/spec/integration/transparent_spec.rb +72 -0
- data/spec/unit/transparent_spec.rb +6 -6
- data/spec/vcr/account/accept-language-account/{1301979678.yml → 1296674173.yml} +16 -18
- data/spec/vcr/account/close/{1301979678.yml → 1296674173.yml} +37 -39
- data/spec/vcr/account/create-blank/{1301979678.yml → 1296674173.yml} +8 -12
- data/spec/vcr/account/create-duplicate/{1301979678.yml → 1296674173.yml} +21 -27
- data/spec/vcr/account/create-min/{1301979678.yml → 1296674173.yml} +16 -18
- data/spec/vcr/account/create/{1301979678.yml → 1296674173.yml} +16 -18
- data/spec/vcr/account/find/{1301979678.yml → 1296674173.yml} +36 -38
- data/spec/vcr/account/list/1296674173.yml +55 -0
- data/spec/vcr/account/update/{1301979678.yml → 1296674173.yml} +59 -65
- data/spec/vcr/billing/create/{1302025874.yml → 1296690812.yml} +43 -45
- data/spec/vcr/billing/destroy/{1302025874.yml → 1296690812.yml} +58 -60
- data/spec/vcr/billing/find/{1302025874.yml → 1296690812.yml} +56 -58
- data/spec/vcr/billing/update/{1302025874.yml → 1296690812.yml} +59 -61
- data/spec/vcr/charge/create/{1297746103.yml → 1296674173.yml} +58 -64
- data/spec/vcr/charge/delete-uninvoiced/{1297746103.yml → 1296674173.yml} +66 -72
- data/spec/vcr/charge/list-all/{1297746103.yml → 1296674173.yml} +77 -91
- data/spec/vcr/charge/list-invoiced/{1297746103.yml → 1296674173.yml} +115 -131
- data/spec/vcr/charge/list-pending/{1297746103.yml → 1296674173.yml} +77 -91
- data/spec/vcr/charge/lookup/{1297746103.yml → 1296674173.yml} +43 -49
- data/spec/vcr/coupon/create/1296688818.yml +183 -0
- data/spec/vcr/coupon/create/1296774903.yml +183 -0
- data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
- data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
- data/spec/vcr/{coupon/create/1299714521.yml → credit/create/1296674173.yml} +34 -32
- data/spec/vcr/{billing/errors/1302025874.yml → credit/delete/1296674173.yml} +33 -42
- data/spec/vcr/{coupon/destroy/1299714521.yml → credit/list/1296674173.yml} +35 -33
- data/spec/vcr/credit/lookup/1296674173.yml +121 -0
- data/spec/vcr/invoice/create-no-charges/{1297746103.yml → 1296674173.yml} +40 -42
- data/spec/vcr/invoice/create/{1297746103.yml → 1296674173.yml} +77 -83
- data/spec/vcr/invoice/list/{1297746103.yml → 1296674173.yml} +107 -113
- data/spec/vcr/invoice/lookup/{1297746103.yml → 1296674173.yml} +77 -81
- data/spec/vcr/plan/all.yml +117 -98
- data/spec/vcr/plan/delete/1296674173.yml +225 -0
- data/spec/vcr/plan/find.yml +66 -36
- data/spec/vcr/plan/update.yml +64 -144
- data/spec/vcr/subscription/addons/add/{1301885121.yml → 1296674173.yml} +58 -51
- data/spec/vcr/subscription/addons/create/{1301885121.yml → 1296674173.yml} +58 -51
- data/spec/vcr/subscription/addons/remove/{1301885121.yml → 1296674173.yml} +58 -51
- data/spec/vcr/subscription/cancel-with-code/{1301881900.yml → 1296674173.yml} +135 -133
- data/spec/vcr/subscription/cancel/{1301881900.yml → 1296674173.yml} +117 -114
- data/spec/vcr/subscription/change1/{1301881900.yml → 1296674173.yml} +113 -110
- data/spec/vcr/subscription/change2/{1301881900.yml → 1296674173.yml} +112 -109
- data/spec/vcr/subscription/create/{1301881900.yml → 1296674173.yml} +65 -59
- data/spec/vcr/subscription/find/{1301881900.yml → 1296674173.yml} +81 -76
- data/spec/vcr/subscription/reactivate/{1301881900.yml → 1296674173.yml} +127 -124
- data/spec/vcr/subscription/refund-full/1296674173.yml +400 -0
- data/spec/vcr/subscription/refund-none/{1301881900.yml → 1296674173.yml} +106 -102
- data/spec/vcr/subscription/refund-partial/1296674173.yml +400 -0
- data/spec/vcr/transaction/all/{1301883347.yml → 1296674173.yml} +126 -126
- data/spec/vcr/transaction/create-no-account/{1301883347.yml → 1296674173.yml} +16 -16
- data/spec/vcr/transaction/create-with-account/{1301883347.yml → 1296674173.yml} +45 -51
- data/spec/vcr/transaction/list-filled/{1301883347.yml → 1296674173.yml} +91 -221
- data/spec/vcr/transaction/list-initial/{1301883347.yml → 1296674173.yml} +44 -46
- data/spec/vcr/transaction/lookup/{1301883347.yml → 1296674173.yml} +107 -121
- data/spec/vcr/transaction/refund/{1301883347.yml → 1296674173.yml} +57 -63
- data/spec/vcr/transaction/void/{1301883347.yml → 1296674173.yml} +69 -75
- data/spec/vcr/transparent/post-url/1311127536.yml +0 -0
- data/spec/vcr/transparent/post-url/1311127583.yml +0 -0
- data/spec/vcr/transparent/post-url/1311128042.yml +0 -0
- data/spec/vcr/transparent/post-url/1311128073.yml +0 -0
- data/spec/vcr/transparent/post-url/1311128087.yml +0 -0
- metadata +97 -155
- data/spec/vcr/account/list/1301979678.yml +0 -1588
- data/spec/vcr/credit/create/1299714599.yml +0 -186
- data/spec/vcr/credit/delete/1299714599.yml +0 -265
- data/spec/vcr/credit/list/1299714599.yml +0 -330
- data/spec/vcr/credit/lookup/1299714599.yml +0 -186
- data/spec/vcr/subscription/refund-full/1301881900.yml +0 -334
- data/spec/vcr/subscription/refund-partial/1301881900.yml +0 -334
- data/spec/vcr/transparent/post-url/1301879142.yml +0 -129
data/README.md
CHANGED
@@ -110,6 +110,12 @@ When first running the specs, you'll need to setup a recurly test account. Use t
|
|
110
110
|
|
111
111
|
Now when you run `rake` it will hit recurly's api to run all the specs. Subsequent calls will no longer hit the API (and be run locally).
|
112
112
|
|
113
|
+
The tests expect certain plans, add ons, and coupons to be present on the Site you'll be testing against. You'll need:
|
114
|
+
Plan with no trial with a plan_code of 'paid'
|
115
|
+
Plan with a trial with a plan_code of 'trial'
|
116
|
+
Add ons with codes 'special' and special2' on the 'paid' plan
|
117
|
+
Coupon with coupon code 'coupon' which can be applied to all plans
|
118
|
+
|
113
119
|
|
114
120
|
Something go Wrong?
|
115
121
|
------------------
|
data/lib/recurly/base.rb
CHANGED
@@ -24,19 +24,8 @@ module Recurly
|
|
24
24
|
save_without_validation
|
25
25
|
end
|
26
26
|
true
|
27
|
-
rescue ActiveResource::ResourceInvalid =>
|
28
|
-
|
29
|
-
when /application\/xml/
|
30
|
-
begin
|
31
|
-
f = Recurly::Formats::XmlWithErrorsFormat.new
|
32
|
-
load_errors_from_array(f.decode(error.response.body))
|
33
|
-
rescue
|
34
|
-
errors.from_xml(error.response.body)
|
35
|
-
end
|
36
|
-
when /application\/json/
|
37
|
-
errors.from_json(error.response.body)
|
38
|
-
end
|
39
|
-
false
|
27
|
+
rescue ActiveResource::ResourceInvalid => e
|
28
|
+
load_errors e.response.body
|
40
29
|
end
|
41
30
|
|
42
31
|
# patch persisted? so it looks to see if it actually is persisted
|
@@ -51,7 +40,7 @@ module Recurly
|
|
51
40
|
end
|
52
41
|
|
53
42
|
# patched to read Errors array
|
54
|
-
def load(attributes)
|
43
|
+
def load(attributes, remove_root = false)
|
55
44
|
raise ArgumentError, "expected an attributes Hash, got #{attributes.inspect}" unless attributes.is_a?(Hash)
|
56
45
|
@prefix_options, attributes = split_options(attributes)
|
57
46
|
attributes.each do |key, value|
|
@@ -92,6 +81,18 @@ module Recurly
|
|
92
81
|
super
|
93
82
|
@persisted = true
|
94
83
|
end
|
84
|
+
|
85
|
+
def load_errors xml
|
86
|
+
load_errors_from_array(
|
87
|
+
Recurly::Formats::XmlWithErrorsFormat.new.decode(error)
|
88
|
+
)
|
89
|
+
rescue => e
|
90
|
+
logger.warn "Recurly::Base#load_errors exception parsing nested error information"
|
91
|
+
# Fallback to default errors parsing
|
92
|
+
errors.from_xml xml
|
93
|
+
ensure
|
94
|
+
return false
|
95
|
+
end
|
95
96
|
|
96
97
|
# Patched to read errors with field information
|
97
98
|
def load_errors_from_array(new_errors, save_cache = false)
|
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
data/spec/config/recurly.yml
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
---
|
2
|
-
username: api-test@
|
3
|
-
password:
|
4
|
-
private_key:
|
5
|
-
subdomain:
|
2
|
+
username: api-test@litle.com
|
3
|
+
password: 6499f1cd3ae14875beb91417d31e91b7
|
4
|
+
private_key: 78753d36439c423aba60e581be828a2a
|
5
|
+
subdomain: litle-test
|
6
6
|
environment: :development
|
7
|
-
|
8
|
-
#username: api-test@isaactest.com
|
9
|
-
#password: e94fb95953454b1dad4abf26af382a5d
|
10
|
-
#private_key: 2b656f0351e345faa1d29b2d7a455202
|
11
|
-
#subdomain: isaachall-test
|
12
|
-
#environment: :sandbox
|
@@ -6,6 +6,7 @@ module Recurly
|
|
6
6
|
timestamp = File.mtime(__FILE__).to_i
|
7
7
|
|
8
8
|
describe ".url" do
|
9
|
+
|
9
10
|
use_vcr_cassette "transparent/post-url/#{timestamp}"
|
10
11
|
|
11
12
|
it "should not change after calling account.find()" do
|
@@ -21,5 +22,76 @@ module Recurly
|
|
21
22
|
|
22
23
|
end
|
23
24
|
end
|
25
|
+
|
26
|
+
it "should parse errors on nested objects" do
|
27
|
+
response_xml = <<END
|
28
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
29
|
+
<subscription>
|
30
|
+
<id nil="true"></id>
|
31
|
+
<account_code>2345</account_code>
|
32
|
+
<account>
|
33
|
+
<account_code>12345</account_code>
|
34
|
+
<username></username>
|
35
|
+
<email>verena@test.com</email>
|
36
|
+
<first_name>Verena</first_name>
|
37
|
+
<last_name>Test User</last_name>
|
38
|
+
<company_name></company_name>
|
39
|
+
<closed type="boolean">false</closed>
|
40
|
+
<hosted_login_token>abcd1234123412341234123412341234</hosted_login_token>
|
41
|
+
<created_at type="datetime">2011-07-20T01:49:24Z</created_at>
|
42
|
+
<state>active</state>
|
43
|
+
<billing_info>
|
44
|
+
<account_code>12345</account_code>
|
45
|
+
<first_name>Verena</first_name>
|
46
|
+
<last_name>Test User</last_name>
|
47
|
+
<address1></address1>
|
48
|
+
<address2></address2>
|
49
|
+
<city></city>
|
50
|
+
<state></state>
|
51
|
+
<country></country>
|
52
|
+
<zip></zip>
|
53
|
+
<phone></phone>
|
54
|
+
<vat_number></vat_number>
|
55
|
+
<ip_address>127.0.0.1</ip_address>
|
56
|
+
<credit_card>
|
57
|
+
<type></type>
|
58
|
+
<last_four></last_four>
|
59
|
+
<month type="integer">7</month>
|
60
|
+
<year type="integer">2011</year>
|
61
|
+
</credit_card>
|
62
|
+
<updated_at type="datetime">2011-07-20T01:49:35Z</updated_at>
|
63
|
+
<errors>
|
64
|
+
<error field="number">is required</error>
|
65
|
+
<error field="verification_value">is required</error>
|
66
|
+
</errors>
|
67
|
+
</billing_info>
|
68
|
+
</account>
|
69
|
+
<plan>
|
70
|
+
<plan_code>gold-plan</plan_code>
|
71
|
+
<name>Gold Plan</name>
|
72
|
+
</plan>
|
73
|
+
<state>pending</state>
|
74
|
+
<quantity type="integer">1</quantity>
|
75
|
+
<total_amount_in_cents type="integer">1200</total_amount_in_cents>
|
76
|
+
<activated_at nil="true" type="datetime"></activated_at>
|
77
|
+
<canceled_at nil="true" type="datetime"></canceled_at>
|
78
|
+
<expires_at nil="true" type="datetime"></expires_at>
|
79
|
+
<current_period_started_at type="datetime">2011-07-20T01:49:35Z</current_period_started_at>
|
80
|
+
<current_period_ends_at type="datetime">2011-07-20T01:49:35Z</current_period_ends_at>
|
81
|
+
<trial_started_at nil="true" type="datetime"></trial_started_at>
|
82
|
+
<trial_ends_at nil="true" type="datetime"></trial_ends_at>
|
83
|
+
<add_ons type="array">
|
84
|
+
</add_ons>
|
85
|
+
</subscription>
|
86
|
+
END
|
87
|
+
|
88
|
+
response = mock
|
89
|
+
response.should_receive(:[]).at_least(:once).with('Content-Length').and_return '123'
|
90
|
+
response.should_receive(:body).at_least(:once).and_return response_xml
|
91
|
+
|
92
|
+
subscription = Subscription.new.from_transparent_results(response)
|
93
|
+
subscription.account.billing_info.errors[:number].should_not be_nil
|
94
|
+
subscription.account.billing_info.errors[:verification_value].should_not be_nil
|
95
|
+
end
|
24
96
|
end
|
25
97
|
end
|
@@ -22,9 +22,9 @@ module Recurly
|
|
22
22
|
config.environment = :sandbox
|
23
23
|
config.subdomain = 'testtest'
|
24
24
|
end
|
25
|
-
Transparent.url(Action::CreateSubscription).should == "
|
26
|
-
Transparent.url(Action::UpdateBilling).should == "
|
27
|
-
Transparent.url(Action::CreateTransaction).should == "
|
25
|
+
Transparent.url(Action::CreateSubscription).should == "#{Recurly::Base.site}/transparent/testtest/subscription"
|
26
|
+
Transparent.url(Action::UpdateBilling).should == "#{Recurly::Base.site}/transparent/testtest/billing_info"
|
27
|
+
Transparent.url(Action::CreateTransaction).should == "#{Recurly::Base.site}/transparent/testtest/transaction"
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should equal api-production for sandbox" do
|
@@ -32,9 +32,9 @@ module Recurly
|
|
32
32
|
config.environment = :production
|
33
33
|
config.subdomain = 'testtest'
|
34
34
|
end
|
35
|
-
Transparent.url(Action::CreateSubscription).should == "
|
36
|
-
Transparent.url(Action::UpdateBilling).should == "
|
37
|
-
Transparent.url(Action::CreateTransaction).should == "
|
35
|
+
Transparent.url(Action::CreateSubscription).should == "#{Recurly::Base.site}/transparent/testtest/subscription"
|
36
|
+
Transparent.url(Action::UpdateBilling).should == "#{Recurly::Base.site}/transparent/testtest/billing_info"
|
37
|
+
Transparent.url(Action::CreateTransaction).should == "#{Recurly::Base.site}/transparent/testtest/transaction"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -2,31 +2,27 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://
|
5
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
|
6
6
|
body: |
|
7
7
|
<?xml version="1.0" encoding="UTF-8"?>
|
8
8
|
<account>
|
9
|
-
<account-code>account1-french-
|
9
|
+
<account-code>account1-french-1296674173</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>
|
18
14
|
<accept-language>fr</accept-language>
|
19
15
|
</account>
|
20
16
|
|
21
17
|
headers:
|
22
18
|
authorization:
|
23
|
-
- Basic
|
24
|
-
user-agent:
|
25
|
-
- Recurly Ruby Client v0.4.6
|
19
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
26
20
|
content-type:
|
27
21
|
- application/xml
|
28
22
|
accept:
|
29
23
|
- "*/*"
|
24
|
+
user-agent:
|
25
|
+
- Ruby
|
30
26
|
connection:
|
31
27
|
- close
|
32
28
|
response: !ruby/struct:VCR::Response
|
@@ -37,26 +33,28 @@
|
|
37
33
|
cache-control:
|
38
34
|
- no-cache
|
39
35
|
location:
|
40
|
-
- http://
|
36
|
+
- http://litle-test.recurly.local:3000/accounts/account1-french-1296674173
|
41
37
|
x-runtime:
|
42
|
-
- "
|
38
|
+
- "583"
|
43
39
|
content-type:
|
44
40
|
- application/xml; charset=utf-8
|
45
41
|
content-length:
|
46
42
|
- "585"
|
47
43
|
server:
|
48
|
-
- WEBrick/1.3.1 (Ruby/1.9.2/
|
44
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
49
45
|
date:
|
50
|
-
- Thu,
|
46
|
+
- Thu, 03 Feb 2011 22:17:14 GMT
|
51
47
|
connection:
|
52
48
|
- close
|
53
49
|
set-cookie:
|
54
|
-
-
|
50
|
+
- account_credentials=efc5fa78ea4fc57bad02b327f1cb8935698f5378749dcf787532fefdf181210f399cf370898720389cdc4b30d7ce50c251fa1bdb911e4eb77395624ce6f39ba7%3A%3A; domain=.recurly.local; path=/
|
51
|
+
- ""
|
52
|
+
- _recurly_session=d8966c6817ac71fc093284ed2ef96a91; domain=.recurly.local; path=/; HttpOnly
|
55
53
|
body: |
|
56
54
|
<?xml version="1.0" encoding="UTF-8"?>
|
57
55
|
<account>
|
58
|
-
<id>account1-french-
|
59
|
-
<account_code>account1-french-
|
56
|
+
<id>account1-french-1296674173</id>
|
57
|
+
<account_code>account1-french-1296674173</account_code>
|
60
58
|
<username></username>
|
61
59
|
<email>verena@test.com</email>
|
62
60
|
<first_name>Verena</first_name>
|
@@ -64,8 +62,8 @@
|
|
64
62
|
<company_name>Recurly Ruby Gem</company_name>
|
65
63
|
<balance_in_cents type="integer">0</balance_in_cents>
|
66
64
|
<closed type="boolean">false</closed>
|
67
|
-
<hosted_login_token>
|
68
|
-
<created_at type="datetime">2011-
|
65
|
+
<hosted_login_token>a88be6968cb348ceb8d7503aebdaa483</hosted_login_token>
|
66
|
+
<created_at type="datetime">2011-02-03T22:17:14Z</created_at>
|
69
67
|
<state>active</state>
|
70
68
|
</account>
|
71
69
|
|
@@ -2,31 +2,27 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://
|
5
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
|
6
6
|
body: |
|
7
7
|
<?xml version="1.0" encoding="UTF-8"?>
|
8
8
|
<account>
|
9
|
-
<account-code>account-close-
|
9
|
+
<account-code>account-close-1296674173</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>
|
18
14
|
<accept-language type="yaml" nil="true"></accept-language>
|
19
15
|
</account>
|
20
16
|
|
21
17
|
headers:
|
22
18
|
authorization:
|
23
|
-
- Basic
|
24
|
-
user-agent:
|
25
|
-
- Recurly Ruby Client v0.4.6
|
19
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
26
20
|
content-type:
|
27
21
|
- application/xml
|
28
22
|
accept:
|
29
23
|
- "*/*"
|
24
|
+
user-agent:
|
25
|
+
- Ruby
|
30
26
|
connection:
|
31
27
|
- close
|
32
28
|
response: !ruby/struct:VCR::Response
|
@@ -37,26 +33,28 @@
|
|
37
33
|
cache-control:
|
38
34
|
- no-cache
|
39
35
|
location:
|
40
|
-
- http://
|
36
|
+
- http://litle-test.recurly.local:3000/accounts/account-close-1296674173
|
41
37
|
x-runtime:
|
42
|
-
- "
|
38
|
+
- "549"
|
43
39
|
content-type:
|
44
40
|
- application/xml; charset=utf-8
|
45
41
|
content-length:
|
46
42
|
- "581"
|
47
43
|
server:
|
48
|
-
- WEBrick/1.3.1 (Ruby/1.9.2/
|
44
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
49
45
|
date:
|
50
|
-
- Thu,
|
46
|
+
- Thu, 03 Feb 2011 22:17:02 GMT
|
51
47
|
connection:
|
52
48
|
- close
|
53
49
|
set-cookie:
|
54
|
-
-
|
50
|
+
- account_credentials=1b6b26473ff7d8493d62462e15141df13d06979db5d284e1698a94c5b0c126c9bbb539b3b5045cfbd10f8bd30c3db173cc163a017b00c9597786a91eb9ab2a32%3A%3A; domain=.recurly.local; path=/
|
51
|
+
- ""
|
52
|
+
- _recurly_session=d431edb8ee4e7cedb0b2bffd6b1b432b; domain=.recurly.local; path=/; HttpOnly
|
55
53
|
body: |
|
56
54
|
<?xml version="1.0" encoding="UTF-8"?>
|
57
55
|
<account>
|
58
|
-
<id>account-close-
|
59
|
-
<account_code>account-close-
|
56
|
+
<id>account-close-1296674173</id>
|
57
|
+
<account_code>account-close-1296674173</account_code>
|
60
58
|
<username></username>
|
61
59
|
<email>verena@test.com</email>
|
62
60
|
<first_name>Verena</first_name>
|
@@ -64,8 +62,8 @@
|
|
64
62
|
<company_name>Recurly Ruby Gem</company_name>
|
65
63
|
<balance_in_cents type="integer">0</balance_in_cents>
|
66
64
|
<closed type="boolean">false</closed>
|
67
|
-
<hosted_login_token>
|
68
|
-
<created_at type="datetime">2011-
|
65
|
+
<hosted_login_token>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
|
66
|
+
<created_at type="datetime">2011-02-03T22:17:01Z</created_at>
|
69
67
|
<state>active</state>
|
70
68
|
</account>
|
71
69
|
|
@@ -73,15 +71,15 @@
|
|
73
71
|
- !ruby/struct:VCR::HTTPInteraction
|
74
72
|
request: !ruby/struct:VCR::Request
|
75
73
|
method: :delete
|
76
|
-
uri: http://
|
74
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
|
77
75
|
body:
|
78
76
|
headers:
|
79
77
|
authorization:
|
80
|
-
- Basic
|
81
|
-
user-agent:
|
82
|
-
- Recurly Ruby Client v0.4.6
|
78
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
83
79
|
accept:
|
84
80
|
- application/xml
|
81
|
+
user-agent:
|
82
|
+
- Ruby
|
85
83
|
connection:
|
86
84
|
- close
|
87
85
|
response: !ruby/struct:VCR::Response
|
@@ -92,35 +90,35 @@
|
|
92
90
|
cache-control:
|
93
91
|
- no-cache
|
94
92
|
x-runtime:
|
95
|
-
- "
|
93
|
+
- "356"
|
96
94
|
content-type:
|
97
95
|
- application/xml; charset=utf-8
|
98
96
|
content-length:
|
99
97
|
- "1"
|
100
98
|
server:
|
101
|
-
- WEBrick/1.3.1 (Ruby/1.9.2/
|
99
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
102
100
|
date:
|
103
|
-
- Thu,
|
101
|
+
- Thu, 03 Feb 2011 22:17:04 GMT
|
104
102
|
connection:
|
105
103
|
- close
|
106
104
|
set-cookie:
|
107
|
-
- _recurly_session=
|
105
|
+
- _recurly_session=87d11d401895ced9897e0024de5403f4; domain=.recurly.local; path=/; HttpOnly
|
108
106
|
body: " "
|
109
107
|
http_version: "1.1"
|
110
108
|
- !ruby/struct:VCR::HTTPInteraction
|
111
109
|
request: !ruby/struct:VCR::Request
|
112
110
|
method: :get
|
113
|
-
uri: http://
|
111
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
|
114
112
|
body:
|
115
113
|
headers:
|
116
114
|
authorization:
|
117
|
-
- Basic
|
118
|
-
user-agent:
|
119
|
-
- Recurly Ruby Client v0.4.6
|
115
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
120
116
|
accept:
|
121
117
|
- application/xml
|
122
118
|
accept-encoding:
|
123
119
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
120
|
+
user-agent:
|
121
|
+
- Ruby
|
124
122
|
connection:
|
125
123
|
- close
|
126
124
|
response: !ruby/struct:VCR::Response
|
@@ -129,28 +127,28 @@
|
|
129
127
|
message: "OK "
|
130
128
|
headers:
|
131
129
|
x-runtime:
|
132
|
-
- "
|
130
|
+
- "184"
|
133
131
|
content-type:
|
134
132
|
- application/xml; charset=utf-8
|
135
133
|
etag:
|
136
|
-
- "\"
|
134
|
+
- "\"0d31c946c075a2c560335a916d4b359f\""
|
137
135
|
cache-control:
|
138
136
|
- private, max-age=0, must-revalidate
|
139
137
|
content-length:
|
140
138
|
- "580"
|
141
139
|
server:
|
142
|
-
- WEBrick/1.3.1 (Ruby/1.9.2/
|
140
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
143
141
|
date:
|
144
|
-
- Thu,
|
142
|
+
- Thu, 03 Feb 2011 22:17:05 GMT
|
145
143
|
connection:
|
146
144
|
- close
|
147
145
|
set-cookie:
|
148
|
-
- _recurly_session=
|
146
|
+
- _recurly_session=22d04ea39adc6f1d7a86140c413f6326; domain=.recurly.local; path=/; HttpOnly
|
149
147
|
body: |
|
150
148
|
<?xml version="1.0" encoding="UTF-8"?>
|
151
149
|
<account>
|
152
|
-
<id>account-close-
|
153
|
-
<account_code>account-close-
|
150
|
+
<id>account-close-1296674173</id>
|
151
|
+
<account_code>account-close-1296674173</account_code>
|
154
152
|
<username></username>
|
155
153
|
<email>verena@test.com</email>
|
156
154
|
<first_name>Verena</first_name>
|
@@ -158,8 +156,8 @@
|
|
158
156
|
<company_name>Recurly Ruby Gem</company_name>
|
159
157
|
<balance_in_cents type="integer">0</balance_in_cents>
|
160
158
|
<closed type="boolean">true</closed>
|
161
|
-
<hosted_login_token>
|
162
|
-
<created_at type="datetime">2011-
|
159
|
+
<hosted_login_token>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
|
160
|
+
<created_at type="datetime">2011-02-03T22:17:01Z</created_at>
|
163
161
|
<state>closed</state>
|
164
162
|
</account>
|
165
163
|
|