Interface ResourceIdentifier
- All Superinterfaces:
WithKey
- All Known Subinterfaces:
AssociateRoleResourceIdentifier
,AttributeGroupResourceIdentifier
,BusinessUnitResourceIdentifier
,CartDiscountResourceIdentifier
,CartResourceIdentifier
,CategoryResourceIdentifier
,ChannelResourceIdentifier
,CustomerGroupResourceIdentifier
,CustomerResourceIdentifier
,DiscountCodeResourceIdentifier
,InventoryEntryResourceIdentifier
,OrderEditResourceIdentifier
,OrderResourceIdentifier
,PaymentResourceIdentifier
,ProductDiscountResourceIdentifier
,ProductResourceIdentifier
,ProductSelectionResourceIdentifier
,ProductTypeResourceIdentifier
,QuoteRequestResourceIdentifier
,QuoteResourceIdentifier
,ReviewResourceIdentifier
,ShippingMethodResourceIdentifier
,ShoppingListResourceIdentifier
,StagedQuoteResourceIdentifier
,StandalonePriceResourceIdentifier
,StateResourceIdentifier
,StoreResourceIdentifier
,TaxCategoryResourceIdentifier
,TypeResourceIdentifier
,ZoneResourceIdentifier
- All Known Implementing Classes:
AssociateRoleResourceIdentifierImpl
,AttributeGroupResourceIdentifierImpl
,BusinessUnitResourceIdentifierImpl
,CartDiscountResourceIdentifierImpl
,CartResourceIdentifierImpl
,CategoryResourceIdentifierImpl
,ChannelResourceIdentifierImpl
,CustomerGroupResourceIdentifierImpl
,CustomerResourceIdentifierImpl
,DiscountCodeResourceIdentifierImpl
,InventoryEntryResourceIdentifierImpl
,OrderEditResourceIdentifierImpl
,OrderResourceIdentifierImpl
,PaymentResourceIdentifierImpl
,ProductDiscountResourceIdentifierImpl
,ProductResourceIdentifierImpl
,ProductSelectionResourceIdentifierImpl
,ProductTypeResourceIdentifierImpl
,QuoteRequestResourceIdentifierImpl
,QuoteResourceIdentifierImpl
,ResourceIdentifierImpl
,ReviewResourceIdentifierImpl
,ShippingMethodResourceIdentifierImpl
,ShoppingListResourceIdentifierImpl
,StagedQuoteResourceIdentifierImpl
,StandalonePriceResourceIdentifierImpl
,StateResourceIdentifierImpl
,StoreResourceIdentifierImpl
,TaxCategoryResourceIdentifierImpl
,TypeResourceIdentifierImpl
,ZoneResourceIdentifierImpl
Draft type to create a Reference or a KeyReference to a resource. Provide either the id
or (wherever supported) the key
of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent
of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.
Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.
Example to create a subtype instance using the builder pattern
ResourceIdentifier resourceIdentifier = ResourceIdentifier.associateRoleBuilder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for associateRole subtypebuilder for attributeGroup subtypebuilder for businessUnit subtypebuilder for cart subtypebuilder for cartDiscount subtypebuilder for category subtypebuilder for channel subtypebuilder for customer subtypebuilder for customerGroup subtypestatic ResourceIdentifier
deepCopy
(ResourceIdentifier template) factory method to create a deep copy of ResourceIdentifierbuilder for discountCode subtypegetId()
Unique identifier of the referenced resource.getKey()
User-defined unique identifier of the referenced resource.Type of referenced resource.builder for inventoryEntry subtypebuilder for orderEdit subtypebuilder for payment subtypebuilder for product subtypebuilder for productDiscount subtypebuilder for productSelection subtypebuilder for productType subtypebuilder for quote subtypebuilder for quoteRequest subtypebuilder for review subtypevoid
Unique identifier of the referenced resource.void
User-defined unique identifier of the referenced resource.builder for shippingMethod subtypebuilder for shoppingList subtypebuilder for stagedQuote subtypebuilder for standalonePrice subtypebuilder for state subtypebuilder for store subtypebuilder for taxCategory subtypebuilder for type subtypestatic com.fasterxml.jackson.core.type.TypeReference<ResourceIdentifier>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withResourceIdentifier
(Function<ResourceIdentifier, T> helper) accessor map functionbuilder for zone subtype
-
Method Details
-
getTypeId
ReferenceTypeId getTypeId()Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.
- Returns:
- typeId
-
getId
String getId()Unique identifier of the referenced resource. Required if
key
is absent.- Returns:
- id
-
getKey
String getKey()User-defined unique identifier of the referenced resource. Required if
id
is absent. -
setId
Unique identifier of the referenced resource. Required if
key
is absent.- Parameters:
id
- value to be set
-
setKey
User-defined unique identifier of the referenced resource. Required if
id
is absent.- Parameters:
key
- value to be set
-
deepCopy
factory method to create a deep copy of ResourceIdentifier- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
associateRoleBuilder
builder for associateRole subtype- Returns:
- builder
-
attributeGroupBuilder
builder for attributeGroup subtype- Returns:
- builder
-
businessUnitBuilder
builder for businessUnit subtype- Returns:
- builder
-
cartDiscountBuilder
builder for cartDiscount subtype- Returns:
- builder
-
cartBuilder
builder for cart subtype- Returns:
- builder
-
categoryBuilder
builder for category subtype- Returns:
- builder
-
channelBuilder
builder for channel subtype- Returns:
- builder
-
customerGroupBuilder
builder for customerGroup subtype- Returns:
- builder
-
customerBuilder
builder for customer subtype- Returns:
- builder
-
discountCodeBuilder
builder for discountCode subtype- Returns:
- builder
-
inventoryEntryBuilder
builder for inventoryEntry subtype- Returns:
- builder
-
orderEditBuilder
builder for orderEdit subtype- Returns:
- builder
-
paymentBuilder
builder for payment subtype- Returns:
- builder
-
productDiscountBuilder
builder for productDiscount subtype- Returns:
- builder
-
productBuilder
builder for product subtype- Returns:
- builder
-
productSelectionBuilder
builder for productSelection subtype- Returns:
- builder
-
productTypeBuilder
builder for productType subtype- Returns:
- builder
-
quoteRequestBuilder
builder for quoteRequest subtype- Returns:
- builder
-
quoteBuilder
builder for quote subtype- Returns:
- builder
-
reviewBuilder
builder for review subtype- Returns:
- builder
-
shippingMethodBuilder
builder for shippingMethod subtype- Returns:
- builder
-
shoppingListBuilder
builder for shoppingList subtype- Returns:
- builder
-
stagedQuoteBuilder
builder for stagedQuote subtype- Returns:
- builder
-
standalonePriceBuilder
builder for standalonePrice subtype- Returns:
- builder
-
stateBuilder
builder for state subtype- Returns:
- builder
-
storeBuilder
builder for store subtype- Returns:
- builder
-
taxCategoryBuilder
builder for taxCategory subtype- Returns:
- builder
-
typeBuilder
builder for type subtype- Returns:
- builder
-
zoneBuilder
builder for zone subtype- Returns:
- builder
-
withResourceIdentifier
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
-