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

@ -17,6 +17,7 @@ use image::Luma;
use nanoid::nanoid;
use qrcode;
use serde::de::DeserializeOwned;
use uuid::Uuid;
pub use self::ext_traits::{OptionExt, ValidateCall};
use crate::{
@ -76,6 +77,11 @@ pub fn generate_id(length: usize, prefix: &str) -> String {
format!("{}_{}", prefix, nanoid!(length, &consts::ALPHABETS))
}
#[inline]
pub fn generate_uuid() -> String {
Uuid::new_v4().to_string()
}
pub trait ConnectorResponseExt: Sized {
fn get_response(self) -> RouterResult<types::Response>;
fn get_error_response(self) -> RouterResult<types::Response>;