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:
Kashif
2023-07-19 23:32:05 +05:30
committed by GitHub
parent e0f4507b10
commit 763e2df3bd
86 changed files with 9326 additions and 221 deletions

View File

@ -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 {