diff --git a/src/api/invoice.rs b/src/api/invoice.rs index 87fa668..9f1d2ad 100644 --- a/src/api/invoice.rs +++ b/src/api/invoice.rs @@ -103,7 +103,9 @@ pub struct GetInvoice { impl GetInvoice { /// New constructor. pub fn new(invoice_id: impl ToString) -> Self { - Self { invoice_id: invoice_id.to_string() } + Self { + invoice_id: invoice_id.to_string(), + } } } @@ -172,7 +174,9 @@ pub struct DeleteInvoice { impl DeleteInvoice { /// New constructor. pub fn new(invoice_id: impl ToString) -> Self { - Self { invoice_id: invoice_id.to_string() } + Self { + invoice_id: invoice_id.to_string(), + } } } @@ -255,7 +259,10 @@ pub struct CancelInvoice { impl CancelInvoice { /// New constructor. pub fn new(invoice_id: impl ToString, reason: CancelReason) -> Self { - Self { invoice_id: invoice_id.to_string(), reason } + Self { + invoice_id: invoice_id.to_string(), + reason, + } } } diff --git a/src/api/mod.rs b/src/api/mod.rs index 54be66e..dff5ee0 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -2,4 +2,4 @@ pub mod invoice; pub mod orders; -pub mod payments; \ No newline at end of file +pub mod payments; diff --git a/src/data/common.rs b/src/data/common.rs index 73848bf..63dd087 100644 --- a/src/data/common.rs +++ b/src/data/common.rs @@ -268,4 +268,4 @@ pub struct SellerProtection { pub status: SellerProtectionStatus, /// An array of conditions that are covered for the transaction. pub dispute_categories: Vec, -} \ No newline at end of file +} diff --git a/src/data/payment.rs b/src/data/payment.rs index 2ebe6e1..f24517a 100644 --- a/src/data/payment.rs +++ b/src/data/payment.rs @@ -2,8 +2,7 @@ use serde::{Deserialize, Serialize}; -use super::common::{AuthorizationStatusDetails, Money, SellerProtection, LinkDescription}; - +use super::common::{AuthorizationStatusDetails, LinkDescription, Money, SellerProtection}; /// Payment Status #[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Clone, Copy)] @@ -52,4 +51,4 @@ pub struct AuthorizedPaymentDetails { pub create_time: chrono::DateTime, /// The date and time when the transaction was last updated pub update_time: chrono::DateTime, -} \ No newline at end of file +} diff --git a/src/lib.rs b/src/lib.rs index d30b9a6..2d2f703 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! [![Docs](https://docs.rs/paypal-rs/badge.svg)](https://docs.rs/paypal-rs) //! //! A rust library that wraps the [paypal api](https://developer.paypal.com/docs/api) asynchronously in a strongly typed manner. -//! +//! //! If there is a missing endpoint that you need, you may try to implement the [Endpoint](endpoint::Endpoint) and pass it to [Client::execute](client::Client::execute) //! //! Currently in early development.