Class: ShipHero::Services::ShipmentService
- Inherits:
-
BaseService
- Object
- BaseService
- ShipHero::Services::ShipmentService
- Defined in:
- lib/ship_hero/services/shipment_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
- #create_shipment(shipment) ⇒ Object
- #get_shipments(request = ShipHero::Requests::GetShipment.new) ⇒ Object
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from ShipHero::Services::BaseService
Instance Method Details
#create_shipment(shipment) ⇒ Object
15 16 17 18 |
# File 'lib/ship_hero/services/shipment_service.rb', line 15 def create_shipment(shipment) raise Exceptions::ServiceException, "Must be a ShipHero::Shipment" unless shipment.is_a?(ShipHero::Shipment) post(Util::Config.get('endpoints.create_shipment'), shipment) end |
#get_shipments(request = ShipHero::Requests::GetShipment.new) ⇒ Object
10 11 12 13 |
# File 'lib/ship_hero/services/shipment_service.rb', line 10 def get_shipments(request = ShipHero::Requests::GetShipment.new) raise Exceptions::ServiceException, "Must be a ShipHero::Requests::GetShipment" unless request.is_a?(ShipHero::Requests::GetShipment) get(Util::Config.get('endpoints.get_shipments'), request) end |