Skip to content

Commit

Permalink
Merge branch 'release/3.1.0'
Browse files Browse the repository at this point in the history
* release/3.1.0:
  bump version
  add simulate param to batch endpoints
  • Loading branch information
eberquist committed Oct 19, 2021
2 parents 6964375 + 94f01c3 commit 9475df5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/emailable/batch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
2 changes: 1 addition & 1 deletion lib/emailable/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Emailable
VERSION = '3.0.2'
VERSION = '3.1.0'
end

0 comments on commit 9475df5

Please sign in to comment.