generated from OBJNULL/Dockerized-Rust
Added documentation to start
This commit is contained in:
parent
e8d5a06bc8
commit
9892b663d2
2 changed files with 29 additions and 0 deletions
|
@ -54,6 +54,23 @@ impl Backend {
|
||||||
pub fn get_memberships(&self) -> Vec<String> {
|
pub fn get_memberships(&self) -> Vec<String> {
|
||||||
self.memberships.clone()
|
self.memberships.clone()
|
||||||
}
|
}
|
||||||
|
/// Calculates the Prorate with the given parameters
|
||||||
|
///
|
||||||
|
/// Memberships need to be in the format of: _"MEMBERSHIPNAME ($PRI.CE)"_
|
||||||
|
///
|
||||||
|
/// # Arguments
|
||||||
|
/// * `current_membership` - The text content of what current membership you have
|
||||||
|
/// * `new_membership` - The text content of what new membership you're getting
|
||||||
|
/// * `last_billing` - The date of the last time the customer got billed _(mm/dd/yyyy)_
|
||||||
|
///
|
||||||
|
/// # Examples
|
||||||
|
/// ```rs
|
||||||
|
/// let result = calculator.start(
|
||||||
|
/// "Super ($41.99)".to_string(),
|
||||||
|
/// "Deluxe ($36.99)".to_string(),
|
||||||
|
/// "7/16/2025".to_string()
|
||||||
|
/// )?;
|
||||||
|
/// ```
|
||||||
pub fn calculator_start(
|
pub fn calculator_start(
|
||||||
&self,
|
&self,
|
||||||
current_membership: String,
|
current_membership: String,
|
||||||
|
|
|
@ -66,9 +66,21 @@ impl Calculator {
|
||||||
// Functions
|
// Functions
|
||||||
/// Calculates the Prorate with the given parameters
|
/// Calculates the Prorate with the given parameters
|
||||||
///
|
///
|
||||||
|
/// Memberships need to be in the format of: _"MEMBERSHIPNAME ($PRI.CE)"_
|
||||||
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
|
/// * `current_membership` - The text content of what current membership you have
|
||||||
|
/// * `new_membership` - The text content of what new membership you're getting
|
||||||
|
/// * `last_billing` - The date of the last time the customer got billed _(mm/dd/yyyy)_
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
|
/// ```rs
|
||||||
|
/// let result = calculator.start(
|
||||||
|
/// "Super ($41.99)".to_string(),
|
||||||
|
/// "Deluxe ($36.99)".to_string(),
|
||||||
|
/// "7/16/2025".to_string()
|
||||||
|
/// )?;
|
||||||
|
/// ```
|
||||||
pub fn start(
|
pub fn start(
|
||||||
&self,
|
&self,
|
||||||
current_membership: String,
|
current_membership: String,
|
||||||
|
|
Loading…
Reference in a new issue