pub struct Overview {
pub total_revenue: u64,
pub active_subscriptions: u32,
pub inactive_subscriptions: u32,
pub total_plans: u32,
pub monthly_revenue: u64,
pub monthly_new_subscriptions: u32,
pub monthly_canceled_subscriptions: u32,
pub average_revenue_per_user: u64,
pub merchant_authority: Pubkey,
pub usdc_mint: Pubkey,
}Expand description
Overview statistics for a merchant dashboard
Fields§
§total_revenue: u64Total revenue earned (in USDC microlamports)
active_subscriptions: u32Number of active subscriptions
inactive_subscriptions: u32Number of inactive subscriptions
total_plans: u32Total number of plans
monthly_revenue: u64Revenue this month (in USDC microlamports)
monthly_new_subscriptions: u32New subscriptions this month
monthly_canceled_subscriptions: u32Canceled subscriptions this month
average_revenue_per_user: u64Average revenue per user (in USDC microlamports)
Merchant authority address
usdc_mint: PubkeyUSDC mint being used
Implementations§
Source§impl Overview
impl Overview
Sourcepub fn total_revenue_formatted(&self) -> f64
pub fn total_revenue_formatted(&self) -> f64
Get total revenue formatted as USDC (6 decimal places)
Sourcepub fn monthly_revenue_formatted(&self) -> f64
pub fn monthly_revenue_formatted(&self) -> f64
Get monthly revenue formatted as USDC (6 decimal places)
Sourcepub fn average_revenue_per_user_formatted(&self) -> f64
pub fn average_revenue_per_user_formatted(&self) -> f64
Get average revenue per user formatted as USDC (6 decimal places)
Sourcepub fn churn_rate(&self) -> f64
pub fn churn_rate(&self) -> f64
Calculate churn rate as a percentage
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Overview
impl<'de> Deserialize<'de> for Overview
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
impl StructuralPartialEq for Overview
Auto Trait Implementations§
impl Freeze for Overview
impl RefUnwindSafe for Overview
impl Send for Overview
impl Sync for Overview
impl Unpin for Overview
impl UnwindSafe for Overview
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more