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

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v1/brand_registration.rb

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

  • account_sid (String)

    The SID of the Account that created this BrandRegistration resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 550

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'],
        'errors' => payload['errors'],
        'url' => payload['url'],
        'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
        'brand_feedback' => payload['brand_feedback'],
        'identity_status' => payload['identity_status'],
        'russell_3000' => payload['russell_3000'],
        'government_entity' => payload['government_entity'],
        'tax_exempt_status' => payload['tax_exempt_status'],
        'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
        'mock' => payload['mock'],
        'links' => payload['links'],
    }

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



615
616
617
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 615

def a2p_profile_bundle_sid
    @properties['a2p_profile_bundle_sid']
end

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Brand Registration resource.

Returns:



603
604
605
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 603

def 
    @properties['account_sid']
end

#brand_feedbackArray<BrandFeedback>

Returns DEPRECATED. Feedback on how to improve brand score.

Returns:

  • (Array<BrandFeedback>)

    DEPRECATED. Feedback on how to improve brand score



675
676
677
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 675

def brand_feedback
    @properties['brand_feedback']
end

#brand_registration2_fabrand_registration2_fa

Access the brand_registration2_fa

Returns:



754
755
756
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 754

def brand_registration2_fa
    context.brand_registration2_fa
end

#brand_registration_otpsbrand_registration_otps

Access the brand_registration_otps

Returns:



740
741
742
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 740

def brand_registration_otps
    context.brand_registration_otps
end

#brand_scoreString

Returns The secondary vetting score if it was done. Otherwise, it will be the brand score if it’s returned from TCR. It may be null if no score is available.

Returns:

  • (String)

    The secondary vetting score if it was done. Otherwise, it will be the brand score if it’s returned from TCR. It may be null if no score is available.



669
670
671
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 669

def brand_score
    @properties['brand_score']
end

#brand_typeString

Returns Type of brand. One of: "STANDARD", "SOLE_PROPRIETOR". SOLE_PROPRIETOR is for the low volume, SOLE_PROPRIETOR campaign use case. There can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR brand. STANDARD is for all other campaign use cases. Multiple campaign use cases can be created per STANDARD brand.

Returns:

  • (String)

    Type of brand. One of: "STANDARD", "SOLE_PROPRIETOR". SOLE_PROPRIETOR is for the low volume, SOLE_PROPRIETOR campaign use case. There can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR brand. STANDARD is for all other campaign use cases. Multiple campaign use cases can be created per STANDARD brand.



633
634
635
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 633

def brand_type
    @properties['brand_type']
end

#brand_vettingsbrand_vettings

Access the brand_vettings

Returns:



747
748
749
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 747

def brand_vettings
    context.brand_vettings
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:



588
589
590
591
592
593
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 588

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.



609
610
611
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 609

def customer_profile_bundle_sid
    @properties['customer_profile_bundle_sid']
end

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



621
622
623
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 621

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



627
628
629
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 627

def date_updated
    @properties['date_updated']
end

#errorsArray<Hash>

Returns A list of errors that occurred during the brand registration process.

Returns:

  • (Array<Hash>)

    A list of errors that occurred during the brand registration process.



657
658
659
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 657

def errors
    @properties['errors']
end

#failure_reasonString

Returns DEPRECATED. A reason why brand registration has failed. Only applicable when status is FAILED.

Returns:

  • (String)

    DEPRECATED. A reason why brand registration has failed. Only applicable when status is FAILED.



651
652
653
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 651

def failure_reason
    @properties['failure_reason']
end

#fetchBrandRegistrationInstance

Fetch the BrandRegistrationInstance

Returns:



724
725
726
727
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 724

def fetch

    context.fetch
end

#government_entityBoolean

Returns Identified as a government entity.

Returns:

  • (Boolean)

    Identified as a government entity



693
694
695
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 693

def government_entity
    @properties['government_entity']
end

#identity_statusIdentityStatus

Returns:

  • (IdentityStatus)


681
682
683
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 681

def identity_status
    @properties['identity_status']
end

#inspectObject

Provide a detailed, user friendly representation



767
768
769
770
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 767

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

Returns:

  • (Hash)


717
718
719
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 717

def links
    @properties['links']
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.



711
712
713
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 711

def mock
    @properties['mock']
end

#russell_3000Boolean

Returns Publicly traded company identified in the Russell 3000 Index.

Returns:

  • (Boolean)

    Publicly traded company identified in the Russell 3000 Index



687
688
689
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 687

def russell_3000
    @properties['russell_3000']
end

#sidString

Returns The unique string to identify Brand Registration.

Returns:

  • (String)

    The unique string to identify Brand Registration.



597
598
599
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 597

def sid
    @properties['sid']
end

#skip_automatic_sec_vetBoolean

Returns A flag to disable automatic secondary vetting for brands which it would otherwise be done.

Returns:

  • (Boolean)

    A flag to disable automatic secondary vetting for brands which it would otherwise be done.



705
706
707
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 705

def skip_automatic_sec_vet
    @properties['skip_automatic_sec_vet']
end

#statusStatus

Returns:

  • (Status)


639
640
641
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 639

def status
    @properties['status']
end

#tax_exempt_statusString

Returns Nonprofit organization tax-exempt status per section 501 of the U.S. tax code.

Returns:

  • (String)

    Nonprofit organization tax-exempt status per section 501 of the U.S. tax code.



699
700
701
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 699

def tax_exempt_status
    @properties['tax_exempt_status']
end

#tcr_idString

Returns Campaign Registry (TCR) Brand ID. Assigned only after successful brand registration.

Returns:

  • (String)

    Campaign Registry (TCR) Brand ID. Assigned only after successful brand registration.



645
646
647
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 645

def tcr_id
    @properties['tcr_id']
end

#to_sObject

Provide a user friendly representation



760
761
762
763
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 760

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

#updateBrandRegistrationInstance

Update the BrandRegistrationInstance

Returns:



732
733
734
735
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 732

def update

    context.update
end

#urlString

Returns The absolute URL of the Brand Registration resource.

Returns:

  • (String)

    The absolute URL of the Brand Registration resource.



663
664
665
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 663

def url
    @properties['url']
end