Class OrderPatchImportBuilder

java.lang.Object
com.commercetools.importapi.models.order_patches.OrderPatchImportBuilder
All Implemented Interfaces:
Builder<OrderPatchImport>

public class OrderPatchImportBuilder extends Object implements Builder<OrderPatchImport>
OrderPatchImportBuilder
Example to create an instance using the builder pattern

     OrderPatchImport orderPatchImport = OrderPatchImport.builder()
             .orderNumber("{orderNumber}")
             .fields(fieldsBuilder -> fieldsBuilder)
             .build()
 
  • Constructor Details

    • OrderPatchImportBuilder

      public OrderPatchImportBuilder()
  • Method Details

    • orderNumber

      public OrderPatchImportBuilder orderNumber(String orderNumber)

      Maps to Order.orderNumber, String that uniquely identifies an order, unique across a project.

      Parameters:
      orderNumber - value to be set
      Returns:
      Builder
    • fields

      Each field referenced must be defined in an already existing order in the project or the import operation state is set to validationFailed.

      Parameters:
      builder - function to build the fields value
      Returns:
      Builder
    • withFields

      Each field referenced must be defined in an already existing order in the project or the import operation state is set to validationFailed.

      Parameters:
      builder - function to build the fields value
      Returns:
      Builder
    • fields

      public OrderPatchImportBuilder fields(OrderField fields)

      Each field referenced must be defined in an already existing order in the project or the import operation state is set to validationFailed.

      Parameters:
      fields - value to be set
      Returns:
      Builder
    • getOrderNumber

      public String getOrderNumber()

      Maps to Order.orderNumber, String that uniquely identifies an order, unique across a project.

      Returns:
      orderNumber
    • getFields

      public OrderField getFields()

      Each field referenced must be defined in an already existing order in the project or the import operation state is set to validationFailed.

      Returns:
      fields
    • build

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

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

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

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