Undefined method validation_requests
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.4k
- Forks
- 472
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 5
Description
Issue Summary
The method Twilio::REST::Client#validation_reqeusts has been removed in v6.0.0.
Running the example code from https://www.twilio.com/docs/voice/api/outgoing-caller-ids?code-sample=code-add-a-new-outgoing-caller-id&code-language=Ruby&code-sdk-version=6.x will raise a NoMethodError.
Steps to Reproduce
Run the example code from https://www.twilio.com/docs/voice/api/outgoing-caller-ids?code-sample=code-add-a-new-outgoing-caller-id&code-language=Ruby&code-sdk-version=6.x
Code Snippet
validation_request = @client.validation_requests
.create(
friendly_name: 'My Home Phone Number',
phone_number: '+14158675310'
)
Exception/Log
NoMethodError: undefined method `validation_requests' for #<Twilio::REST::Client:0x00007fcc6234fdd8 @username="xxx", @password="xxx", @region=nil, @edge=nil, @account_sid="xxx", @auth_token="xxx", @auth=["xxx", "xxx"], @http_client=#<Twilio::HTTP::Client:0x00007fcc62217c68 @proxy_prot=nil, @ssl_ca_file=nil, @timeout=nil, @adapter=:net_http, @configure_connection_blocks=[], @connection=#<Faraday::Connection:0x00007fcc602b9010 @parallel_manager=nil, @headers={"User-Agent"=>"twilio-ruby/6.6.0 (linux x86_64) Ruby/3.2.2", "Accept-Charset"=>"utf-8", "Content-Type"=>"application/x-www-form-urlencoded", "Accept"=>"application/json"}, @params={}, @options=#<Faraday::RequestOptions params_encoder=Faraday::FlatParamsEncoder>, @ssl=#<Faraday::SSLOptions verify=true>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x00007fcc60302b98 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded, Faraday::Request::BasicAuthentication], @app=#<Faraday::Request::UrlEncoded:0x00007fcc6033b290 @app=#<Faraday::Request::BasicAuthentication:0x00007fcc602b0690 @type="xxx", @param="xxx", @app=#<Faraday::Adapter::NetHttp:0x00007fcc602b06e0 @ssl_cert_store=#<OpenSSL::X509::Store:0x00007fcc603393c8 @verify_callback=nil, @error=nil, @error_string=nil, @chain=nil, @time=nil, @_httpclient_cert_store_items=[:default]>, @app=#<Proc:0x00007fcc6033b5b0 /home/mz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-1.10.3/lib/faraday/adapter.rb:34 (lambda)>, @connection_options={}, @config_block=nil>, @options={}>, @options={}>>, @url_prefix=#<URI::HTTPS https://api.twilio.com/>, @proxy=nil>, @last_request=#<Twilio::Request:0x00007fcc62237090 @host="https://api.twilio.com", @port=443, @url="https://api.twilio.com/2010-04-01/Accounts/xxx/OutgoingCallerIds.json", @method="POST", @params={}, @data={"PhoneNumber"=>nil}, @headers={"User-Agent"=>"twilio-ruby/6.6.0 (linux x86_64) Ruby/3.2.2", "Accept-Charset"=>"utf-8", "Content-Type"=>"application/x-www-form-urlencoded", "Accept"=>"application/json"}, @auth=["xxx", "xxx"], @timeout=nil>, @last_response=#<Twilio::Response:0x00007fcc6035dc50 @status_code=401, @body={"code"=>20003, "message"=>"Authenticate", "more_info"=>"https://www.twilio.com/docs/errors/20003", "status"=>401}, @headers={"date"=>"Wed, 13 Sep 2023 07:36:17 GMT", "content-type"=>"application/json", "content-length"=>"107", "connection"=>"keep-alive", "www-authenticate"=>"Basic realm=\"Twilio API\"", "twilio-request-id"=>"RQ3492925d882107ecf5554b85f438344a", "x-shenanigans"=>"none", "access-control-allow-origin"=>"*", "access-control-allow-headers"=>"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Idempotency-Key", "access-control-allow-methods"=>"GET, POST, DELETE, OPTIONS", "access-control-expose-headers"=>"ETag", "access-control-allow-credentials"=>"true", "x-powered-by"=>"AT-5000", "x-home-region"=>"us1", "x-api-domain"=>"api.twilio.com"}>>, @logger=nil, @user_agent_extensions=[], @api=#<Twilio::REST::Api:0x00007fcc622d88f0 @client=#<Twilio::REST::Client:0x00007fcc6234fdd8 ...>, @host="api.twilio.com", @base_url="https://api.twilio.com", @port=443, @v2010=#<Twilio::REST::Api::V2010:0x00007fcc6136c8f8 @domain=#<Twilio::REST::Api:0x00007fcc622d88f0 ...>, @version="2010-04-01", @accounts=nil, @account=#<Twilio.Api.V2010.AccountContext sid: xxx>>>>
Technical details:
- twilio-ruby version: 6.6.0
- ruby version: 3.2.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Twilio::REST::Client#validation_requests entry point and compare it with the outgoing caller ID example in the linked Twilio documentation. Trace how the v6.6.0 client exposes this resource and determine what change makes that example run without NoMethodError; done means the documented call works with the reported version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100