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

public interface ResourceIdentifier extends WithKey

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()