Class: Peddler::Reports::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/peddler/reports.rb

Overview

This is an unshipped order.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject

Returns the value of attribute carrier_code.



80
81
82
# File 'lib/peddler/reports.rb', line 80

def carrier_code
  @carrier_code
end

#carrier_nameObject

Returns the value of attribute carrier_name.



79
80
81
# File 'lib/peddler/reports.rb', line 79

def carrier_name
  @carrier_name
end

#order_idObject

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_idObject

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

#quantityObject

Returns the value of attribute quantity.



79
80
81
# File 'lib/peddler/reports.rb', line 79

def quantity
  @quantity
end

#ship_dateObject

Returns the value of attribute ship_date.



79
80
81
# File 'lib/peddler/reports.rb', line 79

def ship_date
  @ship_date
end

#ship_methodObject

Returns the value of attribute ship_method.



79
80
81
# File 'lib/peddler/reports.rb', line 79

def ship_method
  @ship_method
end

#tracking_numberObject

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_sObject

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