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.



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_sidString

Returns A2P Messaging Profile Bundle BundleSid.

Returns:

  • (String)

    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_sidString

Returns The SID of the Account that created the resource.

Returns:

  • (String)

    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 
  @properties['account_sid']
end

#brand_scoreString

Returns Brand score.

Returns:

  • (String)

    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_typeString

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

Returns:

  • (String)

    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

#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:



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_sidString

Returns A2P Messaging Profile Bundle BundleSid.

Returns:

  • (String)

    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_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



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

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



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

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



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

def failure_reason
  @properties['failure_reason']
end

#fetchBrandRegistrationInstance

Fetch the BrandRegistrationInstance

Returns:



336
337
338
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 336

def fetch
  context.fetch
end

#inspectObject

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

#mockBoolean

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.

Returns:

  • (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.



329
330
331
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 329

def mock
  @properties['mock']
end

#sidString

Returns A2P BrandRegistration Sid.

Returns:

  • (String)

    A2P BrandRegistration Sid



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

def sid
  @properties['sid']
end

#statusbrand_registration.Status

Returns Brand Registration status.

Returns:

  • (brand_registration.Status)

    Brand Registration status



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

def status
  @properties['status']
end

#tcr_idString

Returns Campaign Registry (TCR) Brand ID.

Returns:

  • (String)

    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_sObject

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

#urlString

Returns The absolute URL of the Brand Registration.

Returns:

  • (String)

    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