Class: Fishbowl::Objects::ShippingItem

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/fishbowl/objects/carton.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#send_request

Constructor Details

#initialize(shipping_item_xml) ⇒ ShippingItem

Returns a new instance of ShippingItem.



43
44
45
46
47
48
49
50
51
52
# File 'lib/fishbowl/objects/carton.rb', line 43

def initialize(shipping_item_xml)
  @xml = shipping_item_xml
  parse_attributes

  @uom = Fishbowl::Objects::UOM.new(@xml.xpath("UOM"))
  @weight_uom = Fishbowl::Objects::UOM.new(@xml.xpath("WeightUOM/UOM"))
  @display_weight_uom = Fishbowl::Objects::UOM.new(@xml.xpath("DisplayWeightUOM/UOM"))

  self
end

Instance Attribute Details

#carton_idObject (readonly)

Returns the value of attribute carton_id.



34
35
36
# File 'lib/fishbowl/objects/carton.rb', line 34

def carton_id
  @carton_id
end

#carton_nameObject (readonly)

Returns the value of attribute carton_name.



34
35
36
# File 'lib/fishbowl/objects/carton.rb', line 34

def carton_name
  @carton_name
end

#costObject (readonly)

Returns the value of attribute cost.



33
34
35
# File 'lib/fishbowl/objects/carton.rb', line 33

def cost
  @cost
end

#display_weightObject (readonly)

Returns the value of attribute display_weight.



35
36
37
# File 'lib/fishbowl/objects/carton.rb', line 35

def display_weight
  @display_weight
end

#display_weight_uomObject (readonly)

Returns the value of attribute display_weight_uom.



35
36
37
# File 'lib/fishbowl/objects/carton.rb', line 35

def display_weight_uom
  @display_weight_uom
end

#order_item_idObject (readonly)

Returns the value of attribute order_item_id.



33
34
35
# File 'lib/fishbowl/objects/carton.rb', line 33

def order_item_id
  @order_item_id
end

#order_line_itemObject (readonly)

Returns the value of attribute order_line_item.



34
35
36
# File 'lib/fishbowl/objects/carton.rb', line 34

def order_line_item
  @order_line_item
end

#product_descriptionObject (readonly)

Returns the value of attribute product_description.



32
33
34
# File 'lib/fishbowl/objects/carton.rb', line 32

def product_description
  @product_description
end

#product_numberObject (readonly)

Returns the value of attribute product_number.



32
33
34
# File 'lib/fishbowl/objects/carton.rb', line 32

def product_number
  @product_number
end

#qty_shippedObject (readonly)

Returns the value of attribute qty_shipped.



33
34
35
# File 'lib/fishbowl/objects/carton.rb', line 33

def qty_shipped
  @qty_shipped
end

#ship_item_idObject (readonly)

Returns the value of attribute ship_item_id.



32
33
34
# File 'lib/fishbowl/objects/carton.rb', line 32

def ship_item_id
  @ship_item_id
end

#skuObject (readonly)

Returns the value of attribute sku.



33
34
35
# File 'lib/fishbowl/objects/carton.rb', line 33

def sku
  @sku
end

#tag_numObject (readonly)

Returns the value of attribute tag_num.



34
35
36
# File 'lib/fishbowl/objects/carton.rb', line 34

def tag_num
  @tag_num
end

#trackingObject (readonly)

Returns the value of attribute tracking.



35
36
37
# File 'lib/fishbowl/objects/carton.rb', line 35

def tracking
  @tracking
end

#uomObject (readonly)

Returns the value of attribute uom.



35
36
37
# File 'lib/fishbowl/objects/carton.rb', line 35

def uom
  @uom
end

#upcObject (readonly)

Returns the value of attribute upc.



33
34
35
# File 'lib/fishbowl/objects/carton.rb', line 33

def upc
  @upc
end

#weightObject (readonly)

Returns the value of attribute weight.



34
35
36
# File 'lib/fishbowl/objects/carton.rb', line 34

def weight
  @weight
end

#weight_uomObject (readonly)

Returns the value of attribute weight_uom.



35
36
37
# File 'lib/fishbowl/objects/carton.rb', line 35

def weight_uom
  @weight_uom
end

Class Method Details

.attributesObject



37
38
39
40
41
# File 'lib/fishbowl/objects/carton.rb', line 37

def self.attributes
  %w{ShipItemID ProductNumber ProductDescription QtyShipped Cost SKU UPC
     OrderItemID OrderLineItem CartonName CartonID TagNum Weight
     DisplayWeight Tracking}
end