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.



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 211

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']),
      'status' => payload['status'],
      'tcr_id' => payload['tcr_id'],
      'failure_reason' => payload['failure_reason'],
      'url' => payload['url'],
  }

  # 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



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

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



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

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



237
238
239
240
241
242
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 237

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



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

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



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

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



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

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



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

def failure_reason
  @properties['failure_reason']
end

#fetchBrandRegistrationInstance

Fetch the BrandRegistrationInstance

Returns:



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

def fetch
  context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



320
321
322
323
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 320

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



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

def sid
  @properties['sid']
end

#statusbrand_registration.Status

Returns Brand Registration status.

Returns:

  • (brand_registration.Status)

    Brand Registration status



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

def status
  @properties['status']
end

#tcr_idString

Returns Campaign Registry (TCR) Brand ID.

Returns:

  • (String)

    Campaign Registry (TCR) Brand ID



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

def tcr_id
  @properties['tcr_id']
end

#to_sObject

Provide a user friendly representation



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

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



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

def url
  @properties['url']
end