Class: Peddler::Reports::Item
- Inherits:
-
Object
- Object
- Peddler::Reports::Item
- Defined in:
- lib/peddler/reports.rb
Overview
This is an unshipped order.
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.
82 83 84 |
# File 'lib/peddler/reports.rb', line 82 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.
80 81 82 |
# File 'lib/peddler/reports.rb', line 80 def carrier_code @carrier_code end |
#carrier_name ⇒ Object
Returns the value of attribute carrier_name.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def carrier_name @carrier_name end |
#order_id ⇒ Object
Returns the value of attribute order_id.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def order_id @order_id end |
#order_item_id ⇒ Object
Returns the value of attribute order_item_id.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def order_item_id @order_item_id end |
#quantity ⇒ Object
Returns the value of attribute quantity.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def quantity @quantity end |
#ship_date ⇒ Object
Returns the value of attribute ship_date.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def ship_date @ship_date end |
#ship_method ⇒ Object
Returns the value of attribute ship_method.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def ship_method @ship_method end |
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
79 80 81 |
# File 'lib/peddler/reports.rb', line 79 def tracking_number @tracking_number end |
Instance Method Details
#to_s ⇒ Object
Outputs a formatted line for the tab-delimited upload file.
92 93 94 |
# File 'lib/peddler/reports.rb', line 92 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 |