--- - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :post uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml body: | subscription-addons-remove-1297746103 Verena Test verena@test.com Recurly Ruby Gem headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== content-type: - application/xml accept: - "*/*" user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 201 message: Created headers: cache-control: - no-cache location: - http://app.recurly.local:3000/accounts/subscription-addons-remove-1297746103 x-runtime: - "340" content-type: - application/xml; charset=utf-8 content-length: - "607" set-cookie: - _recurly_session=a8d47b82e12e9707986c9cffe3a3ad1f; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | subscription-addons-remove-1297746103 subscription-addons-remove-1297746103 verena@test.com Verena Test Recurly Ruby Gem 0 false d79a716084764737a1b1c6c677c94de8 2011-03-18T18:47:50Z active http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/paid.xml body: headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== accept: - application/xml accept-encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-runtime: - "286" content-type: - application/xml; charset=utf-8 etag: - "\"dc04fba13f15d49d04ca6692abb21ff9\"" cache-control: - private, max-age=0, must-revalidate content-length: - "1146" set-cookie: - _recurly_session=91967423955c434df3934d138e95ff6c; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | paid Paid 2011-02-02T21:02:59Z 1000 0 1 days 0 months 1 1000 0 1 days 0 months 2011-02-21T01:06:56Z http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :post uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-addons-remove-1297746103/subscription.xml body: | paid 1 subscription-addons-remove-1297746103 Verena Test verena@test.com Recurly Ruby Gem Verena Test 123 Test St San Francisco CA 94115 US 4111111111111111 2012 3 123 subscription-addons-remove-1297746103 0 false d79a716084764737a1b1c6c677c94de8 2011-03-18T18:47:50Z active special 1 1000 headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== content-type: - application/xml accept: - "*/*" user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 500 message: Internal Server Error headers: cache-control: - no-cache content-type: - text/html; charset=utf-8 content-length: - "19297" set-cookie: - _recurly_session=b0c1610b7ff3bf3905e575368148cdb0; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | Action Controller: Exception caught

NoMethodError in Accounts/subscriptionController#create

You have a nil object when you didn't expect it!
      You might have expected an instance of Array.
      The error occurred while evaluating nil.slice

RAILS_ROOT: /Users/isaac/Development/recurly/app

Application Trace | Framework Trace | Full Trace
/Users/isaac/Development/recurly/app/app/api/subscription_api.rb:23:in `block in sanitize_params'
      /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `collect'
      /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `sanitize_params'
      /Users/isaac/Development/recurly/app/app/controllers/accounts/subscription_controller.rb:250:in `init_account_and_billing_info'

Request

Parameters:

{"subscription"=>{"plan_code"=>"paid",
       "quantity"=>1,
       "account"=>{"account_code"=>"subscription-addons-remove-1297746103",
       "first_name"=>"Verena",
       "last_name"=>"Test",
       "email"=>"verena@test.com",
       "company_name"=>"Recurly Ruby Gem",
       "billing_info"=>{"first_name"=>"Verena",
       "last_name"=>"Test",
       "address1"=>"123 Test St",
       "city"=>"San Francisco",
       "state"=>"CA",
       "zip"=>"94115",
       "country"=>"US",
       "credit_card"=>{"number"=>"4111111111111111",
       "year"=>2012,
       "month"=>3,
       "verification_value"=>"123"}},
       "accept_language"=>nil,
       "id"=>"subscription-addons-remove-1297746103",
       "username"=>nil,
       "balance_in_cents"=>0,
       "closed"=>false,
       "hosted_login_token"=>"d79a716084764737a1b1c6c677c94de8",
       "created_at"=>2011-03-18 18:47:50 UTC,
       "state"=>"active"},
       "add_ons"=>[{"add_on_code"=>"special",
       "quantity"=>1,
       "unit_amount"=>1000}],
       "addons"=>[]},
       "account_id"=>"subscription-addons-remove-1297746103",
       "format"=>"xml"}

Show session dump

Response

Headers:

{"Cache-Control"=>"no-cache",
       "Content-Type"=>""}

http_version: "1.1"