Class: FriendlyShipping::Services::UpsFreight::GenerateEmailOptionsHash

Inherits:
Object
  • Object
show all
Defined in:
lib/friendly_shipping/services/ups_freight/generate_email_options_hash.rb

Class Method Summary collapse

Class Method Details

.call(email_options:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/friendly_shipping/services/ups_freight/generate_email_options_hash.rb', line 7

def self.call(email_options:)
  {
    EMailInformation: {
      EMailType: {
        Code: email_options.email_type_code,
      },
      EMail: {
        EMailAddress: email_options.email,
        UndeliverableEMailAddress: email_options.undeliverable_email,
        EMailText: email_options.body,
        Subject: email_options.subject
      }.compact
    }
  }
end