Add invoice payment management.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { IsString, IsEnum, IsOptional, IsBoolean, IsNumber, IsArray, ValidateNested, Min } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { BillingCycle, PricingResourceType, AppRuntime } from '../../common/enums';
|
||||
import { BillingCycle, PricingResourceType, AppRuntime, InvoiceStatus } from '../../common/enums';
|
||||
import { OptionalServiceResourcesDto } from './optional-service-resources.dto';
|
||||
|
||||
export class CreatePricingRuleDto {
|
||||
@@ -210,6 +210,35 @@ export class UpgradeResourcesDto {
|
||||
|
||||
export class CalculateUpgradeCostDto extends UpgradeResourcesDto {}
|
||||
|
||||
// ─── Invoice DTOs ───────────────────────────────────────────────────
|
||||
|
||||
export class InitiateInvoicePaymentDto {
|
||||
@ApiProperty({ example: 'https://app.example.com/dashboard/invoices' })
|
||||
@IsString()
|
||||
callbackUrl: string;
|
||||
}
|
||||
|
||||
export class VerifyInvoiceGatewayDto {
|
||||
@ApiProperty({ example: 'INV-1710000000000-ABC123' })
|
||||
@IsString()
|
||||
trackingCode: string;
|
||||
|
||||
@ApiProperty({ example: 50000 })
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export class UpdateInvoiceStatusDto {
|
||||
@ApiProperty({ enum: InvoiceStatus })
|
||||
@IsEnum(InvoiceStatus)
|
||||
status: InvoiceStatus;
|
||||
|
||||
@ApiProperty({ example: 'Manual reconciliation by finance team' })
|
||||
@IsString()
|
||||
reason: string;
|
||||
}
|
||||
|
||||
// ─── Platform optional services pricing (Admin) ─────────────────────
|
||||
|
||||
export class OptionalServiceCyclePricesDto {
|
||||
|
||||
Reference in New Issue
Block a user