Sha256: 0c1d7d05edbc40b57fe8204d293f24a73b934c90c4e646ccbfc63b24550d2a83

Contents?: true

Size: 1020 Bytes

Versions: 2

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class ShipEngine
      # Item options for generating shipping labels.
      class LabelItemOptions < 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/label_item_options.rb
friendly_shipping-0.10.0 lib/friendly_shipping/services/ship_engine/label_item_options.rb