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.

Files changed (99) hide show
  1. data/README.md +15 -11
  2. data/lib/patches/active_resource/connection.rb +10 -0
  3. data/lib/recurly.rb +35 -9
  4. data/lib/recurly/account.rb +22 -1
  5. data/lib/recurly/account_base.rb +35 -0
  6. data/lib/recurly/base.rb +26 -39
  7. data/lib/recurly/billing_info.rb +40 -1
  8. data/lib/recurly/charge.rb +12 -1
  9. data/lib/recurly/coupon.rb +8 -0
  10. data/lib/recurly/credit.rb +12 -1
  11. data/lib/recurly/exceptions.rb +19 -0
  12. data/lib/recurly/invoice.rb +1 -1
  13. data/lib/recurly/plan.rb +13 -1
  14. data/lib/recurly/rails3/recurly.rake +5 -3
  15. data/lib/recurly/subscription.rb +21 -3
  16. data/lib/recurly/transaction.rb +29 -1
  17. data/lib/recurly/transparent.rb +140 -0
  18. data/lib/recurly/version.rb +1 -1
  19. data/spec/config/recurly.yml +12 -0
  20. data/spec/config/test1.yml +3 -1
  21. data/spec/config/test2.yml +4 -2
  22. data/spec/integration/credit_spec.rb +6 -6
  23. data/spec/integration/plan_spec.rb +2 -2
  24. data/spec/support/factory.rb +5 -3
  25. data/spec/unit/account_spec.rb +19 -0
  26. data/spec/unit/billing_info_spec.rb +38 -0
  27. data/spec/unit/charge_spec.rb +18 -0
  28. data/spec/unit/config_spec.rb +10 -6
  29. data/spec/unit/coupon_spec.rb +13 -0
  30. data/spec/unit/credit_spec.rb +18 -0
  31. data/spec/unit/plan_spec.rb +18 -0
  32. data/spec/unit/subscription_spec.rb +25 -0
  33. data/spec/unit/transaction_spec.rb +32 -0
  34. data/spec/unit/transparent_spec.rb +114 -0
  35. data/spec/vcr/account/accept-language-account/{1296674173.yml → 1297746103.yml} +16 -13
  36. data/spec/vcr/account/close/{1296674173.yml → 1297746103.yml} +31 -28
  37. data/spec/vcr/account/create-blank/{1296674173.yml → 1297746103.yml} +9 -5
  38. data/spec/vcr/account/create-duplicate/{1296674173.yml → 1297746103.yml} +22 -15
  39. data/spec/vcr/account/create-min/{1296674173.yml → 1297746103.yml} +16 -13
  40. data/spec/vcr/account/create/{1296674173.yml → 1297746103.yml} +16 -13
  41. data/spec/vcr/account/find/{1296674173.yml → 1297746103.yml} +29 -26
  42. data/spec/vcr/account/list/1297746103.yml +1579 -0
  43. data/spec/vcr/account/update/{1296674173.yml → 1297746103.yml} +54 -47
  44. data/spec/vcr/billing/create/{1296690812.yml → 1298594128.yml} +37 -34
  45. data/spec/vcr/billing/destroy/{1296690812.yml → 1298594128.yml} +46 -43
  46. data/spec/vcr/billing/find/{1296690812.yml → 1298594128.yml} +47 -44
  47. data/spec/vcr/billing/update/{1296690812.yml → 1298594128.yml} +50 -47
  48. data/spec/vcr/charge/create/{1296674173.yml → 1297746103.yml} +48 -45
  49. data/spec/vcr/charge/delete-uninvoiced/{1296674173.yml → 1297746103.yml} +49 -46
  50. data/spec/vcr/charge/list-all/{1296674173.yml → 1297746103.yml} +61 -58
  51. data/spec/vcr/charge/list-invoiced/{1296674173.yml → 1297746103.yml} +92 -89
  52. data/spec/vcr/charge/list-pending/{1296674173.yml → 1297746103.yml} +61 -58
  53. data/spec/vcr/charge/lookup/{1296674173.yml → 1297746103.yml} +34 -31
  54. data/spec/vcr/coupon/create/{1296774903.yml → 1299714521.yml} +35 -32
  55. data/spec/vcr/coupon/destroy/{1296688818.yml → 1299714521.yml} +34 -31
  56. data/spec/vcr/{coupon/create/1296688818.yml → credit/create/1299714599.yml} +53 -53
  57. data/spec/vcr/credit/delete/1299714599.yml +262 -0
  58. data/spec/vcr/credit/list/1299714599.yml +319 -0
  59. data/spec/vcr/credit/lookup/1299714599.yml +183 -0
  60. data/spec/vcr/invoice/create-no-charges/{1296674173.yml → 1297746103.yml} +34 -31
  61. data/spec/vcr/invoice/create/{1296674173.yml → 1297746103.yml} +63 -60
  62. data/spec/vcr/invoice/list/{1296674173.yml → 1297746103.yml} +87 -84
  63. data/spec/vcr/invoice/lookup/{1296674173.yml → 1297746103.yml} +64 -61
  64. data/spec/vcr/plan/all.yml +30 -30
  65. data/spec/vcr/plan/find.yml +25 -25
  66. data/spec/vcr/plan/update.yml +16 -15
  67. data/spec/vcr/subscription/addons/add/{1296674173.yml → 1297746103.yml} +44 -40
  68. data/spec/vcr/subscription/addons/create/{1296674173.yml → 1297746103.yml} +44 -40
  69. data/spec/vcr/subscription/addons/remove/{1296674173.yml → 1297746103.yml} +44 -40
  70. data/spec/vcr/subscription/cancel-with-code/{1296674173.yml → 1297746103.yml} +99 -95
  71. data/spec/vcr/subscription/cancel/{1296674173.yml → 1297746103.yml} +86 -82
  72. data/spec/vcr/subscription/change1/{1296674173.yml → 1297746103.yml} +82 -78
  73. data/spec/vcr/subscription/change2/{1296674173.yml → 1297746103.yml} +82 -78
  74. data/spec/vcr/subscription/create/{1296674173.yml → 1297746103.yml} +49 -45
  75. data/spec/vcr/subscription/find/{1296674173.yml → 1297746103.yml} +60 -56
  76. data/spec/vcr/subscription/reactivate/{1296674173.yml → 1297746103.yml} +93 -89
  77. data/spec/vcr/subscription/refund-full/{1296674173.yml → 1297746103.yml} +77 -73
  78. data/spec/vcr/subscription/refund-none/{1296674173.yml → 1297746103.yml} +77 -73
  79. data/spec/vcr/subscription/refund-partial/{1296674173.yml → 1297746103.yml} +77 -73
  80. data/spec/vcr/transaction/all/{1296674173.yml → 1297746103.yml} +107 -107
  81. data/spec/vcr/transaction/create-no-account/{1296674173.yml → 1297746103.yml} +14 -13
  82. data/spec/vcr/transaction/create-with-account/{1296674173.yml → 1297746103.yml} +46 -58
  83. data/spec/vcr/transaction/list-filled/1297746103.yml +213 -0
  84. data/spec/vcr/transaction/list-initial/{1296674173.yml → 1297746103.yml} +38 -35
  85. data/spec/vcr/transaction/lookup/1297746103.yml +213 -0
  86. data/spec/vcr/transaction/refund/1297746103.yml +213 -0
  87. data/spec/vcr/transaction/void/1297746103.yml +213 -0
  88. metadata +146 -139
  89. data/spec/vcr/account/list/1296674173.yml +0 -55
  90. data/spec/vcr/coupon/destroy/1296774903.yml +0 -207
  91. data/spec/vcr/credit/create/1296674173.yml +0 -121
  92. data/spec/vcr/credit/delete/1296674173.yml +0 -121
  93. data/spec/vcr/credit/list/1296674173.yml +0 -121
  94. data/spec/vcr/credit/lookup/1296674173.yml +0 -121
  95. data/spec/vcr/plan/delete/1296674173.yml +0 -225
  96. data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
  97. data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
  98. data/spec/vcr/transaction/refund/1296674173.yml +0 -287
  99. data/spec/vcr/transaction/void/1296674173.yml +0 -352
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe BillingInfo do
5
+ context "new record" do
6
+ subject{BillingInfo.new}
7
+
8
+ it { should respond_to(:first_name)}
9
+ it { should respond_to(:last_name)}
10
+ it { should respond_to(:address1)}
11
+ it { should respond_to(:address2)}
12
+ it { should respond_to(:city)}
13
+ it { should respond_to(:state)}
14
+ it { should respond_to(:zip)}
15
+ it { should respond_to(:country)}
16
+ it { should respond_to(:phone)}
17
+ it { should respond_to(:ip_address)}
18
+
19
+ context "embedded credit card" do
20
+ before(:each) do
21
+ @credit_card = subject.credit_card
22
+ end
23
+
24
+ it{ @credit_card.should respond_to(:number)}
25
+ it{ @credit_card.should respond_to(:last_four)}
26
+ it{ @credit_card.should respond_to(:type)}
27
+ it{ @credit_card.should respond_to(:verification_value)}
28
+ it{ @credit_card.should respond_to(:month)}
29
+ it{ @credit_card.should respond_to(:year)}
30
+ it{ @credit_card.should respond_to(:start_month)}
31
+ it{ @credit_card.should respond_to(:start_year)}
32
+ it{ @credit_card.should respond_to(:issue_number)}
33
+
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Charge do
5
+ context "new record" do
6
+ subject{Charge.new}
7
+
8
+ it { should respond_to(:id)}
9
+ it { should respond_to(:account_code)}
10
+ it { should respond_to(:amount_in_cents)}
11
+ it { should respond_to(:start_date)}
12
+ it { should respond_to(:end_date)}
13
+ it { should respond_to(:description)}
14
+ it { should respond_to(:created_at)}
15
+ end
16
+
17
+ end
18
+ end
@@ -7,14 +7,14 @@ describe "RecurlyConfig" do
7
7
  Recurly.configure_from_yaml("#{File.dirname(__FILE__)}/../config/test1.yml")
