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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// ======================================
// This file was automatically generated.
// ======================================
use crate::ids::{ClimateProductId};
use crate::params::{Object, Timestamp};
use crate::resources::{ClimateSupplier};
use serde::{Deserialize, Serialize};
/// The resource representing a Stripe "ClimateRemovalsProducts".
///
/// For more details see <https://stripe.com/docs/api/climate/product/object>
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ClimateProduct {
/// Unique identifier for the object.
///
/// For convenience, Climate product IDs are human-readable strings that start with `climsku_`.
/// See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) for a list of available carbon removal products.
pub id: ClimateProductId,
/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
pub created: Timestamp,
/// Current prices for a metric ton of carbon removal in a currency's smallest unit.
pub current_prices_per_metric_ton: ClimateRemovalsProductsPrice,
/// The year in which the carbon removal is expected to be delivered.
pub delivery_year: Option<i64>,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,
/// The quantity of metric tons available for reservation.
pub metric_tons_available: String,
/// The Climate product's name.
pub name: String,
/// The carbon removal suppliers that fulfill orders for this Climate product.
pub suppliers: Vec<ClimateSupplier>,
}
impl Object for ClimateProduct {
type Id = ClimateProductId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"climate.product"
}
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ClimateRemovalsProductsPrice {
/// Fees for one metric ton of carbon removal in the currency's smallest unit.
pub amount_fees: i64,
/// Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.
pub amount_subtotal: i64,
/// Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.
pub amount_total: i64,
}