Struct mpesa::services::AccountBalanceBuilder [−][src]
Implementations
impl<'a> AccountBalanceBuilder<'a>
[src]
pub fn new(
client: &'a Mpesa,
initiator_name: &'a str
) -> AccountBalanceBuilder<'a>
[src]
client: &'a Mpesa,
initiator_name: &'a str
) -> AccountBalanceBuilder<'a>
Creates a new AccountBalanceBuilder
.
Requires an initiator_name
, the credential/ username used to authenticate the transaction request
pub fn command_id(self, command_id: CommandId) -> AccountBalanceBuilder<'a>
[src]
Adds a CommandId
, the unique command passed to the MPESA system.
Defaults to CommandId::AccountBalance
if not passed explicitly.
Errors
If CommandId
is invalid
pub fn party_a(self, party_a: &'a str) -> AccountBalanceBuilder<'a>
[src]
Adds PartyA
, the shortcode of the organization receiving the transaction.
This is a required field.
Errors
If Party A
is not provided or invalid
pub fn identifier_type(
self,
identifier_type: IdentifierTypes
) -> AccountBalanceBuilder<'a>
[src]
self,
identifier_type: IdentifierTypes
) -> AccountBalanceBuilder<'a>
Adds the ReceiverIdentifierType
, the type of organization receiving the transaction.
Defaults to IdentifierTypes::ShortCode
if not passed explicitly
Errors
If invalid ReceiverIdentifierType
is provided
pub fn remarks(self, remarks: &'a str) -> AccountBalanceBuilder<'a>
[src]
Adds Remarks
, a comment sent along transaction.
Optional field that defaults to "None"
if no value is provided
pub fn timeout_url(self, timeout_url: &'a str) -> AccountBalanceBuilder<'a>
[src]
Error
If QueueTimeoutUrl
is invalid or not provided
pub fn result_url(self, result_url: &'a str) -> AccountBalanceBuilder<'a>
[src]
Error
If ResultUrl
is invalid or not provided
pub fn urls(
self,
timeout_url: &'a str,
result_url: &'a str
) -> AccountBalanceBuilder<'a>
[src]
self,
timeout_url: &'a str,
result_url: &'a str
) -> AccountBalanceBuilder<'a>
Adds QueueTimeoutUrl
and ResultUrl
. This is a required field
Error
If either QueueTimeoutUrl
and ResultUrl
is invalid or not provided
pub fn send(self) -> MpesaResult<AccountBalanceResponse>
[src]
Trait Implementations
impl<'a> Debug for AccountBalanceBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for AccountBalanceBuilder<'a>
impl<'a> Send for AccountBalanceBuilder<'a>
impl<'a> Sync for AccountBalanceBuilder<'a>
impl<'a> Unpin for AccountBalanceBuilder<'a>
impl<'a> UnwindSafe for AccountBalanceBuilder<'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>,