8
8
  Recurly.username.should == "username1@recurly.com"
9
9
  Recurly.password.should == "asdf4jk31"
10
- Recurly.site.should == "https://site1.recurly.com"
10
+ Recurly.subdomain.should == "site1"
11
11
  end
12
12
 
13
13
  it "should load configuration from a YML file based on running environment" do
14
14
  Recurly.configure_from_yaml("#{File.dirname(__FILE__)}/../config/test2.yml")
15
15
  Recurly.username.should == "username2@recurly.com"
16
16
  Recurly.password.should == "asdf4jk32"
17
- Recurly.site.should == "https://site2.recurly.com"
17
+ Recurly.subdomain.should == "site2"
18
18
  end
19
19
  end
20
20
 
@@ -23,22 +23,26 @@ describe "RecurlyConfig" do
23
23
  Recurly.configure_from_json({
24
24
  :username => "someuser@heroku.com",
25
25
  :password => "somepass",
26
- :site => "https://recurlytest3-test.recurly.com"
26
+ :environment => :sandbox,
27
+ :subdomain => 'recurlytest3-test',
27
28
  }.to_json)
28
29
  Recurly.username.should == "someuser@heroku.com"
29
30
  Recurly.password.should == "somepass"
30
- Recurly.site.should == "https://recurlytest3-test.recurly.com"
31
+ Recurly.subdomain.should == 'recurlytest3-test'
32
+ Recurly::Base.site.to_s.should == "https://api-sandbox.recurly.com"
31
33
 
