Class: Twilio::REST::Messaging::V1::BrandRegistrationContext::BrandVettingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::BrandRegistrationContext::BrandVettingContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb
Instance Method Summary collapse
-
#fetch ⇒ BrandVettingInstance
Fetch the BrandVettingInstance.
-
#fetch_with_metadata ⇒ BrandVettingInstance
Fetch the BrandVettingInstanceMetadata.
-
#initialize(version, brand_sid, brand_vetting_sid) ⇒ BrandVettingContext
constructor
Initialize the BrandVettingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, brand_sid, brand_vetting_sid) ⇒ BrandVettingContext
Initialize the BrandVettingContext
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 234 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
#fetch ⇒ BrandVettingInstance
Fetch the BrandVettingInstance
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 247 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 |
#fetch_with_metadata ⇒ BrandVettingInstance
Fetch the BrandVettingInstanceMetadata
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 267 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) brand_vetting_instance = BrandVettingInstance.new( @version, response.body, brand_sid: @solution[:brand_sid], brand_vetting_sid: @solution[:brand_vetting_sid], ) BrandVettingInstanceMetadata.new( @version, brand_vetting_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
300 301 302 303 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 300 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandVettingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
293 294 295 296 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 293 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandVettingContext #{context}>" end |