-
public final class BsLogDeferredPaymentEvent.BuilderBsLogDeferredPaymentEvent is to log events for payments, when they undergo processing and processed completed or canceled. This log is for use cases whe we have Buy Now and Pay Later which means that customers can buy the items now and pay the amount on a later date.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringorder_idprivate Stringpayment_idprivate Stringactionprivate Floatpayment_amountprivate Stringcurrency_value
-
Method Summary
Modifier and Type Method Description final StringgetOrder_id()final UnitsetOrder_id(String order_id)final StringgetPayment_id()final UnitsetPayment_id(String payment_id)final StringgetAction()final UnitsetAction(String action)final FloatgetPayment_amount()final UnitsetPayment_amount(Float payment_amount)final StringgetCurrency_value()final UnitsetCurrency_value(String currency_value)final <ERROR CLASS>init(Context context)init is required to pass context to the SDK method and log the event. final <ERROR CLASS>setOrderId(String order_id)setOrderId is required to set the id for the order in log, Id should be in string and must be in accordance to the catalog provided. final <ERROR CLASS>setPaymentId(String payment_id)setPaymentId is required to set the id for the payment in log, Id should be in string and must be in accordance to the catalog provided. final <ERROR CLASS>setPaymentMethod(PaymentMethod payment_method)setPaymentMethod is required to set the type of the payment is being selected final <ERROR CLASS>setPaymentMethod(String payment_method)final <ERROR CLASS>setPaymentAction(PaymentAction action)setPaymentAction is used to specify the action performed on the payments screen, there can be multiple types of actions that can include init payment process, cancel payment processing or upload receipt to bank deposit. final <ERROR CLASS>setPaymentAction(String action)setPaymentAction is used to specify the action performed on the payments screen, there can be multiple types of actions that can include init payment process, cancel payment processing or upload receipt to bank deposit. final <ERROR CLASS>setCurrency(String currency)setCurrency is required to log the currency for for the payment logged. final <ERROR CLASS>setAccountBalance(Float account_balance)setAccountBalance is required to log the current balance of the user. final <ERROR CLASS>setAccountBalance(Integer account_balance)final <ERROR CLASS>setAccountBalance(Double account_balance)final <ERROR CLASS>setPaymentAmount(Float payment_amount)setPaymentAmount is required to log the total price of the payment being logged. final <ERROR CLASS>setPaymentAmount(Integer payment_amount)final <ERROR CLASS>setPaymentAmount(Double payment_amount)final <ERROR CLASS>isSuccessful(Boolean is_successful)isSuccessful is required to log if the payment is processed successfully or not. final <ERROR CLASS>setMeta(Object meta)You can pass any type of value in setMeta. final <ERROR CLASS>updateImmediately(Boolean update_immediately)updateImmediately is responsible for updating the values ot the backend immediately. final <ERROR CLASS>build()build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources. -
-
Method Detail
-
getOrder_id
final String getOrder_id()
-
setOrder_id
final Unit setOrder_id(String order_id)
-
getPayment_id
final String getPayment_id()
-
setPayment_id
final Unit setPayment_id(String payment_id)
-
getPayment_amount
final Float getPayment_amount()
-
setPayment_amount
final Unit setPayment_amount(Float payment_amount)
-
getCurrency_value
final String getCurrency_value()
-
setCurrency_value
final Unit setCurrency_value(String currency_value)
-
init
final <ERROR CLASS> init(Context context)
init is required to pass context to the SDK method and log the event. if not provided, it will throw an exception on runtime.
-
setOrderId
final <ERROR CLASS> setOrderId(String order_id)
setOrderId is required to set the id for the order in log, Id should be in string and must be in accordance to the catalog provided.
-
setPaymentId
final <ERROR CLASS> setPaymentId(String payment_id)
setPaymentId is required to set the id for the payment in log, Id should be in string and must be in accordance to the catalog provided.
-
setPaymentMethod
final <ERROR CLASS> setPaymentMethod(PaymentMethod payment_method)
setPaymentMethod is required to set the type of the payment is being selected
-
setPaymentMethod
final <ERROR CLASS> setPaymentMethod(String payment_method)
-
setPaymentAction
final <ERROR CLASS> setPaymentAction(PaymentAction action)
setPaymentAction is used to specify the action performed on the payments screen, there can be multiple types of actions that can include init payment process, cancel payment processing or upload receipt to bank deposit. By default SDK provides enum class to use as PaymentAction. Below function can be used to set action using enum.
-
setPaymentAction
final <ERROR CLASS> setPaymentAction(String action)
setPaymentAction is used to specify the action performed on the payments screen, there can be multiple types of actions that can include init payment process, cancel payment processing or upload receipt to bank deposit. By default SDK provides enum class to use as PaymentAction. Below function can be used to set action using string but remember to note that string provided must be in accordance to the enums.
-
setCurrency
final <ERROR CLASS> setCurrency(String currency)
setCurrency is required to log the currency for for the payment logged. Currency should be in ISO 4217 format. For Ease, SDK provides the enums to log the currency so that it would be easy to log. You can also use the string function to provide the currency. Below is the function for the logging currency using String. Remember to use the same strings as provided in the enums or else the event will be discarded.
-
setAccountBalance
final <ERROR CLASS> setAccountBalance(Float account_balance)
setAccountBalance is required to log the current balance of the user. Amount format should be in accordance to the currency selected.
-
setAccountBalance
final <ERROR CLASS> setAccountBalance(Integer account_balance)
-
setAccountBalance
final <ERROR CLASS> setAccountBalance(Double account_balance)
-
setPaymentAmount
final <ERROR CLASS> setPaymentAmount(Float payment_amount)
setPaymentAmount is required to log the total price of the payment being logged. Amount format should be in accordance to the currency selected.
-
setPaymentAmount
final <ERROR CLASS> setPaymentAmount(Integer payment_amount)
-
setPaymentAmount
final <ERROR CLASS> setPaymentAmount(Double payment_amount)
-
isSuccessful
final <ERROR CLASS> isSuccessful(Boolean is_successful)
isSuccessful is required to log if the payment is processed successfully or not.
-
setMeta
final <ERROR CLASS> setMeta(Object meta)
You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.
-
updateImmediately
final <ERROR CLASS> updateImmediately(Boolean update_immediately)
updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.
-
build
final <ERROR CLASS> build()
build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.
-
-
-
-