Interface Delivery
public interface Delivery
Delivery
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Delivery delivery = Delivery.builder()
.id("{id}")
.createdAt("{createdAt}")
.plusItems(itemsBuilder -> itemsBuilder)
.plusParcels(parcelsBuilder -> parcelsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryBuilder
builder()
builder factory method for Deliverystatic DeliveryBuilder
create builder for Delivery instancestatic Delivery
factory method to create a deep copy of Delivery@Valid Address
@NotNull String
@Valid CustomFields
Custom Fields for the Transaction.@NotNull String
getId()
@NotNull @Valid List<DeliveryItem>
getItems()
static Delivery
of()
factory methodstatic Delivery
factory method to create a shallow copy Deliveryvoid
setAddress
(Address address) set addressvoid
setCreatedAt
(String createdAt) set createdAtvoid
setCustom
(CustomFields custom) Custom Fields for the Transaction.void
set idvoid
setItems
(DeliveryItem... items) set itemsvoid
setItems
(List<DeliveryItem> items) set itemsvoid
setParcels
(Parcel... parcels) set parcelsvoid
setParcels
(List<Parcel> parcels) set parcelsstatic com.fasterxml.jackson.core.type.TypeReference<Delivery>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDelivery
(Function<Delivery, T> helper) accessor map function
-
Method Details
-
getId
- Returns:
- id
-
getCreatedAt
- Returns:
- createdAt
-
getItems
- Returns:
- items
-
getParcels
- Returns:
- parcels
-
getAddress
- Returns:
- address
-
getCustom
Custom Fields for the Transaction.
- Returns:
- custom
-
setId
set id- Parameters:
id
- value to be set
-
setCreatedAt
set createdAt- Parameters:
createdAt
- value to be set
-
setItems
set items- Parameters:
items
- values to be set
-
setItems
set items- Parameters:
items
- values to be set
-
setParcels
set parcels- Parameters:
parcels
- values to be set
-
setParcels
set parcels- Parameters:
parcels
- values to be set
-
setAddress
set address- Parameters:
address
- value to be set
-
setCustom
Custom Fields for the Transaction.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of Delivery
-
of
factory method to create a shallow copy Delivery- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Delivery- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Delivery- Returns:
- builder
-
builder
create builder for Delivery instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDelivery
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-