pub struct TransactionRequestBuilder { /* private fields */ }
Expand description
Builder for TransactionRequest
.
Implementations§
Source§impl TransactionRequestBuilder
impl TransactionRequestBuilder
Sourcepub fn amount(&mut self, value: String) -> &mut Self
pub fn amount(&mut self, value: String) -> &mut Self
Amount should be in the subunit of the supported currency
Sourcepub fn currency(&mut self, value: Currency) -> &mut Self
pub fn currency(&mut self, value: Currency) -> &mut Self
The transaction currency. Defaults to your integration currency.
Sourcepub fn reference(&mut self, value: String) -> &mut Self
pub fn reference(&mut self, value: String) -> &mut Self
Unique transaction reference. Only -
, .
, =
and alphanumeric characters allowed.
Sourcepub fn callback_url(&mut self, value: String) -> &mut Self
pub fn callback_url(&mut self, value: String) -> &mut Self
Fully qualified url, e.g. https://example.com/ . Use this to override the callback url provided on the dashboard for this transaction
Sourcepub fn plan(&mut self, value: String) -> &mut Self
pub fn plan(&mut self, value: String) -> &mut Self
If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in amount
Sourcepub fn invoice_limit(&mut self, value: u8) -> &mut Self
pub fn invoice_limit(&mut self, value: u8) -> &mut Self
Number of times to charge customer during subscription to plan
Sourcepub fn metadata(&mut self, value: String) -> &mut Self
pub fn metadata(&mut self, value: String) -> &mut Self
Stringified JSON object of custom data. Kindly check the Metadata page for more information.
Sourcepub fn channel(&mut self, value: Vec<Channel>) -> &mut Self
pub fn channel(&mut self, value: Vec<Channel>) -> &mut Self
An array of payment channels to control what channels you want to make available to the user to make a payment with.
Sourcepub fn split_code(&mut self, value: String) -> &mut Self
pub fn split_code(&mut self, value: String) -> &mut Self
The split code of the transaction split. e.g. SPL_98WF13Eb3w
Sourcepub fn subaccount(&mut self, value: String) -> &mut Self
pub fn subaccount(&mut self, value: String) -> &mut Self
The code for the subaccount that owns the payment. e.g. ACCT_8f4s1eq7ml6rlzj
Sourcepub fn transaction_charge(&mut self, value: String) -> &mut Self
pub fn transaction_charge(&mut self, value: String) -> &mut Self
An amount used to override the split configuration for a single split payment. If set, the amount specified goes to the main account regardless of the split configuration.
Sourcepub fn bearer(&mut self, value: String) -> &mut Self
pub fn bearer(&mut self, value: String) -> &mut Self
Use this param to indicate who bears the transaction charges. Allowed values are: account
or subaccount
(defaults to account
).
Sourcepub fn build(
&self,
) -> Result<TransactionRequest, TransactionRequestBuilderError>
pub fn build( &self, ) -> Result<TransactionRequest, TransactionRequestBuilderError>
Trait Implementations§
Source§impl Clone for TransactionRequestBuilder
impl Clone for TransactionRequestBuilder
Source§fn clone(&self) -> TransactionRequestBuilder
fn clone(&self) -> TransactionRequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more