recurly 0.2.2 → 0.2.3

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 (72) hide show
  1. data/lib/recurly/subscription.rb +2 -3
  2. data/lib/recurly/version.rb +1 -1
  3. data/spec/integration/account_spec.rb +0 -2
  4. data/spec/integration/invoice_spec.rb +0 -1
  5. data/spec/integration/subscription_spec.rb +49 -10
  6. data/spec/integration/transaction_spec.rb +3 -2
  7. data/spec/support/factory.rb +2 -2
  8. data/spec/vcr/account/close/{1286666929.yml → 1287167046.yml} +23 -23
  9. data/spec/vcr/account/create/{1286666929.yml → 1287167046.yml} +10 -10
  10. data/spec/vcr/account/create-blank/{1286666929.yml → 1287167046.yml} +3 -3
  11. data/spec/vcr/account/create-duplicate/{1286666929.yml → 1287167046.yml} +27 -12
  12. data/spec/vcr/account/create-min/{1286666929.yml → 1287167046.yml} +10 -10
  13. data/spec/vcr/account/find/{1286666929.yml → 1287167046.yml} +67 -29
  14. data/spec/vcr/account/list/{1286666929.yml → 1287167046.yml} +201 -228
  15. data/spec/vcr/account/update/{1286666929.yml → 1287167046.yml} +41 -41
  16. data/spec/vcr/billing/create/1286682213.yml +15 -15
  17. data/spec/vcr/billing/destroy/1286682213.yml +24 -24
  18. data/spec/vcr/billing/find/1286682213.yml +20 -20
  19. data/spec/vcr/billing/update/1286682213.yml +21 -21
  20. data/spec/vcr/charge/create/1286681273.yml +25 -25
  21. data/spec/vcr/charge/list-all/1286681273.yml +37 -37
  22. data/spec/vcr/charge/list-invoiced/1286681273.yml +62 -62
  23. data/spec/vcr/charge/list-pending/1286681273.yml +37 -37
  24. data/spec/vcr/charge/lookup/1286681273.yml +20 -20
  25. data/spec/vcr/credit/create/1286681343.yml +20 -20
  26. data/spec/vcr/credit/list/1286681343.yml +37 -37
  27. data/spec/vcr/credit/lookup/1286681343.yml +20 -20
  28. data/spec/vcr/invoice/create/{1286679184.yml → 1287167121.yml} +49 -49
  29. data/spec/vcr/{transaction/refund/1286674805.yml → invoice/create-no-charges/1287167121.yml} +32 -57
  30. data/spec/vcr/invoice/list/{1286679184.yml → 1287167121.yml} +71 -71
  31. data/spec/vcr/invoice/lookup/{1286679184.yml → 1287167121.yml} +50 -50
  32. data/spec/vcr/plan/all.yml +8 -8
  33. data/spec/vcr/plan/delete/1286677585.yml +15 -15
  34. data/spec/vcr/plan/find.yml +8 -8
  35. data/spec/vcr/plan/update.yml +9 -9
  36. data/spec/vcr/subscription/cancel/{1287037363.yml → 1287439446.yml} +62 -62
  37. data/spec/vcr/subscription/cancel/{1287037325.yml → 1287442108.yml} +60 -60
  38. data/spec/vcr/subscription/cancel/{1287036910.yml → 1287442352.yml} +60 -60
  39. data/spec/vcr/subscription/change1/{1287037363.yml → 1287439446.yml} +58 -58
  40. data/spec/vcr/subscription/change1/{1287037152.yml → 1287442108.yml} +59 -59
  41. data/spec/vcr/subscription/change1/{1287036910.yml → 1287442352.yml} +56 -56
  42. data/spec/vcr/subscription/{change1/1287037325.yml → change2/1287439446.yml} +64 -64
  43. data/spec/vcr/subscription/change2/{1287036910.yml → 1287442108.yml} +55 -55
  44. data/spec/vcr/subscription/change2/{1287037363.yml → 1287442352.yml} +58 -58
  45. data/spec/vcr/subscription/create/{1287037363.yml → 1287439446.yml} +27 -27
  46. data/spec/vcr/subscription/create/{1287037325.yml → 1287442108.yml} +28 -28
  47. data/spec/vcr/subscription/create/{1287037152.yml → 1287442352.yml} +28 -28
  48. data/spec/vcr/subscription/find/{1287036910.yml → 1287439446.yml} +36 -36
  49. data/spec/vcr/subscription/find/{1287037152.yml → 1287442108.yml} +38 -38
  50. data/spec/vcr/subscription/find/{1287037325.yml → 1287442352.yml} +38 -38
  51. data/spec/vcr/subscription/{refund/1287037325.yml → refund-full/1287439446.yml} +56 -56
  52. data/spec/vcr/subscription/{refund/1287037363.yml → refund-full/1287442108.yml} +58 -58
  53. data/spec/vcr/subscription/{refund/1287036910.yml → refund-full/1287442352.yml} +55 -55
  54. data/spec/vcr/subscription/refund-none/1287439446.yml +382 -0
  55. data/spec/vcr/subscription/refund-none/1287442108.yml +382 -0
  56. data/spec/vcr/subscription/refund-none/1287442352.yml +382 -0
  57. data/spec/vcr/subscription/refund-partial/1287439446.yml +382 -0
  58. data/spec/vcr/subscription/refund-partial/1287442108.yml +382 -0
  59. data/spec/vcr/subscription/refund-partial/1287442352.yml +382 -0
  60. data/spec/vcr/transaction/all/{1286674805.yml → 1287186411.yml} +104 -104
  61. data/spec/vcr/transaction/create-no-account/{1286674805.yml → 1287186411.yml} +11 -11
  62. data/spec/vcr/transaction/create-with-account/{1286674805.yml → 1287186411.yml} +26 -26
  63. data/spec/vcr/transaction/list-empty/{1286674805.yml → 1287186411.yml} +26 -26
  64. data/spec/vcr/transaction/list-filled/{1286674805.yml → 1287186411.yml} +59 -59
  65. data/spec/vcr/transaction/lookup/{1286674805.yml → 1287186411.yml} +66 -66
  66. data/spec/vcr/transaction/refund/1287186411.yml +282 -0
  67. data/spec/vcr/transaction/void/{1286674805.yml → 1287186411.yml} +87 -155
  68. metadata +92 -86
  69. data/spec/vcr/subscription/change2/1287037152.yml +0 -283
  70. data/spec/vcr/subscription/change2/1287037325.yml +0 -283
  71. data/spec/vcr/subscription/create/1287036910.yml +0 -224
  72. data/spec/vcr/subscription/find/1287037363.yml +0 -283
