square_rust/api/models/objects/
external_details.rs

1//! ExternalDetails
2
3use serde::{Deserialize, Serialize};
4
5use crate::api::models::enums::external_details_type::ExternalDetailsType;
6use crate::api::models::objects::money::Money;
7
8/// Stores details about an external payment.
9#[derive(Debug, Clone, Serialize, Deserialize)]
10#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
11pub struct ExternalDetails {
12    /// The type of external payment the seller received.
13    pub type_: ExternalDetailsType,
14    /// A description of the external payment source. For example, "Food Delivery Service".
15    pub source: String,
16    /// An ID to associate this payment to its originating source.
17    pub id: Option<String>,
18    /// The fees paid to the source. The amount_money minus this field is the net amount sellers receive.
19    pub source_fee_money: Option<Money>,
20}