Struct mpesa::services::CancelInvoiceBuilder
source · pub struct CancelInvoiceBuilder<'mpesa, Env: ApiEnvironment> { /* private fields */ }
Implementations§
source§impl<'mpesa, Env: ApiEnvironment> CancelInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env: ApiEnvironment> CancelInvoiceBuilder<'mpesa, Env>
sourcepub fn new(client: &'mpesa Mpesa<Env>) -> CancelInvoiceBuilder<'mpesa, Env>
pub fn new(client: &'mpesa Mpesa<Env>) -> CancelInvoiceBuilder<'mpesa, Env>
Creates a new Bill Manager Cancel invoice builder
sourcepub fn external_reference(
self,
external_reference: &'mpesa str
) -> CancelInvoiceBuilder<'mpesa, Env>
pub fn external_reference( self, external_reference: &'mpesa str ) -> CancelInvoiceBuilder<'mpesa, Env>
Adds an external_reference
sourcepub fn external_references(
self,
external_references: Vec<&'mpesa str>
) -> CancelInvoiceBuilder<'mpesa, Env>
pub fn external_references( self, external_references: Vec<&'mpesa str> ) -> CancelInvoiceBuilder<'mpesa, Env>
Adds external_references
sourcepub async fn send(self) -> MpesaResult<CancelInvoiceResponse>
pub async fn send(self) -> MpesaResult<CancelInvoiceResponse>
Bill Manager Cancel Invoice API
Cancels a list of invoices by their external_reference
A successful request returns a CancelInvoiceResponse
type
Errors
Returns an MpesaError
on failure
Trait Implementations§
Auto Trait Implementations§
impl<'mpesa, Env> !RefUnwindSafe for CancelInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !Send for CancelInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !Sync for CancelInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> Unpin for CancelInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !UnwindSafe for CancelInvoiceBuilder<'mpesa, Env>
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