Class: FriendlyShipping::Services::UpsFreight::LabelEmailOptions
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::UpsFreight::LabelEmailOptions
- Defined in:
- lib/friendly_shipping/services/ups_freight/label_email_options.rb
Constant Summary collapse
- EMAIL_TYPES =
{ ship_notification: '001', delivery_notification: '002', exception_notification: '003', bol_labels: '004' }.freeze
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#email_type ⇒ Object
readonly
Returns the value of attribute email_type.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#undeliverable_email ⇒ Object
readonly
Returns the value of attribute undeliverable_email.
Instance Method Summary collapse
- #email_type_code ⇒ Object
-
#initialize(email:, email_type:, undeliverable_email:, subject: nil, body: nil) ⇒ LabelEmailOptions
constructor
A new instance of LabelEmailOptions.
Constructor Details
#initialize(email:, email_type:, undeliverable_email:, subject: nil, body: nil) ⇒ LabelEmailOptions
Returns a new instance of LabelEmailOptions.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 20 def initialize( email:, email_type:, undeliverable_email:, subject: nil, body: nil ) @email = email @email_type = email_type @undeliverable_email = undeliverable_email @subject = subject @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 14 def body @body end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 14 def email @email end |
#email_type ⇒ Object (readonly)
Returns the value of attribute email_type.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 14 def email_type @email_type end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 14 def subject @subject end |
#undeliverable_email ⇒ Object (readonly)
Returns the value of attribute undeliverable_email.
14 15 16 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 14 def undeliverable_email @undeliverable_email end |
Instance Method Details
#email_type_code ⇒ Object
34 35 36 |
# File 'lib/friendly_shipping/services/ups_freight/label_email_options.rb', line 34 def email_type_code EMAIL_TYPES.fetch(email_type) end |