Struct mpesa::services::OnboardBuilder
source · pub struct OnboardBuilder<'mpesa, Env: ApiEnvironment> { /* private fields */ }
Implementations§
source§impl<'mpesa, Env: ApiEnvironment> OnboardBuilder<'mpesa, Env>
impl<'mpesa, Env: ApiEnvironment> OnboardBuilder<'mpesa, Env>
sourcepub fn new(client: &'mpesa Mpesa<Env>) -> OnboardBuilder<'mpesa, Env>
pub fn new(client: &'mpesa Mpesa<Env>) -> OnboardBuilder<'mpesa, Env>
Creates a new Bill Manager Onboard builder
sourcepub fn callback_url(
self,
callback_url: &'mpesa str
) -> OnboardBuilder<'mpesa, Env>
pub fn callback_url( self, callback_url: &'mpesa str ) -> OnboardBuilder<'mpesa, Env>
sourcepub fn email(self, email: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
pub fn email(self, email: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
sourcepub fn logo(self, logo: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
pub fn logo(self, logo: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
sourcepub fn official_contact(
self,
official_contact: &'mpesa str
) -> OnboardBuilder<'mpesa, Env>
pub fn official_contact( self, official_contact: &'mpesa str ) -> OnboardBuilder<'mpesa, Env>
Adds officialContact
to the request; must be in the format 07XXXXXXXX
Errors
If officialContact
is invalid or not provided.
sourcepub fn send_reminders(
self,
send_reminders: SendRemindersTypes
) -> OnboardBuilder<'mpesa, Env>
pub fn send_reminders( self, send_reminders: SendRemindersTypes ) -> OnboardBuilder<'mpesa, Env>
Adds sendReminders
. Defaults to SendRemindersTypes::Disable
if no value is explicitely passed.
Errors
If sendReminders
is not valid.
sourcepub fn short_code(self, short_code: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
pub fn short_code(self, short_code: &'mpesa str) -> OnboardBuilder<'mpesa, Env>
Adds ShortCode
; the 6 digit MPESA Till Number or PayBill Number
Errors
If Till or PayBill number is invalid or not provided
sourcepub async fn send(self) -> MpesaResult<OnboardResponse>
pub async fn send(self) -> MpesaResult<OnboardResponse>
Bill Manager Onboarding API
Opt in as a biller to mpesa’s bill manager features.
A successful request returns a OnboardResponse
type
Errors
Returns an MpesaError
on failure
Trait Implementations§
Auto Trait Implementations§
impl<'mpesa, Env> !RefUnwindSafe for OnboardBuilder<'mpesa, Env>
impl<'mpesa, Env> !Send for OnboardBuilder<'mpesa, Env>
impl<'mpesa, Env> !Sync for OnboardBuilder<'mpesa, Env>
impl<'mpesa, Env> Unpin for OnboardBuilder<'mpesa, Env>
impl<'mpesa, Env> !UnwindSafe for OnboardBuilder<'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