Interface ExtensionDraft

All Superinterfaces:
Draft<ExtensionDraft>, WithKey

public interface ExtensionDraft extends WithKey, Draft<ExtensionDraft>
ExtensionDraft
Example to create an instance using the builder pattern

     ExtensionDraft extensionDraft = ExtensionDraft.builder()
             .destination(destinationBuilder -> destinationBuilder)
             .plusTriggers(triggersBuilder -> triggersBuilder)
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier for the Extension.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getDestination

      @NotNull @Valid @NotNull @Valid ExtensionDestination getDestination()

      Defines where the Extension can be reached.

      Returns:
      destination
    • getTriggers

      @NotNull @Valid @NotNull @Valid List<ExtensionTrigger> getTriggers()

      Describes what triggers the Extension.

      Returns:
      triggers
    • getTimeoutInMs

      Integer getTimeoutInMs()

      Maximum time (in milliseconds) the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.

      This limit can be increased per Project after we review the performance impact. Please contact our support via the Support Portal and provide the Region, Project key, and use case.

      Returns:
      timeoutInMs
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Extension.

      Parameters:
      key - value to be set
    • setDestination

      void setDestination(ExtensionDestination destination)

      Defines where the Extension can be reached.

      Parameters:
      destination - value to be set
    • setTriggers

      void setTriggers(ExtensionTrigger... triggers)

      Describes what triggers the Extension.

      Parameters:
      triggers - values to be set
    • setTriggers

      void setTriggers(List<ExtensionTrigger> triggers)

      Describes what triggers the Extension.

      Parameters:
      triggers - values to be set
    • setTimeoutInMs

      void setTimeoutInMs(Integer timeoutInMs)

      Maximum time (in milliseconds) the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.

      This limit can be increased per Project after we review the performance impact. Please contact our support via the Support Portal and provide the Region, Project key, and use case.

      Parameters:
      timeoutInMs - value to be set
    • of

      static ExtensionDraft of()
      factory method
      Returns:
      instance of ExtensionDraft
    • of

      static ExtensionDraft of(ExtensionDraft template)
      factory method to create a shallow copy ExtensionDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ExtensionDraft deepCopy(@Nullable ExtensionDraft template)
      factory method to create a deep copy of ExtensionDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ExtensionDraftBuilder builder()
      builder factory method for ExtensionDraft
      Returns:
      builder
    • builder

      static ExtensionDraftBuilder builder(ExtensionDraft template)
      create builder for ExtensionDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withExtensionDraft

      default <T> T withExtensionDraft(Function<ExtensionDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ExtensionDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference