import { IsString, Length } from "class-validator";
import { ApiProperty } from "@nestjs/swagger";
import { ConfirmPaymentRequest } from "@edr/types";

/** Wire shape is the shared `ConfirmPaymentRequest` contract from @edr/types. */
export class ConfirmPaymentDto implements ConfirmPaymentRequest {
  @ApiProperty({
    description: "One-time password sent to the payer's mobile via SMS",
    example: "123456",
  })
  @IsString()
  @Length(1, 10)
  otp!: string;
}
