Sha256: e7f483f658e2ce6118f11016524ebe125115a70f8f3b7c69815269415bad0b56

Contents?: true

Size: 588 Bytes

Versions: 9

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true

require 'friendly_shipping/shipment_options'

module FriendlyShipping
  module Services
    class ShipEngine
      # options for the rate estimates call
      #
      # @attribute carriers [Array<FriendlyShipping::Carrier] a list of the carriers we want to get IDs from.
      class RateEstimatesOptions < ShipmentOptions
        attr_reader :carriers

        def initialize(carriers:, **kwargs)
          @carriers = carriers
          super kwargs
        end

        def carrier_ids
          carriers.map(&:id)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
friendly_shipping-0.4.8 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.7 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.6 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.5 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.4 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.3 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.2 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.1 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
friendly_shipping-0.4.0 lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb