Sha256: c6204199e75287da6b502bb03174ecb582d93f0a52057965dd1bf52e4d93efe9

Contents?: true

Size: 616 Bytes

Versions: 4

Compression:

Stored size: 616 Bytes

Contents

require 'money_s3/base_element'
require 'money_s3/faktura_type'

module MoneyS3
  class MoneyData
    include BaseElement

    def seznam_fakt_vyd
      elements = raw.dig(:SeznamFaktVyd, :FaktVyd) || []
      if elements.is_a? Hash
        elements = [elements]
      end

      elements.map do |raw|
        MoneyS3::FakturaType.new(raw)
      end
    end

    def seznam_fakt_vyd_dpp
      elements = raw.dig(:SeznamFaktVyd_DPP, :FaktVyd_DPP) || []
      if elements.is_a? Hash
        elements = [elements]
      end

      elements.map do |raw|
        MoneyS3::FakturaType.new(raw)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.3.0 lib/money_s3/money_data.rb
money_s3-0.2.0 lib/money_s3/money_data.rb
money_s3-0.1.8 lib/money_s3/money_data.rb
money_s3-0.1.7 lib/money_s3/money_data.rb