Sha256: 5932ff6925ebf982c03f6775c8b9cc9f82de0b1ddeebab816556453b7b7cec95

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

# frozen_string_literal: true

module Physical
  class Shipment
    attr_reader :id,
                :origin,
                :destination,
                :service_code,
                :pallets,
                :structures,
                :packages,
                :options

    def initialize(id: nil, origin: nil, destination: nil, service_code: nil, pallets: [], structures: [], packages: [], options: {})
      @id = id || SecureRandom.uuid
      @origin = origin
      @destination = destination
      @service_code = service_code
      @structures = structures
      @packages = packages
      @options = options
      @pallets = pallets
      warn "[DEPRECATION] `pallets` is deprecated.  Please use `structures` instead." if pallets.any?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
physical-0.5.1 lib/physical/shipment.rb