1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ======================================
// This file was automatically generated.
// ======================================
use serde_derive::{Deserialize, Serialize};
use crate::ids::BitcoinTransactionId;
use crate::params::{Object, Timestamp};
use crate::resources::Currency;
/// The resource representing a Stripe "BitcoinTransaction".
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct BitcoinTransaction {
/// Unique identifier for the object.
pub id: BitcoinTransactionId,
/// The amount of `currency` that the transaction was converted to in real-time.
pub amount: i64,
/// The amount of bitcoin contained in the transaction.
pub bitcoin_amount: i64,
/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
pub created: Timestamp,
/// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted.
pub currency: Currency,
/// The receiver to which this transaction was sent.
pub receiver: String,
}
impl Object for BitcoinTransaction {
type Id = BitcoinTransactionId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"bitcoin_transaction"
}
}