feat: Capture payment (#6601)
* feat: Capture payment * add amount to workflow input
This commit is contained in:
@@ -182,6 +182,26 @@ export interface FilterablePaymentSessionProps
|
||||
deleted_at?: OperatorMap<string>
|
||||
}
|
||||
|
||||
export interface FilterableCaptureProps extends BaseFilterable<CaptureDTO> {
|
||||
id?: string | string[]
|
||||
currency_code?: string | string[]
|
||||
amount?: number | OperatorMap<number>
|
||||
payment_id?: string | string[]
|
||||
created_at?: OperatorMap<string>
|
||||
updated_at?: OperatorMap<string>
|
||||
deleted_at?: OperatorMap<string>
|
||||
}
|
||||
|
||||
export interface FilterableRefundProps extends BaseFilterable<RefundDTO> {
|
||||
id?: string | string[]
|
||||
currency_code?: string | string[]
|
||||
amount?: number | OperatorMap<number>
|
||||
payment_id?: string | string[]
|
||||
created_at?: OperatorMap<string>
|
||||
updated_at?: OperatorMap<string>
|
||||
deleted_at?: OperatorMap<string>
|
||||
}
|
||||
|
||||
/* ********** PAYMENT ********** */
|
||||
export interface PaymentDTO {
|
||||
/**
|
||||
|
||||
@@ -144,7 +144,7 @@ export interface CreateCaptureDTO {
|
||||
/**
|
||||
* The amount of the capture.
|
||||
*/
|
||||
amount: number
|
||||
amount?: number
|
||||
|
||||
/**
|
||||
* The associated payment's ID.
|
||||
@@ -164,7 +164,7 @@ export interface CreateRefundDTO {
|
||||
/**
|
||||
* The amount of the refund.
|
||||
*/
|
||||
amount: number
|
||||
amount?: number
|
||||
|
||||
/**
|
||||
* The associated payment's ID.
|
||||
|
||||
@@ -2,14 +2,18 @@ import { FindConfig } from "../common"
|
||||
import { IModuleService } from "../modules-sdk"
|
||||
import { Context } from "../shared-context"
|
||||
import {
|
||||
CaptureDTO,
|
||||
FilterableCaptureProps,
|
||||
FilterablePaymentCollectionProps,
|
||||
FilterablePaymentProps,
|
||||
FilterablePaymentProviderProps,
|
||||
FilterablePaymentSessionProps,
|
||||
FilterableRefundProps,
|
||||
PaymentCollectionDTO,
|
||||
PaymentDTO,
|
||||
PaymentProviderDTO,
|
||||
PaymentSessionDTO,
|
||||
RefundDTO,
|
||||
} from "./common"
|
||||
import {
|
||||
CreateCaptureDTO,
|
||||
@@ -402,6 +406,18 @@ export interface IPaymentModuleService extends IModuleService {
|
||||
sharedContext?: Context
|
||||
): Promise<PaymentProviderDTO[]>
|
||||
|
||||
listCaptures(
|
||||
filters?: FilterableCaptureProps,
|
||||
config?: FindConfig<CaptureDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<CaptureDTO[]>
|
||||
|
||||
listRefunds(
|
||||
filters?: FilterableRefundProps,
|
||||
config?: FindConfig<RefundDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<RefundDTO[]>
|
||||
|
||||
/* ********** HOOKS ********** */
|
||||
|
||||
processEvent(data: ProviderWebhookPayload): Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user