Class: Twilio::REST::Chat::V2::ServiceContext::UserContext::UserBindingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Chat::V2::ServiceContext::UserContext::UserBindingContext
- Defined in:
- lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the UserBindingInstance.
-
#fetch ⇒ UserBindingInstance
Fetch the UserBindingInstance.
-
#initialize(version, service_sid, user_sid, sid) ⇒ UserBindingContext
constructor
Initialize the UserBindingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, user_sid, sid) ⇒ UserBindingContext
Initialize the UserBindingContext
144 145 146 147 148 149 150 151 152 |
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb', line 144 def initialize(version, service_sid, user_sid, sid) super(version) # Path Solution @solution = { service_sid: service_sid, user_sid: user_sid, sid: sid, } @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:user_sid]}/Bindings/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the UserBindingInstance
156 157 158 159 |
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb', line 156 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ UserBindingInstance
Fetch the UserBindingInstance
164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb', line 164 def fetch payload = @version.fetch('GET', @uri) UserBindingInstance.new( @version, payload, service_sid: @solution[:service_sid], user_sid: @solution[:user_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
186 187 188 189 |
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb', line 186 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Chat.V2.UserBindingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
179 180 181 182 |
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb', line 179 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Chat.V2.UserBindingContext #{context}>" end |