recurly 0.3.2 → 0.3.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 (86) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +4 -4
  3. data/lib/recurly.rb +8 -1
  4. data/lib/recurly/account.rb +5 -0
  5. data/lib/recurly/coupon.rb +5 -0
  6. data/lib/recurly/rails3/recurly.rake +3 -18
  7. data/lib/recurly/version.rb +1 -1
  8. data/spec/config/{test.yml → test1.yml} +0 -0
  9. data/spec/config/test2.yml +9 -0
  10. data/spec/integration/account_spec.rb +3 -3
  11. data/spec/integration/billing_info_spec.rb +4 -8
  12. data/spec/integration/coupon_spec.rb +49 -0
  13. data/spec/integration/plan_spec.rb +0 -28
  14. data/spec/integration/transaction_spec.rb +3 -3
  15. data/spec/spec_helper.rb +6 -0
  16. data/spec/support/factory.rb +1 -1
  17. data/spec/unit/config_spec.rb +9 -2
  18. data/spec/vcr/account/accept-language-account/{1294473653.yml → 1296674173.yml} +29 -27
  19. data/spec/vcr/account/close/{1294473761.yml → 1296674173.yml} +71 -67
  20. data/spec/vcr/account/create-blank/{1294473761.yml → 1296674173.yml} +20 -18
  21. data/spec/vcr/account/create-duplicate/{1294473761.yml → 1296674173.yml} +42 -38
  22. data/spec/vcr/account/create-min/{1294473761.yml → 1296674173.yml} +26 -24
  23. data/spec/vcr/account/create/{1294473761.yml → 1296674173.yml} +29 -27
  24. data/spec/vcr/account/find/{1294473761.yml → 1296674173.yml} +71 -63
  25. data/spec/vcr/account/list/1296674173.yml +55 -0
  26. data/spec/vcr/account/update/{1294473761.yml → 1296674173.yml} +113 -107
  27. data/spec/vcr/billing/create/{1286682213.yml → 1296690812.yml} +86 -82
  28. data/spec/vcr/billing/destroy/{1286682213.yml → 1296690812.yml} +126 -142
  29. data/spec/vcr/billing/find/{1286682213.yml → 1296690812.yml} +115 -109
  30. data/spec/vcr/billing/update/{1286682213.yml → 1296690812.yml} +119 -115
  31. data/spec/vcr/charge/create/{1287465632.yml → 1296674173.yml} +109 -103
  32. data/spec/vcr/charge/delete-uninvoiced/{1287465632.yml → 1296674173.yml} +129 -117
  33. data/spec/vcr/charge/list-all/{1287465632.yml → 1296674173.yml} +131 -121
  34. data/spec/vcr/charge/list-invoiced/{1287465632.yml → 1296674173.yml} +195 -177
  35. data/spec/vcr/charge/list-pending/{1287465632.yml → 1296674173.yml} +131 -121
  36. data/spec/vcr/charge/lookup/{1287465632.yml → 1296674173.yml} +77 -71
  37. data/spec/vcr/coupon/create/1296688818.yml +183 -0
  38. data/spec/vcr/coupon/create/1296774903.yml +183 -0
  39. data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
  40. data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
  41. data/spec/vcr/credit/create/1296674173.yml +121 -0
  42. data/spec/vcr/credit/delete/1296674173.yml +121 -0
  43. data/spec/vcr/credit/list/1296674173.yml +121 -0
  44. data/spec/vcr/credit/lookup/1296674173.yml +121 -0
  45. data/spec/vcr/invoice/create-no-charges/{1287167121.yml → 1296674173.yml} +79 -75
  46. data/spec/vcr/invoice/create/{1287167121.yml → 1296674173.yml} +141 -130
  47. data/spec/vcr/invoice/list/{1287167121.yml → 1296674173.yml} +196 -180
  48. data/spec/vcr/invoice/lookup/{1287167121.yml → 1296674173.yml} +145 -133
  49. data/spec/vcr/plan/all.yml +86 -136
  50. data/spec/vcr/plan/delete/{1286677585.yml → 1296674173.yml} +87 -79
  51. data/spec/vcr/plan/find.yml +73 -91
  52. data/spec/vcr/plan/update.yml +80 -76
  53. data/spec/vcr/subscription/addons/add/1296674173.yml +225 -0
  54. data/spec/vcr/subscription/addons/create/1296674173.yml +225 -0
  55. data/spec/vcr/subscription/addons/remove/1296674173.yml +225 -0
  56. data/spec/vcr/subscription/cancel-with-code/{1287455769.yml → 1296674173.yml} +201 -201
  57. data/spec/vcr/subscription/cancel/{1287455769.yml → 1296674173.yml} +173 -175
  58. data/spec/vcr/subscription/change1/{1287455769.yml → 1296674173.yml} +172 -174
  59. data/spec/vcr/subscription/change2/{1287455769.yml → 1296674173.yml} +172 -174
  60. data/spec/vcr/subscription/create/{1287455769.yml → 1296674173.yml} +93 -99
  61. data/spec/vcr/subscription/find/{1287455769.yml → 1296674173.yml} +119 -123
  62. data/spec/vcr/subscription/reactivate/{1287455769.yml → 1296674173.yml} +194 -196
  63. data/spec/vcr/subscription/{refund-none/1287455769.yml → refund-full/1296674173.yml} +162 -162
  64. data/spec/vcr/subscription/{refund-full/1287455769.yml → refund-none/1296674173.yml} +162 -162
  65. data/spec/vcr/subscription/refund-partial/{1287455769.yml → 1296674173.yml} +162 -162
  66. data/spec/vcr/transaction/all/{1289558212.yml → 1296674173.yml} +155 -153
  67. data/spec/vcr/transaction/create-no-account/{1289558212.yml → 1296674173.yml} +37 -35
  68. data/spec/vcr/transaction/create-with-account/{1289558212.yml → 1296674173.yml} +91 -87
  69. data/spec/vcr/transaction/list-filled/{1289558212.yml → 1296674173.yml} +200 -190
  70. data/spec/vcr/transaction/list-initial/{1289558212.yml → 1296674173.yml} +92 -88
  71. data/spec/vcr/transaction/lookup/{1289558212.yml → 1296674173.yml} +241 -227
  72. data/spec/vcr/transaction/refund/{1289558212.yml → 1296674173.yml} +119 -115
  73. data/spec/vcr/transaction/void/1296674173.yml +352 -0
  74. metadata +122 -122
  75. data/spec/config/recurly.yml +0 -4
  76. data/spec/vcr/account/accept-language-account/1294473761.yml +0 -68
  77. data/spec/vcr/account/accept-language/1294473117.yml +0 -167
  78. data/spec/vcr/account/list/1294473761.yml +0 -1597
  79. data/spec/vcr/credit/create/1287461400.yml +0 -174
  80. data/spec/vcr/credit/delete/1287461400.yml +0 -249
  81. data/spec/vcr/credit/list/1287461400.yml +0 -306
  82. data/spec/vcr/credit/lookup/1287461400.yml +0 -174
  83. data/spec/vcr/subscription/addons/add/1292420980.yml +0 -479
  84. data/spec/vcr/subscription/addons/create/1292420980.yml +0 -318
  85. data/spec/vcr/subscription/addons/remove/1292420980.yml +0 -448
  86. data/spec/vcr/transaction/void/1289558212.yml +0 -601
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2009 Recurly, Inc.
3
+ Copyright (c) 2011 Recurly, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -49,13 +49,11 @@ In Rails 2.x, this code should be in config/initializers/recurly.rb
49
49
  In Sinatra, it should be within a `configure` block.