@@ -3,7 +3,7 @@ module Recurly
3
3
  self.element_name = "subscription"
4
4
 
5
5
  def self.refund(account_code, refund_type = :partial)
6
- raise "Refund type must be :full or :partial." unless refund_type == :full or refund_type == :partial
6
+ raise "Refund type must be :full, :partial, or :none." unless [:full, :partial, :none].include?(refund_type)
7
7
  Subscription.delete(nil, {:account_code => account_code, :refund => refund_type})
8
8
  end
9
9
 
@@ -15,8 +15,7 @@ module Recurly
15
15
 
16
16
  # Terminates the subscription immediately and processes a full or partial refund
17
17
  def refund(refund_type)
18
- raise "Refund type must be :full or :partial." unless refund_type == :full or refund_type == :partial
19
- Subscription.delete(nil, {:account_code => self.subscription_account_code, :refund => refund_type})
18
+ self.class.refund(self.subscription_account_code)
20
19
  end
21
20
 
22
21
  # Valid timeframe: :now or :renewal
@@ -1,3 +1,3 @@
1
1
  module Recurly #:nodoc
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -102,8 +102,6 @@ module Recurly
102
102
 
103
103
  context "looking for a non-existant account" do
104
104
  it "should raise an ActiveResource::ResourceNotFound exception" do
105
- pending "This isn't supposed to throw 500 errors..."
106
-
107
105
  expect {
108
106
  Account.find('account-that-doesnt-exist')
109
107
  }.to raise_error ActiveResource::ResourceNotFound
@@ -32,7 +32,6 @@ module Recurly
32
32
  let(:account) { Factory.create_account_with_billing_info("invoice-create-no-charges-#{timestamp}") }
