class Twilio::REST::Chat::V2::ServiceContext::ChannelContext::WebhookPage

Public Class Methods

new(version, response, solution) click to toggle source

Initialize the WebhookPage @param [Version] version Version that contains the resource @param [Response] response Response from the API @param [Hash] solution Path solution for the resource @return [WebhookPage] WebhookPage

Calls superclass method Twilio::REST::Page::new
    # File lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb
174 def initialize(version, response, solution)
175   super(version, response)
176 
177   # Path Solution
178   @solution = solution
179 end

Public Instance Methods

get_instance(payload) click to toggle source

Build an instance of WebhookInstance @param [Hash] payload Payload response from the API @return [WebhookInstance] WebhookInstance

    # File lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb
185 def get_instance(payload)
186   WebhookInstance.new(
187       @version,
188       payload,
189       service_sid: @solution[:service_sid],
190       channel_sid: @solution[:channel_sid],
191   )
192 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb
196 def to_s
197   '<Twilio.Chat.V2.WebhookPage>'
198 end