Sha256: 0307ffe8ac31a713e5a4c9834470238de7a2bb7864ab7dc46aa9aad5e6f95f0a

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

module Returnly
  module Refund
    class AmountCalculator
      attr_accessor :refund

      def initialize(refund)
        self.refund = refund
      end

      def return_item_refund_amount(return_item)
        default_amount(return_item)
      end

      protected
      def default_amount(return_item)
        refund.refund_amount_per_item -
            Money.from_amount(return_item.total - return_item.pre_tax_amount)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
solidus-returnly-0.6.1 lib/returnly/refund/amount_calculator.rb
solidus-returnly-0.6.0 lib/returnly/refund/amount_calculator.rb
solidus-returnly-0.5.1 lib/returnly/refund/amount_calculator.rb
solidus-returnly-0.5.0 lib/returnly/refund/amount_calculator.rb
solidus-returnly-0.5.0.rc1 lib/returnly/refund/amount_calculator.rb
solidus-returnly-0.5.0.pre lib/returnly/refund/amount_calculator.rb