Interface DeliveryDraft

All Superinterfaces:
CustomizableDraft<DeliveryDraft>, Draft<DeliveryDraft>

public interface DeliveryDraft extends CustomizableDraft<DeliveryDraft>, Draft<DeliveryDraft>
DeliveryDraft
Example to create an instance using the builder pattern

     DeliveryDraft deliveryDraft = DeliveryDraft.builder()
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier of the Delivery.

      Returns:
      key
    • getItems

      @Valid @Valid List<DeliveryItem> getItems()

      Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.

      Returns:
      items
    • getParcels

      @Valid @Valid List<ParcelDraft> getParcels()

      Information regarding the appearance, content, and shipment of a parcel.

      Returns:
      parcels
    • getAddress

      @Valid @Valid AddressDraft getAddress()

      Address to which the Parcels are delivered.

      Returns:
      address
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Delivery.

      Specified by:
      getCustom in interface CustomizableDraft<DeliveryDraft>
      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Delivery.

      Parameters:
      key - value to be set
    • setItems

      void setItems(DeliveryItem... items)

      Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.

      Parameters:
      items - values to be set
    • setItems

      void setItems(List<DeliveryItem> items)

      Line Items or Custom Line Items to deliver. It can also be specified individually for each Parcel.

      Parameters:
      items - values to be set
    • setParcels

      void setParcels(ParcelDraft... parcels)

      Information regarding the appearance, content, and shipment of a parcel.

      Parameters:
      parcels - values to be set
    • setParcels

      void setParcels(List<ParcelDraft> parcels)

      Information regarding the appearance, content, and shipment of a parcel.

      Parameters:
      parcels - values to be set
    • setAddress

      void setAddress(AddressDraft address)

      Address to which the Parcels are delivered.

      Parameters:
      address - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Delivery.

      Specified by:
      setCustom in interface CustomizableDraft<DeliveryDraft>
      Parameters:
      custom - value to be set
    • of

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

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

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

      static DeliveryDraftBuilder builder()
      builder factory method for DeliveryDraft
      Returns:
      builder
    • builder

      static DeliveryDraftBuilder builder(DeliveryDraft template)
      create builder for DeliveryDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDeliveryDraft

      default <T> T withDeliveryDraft(Function<DeliveryDraft,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<DeliveryDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference