Class ExtensionBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDescribes what triggers the Extension.build()
builds Extension with checking for non-null required valuesbuilds Extension without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Extension was initially created.IDs and references that created the Extension.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Extension.destination
(ExtensionDestination destination) The configuration for the Extension, including its type, location and authentication details.destination
(Function<ExtensionDestinationBuilder, Builder<? extends ExtensionDestination>> builder) The configuration for the Extension, including its type, location and authentication details.Date and time (UTC) the Extension was initially created.IDs and references that created the Extension.The configuration for the Extension, including its type, location and authentication details.getId()
Unique identifier of the Extension.getKey()
User-defined unique identifier of the Extension.Date and time (UTC) the Extension was last updated.IDs and references that last modified the Extension.Maximum time (in milliseconds) that the Extension can respond within.Describes what triggers the Extension.Current version of the Extension.Unique identifier of the Extension.User-defined unique identifier of the Extension.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Extension was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Extension.IDs and references that last modified the Extension.static ExtensionBuilder
of()
factory method for an instance of ExtensionBuilderstatic ExtensionBuilder
create builder for Extension instanceplusTriggers
(ExtensionTrigger... triggers) Describes what triggers the Extension.Describes what triggers the Extension.Describes what triggers the Extension.timeoutInMs
(Integer timeoutInMs) Maximum time (in milliseconds) that the Extension can respond within.triggers
(ExtensionTrigger... triggers) Describes what triggers the Extension.triggers
(List<ExtensionTrigger> triggers) Describes what triggers the Extension.Current version of the Extension.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Extension.IDs and references that last modified the Extension.Describes what triggers the Extension.
-
Constructor Details
-
ExtensionBuilder
public ExtensionBuilder()
-
-
Method Details
-
id
Unique identifier of the Extension.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Extension.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Extension was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Extension was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public ExtensionBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the Extension.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Extension.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Extension.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Extension.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Extension.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Extension.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Extension.
- Parameters:
key
- value to be set- Returns:
- Builder
-
destination
The configuration for the Extension, including its type, location and authentication details.
- Parameters:
destination
- value to be set- Returns:
- Builder
-
destination
public ExtensionBuilder destination(Function<ExtensionDestinationBuilder, Builder<? extends ExtensionDestination>> builder) The configuration for the Extension, including its type, location and authentication details.
- Parameters:
builder
- function to build the destination value- Returns:
- Builder
-
triggers
Describes what triggers the Extension.
- Parameters:
triggers
- value to be set- Returns:
- Builder
-
triggers
Describes what triggers the Extension.
- Parameters:
triggers
- value to be set- Returns:
- Builder
-
plusTriggers
Describes what triggers the Extension.
- Parameters:
triggers
- value to be set- Returns:
- Builder
-
plusTriggers
public ExtensionBuilder plusTriggers(Function<ExtensionTriggerBuilder, ExtensionTriggerBuilder> builder) Describes what triggers the Extension.
- Parameters:
builder
- function to build the triggers value- Returns:
- Builder
-
withTriggers
public ExtensionBuilder withTriggers(Function<ExtensionTriggerBuilder, ExtensionTriggerBuilder> builder) Describes what triggers the Extension.
- Parameters:
builder
- function to build the triggers value- Returns:
- Builder
-
addTriggers
Describes what triggers the Extension.
- Parameters:
builder
- function to build the triggers value- Returns:
- Builder
-
setTriggers
Describes what triggers the Extension.
- Parameters:
builder
- function to build the triggers value- Returns:
- Builder
-
timeoutInMs
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- Returns:
- Builder
-
getId
Unique identifier of the Extension.
- Returns:
- id
-
getVersion
Current version of the Extension.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Extension was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Extension was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Extension.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Extension.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Extension.
- Returns:
- key
-
getDestination
The configuration for the Extension, including its type, location and authentication details.
- Returns:
- destination
-
getTriggers
Describes what triggers the Extension.
- Returns:
- triggers
-
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
-
build
builds Extension with checking for non-null required values -
buildUnchecked
builds Extension without checking for non-null required values- Returns:
- Extension
-
of
factory method for an instance of ExtensionBuilder- Returns:
- builder
-
of
create builder for Extension instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-