Class: DashamailTransactional::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/dashamail/request.rb

Instance Method Summary collapse

Constructor Details

#initializeRequest

Returns a new instance of Request.



5
6
7
# File 'lib/dashamail/request.rb', line 5

def initialize
  @http = DashaMail::HTTP.new
end

Instance Method Details

#check(transaction_id) ⇒ Object



14
15
16
17
# File 'lib/dashamail/request.rb', line 14

def check(transaction_id)
  answer = @http.get('transactional.check', { transaction_id: transaction_id })
  Response.new(answer)
end

#send(message) ⇒ Object



9
10
11
12
# File 'lib/dashamail/request.rb', line 9

def send(message)
  answer = @http.post('transactional.send', message)
  Response.new(answer)
end