lib/twilio-ruby/util/capability.rb in twilio-ruby-3.12.2 vs lib/twilio-ruby/util/capability.rb in twilio-ruby-3.12.3

- old
+ new

@@ -2,12 +2,15 @@ module Util class Capability include Twilio::Util - def initialize(account_sid, auth_token) - @account_sid = account_sid - @auth_token = auth_token + def initialize(account_sid = nil, auth_token = nil) + @account_sid = account_sid || Twilio.account_sid + @auth_token = auth_token || Twilio.auth_token + if @account_sid.nil? || @auth_token.nil? + raise ArgumentError, 'Account SID and auth token are required' + end @capabilities = [] end def allow_client_incoming(client_name) @client_name = client_name # stash for use in outgoing