Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperswitch-bot[bot] committed Dec 23, 2024
1 parent deb2edb commit 1e0ba96
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 98 deletions.
17 changes: 9 additions & 8 deletions crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
pub mod transformers;

use crate::{
constants::headers,
types::ResponseRouterData,
utils::{self, PaymentMethodDataType, RefundsRequestData},
};
use std::fmt::Debug;

use base64::Engine;
use common_enums::enums;
use common_utils::{
Expand All @@ -14,7 +11,6 @@ use common_utils::{
request::{Method, Request, RequestBuilder, RequestContent},
};
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::types::RefundsRouterData;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{AccessToken, ErrorResponse, RouterData},
Expand All @@ -31,7 +27,7 @@ use hyperswitch_domain_models::{
router_response_types::{PaymentsResponseData, RefundsResponseData},
types::{
PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
PaymentsSyncRouterData, RefundSyncRouterData, SetupMandateRouterData,
PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData, SetupMandateRouterData,
},
};
use hyperswitch_interfaces::{
Expand All @@ -47,11 +43,16 @@ use hyperswitch_interfaces::{
};
use masking::{ExposeInterface, Mask, Maskable, PeekInterface};
use ring::{digest, hmac};
use std::fmt::Debug;
use time::OffsetDateTime;
use transformers as bankofamerica;
use url::Url;

use crate::{
constants::headers,
types::ResponseRouterData,
utils::{self, PaymentMethodDataType, RefundsRequestData},
};

pub const V_C_MERCHANT_ID: &str = "v-c-merchant-id";

#[derive(Debug, Clone)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
use crate::{
types::{RefundsResponseRouterData, ResponseRouterData},
unimplemented_payment_method,
utils::{
self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
RouterData as OtherRouterData,
},
};
use base64::Engine;
use common_enums::{enums, FutureUsage};
use common_utils::consts;
use common_utils::pii;
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;

use common_utils::{consts, pii};
use hyperswitch_domain_models::{
payment_method_data::{ApplePayWalletData, GooglePayWalletData, PaymentMethodData, WalletData},
router_data::{
Expand All @@ -33,6 +19,19 @@ use hyperswitch_domain_models::{
},
};
use hyperswitch_interfaces::{api, errors};
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;

use crate::{
types::{RefundsResponseRouterData, ResponseRouterData},
unimplemented_payment_method,
utils::{
self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
RouterData as OtherRouterData,
},
};
pub struct BankOfAmericaAuthType {
pub(super) api_key: Secret<String>,
pub(super) merchant_account: Secret<String>,
Expand Down
13 changes: 5 additions & 8 deletions crates/hyperswitch_connectors/src/connectors/cybersource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@ pub mod transformers;

use base64::Engine;
use common_enums::enums;
use common_utils::types::{
AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector,
};
use common_utils::{
consts,
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector},
};
use error_stack::{report, Report, ResultExt};
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::{router_flow_types::payouts::PoFulfill, types::PayoutsRouterData};
#[cfg(feature = "payouts")]
use hyperswitch_interfaces::types::PayoutFulfillType;

use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{AccessToken, ErrorResponse, RouterData},
Expand Down Expand Up @@ -47,6 +40,10 @@ use hyperswitch_domain_models::{
SetupMandateRouterData,
},
};
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::{router_flow_types::payouts::PoFulfill, types::PayoutsRouterData};
#[cfg(feature = "payouts")]
use hyperswitch_interfaces::types::PayoutFulfillType;
use hyperswitch_interfaces::{
api::{
self,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use api_models::payments;
#[cfg(feature = "payouts")]
use api_models::payouts::PayoutMethodData;

use base64::Engine;
use common_enums::{enums, FutureUsage};
use common_utils::{
Expand Down Expand Up @@ -44,19 +43,16 @@ use hyperswitch_domain_models::{
PaymentsPreProcessingRouterData, RefundsRouterData, SetupMandateRouterData,
},
};

use hyperswitch_interfaces::{api, errors};
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use utils::ForeignTryFrom;

#[cfg(feature = "payouts")]
use crate::utils::PayoutsData;

#[cfg(feature = "payouts")]
use crate::types::PayoutsResponseRouterData;

#[cfg(feature = "payouts")]
use crate::utils::PayoutsData;
use crate::{
types::{RefundsResponseRouterData, ResponseRouterData},
unimplemented_payment_method,
Expand Down
4 changes: 1 addition & 3 deletions crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ pub mod transformers;

use base64::Engine;
use common_enums::enums;
use common_utils::types::{
AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector,
};
use common_utils::{
consts,
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector},
};
use error_stack::{report, Report, ResultExt};
use hyperswitch_domain_models::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
use api_models::payments;
use base64::Engine;
use masking::{ExposeInterface, PeekInterface, Secret};
use serde_json::Value;

use crate::{
types::{RefundsResponseRouterData, ResponseRouterData},
unimplemented_payment_method,
utils::{
self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
RouterData as OtherRouterData,
},
};
use common_enums::{enums, FutureUsage};
use common_utils::{
consts, pii,
Expand Down Expand Up @@ -41,7 +29,19 @@ use hyperswitch_domain_models::{
},
};
use hyperswitch_interfaces::{api, errors};
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;

use crate::{
types::{RefundsResponseRouterData, ResponseRouterData},
unimplemented_payment_method,
utils::{
self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
RouterData as OtherRouterData,
},
};

#[derive(Debug, Serialize)]
pub struct WellsfargoRouterData<T> {
Expand Down
Loading

0 comments on commit 1e0ba96

Please sign in to comment.