Class ApprovalRuleImpl

java.lang.Object
com.commercetools.api.models.approval_rule.ApprovalRuleImpl
All Implemented Interfaces:
ApprovalRule, BaseResource, io.vrap.rmf.base.client.ModelBase

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

    • ApprovalRuleImpl

      public ApprovalRuleImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Approval Rule.

      Specified by:
      getId in interface ApprovalRule
      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Approval Rule.

      Specified by:
      getVersion in interface ApprovalRule
      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Approval Rule was initially created.

      Specified by:
      getCreatedAt in interface ApprovalRule
      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Approval Rule was last updated.

      Specified by:
      getLastModifiedAt in interface ApprovalRule
      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface ApprovalRule
      Returns:
      createdBy
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface ApprovalRule
      Returns:
      lastModifiedBy
    • getKey

      public String getKey()

      User-defined unique identifier of the Approval Rule. Must be unique within a Business Unit.

      Specified by:
      getKey in interface ApprovalRule
      Returns:
      key
    • getName

      public String getName()

      Name of the Approval Rule.

      Specified by:
      getName in interface ApprovalRule
      Returns:
      name
    • getDescription

      public String getDescription()

      Description of the Approval Rule.

      Specified by:
      getDescription in interface ApprovalRule
      Returns:
      description
    • getStatus

      public ApprovalRuleStatus getStatus()

      Indicates whether the Approval Rule should be matched against Orders or not.

      Specified by:
      getStatus in interface ApprovalRule
      Returns:
      status
    • getPredicate

      public String getPredicate()

      The Order Predicate describing the Orders the Approval Rule should match against.

      Specified by:
      getPredicate in interface ApprovalRule
      Returns:
      predicate
    • getApprovers

      public ApproverHierarchy getApprovers()

      The hierarchy of approvers within the Approval Rule.

      Specified by:
      getApprovers in interface ApprovalRule
      Returns:
      approvers
    • getRequesters

      public List<RuleRequester> getRequesters()

      The Associate Roles customers must hold for their Order to require approval.

      Specified by:
      getRequesters in interface ApprovalRule
      Returns:
      requesters
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      The Business Unit the Approval Rule belongs to.

      Specified by:
      getBusinessUnit in interface ApprovalRule
      Returns:
      businessUnit
    • setId

      public void setId(String id)
      Description copied from interface: ApprovalRule

      Unique identifier of the Approval Rule.

      Specified by:
      setId in interface ApprovalRule
      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: ApprovalRule

      Current version of the Approval Rule.

      Specified by:
      setVersion in interface ApprovalRule
      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: ApprovalRule

      Date and time (UTC) the Approval Rule was initially created.

      Specified by:
      setCreatedAt in interface ApprovalRule
      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: ApprovalRule

      Date and time (UTC) the Approval Rule was last updated.

      Specified by:
      setLastModifiedAt in interface ApprovalRule
      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: ApprovalRule

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface ApprovalRule
      Parameters:
      createdBy - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: ApprovalRule

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface ApprovalRule
      Parameters:
      lastModifiedBy - value to be set
    • setKey

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

      User-defined unique identifier of the Approval Rule. Must be unique within a Business Unit.

      Specified by:
      setKey in interface ApprovalRule
      Parameters:
      key - value to be set
    • setName

      public void setName(String name)
      Description copied from interface: ApprovalRule

      Name of the Approval Rule.

      Specified by:
      setName in interface ApprovalRule
      Parameters:
      name - value to be set
    • setDescription

      public void setDescription(String description)
      Description copied from interface: ApprovalRule

      Description of the Approval Rule.

      Specified by:
      setDescription in interface ApprovalRule
      Parameters:
      description - value to be set
    • setStatus

      public void setStatus(ApprovalRuleStatus status)
      Description copied from interface: ApprovalRule

      Indicates whether the Approval Rule should be matched against Orders or not.

      Specified by:
      setStatus in interface ApprovalRule
      Parameters:
      status - value to be set
    • setPredicate

      public void setPredicate(String predicate)
      Description copied from interface: ApprovalRule

      The Order Predicate describing the Orders the Approval Rule should match against.

      Specified by:
      setPredicate in interface ApprovalRule
      Parameters:
      predicate - value to be set
    • setApprovers

      public void setApprovers(ApproverHierarchy approvers)
      Description copied from interface: ApprovalRule

      The hierarchy of approvers within the Approval Rule.

      Specified by:
      setApprovers in interface ApprovalRule
      Parameters:
      approvers - value to be set
    • setRequesters

      public void setRequesters(RuleRequester... requesters)
      Description copied from interface: ApprovalRule

      The Associate Roles customers must hold for their Order to require approval.

      Specified by:
      setRequesters in interface ApprovalRule
      Parameters:
      requesters - values to be set
    • setRequesters

      public void setRequesters(List<RuleRequester> requesters)
      Description copied from interface: ApprovalRule

      The Associate Roles customers must hold for their Order to require approval.

      Specified by:
      setRequesters in interface ApprovalRule
      Parameters:
      requesters - values to be set
    • setBusinessUnit

      public void setBusinessUnit(BusinessUnitKeyReference businessUnit)
      Description copied from interface: ApprovalRule

      The Business Unit the Approval Rule belongs to.

      Specified by:
      setBusinessUnit in interface ApprovalRule
      Parameters:
      businessUnit - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object