50
50
 
51
51
 
52
- Manual Setup via YAML
52
+ Manual Setup via YAML or JSON
53
53
  --------------
54
-
55
54
  You can also configure Recurly via a YAML file by using:
56
55
 
57
- Recurly.configure_via_yaml("./config/recurly.yml")
58
-
56
+ Recurly.configure_from_yaml("./config/recurly.yml")
59
57
 
60
58
  The Recurly Configuration YAML is in the format of:
61
59
 
@@ -64,6 +62,8 @@ The Recurly Configuration YAML is in the format of:
64
62
  site: https://myrecurlysite.recurly.com
65
63
 
66
64
 
65
+ The same format could be applied in JSON instead of YAML using: Recurly.configure_from_json('path/to/file.json')
66
+
67
67
  Clearing test data (Rails3)
68
68
  ----------------
69
69
 
data/lib/recurly.rb CHANGED
@@ -6,6 +6,7 @@ require 'recurly/version'
6
6
  require 'recurly/formats/xml_with_pagination'
7
7
  require 'recurly/config_parser'
8
8
  require 'recurly/rails3/railtie' if defined?(::Rails::Railtie)
9
+ require 'recurly/base'
9
10
 
10
11
  # load rails2 fixes
11
12
  if defined?(::Rails::VERSION::MAJOR) and ::Rails::VERSION::MAJOR == 2
