Class: EFax::OutboundRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/efax.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



83
84
85
86
87
88
89
# File 'lib/efax.rb', line 83

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