33
33
 
34
34
  it "should not be created since no charges were posted" do
35
- pending "Server should not throw a 500 error here"
36
35
  @invoice = Invoice.create(:account_code => account.account_code)
37
36
  @invoice.should_not be_valid
38
37
  end
@@ -108,21 +108,60 @@ module Recurly
108
108
  end
109
109
 
110
110
  describe "refund a subscription" do
111
- use_vcr_cassette "subscription/refund/#{timestamp}"
111
+ context "full refund" do
112
+ use_vcr_cassette "subscription/refund-full/#{timestamp}"
112
113
 
113
- let(:account){ Factory.create_account("subscription-refund-#{timestamp}") }
114
+ let(:account){ Factory.create_account("subscription-refund-full-#{timestamp}") }
114
115
 
115
- before(:each) do
116
- Factory.create_subscription(account, :paid)
117
- @subscription = Subscription.find(account.account_code)
116
+ before(:each) do
117
+ Factory.create_subscription(account, :paid)
118
+ @subscription = Subscription.find(account.account_code)
119
+ end
120
+
121
+ it "should remove the subscription entry and post a full refund" do
122
+ @subscription.refund(:full)
123
+ expect {
124
+ Subscription.find(account.account_code)
125
+ }.to raise_error(ActiveResource::ResourceNotFound)
126
+ end
127
+ end
128
+
129
+ context "partial refund" do
130
+ use_vcr_cassette "subscription/refund-partial/#{timestamp}"
131
+
132
+ let(:account){ Factory.create_account("subscription-refund-partial-#{timestamp}") }
133
+
134
+ before(:each) do
135
+ Factory.create_subscription(account, :paid)
136
+ @subscription = Subscription.find(account.account_code)
137
+ end
138
+
139
+ it "should remove the subscription entry and post a partial refund" do
140
+ @subscription.refund(:partial)
141
+ expect {
142
+ Subscription.find(account.account_code)
143
+ }.to raise_error(ActiveResource::ResourceNotFound)
144
+ end
118
145
  end
119
146
 
120
- it "should remove the subscription entry" do
121
- @subscription.refund(:full)
122
- expect {
123
- Subscription.find(account.account_code)
124
- }.to raise_error(ActiveResource::ResourceNotFound)
147
+ context "no refund" do
148
+ use_vcr_cassette "subscription/refund-none/#{timestamp}"
149
+
150
+ let(:account){ Factory.create_account("subscription-refund-none-#{timestamp}") }
151
+
152
+ before(:each) do
153
+ Factory.create_subscription(account, :paid)
154
+ @subscription = Subscription.find(account.account_code)
155
+ end
156
+
157
+ it "should remove the subscription entry and not post a refund" do
158
+ @subscription.refund(:none)
159
+ expect {
160
+ Subscription.find(account.account_code)
161
+ }.to raise_error(ActiveResource::ResourceNotFound)
162
+ end
125
163
  end
164
+
126
165
  end
127
166
  end
128
167
  end
@@ -134,9 +134,10 @@ module Recurly
134
134
  end
135
135
 
136
136
  it "should refund the transaction" do
137
- pending "Server should refund the transaction"
138
137
  @transaction.refund(1000)
139
- Transaction.list(:refunds).should include(@transaction)
138
+
139
+ pending "not showing up in the refunds list for some reason..."
140
+ Transaction.list(:refunds).map(&:id).should include(@transaction.id)
140
141
  end
141
142
  end
142
143
 
@@ -168,9 +168,9 @@ module Recurly
168
168
  # 10 dollars a month
169
169
  :unit_amount_in_cents => 1000,
170
170
 
171
- # 1 year intervals
171
+ # 1 month intervals
172
172
  :plan_interval_length => 1,
173
- :plan_interval_unit => "years",
173
+ :plan_interval_unit => "months",
174
174
 
175
175
  # 1 month trial
176
176
  :trial_interval_length => 1,
@@ -7,7 +7,7 @@
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
9
  <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>account-close-1286666929</account-code>
