pub struct PartnersInfo { /* private fields */ }Expand description
Information about Lexe partners, like the revshare schedule.
Implementations§
Source§impl PartnersInfo
impl PartnersInfo
Return the partner’s proportional revshare of the payment fee given
the partner’s total proportional fee. Returns None if there is no
schedule with schedule_name.
This total is the effective proportional fee after partner_prop_fee
and partner_base_fee are both combined and taken into account, i.e.,
total_partner_fee := (partner_prop_fee * amount + partner_base_fee) / amount.
We don’t currently support a partner_base_fee for amountless invoices,
in which case total_partner_fee := partner_prop_fee.
Sourcepub fn current() -> PartnersInfo
pub fn current() -> PartnersInfo
The current partners info with the latest advertised revshare schedules.
Trait Implementations§
Source§impl Clone for PartnersInfo
impl Clone for PartnersInfo
Source§fn clone(&self) -> PartnersInfo
fn clone(&self) -> PartnersInfo
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 PartnersInfo
impl Debug for PartnersInfo
Source§impl<'de> Deserialize<'de> for PartnersInfo
impl<'de> Deserialize<'de> for PartnersInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartnersInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartnersInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PartnersInfo
impl Serialize for PartnersInfo
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 PartnersInfo
impl RefUnwindSafe for PartnersInfo
impl Send for PartnersInfo
impl Sync for PartnersInfo
impl Unpin for PartnersInfo
impl UnsafeUnpin for PartnersInfo
impl UnwindSafe for PartnersInfo
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