Class CartLockBuilder

java.lang.Object
com.commercetools.api.models.cart.CartLockBuilder
All Implemented Interfaces:
Builder<CartLock>

public class CartLockBuilder extends Object implements Builder<CartLock>
CartLockBuilder
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()
 
  • Constructor Details

    • CartLockBuilder

      public CartLockBuilder()
  • Method Details

    • createdAt

      public CartLockBuilder createdAt(ZonedDateTime createdAt)

      Date and time (UTC) the Cart was locked.

      Parameters:
      createdAt - value to be set
      Returns:
      Builder
    • clientId

      public CartLockBuilder clientId(String clientId)

      id of the API Client that locked the Cart.

      Parameters:
      clientId - value to be set
      Returns:
      Builder
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Cart was locked.

      Returns:
      createdAt
    • getClientId

      public String getClientId()

      id of the API Client that locked the Cart.

      Returns:
      clientId
    • build

      public CartLock build()
      builds CartLock with checking for non-null required values
      Specified by:
      build in interface Builder<CartLock>
      Returns:
      CartLock
    • buildUnchecked

      public CartLock buildUnchecked()
      builds CartLock without checking for non-null required values
      Returns:
      CartLock
    • of

      public static CartLockBuilder of()
      factory method for an instance of CartLockBuilder
      Returns:
      builder
    • of

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