Interface ParcelDraft

All Superinterfaces:
CustomizableDraft<ParcelDraft>, io.vrap.rmf.base.client.Draft<ParcelDraft>
All Known Implementing Classes:
ParcelDraftImpl

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

     ParcelDraft parcelDraft = ParcelDraft.builder()
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier of the Parcel.

      Returns:
      key
    • getMeasurements

      @Valid @Valid ParcelMeasurements getMeasurements()

      Information about the dimensions for the Parcel.

      Returns:
      measurements
    • getTrackingData

      @Valid @Valid TrackingData getTrackingData()

      Shipment tracking information for the Parcel.

      Returns:
      trackingData
    • getItems

      @Valid @Valid List<DeliveryItem> getItems()

      Line Items or Custom Line Items delivered in this Parcel.

      Returns:
      items
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Parcel.

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

      void setKey(String key)

      User-defined unique identifier of the Parcel.

      Parameters:
      key - value to be set
    • setMeasurements

      void setMeasurements(ParcelMeasurements measurements)

      Information about the dimensions for the Parcel.

      Parameters:
      measurements - value to be set
    • setTrackingData

      void setTrackingData(TrackingData trackingData)

      Shipment tracking information for the Parcel.

      Parameters:
      trackingData - value to be set
    • setItems

      void setItems(DeliveryItem... items)

      Line Items or Custom Line Items delivered in this Parcel.

      Parameters:
      items - values to be set
    • setItems

      void setItems(List<DeliveryItem> items)

      Line Items or Custom Line Items delivered in this Parcel.

      Parameters:
      items - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Parcel.

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

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

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

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

      static ParcelDraftBuilder builder()
      builder factory method for ParcelDraft
      Returns:
      builder
    • builder

      static ParcelDraftBuilder builder(ParcelDraft template)
      create builder for ParcelDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withParcelDraft

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