feat(events): add extracted fields based on req/res types (#2795)

This commit is contained in:
Sampras Lopes
2023-11-08 21:31:53 +05:30
committed by GitHub
parent 25a73c29a4
commit 89857941b0
40 changed files with 664 additions and 69 deletions

View File

@ -0,0 +1,74 @@
pub mod customer;
pub mod payment;
#[cfg(feature = "payouts")]
pub mod payouts;
pub mod refund;
pub mod routing;
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
impl_misc_api_event_type,
};
use crate::{
admin::*, api_keys::*, cards_info::*, disputes::*, files::*, mandates::*, payment_methods::*,
payments::*, verifications::*,
};
impl ApiEventMetric for TimeRange {}
impl_misc_api_event_type!(
PaymentMethodId,
PaymentsSessionResponse,
PaymentMethodListResponse,
PaymentMethodCreate,
PaymentLinkInitiateRequest,
RetrievePaymentLinkResponse,
MandateListConstraints,
CreateFileResponse,
DisputeResponse,
SubmitEvidenceRequest,
MerchantConnectorResponse,
MerchantConnectorId,
MandateResponse,
MandateRevokedResponse,
RetrievePaymentLinkRequest,
MandateId,
DisputeListConstraints,
RetrieveApiKeyResponse,
BusinessProfileResponse,
BusinessProfileUpdate,
BusinessProfileCreate,
RevokeApiKeyResponse,
ToggleKVResponse,
ToggleKVRequest,
MerchantAccountDeleteResponse,
MerchantAccountUpdate,
CardInfoResponse,
CreateApiKeyResponse,
CreateApiKeyRequest,
MerchantConnectorDeleteResponse,
MerchantConnectorUpdate,
MerchantConnectorCreate,
MerchantId,
CardsInfoRequest,
MerchantAccountResponse,
MerchantAccountListRequest,
MerchantAccountCreate,
PaymentsSessionRequest,
ApplepayMerchantVerificationRequest,
ApplepayMerchantResponse,
ApplepayVerifiedDomainsResponse,
UpdateApiKeyRequest
);
#[cfg(feature = "stripe")]
impl_misc_api_event_type!(
StripeSetupIntentResponse,
StripeRefundResponse,
StripePaymentIntentListResponse,
StripePaymentIntentResponse,
CustomerDeleteResponse,
CustomerPaymentMethodListResponse,
CreateCustomerResponse
);