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 ExtensionBuilder
builder()
builder factory method for Extensionstatic ExtensionBuilder
create builder for Extension instancestatic Extension
factory method to create a deep copy of Extension@NotNull ZonedDateTime
Date and time (UTC) the Extension was initially created.@Valid CreatedBy
IDs and references that created the Extension.@NotNull @Valid ExtensionDestination
The configuration for the Extension, including its type, location and authentication details.@NotNull String
getId()
Unique identifier of the Extension.getKey()
User-defined unique identifier of the Extension.@NotNull ZonedDateTime
Date and time (UTC) the Extension was last updated.@Valid LastModifiedBy
IDs 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 Long
Current version of the Extension.static Extension
of()
factory methodstatic Extension
factory method to create a shallow copy Extensionvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Extension was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Extension.void
setDestination
(ExtensionDestination destination) The configuration for the Extension, including its type, location and authentication details.void
Unique identifier of the Extension.void
User-defined unique identifier of the Extension.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Extension was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Extension.void
setTimeoutInMs
(Integer timeoutInMs) Maximum time (in milliseconds) that the Extension can respond within.void
setTriggers
(ExtensionTrigger... triggers) Describes what triggers the Extension.void
setTriggers
(List<ExtensionTrigger> triggers) Describes what triggers the Extension.void
setVersion
(Long version) Current version of the Extension.static com.fasterxml.jackson.core.type.TypeReference<Extension>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withExtension
(Function<Extension, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the Extension.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Extension>
- Specified by:
getId
in interfaceIdentifiable<Extension>
- Specified by:
getId
in interfaceVersioned<Extension>
- Returns:
- id
-
getVersion
Current version of the Extension.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Extension>
- Specified by:
getVersion
in interfaceVersioned<Extension>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Extension was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Extension was last updated.
- Specified by:
getLastModifiedAt
in 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
payment
Extensions. The maximum value is 10000 ms (10 seconds) forpayment
Extensions and 2000 ms (2 seconds) for all other Extensions.- Returns:
- timeoutInMs
-
setId
Unique identifier of the Extension.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Extension.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the Extension was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Extension was last updated.
- Specified by:
setLastModifiedAt
in 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
payment
Extensions. The maximum value is 10000 ms (10 seconds) forpayment
Extensions 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
-
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
-