mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat: add payout service (#1665)
Co-authored-by: Kashif <mohammed.kashif@juspay.in> Co-authored-by: Manoj Ghorela <manoj.ghorela@juspay.in> Co-authored-by: Manoj Ghorela <118727120+manoj-juspay@users.noreply.github.com>
This commit is contained in:
@ -68,6 +68,10 @@ pub trait RouterData {
|
||||
fn get_customer_id(&self) -> Result<String, Error>;
|
||||
fn get_connector_customer_id(&self) -> Result<String, Error>;
|
||||
fn get_preprocessing_id(&self) -> Result<String, Error>;
|
||||
#[cfg(feature = "payouts")]
|
||||
fn get_payout_method_data(&self) -> Result<api::PayoutMethodData, Error>;
|
||||
#[cfg(feature = "payouts")]
|
||||
fn get_quote_id(&self) -> Result<String, Error>;
|
||||
}
|
||||
|
||||
impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Response> {
|
||||
@ -166,6 +170,18 @@ impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Re
|
||||
.to_owned()
|
||||
.ok_or_else(missing_field_err("preprocessing_id"))
|
||||
}
|
||||
#[cfg(feature = "payouts")]
|
||||
fn get_payout_method_data(&self) -> Result<api::PayoutMethodData, Error> {
|
||||
self.payout_method_data
|
||||
.to_owned()
|
||||
.ok_or_else(missing_field_err("payout_method_data"))
|
||||
}
|
||||
#[cfg(feature = "payouts")]
|
||||
fn get_quote_id(&self) -> Result<String, Error> {
|
||||
self.quote_id
|
||||
.to_owned()
|
||||
.ok_or_else(missing_field_err("quote_id"))
|
||||
}
|
||||
}
|
||||
|
||||
pub trait PaymentsPreProcessingData {
|
||||
|
||||
Reference in New Issue
Block a user