32
34
  # test with some crazy chars in the password
33
35
  Recurly.configure_from_json({
34
36
  :username => "api-someuser@heroku.com",
35
37
  :password => "*$&!!::@&!)*)*_",
36
- :site => "https://recurlytest3-test.recurly.com"
38
+ :subdomain => "recurlytest3-test",
39
+ :environment => :sandbox,
37
40
  }.to_json)
38
41
 
39
42
  Recurly.username.should == "api-someuser@heroku.com"
40
43
  Recurly.password.should == "*$&!!::@&!)*)*_"
41
- Recurly.site.should == "https://recurlytest3-test.recurly.com"
44
+ Recurly.subdomain.should == 'recurlytest3-test'
45
+ Recurly::Base.site.to_s.should == "https://api-sandbox.recurly.com"
42
46
  end
43
47
 
44
48
  end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Coupon do
5
+ context "new record" do
6
+ subject{Coupon.new}
7
+
8
+ it { should respond_to(:coupon_code)}
9
+ it { should respond_to(:redeemed_at)}
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Credit do
5
+ context "new record" do
6
+ subject{Credit.new}
7
+
8
+ it { should respond_to(:id)}
9
+ it { should respond_to(:account_code)}
10
+ it { should respond_to(:amount_in_cents)}
11
+ it { should respond_to(:start_date)}
12
+ it { should respond_to(:end_date)}
13
+ it { should respond_to(:description)}
14
+ it { should respond_to(:created_at)}
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Plan do
5
+ context "new record" do
6
+ subject{Plan.new}
7
+
8
+ it { should respond_to(:plan_code)}
9
+ it { should respond_to(:name)}
10
+ it { should respond_to(:description)}
11
+ it { should respond_to(:success_url)}
12
+ it { should respond_to(:cancel_url)}
13
+ it { should respond_to(:created_at)}
14
+
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Subscription do
5
+ context "new record" do
6
+ subject{Subscription.new}
7
+
8
+ it { should respond_to(:plan_code)}
9
+ it { should respond_to(:coupon_code)}
10
+ it { should respond_to(:unit_amount)}
11
+ it { should respond_to(:quantity)}
12
+ it { should respond_to(:trial_ends_at)}
13
+
14
+ # TODO: embedded account
15
+
16
+ # TODO: embedded billing_info
17
+
18
+ # TODO: embedded credit_card
19
+
20
+ # TODO: embedded addons list
21
+
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Transaction do
5
+ context "new record" do
6
+ subject{Transaction.new}
7
+
8
+ it { should respond_to(:id)}
9
+ it { should respond_to(:account_code)}
10
+ it { should respond_to(:type)}
11
+ it { should respond_to(:action)}
12
+ it { should respond_to(:date)}
13
+ it { should respond_to(:amount_in_cents)}
14
+ it { should respond_to(:status)}
15
+ it { should respond_to(:message)}
16
+ it { should respond_to(:reference)}
17
+ it { should respond_to(:ccv_result)}
18
+ it { should respond_to(:avs_result)}
19
+ it { should respond_to(:avs_result_street)}
20
+ it { should respond_to(:avs_result_postal)}
21
+ it { should respond_to(:test)}
22
+ it { should respond_to(:voidable)}
23
+ it { should respond_to(:refundable)}
24
+
25
+ # TODO: embedded account
26
+ # TODO: embedded billing_info
27
+ # TODO: embedded credit_card
28
+
29
+ end
30
+
31
+ end
32
+ end
@@ -0,0 +1,114 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Transparent do
5
+ before(:each) do
6
+ Recurly.configure_from_yaml("#{File.dirname(__FILE__)}/../config/recurly.yml")
7
+ end
8
+
9
+ describe ".url" do
10
+ it "should return the url for the configured Recurly site" do
11
+ Transparent.url.should == "#{Recurly::Base.site}/transparent/#{Recurly.subdomain}/subscription"
12
+ end
13
+
14
+ it "should allow passing in the type of action" do
15
+ Transparent.url(Action::CreateSubscription).should == "#{Recurly::Base.site}/transparent/#{Recurly.subdomain}/subscription"
16
+ Transparent.url(Action::UpdateBilling).should == "#{Recurly::Base.site}/transparent/#{Recurly.subdomain}/billing_info"
17
+ Transparent.url(Action::CreateTransaction).should == "#{Recurly::Base.site}/transparent/#{Recurly.subdomain}/transaction"
18
+ end
19
+ end
20
+
21
+ describe ".encrypt_string" do
22
+ it "should encrypt the data using the configured private key" do
23
+ result = Transparent.encrypt_string("d00d")
24
+
25
+ # hashed manually
26
+ result.should == "938f381f79192f536cbe29a79db5c595b7a09379"
27
+
28
+ result2 = Transparent.encrypt_string("d00d2")
29
+ result2.should_not eq(result)
30
+
31
+ result3 = Transparent.encrypt_string("d00d")
32
+ result3.should eq(result)
33
+ end
34
+ end
35
+
36
+ describe "#encoded_data" do
37
+ it "should return a data string for use within an input hidden field" do
38
+
39
+ transparent = Transparent.new({
40
+ :redirect_url => "http://example.com/",
41
+ :account => { :account_code => 'howdy' },
42
+ :value => "hello"
43
+ })
44
+
45
+ query_string = Transparent.query_string({
46
+ :redirect_url => "http://example.com/",
47
+ :account => { :account_code => 'howdy' },
48
+ :value => "hello"
49
+ })
50
+
51
+ transparent.encoded_data.split("|").last.should eq(query_string)
52
+ end
53
+
54
+ it "should allow fixnums" do
55
+ transparent = Transparent.new({
56
+ :redirect_url => "http://example.com/",
57
+ :account => { :account_code => '123' },
58
+ :amount => 10
59
+ })
60
+
61
+ query_string = Transparent.query_string({
62
+ :redirect_url => "http://example.com/",
63
+ :account => { :account_code => '123' },
64
+ :amount => 10
65
+ })
66
+
67
+ transparent.encoded_data.split("|").last.should == query_string
68
+ end
69
+
70
+ it "should allow nested fixnums" do
71
+ transparent = Transparent.new({
72
+ :redirect_url => "http://example.com/",
73
+ :account => { :account_code => '123' },
74
+ :transaction => {
75
+ :amount => 10
76
+ }
77
+ })
78
+
79
+ query_string = Transparent.query_string({
80
+ :redirect_url => "http://example.com/",
81
+ :account => { :account_code => '123' },
82
+ :transaction => {
83
+ :amount => 10
84
+ }
85
+ })
86
+
87
+ transparent.encoded_data.split("|").last.should == query_string
88
+ end
89
+
90
+ it "should prepend the validation string" do
91
+ transparent = Transparent.new({
92
+ :redirect_url => "http://example.com/",
93
+ :account => { :account_code => '123' },
94
+ :transaction => {
95
+ :amount => 10
96
+ }
97
+ })
98
+
99
+ query_string = Transparent.query_string({
100
+ :redirect_url => "http://example.com/",
101
+ :account => { :account_code => '123' },
102
+ :transaction => {
103
+ :amount => 10
104
+ }
105
+ })
106
+
107
+ validation_string = Transparent.encrypt_string(query_string)
108
+
109
+ transparent.encoded_data.split("|").first.should == validation_string
110
+ end
111
+ end
112
+
113
+ end
114
+ end
@@ -2,21 +2,25 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
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>account1-french-1296674173</account-code>
9
+ <account-code>account1-french-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>fr</accept-language>
15
19
  </account>
