Sha256: 4ba817c8caf9879e4aa742cb26619d243590d9414f80e59b9922c24dade65543

Contents?: true

Size: 570 Bytes

Versions: 24

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  class Timing
    attr_reader :shipping_method,
                :pickup,
                :delivery,
                :guaranteed,
                :properties

    def initialize(
      shipping_method:,
      pickup:,
      delivery:,
      guaranteed: false,
      properties: {}
    )
      @shipping_method = shipping_method
      @pickup = pickup
      @delivery = delivery
      @guaranteed = guaranteed
      @properties = properties
    end

    def time_in_transit
      delivery - pickup
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
friendly_shipping-0.8.1 lib/friendly_shipping/timing.rb
friendly_shipping-0.8.0 lib/friendly_shipping/timing.rb
friendly_shipping-0.7.3 lib/friendly_shipping/timing.rb
friendly_shipping-0.7.2 lib/friendly_shipping/timing.rb
friendly_shipping-0.7.1 lib/friendly_shipping/timing.rb
friendly_shipping-0.7.0 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.5 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.4 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.3 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.2 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.1 lib/friendly_shipping/timing.rb
friendly_shipping-0.6.0 lib/friendly_shipping/timing.rb
friendly_shipping-0.5.3 lib/friendly_shipping/timing.rb
friendly_shipping-0.5.2 lib/friendly_shipping/timing.rb
friendly_shipping-0.5.1 lib/friendly_shipping/timing.rb
friendly_shipping-0.5 lib/friendly_shipping/timing.rb
friendly_shipping-0.4.14 lib/friendly_shipping/timing.rb
friendly_shipping-0.4.13 lib/friendly_shipping/timing.rb
friendly_shipping-0.4.12 lib/friendly_shipping/timing.rb
friendly_shipping-0.4.11 lib/friendly_shipping/timing.rb