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 20, 2024
1 parent b23cb2b commit 37ec9b0
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 89 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,7 +19,20 @@ use hyperswitch_domain_models::{
},
};
use hyperswitch_interfaces::{api, errors};
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use utils::ForeignFrom;

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
4 changes: 1 addition & 3 deletions crates/hyperswitch_connectors/src/connectors/cybersource.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,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 @@ -46,12 +45,10 @@ use serde::{Deserialize, Serialize};
use serde_json::Value;
use utils::{ForeignFrom, 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,9 +29,21 @@ use hyperswitch_domain_models::{
},
};
use hyperswitch_interfaces::{api, errors};
use masking::{ExposeInterface, PeekInterface, Secret};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use utils::{ForeignFrom, ForeignTryFrom};

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> {
pub amount: StringMajorUnit,
Expand Down
Loading

0 comments on commit 37ec9b0

Please sign in to comment.