Sha256: 8cc0d24603eea9c017f25abfa89e0940575e51be8413055657059848e042e606

Contents?: true

Size: 571 Bytes

Versions: 4

Compression:

Stored size: 571 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class EShopInfo
      include BaseParser

      def e_shop_id
        at 'eShopID'
      end

      def e_shop_name
        at 'eShopName'
      end

      def e_sale_id
        at 'eSaleID'
      end

      def to_h_with_attrs
        hash = HashWithAttributes.new({}, attributes)

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

        hash
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-0.9.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-0.8.0 lib/money_s3/parsers/e_shop_info.rb
money_s3-0.7.0 lib/money_s3/parsers/e_shop_info.rb