Class: Twilio::REST::Messaging::V1::BrandRegistrationContext::BrandRegistrationOtpList

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

Instance Method Summary collapse

Constructor Details

#initialize(version, brand_registration_sid: nil) ⇒ BrandRegistrationOtpList

Initialize the BrandRegistrationOtpList

Parameters:

  • version (Version)

    Version that contains the resource



28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb', line 28

def initialize(version, brand_registration_sid: nil)
    super(version)
    # Path Solution
    @solution = { brand_registration_sid: brand_registration_sid }
    @uri = "/a2p/BrandRegistrations/#{@solution[:brand_registration_sid]}/SmsOtp"
    
end

Instance Method Details

#createBrandRegistrationOtpInstance

Create the BrandRegistrationOtpInstance

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb', line 38

def create

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.create('POST', @uri, headers: headers)
    BrandRegistrationOtpInstance.new(
        @version,
        payload,
        brand_registration_sid: @solution[:brand_registration_sid],
    )
end

#to_sObject

Provide a user friendly representation



58
59
60
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb', line 58

def to_s
    '#<Twilio.Messaging.V1.BrandRegistrationOtpList>'
end