@vulog/aima-billing
Version:
86 lines (82 loc) • 2.12 kB
text/typescript
import { UUID } from 'crypto';
export type ChargeProductInfo = {
productId: string;
serviceId?: string;
amount: number;
userId: string;
entityId: string;
subscriptionId?: string;
productNotes?: string;
originId?: string;
chargeProductRequestId?: string;
};
export type Invoice = {
id: string;
sequence: number;
refundSequence?: number;
userId: string;
pricingId?: string;
tripId?: string;
invoiceDate: string;
updateDate: string;
fleetId: string;
invoiceYear: number;
invoicesStatus:
| 'PENDING'
| 'PAID'
| 'REFUSED'
| 'ERROR'
| 'REFUNDED'
| 'CANCELLED'
| 'PENDING_EXTERNAL_PAYMENT'
| 'PENDING_MANUAL_PAYMENT'
| 'PENDING_AUTHENTICATION'
| 'MOP_MISSING';
amount: number;
productId?: string;
currency: string;
serviceId?: string;
tokenId?: string;
entityId: string;
amountPayWithSystemCredit?: number;
attempts: number;
pspName?: string;
pspReference: string;
withTaxRefundAmount: number;
isRefunded?: boolean;
paymentInProgress: boolean;
subscriptionId?: string;
paymentDate?: string;
externalPaymentRequesterId?: string;
externalPaymentNotes?: string;
isPaidExternally?: boolean;
refundInProgress?: boolean;
originId?: string;
originRole?: string;
pspIdempotency: string;
paidExternally?: boolean;
refunded?: boolean;
productTaxIncluded?: boolean;
pspReferencePreAuth?: string;
amountPreAuth?: number;
preAuthEnabled?: boolean;
[key: string]: any;
};
export type Credit = {
initialAmount: number;
validityStartDate: string;
validityEndDate: string;
notes: string;
discountCategory: 'CREDITS' | 'PERCENTAGE';
oneTimeUsage: boolean;
id: UUID;
availableAmount: number;
usedAmount: number;
originId: UUID;
entityId: UUID;
creditAlreadyUsed: boolean;
updateDate: string;
type: 'LOCAL' | 'GLOBAL' | 'PERIODIC';
usage: 'TRIP' | 'REGISTRATION' | 'PRODUCTS' | 'ALL';
[key: string]: any;
};