class Snap::Api::Shipments
Interact with Snapfulfil's shipments endpoint.
Public Class Methods
create(options)
click to toggle source
# File lib/snap/api/shipments.rb, line 16 def self.create(options) shipment = Snap::Shipment.new(options) client.post('/shipments', body: shipment.to_json) end
destroy(id:)
click to toggle source
# File lib/snap/api/shipments.rb, line 12 def self.destroy(id:) client.delete("/shipments/#{id}") end
find(id:)
click to toggle source
# File lib/snap/api/shipments.rb, line 8 def self.find(id:) client.get("/shipments/#{id}") end
model()
click to toggle source
# File lib/snap/api/shipments.rb, line 29 def self.model Snap::Shipment end
update(options)
click to toggle source
# File lib/snap/api/shipments.rb, line 21 def self.update(options) shipment = Snap::Shipment.new(options) client.put( "/shipments/#{shipment.ShipmentId}", body: shipment.to_json ) end