Class: SimpleShipping::Ups::VoidRequest
- Inherits:
-
Request
- Object
- Abstract::Request
- Request
- SimpleShipping::Ups::VoidRequest
- Defined in:
- lib/simple_shipping/ups/void_request.rb
Overview
UPS request to void shipment.
Constant Summary
Constants inherited from Request
Instance Attribute Summary
Attributes inherited from Abstract::Request
Instance Method Summary collapse
-
#body ⇒ Object
Build a request from a shipment object.
-
#initialize(credentials, shipment_identification_number, options = {}) ⇒ VoidRequest
constructor
A new instance of VoidRequest.
Methods inherited from Request
Methods inherited from Abstract::Request
Constructor Details
#initialize(credentials, shipment_identification_number, options = {}) ⇒ VoidRequest
Returns a new instance of VoidRequest.
8 9 10 11 12 13 14 |
# File 'lib/simple_shipping/ups/void_request.rb', line 8 def initialize(credentials, shipment_identification_number, = {}) @credentials = credentials @shipment_identification_number = shipment_identification_number @tracking_number = [:tracking_number] @options = @type = :process_void end |
Instance Method Details
#body ⇒ Object
Build a request from a shipment object.
17 18 19 20 21 22 23 24 25 |
# File 'lib/simple_shipping/ups/void_request.rb', line 17 def body { 'common:Request' => { 'common:RequestOption' => REQUEST_OPTION }, 'VoidShipment' => void_shipment, :order! => ['common:Request', 'VoidShipment'] } end |