Interface OrderFromCartDraft

All Superinterfaces:
io.vrap.rmf.base.client.Draft<OrderFromCartDraft>
All Known Implementing Classes:
OrderFromCartDraftImpl

public interface OrderFromCartDraft extends io.vrap.rmf.base.client.Draft<OrderFromCartDraft>
OrderFromCartDraft
Example to create an instance using the builder pattern

     OrderFromCartDraft orderFromCartDraft = OrderFromCartDraft.builder()
             .version(0.3)
             .build()
 
  • Method Details

    • getId

      Deprecated.

      Unique identifier of the Cart from which you can create an Order.

      Returns:
      id
    • getCart

      ResourceIdentifier of the Cart from which the Order is created.

      Returns:
      cart
    • getVersion

      @NotNull @NotNull Long getVersion()

      Expected version of the Cart from which the Order is created. If the expected version does not match the actual version, a 409 Conflict error will be returned.

      Returns:
      version
    • getOrderNumber

      String that uniquely identifies an order. It can be used to create more human-readable (in contrast to ID) identifier for the order. It should be unique across a project. Once it's set it cannot be changed. For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_\-]{2,36}.

      Returns:
      orderNumber
    • getPurchaseOrderNumber

      Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.

      Returns:
      purchaseOrderNumber
    • getPaymentState

      Payment state for the Order.

      Returns:
      paymentState
    • getShipmentState

      Shipment state for the Order.

      Returns:
      shipmentState
    • getOrderState

      Order will be created with Open status by default.

      Returns:
      orderState
    • getState

      Reference to a State indicating the Order's state.

      Returns:
      state
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.

      Returns:
      custom
    • setId

      Deprecated.

      Unique identifier of the Cart from which you can create an Order.

      Parameters:
      id - value to be set
    • setCart

      ResourceIdentifier of the Cart from which the Order is created.

      Parameters:
      cart - value to be set
    • setVersion

      void setVersion(Long version)

      Expected version of the Cart from which the Order is created. If the expected version does not match the actual version, a 409 Conflict error will be returned.

      Parameters:
      version - value to be set
    • setOrderNumber

      void setOrderNumber(String orderNumber)

      String that uniquely identifies an order. It can be used to create more human-readable (in contrast to ID) identifier for the order. It should be unique across a project. Once it's set it cannot be changed. For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_\-]{2,36}.

      Parameters:
      orderNumber - value to be set
    • setPurchaseOrderNumber

      void setPurchaseOrderNumber(String purchaseOrderNumber)

      Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.

      Parameters:
      purchaseOrderNumber - value to be set
    • setPaymentState

      void setPaymentState(PaymentState paymentState)

      Payment state for the Order.

      Parameters:
      paymentState - value to be set
    • setShipmentState

      void setShipmentState(ShipmentState shipmentState)

      Shipment state for the Order.

      Parameters:
      shipmentState - value to be set
    • setOrderState

      void setOrderState(OrderState orderState)

      Order will be created with Open status by default.

      Parameters:
      orderState - value to be set
    • setState

      Reference to a State indicating the Order's state.

      Parameters:
      state - value to be set
    • setCustom

      Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.

      Parameters:
      custom - value to be set
    • of

      factory method
      Returns:
      instance of OrderFromCartDraft
    • of

      factory method to create a shallow copy OrderFromCartDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of OrderFromCartDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for OrderFromCartDraft
      Returns:
      builder
    • builder

      create builder for OrderFromCartDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderFromCartDraft

      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<OrderFromCartDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference