lib/twilio-ruby/rest/verify/v2.rb in twilio-ruby-5.77.0 vs lib/twilio-ruby/rest/verify/v2.rb in twilio-ruby-6.0.0.pre.rc.1

- old
+ new

@@ -1,110 +1,106 @@ ## -# This code was generated by -# \ / _ _ _| _ _ -# | (_)\/(_)(_|\/| |(/_ v1.0.0 -# / / +# This code was generated by +# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ +# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ +# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # -# frozen_string_literal: true +# Twilio - Verify +# This is the public Twilio REST API. +# +# NOTE: This class is auto generated by OpenAPI Generator. +# https://openapi-generator.tech +# Do not edit the class manually. +# module Twilio - module REST - class Verify - class V2 < Version - ## - # Initialize the V2 version of Verify - def initialize(domain) - super - @version = 'v2' - @forms = nil - @safelist = nil - @services = nil - @verification_attempts = nil - @verification_attempts_summary = nil - @templates = nil - end + module REST + class Verify + class V2 < Version + ## + # Initialize the V2 version of Verify + def initialize(domain) + super + @version = 'v2' + @forms = nil + @safelist = nil + @services = nil + @templates = nil + @verification_attempts = nil + @verification_attempts_summary = nil + end - ## - # @param [form.FormTypes] form_type The Type of this Form. Currently only - # `form-push` is supported. - # @return [Twilio::REST::Verify::V2::FormContext] if form_type was passed. - # @return [Twilio::REST::Verify::V2::FormList] - def forms(form_type=:unset) - if form_type.nil? - raise ArgumentError, 'form_type cannot be nil' - end - if form_type == :unset - @forms ||= FormList.new self - else - FormContext.new(self, form_type) - end + ## + # @param [String] form_type The Type of this Form. Currently only `form-push` is supported. + # @return [Twilio::REST::Verify::V2::FormContext] if formType was passed. + # @return [Twilio::REST::Verify::V2::FormList] + def forms(form_type=:unset) + if form_type.nil? + raise ArgumentError, 'form_type cannot be nil' + end + if form_type == :unset + @forms ||= FormList.new self + else + FormContext.new(self, form_type) + end + end + ## + # @param [String] phone_number The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). + # @return [Twilio::REST::Verify::V2::SafelistContext] if phoneNumber was passed. + # @return [Twilio::REST::Verify::V2::SafelistList] + def safelist(phone_number=:unset) + if phone_number.nil? + raise ArgumentError, 'phone_number cannot be nil' + end + if phone_number == :unset + @safelist ||= SafelistList.new self + else + SafelistContext.new(self, phone_number) + end + end + ## + # @param [String] sid The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. + # @return [Twilio::REST::Verify::V2::ServiceContext] if sid was passed. + # @return [Twilio::REST::Verify::V2::ServiceList] + def services(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @services ||= ServiceList.new self + else + ServiceContext.new(self, sid) + end + end + ## + # @return [Twilio::REST::Verify::V2::TemplateList] + def templates + @templates ||= TemplateList.new self + end + ## + # @param [String] sid The unique SID identifier of a Verification Attempt + # @return [Twilio::REST::Verify::V2::VerificationAttemptContext] if sid was passed. + # @return [Twilio::REST::Verify::V2::VerificationAttemptList] + def verification_attempts(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @verification_attempts ||= VerificationAttemptList.new self + else + VerificationAttemptContext.new(self, sid) + end + end + ## + # @return [Twilio::REST::Verify::V2::verificationAttemptsSummaryContext] + def verification_attempts_summary + @verification_attempts_summary ||= VerificationAttemptsSummaryContext.new self + end + ## + # Provide a user friendly representation + def to_s + '<Twilio::REST::Verify::V2>'; + end + end end - - ## - # @param [String] phone_number The phone number to be fetched from SafeList. Phone - # numbers must be in {E.164 - # format}[https://www.twilio.com/docs/glossary/what-e164]. - # @return [Twilio::REST::Verify::V2::SafelistContext] if phone_number was passed. - # @return [Twilio::REST::Verify::V2::SafelistList] - def safelist(phone_number=:unset) - if phone_number.nil? - raise ArgumentError, 'phone_number cannot be nil' - end - if phone_number == :unset - @safelist ||= SafelistList.new self - else - SafelistContext.new(self, phone_number) - end - end - - ## - # @param [String] sid The Twilio-provided string that uniquely identifies the - # Verification Service resource to fetch. - # @return [Twilio::REST::Verify::V2::ServiceContext] if sid was passed. - # @return [Twilio::REST::Verify::V2::ServiceList] - def services(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - end - if sid == :unset - @services ||= ServiceList.new self - else - ServiceContext.new(self, sid) - end - end - - ## - # @param [String] sid The unique SID identifier of a Verification Attempt - # @return [Twilio::REST::Verify::V2::VerificationAttemptContext] if sid was passed. - # @return [Twilio::REST::Verify::V2::VerificationAttemptList] - def verification_attempts(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - end - if sid == :unset - @verification_attempts ||= VerificationAttemptList.new self - else - VerificationAttemptContext.new(self, sid) - end - end - - ## - # @return [Twilio::REST::Verify::V2::VerificationAttemptsSummaryContext] - def verification_attempts_summary - @verification_attempts_summary ||= VerificationAttemptsSummaryContext.new self - end - - ## - # @return [Twilio::REST::Verify::V2::TemplateContext] - def templates - @templates ||= TemplateList.new self - end - - ## - # Provide a user friendly representation - def to_s - '<Twilio::REST::Verify::V2>' - end - end end - end -end \ No newline at end of file +end