10
+ <account-code>account-close-1287167046</account-code>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <first-name>Verena</first-name>
@@ -28,30 +28,30 @@
28
28
  message: Created
29
29
  headers:
30
30
  location:
31
- - https://recurlytest3-test.recurly.com/accounts/account-close-1286666929
31
+ - https://recurlytest3-test.recurly.com/accounts/account-close-1287167046
32
32
  connection:
33
33
  - close
34
34
  content-type:
35
35
  - application/xml; charset=utf-8
36
36
  x-runtime:
37
- - "568"
37
+ - "637"
38
38
  date:
39
- - Thu, 14 Oct 2010 06:15:45 GMT
39
+ - Mon, 18 Oct 2010 22:05:03 GMT
40
40
  server:
41
41
  - nginx/0.7.65
42
42
  content-length:
43
43
  - "581"
44
44
  set-cookie:
45
- - account_credentials=8171dfe4bd90db74de529ca5eaed0ff56f00e0aea9dc521fc8f8edcf2b07331ad2fce09b760ae0da68864875b1264defe18058dc980afb476fd7f1b757d5a6ea%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
45
+ - account_credentials=db0ebca433101a60ad6cedd66480bae1170b30a910b2f1f7e6fc21ce657a4f1cd6c717d4e13ac31e65c0156e0c10cae3f574f7ab1fda16138b299a164a3af62f%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
46
46
  - ""
47
- - _recurly_session=e0596ab5fccf208e071f0695ddd56a64; domain=.recurly.com; path=/; Secure; HttpOnly
47
+ - _recurly_session=d9709767e3929d0807e9b4711fbf8c3e; domain=.recurly.com; path=/; Secure; HttpOnly
48
48
  cache-control:
49
49
  - no-cache
50
50
  body: |
51
51
  <?xml version="1.0" encoding="UTF-8"?>
52
52
  <account>
53
- <id>account-close-1286666929</id>
54
- <account_code>account-close-1286666929</account_code>
53
+ <id>account-close-1287167046</id>
54
+ <account_code>account-close-1287167046</account_code>
55
55
  <username></username>
56
56
  <email>verena@test.com</email>
57
57
  <first_name>Verena</first_name>
@@ -59,8 +59,8 @@
59
59
  <company_name>Recurly Ruby Gem</company_name>
60
60
  <balance_in_cents type="integer">0</balance_in_cents>
61
61
  <closed type="boolean">false</closed>
62
- <hosted_login_token>06afe57039224882a15af1101f1d0c79</hosted_login_token>
63
- <created_at type="datetime">2010-10-14T06:15:45Z</created_at>
62
+ <hosted_login_token>45509f9afde9465091a5c30460c2d744</hosted_login_token>
63
+ <created_at type="datetime">2010-10-18T22:05:03Z</created_at>
64
64
  <state>active</state>
65
65
  </account>
66
66
 
@@ -68,7 +68,7 @@
68
68
  - !ruby/struct:VCR::HTTPInteraction
69
69
  request: !ruby/struct:VCR::Request
70
70
  method: :delete
71
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1286666929.xml
71
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1287167046.xml
72
72
  body:
73
73
  headers:
74
74
  accept:
@@ -89,15 +89,15 @@
89
89
  content-type:
90
90
  - application/xml; charset=utf-8
91
91
  x-runtime:
92
- - "64"
92
+ - "70"
93
93
  date:
94
- - Thu, 14 Oct 2010 06:15:46 GMT
94
+ - Mon, 18 Oct 2010 22:05:03 GMT
95
95
  server:
96
96
  - nginx/0.7.65
97
97
  content-length:
98
98
  - "1"
99
99
  set-cookie:
100
- - _recurly_session=2309d7d0061fd27d7c9b188e8d2ad903; domain=.recurly.com; path=/; Secure; HttpOnly
100
+ - _recurly_session=ac1f1fadb737e9e550d7c09e2d86df5a; domain=.recurly.com; path=/; Secure; HttpOnly
101
101
  cache-control:
102
102
  - no-cache
103
103
  body: " "
@@ -105,7 +105,7 @@
105
105
  - !ruby/struct:VCR::HTTPInteraction
106
106
  request: !ruby/struct:VCR::Request
