Class: Fishbowl::Objects::Carton

Inherits:
BaseObject 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(carton_xml) ⇒ Carton

Returns a new instance of Carton.



9
10
11
12
13
14
15
16
# File 'lib/fishbowl/objects/carton.rb', line 9

def initialize(carton_xml)
  @xml = carton_xml
  parse_attributes

  @shipping_items = get_shipping_items

  self
end

Instance Attribute Details

#carton_numObject (readonly)

Returns the value of attribute carton_num.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def carton_num
  @carton_num
end

#db_idObject (readonly)

Returns the value of attribute db_id.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def db_id
  @db_id
end

#freight_amountObject (readonly)

Returns the value of attribute freight_amount.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def freight_amount
  @freight_amount
end

#freight_weightObject (readonly)

Returns the value of attribute freight_weight.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def freight_weight
  @freight_weight
end

#ship_idObject (readonly)

Returns the value of attribute ship_id.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def ship_id
  @ship_id
end

#shipping_itemsObject (readonly)

Returns the value of attribute shipping_items.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def shipping_items
  @shipping_items
end

#tracking_numObject (readonly)

Returns the value of attribute tracking_num.



3
4
5
# File 'lib/fishbowl/objects/carton.rb', line 3

def tracking_num
  @tracking_num
end

Class Method Details

.attributesObject



5
6
7
# File 'lib/fishbowl/objects/carton.rb', line 5

def self.attributes
  %w{ID ShipID CartonNum TrackingNum FreightWeight FreightAmount}
end