68 lines
1.2 KiB
TypeScript
68 lines
1.2 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class PaymentDto {
|
|
@ApiProperty({
|
|
description: 'ID do pedido',
|
|
example: 12345,
|
|
})
|
|
orderId: number;
|
|
|
|
@ApiProperty({
|
|
description: 'Data do pagamento',
|
|
example: '2024-04-02T10:00:00Z',
|
|
})
|
|
payDate: Date;
|
|
|
|
@ApiProperty({
|
|
description: 'Número do cartão',
|
|
example: '**** **** **** 1234',
|
|
})
|
|
card: string;
|
|
|
|
@ApiProperty({
|
|
description: 'Número de parcelas',
|
|
example: 3,
|
|
})
|
|
installments: number;
|
|
|
|
@ApiProperty({
|
|
description: 'Nome da bandeira',
|
|
example: 'VISA',
|
|
})
|
|
flagName: string;
|
|
|
|
@ApiProperty({
|
|
description: 'Tipo de pagamento',
|
|
example: 'CREDITO',
|
|
})
|
|
type: string;
|
|
|
|
@ApiProperty({
|
|
description: 'Valor do pagamento',
|
|
example: 1000.0,
|
|
})
|
|
amount: number;
|
|
|
|
@ApiProperty({
|
|
description: 'ID do usuário',
|
|
example: '001',
|
|
})
|
|
userId: string;
|
|
|
|
@ApiProperty({
|
|
description: 'NSU da transação',
|
|
example: '123456789',
|
|
})
|
|
nsu: string;
|
|
|
|
@ApiProperty({
|
|
description: 'Código de autorização',
|
|
example: 'A12345',
|
|
})
|
|
auth: string;
|
|
|
|
constructor(partial: Partial<PaymentDto>) {
|
|
Object.assign(this, partial);
|
|
}
|
|
}
|