refactor: Rename business profile to profiles in api, diesel, domain, interface and error types (#5877)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Arun Raj M
2024-09-19 23:30:25 +05:30
committed by GitHub
parent f4fa4cdab4
commit dee91b366a
99 changed files with 2243 additions and 2255 deletions

View File

@ -52,7 +52,7 @@ const OUTGOING_WEBHOOK_TIMEOUT_SECS: u64 = 5;
pub(crate) async fn create_event_and_trigger_outgoing_webhook(
state: SessionState,
merchant_account: domain::MerchantAccount,
business_profile: domain::BusinessProfile,
business_profile: domain::Profile,
merchant_key_store: &domain::MerchantKeyStore,
event_type: enums::EventType,
event_class: enums::EventClass,
@ -196,7 +196,7 @@ pub(crate) async fn create_event_and_trigger_outgoing_webhook(
#[instrument(skip_all)]
pub(crate) async fn trigger_webhook_and_raise_event(
state: SessionState,
business_profile: domain::BusinessProfile,
business_profile: domain::Profile,
merchant_key_store: &domain::MerchantKeyStore,
event: domain::Event,
request_content: OutgoingWebhookRequestContent,
@ -236,7 +236,7 @@ pub(crate) async fn trigger_webhook_and_raise_event(
async fn trigger_webhook_to_merchant(
state: SessionState,
business_profile: domain::BusinessProfile,
business_profile: domain::Profile,
merchant_key_store: &domain::MerchantKeyStore,
event: domain::Event,
request_content: OutgoingWebhookRequestContent,
@ -517,7 +517,7 @@ async fn raise_webhooks_analytics_event(
pub(crate) async fn add_outgoing_webhook_retry_task_to_process_tracker(
db: &dyn StorageInterface,
business_profile: &domain::BusinessProfile,
business_profile: &domain::Profile,
event: &domain::Event,
) -> CustomResult<storage::ProcessTracker, errors::StorageError> {
let schedule_time = outgoing_webhook_retry::get_webhook_delivery_retry_schedule_time(
@ -581,7 +581,7 @@ pub(crate) async fn add_outgoing_webhook_retry_task_to_process_tracker(
}
fn get_webhook_url_from_business_profile(
business_profile: &domain::BusinessProfile,
business_profile: &domain::Profile,
) -> CustomResult<String, errors::WebhooksFlowError> {
let webhook_details = business_profile
.webhook_details
@ -599,12 +599,12 @@ fn get_webhook_url_from_business_profile(
pub(crate) fn get_outgoing_webhook_request(
merchant_account: &domain::MerchantAccount,
outgoing_webhook: api::OutgoingWebhook,
business_profile: &domain::BusinessProfile,
business_profile: &domain::Profile,
) -> CustomResult<OutgoingWebhookRequestContent, errors::WebhooksFlowError> {
#[inline]
fn get_outgoing_webhook_request_inner<WebhookType: types::OutgoingWebhookType>(
outgoing_webhook: api::OutgoingWebhook,
business_profile: &domain::BusinessProfile,
business_profile: &domain::Profile,
) -> CustomResult<OutgoingWebhookRequestContent, errors::WebhooksFlowError> {
let mut headers = vec![(
reqwest::header::CONTENT_TYPE.to_string(),