class Twilio::REST::Messaging::V1::BrandRegistrationInstance

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

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the BrandRegistrationInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Brand Registration resource to fetch. @return [BrandRegistrationInstance] BrandRegistrationInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
219 def initialize(version, payload, sid: nil)
220   super(version)
221 
222   # Marshaled Properties
223   @properties = {
224       'sid' => payload['sid'],
225       'account_sid' => payload['account_sid'],
226       'customer_profile_bundle_sid' => payload['customer_profile_bundle_sid'],
227       'a2p_profile_bundle_sid' => payload['a2p_profile_bundle_sid'],
228       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
229       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
230       'brand_type' => payload['brand_type'],
231       'status' => payload['status'],
232       'tcr_id' => payload['tcr_id'],
233       'failure_reason' => payload['failure_reason'],
234       'url' => payload['url'],
235       'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
236       'mock' => payload['mock'],
237   }
238 
239   # Context
240   @instance_context = nil
241   @params = {'sid' => sid || @properties['sid'], }
242 end

Public Instance Methods

a2p_profile_bundle_sid() click to toggle source

@return [String] A2P Messaging Profile Bundle BundleSid

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
275 def a2p_profile_bundle_sid
276   @properties['a2p_profile_bundle_sid']
277 end
account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
263 def account_sid
264   @properties['account_sid']
265 end
brand_score() click to toggle source

@return [String] Brand score

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
323 def brand_score
324   @properties['brand_score']
325 end
brand_type() click to toggle source

@return [String] Type of brand. One of: “STANDARD”, “STARTER”.

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
293 def brand_type
294   @properties['brand_type']
295 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [BrandRegistrationContext] BrandRegistrationContext for this BrandRegistrationInstance

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
248 def context
249   unless @instance_context
250     @instance_context = BrandRegistrationContext.new(@version, @params['sid'], )
251   end
252   @instance_context
253 end
customer_profile_bundle_sid() click to toggle source

@return [String] A2P Messaging Profile Bundle BundleSid

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
269 def customer_profile_bundle_sid
270   @properties['customer_profile_bundle_sid']
271 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
281 def date_created
282   @properties['date_created']
283 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
287 def date_updated
288   @properties['date_updated']
289 end
failure_reason() click to toggle source

@return [String] A reason why brand registration has failed

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
311 def failure_reason
312   @properties['failure_reason']
313 end
fetch() click to toggle source

Fetch the BrandRegistrationInstance @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
336 def fetch
337   context.fetch
338 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
349 def inspect
350   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
351   "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
352 end
mock() click to toggle source

@return [Boolean] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
329 def mock
330   @properties['mock']
331 end
sid() click to toggle source

@return [String] A2P BrandRegistration Sid

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
257 def sid
258   @properties['sid']
259 end
status() click to toggle source

@return [brand_registration.Status] Brand Registration status

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
299 def status
300   @properties['status']
301 end
tcr_id() click to toggle source

@return [String] Campaign Registry (TCR) Brand ID

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
305 def tcr_id
306   @properties['tcr_id']
307 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
342 def to_s
343   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
344   "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
345 end
url() click to toggle source

@return [String] The absolute URL of the Brand Registration

    # File lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
317 def url
318   @properties['url']
319 end