Interface ReturnItem
Example to create an instance using the builder pattern
ReturnItem returnItem = ReturnItem.builder()
.id("{id}")
.quantity(0.3)
.type("{type}")
.shipmentState(ReturnShipmentState.ADVISED)
.paymentState(ReturnPaymentState.NON_REFUNDABLE)
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReturnItemBuilderbuilder()builder factory method for ReturnItemstatic ReturnItemBuilderbuilder(ReturnItem template) create builder for ReturnItem instancecopyDeep()static ReturnItemdeepCopy(ReturnItem template) factory method to create a deep copy of ReturnItemUser-defined description for the return.@NotNull ZonedDateTimeDate and time (UTC) the Return Item was initially created.@Valid CustomFieldsCustom Fields of the Return Item.@NotNull StringgetId()Unique identifier of the Return Item.getKey()User-defined unique identifier of the Return Item.@NotNull ZonedDateTimeDate and time (UTC) the Return Item was last updated.@NotNull ReturnPaymentStatePayment status of the Return Item:@NotNull LongNumber of Line Items or Custom Line Items returned.@NotNull ReturnShipmentStateShipment status of the Return Item.@NotNull StringgetType()static ReturnItemof()factory methodstatic ReturnItemof(ReturnItem template) factory method to create a shallow copy ReturnItemvoidsetComment(String comment) User-defined description for the return.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Return Item was initially created.voidsetCustom(CustomFields custom) Custom Fields of the Return Item.voidUnique identifier of the Return Item.voidUser-defined unique identifier of the Return Item.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Return Item was last updated.voidsetPaymentState(ReturnPaymentState paymentState) Payment status of the Return Item:voidsetQuantity(Long quantity) Number of Line Items or Custom Line Items returned.voidsetShipmentState(ReturnShipmentState shipmentState) Shipment status of the Return Item.voidset typestatic com.fasterxml.jackson.core.type.TypeReference<ReturnItem>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithReturnItem(Function<ReturnItem, T> helper) accessor map function
-
Method Details
-
getId
Unique identifier of the Return Item.
- Returns:
- id
-
getKey
String getKey()User-defined unique identifier of the Return Item.
- Returns:
- key
-
getQuantity
Number of Line Items or Custom Line Items returned.
- Returns:
- quantity
-
getType
- Returns:
- type
-
getComment
String getComment()User-defined description for the return.
- Returns:
- comment
-
getShipmentState
Shipment status of the Return Item.
- Returns:
- shipmentState
-
getPaymentState
Payment status of the Return Item:
NonRefundable, for items in theAdvisedReturnShipmentStateInitial, for items in theReturnedReturnShipmentState
- Returns:
- paymentState
-
getCustom
Custom Fields of the Return Item.
- Returns:
- custom
-
getLastModifiedAt
Date and time (UTC) the Return Item was last updated.
- Returns:
- lastModifiedAt
-
getCreatedAt
Date and time (UTC) the Return Item was initially created.
- Returns:
- createdAt
-
setId
Unique identifier of the Return Item.
- Parameters:
id- value to be set
-
setKey
User-defined unique identifier of the Return Item.
- Parameters:
key- value to be set
-
setQuantity
Number of Line Items or Custom Line Items returned.
- Parameters:
quantity- value to be set
-
setType
set type- Parameters:
type- value to be set
-
setComment
User-defined description for the return.
- Parameters:
comment- value to be set
-
setShipmentState
Shipment status of the Return Item.
- Parameters:
shipmentState- value to be set
-
setPaymentState
Payment status of the Return Item:
NonRefundable, for items in theAdvisedReturnShipmentStateInitial, for items in theReturnedReturnShipmentState
- Parameters:
paymentState- value to be set
-
setCustom
Custom Fields of the Return Item.
- Parameters:
custom- value to be set
-
setLastModifiedAt
Date and time (UTC) the Return Item was last updated.
- Parameters:
lastModifiedAt- value to be set
-
setCreatedAt
Date and time (UTC) the Return Item was initially created.
- Parameters:
createdAt- value to be set
-
of
factory method- Returns:
- instance of ReturnItem
-
of
factory method to create a shallow copy ReturnItem- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ReturnItem copyDeep() -
deepCopy
factory method to create a deep copy of ReturnItem- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ReturnItem- Returns:
- builder
-
builder
create builder for ReturnItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withReturnItem
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
-