Sha256: ac77a602e97c9fe53662f65739d0f65786b96c2666c1b4499f4d3c8c257eb017

Contents?: true

Size: 987 Bytes

Versions: 2

Compression:

Stored size: 987 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class ShipEngine
      # Options for each item passed in the rates API call.
      class RatesItemOptions < FriendlyShipping::ItemOptions
        # @return [String] the HS or NMFC code for international shipments
        attr_reader :commodity_code

        # @return [String] the country of origin for international shipments
        attr_reader :country_of_origin

        # @param commodity_code [String] the HS or NMFC code for international shipments
        # @param country_of_origin [String] the country of origin for international shipments
        # @param kwargs [Hash]
        # @option kwargs [String] :item_id the ID for the item that belongs to these options
        def initialize(commodity_code: nil, country_of_origin: nil, **kwargs)
          @commodity_code = commodity_code
          @country_of_origin = country_of_origin
          super(**kwargs)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
friendly_shipping-0.10.1 lib/friendly_shipping/services/ship_engine/rates_item_options.rb
friendly_shipping-0.10.0 lib/friendly_shipping/services/ship_engine/rates_item_options.rb