Sha256: 5e4e592acc99685b80d2258a046c839aa4595ff86096308b693ac878ff71152a

Contents?: true

Size: 998 Bytes

Versions: 7

Compression:

Stored size: 998 Bytes

Contents

module MoneyS3
  module Parsers
    class EShopInfo
      include ParserCore::BaseParser

      def e_shop_id
        at 'eShopID'
      end

      def e_shop_id_attributes
        attributes_at 'eShopID'
      end

      def e_shop_name
        at 'eShopName'
      end

      def e_shop_name_attributes
        attributes_at 'eShopName'
      end

      def e_sale_id
        at 'eSaleID'
      end

      def e_sale_id_attributes
        attributes_at 'eSaleID'
      end

      def to_h
        hash = {}
        hash[:attributes] = attributes

        hash[:e_shop_id] = e_shop_id if has? 'eShopID'
        hash[:e_shop_id_attributes] = e_shop_id_attributes if has? 'eShopID'
        hash[:e_shop_name] = e_shop_name if has? 'eShopName'
        hash[:e_shop_name_attributes] = e_shop_name_attributes if has? 'eShopName'
        hash[:e_sale_id] = e_sale_id if has? 'eSaleID'
        hash[:e_sale_id_attributes] = e_sale_id_attributes if has? 'eSaleID'

        hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/e_shop_info.rb
money_s3-2.4.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-2.3.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-2.2.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-2.1.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-2.0.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-1.0.0 lib/money_s3/parsers/e_shop_info.rb