class SimpleShipping::Ups::ShipmentRequest
Shipment
request model.
Public Class Methods
new(credentials, shipment, options = {})
click to toggle source
# File lib/simple_shipping/ups/shipment_request.rb, line 4 def initialize(credentials, shipment, options = {}) @credentials = credentials @shipment = shipment @options = options @type = :process_shipment end
Public Instance Methods
body()
click to toggle source
Builds a request from {Shipment shipment} object.
# File lib/simple_shipping/ups/shipment_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