diff --git a/lib/emailable/batch.rb b/lib/emailable/batch.rb index 85e010d..bbc22ad 100644 --- a/lib/emailable/batch.rb +++ b/lib/emailable/batch.rb @@ -19,20 +19,20 @@ def initialize(id_or_emails, callback: nil) @status = nil end - def verify + def verify(simulate: nil) return @id unless @id.nil? - opts = { emails: @emails.join(','), url: @callback } + opts = { emails: @emails.join(','), url: @callback, simulate: simulate } response = @client.request(:post, 'batch', opts) @id = response.body['id'] end - def status + def status(simulate: nil) return nil unless @id return @status if @status - response = @client.request(:get, 'batch', { id: @id }) + response = @client.request(:get, 'batch', { id: @id, simulate: simulate }) bs = BatchStatus.new(response.body) @status = bs if bs.complete? diff --git a/lib/emailable/version.rb b/lib/emailable/version.rb index efe938a..fd528c5 100644 --- a/lib/emailable/version.rb +++ b/lib/emailable/version.rb @@ -1,3 +1,3 @@ module Emailable - VERSION = '3.0.2' + VERSION = '3.1.0' end