-
public final class BsLogPaymentMethodEvent.BuilderBsLogPaymentMethodEvent is to log events for payments. Which method of the payment is selected for the order.
-
-
Method Summary
Modifier and Type Method Description 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>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>setCurrency(String currency)setCurrency is required to log the currency for for the payment logged. 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>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
-
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.
-
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)
-
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.
-
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)
-
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.
-
-
-
-