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.2.3 app/models/effective/providers/stripe_charge.rb
effective_orders-3.2.2 app/models/effective/providers/stripe_charge.rb
effective_orders-3.2.1 app/models/effective/providers/stripe_charge.rb
effective_orders-4.3.2 app/models/effective/providers/stripe_charge.rb
effective_orders-4.3.1 app/models/effective/providers/stripe_charge.rb
effective_orders-3.2.0 app/models/effective/providers/stripe_charge.rb
effective_orders-4.3.0 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.7 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.6 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.5 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.4 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.3 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.2 app/models/effective/providers/stripe_charge.rb
effective_orders-3.1.7 app/models/effective/providers/stripe_charge.rb
effective_orders-3.1.6 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.1 app/models/effective/providers/stripe_charge.rb
effective_orders-4.2.0 app/models/effective/providers/stripe_charge.rb
effective_orders-3.1.4 app/models/effective/providers/stripe_charge.rb
effective_orders-4.1.5 app/models/effective/providers/stripe_charge.rb
effective_orders-3.1.3 app/models/effective/providers/stripe_charge.rb