import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; import { IsIn, IsNotEmpty, IsOptional, IsString } from "class-validator"; /** OTP submitted for a COLLECT_OTP provider (CAC Bank). */ export class ConfirmOtpDto { @ApiProperty({ description: "One-time password SMSed by the bank." }) @IsString() @IsNotEmpty() otp!: string; } /** Gateway options for paying an invoice from the customer portal. */ export class PayInvoiceDto { @ApiPropertyOptional({ description: "Payment method (defaults to TELEBIRR)." }) @IsOptional() @IsString() method?: string; @ApiPropertyOptional({ enum: ["web", "mobile"], default: "web" }) @IsOptional() @IsIn(["web", "mobile"]) platform?: "web" | "mobile"; @ApiPropertyOptional({ description: "Payer account / phone, for wallet methods." }) @IsOptional() @IsString() payerAccount?: string; @ApiPropertyOptional({ description: "Browser redirect URL on success." }) @IsOptional() @IsString() returnUrl?: string; @ApiPropertyOptional({ description: "Browser redirect URL on failure." }) @IsOptional() @IsString() failureUrl?: string; }