diff --git a/lib/vonage/abstract_authentication.rb b/lib/vonage/abstract_authentication.rb index 403de8aa..797fa577 100644 --- a/lib/vonage/abstract_authentication.rb +++ b/lib/vonage/abstract_authentication.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true module Vonage class AbstractAuthentication diff --git a/lib/vonage/applications/list_response.rb b/lib/vonage/applications/list_response.rb index 44feaabc..d30c2d8b 100644 --- a/lib/vonage/applications/list_response.rb +++ b/lib/vonage/applications/list_response.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true class Vonage::Applications::ListResponse < Vonage::Response include Enumerable diff --git a/lib/vonage/basic.rb b/lib/vonage/basic.rb index 47e6b448..88738442 100644 --- a/lib/vonage/basic.rb +++ b/lib/vonage/basic.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true module Vonage class Basic < AbstractAuthentication diff --git a/lib/vonage/bearer_token.rb b/lib/vonage/bearer_token.rb index 890fa735..ce914776 100644 --- a/lib/vonage/bearer_token.rb +++ b/lib/vonage/bearer_token.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true # frozen_string_literal: true module Vonage diff --git a/lib/vonage/form_data.rb b/lib/vonage/form_data.rb index f17ccf25..effccac8 100644 --- a/lib/vonage/form_data.rb +++ b/lib/vonage/form_data.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true module Vonage module FormData diff --git a/lib/vonage/jwt.rb b/lib/vonage/jwt.rb index 87425d5b..9de8991a 100644 --- a/lib/vonage/jwt.rb +++ b/lib/vonage/jwt.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true require 'securerandom' require 'openssl' diff --git a/lib/vonage/namespace.rb b/lib/vonage/namespace.rb index f5da6515..88caa845 100644 --- a/lib/vonage/namespace.rb +++ b/lib/vonage/namespace.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true # frozen_string_literal: true require 'net/http' require 'json' @@ -61,7 +61,7 @@ def request(path, params: nil, type: Get, response_class: Response, &block) authentication = self.class.authentication.new(@config) authentication.update(params) - unless type::REQUEST_HAS_BODY || params.empty? + unless type.const_get(:REQUEST_HAS_BODY) || params.empty? uri.query = Params.encode(params) end @@ -77,7 +77,7 @@ def request(path, params: nil, type: Get, response_class: Response, &block) authentication.update(message) - self.class.request_body.update(message, params) if type::REQUEST_HAS_BODY + self.class.request_body.update(message, params) if type.const_get(:REQUEST_HAS_BODY) logger.log_request_info(message) diff --git a/lib/vonage/numbers/list_response.rb b/lib/vonage/numbers/list_response.rb index 8a66295d..1191aae2 100644 --- a/lib/vonage/numbers/list_response.rb +++ b/lib/vonage/numbers/list_response.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true class Vonage::Numbers::ListResponse < Vonage::Response include Enumerable diff --git a/lib/vonage/numbers/response.rb b/lib/vonage/numbers/response.rb index 387b7ce8..30b560aa 100644 --- a/lib/vonage/numbers/response.rb +++ b/lib/vonage/numbers/response.rb @@ -1,8 +1,8 @@ -# typed: false +# typed: true # frozen_string_literal: true class Vonage::Numbers::Response < Vonage::Response def success? - error_code == '200' + T.unsafe(self).error_code == '200' end end diff --git a/lib/vonage/params.rb b/lib/vonage/params.rb index 68147c77..62d30d77 100644 --- a/lib/vonage/params.rb +++ b/lib/vonage/params.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true # frozen_string_literal: true require 'cgi' diff --git a/lib/vonage/secrets/list_response.rb b/lib/vonage/secrets/list_response.rb index 06baea89..d22f0d9e 100644 --- a/lib/vonage/secrets/list_response.rb +++ b/lib/vonage/secrets/list_response.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true class Vonage::Secrets::ListResponse < Vonage::Response include Enumerable diff --git a/lib/vonage/voice/list_response.rb b/lib/vonage/voice/list_response.rb index 412557d0..bc0f06a4 100644 --- a/lib/vonage/voice/list_response.rb +++ b/lib/vonage/voice/list_response.rb @@ -1,4 +1,4 @@ -# typed: ignore +# typed: true class Vonage::Voice::ListResponse < Vonage::Response include Enumerable