File
|
amount
|
Type : string
|
Decorators :
@Expose() @ApiProperty({description: 'Total amount formatted as string (e.g., '$899.40')'})
|
|
|
|
date
|
Type : string
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice date formatted DD/MM/YYYY (en-GB locale)'})
|
|
|
|
description
|
Type : string
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice description'})
|
|
|
|
id
|
Type : number
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice ID'})
|
|
|
|
invoice_number
|
Type : string
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice number'})
|
|
|
|
invoice_type
|
Type : string
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice type label (e.g. Renewal, Refund)'})
|
|
|
|
status
|
Type : "Paid" | "Pending" | "Failed"
|
Decorators :
@Expose() @ApiProperty({description: 'Invoice status', enum: undefined})
|
|
|
import { ApiProperty } from "@nestjs/swagger";
import { Exclude, Expose, Type } from "class-transformer";
@Exclude()
export class SubscriptionBillingHistoryItemDto {
@Expose()
@ApiProperty({ description: "Invoice ID" })
id!: number;
@Expose()
@ApiProperty({ description: "Invoice number" })
invoice_number!: string;
@Expose()
@ApiProperty({ description: "Invoice date formatted DD/MM/YYYY (en-GB locale)" })
date!: string;
@Expose()
@ApiProperty({ description: "Invoice description" })
description!: string;
@Expose()
@ApiProperty({ description: "Total amount formatted as string (e.g., '$899.40')" })
amount!: string;
@Expose()
@ApiProperty({ description: "Invoice status", enum: ["Paid", "Pending", "Failed"] })
status!: "Paid" | "Pending" | "Failed";
@Expose()
@ApiProperty({ description: "Invoice type label (e.g. Renewal, Refund)" })
invoice_type!: string;
}
@Exclude()
export class SubscriptionBillingHistoryResponseDto {
@Expose()
@Type(() => SubscriptionBillingHistoryItemDto)
@ApiProperty({ description: "List of billing history items", type: [SubscriptionBillingHistoryItemDto] })
items!: SubscriptionBillingHistoryItemDto[];
}