Sha256: 64233a18f5d1cdaa63f14169d3542fc24a9cd0d2c94d162fd8a8eab19773cc98

Contents?: true

Size: 298 Bytes

Versions: 7

Compression:

Stored size: 298 Bytes

Contents

module Moysklad::Entities
  class Price < Base
    include HappyMapper
    include Moysklad::Entities::XmlFix

    def self.from_money money
      p = new
      p.sumInCurrency = p.sum = money.cents
      p
    end

    attribute :sumInCurrency, Float
    attribute :sum,           Float
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
moysklad-0.2.1 lib/moysklad/entities/price.rb
moysklad-0.2.0 lib/moysklad/entities/price.rb
moysklad-0.1.5 lib/moysklad/entities/price.rb
moysklad-0.1.4 lib/moysklad/entities/price.rb
moysklad-0.1.3 lib/moysklad/entities/price.rb
moysklad-0.1.2 lib/moysklad/entities/price.rb
moysklad-0.1.1 lib/moysklad/entities/price.rb