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
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 242 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
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 255 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
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 275 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
308 309 310 311 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 308 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandVettingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
301 302 303 304 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb', line 301 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandVettingContext #{context}>" end |