class Twilio::REST::Notify::V1::ServiceContext::BindingContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
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/notify/api/service-resource] to fetch the resource from.
@param [String] sid The Twilio-provided string that uniquely identifies the
Binding resource to fetch.
@return [BindingContext] BindingContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/notify/v1/service/binding.rb 254 def initialize(version, service_sid, sid) 255 super(version) 256 257 # Path Solution 258 @solution = {service_sid: service_sid, sid: sid, } 259 @uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}" 260 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/notify/v1/service/binding.rb 274 def delete 275 @version.delete('DELETE', @uri) 276 end
fetch()
click to toggle source
Fetch the BindingInstance
@return [BindingInstance] Fetched BindingInstance
# File lib/twilio-ruby/rest/notify/v1/service/binding.rb 265 def fetch 266 payload = @version.fetch('GET', @uri) 267 268 BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) 269 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/notify/v1/service/binding.rb 287 def inspect 288 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 289 "#<Twilio.Notify.V1.BindingContext #{context}>" 290 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/notify/v1/service/binding.rb 280 def to_s 281 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 282 "#<Twilio.Notify.V1.BindingContext #{context}>" 283 end