Struct mpesa::services::C2bSimulateBuilder [−][src]
Implementations
impl<'a> C2bSimulateBuilder<'a>
[src]
pub fn new(client: &'a Mpesa) -> C2bSimulateBuilder<'a>
[src]
Creates a new C2B Simulate builder
pub fn command_id(self, command_id: CommandId) -> C2bSimulateBuilder<'a>
[src]
Adds CommandId
. Defaults to CommandId::CustomerPaybillOnline
if no value explicitly passed
Errors
If CommandId
is not valid
pub fn amount(self, amount: u32) -> C2bSimulateBuilder<'a>
[src]
pub fn msisdn(self, msisdn: &'a str) -> C2bSimulateBuilder<'a>
[src]
Adds the MSISDN(phone number) sending the transaction, start by country code without the +
.
This is a required field
Errors
If MSISDN
is invalid
pub fn short_code(self, short_code: &'a str) -> C2bSimulateBuilder<'a>
[src]
Adds ShortCode
; the 6 digit MPESA Till Number or PayBill Number
Errors
If Till or PayBill number is invalid
pub fn bill_ref_number(self, bill_ref_number: &'a str) -> C2bSimulateBuilder<'a>
[src]
Adds Bull reference number. This field is optional and will by default be "None"
.
pub fn send(self) -> MpesaResult<C2bSimulateResponse>
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for C2bSimulateBuilder<'a>
impl<'a> Send for C2bSimulateBuilder<'a>
impl<'a> Sync for C2bSimulateBuilder<'a>
impl<'a> Unpin for C2bSimulateBuilder<'a>
impl<'a> UnwindSafe for C2bSimulateBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,