Sha256: 2528bfd782762da870a6d9d14534dd3038377d747b8e366085c42d830c11f37e

Contents?: true

Size: 347 Bytes

Versions: 25

Compression:

Stored size: 347 Bytes

Contents

Spree::Order.class_eval do
  has_many :payment_notifications
  
  def shipment_cost
    adjustment_total - credit_total
  end
  
  def payable_via_pag_seguro?
    # !!self.class.pag_seguro_payment_method
    true
  end
  
  def self.pag_seguro_payment_method
    Spree::PaymentMethod.select{ |pm| pm.name.downcase =~ /pag_seguro/}.first
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
spree_pag_seguro-1.0.0.beta25 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta24 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta23 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta22 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta21 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta20 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta19 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta18 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta17 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta16 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta15 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta14 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta13 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta12 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta11 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta10 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta9 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta8 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta7 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.beta6 app/models/spree/order_decorator.rb