Class: EFax::OutboundRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/efax/outbound.rb

Class Method Summary collapse

Methods inherited from Request

account_id, account_id=, password, password=, user, user=

Class Method Details

.post(name, company, fax_number, subject, content, content_type = :html) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/efax/outbound.rb', line 58

def self.post(name, company, fax_number, subject, content, content_type = :html)
  xml_request = xml(name, company, fax_number, subject, content, content_type)
  response = Net::HTTPS.start(EFax::Uri.host, EFax::Uri.port) do |https|
    https.post(EFax::Uri.path, params(xml_request), EFax::HEADERS)
  end
  OutboundResponse.new(response)
end