Class: CargowiseTS::MiniOrder
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- CargowiseTS::MiniOrder
- Defined in:
- lib/cargowise-ts/mini_order.rb
Overview
A purchase order that is being shipped to from a supplier to you via a logistics company.
Typcially you will setup an arrangement with your account manager where they are sent copies of POs so they can be entered into the database and tracked.
All order objects are read-only, see the object attributes to see what information is available.
Use class find methods to retrieve order info from your logistics company.
Order.find_by_order_number(...)
Order.find_incomplete(...)
etc
MiniOrder - used to capture the embedded order data in a web shipment
Instance Attribute Summary collapse
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
-
#order_status ⇒ Object
readonly
Returns the value of attribute order_status.
-
#ordered_at ⇒ Object
readonly
Returns the value of attribute ordered_at.
Instance Method Summary collapse
-
#initialize(node) ⇒ MiniOrder
constructor
A new instance of MiniOrder.
- #to_xml ⇒ Object
Methods inherited from AbstractResult
Constructor Details
#initialize(node) ⇒ MiniOrder
Returns a new instance of MiniOrder.
29 30 31 32 33 34 35 |
# File 'lib/cargowise-ts/mini_order.rb', line 29 def initialize(node) @node = node @order_number = text_value("./Order/OrderNumber") @order_status = text_value("./Order/Status") @ordered_at = text_value("./Order/OrderDate") end |
Instance Attribute Details
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
27 28 29 |
# File 'lib/cargowise-ts/mini_order.rb', line 27 def order_number @order_number end |
#order_status ⇒ Object (readonly)
Returns the value of attribute order_status.
27 28 29 |
# File 'lib/cargowise-ts/mini_order.rb', line 27 def order_status @order_status end |
#ordered_at ⇒ Object (readonly)
Returns the value of attribute ordered_at.
27 28 29 |
# File 'lib/cargowise-ts/mini_order.rb', line 27 def ordered_at @ordered_at end |
Instance Method Details
#to_xml ⇒ Object
37 38 39 |
# File 'lib/cargowise-ts/mini_order.rb', line 37 def to_xml @node.to_xml end |