@@ -15,10 +16,10 @@ end
15
16
  # configuration
16
17
  module Recurly
17
18
 
18
- autoload :RecurlyBase, 'recurly/base'
19
19
  autoload :Account, 'recurly/account'
20
20
  autoload :BillingInfo, 'recurly/billing_info'
21
21
  autoload :Charge, 'recurly/charge'
22
+ autoload :Coupon, 'recurly/coupon'
22
23
  autoload :Credit, 'recurly/credit'
23
24
  autoload :Invoice, 'recurly/invoice'
24
25
  autoload :Plan, 'recurly/plan'
@@ -69,6 +70,12 @@ module Recurly
69
70
  recurly_config = ConfigParser.parse(path)
70
71
 
71
72
  if recurly_config.present?
73
+
74
+ # check for environment specific config
75
+ recurly_env = Rails.env if defined?(Rails) and Rails.respond_to?(:env)
76
+ recurly_env ||= ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
77
+ recurly_config = recurly_config[recurly_env] if recurly_config.has_key?(recurly_env)
78
+
72
79
  c.username = recurly_config["username"]
73
80
  c.password = recurly_config["password"]
74
81
  c.site = recurly_config["site"]
@@ -81,5 +81,10 @@ module Recurly
81
81
  Invoice.lookup(account_code, id)
82
82
  end
83
83
 
84
+ def coupon
85
+ Coupon.find(account_code)
86
+ end
87
+ memoize :coupon
88
+
84
89
  end
85
90
  end
@@ -0,0 +1,5 @@
1
+ module Recurly
2
+ class Coupon < RecurlyAccountBase
3
+ self.element_name = "coupon"
4
+ end
5
+ end
@@ -53,30 +53,15 @@ namespace :recurly do
53
53
  @recurly_config["site"] ||= "https://my-site.recurly.com"
54
54
  end
55
55
 
56
- def setup_interactive
57
- # ask for the username
58
- say "\nStep 1) Go to recurly.com and set up a test account..."
59
- @recurly_config["username"] = ask("Step 2) Enter your recurly username (email):", String)
60
- @recurly_config["password"] = ask("Step 3) Enter your recurly password:", String){ |q| q.echo = "*" }
61
- @recurly_config["site"] = ask("Step 4) Enter your recurly base site url (e.g. https://testrecurly2-test.recurly.com):", String)
62
- end
63
-
64
56
  desc "Creates a recurly.yml config file"
65
57
  task :setup => :environment do
66
58
 
67
59
  # load the recurly.yml file
68
60
  Rake::Task["recurly:load_settings"].invoke
69
61
 
70
- begin
71
- require 'highline/import'
72
- puts "Creating a recurly.yml config file for your project\n"
73
- setup_interactive
74
- puts "\nYour settings were saved in:\n#{Recurly.settings_path}\n"
75
- rescue LoadError
76
- setup_static
77
- puts "Settings file generated at:\n#{Recurly.settings_path}\n"
78
- puts "Edit this file to configure your Recurly settings.\n"
79
- end
62
+ setup_static
63
+ puts "Settings file generated at:\n#{Recurly.settings_path}\n"
64
+ puts "Edit this file to configure your Recurly settings.\n"
80
65
 
