Module: Shiphawk::Api::Shipments

Included in:
Client
Defined in:
lib/shiphawk/api/shipments.rb

Overview

Shipments API

The following API actions provide the CRUD interface to managing Shipments.

Instance Method Summary collapse

Instance Method Details

#shipments_bol(shipment_id) ⇒ Object



20
21
22
# File 'lib/shiphawk/api/shipments.rb', line 20

def shipments_bol shipment_id
  get_request shipments_path("#{shipment_id}/bol"), {}
end

#shipments_bol_pdf(shipment_id) ⇒ Object



24
25
26
# File 'lib/shiphawk/api/shipments.rb', line 24

def shipments_bol_pdf shipment_id
  get_request shipments_path("#{shipment_id}/bol.pdf"), {}
end

#shipments_create(options) ⇒ Object



28
29
30
# File 'lib/shiphawk/api/shipments.rb', line 28

def shipments_create options
  post_request shipments_path, options
end

#shipments_destroy(shipment_id) ⇒ Object



36
37
38
# File 'lib/shiphawk/api/shipments.rb', line 36

def shipments_destroy shipment_id
  delete_request shipments_path(shipment_id), {}
end

#shipments_indexObject



12
13
14
# File 'lib/shiphawk/api/shipments.rb', line 12

def shipments_index
  collection_request shipments_path, 500
end

#shipments_show(shipment_id) ⇒ Object



16
17
18
# File 'lib/shiphawk/api/shipments.rb', line 16

def shipments_show shipment_id
  entity_request_with_id shipments_path, shipment_id
end

#shipments_update(shipment_id, options) ⇒ Object



32
33
34
# File 'lib/shiphawk/api/shipments.rb', line 32

def shipments_update shipment_id, options
  put_request shipments_path(shipment_id), options
end