Struct mpesa::services::DynamicQRBuilder
source · pub struct DynamicQRBuilder<'mpesa, Env: ApiEnvironment> { /* private fields */ }
Expand description
Builder for DynamicQR
.
Implementations§
source§impl<'mpesa, Env: ApiEnvironment + Clone> DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env: ApiEnvironment + Clone> DynamicQRBuilder<'mpesa, Env>
pub fn client(&self, value: &'mpesa Mpesa<Env>) -> Self
sourcepub fn merchant_name<VALUE: Into<&'mpesa str>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn merchant_name<VALUE: Into<&'mpesa str>>( &mut self, value: VALUE ) -> &mut Self
Name of the Company/M-Pesa Merchant Name
sourcepub fn amount<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn amount<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Transaction Reference Number
sourcepub fn transaction_type<VALUE: Into<TransactionType>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn transaction_type<VALUE: Into<TransactionType>>( &mut self, value: VALUE ) -> &mut Self
Transaction Type
This can be a TransactionType
or a &str
The &str
must be one of the following:
BG
for Buy GoodsPB
for Pay BillWA
Withdraw CashSM
Send Money (Mobile Number)SB
Sent to Business. Business number CPI in MSISDN format.
sourcepub fn try_transaction_type<VALUE: TryInto<TransactionType>>(
&mut self,
value: VALUE
) -> Result<&mut Self, VALUE::Error>
pub fn try_transaction_type<VALUE: TryInto<TransactionType>>( &mut self, value: VALUE ) -> Result<&mut Self, VALUE::Error>
Transaction Type
This can be a TransactionType
or a &str
The &str
must be one of the following:
BG
for Buy GoodsPB
for Pay BillWA
Withdraw CashSM
Send Money (Mobile Number)SB
Sent to Business. Business number CPI in MSISDN format.
sourcepub fn credit_party_identifier<VALUE: Into<&'mpesa str>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn credit_party_identifier<VALUE: Into<&'mpesa str>>( &mut self, value: VALUE ) -> &mut Self
Credit Party Identifier. Can be a Mobile Number, Business Number, Agent Till, Paybill or Business number, or Merchant Buy Goods.
Trait Implementations§
source§impl<'mpesa, Env: Clone + ApiEnvironment> Clone for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env: Clone + ApiEnvironment> Clone for DynamicQRBuilder<'mpesa, Env>
source§fn clone(&self) -> DynamicQRBuilder<'mpesa, Env>
fn clone(&self) -> DynamicQRBuilder<'mpesa, Env>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'mpesa, Env: ApiEnvironment + Clone> Default for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env: ApiEnvironment + Clone> Default for DynamicQRBuilder<'mpesa, Env>
Auto Trait Implementations§
impl<'mpesa, Env> !RefUnwindSafe for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env> !Send for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env> !Sync for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env> Unpin for DynamicQRBuilder<'mpesa, Env>
impl<'mpesa, Env> !UnwindSafe for DynamicQRBuilder<'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