Class LineItemReturnItemBuilder
- All Implemented Interfaces:
Builder<LineItemReturnItem>
Example to create an instance using the builder pattern
LineItemReturnItem lineItemReturnItem = LineItemReturnItem.builder()
.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"))
.lineItemId("{lineItemId}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds LineItemReturnItem with checking for non-null required valuesbuilds LineItemReturnItem without checking for non-null required valuesUser-defined description for the return.createdAt(ZonedDateTime createdAt) Date and time (UTC) the Return Item was intitially 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 intitially created.Custom Fields of the Return Item.getId()Unique identifier of the Return Item.getKey()User-defined unique identifier of the LineItemReturnItem.Date and time (UTC) the Return Item was last updated.idof the returned LineItem.Payment status of the Return Item:Number of Line Items returned.Shipment status of the Return Item.Unique identifier of the Return Item.User-defined unique identifier of the LineItemReturnItem.lastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Return Item was last updated.lineItemId(String lineItemId) idof the returned LineItem.static LineItemReturnItemBuilderof()factory method for an instance of LineItemReturnItemBuilderstatic LineItemReturnItemBuilderof(LineItemReturnItem template) create builder for LineItemReturnItem instancepaymentState(ReturnPaymentState paymentState) Payment status of the Return Item:Number of Line Items returned.shipmentState(ReturnShipmentState shipmentState) Shipment status of the Return Item.withCustom(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the Return Item.
-
Constructor Details
-
LineItemReturnItemBuilder
public LineItemReturnItemBuilder()
-
-
Method Details
-
id
Unique identifier of the Return Item.
- Parameters:
id- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the LineItemReturnItem.
- Parameters:
key- value to be set- Returns:
- Builder
-
quantity
Number of Line Items returned.
- Parameters:
quantity- 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 intitially created.
- Parameters:
createdAt- value to be set- Returns:
- Builder
-
lineItemId
idof the returned LineItem.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Return Item.
- Returns:
- id
-
getKey
User-defined unique identifier of the LineItemReturnItem.
- Returns:
- key
-
getQuantity
Number of Line Items returned.
- Returns:
- quantity
-
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 intitially created.
- Returns:
- createdAt
-
getLineItemId
idof the returned LineItem.- Returns:
- lineItemId
-
build
builds LineItemReturnItem with checking for non-null required values- Specified by:
buildin interfaceBuilder<LineItemReturnItem>- Returns:
- LineItemReturnItem
-
buildUnchecked
builds LineItemReturnItem without checking for non-null required values- Returns:
- LineItemReturnItem
-
of
factory method for an instance of LineItemReturnItemBuilder- Returns:
- builder
-
of
create builder for LineItemReturnItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-