Struct stripe::BalanceTransaction
source · [−]pub struct BalanceTransaction {Show 14 fields
pub id: BalanceTransactionId,
pub amount: i64,
pub available_on: Timestamp,
pub created: Timestamp,
pub currency: Currency,
pub description: Option<String>,
pub exchange_rate: Option<f64>,
pub fee: i64,
pub fee_details: Vec<Fee>,
pub net: i64,
pub reporting_category: String,
pub source: Option<Expandable<BalanceTransactionSourceUnion>>,
pub status: BalanceTransactionStatus,
pub type_: BalanceTransactionType,
}
Expand description
The resource representing a Stripe “BalanceTransaction”.
For more details see https://stripe.com/docs/api/balance_transactions/object
Fields
id: BalanceTransactionId
Unique identifier for the object.
amount: i64
Gross amount of the transaction, in %s.
available_on: Timestamp
The date the transaction’s net funds will become available in the Stripe balance.
created: Timestamp
Time at which the object was created.
Measured in seconds since the Unix epoch.
currency: Currency
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
description: Option<String>
An arbitrary string attached to the object.
Often useful for displaying to users.
exchange_rate: Option<f64>
The exchange rate used, if applicable, for this transaction.
Specifically, if money was converted from currency A to currency B, then the amount
in currency A, times exchange_rate
, would be the amount
in currency B.
For example, suppose you charged a customer 10.00 EUR.
Then the PaymentIntent’s amount
would be 1000
and currency
would be eur
.
Suppose this was converted into 12.34 USD in your Stripe account.
Then the BalanceTransaction’s amount
would be 1234
, currency
would be usd
, and exchange_rate
would be 1.234
.
fee: i64
Fees (in %s) paid for this transaction.
fee_details: Vec<Fee>
Detailed breakdown of fees (in %s) paid for this transaction.
net: i64
Net amount of the transaction, in %s.
reporting_category: String
Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
source: Option<Expandable<BalanceTransactionSourceUnion>>
The Stripe object to which this transaction is related.
status: BalanceTransactionStatus
If the transaction’s net funds are available in the Stripe balance yet.
Either available
or pending
.
type_: BalanceTransactionType
Transaction type: adjustment
, advance
, advance_funding
, anticipation_repayment
, application_fee
, application_fee_refund
, charge
, connect_collection_transfer
, contribution
, issuing_authorization_hold
, issuing_authorization_release
, issuing_dispute
, issuing_transaction
, payment
, payment_failure_refund
, payment_refund
, payout
, payout_cancel
, payout_failure
, refund
, refund_failure
, reserve_transaction
, reserved_funds
, stripe_fee
, stripe_fx_fee
, tax_fee
, topup
, topup_reversal
, transfer
, transfer_cancel
, transfer_failure
, or transfer_refund
.
Learn more about balance transaction types and what they represent.
If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category
instead.
Implementations
sourceimpl BalanceTransaction
impl BalanceTransaction
sourcepub fn list(
client: &Client,
params: &ListBalanceTransactions<'_>
) -> Response<List<BalanceTransaction>>
pub fn list(
client: &Client,
params: &ListBalanceTransactions<'_>
) -> Response<List<BalanceTransaction>>
Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth).
The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history
.
sourcepub fn retrieve(
client: &Client,
id: &BalanceTransactionId,
expand: &[&str]
) -> Response<BalanceTransaction>
pub fn retrieve(
client: &Client,
id: &BalanceTransactionId,
expand: &[&str]
) -> Response<BalanceTransaction>
Retrieves the balance transaction with the given ID.
Note that this endpoint previously used the path /v1/balance/history/:id
.
Trait Implementations
sourceimpl Clone for BalanceTransaction
impl Clone for BalanceTransaction
sourcefn clone(&self) -> BalanceTransaction
fn clone(&self) -> BalanceTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BalanceTransaction
impl Debug for BalanceTransaction
sourceimpl Default for BalanceTransaction
impl Default for BalanceTransaction
sourcefn default() -> BalanceTransaction
fn default() -> BalanceTransaction
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for BalanceTransaction
impl<'de> Deserialize<'de> for BalanceTransaction
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Object for BalanceTransaction
impl Object for BalanceTransaction
sourceimpl Serialize for BalanceTransaction
impl Serialize for BalanceTransaction
Auto Trait Implementations
impl RefUnwindSafe for BalanceTransaction
impl Send for BalanceTransaction
impl Sync for BalanceTransaction
impl Unpin for BalanceTransaction
impl UnwindSafe for BalanceTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more