16
20
 
17
21
  headers:
18
22
  authorization:
19
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
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://litle-test.recurly.local:3000/accounts/account1-french-1296674173
40
+ - http://app.recurly.local:3000/accounts/account1-french-1297746103
37
41
  x-runtime:
38
- - "583"
42
+ - "515"
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
- - Thu, 03 Feb 2011 22:17:14 GMT
50
+ - Fri, 11 Mar 2011 18:47:28 GMT
47
51
  connection:
48
52
  - close
49
53
  set-cookie:
50
- - account_credentials=efc5fa78ea4fc57bad02b327f1cb8935698f5378749dcf787532fefdf181210f399cf370898720389cdc4b30d7ce50c251fa1bdb911e4eb77395624ce6f39ba7%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=d8966c6817ac71fc093284ed2ef96a91; domain=.recurly.local; path=/; HttpOnly
54
+ - account_credentials=d4fc51be51177aace2e3f530412ea425f760549c2083c14bbe9af0b5080cd66188dbb71bf7ffc1ca96d400c693d152db3f53a3deef4848f44afd42fe45dd4733%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=b8385e736e2e0c446b6b99f1e68c415d; domain=.recurly.local; path=/; HttpOnly
53
56
  body: |
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
58
  <account>
56
- <id>account1-french-1296674173</id>
57
- <account_code>account1-french-1296674173</account_code>
59
+ <id>account1-french-1297746103</id>
60
+ <account_code>account1-french-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>a88be6968cb348ceb8d7503aebdaa483</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:17:14Z</created_at>
68
+ <hosted_login_token>d7d5841da4264edaa467e01335407311</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:47:28Z</created_at>
67
70
  <state>active</state>
