Class: SimpleShipping::Ups::ShipClient
- Inherits:
-
Client
- Object
- Abstract::Client
- Client
- SimpleShipping::Ups::ShipClient
- Defined in:
- lib/simple_shipping/ups/ship_client.rb
Overview
Required credentials:
-
username
-
password
-
access_license_number
Usage
client = SimpleShipping::Ups::ShipClient.new(:username => "USER NAME",
:password => "PASSWORD",
:access_license_number => "LICENSE NUMBER")
client.request(shipper, recipient, package) # => #<SimpleShipping::Ups::Response ...>
Instance Method Summary collapse
-
#ship_accept_request(shipment_digest, options = {}) ⇒ Object
Perform shipping accept request.
-
#ship_confirm_request(shipper, recipient, package, options = {}) ⇒ Object
Send shipment confirmation request.
- #shipment_request(shipper, recipient, package, options = {}) ⇒ ::SimpleShipping::ShipmentResponse
Methods inherited from Abstract::Client
#initialize, set_production_address, set_required_credentials, set_testing_address, set_wsdl_document
Constructor Details
This class inherits a constructor from SimpleShipping::Abstract::Client
Instance Method Details
#ship_accept_request(shipment_digest, options = {}) ⇒ Object
Perform shipping accept request.
42 43 44 45 |
# File 'lib/simple_shipping/ups/ship_client.rb', line 42 def ship_accept_request(shipment_digest, = {}) request = ShipAcceptRequest.new(@credentials, shipment_digest, ) execute(request) end |
#ship_confirm_request(shipper, recipient, package, options = {}) ⇒ Object
Send shipment confirmation request.
34 35 36 37 38 |
# File 'lib/simple_shipping/ups/ship_client.rb', line 34 def ship_confirm_request(shipper, recipient, package, = {}) shipment = create_shipment(shipper, recipient, package, ) request = ShipConfirmRequest.new(@credentials, shipment, ) execute(request) end |
#shipment_request(shipper, recipient, package, options = {}) ⇒ ::SimpleShipping::ShipmentResponse
27 28 29 30 31 |
# File 'lib/simple_shipping/ups/ship_client.rb', line 27 def shipment_request(shipper, recipient, package, = {}) shipment = create_shipment(shipper, recipient, package, ) request = ShipmentRequest.new(@credentials, shipment, ) execute(request) end |