Struct mpesa::services::C2bSimulateBuilder [−][src]
pub struct C2bSimulateBuilder<'a> { /* fields omitted */ }
Implementations
impl<'a> C2bSimulateBuilder<'a>
[src]
impl<'a> C2bSimulateBuilder<'a>
[src]pub fn new(client: &'a Mpesa) -> 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]
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 amount(self, amount: u32) -> C2bSimulateBuilder<'a>
[src]pub fn msisdn(self, msisdn: &'a str) -> 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]
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]
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]
pub fn send(self) -> MpesaResult<C2bSimulateResponse>
[src]