From 214893e40f29b73e610502dc359537a704c82731 Mon Sep 17 00:00:00 2001 From: Pro Date: Wed, 21 Sep 2022 19:21:19 +0200 Subject: [PATCH] Update the capture response structures --- src/data/orders.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/data/orders.rs b/src/data/orders.rs index 4519017..1a6ce8c 100644 --- a/src/data/orders.rs +++ b/src/data/orders.rs @@ -716,13 +716,27 @@ pub struct WalletResponse { pub apple_pay: CardResponse, } +/// The paypal account used to fund the transaction. +#[derive(Debug, Serialize, Deserialize, Clone)] +pub struct PaypalPaymentSourceResponse { + /// The name of the payer. + pub name: PayerName, + /// The email address of the payer. + pub email_address: String, + /// The account id of the payer. + pub account_id: String, +} + /// The payment source used to fund the payment. #[derive(Debug, Serialize, Deserialize)] pub struct PaymentSourceResponse { /// The payment card to use to fund a payment. Card can be a credit or debit card - pub card: CardResponse, + pub card: Option, /// The customer's wallet used to fund the transaction. - pub wallet: WalletResponse, + pub wallet: Option, + + /// The paypal account used to fund the transaction. + pub paypal: Option, } /// The status of an order.