# frozen_string_literal: true require 'friendly_shipping/shipment_options' module FriendlyShipping module Services class ShipEngine # Options for the rate estimates API call. class RateEstimatesOptions < ShipmentOptions # @return [Array] the carriers for these rate estimates attr_reader :carriers # @return [#strftime] attr_reader :ship_date # @param carriers [Array] :package_options the options for packages in this shipment # @option kwargs [Class] :package_options_class the class to use for package options when none are provided def initialize( carriers:, ship_date: Date.today, **kwargs ) @carriers = carriers @ship_date = ship_date super(**kwargs) end # @return [Array] the carrier IDs for these rate estimates def carrier_ids carriers.map(&:id) end end end end end