Class: Twilio::TwiML::Client
- Defined in:
- lib/twilio-ruby/twiml/voice_response.rb
Overview
<Client> TwiML Noun
Instance Attribute Summary
Attributes inherited from TwiML
Instance Method Summary collapse
-
#identity(client_identity, **keyword_args) ⇒ Object
- Create a new <Identity> element client_identity
- Identity of the client to dial keyword_args
-
additional attributes.
-
#initialize(identity: nil, **keyword_args) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
-
#parameter(name: nil, value: nil, **keyword_args) ⇒ Object
- Create a new <Parameter> element name
- The name of the custom parameter value
- The value of the custom parameter keyword_args
-
additional attributes.
Methods inherited from TwiML
#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml
Constructor Details
#initialize(identity: nil, **keyword_args) {|_self| ... } ⇒ Client
Returns a new instance of Client.
1852 1853 1854 1855 1856 1857 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1852 def initialize(identity: nil, **keyword_args) super(**keyword_args) @name = 'Client' @value = identity unless identity.nil? yield(self) if block_given? end |
Instance Method Details
#identity(client_identity, **keyword_args) ⇒ Object
Create a new <Identity> element
- client_identity
-
Identity of the client to dial
- keyword_args
-
additional attributes
1863 1864 1865 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1863 def identity(client_identity, **keyword_args) append(Identity.new(client_identity, **keyword_args)) end |
#parameter(name: nil, value: nil, **keyword_args) ⇒ Object
Create a new <Parameter> element
- name
-
The name of the custom parameter
- value
-
The value of the custom parameter
- keyword_args
-
additional attributes
1872 1873 1874 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1872 def parameter(name: nil, value: nil, **keyword_args) append(Parameter.new(name: name, value: value, **keyword_args)) end |