Interface Extension
- All Superinterfaces:
BaseResource,DomainResource<Extension>,Identifiable<Extension>,Versioned<Extension>,WithKey
Example to create an instance using the builder pattern
Extension extension = Extension.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.destination(destinationBuilder -> destinationBuilder)
.plusTriggers(triggersBuilder -> triggersBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionBuilderbuilder()builder factory method for Extensionstatic ExtensionBuildercreate builder for Extension instancecopyDeep()static Extensionfactory method to create a deep copy of Extension@NotNull ZonedDateTimeDate and time (UTC) the Extension was initially created.@Valid CreatedByIDs and references that created the Extension.@NotNull @Valid ExtensionDestinationThe configuration for the Extension, including its type, location and authentication details.@NotNull StringgetId()Unique identifier of the Extension.getKey()User-defined unique identifier of the Extension.@NotNull ZonedDateTimeDate and time (UTC) the Extension was last updated.@Valid LastModifiedByIDs and references that last modified the Extension.Maximum time (in milliseconds) that the Extension can respond within.@NotNull @Valid List<ExtensionTrigger>Describes what triggers the Extension.@NotNull LongCurrent version of the Extension.static Extensionof()factory methodstatic Extensionfactory method to create a shallow copy ExtensionvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Extension was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Extension.voidsetDestination(ExtensionDestination destination) The configuration for the Extension, including its type, location and authentication details.voidUnique identifier of the Extension.voidUser-defined unique identifier of the Extension.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Extension was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Extension.voidsetTimeoutInMs(Integer timeoutInMs) Maximum time (in milliseconds) that the Extension can respond within.voidsetTriggers(ExtensionTrigger... triggers) Describes what triggers the Extension.voidsetTriggers(List<ExtensionTrigger> triggers) Describes what triggers the Extension.voidsetVersion(Long version) Current version of the Extension.static com.fasterxml.jackson.core.type.TypeReference<Extension>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithExtension(Function<Extension, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the Extension.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Extension>- Specified by:
getIdin interfaceIdentifiable<Extension>- Specified by:
getIdin interfaceVersioned<Extension>- Returns:
- id
-
getVersion
Current version of the Extension.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Extension>- Specified by:
getVersionin interfaceVersioned<Extension>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Extension was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Extension was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Extension.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Extension.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the Extension.
-
getDestination
The configuration for the Extension, including its type, location and authentication details.
- Returns:
- destination
-
getTriggers
Describes what triggers the Extension.
- Returns:
- triggers
-
getTimeoutInMs
Integer getTimeoutInMs()Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including
paymentExtensions. The maximum value is 10000 ms (10 seconds) forpaymentExtensions and 2000 ms (2 seconds) for all other Extensions.- Returns:
- timeoutInMs
-
setId
Unique identifier of the Extension.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Extension.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Extension was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Extension was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Extension.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Extension.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the Extension.
- Parameters:
key- value to be set
-
setDestination
The configuration for the Extension, including its type, location and authentication details.
- Parameters:
destination- value to be set
-
setTriggers
Describes what triggers the Extension.
- Parameters:
triggers- values to be set
-
setTriggers
Describes what triggers the Extension.
- Parameters:
triggers- values to be set
-
setTimeoutInMs
Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including
paymentExtensions. The maximum value is 10000 ms (10 seconds) forpaymentExtensions and 2000 ms (2 seconds) for all other Extensions.- Parameters:
timeoutInMs- value to be set
-
of
factory method- Returns:
- instance of Extension
-
of
factory method to create a shallow copy Extension- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Extension copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Extension- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Extension- Returns:
- builder
-
builder
create builder for Extension instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withExtension
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
-