Module: EmailFuse::Batch
- Defined in:
- lib/email_fuse/batch.rb
Overview
Module responsible for wrapping Batch email sending API
Class Method Summary collapse
-
.send(params = [], options: {}) ⇒ Hash
Send a batch of emails.
Class Method Details
.send(params = [], options: {}) ⇒ Hash
Send a batch of emails
29 30 31 32 33 34 35 36 |
# File 'lib/email_fuse/batch.rb', line 29 def send(params = [], options: {}) raise ArgumentError, "params must be an array of email hashes" unless params.is_a?(Array) raise ArgumentError, "params cannot be empty" if params.empty? path = "emails/batch" EmailFuse::Request.new(path, params, "post", options: ).perform end |