chore: add direct payment for invoice
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsEnum, IsInt, IsNotEmpty, IsUUID, IsUrl, Min } from "class-validator";
|
||||
import { IsEnum, IsInt, IsNotEmpty, IsOptional, IsUUID, IsUrl, Min } from "class-validator";
|
||||
|
||||
import { WalletMessage } from "../../../common/enums/message.enum";
|
||||
import { TransferType } from "../enums/payment-type.enum";
|
||||
@@ -22,6 +22,12 @@ export class GatewayDepositDto extends DepositDto {
|
||||
@IsUUID("4", { message: WalletMessage.GATEWAY_ID_SHOULD_BE_UUID })
|
||||
@ApiProperty({ description: "Gateway id to pay", example: "e6fdce2a-9f91-47c4-8561-48368fc275b5" })
|
||||
gatewayId: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNotEmpty({ message: WalletMessage.INVOICE_ID_REQUIRED })
|
||||
@IsUUID("4", { message: WalletMessage.INVOICE_ID_SHOULD_BE_UUID })
|
||||
@ApiProperty({ description: "Invoice id to pay", example: "e6fdce2a-9f91-47c4-8561-48368fc275b5" })
|
||||
invoiceId?: string;
|
||||
}
|
||||
|
||||
export class TransferDepositDto extends DepositDto {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IsEnum, IsNotEmpty } from "class-validator";
|
||||
import { IsEnum, IsNotEmpty, IsOptional } from "class-validator";
|
||||
|
||||
import { GatewayEnum } from "../enums/gateway.enum";
|
||||
import { GatewayType } from "../types/gateway.type";
|
||||
@@ -8,6 +8,10 @@ export class VerifyParamDto {
|
||||
@IsNotEmpty()
|
||||
@IsEnum(GatewayEnum)
|
||||
gateway: GatewayType;
|
||||
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
invoiceId?: string;
|
||||
}
|
||||
|
||||
export class VerifyQueryDto {
|
||||
|
||||
Reference in New Issue
Block a user