Sha256: 7703a3ecbc9b38a008f29cd5a07b74fa9e1f9cf4670da69722479474683c8f02

Contents?: true

Size: 974 Bytes

Versions: 5

Compression:

Stored size: 974 Bytes

Contents

module Unforlogistics
  module Core
    module ShipmentDrivers
      def get_shipment_drivers(filters={})
        response = get_request('/shipment_drivers', filters)

        get_paging_response(response)
      end

      def get_shipment_driver(id)
        get_request("/shipment_drivers/#{id}").body
      end

      def create_shipment_driver(attrs={})
        response = post_request('/shipment_drivers', attrs)

        get_persistance_response(response)
      end

      def update_shipment_driver(id, attrs={})
        response = put_request("/shipment_drivers/#{id}", attrs)

        get_persistance_response(response)
      end

      def enable_shipment_driver(id)
        response = put_request("/shipment_drivers/#{id}/enabled")

        get_persistance_response(response)
      end

      def disable_shipment_driver(id)
        response = put_request("/shipment_drivers/#{id}/disabled")

        get_persistance_response(response)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
unforlogistics-api-0.13 lib/unforlogistics/core/shipment_drivers.rb
unforlogistics-api-0.12 lib/unforlogistics/core/shipment_drivers.rb
unforlogistics-api-0.11 lib/unforlogistics/core/shipment_drivers.rb
unforlogistics-api-0.10 lib/unforlogistics/core/shipment_drivers.rb
unforlogistics-api-0.9 lib/unforlogistics/core/shipment_drivers.rb