feat(payouts): Add Wallet to Payouts (#3502)

This commit is contained in:
Sakil Mostak
2024-02-07 12:21:57 +05:30
committed by GitHub
parent 7be86ecb33
commit 3af6aaf28e
23 changed files with 427 additions and 102 deletions

View File

@ -157,6 +157,7 @@ pub struct PayoutCreateRequest {
pub enum PayoutMethodData {
Card(Card),
Bank(Bank),
Wallet(Wallet),
}
impl Default for PayoutMethodData {
@ -262,6 +263,19 @@ pub struct SepaBankTransfer {
pub bic: Option<Secret<String>>,
}
#[derive(Eq, PartialEq, Clone, Debug, Deserialize, Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum Wallet {
Paypal(Paypal),
}
#[derive(Default, Eq, PartialEq, Clone, Debug, Deserialize, Serialize, ToSchema)]
pub struct Paypal {
/// Email linked with paypal account
#[schema(value_type = String, example = "john.doe@example.com")]
pub email: Option<Email>,
}
#[derive(Debug, ToSchema, Clone, Serialize)]
#[serde(deny_unknown_fields)]
pub struct PayoutCreateResponse {