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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, brand_sid, brand_vetting_sid) ⇒ BrandVettingContext

Initialize the BrandVettingContext

Parameters:

  • version (Version)

    Version that contains the resource

  • brand_sid (String)

    The SID of the Brand Registration resource of the vettings to read .

  • brand_vetting_sid (String)

    The Twilio SID of the third-party vetting record.



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

def initialize(version, brand_sid, brand_vetting_sid)
    super(version)

    # Path Solution
    @solution = { brand_sid: brand_sid, brand_vetting_sid: brand_vetting_sid,  }
    @uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings/#{@solution[:brand_vetting_sid]}"

    
end

Instance Method Details

#fetchBrandVettingInstance

Fetch the BrandVettingInstance

Returns:



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 186

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    BrandVettingInstance.new(
        @version,
        payload,
        brand_sid: @solution[:brand_sid],
        brand_vetting_sid: @solution[:brand_vetting_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



213
214
215
216
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 213

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

#to_sObject

Provide a user friendly representation



206
207
208
209
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 206

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