81
66
  # saves the yml file
82
67
  Recurly::ConfigParser.save(@recurly_config)
@@ -1,3 +1,3 @@
1
1
  module Recurly #:nodoc
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
File without changes
@@ -0,0 +1,9 @@
1
+ development:
2
+ username: username1@recurly.com
3
+ site: https://site1.recurly.com
4
+ password: asdf4jk31
5
+
6
+ test:
7
+ username: username2@recurly.com
8
+ site: https://site2.recurly.com
9
+ password: asdf4jk32
@@ -219,8 +219,8 @@ module Recurly
219
219
  end
220
220
 
221
221
  it "should require setting an account code" do
222
- @account.errors[:account_code].should include("can't be blank")
223
- @account.errors[:account_code].should include("is invalid")
222
+ @account.errors[:base].should include("account code can't be blank")
223
+ @account.errors[:base].should include("account code is invalid")
224
224
  end
225
225
  end
226
226
 
@@ -237,7 +237,7 @@ module Recurly
237
237
  end
238
238
 
239
239
  it "should require setting an account code" do
240
- @account.errors[:account_code].should include("has already been taken")
240
+ @account.errors[:base].should include("account code has already been taken")
241
241
  end
242
242
  end
243
243
  end
@@ -15,7 +15,7 @@ module Recurly
15
15
  billing_info.zip.should == billing_attributes[:zip]
16
16
 
17
17
  # check the credit card fields
18
- billing_info.credit_card.last_four.should == billing_attributes[:credit_card][:number]
18
+ billing_info.credit_card.last_four.should == billing_attributes[:credit_card][:number][-4, 4]
19
19
  end
20
20
 
21
21
  describe "create an account's billing information" do
@@ -106,13 +106,9 @@ module Recurly
106
106
  it "should allow destroying the billing info for an account" do
107
107
  @billing_info.destroy
108
108
 
109
- fresh = BillingInfo.find(account.account_code)
110
- fresh.first_name.should be_nil
111
- fresh.last_name.should be_nil
112
- fresh.address1.should be_nil
113
- fresh.city.should be_nil
114
- fresh.state.should be_nil
115
- fresh.zip.should be_nil
109
+ expect {
110
+ fresh = BillingInfo.find(account.account_code)
111
+ }.to raise_error ActiveResource::ResourceNotFound
116
112
  end
117
113
  end
118
114
  end
@@ -0,0 +1,49 @@
1
+ require 'spec_helper'
2
+
3
+ module Recurly
4
+ describe Coupon do
5
+ # version accounts based on this current files modification dates
6
+ timestamp = File.mtime(__FILE__).to_i
7
+
8
+ describe "redeem a coupon" do
9
+ use_vcr_cassette "coupon/create/#{timestamp}"
10
+ let(:account){ Factory.create_account("coupon-create-#{timestamp}") }
11
+
12
+ before(:each) do
13
+ @coupon_attributes = {
14
+ :account_code => account.account_code,
15
+ :coupon_code => 'coupon'
16
+ }
17
+ @coupon = Coupon.create(@coupon_attributes)
18
+ end
19
+
20
+ it "should lookup an applied coupon" do
21
+ coupon_lookup = account.coupon
22
+ coupon_lookup.coupon_code.should == @coupon.coupon_code
23
+ end
24
+
25
+ it "should successfully apply the coupon to the account" do
26
+ @coupon.coupon_code.should_not be_nil
27
+ end
28
+ end
29
+
30
+ describe "remove a coupon" do
31
+ use_vcr_cassette "coupon/destroy/#{timestamp}"
32
+ let(:account){ Factory.create_account("coupon-destroy-#{timestamp}") }
33
+
34
+ before(:each) do
35
+ @coupon_attributes = {
36
+ :account_code => account.account_code,
37
+ :coupon_code => 'coupon'
38
+ }
39
+ @coupon = Coupon.create(@coupon_attributes)
40
+ end
41
+
42
+ it "should successfully remove a coupon" do
43
+ @coupon.destroy
44
+
45
+ lambda { Coupon.find(account.account_code) }.should raise_error(ActiveResource::ResourceNotFound)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -83,33 +83,5 @@ module Recurly
83
83
  end
