class Dhl::ShipmentRequest
Attributes
packages[RW]
recipient[RW]
shipment[RW]
shipper[RW]
Public Class Methods
new()
click to toggle source
# File lib/dhl/shipment_request.rb, line 6 def initialize @shipper = Dhl::Contact.new @recipient = Dhl::Contact.new @packages = Dhl::Packages.new @shipment = Dhl::Shipment.new end
Public Instance Methods
to_hash()
click to toggle source
# File lib/dhl/shipment_request.rb, line 13 def to_hash { requested_shipment: @shipment.to_hash.merge({ ship: { shipper: @shipper.to_hash, recipient: @recipient.to_hash, }, packages: @packages.to_hash }) } end