Class: FriendlyShipping::Services::ShipEngine::LabelOptions
- Inherits:
-
FriendlyShipping::ShipmentOptions
- Object
- FriendlyShipping::ShipmentOptions
- FriendlyShipping::Services::ShipEngine::LabelOptions
- Defined in:
- lib/friendly_shipping/services/ship_engine/label_options.rb
Overview
Options for generating ShipEngine labels
Instance Attribute Summary collapse
-
#label_download_type ⇒ Object
Returns the value of attribute label_download_type.
-
#label_format ⇒ Object
Returns the value of attribute label_format.
-
#package_options ⇒ Object
readonly
Package options for the packages in the shipment.
-
#shipping_method ⇒ Object
readonly
Returns the value of attribute shipping_method.
Instance Method Summary collapse
-
#initialize(shipping_method:, label_format: :pdf, label_download_type: :url, **kwargs) ⇒ LabelOptions
constructor
A new instance of LabelOptions.
Methods inherited from FriendlyShipping::ShipmentOptions
Constructor Details
#initialize(shipping_method:, label_format: :pdf, label_download_type: :url, **kwargs) ⇒ LabelOptions
Returns a new instance of LabelOptions.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/friendly_shipping/services/ship_engine/label_options.rb', line 20 def initialize( shipping_method:, label_format: :pdf, label_download_type: :url, **kwargs ) @shipping_method = shipping_method @label_format = label_format @label_download_type = label_download_type super(**kwargs.merge(package_options_class: LabelPackageOptions)) end |
Instance Attribute Details
#label_download_type ⇒ Object
Returns the value of attribute label_download_type.
16 17 18 |
# File 'lib/friendly_shipping/services/ship_engine/label_options.rb', line 16 def label_download_type @label_download_type end |
#label_format ⇒ Object
Returns the value of attribute label_format.
16 17 18 |
# File 'lib/friendly_shipping/services/ship_engine/label_options.rb', line 16 def label_format @label_format end |
#package_options ⇒ Object (readonly)
Package options for the packages in the shipment
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/friendly_shipping/services/ship_engine/label_options.rb', line 15 class LabelOptions < FriendlyShipping::ShipmentOptions attr_reader :shipping_method, :label_format, :label_download_type def initialize( shipping_method:, label_format: :pdf, label_download_type: :url, **kwargs ) @shipping_method = shipping_method @label_format = label_format @label_download_type = label_download_type super(**kwargs.merge(package_options_class: LabelPackageOptions)) end end |
#shipping_method ⇒ Object (readonly)
Returns the value of attribute shipping_method.
16 17 18 |
# File 'lib/friendly_shipping/services/ship_engine/label_options.rb', line 16 def shipping_method @shipping_method end |