class Twilio::REST::Chat::V2::ServiceContext::BindingContext

Public Class Methods

new(version, service_sid, sid) click to toggle source

Initialize the BindingContext @param [Version] version Version that contains the resource @param [String] service_sid The SID of the

{Service}[https://www.twilio.com/docs/chat/rest/service-resource] to fetch the
Binding resource from.

@param [String] sid The SID of the Binding resource to fetch. @return [BindingContext] BindingContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/chat/v2/service/binding.rb
189 def initialize(version, service_sid, sid)
190   super(version)
191 
192   # Path Solution
193   @solution = {service_sid: service_sid, sid: sid, }
194   @uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}"
195 end

Public Instance Methods

delete() click to toggle source

Delete the BindingInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/chat/v2/service/binding.rb
209 def delete
210    @version.delete('DELETE', @uri)
211 end
fetch() click to toggle source

Fetch the BindingInstance @return [BindingInstance] Fetched BindingInstance

    # File lib/twilio-ruby/rest/chat/v2/service/binding.rb
200 def fetch
201   payload = @version.fetch('GET', @uri)
202 
203   BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
204 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/binding.rb
222 def inspect
223   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
224   "#<Twilio.Chat.V2.BindingContext #{context}>"
225 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/binding.rb
215 def to_s
216   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
217   "#<Twilio.Chat.V2.BindingContext #{context}>"
218 end