68
71
  </account>
69
72
 
@@ -2,21 +2,25 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
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>account-close-1296674173</account-code>
9
+ <account-code>account-close-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 aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
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://litle-test.recurly.local:3000/accounts/account-close-1296674173
40
+ - http://app.recurly.local:3000/accounts/account-close-1297746103
37
41
  x-runtime:
38
- - "549"
42
+ - "378"
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
- - Thu, 03 Feb 2011 22:17:02 GMT
50
+ - Fri, 11 Mar 2011 18:47:16 GMT
47
51
  connection:
48
52
  - close
49
53
  set-cookie:
50
- - account_credentials=1b6b26473ff7d8493d62462e15141df13d06979db5d284e1698a94c5b0c126c9bbb539b3b5045cfbd10f8bd30c3db173cc163a017b00c9597786a91eb9ab2a32%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=d431edb8ee4e7cedb0b2bffd6b1b432b; domain=.recurly.local; path=/; HttpOnly
54
+ - account_credentials=132e508bc3ed7d75b50b4d5d55a1ecb0f335784f2dd4e74c0532be92c81f3173bd66e27469e417dcf1b4b609844532ca32711edeca80ba96acebfc9a63c39b66%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=017dc9de9ee713b550c96ec1e1d36355; domain=.recurly.local; path=/; HttpOnly
53
56
  body: |
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
58
  <account>
