paypal_rust/resources/
capture.rs

1use serde::{Deserialize, Serialize};
2
3use crate::resources::capture_status_details::CaptureStatusDetails;
4use crate::resources::enums::disembursement_mode::DisbursementMode;
5use crate::resources::link_description::LinkDescription;
6use crate::resources::money::Money;
7use crate::resources::processor_response::ProcessorResponse;
8use crate::resources::seller_protection::SellerProtection;
9use crate::resources::seller_recievable_breakdown::SellerReceivableBreakdown;
10
11#[derive(Clone, Debug, Default, Deserialize, Serialize)]
12pub struct Capture {
13    /// The status of the captured payment.
14    pub status: String,
15
16    /// The details of the captured payment status.
17    pub status_details: Option<CaptureStatusDetails>,
18
19    /// The amount for this captured payment.
20    pub amount: Money,
21
22    /// The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions.
23    /// Appears in transaction and settlement reports.
24    pub custom_id: Option<String>,
25
26    /// The funds that are held on behalf of the merchant.
27    pub disbursement_mode: Option<DisbursementMode>,
28
29    /// Indicates whether you can make additional captures against the authorized payment. Set to true if you do not intend to capture
30    /// additional payments against the authorization. Set to false if you intend to capture additional payments against the authorization.
31    pub final_capture: bool,
32
33    /// The PayPal-generated ID for the captured payment.
34    pub id: String,
35
36    /// The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the
37    /// emails that the payer receives.
38    pub invoice_id: Option<String>,
39
40    /// An array of related HATEOAS links.
41    pub links: Vec<LinkDescription>,
42
43    /// An object that provides additional processor information for a direct credit card transaction.
44    pub processor_response: Option<ProcessorResponse>,
45
46    /// The level of protection offered as defined by PayPal Seller Protection for Merchants.
47    pub seller_protection: SellerProtection,
48
49    /// The detailed breakdown of the capture activity. This is not available for transactions that are in pending state.
50    pub seller_receivable_breakdown: Option<SellerReceivableBreakdown>,
51
52    /// The date and time when the transaction occurred, in Internet date and time format.
53    pub create_time: String,
54
55    /// The date and time when the transaction was last updated, in Internet date and time format.
56    pub update_time: String,
57}