title: Customer Tier
type: object
x-tags:
  - Models
description: Represents a customer tier created by/for a merchant.
required:
  - name
properties:
  uuid:
    type: string
    format: uuid
    description: The customer tier's unique identifier.
    readOnly: true
  name:
    type: string
    description: |-
      The name of the customer tier.

      This field is not required when editing an existing entity.
    example: Gold Membership
    minLength: 1
    maxLength: 255
  currency_code:
    type: string
    minLength: 3
    maxLength: 3
    description: The ISO 4217 alpha-3 currency code associated with the customer tier.
    example: SGD
    readOnly: true
  spending_requirement:
    anyOf:
      - type: 'null'
      - $ref: ./Money.yaml
    description: The monetary amount customers must spend to be eligible for this customer tier.
  automatically_upgrade:
    type: boolean
    description: |-
      Indicates if customer should be automatically upgraded to this tier if they hit the spending requirement.

      If no spending requirement is set, this field cannot be set to `true`.
  description:
    type:
      - string
      - 'null'
    minLength: 1
    maxLength: 10000
    description: The customer-facing description for the customer tier.
    example: The absolue best tier we offer for really loyal customers.
  benefits:
    type: array
    maxItems: 100
    description: |-
      Gifts attempted on first attainment only, including default/manual assignments and automatic purchase upgrades.
      A purchase crossing several tiers attempts every newly attained tier's gifts in lower-to-higher tier order,
      preserving each tier's configured benefit order. Limited voucher capacity can therefore fulfil a lower-tier gift
      and skip a larger later gift. Reassignment, configuration edits and purchase voids do not repeat or withdraw gifts.

      Voucher gifts create new batches with frozen benefit, currency and validity; current minimum spend, outlets and
      stacking govern later redemption. Destination outlets do not restrict gift issuance. Revocation does not restore
      lifetime capacity. Stamp gifts clear expired stamps and apply current validity from grant time without shortening a positive
      pool's existing validity. Existing no-expiry pools remain unlimited; empty or expired pools use current validity. Purchase bonuses do not apply to gifts. Stored-value gift expiry
      behavior is unchanged: existing expiry is preserved and new or cleared wallets have no expiry.
    items:
      $ref: ./CustomerTierBenefit.yaml
  is_archived:
    type: boolean
    description: Indicates if the customer tier has been archived.
    readOnly: true
  created_at:
    type: string
    format: date-time
    description: The date-time that the customer tier was first created.
    readOnly: true
