class TwilioEmail::API
Public Class Methods
new(username:, password:, host: nil, request_headers: nil, version: nil, impersonate_subuser: nil)
click to toggle source
-
Args :
-
username
-> your Twilio EmailAPI
key SID or Account SID -
password
-> your Twilio EmailAPI
key secret or Account Auth Token -
host
-> the base URL for theAPI
-
request_headers
-> any headers that you want to be globally applied -
version
-> the version of theAPI
you wish to access,currently only "v3" is supported
-
impersonate_subuser
-> the subuser to impersonate, will be passedin the "On-Behalf-Of" header
-
Calls superclass method
BaseInterface::new
# File lib/sendgrid/twilio_email.rb, line 14 def initialize(username:, password:, host: nil, request_headers: nil, version: nil, impersonate_subuser: nil) auth = "Basic #{Base64.strict_encode64("#{username}:#{password}")}" host ||= 'https://email.twilio.com' super(auth: auth, host: host, request_headers: request_headers, version: version, impersonate_subuser: impersonate_subuser) end