UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

32 lines (31 loc) 1.05 kB
import RefundAmountType from "../constants/refund-amount-type.js"; import RefundStatus from "../constants/refund-status.js"; import TRefundErrorReason from "../interfaces/refund-error-reason.js"; interface IParams { refundId?: string; reason?: string; errorReason?: TRefundErrorReason; refundAmountType?: RefundAmountType; type?: string; } /** * Refund entity * @TODO Refund don't have pure relation to the transaction cause, cause: * 1. Transaction id is not unique (presented as debit and credit transactions) * 2. If relation will be refer to the transaction pk id, refunds will be duplicated for both transaction types */ declare class Refund { id: string; transactionId: string; amount: number; /** * Uses for creating relation for partial refund transaction that contain 2 or more * nested entities that were paid in single transaction */ entityId: string | null; params: IParams; status: RefundStatus; createdAt: Date; updatedAt: Date; } export { Refund as default };