Class ExtensionDraftImpl

java.lang.Object
com.commercetools.api.models.extension.ExtensionDraftImpl
All Implemented Interfaces:
ExtensionDraft, WithKey, io.vrap.rmf.base.client.Draft<ExtensionDraft>, io.vrap.rmf.base.client.ModelBase

public class ExtensionDraftImpl extends Object implements ExtensionDraft, io.vrap.rmf.base.client.ModelBase
ExtensionDraft
  • Constructor Details

    • ExtensionDraftImpl

      public ExtensionDraftImpl()
      create empty instance
  • Method Details

    • getKey

      public String getKey()

      User-defined unique identifier for the Extension.

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

      public ExtensionDestination getDestination()

      Defines where the Extension can be reached.

      Specified by:
      getDestination in interface ExtensionDraft
      Returns:
      destination
    • getTriggers

      public List<ExtensionTrigger> getTriggers()

      Describes what triggers the Extension.

      Specified by:
      getTriggers in interface ExtensionDraft
      Returns:
      triggers
    • getTimeoutInMs

      public 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.

      Specified by:
      getTimeoutInMs in interface ExtensionDraft
      Returns:
      timeoutInMs
    • setKey

      public void setKey(String key)
      Description copied from interface: ExtensionDraft

      User-defined unique identifier for the Extension.

      Specified by:
      setKey in interface ExtensionDraft
      Parameters:
      key - value to be set
    • setDestination

      public void setDestination(ExtensionDestination destination)
      Description copied from interface: ExtensionDraft

      Defines where the Extension can be reached.

      Specified by:
      setDestination in interface ExtensionDraft
      Parameters:
      destination - value to be set
    • setTriggers

      public void setTriggers(ExtensionTrigger... triggers)
      Description copied from interface: ExtensionDraft

      Describes what triggers the Extension.

      Specified by:
      setTriggers in interface ExtensionDraft
      Parameters:
      triggers - values to be set
    • setTriggers

      public void setTriggers(List<ExtensionTrigger> triggers)
      Description copied from interface: ExtensionDraft

      Describes what triggers the Extension.

      Specified by:
      setTriggers in interface ExtensionDraft
      Parameters:
      triggers - values to be set
    • setTimeoutInMs

      public void setTimeoutInMs(Integer timeoutInMs)
      Description copied from interface: ExtensionDraft

      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.

      Specified by:
      setTimeoutInMs in interface ExtensionDraft
      Parameters:
      timeoutInMs - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object