Sha256: 4a2e3bc61c2cc6a400720d542dca388712dbc21cea98e44701ee708e47e3a2f2

Contents?: true

Size: 503 Bytes

Versions: 57

Compression:

Stored size: 503 Bytes

Contents

# This is an object for the stripe charge form
module Effective::Providers
  class StripeCharge
    include ActiveModel::Model

    attr_accessor :effective_order_id, :order, :stripe_token # For our form

    validates :effective_order_id, presence: true
    validates :stripe_token, presence: true

    def persisted?
      false
    end

    def effective_order_id
      @effective_order_id || (order.to_param if order)
    end

    def order_items
      order.order_items if order
    end

  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
effective_orders-3.1.0 app/models/effective/providers/stripe_charge.rb
effective_orders-3.0.4 app/models/effective/providers/stripe_charge.rb
effective_orders-3.0.3 app/models/effective/providers/stripe_charge.rb
effective_orders-3.0.2 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.4 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.3 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.2 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.1 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.0 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.6 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.5 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.4 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.3 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.2 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.1 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.0 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.0beta19 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.0beta18 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.0beta17 app/models/effective/providers/stripe_charge.rb
effective_orders-4.0.0beta16 app/models/effective/providers/stripe_charge.rb