Sha256: b5764f7b68f5eb0f7926ef508b7724431a654fcd28fafbe72588ffa950d9c550

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

require 'friendly_shipping/package_options'

module FriendlyShipping
  module Services
    class ShipEngine
      # Options relating to packages in the ShipEngine labels call
      #
      # @attribute :package_code [Symbol] The type of package. Possible types can be gotten
      #    via the ShipEngine API: https://www.shipengine.com/docs/reference/list-carrier-packages/
      #    If a package type is given, no dimensions will be added to the call (as we can assume the
      #    carrier knows the dimensions of their packaging types).
      # @attribute messages [Array<String>] A list of messages to add to the label. No carrier accepts
      #    more than three messages, and some have restrictions on how many characters are possible.
      #    We're not validating here though.
      class LabelPackageOptions < FriendlyShipping::PackageOptions
        attr_reader :package_code, :messages

        def initialize(package_code: nil, messages: [], **kwargs)
          @package_code = package_code
          @messages = messages
          super(**kwargs)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
friendly_shipping-0.7.3 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.7.2 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.7.1 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.7.0 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.5 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.4 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.3 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.2 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.1 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.6.0 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.5.3 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.5.2 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.5.1 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.5 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.14 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.13 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.12 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.11 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.10 lib/friendly_shipping/services/ship_engine/label_package_options.rb
friendly_shipping-0.4.9 lib/friendly_shipping/services/ship_engine/label_package_options.rb