Class: VoiceML::ScopedTransport Private
- Inherits:
-
Object
- Object
- VoiceML::ScopedTransport
- Defined in:
- lib/voiceml/transport.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A transport view pinned to a specific product base URL.
Wraps a real Transport and forwards every call, injecting a base_url override so an
entire resource group lands on its product subdomain (conversations.voicetel.com /
messaging.voicetel.com) without each resource needing to know its own host.
Instance Attribute Summary collapse
- #base_url ⇒ Object readonly private
Instance Method Summary collapse
- #account_sid ⇒ Object private
- #fetch_bytes(path) ⇒ Object private
-
#initialize(inner, base_url) ⇒ ScopedTransport
constructor
private
A new instance of ScopedTransport.
- #request(method, path, params: nil, form: nil, json: nil) ⇒ Object private
Constructor Details
#initialize(inner, base_url) ⇒ ScopedTransport
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ScopedTransport.
319 320 321 322 |
# File 'lib/voiceml/transport.rb', line 319 def initialize(inner, base_url) @inner = inner @base_url = Transport.strip_trailing_slashes(base_url) end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
317 318 319 |
# File 'lib/voiceml/transport.rb', line 317 def base_url @base_url end |
Instance Method Details
#account_sid ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
324 325 326 |
# File 'lib/voiceml/transport.rb', line 324 def account_sid @inner.account_sid end |
#fetch_bytes(path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
332 333 334 |
# File 'lib/voiceml/transport.rb', line 332 def fetch_bytes(path) @inner.fetch_bytes(path, base_url: @base_url) end |
#request(method, path, params: nil, form: nil, json: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
328 329 330 |
# File 'lib/voiceml/transport.rb', line 328 def request(method, path, params: nil, form: nil, json: nil) @inner.request(method, path, params: params, form: form, json: json, base_url: @base_url) end |