Class: Twilio::REST::Messaging::V1::BrandRegistrationInstance

Inherits:
InstanceResource
  • Object
show all
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

Constructor Details

#initialize(version, payload, sid: nil) ⇒ BrandRegistrationInstance

Initialize the BrandRegistrationInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • sid (String) (defaults to: nil)

    The SID of the Brand Registration resource to fetch.


215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 215

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,
  }

  # Context
  @instance_context = nil
  @params = {'sid' => sid || @properties['sid'], }
end

Instance Method Details

#a2p_profile_bundle_sidString

Returns A2P Messaging Profile Bundle BundleSid.

Returns:

  • (String)

    A2P Messaging Profile Bundle BundleSid


270
271
272
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 270

def a2p_profile_bundle_sid
  @properties['a2p_profile_bundle_sid']
end

#account_sidString

Returns The SID of the Account that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource


258
259
260
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 258

def 
  @properties['account_sid']
end

#brand_scoreString

Returns Brand score.

Returns:

  • (String)

    Brand score


318
319
320
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 318

def brand_score
  @properties['brand_score']
end

#brand_typeString

Returns Type of brand. One of: “STANDARD”, “STARTER”.

Returns:

  • (String)

    Type of brand. One of: “STANDARD”, “STARTER”.


288
289
290
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 288

def brand_type
  @properties['brand_type']
end

#contextBrandRegistrationContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:


243
244
245
246
247
248
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 243

def context
  unless @instance_context
    @instance_context = BrandRegistrationContext.new(@version, @params['sid'], )
  end
  @instance_context
end

#customer_profile_bundle_sidString

Returns A2P Messaging Profile Bundle BundleSid.

Returns:

  • (String)

    A2P Messaging Profile Bundle BundleSid


264
265
266
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 264

def customer_profile_bundle_sid
  @properties['customer_profile_bundle_sid']
end

#date_createdTime

Returns The ISO 8601 date and time in GMT when the resource was created.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was created


276
277
278
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 276

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The ISO 8601 date and time in GMT when the resource was last updated.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was last updated


282
283
284
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 282

def date_updated
  @properties['date_updated']
end

#failure_reasonString

Returns A reason why brand registration has failed.

Returns:

  • (String)

    A reason why brand registration has failed


306
307
308
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 306

def failure_reason
  @properties['failure_reason']
end

#fetchBrandRegistrationInstance

Fetch the BrandRegistrationInstance

Returns:


325
326
327
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 325

def fetch
  context.fetch
end

#inspectObject

Provide a detailed, user friendly representation


338
339
340
341
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 338

def inspect
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
end

#sidString

Returns A2P BrandRegistration Sid.

Returns:

  • (String)

    A2P BrandRegistration Sid


252
253
254
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 252

def sid
  @properties['sid']
end

#statusbrand_registration.Status

Returns Brand Registration status.

Returns:

  • (brand_registration.Status)

    Brand Registration status


294
295
296
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 294

def status
  @properties['status']
end

#tcr_idString

Returns Campaign Registry (TCR) Brand ID.

Returns:

  • (String)

    Campaign Registry (TCR) Brand ID


300
301
302
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 300

def tcr_id
  @properties['tcr_id']
end

#to_sObject

Provide a user friendly representation


331
332
333
334
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 331

def to_s
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
end

#urlString

Returns The absolute URL of the Brand Registration.

Returns:

  • (String)

    The absolute URL of the Brand Registration


312
313
314
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 312

def url
  @properties['url']
end