Package 

Class BsLogDeliveryEvent.Builder


  • 
    public final class BsLogDeliveryEvent.Builder
    
                        

    BsLogDeliveryEvent is used to log the status for the delivery. It can be used to log the delivered status of the order or a partial order. Details about the items in the specific delivery should be provided in the catalog.

    • 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 associate the delivery event with the order. OrderId should be a valid orderId and can be tracked from the checkout.

      • setDeliveryId

         final <ERROR CLASS> setDeliveryId(String delivery_id)

        setDeliveryId is required to associate the rating obtained for the order. deliveryId should be a valid deliveryId and can be tracked from the catalog for the items in that specific delivery.

      • setDeliveryAction

         final <ERROR CLASS> setDeliveryAction(DeliveryAction action)

        setDeliveryAction is required to set the delivery action for the log. For the order being prepared for delivery or left the shipment center or delivered to the customer.

      • 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.