Sha256: bf3dd024f6ac34cf9a1b8202568adf8bda4b69c600ebe647ffdba862a531d0de

Contents?: true

Size: 415 Bytes

Versions: 6

Compression:

Stored size: 415 Bytes

Contents

module Xdelivery
  module API
    module Response
      class Shops < Base

        Shop = Struct.new(:id, :title, :pay2go_merchant_id, :default_shop)

        def status?
          auth?
        end

        def shops
          data.map do |setting|
            Shop.new(setting['id'], setting['title'], setting['pay2go_merchant_id'], setting['default_shop'])
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xdelivery-2.0.3 lib/xdelivery/api/response/shops.rb
xdelivery-2.0.1 lib/xdelivery/api/response/shops.rb
xdelivery-2.0.0 lib/xdelivery/api/response/shops.rb
xdelivery-1.0.2 lib/xdelivery/api/response/shops.rb
xdelivery-1.0.1 lib/xdelivery/api/response/shops.rb
xdelivery-1.0.0 lib/xdelivery/api/response/shops.rb