title: RoR cannot retrieve Stripe charge.id upon successful charge
body: <p>I am successfully charging a card with Stripe gem and the (mostly) boilerplate Stripe code (below). Upon successful charge, I am attempting to retrieve the charge ID so that I can inject it into a form and save it for later but am running into an error:</p>
  
  <pre><code>ActionView::Template::Error (undefined method `id' for #&lt;Charge:0x000001065ab458&gt;):
  </code></pre>
  
  <p>Which seems strange. Upon inspection of the charge object returned from my controller (and ostensibly the Stripe gem), there does not appear to be an 'id', just the token, amount and an empty errors array.</p>
  
  <p>Any thoughts out there?</p>
  
  <p>CONTROLLER CODE</p>
  
  <pre><code>class ChargesController &lt; ApplicationController
  
    respond_to :js
  
    def create
      @charge = Charge.create(charge_params)
      respond_with(@charge)
    end
  
    private
  
    def charge_params
      params.require(:charge).permit(:stripeToken, :id)
    end
  end
  </code></pre>
  
  <p>===============================</p>
  
  <p>MODEL CODE</p>
  
  <pre><code>require 'active_model'
  
  class Charge
    include ActiveModel::Model
    include CurrentCart
  
    class &lt;&lt; self
      def create(params)
        new(params).tap(&amp;:save)
      end
    end
  
    attr_reader :amount, :token, :id, :line_items_list
  
    def initialize(params)
      @amount = params[:amount].to_i
      @token = params[:stripeToken]
      Stripe.api_key = "sk_test_srlCaebNKtVDT7OPZIIb5jxV"
  
    end
  
    def save
      begin
        stripe_charge = Stripe::Charge.create(
          :amount =&gt; amount,
          :currency =&gt; "usd",
          :card =&gt; token,
          :description =&gt; 'Ties for all!'
        )
  
      rescue Stripe::CardError =&gt; e
        errors.add(:base, e.message)
      rescue =&gt; e
        errors.add(:base, "An error occurred with the payment processing: #{e.inspect}")
      end
  
      errors.empty?
    end
  </code></pre>
  
  <p>=============</p>