import { ApiPropertyOptional } from "@nestjs/swagger"; import { IsIn, IsOptional, IsString } from "class-validator"; /** 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; }