mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-02 02:23:25 +00:00
fix(billing): ceil CBE invoice amounts to whole birr
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
IsEnum,
|
||||
IsIn,
|
||||
IsInt,
|
||||
IsISO8601,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsPositive,
|
||||
IsString,
|
||||
@@ -37,7 +37,9 @@ export class PaymentEventDto {
|
||||
@ApiProperty() @IsString() referenceId!: string;
|
||||
@ApiProperty() @IsString() merchantOrderId!: string;
|
||||
@ApiProperty({ enum: ProviderMethod }) @IsEnum(ProviderMethod) provider!: string;
|
||||
@ApiProperty() @IsInt() @IsPositive() amountMinor!: number;
|
||||
// Major units, fractional (payment-api stores it as double precision) — an
|
||||
// invoice of 12345.67 must not be rejected by an integer-only validator.
|
||||
@ApiProperty() @IsNumber() @IsPositive() amountMinor!: number;
|
||||
@ApiProperty() @IsString() currency!: string;
|
||||
|
||||
@ApiPropertyOptional() @IsOptional() @IsString() providerTxnId?: string;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Injectable, Logger, SetMetadata } from "@nestjs/common";
|
||||
import { Nack, RabbitSubscribe } from "@golevelup/nestjs-rabbitmq";
|
||||
import { Public } from "@edr/api-common";
|
||||
import { IgnoreLoggerAudit } from "@tria-plc/auditlog";
|
||||
import {
|
||||
PAYMENT_EVENTS_DLX,
|
||||
PAYMENT_EVENTS_EXCHANGE,
|
||||
|
||||
Reference in New Issue
Block a user