Class ReturnItemBuilder
- All Implemented Interfaces:
Builder<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()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ReturnItem with checking for non-null required valuesbuilds ReturnItem without checking for non-null required valuesUser-defined description for the return.createdAt(ZonedDateTime createdAt) Date and time (UTC) the Return Item was initially created.custom(CustomFields custom) Custom Fields of the Return Item.custom(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the Return Item.User-defined description for the return.Date and time (UTC) the Return Item was initially created.Custom Fields of the Return Item.getId()Unique identifier of the Return Item.getKey()User-defined unique identifier of the Return Item.Date and time (UTC) the Return Item was last updated.Payment status of the Return Item:Number of Line Items or Custom Line Items returned.Shipment status of the Return Item.getType()value of type}Unique identifier of the Return Item.User-defined unique identifier of the Return Item.lastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Return Item was last updated.static ReturnItemBuilderof()factory method for an instance of ReturnItemBuilderstatic ReturnItemBuilderof(ReturnItem template) create builder for ReturnItem instancepaymentState(ReturnPaymentState paymentState) Payment status of the Return Item:Number of Line Items or Custom Line Items returned.shipmentState(ReturnShipmentState shipmentState) Shipment status of the Return Item.set the value to the typewithCustom(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the Return Item.
-
Constructor Details
-
ReturnItemBuilder
public ReturnItemBuilder()
-
-
Method Details
-
id
Unique identifier of the Return Item.
- Parameters:
id- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Return Item.
- Parameters:
key- value to be set- Returns:
- Builder
-
quantity
Number of Line Items or Custom Line Items returned.
- Parameters:
quantity- value to be set- Returns:
- Builder
-
type
set the value to the type- Parameters:
type- value to be set- Returns:
- Builder
-
comment
User-defined description for the return.
- Parameters:
comment- value to be set- Returns:
- Builder
-
shipmentState
Shipment status of the Return Item.
- Parameters:
shipmentState- value to be set- Returns:
- Builder
-
paymentState
Payment status of the Return Item:
NonRefundable, for items in theAdvisedReturnShipmentStateInitial, for items in theReturnedReturnShipmentState
- Parameters:
paymentState- value to be set- Returns:
- Builder
-
custom
Custom Fields of the Return Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the Return Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the Return Item.
- Parameters:
custom- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Return Item was last updated.
- Parameters:
lastModifiedAt- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Return Item was initially created.
- Parameters:
createdAt- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Return Item.
- Returns:
- id
-
getKey
User-defined unique identifier of the Return Item.
- Returns:
- key
-
getQuantity
Number of Line Items or Custom Line Items returned.
- Returns:
- quantity
-
getType
value of type}- Returns:
- type
-
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
-
build
builds ReturnItem with checking for non-null required values- Specified by:
buildin interfaceBuilder<ReturnItem>- Returns:
- ReturnItem
-
buildUnchecked
builds ReturnItem without checking for non-null required values- Returns:
- ReturnItem
-
of
factory method for an instance of ReturnItemBuilder- Returns:
- builder
-
of
create builder for ReturnItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-