Struct mpesa::services::BulkInvoiceBuilder
source · pub struct BulkInvoiceBuilder<'mpesa, Env: ApiEnvironment> { /* private fields */ }
Implementations§
source§impl<'mpesa, Env: ApiEnvironment> BulkInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env: ApiEnvironment> BulkInvoiceBuilder<'mpesa, Env>
sourcepub fn new(client: &'mpesa Mpesa<Env>) -> BulkInvoiceBuilder<'mpesa, Env>
pub fn new(client: &'mpesa Mpesa<Env>) -> BulkInvoiceBuilder<'mpesa, Env>
Creates a new Bill Manager Bulk Invoice builder
sourcepub fn invoice(
self,
invoice: Invoice<'mpesa>
) -> BulkInvoiceBuilder<'mpesa, Env>
pub fn invoice( self, invoice: Invoice<'mpesa> ) -> BulkInvoiceBuilder<'mpesa, Env>
Adds a single invoice
sourcepub fn invoices(
self,
invoices: Vec<Invoice<'mpesa>>
) -> BulkInvoiceBuilder<'mpesa, Env>
pub fn invoices( self, invoices: Vec<Invoice<'mpesa>> ) -> BulkInvoiceBuilder<'mpesa, Env>
Adds multiple invoices
sourcepub async fn send(self) -> MpesaResult<BulkInvoiceResponse>
pub async fn send(self) -> MpesaResult<BulkInvoiceResponse>
Bill Manager Bulk Invoice API
Sends invoices to your customers in bulk
Errors
Returns an MpesaError
on failure.
Trait Implementations§
Auto Trait Implementations§
impl<'mpesa, Env> !RefUnwindSafe for BulkInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !Send for BulkInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !Sync for BulkInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> Unpin for BulkInvoiceBuilder<'mpesa, Env>
impl<'mpesa, Env> !UnwindSafe for BulkInvoiceBuilder<'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