Files
edr-platform/apps/edr-freight-api/src/modules/billing/dto/pay-invoice.dto.ts
2026-06-29 13:53:32 +00:00

31 lines
895 B
TypeScript

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;
}