Class: Griddler::PostmarkCustomized::Adapter
- Inherits:
-
Object
- Object
- Griddler::PostmarkCustomized::Adapter
- Defined in:
- lib/griddler/postmark_customized/adapter.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Adapter
constructor
A new instance of Adapter.
- #normalize_params ⇒ Object
Constructor Details
#initialize(params) ⇒ Adapter
Returns a new instance of Adapter.
6 7 8 |
# File 'lib/griddler/postmark_customized/adapter.rb', line 6 def initialize(params) @params = params end |
Class Method Details
.normalize_params(params) ⇒ Object
10 11 12 13 |
# File 'lib/griddler/postmark_customized/adapter.rb', line 10 def self.normalize_params(params) adapter = new(params) adapter.normalize_params end |
Instance Method Details
#normalize_params ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/griddler/postmark_customized/adapter.rb', line 15 def normalize_params { from: full_email(params[:FromFull]), to_email: params[:To], from_email: params[:From], to: extract_recipients(:ToFull), cc: extract_recipients(:CcFull), bcc: extract_recipients(:BccFull), headers: headers, subject: params[:Subject], text: params[:TextBody], html: params[:HtmlBody], original_recipient: params[:OriginalRecipient], reply_to: params[:ReplyTo], mailbox_hash: params[:MailboxHash], attachments: } end |