class Twilio::REST::Conversations::V1::ServiceContext::BindingContext

Public Class Methods

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

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

Service}[https://www.twilio.com/docs/conversations/api/service-resource] the
Binding resource is associated with.

@param [String] sid A 34 character string that uniquely identifies this

resource.

@return [BindingContext] BindingContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/conversations/v1/service/binding.rb
193 def initialize(version, chat_service_sid, sid)
194   super(version)
195 
196   # Path Solution
197   @solution = {chat_service_sid: chat_service_sid, sid: sid, }
198   @uri = "/Services/#{@solution[:chat_service_sid]}/Bindings/#{@solution[:sid]}"
199 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/conversations/v1/service/binding.rb
204 def delete
205    @version.delete('DELETE', @uri)
206 end
fetch() click to toggle source

Fetch the BindingInstance @return [BindingInstance] Fetched BindingInstance

    # File lib/twilio-ruby/rest/conversations/v1/service/binding.rb
211 def fetch
212   payload = @version.fetch('GET', @uri)
213 
214   BindingInstance.new(
215       @version,
216       payload,
217       chat_service_sid: @solution[:chat_service_sid],
218       sid: @solution[:sid],
219   )
220 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/conversations/v1/service/binding.rb
231 def inspect
232   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
233   "#<Twilio.Conversations.V1.BindingContext #{context}>"
234 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/conversations/v1/service/binding.rb
224 def to_s
225   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
226   "#<Twilio.Conversations.V1.BindingContext #{context}>"
227 end