pub struct UsageRecord {
pub id: String,
pub livemode: bool,
pub object: String,
pub quantity: i64,
pub subscription_item: String,
pub timestamp: i64,
}Expand description
Usage records allow you to report customer usage and metrics to Stripe for metered billing of subscription prices.
Related guide: Metered billing
Fields§
§id: StringUnique identifier for the object.
livemode: boolHas the value true if the object exists in live mode or the value false if the object exists in test mode.
object: StringString representing the object’s type. Objects of the same type share the same value.
quantity: i64The usage quantity for the specified date.
subscription_item: StringThe ID of the subscription item this usage record contains data for.
timestamp: i64The timestamp when this usage occurred.
Trait Implementations§
Source§impl Clone for UsageRecord
impl Clone for UsageRecord
Source§fn clone(&self) -> UsageRecord
fn clone(&self) -> UsageRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UsageRecord
impl Debug for UsageRecord
Source§impl Default for UsageRecord
impl Default for UsageRecord
Source§fn default() -> UsageRecord
fn default() -> UsageRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UsageRecord
impl<'de> Deserialize<'de> for UsageRecord
Source§fn 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
Source§impl Display for UsageRecord
impl Display for UsageRecord
Auto Trait Implementations§
impl Freeze for UsageRecord
impl RefUnwindSafe for UsageRecord
impl Send for UsageRecord
impl Sync for UsageRecord
impl Unpin for UsageRecord
impl UnwindSafe for UsageRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more