Interface ReturnItem
- All Superinterfaces:
Customizable<ReturnItem>
- All Known Subinterfaces:
CustomLineItemReturnItem
,LineItemReturnItem
Example to create a subtype instance using the builder pattern
ReturnItem returnItem = ReturnItem.customLineItemReturnItemBuilder()
id("{id}")
quantity(0.3)
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"))
customLineItemId("{customLineItemId}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for customLineItemReturnItem subtypestatic ReturnItem
deepCopy
(ReturnItem template) factory method to create a deep copy of ReturnItemUser-defined description for the return.@NotNull ZonedDateTime
Date and time (UTC) the Return Item was intitially created.@Valid CustomFields
Custom Fields of the Return Item.@NotNull String
getId()
Unique identifier of the Return Item.getKey()
User-defined unique identifier of the Return Item.@NotNull ZonedDateTime
Date and time (UTC) the Return Item was last updated.@NotNull ReturnPaymentState
Payment status of the Return Item:@NotNull Long
Number of Line Items or Custom Line Items returned.@NotNull ReturnShipmentState
Shipment status of the Return Item.@NotNull String
getType()
static LineItemReturnItemBuilder
builder for lineItemReturnItem subtypevoid
setComment
(String comment) User-defined description for the return.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Return Item was intitially created.void
setCustom
(CustomFields custom) Custom Fields of the Return Item.void
Unique identifier of the Return Item.void
User-defined unique identifier of the Return Item.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Return Item was last updated.void
setPaymentState
(ReturnPaymentState paymentState) Payment status of the Return Item:void
setQuantity
(Long quantity) Number of Line Items or Custom Line Items returned.void
setShipmentState
(ReturnShipmentState shipmentState) Shipment status of the Return Item.static com.fasterxml.jackson.core.type.TypeReference<ReturnItem>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReturnItem
(Function<ReturnItem, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
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 theAdvised
ReturnShipmentStateInitial
, for items in theReturned
ReturnShipmentState
- Returns:
- paymentState
-
getCustom
Custom Fields of the Return Item.
- Specified by:
getCustom
in interfaceCustomizable<ReturnItem>
- Returns:
- custom
-
getLastModifiedAt
Date and time (UTC) the Return Item was last updated.
- Returns:
- lastModifiedAt
-
getCreatedAt
Date and time (UTC) the Return Item was intitially 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
-
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 theAdvised
ReturnShipmentStateInitial
, for items in theReturned
ReturnShipmentState
- Parameters:
paymentState
- value to be set
-
setCustom
Custom Fields of the Return Item.
- Specified by:
setCustom
in interfaceCustomizable<ReturnItem>
- 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 intitially created.
- Parameters:
createdAt
- value to be set
-
deepCopy
factory method to create a deep copy of ReturnItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
customLineItemReturnItemBuilder
builder for customLineItemReturnItem subtype- Returns:
- builder
-
lineItemReturnItemBuilder
builder for lineItemReturnItem subtype- 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
-