Class: SimpleShipping::Shipment
- Inherits:
-
Abstract::Model
- Object
- Abstract::Model
- SimpleShipping::Shipment
- Defined in:
- lib/simple_shipping/shipment.rb
Overview
Instance Attribute Summary collapse
-
#package ⇒ Object
Returns the value of attribute package.
-
#payor ⇒ Object
Returns the value of attribute payor.
-
#recipient ⇒ Object
Returns the value of attribute recipient.
-
#shipper ⇒ Object
Returns the value of attribute shipper.
Instance Method Summary collapse
-
#payor_account_number ⇒ Object
Account number of payor.
Methods inherited from Abstract::Model
#initialize, set_default_values, validates_submodel
Constructor Details
This class inherits a constructor from SimpleShipping::Abstract::Model
Instance Attribute Details
#package ⇒ Object
Returns the value of attribute package.
10 11 12 |
# File 'lib/simple_shipping/shipment.rb', line 10 def package @package end |
#payor ⇒ Object
Returns the value of attribute payor.
10 11 12 |
# File 'lib/simple_shipping/shipment.rb', line 10 def payor @payor end |
#recipient ⇒ Object
Returns the value of attribute recipient.
10 11 12 |
# File 'lib/simple_shipping/shipment.rb', line 10 def recipient @recipient end |
#shipper ⇒ Object
Returns the value of attribute shipper.
10 11 12 |
# File 'lib/simple_shipping/shipment.rb', line 10 def shipper @shipper end |
Instance Method Details
#payor_account_number ⇒ Object
Account number of payor.
25 26 27 28 29 30 31 32 |
# File 'lib/simple_shipping/shipment.rb', line 25 def payor_account_number case payor when :shipper shipper.account_number if shipper.respond_to?(:account_number) when :recipient recipient.account_number if recipient.respond_to?(:account_number) end end |