56
- <id>account-close-1296674173</id>
57
- <account_code>account-close-1296674173</account_code>
59
+ <id>account-close-1297746103</id>
60
+ <account_code>account-close-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>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:17:01Z</created_at>
68
+ <hosted_login_token>45503dd9dca646499d29fc6522c3caf9</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:47:16Z</created_at>
67
70
  <state>active</state>
68
71
  </account>
69
72
 
@@ -71,11 +74,11 @@
71
74
  - !ruby/struct:VCR::HTTPInteraction
72
75
  request: !ruby/struct:VCR::Request
73
76
  method: :delete
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/account-close-1297746103.xml
75
78
  body:
76
79
  headers:
77
80
  authorization:
78
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
81
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
79
82
  accept:
80
83
  - application/xml
81
84
  user-agent:
@@ -90,7 +93,7 @@
90
93
  cache-control:
91
94
  - no-cache
92
95
  x-runtime:
93
- - "356"
96
+ - "321"
94
97
  content-type:
95
98
  - application/xml; charset=utf-8
96
99
  content-length:
@@ -98,21 +101,21 @@
98
101
  server:
99
102
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
100
103
  date:
101
- - Thu, 03 Feb 2011 22:17:04 GMT
104
+ - Fri, 11 Mar 2011 18:47:18 GMT
102
105
  connection:
103
106
  - close
104
107
  set-cookie:
105
- - _recurly_session=87d11d401895ced9897e0024de5403f4; domain=.recurly.local; path=/; HttpOnly
108
+ - _recurly_session=0993d29250a0117917de948d56b4ec48; domain=.recurly.local; path=/; HttpOnly
106
109
  body: " "
107
110
  http_version: "1.1"
108
111
  - !ruby/struct:VCR::HTTPInteraction
109
112
  request: !ruby/struct:VCR::Request
110
113
  method: :get
111
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
114
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/account-close-1297746103.xml
112
115
  body:
113
116
  headers:
114
117
  authorization:
115
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
118
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
116
119
  accept:
117
120
  - application/xml
118
121
  accept-encoding:
@@ -127,11 +130,11 @@
127
130
  message: "OK "
128
131
  headers:
129
132
  x-runtime:
130
- - "184"
133
+ - "247"
131
134
  content-type:
132
135
  - application/xml; charset=utf-8
133
136
  etag:
134
- - "\"0d31c946c075a2c560335a916d4b359f\""
137
+ - "\"5a863b1aea60da430de63a76ffdb8aff\""
135
138
  cache-control:
136
139
  - private, max-age=0, must-revalidate
137
140
  content-length:
@@ -139,16 +142,16 @@
139
142
  server:
140
143
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
141
144
  date:
142
- - Thu, 03 Feb 2011 22:17:05 GMT
145
+ - Fri, 11 Mar 2011 18:47:20 GMT
143
146
  connection:
144
147
  - close
145
148
  set-cookie:
146
- - _recurly_session=22d04ea39adc6f1d7a86140c413f6326; domain=.recurly.local; path=/; HttpOnly
149
+ - _recurly_session=c373ff7975bc328866ef41150b11a1e1; domain=.recurly.local; path=/; HttpOnly
147
150
  body: |
148
151
  <?xml version="1.0" encoding="UTF-8"?>
149
152
  <account>
150
- <id>account-close-1296674173</id>
151
- <account_code>account-close-1296674173</account_code>
153
+ <id>account-close-1297746103</id>
154
+ <account_code>account-close-1297746103</account_code>
152
155
  <username></username>
153
156
  <email>verena@test.com</email>
154
157
  <first_name>Verena</first_name>
@@ -156,8 +159,8 @@
156
159
  <company_name>Recurly Ruby Gem</company_name>
157
160
  <balance_in_cents type="integer">0</balance_in_cents>
158
161
  <closed type="boolean">true</closed>
159
- <hosted_login_token>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
160
- <created_at type="datetime">2011-02-03T22:17:01Z</created_at>
162
+ <hosted_login_token>45503dd9dca646499d29fc6522c3caf9</hosted_login_token>
163
+ <created_at type="datetime">2011-03-11T18:47:16Z</created_at>
161
164
  <state>closed</state>
162
165
  </account>
163
166