Interface CartLock


public interface CartLock

Indicates that the Cart is locked to prevent changes. Provides metadata about when the lock was created and which API Client initiated it.


Example to create an instance using the builder pattern

     CartLock cartLock = CartLock.builder()
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .clientId("{clientId}")
             .build()
 
  • Method Details

    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Cart was locked.

      Returns:
      createdAt
    • getClientId

      @NotNull @NotNull String getClientId()

      id of the API Client that locked the Cart.

      Returns:
      clientId
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Cart was locked.

      Parameters:
      createdAt - value to be set
    • setClientId

      void setClientId(String clientId)

      id of the API Client that locked the Cart.

      Parameters:
      clientId - value to be set
    • of

      static CartLock of()
      factory method
      Returns:
      instance of CartLock
    • of

      static CartLock of(CartLock template)
      factory method to create a shallow copy CartLock
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      CartLock copyDeep()
    • deepCopy

      @Nullable static CartLock deepCopy(@Nullable CartLock template)
      factory method to create a deep copy of CartLock
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CartLockBuilder builder()
      builder factory method for CartLock
      Returns:
      builder
    • builder

      static CartLockBuilder builder(CartLock template)
      create builder for CartLock instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartLock

      default <T> T withCartLock(Function<CartLock,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CartLock> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference