pub struct InitializeTransactionBodyBuilder { /* private fields */ }
Expand description
Builder for InitializeTransactionBody
.
Implementations§
source§impl InitializeTransactionBodyBuilder
impl InitializeTransactionBodyBuilder
sourcepub fn amount(&mut self, value: String) -> &mut Self
pub fn amount(&mut self, value: String) -> &mut Self
Amount should be in the smallest unit of the currency e.g. kobo if in NGN and cents if in USD
sourcepub fn currency(&mut self, value: Option<Currency>) -> &mut Self
pub fn currency(&mut self, value: Option<Currency>) -> &mut Self
Currency in which amount should be charged (NGN, GHS, ZAR or USD). Defaults to your integration currency.
sourcepub fn reference(&mut self, value: Option<String>) -> &mut Self
pub fn reference(&mut self, value: Option<String>) -> &mut Self
Unique transaction reference. Only -, ., = and alphanumeric characters allowed.
sourcepub fn callback_url(&mut self, value: Option<String>) -> &mut Self
pub fn callback_url(&mut self, value: Option<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: Option<String>) -> &mut Self
pub fn plan(&mut self, value: Option<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: Option<u32>) -> &mut Self
pub fn invoice_limit(&mut self, value: Option<u32>) -> &mut Self
Number of times to charge customer during subscription to plan
sourcepub fn metadata(&mut self, value: Option<String>) -> &mut Self
pub fn metadata(&mut self, value: Option<String>) -> &mut Self
Stringified JSON object of custom data. Kindly check the Metadata
struct for more information.
sourcepub fn channels(&mut self, value: Option<Vec<Channel>>) -> &mut Self
pub fn channels(&mut self, value: Option<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.
Available channels include: ["card", "bank", "ussd", "qr", "mobile_money", "bank_transfer", "eft"]
sourcepub fn split_code(&mut self, value: Option<String>) -> &mut Self
pub fn split_code(&mut self, value: Option<String>) -> &mut Self
The split code of the transaction split. e.g. SPL_98WF13Eb3w
sourcepub fn subaccount(&mut self, value: Option<String>) -> &mut Self
pub fn subaccount(&mut self, value: Option<String>) -> &mut Self
The code for the subaccount that owns the payment. e.g. ACCT_8f4s1eq7ml6rlzj
sourcepub fn transaction_charge(&mut self, value: Option<u32>) -> &mut Self
pub fn transaction_charge(&mut self, value: Option<u32>) -> &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: Option<String>) -> &mut Self
pub fn bearer(&mut self, value: Option<String>) -> &mut Self
Who bears Paystack charges? account
or subaccount
(defaults to account).
sourcepub fn build(
&self
) -> Result<InitializeTransactionBody, InitializeTransactionBodyBuilderError>
pub fn build( &self ) -> Result<InitializeTransactionBody, InitializeTransactionBodyBuilderError>
Trait Implementations§
source§impl Clone for InitializeTransactionBodyBuilder
impl Clone for InitializeTransactionBodyBuilder
source§fn clone(&self) -> InitializeTransactionBodyBuilder
fn clone(&self) -> InitializeTransactionBodyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more