pub struct BillingCycle {Show 20 fields
pub id: Uuid,
pub subscription_id: SubscriptionId,
pub cycle_number: i32,
pub status: BillingCycleStatus,
pub period_start: DateTime<Utc>,
pub period_end: DateTime<Utc>,
pub billed_at: Option<DateTime<Utc>>,
pub subtotal: Decimal,
pub discount: Decimal,
pub tax: Decimal,
pub total: Decimal,
pub currency: CurrencyCode,
pub payment_id: Option<String>,
pub order_id: Option<OrderId>,
pub invoice_id: Option<Uuid>,
pub failure_reason: Option<String>,
pub retry_count: i32,
pub next_retry_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A billing cycle/period for a subscription
Fields§
§id: Uuid§subscription_id: SubscriptionId§cycle_number: i32Cycle number (1, 2, 3, …)
status: BillingCycleStatus§period_start: DateTime<Utc>§period_end: DateTime<Utc>§billed_at: Option<DateTime<Utc>>When billing was attempted
subtotal: Decimal§discount: Decimal§tax: Decimal§total: Decimal§currency: CurrencyCode§payment_id: Option<String>Payment ID from payment provider
order_id: Option<OrderId>Order ID if an order was created
invoice_id: Option<Uuid>Invoice ID if an invoice was created
failure_reason: Option<String>§retry_count: i32§next_retry_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl BillingCycle
impl BillingCycle
Trait Implementations§
Source§impl Clone for BillingCycle
impl Clone for BillingCycle
Source§fn clone(&self) -> BillingCycle
fn clone(&self) -> BillingCycle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BillingCycle
impl Debug for BillingCycle
Source§impl<'de> Deserialize<'de> for BillingCycle
impl<'de> Deserialize<'de> for BillingCycle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BillingCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BillingCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BillingCycle
impl Serialize for BillingCycle
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BillingCycle
impl RefUnwindSafe for BillingCycle
impl Send for BillingCycle
impl Sync for BillingCycle
impl Unpin for BillingCycle
impl UnsafeUnpin for BillingCycle
impl UnwindSafe for BillingCycle
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