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 TypeMethodDescriptioncopyDeep()builder for customLineItemReturnItem subtypestatic 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 intitially 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 LineItemReturnItemBuilderbuilder for lineItemReturnItem subtypevoidsetComment(String comment) User-defined description for the return.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Return Item was intitially 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.static com.fasterxml.jackson.core.type.TypeReference<ReturnItem>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithReturnItem(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 theAdvisedReturnShipmentStateInitial, for items in theReturnedReturnShipmentState
- Returns:
- paymentState
-
getCustom
Custom Fields of the Return Item.
- Specified by:
getCustomin 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 theAdvisedReturnShipmentStateInitial, for items in theReturnedReturnShipmentState
- Parameters:
paymentState- value to be set
-
setCustom
Custom Fields of the Return Item.
- Specified by:
setCustomin 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
-
copyDeep
ReturnItem copyDeep() -
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
-