Class: Peddler::Feeds::OrderFulfillment::Item
- Inherits:
-
Object
- Object
- Peddler::Feeds::OrderFulfillment::Item
- Defined in:
- lib/peddler/feeds.rb
Overview
This is an order fulfillment item.
Instance Attribute Summary collapse
-
#carrier_code ⇒ Object
Returns the value of attribute carrier_code.
-
#carrier_name ⇒ Object
Returns the value of attribute carrier_name.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#order_item_id ⇒ Object
Returns the value of attribute order_item_id.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#ship_date ⇒ Object
Returns the value of attribute ship_date.
-
#ship_method ⇒ Object
Returns the value of attribute ship_method.
-
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Item
constructor
A new instance of Item.
-
#to_s ⇒ Object
Outputs a formatted line for the tab-delimited upload file.
Constructor Details
#initialize(params = {}) ⇒ Item
Returns a new instance of Item.
135 136 137 |
# File 'lib/peddler/feeds.rb', line 135 def initialize(params={}) params.each_pair{ |key, value| send("#{key}=", value) } end |
Instance Attribute Details
#carrier_code ⇒ Object
Returns the value of attribute carrier_code.
133 134 135 |
# File 'lib/peddler/feeds.rb', line 133 def carrier_code @carrier_code end |
#carrier_name ⇒ Object
Returns the value of attribute carrier_name.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def carrier_name @carrier_name end |
#order_id ⇒ Object
Returns the value of attribute order_id.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def order_id @order_id end |
#order_item_id ⇒ Object
Returns the value of attribute order_item_id.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def order_item_id @order_item_id end |
#quantity ⇒ Object
Returns the value of attribute quantity.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def quantity @quantity end |
#ship_date ⇒ Object
Returns the value of attribute ship_date.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def ship_date @ship_date end |
#ship_method ⇒ Object
Returns the value of attribute ship_method.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def ship_method @ship_method end |
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
132 133 134 |
# File 'lib/peddler/feeds.rb', line 132 def tracking_number @tracking_number end |
Instance Method Details
#to_s ⇒ Object
Outputs a formatted line for the tab-delimited upload file.
145 146 147 |
# File 'lib/peddler/feeds.rb', line 145 def to_s "#{@order_id}\t#{@order_item_id}\t#{@quantity}\t#{@ship_date}\t#{@carrier_code}\t#{@carrier_name}\t#{@tracking_number}\t#{@ship_method}\r\n" end |