Class: Twilio::REST::Messaging::V1::BrandRegistrationContext::BrandRegistrationOtpList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Messaging::V1::BrandRegistrationContext::BrandRegistrationOtpList
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb
Instance Method Summary collapse
-
#create ⇒ BrandRegistrationOtpInstance
Create the BrandRegistrationOtpInstance.
-
#initialize(version, brand_registration_sid: nil) ⇒ BrandRegistrationOtpList
constructor
Initialize the BrandRegistrationOtpList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, brand_registration_sid: nil) ⇒ BrandRegistrationOtpList
Initialize the BrandRegistrationOtpList
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
#create ⇒ BrandRegistrationOtpInstance
Create the BrandRegistrationOtpInstance
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_s ⇒ Object
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 |