Class: CommandTower::Identity::PhoneVerification::SmsConfiguration
- Inherits:
-
Object
- Object
- CommandTower::Identity::PhoneVerification::SmsConfiguration
- Defined in:
- app/services/command_tower/identity/phone_verification/sms_configuration.rb
Overview
Readiness detector for Identity phone-verification OTP SMS delivery. Distinct from Messaging notification SMS Configuration — same Twilio ENV names may be shared, but adapters and sender resolution differ.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.sms_ready? ⇒ Boolean
10 11 12 |
# File 'app/services/command_tower/identity/phone_verification/sms_configuration.rb', line 10 def self.sms_ready? new.sms_ready? end |
Instance Method Details
#adapter_name ⇒ Object
28 29 30 |
# File 'app/services/command_tower/identity/phone_verification/sms_configuration.rb', line 28 def adapter_name phone_verification.sms_adapter.to_s end |
#sms_ready? ⇒ Boolean
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/services/command_tower/identity/phone_verification/sms_configuration.rb', line 14 def sms_ready? return false unless phone_verification.enable case adapter_name when "twilio" twilio_credentials_present? when "fake", "log" # Intentional non-provider transports for test/development only. !Rails.env.production? else false end end |