Class: FriendlyShipping::Services::ShipEngine::LabelPackageOptions
- Inherits:
-
PackageOptions
- Object
- PackageOptions
- FriendlyShipping::Services::ShipEngine::LabelPackageOptions
- Defined in:
- lib/friendly_shipping/services/ship_engine/label_package_options.rb
Overview
Package options for generating shipping labels.
Instance Attribute Summary collapse
-
#messages ⇒ Array<String>
readonly
A list of messages to add to the label.
-
#package_code ⇒ Symbol
readonly
The type of package.
Attributes inherited from PackageOptions
Instance Method Summary collapse
-
#initialize(package_code: nil, messages: [], **kwargs) ⇒ LabelPackageOptions
constructor
A new instance of LabelPackageOptions.
Methods inherited from PackageOptions
Constructor Details
#initialize(package_code: nil, messages: [], **kwargs) ⇒ LabelPackageOptions
Returns a new instance of LabelPackageOptions.
25 26 27 28 29 |
# File 'lib/friendly_shipping/services/ship_engine/label_package_options.rb', line 25 def initialize(package_code: nil, messages: [], **kwargs) @package_code = package_code @messages = super(**kwargs.reverse_merge(item_options_class: LabelItemOptions)) end |
Instance Attribute Details
#messages ⇒ Array<String> (readonly)
Returns a list of messages to add to the label.
12 13 14 |
# File 'lib/friendly_shipping/services/ship_engine/label_package_options.rb', line 12 def @messages end |
#package_code ⇒ Symbol (readonly)
Returns the type of package.
9 10 11 |
# File 'lib/friendly_shipping/services/ship_engine/label_package_options.rb', line 9 def package_code @package_code end |