Class: Twilio::REST::Api
- Defined in:
- lib/signalwire/sdk/twilio_set_host.rb
Instance Method Summary collapse
- #hostname ⇒ Object
-
#initialize(twilio) ⇒ Api
constructor
A new instance of Api.
Methods inherited from Domain
Constructor Details
#initialize(twilio) ⇒ Api
Returns a new instance of Api.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/signalwire/sdk/twilio_set_host.rb', line 6 def initialize(twilio) super @host = ENV['SIGNALWIRE_HOST'] || ENV['SIGNALWIRE_API_HOSTNAME'] || Signalwire::Sdk.configuration.hostname || raise(ArgumentError, 'SignalWire Space URL is not configured. Enter your SignalWire Space domain via the '\ 'SIGNALWIRE_HOST or SIGNALWIRE_API_HOSTNAME environment variables, '\ 'or hostname in the configuration.') @base_url = "https://#{@host}" @port = 443 # Versions @v2010 = nil end |
Instance Method Details
#hostname ⇒ Object
24 25 26 |
# File 'lib/signalwire/sdk/twilio_set_host.rb', line 24 def hostname @host end |