Sha256: 7f13dcfcf1462373023ae682810f3443964d2f7bb8086083e62a0e7b08b66fa0

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

module NovaPoshta
  module Response
    class Warehouse < ::NovaPoshta::Response::Base

      attr_accessor :description, :description_ru, :phone, :type_of_warehouse, :ref, :number, :city_ref,
                    :max_weight_allowed, :longitude, :latitude, :reception, :delivery, :schedule,
                    :site_key, :city_description, :city_description_ru, :post_finance, :pos_terminal,
                    :total_max_weight_allowed, :place_max_weight_allowed

      # ugly API do not provide searching by city reference
      def city(params={})
        address.cities(params).select { |city| city.ref == self.city_ref }.first.result
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nova_poshta-0.3.0 lib/nova_poshta/response/warehouse.rb