Class: Twilio::Util::AccessToken::VoiceGrant
- Inherits:
-
Object
- Object
- Twilio::Util::AccessToken::VoiceGrant
- Defined in:
- lib/twilio-ruby/util/access_token.rb
Instance Attribute Summary collapse
-
#endpoint_id ⇒ Object
Returns the value of attribute endpoint_id.
-
#outgoing_application_params ⇒ Object
Returns the value of attribute outgoing_application_params.
-
#outgoing_application_sid ⇒ Object
Returns the value of attribute outgoing_application_sid.
-
#push_credential_sid ⇒ Object
Returns the value of attribute push_credential_sid.
Instance Method Summary collapse
Instance Attribute Details
#endpoint_id ⇒ Object
Returns the value of attribute endpoint_id.
104 105 106 |
# File 'lib/twilio-ruby/util/access_token.rb', line 104 def endpoint_id @endpoint_id end |
#outgoing_application_params ⇒ Object
Returns the value of attribute outgoing_application_params.
104 105 106 |
# File 'lib/twilio-ruby/util/access_token.rb', line 104 def outgoing_application_params @outgoing_application_params end |
#outgoing_application_sid ⇒ Object
Returns the value of attribute outgoing_application_sid.
104 105 106 |
# File 'lib/twilio-ruby/util/access_token.rb', line 104 def outgoing_application_sid @outgoing_application_sid end |
#push_credential_sid ⇒ Object
Returns the value of attribute push_credential_sid.
104 105 106 |
# File 'lib/twilio-ruby/util/access_token.rb', line 104 def push_credential_sid @push_credential_sid end |
Instance Method Details
#key ⇒ Object
109 110 111 |
# File 'lib/twilio-ruby/util/access_token.rb', line 109 def key 'voice' end |
#payload ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/twilio-ruby/util/access_token.rb', line 113 def payload payload = {} if outgoing_application_sid outgoing = {} outgoing[:application_sid] = outgoing_application_sid if outgoing_application_params outgoing[:params] = outgoing_application_params end payload[:outgoing] = outgoing end if push_credential_sid payload[:push_credential_sid] = push_credential_sid end if endpoint_id payload[:endpoint_id] = endpoint_id end payload end |