Class: UPS::Builders::ShipAcceptBuilder

Inherits:
BuilderBase show all
Includes:
Ox
Defined in:
lib/ups/builders/ship_accept_builder.rb

Overview

The ShipAcceptBuilder class builds UPS XML ShipAccept Objects.

Author:

  • Paul Trippett

Since:

  • 0.1.0

Instance Attribute Summary

Attributes inherited from BuilderBase

#access_request, #document, #license_number, #password, #root, #shipment_root, #user_id

Instance Method Summary collapse

Methods inherited from BuilderBase

#add_access_request, #add_package, #add_payment_information, #add_rate_information, #add_request, #add_ship_from, #add_ship_to, #add_shipper, #to_xml

Constructor Details

#initializeShipAcceptBuilder

Initializes a new UPS::Builders::ShipAcceptBuilder object

Since:

  • 0.1.0


16
17
18
19
20
# File 'lib/ups/builders/ship_accept_builder.rb', line 16

def initialize
  super 'ShipmentAcceptRequest'

  add_request 'ShipAccept', '1'
end

Instance Method Details

#add_shipment_digest(digest) ⇒ void

This method returns an undefined value.

Adds a ShipmentDigest section to the XML document being built

Since:

  • 0.1.0


27
28
29
# File 'lib/ups/builders/ship_accept_builder.rb', line 27

def add_shipment_digest(digest)
  root << element_with_value('ShipmentDigest', digest)
end