107
107
  method: :get
108
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1286666929.xml
108
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1287167046.xml
109
109
  body:
110
110
  headers:
111
111
  accept:
@@ -122,28 +122,28 @@
122
122
  x-ua-compatible:
123
123
  - IE=Edge
124
124
  etag:
125
- - "\"316f3d6beaaba14f31d565352c12f739\""
125
+ - "\"a81b0cd3656007282ea4b05b6e97feec\""
126
126
  connection:
127
127
  - close
128
128
  content-type:
129
129
  - application/xml; charset=utf-8
130
130
  x-runtime:
131
- - "44"
131
+ - "74"
132
132
  date:
133
- - Thu, 14 Oct 2010 06:15:47 GMT
133
+ - Mon, 18 Oct 2010 22:05:04 GMT
134
134
  server:
135
135
  - nginx/0.7.65
136
136
  content-length:
137
137
  - "580"
138
138
  set-cookie:
139
- - _recurly_session=b0919023d9048fc518683695361697d8; domain=.recurly.com; path=/; Secure; HttpOnly
139
+ - _recurly_session=38b580055cd8699f7c121600e1184d98; domain=.recurly.com; path=/; Secure; HttpOnly
140
140
  cache-control:
141
141
  - private, max-age=0, must-revalidate
142
142
  body: |
143
143
  <?xml version="1.0" encoding="UTF-8"?>
144
144
  <account>
145
- <id>account-close-1286666929</id>
146
- <account_code>account-close-1286666929</account_code>
145
+ <id>account-close-1287167046</id>
146
+ <account_code>account-close-1287167046</account_code>
147
147
  <username></username>
148
148
  <email>verena@test.com</email>
149
149
  <first_name>Verena</first_name>
@@ -151,8 +151,8 @@
151
151
  <company_name>Recurly Ruby Gem</company_name>
152
152
  <balance_in_cents type="integer">0</balance_in_cents>
153
153
  <closed type="boolean">true</closed>
154
- <hosted_login_token>06afe57039224882a15af1101f1d0c79</hosted_login_token>
155
- <created_at type="datetime">2010-10-14T06:15:45Z</created_at>
154
+ <hosted_login_token>45509f9afde9465091a5c30460c2d744</hosted_login_token>
155
+ <created_at type="datetime">2010-10-18T22:05:03Z</created_at>
156
156
  <state>closed</state>
157
157
  </account>
158
158
 
@@ -7,7 +7,7 @@
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
9
  <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>account-create-1286666929</account-code>
10
+ <account-code>account-create-1287167046</account-code>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <first-name>Verena</first-name>
@@ -28,30 +28,30 @@
28
28
  message: Created
29
29
  headers:
30
30
  location:
31
- - https://recurlytest3-test.recurly.com/accounts/account-create-1286666929
31
+ - https://recurlytest3-test.recurly.com/accounts/account-create-1287167046
32
32
  connection:
33
33
  - close
34
34
  content-type:
35
35
  - application/xml; charset=utf-8
36
36
  x-runtime:
37
- - "577"
37
+ - "586"
38
38
  date:
39
- - Thu, 14 Oct 2010 06:15:15 GMT
39
+ - Mon, 18 Oct 2010 22:04:33 GMT
40
40
  server:
41
41
  - nginx/0.7.65
42
42
  content-length:
43
43
  - "583"
44
44
  set-cookie:
45
- - account_credentials=a1b2f9114efca34b99d7eedf0684123386dcffaa4f28d02020e63fc8ae256909a014b4fe3bae21ffc8c7408b55357999d3f758f6b7b70df2fd3756e6c8c49537%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
45
+ - account_credentials=4b90d853827136ef353b9dcfb847e25672d2dff70fc552c29ee6097b4804bf0f12f4779ec711f1252eb5a3ad8b82e9de3377ed95ae9e2f05143abc0c66c2b498%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
46
46
  - ""
47
- - _recurly_session=4e953dedf17b5ab598ce5a8e32d11121; domain=.recurly.com; path=/; Secure; HttpOnly
47
+ - _recurly_session=0412918da6a71a7800cf996746929a26; domain=.recurly.com; path=/; Secure; HttpOnly
48
48
  cache-control:
