Sha256: 23373780adbf03953bab21c5d87c78ec75899f11d4110ee815acb9529a58f39a

Contents?: true

Size: 1.26 KB

Versions: 22

Compression:

Stored size: 1.26 KB

Contents

# FIXME it's possible I got currency for some fields wrong.
class Gillbus
  class Commission

    extend Fields
    include UpdateAttrs

    # Collecting type
    field :type

    # Symbolic collecting code
    field :code

    # Collecting description
    field :description

    # Value of collecting in sale currency
    field :value, :money

    # Value of collecting VAT in sale currency
    field :vat, :money

    # Collecting currency
    field :currency

    # Exchange rate of collecting to sale currency
    field :rate

    # Value of collecting in currency in which it is brought
    field :value_in_currency, :money

    # Value of collecting VAT in currency in which it is brought
    field :vat_in_currency, :money

    # The return amount from collecting in sale currency (w/o VAT)
    field :return_value, :money

    # The return amount from collecting VAT in sale currency
    field :return_vat, :money

    # The return amount from collecting in currency in which it is brought  (w/o VAT)
    field :return_value_in_currency, :money

    # The return amount from collecting VAT in currency in which it is brought.
    field :return_vat_in_currency, :money

    parser do
      def money(val)
        Monetize.parse(val, doc['CURRENCY'])
      end
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
gillbus-0.15.5 lib/gillbus/structs/commission.rb
gillbus-0.15.4 lib/gillbus/structs/commission.rb
gillbus-0.15.3 lib/gillbus/structs/commission.rb
gillbus-0.15.2 lib/gillbus/structs/commission.rb
gillbus-0.15.1 lib/gillbus/structs/commission.rb
gillbus-0.15.0 lib/gillbus/structs/commission.rb
gillbus-0.14.12 lib/gillbus/structs/commission.rb
gillbus-0.14.11 lib/gillbus/structs/commission.rb
gillbus-0.14.10 lib/gillbus/structs/commission.rb
gillbus-0.14.9 lib/gillbus/structs/commission.rb
gillbus-0.14.8 lib/gillbus/structs/commission.rb
gillbus-0.14.7 lib/gillbus/structs/commission.rb
gillbus-0.14.6 lib/gillbus/structs/commission.rb
gillbus-0.14.5 lib/gillbus/structs/commission.rb
gillbus-0.14.4 lib/gillbus/structs/commission.rb
gillbus-0.14.3 lib/gillbus/structs/commission.rb
gillbus-0.14.2 lib/gillbus/structs/commission.rb
gillbus-0.14.1 lib/gillbus/structs/commission.rb
gillbus-0.14.0 lib/gillbus/structs/commission.rb
gillbus-0.13.0 lib/gillbus/structs/commission.rb