Class: CommandTower::Deserializers::Me::PhoneVerification::VerifyDeserializer
- Inherits:
-
Object
- Object
- CommandTower::Deserializers::Me::PhoneVerification::VerifyDeserializer
- Defined in:
- app/deserializers/command_tower/deserializers/me/phone_verification/verify_deserializer.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.call(params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/deserializers/command_tower/deserializers/me/phone_verification/verify_deserializer.rb', line 11 def self.call(params) raw = params[:code].presence || params.dig(:phone_verification, :code).presence code = raw.to_s.strip if code.blank? return Result.new( success?: false, input: nil, errors: { code: "is required" } ) end Result.new(success?: true, input: Input.new(code:), errors: {}) end |