49
49
  - no-cache
50
50
  body: |
51
51
  <?xml version="1.0" encoding="UTF-8"?>
52
52
  <account>
53
- <id>account-create-1286666929</id>
54
- <account_code>account-create-1286666929</account_code>
53
+ <id>account-create-1287167046</id>
54
+ <account_code>account-create-1287167046</account_code>
55
55
  <username></username>
56
56
  <email>verena@test.com</email>
57
57
  <first_name>Verena</first_name>
@@ -59,8 +59,8 @@
59
59
  <company_name>Recurly Ruby Gem</company_name>
60
60
  <balance_in_cents type="integer">0</balance_in_cents>
61
61
  <closed type="boolean">false</closed>
62
- <hosted_login_token>13dd452fcf93457db066710fd65781de</hosted_login_token>
63
- <created_at type="datetime">2010-10-14T06:15:15Z</created_at>
62
+ <hosted_login_token>34c9183da60a419aa67fa0fb89dc6048</hosted_login_token>
63
+ <created_at type="datetime">2010-10-18T22:04:33Z</created_at>
64
64
  <state>active</state>
65
65
  </account>
66
66
 
@@ -28,15 +28,15 @@
28
28
  content-type:
29
29
  - application/xml; charset=utf-8
30
30
  x-runtime:
31
- - "18"
31
+ - "19"
32
32
  date:
33
- - Thu, 14 Oct 2010 06:15:47 GMT
33
+ - Mon, 18 Oct 2010 22:05:05 GMT
34
34
  server:
35
35
  - nginx/0.7.65
36
36
  content-length:
37
37
  - "186"
38
38
  set-cookie:
39
- - _recurly_session=5b48160d1ced437e9fcf8b8a6ef37ec9; domain=.recurly.com; path=/; Secure; HttpOnly
39
+ - _recurly_session=c450df012ad4138c46363fae696f0923; domain=.recurly.com; path=/; Secure; HttpOnly
40
40
  cache-control:
41
41
  - no-cache
42
42
  body: |
@@ -20,30 +20,45 @@
20
20
  - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
21
21
  response: !ruby/struct:VCR::Response
22
22
  status: !ruby/struct:VCR::ResponseStatus
23
- code: 422
24
- message: ""
23
+ code: 201
24
+ message: Created
25
25
  headers:
26
+ location:
27
+ - https://recurlytest3-test.recurly.com/accounts/account-exists
26
28
  connection:
27
29
  - close
28
30
  content-type:
29
31
  - application/xml; charset=utf-8
30
32
  x-runtime:
31
- - "30"
33
+ - "609"
32
34
  date:
33
- - Thu, 14 Oct 2010 06:15:48 GMT
35
+ - Mon, 18 Oct 2010 22:05:06 GMT
34
36
  server:
35
37
  - nginx/0.7.65
36
38
  content-length:
37
- - "132"
39
+ - "520"
38
40
  set-cookie:
39
- - _recurly_session=383e9b0854b010f9178cecd8a89f30fe; domain=.recurly.com; path=/; Secure; HttpOnly
41
+ - account_credentials=4755d8b2ea8a11ed6f5dc2c496af8890aa143cc43f3825c24a9a9af9ccbebdab4a35ce34b617ab80cce7bf4dd4f51f8a45eee7566b90c8b50bbae7e3fda9387d%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
42
+ - ""
43
+ - _recurly_session=cbf99b64bd47cb150a0acf0ab8450f0e; domain=.recurly.com; path=/; Secure; HttpOnly
40
44
  cache-control:
41
45
  - no-cache
42
46
  body: |
43
47
  <?xml version="1.0" encoding="UTF-8"?>
44
- <errors>
45
- <error field="account_code">Account code has already been taken</error>
46
- </errors>
48
+ <account>
49
+ <id>account-exists</id>
50
+ <account_code>account-exists</account_code>
51
+ <username></username>
52
+ <email></email>
53
+ <first_name></first_name>
54
+ <last_name></last_name>
55
+ <company_name></company_name>
56
+ <balance_in_cents type="integer">0</balance_in_cents>
57
+ <closed type="boolean">false</closed>
58
+ <hosted_login_token>c34fc059dd1e46cb877956b3efd59656</hosted_login_token>
59
+ <created_at type="datetime">2010-10-18T22:05:06Z</created_at>
60
+ <state>active</state>
61
+ </account>
47
62
 
