Class: Opensteam::ShipmentBase::Shipment

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Opensteam::StateMachine
Defined in:
lib/opensteam/shipment_base.rb

Overview

Shipment Model

Instance Method Summary collapse

Methods included from Opensteam::StateMachine

included

Constructor Details

#initialize(*args) ⇒ Shipment

Returns a new instance of Shipment.



91
92
93
94
95
96
97
98
# File 'lib/opensteam/shipment_base.rb', line 91

def initialize(*args)
  super(*args)

  if order
    self.address = order.shipping_address
    self.customer = order.customer
  end
end