Enum Class RebateAgreementStatus

Object
Enum<RebateAgreementStatus>
RebateAgreementStatus
All Implemented Interfaces:
Serializable, Comparable<RebateAgreementStatus>, Constable

public enum RebateAgreementStatus extends Enum<RebateAgreementStatus>
Lists the statuses of a Rebate Agreement.

The platform sets the status when the Rebate Agreement goes through its approval workflow, when a user revokes it, and when a revision of it is approved. A new agreement is DRAFT. Approval makes it APPROVED. An approved agreement becomes REVOKED when a user revokes it. When a revision of an agreement is approved, the agreement becomes SUPERSEDED if its approval workflow was approved (or needed no approval), and INVALIDATED otherwise.

Each Rebate Record and Rebate Record Group keeps a copy of the status of its agreement in the agreementStatus field, next to its own status (RebateRecordStatus). The platform does not check whether the two statuses fit together. The Rebate Record logic decides which combinations are valid.

Example, select the Rebate Records of approved agreements:


 import net.pricefx.common.api.RebateAgreementStatus

 def q = api.queryApi()
 def t = q.tables().rebateRecords(17)

 return q.source(t, [t.uniqueName(), t.agreementStatus()],
         t.agreementStatus().equal(RebateAgreementStatus.APPROVED))
         .stream { it.collect { it } }
 
See Also:
  • Enum Constant Details

    • DRAFT

      public static final RebateAgreementStatus DRAFT
      The agreement is new or not approved yet. It keeps this status while it is submitted for approval, and returns to it when the approval is withdrawn or denied.
    • APPROVED

      public static final RebateAgreementStatus APPROVED
      The approval workflow approved the agreement, or the workflow had no approval steps. An agreement also returns to this status when a revocation is undone. Only an approved agreement can be signed.
    • OPEN

      public static final RebateAgreementStatus OPEN
      No longer used. The platform does not set this status.
    • CLOSED

      public static final RebateAgreementStatus CLOSED
      No longer used. The platform does not set this status.
    • REVOKED

      public static final RebateAgreementStatus REVOKED
      A user revoked the agreement. Only an APPROVED agreement, or one in the unused OPEN status, can be revoked. Every linked Rebate Record Group changes to RebateRecordStatus.REVOKED. The linked Rebate Records that are not approved change to RebateRecordStatus.REVOKED; approved records keep their status.
    • SUPERSEDED

      public static final RebateAgreementStatus SUPERSEDED
      A revision of the agreement was approved while the approval workflow of this agreement was approved (or needed no approval). The status of the agreement itself is not checked, so a REVOKED agreement can also become SUPERSEDED. The linked Rebate Records and Rebate Record Groups that are not approved change to RebateRecordStatus.INVALIDATED.
    • INVALIDATED

      public static final RebateAgreementStatus INVALIDATED
      A revision of the agreement was approved while the approval workflow of this agreement was not approved. The pending approval workflow of this agreement is cancelled. The linked Rebate Records and Rebate Record Groups that are not approved change to RebateRecordStatus.INVALIDATED.
  • Method Details

    • values

      public static RebateAgreementStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RebateAgreementStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null