48
63
  http_version: "1.1"
49
64
  - !ruby/struct:VCR::HTTPInteraction
@@ -75,15 +90,15 @@
75
90
  content-type:
76
91
  - application/xml; charset=utf-8
77
92
  x-runtime:
78
- - "18"
93
+ - "19"
79
94
  date:
80
- - Thu, 14 Oct 2010 06:15:49 GMT
95
+ - Mon, 18 Oct 2010 22:05:07 GMT
81
96
  server:
82
97
  - nginx/0.7.65
83
98
  content-length:
84
99
  - "132"
85
100
  set-cookie:
86
- - _recurly_session=5d4c19f3669a1ddde3c95819026f63df; domain=.recurly.com; path=/; Secure; HttpOnly
101
+ - _recurly_session=1b8b754a9997b44599939a56996ffdd7; domain=.recurly.com; path=/; Secure; HttpOnly
87
102
  cache-control:
88
103
  - no-cache
89
104
  body: |
@@ -6,7 +6,7 @@
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>d00d-1286666929</account-code>
9
+ <account-code>d00d-1287167046</account-code>
10
10
  </account>
11
11
 
12
12
  headers:
@@ -24,30 +24,30 @@
24
24
  message: Created
25
25
  headers:
26
26
  location:
27
- - https://recurlytest3-test.recurly.com/accounts/d00d-1286666929
27
+ - https://recurlytest3-test.recurly.com/accounts/d00d-1287167046
28
28
  connection:
29
29
  - close
30
30
  content-type:
31
31
  - application/xml; charset=utf-8
32
32
  x-runtime:
33
- - "567"
33
+ - "582"
34
34
  date:
35
- - Thu, 14 Oct 2010 06:15:16 GMT
35
+ - Mon, 18 Oct 2010 22:04:34 GMT
36
36
  server:
37
37
  - nginx/0.7.65
38
38
  content-length:
39
39
  - "522"
40
40
  set-cookie:
41
- - account_credentials=279a5d85932ab7f16c10dfd48b8a4ba39dd6fdab67a66480d7164cd6d9c8a30e7ed2e5cca7bb4450e7ad8ef283cb2e594213becdc25eb05b5f4660813fc24846%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
41
+ - account_credentials=3e6605b0a6e3038ebc4e757a359c346818ca21d8d0f28322d20d2daf0574255ab0f421fd14283f2b358bd27fa6863cbb9ed5ae93022526102c4268c6385546dd%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
42
42
  - ""
43
- - _recurly_session=773baa0f87c9badfa95f2b5c192bea85; domain=.recurly.com; path=/; Secure; HttpOnly
43
+ - _recurly_session=bd9a1732331f6a8c00369df453d3d32e; domain=.recurly.com; path=/; Secure; HttpOnly
44
44
  cache-control:
45
45
  - no-cache
46
46
  body: |
47
47
  <?xml version="1.0" encoding="UTF-8"?>
48
48
  <account>
49
- <id>d00d-1286666929</id>
50
- <account_code>d00d-1286666929</account_code>
49
+ <id>d00d-1287167046</id>
50
+ <account_code>d00d-1287167046</account_code>
51
51
  <username></username>
52
52
  <email></email>
53
53
  <first_name></first_name>
@@ -55,8 +55,8 @@
55
55
  <company_name></company_name>
56
56
  <balance_in_cents type="integer">0</balance_in_cents>
57
57
  <closed type="boolean">false</closed>
58
- <hosted_login_token>ad58f7eb915d44139f523a50e3882017</hosted_login_token>
59
- <created_at type="datetime">2010-10-14T06:15:16Z</created_at>
58
+ <hosted_login_token>4a9ad1a443b549c3b71b4a71320e7121</hosted_login_token>
59
+ <created_at type="datetime">2010-10-18T22:04:34Z</created_at>
60
60
  <state>active</state>
61
61
  </account>
62
62