-
public final class CfLogDeferredPaymentEvent.BuilderCfLogDeferredPaymentEvent 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 StringorderIdValueprivate StringpaymentIdValueprivate StringactionValueprivate FloatpaymentAmountValueprivate StringcurrencyValue
-
Constructor Summary
Constructors Constructor Description CfLogDeferredPaymentEvent.Builder(String orderIdValue, String paymentIdValue, String actionValue, String paymentMethodValue, Float accountBalanceValue, Float paymentAmountValue, String currencyValue, Boolean isSuccessfulValue, Object meta, Boolean isUpdateImmediately)
-
Method Summary
Modifier and Type Method Description final StringgetOrderIdValue()final UnitsetOrderIdValue(String orderIdValue)final StringgetPaymentIdValue()final UnitsetPaymentIdValue(String paymentIdValue)final StringgetActionValue()final UnitsetActionValue(String actionValue)final FloatgetPaymentAmountValue()final UnitsetPaymentAmountValue(Float paymentAmountValue)final StringgetCurrencyValue()final UnitsetCurrencyValue(String currencyValue)final <ERROR CLASS>setOrderId(String orderId)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 paymentId)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 paymentMethod)setPaymentMethod is required to set the type of the payment is being selected final <ERROR CLASS>setPaymentMethod(String paymentMethod)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 accountBalance)setAccountBalance is required to log the current balance of the user. final <ERROR CLASS>setAccountBalance(Integer accountBalance)final <ERROR CLASS>setAccountBalance(Double accountBalance)final <ERROR CLASS>setPaymentAmount(Float paymentAmount)setPaymentAmount is required to log the total price of the payment being logged. final <ERROR CLASS>setPaymentAmount(Integer paymentAmount)final <ERROR CLASS>setPaymentAmount(Double paymentAmount)final <ERROR CLASS>isSuccessful(Boolean isSuccessful)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 updateImmediately)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. -
-
Constructor Detail
-
CfLogDeferredPaymentEvent.Builder
CfLogDeferredPaymentEvent.Builder(String orderIdValue, String paymentIdValue, String actionValue, String paymentMethodValue, Float accountBalanceValue, Float paymentAmountValue, String currencyValue, Boolean isSuccessfulValue, Object meta, Boolean isUpdateImmediately)
-
-
Method Detail
-
getOrderIdValue
final String getOrderIdValue()
-
setOrderIdValue
final Unit setOrderIdValue(String orderIdValue)
-
getPaymentIdValue
final String getPaymentIdValue()
-
setPaymentIdValue
final Unit setPaymentIdValue(String paymentIdValue)
-
getActionValue
final String getActionValue()
-
setActionValue
final Unit setActionValue(String actionValue)
-
getPaymentAmountValue
final Float getPaymentAmountValue()
-
setPaymentAmountValue
final Unit setPaymentAmountValue(Float paymentAmountValue)
-
getCurrencyValue
final String getCurrencyValue()
-
setCurrencyValue
final Unit setCurrencyValue(String currencyValue)
-
setOrderId
final <ERROR CLASS> setOrderId(String orderId)
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 paymentId)
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 paymentMethod)
setPaymentMethod is required to set the type of the payment is being selected
-
setPaymentMethod
final <ERROR CLASS> setPaymentMethod(String paymentMethod)
-
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 accountBalance)
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 accountBalance)
-
setAccountBalance
final <ERROR CLASS> setAccountBalance(Double accountBalance)
-
setPaymentAmount
final <ERROR CLASS> setPaymentAmount(Float paymentAmount)
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 paymentAmount)
-
setPaymentAmount
final <ERROR CLASS> setPaymentAmount(Double paymentAmount)
-
isSuccessful
final <ERROR CLASS> isSuccessful(Boolean isSuccessful)
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 updateImmediately)
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.
-
-
-
-