Class: Twilio::REST::Messaging::V1::BrandRegistrationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::BrandRegistrationInstance
- 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
-
#a2p_profile_bundle_sid ⇒ String
A2P Messaging Profile Bundle BundleSid.
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#brand_score ⇒ String
Brand score.
-
#brand_type ⇒ String
Type of brand.
-
#context ⇒ BrandRegistrationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#customer_profile_bundle_sid ⇒ String
A2P Messaging Profile Bundle BundleSid.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#failure_reason ⇒ String
A reason why brand registration has failed.
-
#fetch ⇒ BrandRegistrationInstance
Fetch the BrandRegistrationInstance.
-
#initialize(version, payload, sid: nil) ⇒ BrandRegistrationInstance
constructor
Initialize the BrandRegistrationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#mock ⇒ Boolean
A boolean that specifies whether brand should be a mock or not.
-
#sid ⇒ String
A2P BrandRegistration Sid.
-
#status ⇒ brand_registration.Status
Brand Registration status.
-
#tcr_id ⇒ String
Campaign Registry (TCR) Brand ID.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Brand Registration.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ BrandRegistrationInstance
Initialize the BrandRegistrationInstance
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 219 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'customer_profile_bundle_sid' => payload['customer_profile_bundle_sid'], 'a2p_profile_bundle_sid' => payload['a2p_profile_bundle_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'brand_type' => payload['brand_type'], 'status' => payload['status'], 'tcr_id' => payload['tcr_id'], 'failure_reason' => payload['failure_reason'], 'url' => payload['url'], 'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i, 'mock' => payload['mock'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#a2p_profile_bundle_sid ⇒ String
Returns A2P Messaging Profile Bundle BundleSid.
275 276 277 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 275 def a2p_profile_bundle_sid @properties['a2p_profile_bundle_sid'] end |
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
263 264 265 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 263 def account_sid @properties['account_sid'] end |
#brand_score ⇒ String
Returns Brand score.
323 324 325 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 323 def brand_score @properties['brand_score'] end |
#brand_type ⇒ String
Returns Type of brand. One of: “STANDARD”, “STARTER”.
293 294 295 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 293 def brand_type @properties['brand_type'] end |
#context ⇒ BrandRegistrationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
248 249 250 251 252 253 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 248 def context unless @instance_context @instance_context = BrandRegistrationContext.new(@version, @params['sid'], ) end @instance_context end |
#customer_profile_bundle_sid ⇒ String
Returns A2P Messaging Profile Bundle BundleSid.
269 270 271 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 269 def customer_profile_bundle_sid @properties['customer_profile_bundle_sid'] end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
281 282 283 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 281 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
287 288 289 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 287 def date_updated @properties['date_updated'] end |
#failure_reason ⇒ String
Returns A reason why brand registration has failed.
311 312 313 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 311 def failure_reason @properties['failure_reason'] end |
#fetch ⇒ BrandRegistrationInstance
Fetch the BrandRegistrationInstance
336 337 338 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 336 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
349 350 351 352 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 349 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>" end |
#mock ⇒ Boolean
Returns 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.
329 330 331 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 329 def mock @properties['mock'] end |
#sid ⇒ String
Returns A2P BrandRegistration Sid.
257 258 259 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 257 def sid @properties['sid'] end |
#status ⇒ brand_registration.Status
Returns Brand Registration status.
299 300 301 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 299 def status @properties['status'] end |
#tcr_id ⇒ String
Returns Campaign Registry (TCR) Brand ID.
305 306 307 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 305 def tcr_id @properties['tcr_id'] end |
#to_s ⇒ Object
Provide a user friendly representation
342 343 344 345 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 342 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Brand Registration.
317 318 319 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 317 def url @properties['url'] end |