84
84
  end
85
85
 
86
- describe "delete a plan" do
87
- use_vcr_cassette "plan/delete/#{timestamp}"
88
-
89
- let(:plan) do
90
- plan = Plan.new({
91
- :plan_code => "test_#{timestamp}",
92
- :name => "Test Plan #{timestamp}",
93
- :unit_amount_in_cents => 100,
94
- :plan_interval_length => 1,
95
- :plan_interval_unit => "months",
96
- :trial_interval_length => 0,
97
- :trial_interval_unit => "months"
98
- })
99
- plan.save!
100
- plan
101
- end
102
-
103
- it "should delete the plan" do
104
- @plan = Plan.find(plan.plan_code)
105
- @plan.destroy
106
-
107
- expect {
108
- Plan.find(@plan.plan_code)
109
- }.to raise_error(ActiveResource::ResourceNotFound)
110
- end
111
-
112
- end
113
-
114
86
  end
115
87
  end
@@ -60,12 +60,12 @@ module Recurly
60
60
  @transactions = Transaction.list_for_account(account.account_code)
61
61
  end
62
62
 
63
- it "should one transaction after registering" do
63
+ it "should create one transaction after registering" do
64
64
  @transactions.count.should eql(1)
65
65
  end
66
66
 
67
67
  it "should be in void state" do
68
- @transactions.first.status.should == "void"
68
+ @transactions.first.amount_in_cents.should == 0
69
69
  end
70
70
  end
71
71
 
@@ -82,7 +82,7 @@ module Recurly
82
82
  end
83
83
 
84
84
  it "should return a list of transactions made on the account" do
85
- @successful_transactions.length.should == 3
85
+ @successful_transactions.length.should == 4
86
86
  end
87
87
 
88
88
  it "should also be available via Account#transactions" do
data/spec/spec_helper.rb CHANGED
@@ -14,6 +14,12 @@ module SpecHelper
14
14
  # add helper methods here
15
15
  end
16
16
 
17
+ class Rails
18
+ def self.env
19
+ "test"
20
+ end
21
+ end
22
+
17
23
  RSpec.configure do |config|
18
24
  config.include SpecHelper
19
25
 
@@ -51,7 +51,7 @@ module Recurly
51
51
  :zip => '94115',
52
52
  :country => "US",
