Class: SimpleShipping::Ups::ShipConfirmRequest
- Inherits:
-
Request
- Object
- Abstract::Request
- Request
- SimpleShipping::Ups::ShipConfirmRequest
- Defined in:
- lib/simple_shipping/ups/ship_confirm_request.rb
Overview
Request to verify a shipment was delivered.
Constant Summary
Constants inherited from Request
Instance Attribute Summary
Attributes inherited from Abstract::Request
Instance Method Summary collapse
-
#body ⇒ Object
Builds a request from shipment object.
-
#initialize(credentials, shipment, options = {}) ⇒ ShipConfirmRequest
constructor
A new instance of ShipConfirmRequest.
Methods inherited from Request
Methods inherited from Abstract::Request
Constructor Details
#initialize(credentials, shipment, options = {}) ⇒ ShipConfirmRequest
Returns a new instance of ShipConfirmRequest.
4 5 6 7 8 9 |
# File 'lib/simple_shipping/ups/ship_confirm_request.rb', line 4 def initialize(credentials, shipment, = {}) @credentials = credentials @shipment = shipment @options = @type = :process_ship_confirm end |
Instance Method Details
#body ⇒ Object
Builds a request from shipment object.
12 13 14 15 16 17 18 19 20 |
# File 'lib/simple_shipping/ups/ship_confirm_request.rb', line 12 def body { 'common:Request' => { 'common:RequestOption' => REQUEST_OPTION }, 'Shipment' => ShipmentBuilder.build(@shipment, @options), 'LabelSpecification' => label_specification, :order! => ['common:Request', 'Shipment', 'LabelSpecification'] } end |