Class: Twilio::REST::Messaging::V1::BrandRegistrationContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v1/brand_registration.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ BrandRegistrationContext

Initialize the BrandRegistrationContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The SID of the Brand Registration resource to fetch.


174
175
176
177
178
179
180
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 174

def initialize(version, sid)
  super(version)

  # Path Solution
  @solution = {sid: sid, }
  @uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
end

Instance Method Details

#fetchBrandRegistrationInstance

Fetch the BrandRegistrationInstance

Returns:


185
186
187
188
189
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 185

def fetch
  payload = @version.fetch('GET', @uri)

  BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
end

#inspectObject

Provide a detailed, user friendly representation


200
201
202
203
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 200

def inspect
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
end

#to_sObject

Provide a user friendly representation


193
194
195
196
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 193

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
end