53
53
  :credit_card => {
54
- :number => '1',
54
+ :number => '4111111111111111',
55
55
  :year => Time.now.year + 1,
56
56
  :month => Time.now.month,
57
57
  :verification_value => '123'
@@ -3,12 +3,19 @@ require 'spec_helper'
3
3
  describe "RecurlyConfig" do
4
4
 
5
5
  context "loading from YML" do
6
- it "should load configuration from a YML file" do
7
- Recurly.configure_from_yaml("#{File.dirname(__FILE__)}/../config/test.yml")
6
+ it "should load traditional configuration from a YML file" do
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
10
  Recurly.site.should == "https://site1.recurly.com"
11
11
  end
12
+
13
+ it "should load configuration from a YML file based on running environment" do
14
+ Recurly.configure_from_yaml("#{File.dirname(__FILE__)}/../config/test2.yml")
15
+ Recurly.username.should == "username2@recurly.com"
16
+ Recurly.password.should == "asdf4jk32"
17
+ Recurly.site.should == "https://site2.recurly.com"
18
+ end
12
19
  end
13
20
 
14
21
  context "loading from json" do
@@ -2,57 +2,59 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
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
- <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>account1-french-1294473653</account-code>
9
+ <account-code>account1-french-1296674173</account-code>
10
+ <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
- <accept-language>fr</accept-language>
13
12
  <email>verena@test.com</email>
14
- <first-name>Verena</first-name>
13
+ <company-name>Recurly Ruby Gem</company-name>
14
+ <accept-language>fr</accept-language>
15
15
  </account>
16
16
 
17
17
  headers:
18
+ authorization:
19
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
20
+ content-type:
21
+ - application/xml
18
22
  accept:
19
23
  - "*/*"
24
+ user-agent:
25
+ - Ruby
20
26
  connection:
21
27
  - close
22
- content-type:
23
- - application/xml
24
- authorization:
25
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
26
28
  response: !ruby/struct:VCR::Response
27
29
  status: !ruby/struct:VCR::ResponseStatus
28
30
  code: 201
29
- message: Created
31
+ message: "Created "
30
32
  headers:
33
+ cache-control:
34
+ - no-cache
31
35
  location:
32
- - https://recurlytest3-test.recurly.com/accounts/account1-french-1294473653
33
- connection:
34
- - close
36
+ - http://litle-test.recurly.local:3000/accounts/account1-french-1296674173
37
+ x-runtime:
38
+ - "583"
35
39
  content-type:
36
40
  - application/xml; charset=utf-8
37
- x-runtime:
38
- - "358"
39
- date:
40
- - Sat, 08 Jan 2011 08:01:01 GMT
41
- server:
42
- - nginx/0.8.53
43
41
  content-length:
44
42
  - "585"
43
+ server:
44
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
+ date:
46
+ - Thu, 03 Feb 2011 22:17:14 GMT
47
+ connection:
48
+ - close
45
49
  set-cookie:
46
- - account_credentials=5efb585021cad50f5041bf437711e958e99e6854065d72cc582483bd506398b356b79593ccb3742f7b88c0d283d71c9d4577d5e1a3ebf419d125a668471d8933%3A%3A; domain=.recurly.com; path=/
50
+ - account_credentials=efc5fa78ea4fc57bad02b327f1cb8935698f5378749dcf787532fefdf181210f399cf370898720389cdc4b30d7ce50c251fa1bdb911e4eb77395624ce6f39ba7%3A%3A; domain=.recurly.local; path=/
47
51
  - ""
48
- - _recurly_session=f3db85de64b4022a045ffb442afc32ea; domain=.recurly.com; path=/; secure; HttpOnly
49
- cache-control:
50
- - no-cache
52
+ - _recurly_session=d8966c6817ac71fc093284ed2ef96a91; domain=.recurly.local; path=/; HttpOnly
51
53
  body: |
52
54
  <?xml version="1.0" encoding="UTF-8"?>
53
55
  <account>
54
- <id>account1-french-1294473653</id>
55
- <account_code>account1-french-1294473653</account_code>
56
+ <id>account1-french-1296674173</id>
57
+ <account_code>account1-french-1296674173</account_code>
56
58
  <username></username>
57
59
  <email>verena@test.com</email>
58
60
  <first_name>Verena</first_name>
@@ -60,8 +62,8 @@
60
62
  <company_name>Recurly Ruby Gem</company_name>
61
63
  <balance_in_cents type="integer">0</balance_in_cents>
62
64
  <closed type="boolean">false</closed>
63
- <hosted_login_token>eeae5cb20fcd4b059f4e33d0dfe94cab</hosted_login_token>
64
- <created_at type="datetime">2011-01-08T08:01:01Z</created_at>
65
+ <hosted_login_token>a88be6968cb348ceb8d7503aebdaa483</hosted_login_token>
66
+ <created_at type="datetime">2011-02-03T22:17:14Z</created_at>
65
67
  <state>active</state>
66
68
  </account>
67
69
 
@@ -2,57 +2,59 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
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
- <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>account-close-1294473761</account-code>
9
+ <account-code>account-close-1296674173</account-code>
10
+ <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
- <accept-language type="yaml" nil="true"></accept-language>
13
12
  <email>verena@test.com</email>
14
- <first-name>Verena</first-name>
13
+ <company-name>Recurly Ruby Gem</company-name>
14
+ <accept-language type="yaml" nil="true"></accept-language>
15
15
  </account>
16
16
 
17
17
  headers:
18
+ authorization:
19
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
20
+ content-type:
21
+ - application/xml
18
22
  accept:
19
23
  - "*/*"
24
+ user-agent:
25
+ - Ruby
20
26
  connection:
21
27
  - close
22
- content-type:
23
- - application/xml
24
- authorization:
25
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
26
28
  response: !ruby/struct:VCR::Response
27
29
  status: !ruby/struct:VCR::ResponseStatus
28
30
  code: 201
29
- message: Created
31
+ message: "Created "
30
32
  headers:
33
+ cache-control:
34
+ - no-cache
31
35
  location:
32
- - https://recurlytest3-test.recurly.com/accounts/account-close-1294473761
33
- connection:
34
- - close
36
+ - http://litle-test.recurly.local:3000/accounts/account-close-1296674173
37
+ x-runtime:
38
+ - "549"
35
39
  content-type:
36
40
  - application/xml; charset=utf-8
37
- x-runtime:
38
- - "351"
39
- date:
40
- - Sat, 08 Jan 2011 08:03:21 GMT
41
- server:
42
- - nginx/0.8.53
43
41
  content-length:
44
42
  - "581"
43
+ server:
44
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
+ date:
46
+ - Thu, 03 Feb 2011 22:17:02 GMT
47
+ connection:
48
+ - close
45
49
  set-cookie:
46
- - account_credentials=48b11df9d000407372bf439d15c0bb6a9f270783b3e93e44bfccc9ea96259ea740f6409917bf0dfe9ba7bf684f8b7d360632957ed6876ee01f82e853a8919cfa%3A%3A; domain=.recurly.com; path=/
50
+ - account_credentials=1b6b26473ff7d8493d62462e15141df13d06979db5d284e1698a94c5b0c126c9bbb539b3b5045cfbd10f8bd30c3db173cc163a017b00c9597786a91eb9ab2a32%3A%3A; domain=.recurly.local; path=/
47
51
  - ""
48
- - _recurly_session=bc4b1f4da2a7a6207f0c0252cd7c9180; domain=.recurly.com; path=/; secure; HttpOnly
49
- cache-control:
50
- - no-cache
52
+ - _recurly_session=d431edb8ee4e7cedb0b2bffd6b1b432b; domain=.recurly.local; path=/; HttpOnly
51
53
  body: |
52
54
  <?xml version="1.0" encoding="UTF-8"?>
53
55
  <account>
54
- <id>account-close-1294473761</id>
55
- <account_code>account-close-1294473761</account_code>
56
+ <id>account-close-1296674173</id>
57
+ <account_code>account-close-1296674173</account_code>
56
58
  <username></username>
57
59
  <email>verena@test.com</email>
58
60
  <first_name>Verena</first_name>
@@ -60,8 +62,8 @@
60
62
  <company_name>Recurly Ruby Gem</company_name>
61
63
  <balance_in_cents type="integer">0</balance_in_cents>
62
64
  <closed type="boolean">false</closed>
63
- <hosted_login_token>6f6e4b24cbe24477af25fbe9d15bfa57</hosted_login_token>
64
- <created_at type="datetime">2011-01-08T08:03:21Z</created_at>
65
+ <hosted_login_token>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
66
+ <created_at type="datetime">2011-02-03T22:17:01Z</created_at>
65
67
  <state>active</state>
66
68
  </account>
67
69
 
@@ -69,82 +71,84 @@
69
71
  - !ruby/struct:VCR::HTTPInteraction
70
72
  request: !ruby/struct:VCR::Request
71
73
  method: :delete
72
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1294473761.xml
74
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
73
75
  body:
74
76
  headers:
77
+ authorization:
78
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
75
79
  accept:
76
80
  - application/xml
81
+ user-agent:
82
+ - Ruby
77
83
  connection:
78
84
  - close
79
- authorization:
80
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
81
85
  response: !ruby/struct:VCR::Response
82
86
  status: !ruby/struct:VCR::ResponseStatus
83
87
  code: 200
84
- message: OK
88
+ message: "OK "
85
89
  headers:
86
- x-ua-compatible:
87
- - IE=Edge
88
- connection:
89
- - close
90
+ cache-control:
91
+ - no-cache
92
+ x-runtime:
93
+ - "356"
90
94
  content-type:
91
95
  - application/xml; charset=utf-8
92
- x-runtime:
93
- - "40"
94
- date:
95
- - Sat, 08 Jan 2011 08:03:22 GMT
96
- server:
97
- - nginx/0.8.53
98
96
  content-length:
99
97
  - "1"
98
+ server:
99
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
100
+ date:
101
+ - Thu, 03 Feb 2011 22:17:04 GMT
102
+ connection:
103
+ - close
100
104
  set-cookie:
101
- - _recurly_session=1df9f4455a0e476facb3ac0c1f1929b2; domain=.recurly.com; path=/; secure; HttpOnly
102
- cache-control:
103
- - no-cache
105
+ - _recurly_session=87d11d401895ced9897e0024de5403f4; domain=.recurly.local; path=/; HttpOnly
104
106
  body: " "
105
107
  http_version: "1.1"
106
108
  - !ruby/struct:VCR::HTTPInteraction
107
109
  request: !ruby/struct:VCR::Request
108
110
  method: :get
109
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1294473761.xml
111
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/account-close-1296674173.xml
110
112
  body:
111
113
  headers:
114
+ authorization:
115
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
112
116
  accept:
113
117
  - application/xml
118
+ accept-encoding:
119
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
120
+ user-agent:
121
+ - Ruby
114
122
  connection:
115
123
  - close
116
- authorization:
117
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
118
124
  response: !ruby/struct:VCR::Response
119
125
  status: !ruby/struct:VCR::ResponseStatus
120
126
  code: 200
121
- message: OK
127
+ message: "OK "
122
128
  headers:
123
- x-ua-compatible:
124
- - IE=Edge
125
- etag:
126
- - "\"f4e2aa63ff4e056f9c7f3a899778edd0\""
127
- connection:
128
- - close
129
+ x-runtime:
130
+ - "184"
129
131
  content-type:
130
132
  - application/xml; charset=utf-8
131
- x-runtime:
132
- - "29"
133
- date:
134
- - Sat, 08 Jan 2011 08:03:23 GMT
135
- server:
136
- - nginx/0.8.53
133
+ etag:
134
+ - "\"0d31c946c075a2c560335a916d4b359f\""
135
+ cache-control:
136
+ - private, max-age=0, must-revalidate
137
137
  content-length:
138
138
  - "580"
139
+ server:
140
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
141
+ date:
142
+ - Thu, 03 Feb 2011 22:17:05 GMT
143
+ connection:
144
+ - close
139
145
  set-cookie:
140
- - _recurly_session=9c6a0603039991d3d326372fff7ec378; domain=.recurly.com; path=/; secure; HttpOnly
141
- cache-control:
142
- - private, max-age=0, must-revalidate
146
+ - _recurly_session=22d04ea39adc6f1d7a86140c413f6326; domain=.recurly.local; path=/; HttpOnly
143
147
  body: |
144
148
  <?xml version="1.0" encoding="UTF-8"?>
145
149
  <account>
146
- <id>account-close-1294473761</id>
147
- <account_code>account-close-1294473761</account_code>
150
+ <id>account-close-1296674173</id>
151
+ <account_code>account-close-1296674173</account_code>
148
152
  <username></username>
149
153
  <email>verena@test.com</email>
150
154
  <first_name>Verena</first_name>
@@ -152,8 +156,8 @@
152
156
  <company_name>Recurly Ruby Gem</company_name>
153
157
  <balance_in_cents type="integer">0</balance_in_cents>
154
158
  <closed type="boolean">true</closed>
155
- <hosted_login_token>6f6e4b24cbe24477af25fbe9d15bfa57</hosted_login_token>
156
- <created_at type="datetime">2011-01-08T08:03:21Z</created_at>
159
+ <hosted_login_token>5fd1762fb57f4d9b80fbbddad074fd3f</hosted_login_token>
160
+ <created_at type="datetime">2011-02-03T22:17:01Z</created_at>
157
161
  <state>closed</state>
158
162
  </account>
159
163