OtpRequestResult class

Response from the OTP request endpoint.

When an admin requests an OTP for PIN reset, the backend sends a code to the admin's registered email/phone and returns metadata about the delivery.

Annotations
  • @JsonSerializable.new()

Constructors

OtpRequestResult({required bool success, String? error, String? maskedEmail, String? maskedPhone, List<String> channelsSent = const []})
OtpRequestResult.fromJson(Map<String, dynamic> json)
factory

Properties

channelsSent List<String>
Channels the OTP was sent through (e.g. "EMAIL", "SMS").
final
deliveredTo String
Convenience getter: returns a display string showing delivery destinations.
no setter
error String?
Error message if the request failed.
final
hashCode int
The hash code for this object.
no setterinherited
maskedEmail String?
Masked email address (e.g. "j***@email.com") shown to the user.
final
maskedPhone String?
Masked phone number (e.g. "+27***1234") shown to the user.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
Whether the OTP was successfully requested.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited