Class: Physical::Shipment
- Inherits:
-
Object
- Object
- Physical::Shipment
- Defined in:
- lib/physical/shipment.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#packages ⇒ Object
readonly
Returns the value of attribute packages.
-
#pallets ⇒ Object
readonly
Returns the value of attribute pallets.
-
#service_code ⇒ Object
readonly
Returns the value of attribute service_code.
Instance Method Summary collapse
-
#initialize(id: nil, origin: nil, destination: nil, service_code: nil, pallets: [], packages: [], options: {}) ⇒ Shipment
constructor
A new instance of Shipment.
Constructor Details
#initialize(id: nil, origin: nil, destination: nil, service_code: nil, pallets: [], packages: [], options: {}) ⇒ Shipment
Returns a new instance of Shipment.
13 14 15 16 17 18 19 20 21 |
# File 'lib/physical/shipment.rb', line 13 def initialize(id: nil, origin: nil, destination: nil, service_code: nil, pallets: [], packages: [], options: {}) @id = id || SecureRandom.uuid @origin = origin @destination = destination @service_code = service_code @pallets = pallets @packages = packages @options = end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def destination @destination end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def @options end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def origin @origin end |
#packages ⇒ Object (readonly)
Returns the value of attribute packages.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def packages @packages end |
#pallets ⇒ Object (readonly)
Returns the value of attribute pallets.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def pallets @pallets end |
#service_code ⇒ Object (readonly)
Returns the value of attribute service_code.
5 6 7 |
# File 'lib/physical/shipment.rb', line 5 def service_code @service_code end |