> ## Documentation Index
> Fetch the complete documentation index at: https://developers.loyaltylion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collection Discount Voucher

Use this endpoint to redeem a `collection_discount_voucher` reward, which will
apply a fixed or percentage discount to line items that belong to the designated
collection. If the redemption is successful, the new claimed reward and a unique
voucher (coupon) code will be included in the response.

You can show the voucher code to the customer and instruct them to apply it to
their cart later.

Details of the collection to which this voucher applies can be found in
`claimed_reward.redeemable.collection`, and this should be shown
to the customer.

Note that collection discount vouchers can have a minimum spend, found in
`claimed_reward.redeemable.minimum_spend`. If present, this should be
communicated to the customer to avoid confusion.


## OpenAPI

````yaml headless-api/2025-06/openapi.json POST /headless/2025-06/{site_id}/rewards/collection_discount_voucher/redeem
openapi: 3.1.1
info:
  title: LoyaltyLion Headless API
  version: 2025-06
servers:
  - url: https://api.loyaltylion.com
security: []
tags:
  - name: configuration
  - name: customers
  - name: rewards
  - name: rules
paths:
  /headless/2025-06/{site_id}/rewards/collection_discount_voucher/redeem:
    post:
      tags:
        - rewards
      operationId: rewards.redeemCollectionDiscountVoucher
      parameters:
        - name: site_id
          in: path
          required: true
          schema:
            type: number
          description: Your LoyaltyLion Site ID
        - name: channel
          in: query
          description: >-
            The sales channel from which this request is made. Must be provided
            as this query parameter, or the `X-LoyaltyLion-Channel` header
          schema:
            $ref: '#/components/schemas/SupportedChannel'
        - name: language
          in: query
          description: >-
            The language to use for the request. If not provided, the site's
            default language will be used
          schema:
            type: string
            pattern: ^[a-z]{2,3}$|^[a-z]{2,3}-[a-z0-9]{2,4}$
        - name: country
          in: query
          description: >-
            ISO 3166-1 alpha-2 country code for the customer. Used to filter
            rewards by country availability. If not provided, the site default
            is used
          schema:
            type: string
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/RewardsRedeemCollectionDiscountVoucherRequestBody
      responses:
        '201':
          description: '201'
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/RewardsRedeemCollectionDiscountVoucherResponseBody
        '400':
          $ref: '#/components/responses/ClientErrorBadRequest'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '422':
          description: '422'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - $ref: >-
                          #/components/schemas/RedeemRewardErrorInsufficientPoints
                      - $ref: >-
                          #/components/schemas/RedeemRewardErrorCustomerNotEnrolled
                      - $ref: '#/components/schemas/RedeemRewardErrorCustomerBlocked'
                      - $ref: >-
                          #/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer
                      - $ref: '#/components/schemas/RedeemRewardErrorRewardOutOfStock'
                      - $ref: >-
                          #/components/schemas/RedeemRewardErrorRewardInvalidKind
                      - $ref: >-
                          #/components/schemas/RedeemRewardErrorRewardLimitReached
                    type: object
                    discriminator:
                      propertyName: code
                      mapping:
                        insufficient_points:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorInsufficientPoints
                        customer_not_enrolled:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorCustomerNotEnrolled
                        customer_blocked:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorCustomerBlocked
                        reward_not_enabled_for_customer:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer
                        reward_out_of_stock:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorRewardOutOfStock
                        reward_kind_mismatch:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorRewardInvalidKind
                        reward_limit_reached:
                          $ref: >-
                            #/components/schemas/RedeemRewardErrorRewardLimitReached
                required:
                  - error
                additionalProperties: false
        '429':
          description: '429'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - rate_limited
                    required:
                      - code
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - ProgramApiKey:
            - write_customers
components:
  schemas:
    SupportedChannel:
      type: string
      enum:
        - web
        - pos
        - mobile
      description: The sales channel from which this request is made
    RewardsRedeemCollectionDiscountVoucherRequestBody:
      type: object
      properties:
        reward_id:
          type: number
          description: The LoyaltyLion ID of the reward to redeem
        customer_merchant_id:
          type: string
          description: >-
            The ID of the customer (in your ecommerce store or platform) to
            redeem the reward for. For Shopify stores, you can pass either a
            [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric
            ID. 


            This must be a customer whose state is `enrolled`
      required:
        - reward_id
        - customer_merchant_id
      additionalProperties: false
    RewardsRedeemCollectionDiscountVoucherResponseBody:
      type: object
      properties:
        voucher_code:
          type: string
          description: The unique voucher code that will apply the discount
          example: LL-XYA3816
        claimed_reward:
          type: object
          properties:
            id:
              type: number
              description: The ID of the claimed reward resource in LoyaltyLion
            claimed_at:
              type: string
              description: '`ISO 8601` timestamp indicating when this reward was claimed'
            reward_id:
              type: number
              description: >-
                The ID of the reward that was claimed. If a reward with this ID
                does not exist in the current [Site
                Configuration](/headless-api/2025-06/configuration/get-configuration),
                it means the reward has been deleted. The associated redeemable,
                if any, will usually still be active even after the reward has
                been deleted
            title:
              type: string
              description: >-
                Short, localized title for this claimed reward. For example, '$5
                voucher', or 'Free Water Bottle'. This is usually the same title
                as the associated reward
              example: $5 voucher
            state:
              type: string
              enum:
                - approved
                - declined
                - expired
                - pending
                - void
              description: >-
                The state of this claimed reward. Only `active` rewards will
                have a usable `redeemable`
            source:
              oneOf:
                - $ref: '#/components/schemas/ClaimedRewardSourcePointsRedemption'
                - $ref: '#/components/schemas/ClaimedRewardSourceRuleCompletion'
                - $ref: '#/components/schemas/ClaimedRewardSourceTierEntry'
              description: >-
                Details about how the customer received this reward. One of
                `points_redemption` (the customer used their points to redeem
                the reward), `rule_completion` (the reward was awarded as the
                result of completing a rule), or `tier_entry` (the reward was
                awarded when the customer entered a tier)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points_redemption:
                    $ref: '#/components/schemas/ClaimedRewardSourcePointsRedemption'
                  rule_completion:
                    $ref: '#/components/schemas/ClaimedRewardSourceRuleCompletion'
                  tier_entry:
                    $ref: '#/components/schemas/ClaimedRewardSourceTierEntry'
            auto_refund_at:
              description: >-
                `ISO 8601` timestamp indicating when this reward and its
                associated redeemable will be automatically voided and refunded
                if it has not yet been used, or `null` if not applicable
              type:
                - string
                - 'null'
            redeemable:
              type: object
              properties:
                usage_status:
                  type: string
                  enum:
                    - not_used
                    - partially_used
                    - used
                  description: >-
                    The usage status of this redeemable. Redeemables that are
                    `used` cannot be used again, e.g. a voucher code that has
                    already been used with an order
                kind:
                  type: string
                  const: collection_discount_voucher
                code:
                  type: string
                  description: The discount voucher code
                collection:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type:
                        - string
                        - 'null'
                    url:
                      type:
                        - string
                        - 'null'
                  required:
                    - id
                    - title
                    - url
                  additionalProperties: false
                  description: The collection that this discount applies to
                discount_type:
                  type: string
                  enum:
                    - fixed
                    - percentage
                  description: >-
                    The type of discount this voucher will apply to items in the
                    collection
                discount:
                  anyOf:
                    - type: object
                      properties:
                        amount:
                          type: number
                        formatted:
                          type: string
                      required:
                        - amount
                        - formatted
                      additionalProperties: false
                    - type: object
                      properties:
                        percentage:
                          type: number
                        formatted:
                          type: string
                      required:
                        - percentage
                        - formatted
                      additionalProperties: false
                  description: >-
                    The discount that will apply to items in the collection. For
                    `fixed` discounts this will be the currency amount. For
                    `percentage` discounts, it will be a number from `1-100`
                minimum_spend:
                  anyOf:
                    - type: object
                      properties:
                        amount:
                          type: number
                        formatted:
                          type: string
                      required:
                        - amount
                        - formatted
                      additionalProperties: false
                    - type: 'null'
                  description: >-
                    The minimum spend, if any, for the voucher to apply to the
                    cart
                  example:
                    amount: 10
                    formatted: $10
                expires_at:
                  description: >-
                    ISO 8601 timestamp representing when the voucher will
                    expire, or `null` if it does not expire
                  type:
                    - string
                    - 'null'
                used_at:
                  description: >-
                    `ISO 8601` timestamp representing when the voucher was used,
                    or `null` if not yet used
                  type:
                    - string
                    - 'null'
              required:
                - usage_status
                - kind
                - code
                - collection
                - discount_type
                - discount
                - minimum_spend
                - expires_at
                - used_at
              additionalProperties: false
          required:
            - id
            - claimed_at
            - reward_id
            - title
            - state
            - source
            - auto_refund_at
            - redeemable
          additionalProperties: false
          description: >-
            The new claimed reward. The voucher code can be found in
            `claimed_reward.redeemable.code`
        customer:
          $ref: '#/components/schemas/CustomerEnrolled'
          description: >-
            The customer object, updated as of the reward redemption, i.e. their
            `claimed_rewards` will include the new redemption. This customer
            will always have `state` set to `enrolled`, as only enrolled
            customers can redeem rewards
      required:
        - voucher_code
        - claimed_reward
        - customer
      additionalProperties: false
    RedeemRewardErrorInsufficientPoints:
      type: object
      properties:
        code:
          type: string
          const: insufficient_points
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Insufficient points
    RedeemRewardErrorCustomerNotEnrolled:
      type: object
      properties:
        code:
          type: string
          const: customer_not_enrolled
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Customer not enrolled
    RedeemRewardErrorCustomerBlocked:
      type: object
      properties:
        code:
          type: string
          const: customer_blocked
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Customer blocked
    RedeemRewardErrorRewardNotEnabledForCustomer:
      type: object
      properties:
        code:
          type: string
          const: reward_not_enabled_for_customer
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Reward not enabled for customer
    RedeemRewardErrorRewardOutOfStock:
      type: object
      properties:
        code:
          type: string
          const: reward_out_of_stock
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Reward out of stock
    RedeemRewardErrorRewardInvalidKind:
      type: object
      properties:
        code:
          type: string
          const: reward_kind_mismatch
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Reward invalid kind
    RedeemRewardErrorRewardLimitReached:
      type: object
      properties:
        code:
          type: string
          const: reward_limit_reached
        message:
          type: string
      required:
        - code
      additionalProperties: false
      title: Reward limit reached
    ClaimedRewardSourcePointsRedemption:
      type: object
      properties:
        kind:
          type: string
          const: points_redemption
        points_cost:
          type: number
          description: The number of points the customer used to claim this reward
      required:
        - kind
        - points_cost
      additionalProperties: false
      title: Points redemption
      description: The customer used points to claim this reward
    ClaimedRewardSourceRuleCompletion:
      type: object
      properties:
        kind:
          type: string
          const: rule_completion
        rule_id:
          type: number
      required:
        - kind
        - rule_id
      additionalProperties: false
      title: Rule completion
      description: This reward was provided directly when the customer completed a rule
    ClaimedRewardSourceTierEntry:
      type: object
      properties:
        kind:
          type: string
          const: tier_entry
        tier_id:
          type: number
      required:
        - kind
        - tier_id
      additionalProperties: false
      title: Tier entry
      description: This reward was awarded directly when the customer entered a tier
    CustomerEnrolled:
      type: object
      properties:
        state:
          type: string
          const: enrolled
        id:
          type: number
          description: The ID of the customer in LoyaltyLion
        merchant_id:
          type: string
          description: The ID of the customer in your platform or ecommerce store
        email:
          description: >-
            The email address of the customer. May be `null`, e.g. for POS
            customers who have never provided an email address
          type:
            - string
            - 'null'
        first_name:
          description: The first name of the customer, if available
          type:
            - string
            - 'null'
        last_name:
          description: The last name of the customer, if available
          type:
            - string
            - 'null'
        points_approved:
          type: number
          description: The number of approved points the customer can redeem for rewards
        points_pending:
          type: number
          description: >-
            The number of pending points the customer has. Pending points will
            be approved or declined at a later date
        points_spent:
          type: number
          description: The number of points the customer has spent to date
        enrolled_at:
          type: string
          description: >-
            `ISO 8601` timestamp representing when the customer enrolled in the
            program
        tier_membership:
          anyOf:
            - type: object
              properties:
                tier_id:
                  type: number
                  description: The ID of the tier this customer is currently in
                started_at:
                  type: string
                  description: '`ISO 8601` timestamp when this tier membership started'
                  example: '2025-01-01T12:00:00Z'
                expires_at:
                  description: >-
                    `ISO 8601` timestamp when this tier membership expires. Will
                    be `null` if the membership never expires
                  example: '2026-01-01T12:00:00Z'
                  type:
                    - string
                    - 'null'
                progress:
                  oneOf:
                    - $ref: '#/components/schemas/TierProgressPoints'
                    - $ref: '#/components/schemas/TierProgressSpend'
                  description: >-
                    Information about the customer's tier progress, which can be
                    used to inform a customer how close they are to reaching the
                    next tier, or what they they need to do to maintain their
                    current tier when it expires. Note that tier progress
                    changes over time, as we use a sliding evaluation window to
                    calculate progress, so it is only guaranteed to be correct
                    as of the time of the response
                  type: object
                  discriminator:
                    propertyName: kind
                    mapping:
                      points:
                        $ref: '#/components/schemas/TierProgressPoints'
                      spend:
                        $ref: '#/components/schemas/TierProgressSpend'
              required:
                - tier_id
                - started_at
                - expires_at
                - progress
              additionalProperties: false
            - type: 'null'
          description: >-
            Details about this customer's current tier membership, or `null` if
            tiers are not enabled
        birthday:
          anyOf:
            - type: object
              properties:
                month:
                  type: number
                  example: 9
                day:
                  type: number
                  example: 20
                year:
                  example: 1993
                  type: number
              required:
                - month
                - day
              additionalProperties: false
            - type: 'null'
          description: >-
            The customer's birthday, if one has been provided. Depending on how
            the program is configured, the `year` may or may not be included
          example:
            month: 6
            day: 25
        next_birthday:
          anyOf:
            - type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            - type: 'null'
          description: >-
            If the customer has provided their birthday, this will be an `ISO
            8601` timestamp representing the date of their next (upcoming)
            birthday
          example: '2025-06-25'
        claimed_rewards:
          description: >-
            The most recent 20 claimed rewards that belong to this customer.
            Claimed rewards can include a `redeemable`, which can be used to
            provide the reward to the customer. For example, voucher-based
            rewards will include a voucher code that could be displayed to the
            customer so they can apply it during checkout
          type: array
          items:
            type: object
            properties:
              id:
                type: number
                description: The ID of the claimed reward resource in LoyaltyLion
              claimed_at:
                type: string
                description: '`ISO 8601` timestamp indicating when this reward was claimed'
              reward_id:
                type: number
                description: >-
                  The ID of the reward that was claimed. If a reward with this
                  ID does not exist in the current [Site
                  Configuration](/headless-api/2025-06/configuration/get-configuration),
                  it means the reward has been deleted. The associated
                  redeemable, if any, will usually still be active even after
                  the reward has been deleted
              title:
                type: string
                description: >-
                  Short, localized title for this claimed reward. For example,
                  '$5 voucher', or 'Free Water Bottle'. This is usually the same
                  title as the associated reward
                example: $5 voucher
              state:
                type: string
                enum:
                  - approved
                  - declined
                  - expired
                  - pending
                  - void
                description: >-
                  The state of this claimed reward. Only `active` rewards will
                  have a usable `redeemable`
              source:
                oneOf:
                  - $ref: '#/components/schemas/ClaimedRewardSourcePointsRedemption'
                  - $ref: '#/components/schemas/ClaimedRewardSourceRuleCompletion'
                  - $ref: '#/components/schemas/ClaimedRewardSourceTierEntry'
                description: >-
                  Details about how the customer received this reward. One of
                  `points_redemption` (the customer used their points to redeem
                  the reward), `rule_completion` (the reward was awarded as the
                  result of completing a rule), or `tier_entry` (the reward was
                  awarded when the customer entered a tier)
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    points_redemption:
                      $ref: '#/components/schemas/ClaimedRewardSourcePointsRedemption'
                    rule_completion:
                      $ref: '#/components/schemas/ClaimedRewardSourceRuleCompletion'
                    tier_entry:
                      $ref: '#/components/schemas/ClaimedRewardSourceTierEntry'
              redeemable:
                description: >-
                  The redeemable linked to this claimed reward, if any. If
                  present, the redeemable can usually be used to provide the
                  reward to the customer. For example, it may include a voucher
                  code that can be shown to the customer, or details of a free
                  product that can be added to the customer's cart directly
                anyOf:
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: gift_card
                      code_last_characters:
                        type: string
                        description: >-
                          The last few characters of the gift card code. Note
                          that the full gift card code is only shown once when
                          the gift card reward is redeemed
                      initial_balance:
                        type: object
                        properties:
                          amount:
                            type: number
                          formatted:
                            type: string
                        required:
                          - amount
                          - formatted
                        additionalProperties: false
                        description: The initial balance of the gift card
                      current_balance:
                        type: object
                        properties:
                          amount:
                            type: number
                          formatted:
                            type: string
                        required:
                          - amount
                          - formatted
                        additionalProperties: false
                        description: The current balance of the gift card
                      expires_at:
                        description: >-
                          `ISO 8601` timestamp representing when the gift card
                          will expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code_last_characters
                      - initial_balance
                      - current_balance
                      - expires_at
                    additionalProperties: false
                    title: Gift card
                    description: >-
                      A gift card that can be used for future orders until its
                      balance runs out
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: cart_discount_voucher
                      code:
                        type: string
                        description: The discount voucher code
                      discount_type:
                        type: string
                        enum:
                          - fixed
                          - percentage
                        description: >-
                          The type of discount this voucher will apply to the
                          cart
                      discount:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: object
                            properties:
                              percentage:
                                type: number
                              formatted:
                                type: string
                            required:
                              - percentage
                              - formatted
                            additionalProperties: false
                        description: >-
                          The discount that will apply to the cart. For `fixed`
                          discounts this will be the currency amount. For
                          `percentage` discounts, it will be a number from
                          `1-100`
                      applies_to_order_type:
                        type: string
                        enum:
                          - all
                          - one_time
                          - subscription
                        description: >-
                          The type of order that this voucher will apply to. One
                          of: `all` (applies to all types of order), `one_time`
                          (applies to one-time orders), `subscription` (applies
                          to subscription orders)
                        example: one_time
                      recurring_cycle_limit:
                        description: >-
                          The number of orders this discount will apply to, for
                          discounts that can apply to subscription orders. If
                          it's `1`, it means the discount will apply only to the
                          first order with which it is used. If `null`, the
                          discount will be applied to any number of orders for
                          as long as it is active
                        example: 1
                        type:
                          - number
                          - 'null'
                      supports_active_subscriptions:
                        description: >-
                          Whether or not this discount will also be able to be
                          applied to active subscriptions in Recharge. If true,
                          we will create a Recharge discount in addition to a
                          Shopify discount whenever this reward is claimed.
                        type: boolean
                      minimum_spend:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The minimum spend, if any, for the voucher to apply to
                          the cart
                        example:
                          amount: 10
                          formatted: $10
                      expires_at:
                        description: >-
                          ISO 8601 timestamp representing when the voucher will
                          expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the voucher was
                          used, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code
                      - discount_type
                      - discount
                      - applies_to_order_type
                      - recurring_cycle_limit
                      - minimum_spend
                      - expires_at
                      - used_at
                    additionalProperties: false
                    title: Cart discount voucher
                    description: >-
                      A discount voucher that applies a reduction to the total
                      cost of an order
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: cart_variable_discount_voucher
                      discount:
                        type: object
                        properties:
                          amount:
                            type: number
                          formatted:
                            type: string
                        required:
                          - amount
                          - formatted
                        additionalProperties: false
                        description: The discount amount that was redeemed
                      code:
                        type: string
                        description: The discount voucher code
                      applies_to_order_type:
                        type: string
                        enum:
                          - all
                          - one_time
                          - subscription
                        description: >-
                          The type of order that this voucher will apply to. One
                          of: `all` (applies to all types of order), `one_time`
                          (applies to one-time orders), `subscription` (applies
                          to subscription orders)
                        example: one_time
                      expires_at:
                        description: >-
                          ISO 8601 timestamp representing when the voucher will
                          expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the voucher was
                          used, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - discount
                      - code
                      - applies_to_order_type
                      - expires_at
                      - used_at
                    additionalProperties: false
                    title: Cart variable discount
                    description: >-
                      A variable-amount discount. This is usually a voucher code
                      that was created dynamically based on the number of points
                      the customer redeemed
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: product_discount_voucher
                      code:
                        type: string
                        description: The discount voucher code
                      product:
                        type: object
                        properties:
                          id:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                          variant_id:
                            description: >-
                              The variant ID to apply the discount to. If
                              `null`, the discount can be applied to all this
                              product's variants
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - image_url
                          - variant_id
                        additionalProperties: false
                        description: The product that this discount applies to
                      discount:
                        type: object
                        properties:
                          percentage:
                            type: number
                          formatted:
                            type: string
                        required:
                          - percentage
                          - formatted
                        additionalProperties: false
                        description: >-
                          The discount that will apply to the product. Product
                          discounts are always percentage based, so this will be
                          a number from `1-100`
                      expires_at:
                        description: >-
                          ISO 8601 timestamp representing when the voucher will
                          expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the voucher was
                          used, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code
                      - product
                      - discount
                      - expires_at
                      - used_at
                    additionalProperties: false
                    title: Product discount voucher
                    description: >-
                      A discount voucher that applies a reduction to a specific
                      product
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: free_shipping_voucher
                      code:
                        type: string
                        description: The discount voucher code
                      max_shipping:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          Free shipping will only be applied if the shipping
                          rate is equal to or less than this amount, or `null`
                          if there is no maximum
                      expires_at:
                        description: >-
                          ISO 8601 timestamp representing when the voucher will
                          expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the voucher was
                          used, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code
                      - max_shipping
                      - expires_at
                      - used_at
                    additionalProperties: false
                    title: Free shipping voucher
                    description: A voucher that applies free shipping to an order
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: collection_discount_voucher
                      code:
                        type: string
                        description: The discount voucher code
                      collection:
                        type: object
                        properties:
                          id:
                            type: string
                          title:
                            type:
                              - string
                              - 'null'
                          url:
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - title
                          - url
                        additionalProperties: false
                        description: The collection that this discount applies to
                      discount_type:
                        type: string
                        enum:
                          - fixed
                          - percentage
                        description: >-
                          The type of discount this voucher will apply to items
                          in the collection
                      discount:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: object
                            properties:
                              percentage:
                                type: number
                              formatted:
                                type: string
                            required:
                              - percentage
                              - formatted
                            additionalProperties: false
                        description: >-
                          The discount that will apply to items in the
                          collection. For `fixed` discounts this will be the
                          currency amount. For `percentage` discounts, it will
                          be a number from `1-100`
                      minimum_spend:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The minimum spend, if any, for the voucher to apply to
                          the cart
                        example:
                          amount: 10
                          formatted: $10
                      expires_at:
                        description: >-
                          ISO 8601 timestamp representing when the voucher will
                          expire, or `null` if it does not expire
                        type:
                          - string
                          - 'null'
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the voucher was
                          used, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code
                      - collection
                      - discount_type
                      - discount
                      - minimum_spend
                      - expires_at
                      - used_at
                    additionalProperties: false
                    title: Collection discount voucher
                    description: >-
                      A discount voucher that applies a reduction to a specific
                      collection
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: active_subscription_discount_voucher
                      code:
                        type: string
                        description: The discount voucher code
                      discount_type:
                        type: string
                        enum:
                          - fixed
                          - percentage
                        description: >-
                          The type of discount this voucher will apply to next
                          order
                      discount:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                              formatted:
                                type: string
                            required:
                              - amount
                              - formatted
                            additionalProperties: false
                          - type: object
                            properties:
                              percentage:
                                type: number
                              formatted:
                                type: string
                            required:
                              - percentage
                              - formatted
                            additionalProperties: false
                        description: >-
                          The discount that will apply to the next order. For
                          `fixed` discounts this will be the currency amount.
                          For `percentage` discounts, it will be a number from
                          `1-100`
                      recurring_cycle_limit:
                        description: >-
                          The number of recurring orders this discount will
                          apply to. If `null`, the discount will be applied to
                          any number of orders for as long as it is active
                        type:
                          - number
                          - 'null'
                    required:
                      - usage_status
                      - kind
                      - code
                      - discount_type
                      - discount
                      - recurring_cycle_limit
                    additionalProperties: false
                    title: Active subscription discount voucher
                    description: >-
                      A discount voucher that applies a reduction to upcoming
                      orders for an active subscription
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: active_subscription_product
                      product:
                        type: object
                        properties:
                          id:
                            type: string
                          handle:
                            type:
                              - string
                              - 'null'
                          title:
                            type:
                              - string
                              - 'null'
                          url:
                            type:
                              - string
                              - 'null'
                          image_url:
                            type:
                              - string
                              - 'null'
                          variant:
                            type: object
                            properties:
                              id:
                                type: string
                              title:
                                type:
                                  - string
                                  - 'null'
                              inventory_count:
                                description: >-
                                  The current inventory count of this product
                                  variant, or `null` if inventory is not
                                  tracked. If the count is zero, you should
                                  ensure it is not selectable by customers when
                                  redeeming the reward
                                type:
                                  - integer
                                  - 'null'
                            required:
                              - id
                              - title
                              - inventory_count
                            additionalProperties: false
                        required:
                          - id
                          - handle
                          - title
                          - url
                          - image_url
                          - variant
                        additionalProperties: false
                        description: >-
                          The product and variant that will be included in the
                          next subscription
                      quantity:
                        type: number
                        description: >-
                          The quantity of the product that will be included in
                          the next subscription
                      subscription_details:
                        oneOf:
                          - $ref: >-
                              #/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge
                        type: object
                        discriminator:
                          propertyName: kind
                          mapping:
                            recharge:
                              $ref: >-
                                #/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge
                    required:
                      - usage_status
                      - kind
                      - product
                      - quantity
                      - subscription_details
                    additionalProperties: false
                    title: Active subscription product
                    description: >-
                      A free product that will be included in the next shipment
                      of an active subscription
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: product_cart
                      product:
                        type: object
                        properties:
                          id:
                            type: string
                          handle:
                            type:
                              - string
                              - 'null'
                          title:
                            type:
                              - string
                              - 'null'
                          url:
                            type:
                              - string
                              - 'null'
                          image_url:
                            type:
                              - string
                              - 'null'
                          variant:
                            type: object
                            properties:
                              id:
                                type: string
                              title:
                                type:
                                  - string
                                  - 'null'
                              inventory_count:
                                description: >-
                                  The current inventory count of this product
                                  variant, or `null` if inventory is not
                                  tracked. If the count is zero, you should
                                  ensure it is not selectable by customers when
                                  redeeming the reward
                                type:
                                  - integer
                                  - 'null'
                            required:
                              - id
                              - title
                              - inventory_count
                            additionalProperties: false
                        required:
                          - id
                          - handle
                          - title
                          - url
                          - image_url
                          - variant
                        additionalProperties: false
                        description: >-
                          The product and variant that should be added to the
                          cart
                      quantity:
                        type: number
                        description: >-
                          The quantity of the product that should be added to
                          the cart
                      used_at:
                        description: >-
                          `ISO 8601` timestamp representing when the product was
                          used in an order, or `null` if not yet used
                        type:
                          - string
                          - 'null'
                      cart_line_identifier:
                        type: string
                        description: >-
                          The unique cart line identifier, which connects this
                          redemption to the line item in the eventual completed
                          order. For Shopify, this identifier is used as the
                          value of the `__lion_sfp_id` attribute on the cart
                          line when the product is added to the cart
                      active_cart_redemption:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: >-
                                  The unique ID of this cart redemption. This ID
                                  needs to be attached to the cart line when the
                                  product is added to the cart. For Shopify,
                                  this is used as the value of the
                                  `__lion_sfp_id` attribute on the cart line
                              claimed_reward_id:
                                type: number
                                description: >-
                                  The ID of the claimed reward that this cart
                                  redemption is associated with
                              expires_at:
                                type: string
                                description: >-
                                  `ISO 8601` timestamp representing when this
                                  cart redemption will expire if it has not been
                                  checked out, at which point any associated
                                  points will be returned to the customer
                              product:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  handle:
                                    type:
                                      - string
                                      - 'null'
                                  title:
                                    type:
                                      - string
                                      - 'null'
                                  url:
                                    type:
                                      - string
                                      - 'null'
                                  image_url:
                                    type:
                                      - string
                                      - 'null'
                                  variant:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                      title:
                                        type:
                                          - string
                                          - 'null'
                                      inventory_count:
                                        description: >-
                                          The current inventory count of this
                                          product variant, or `null` if inventory
                                          is not tracked. If the count is zero,
                                          you should ensure it is not selectable
                                          by customers when redeeming the reward
                                        type:
                                          - integer
                                          - 'null'
                                    required:
                                      - id
                                      - title
                                      - inventory_count
                                    additionalProperties: false
                                required:
                                  - id
                                  - handle
                                  - title
                                  - url
                                  - image_url
                                  - variant
                                additionalProperties: false
                                description: >-
                                  The product and variant that this cart
                                  redemption is for
                              quantity:
                                type: number
                                description: >-
                                  The quantity of the line item in this cart
                                  redemption
                              cart_id:
                                type: string
                                description: >-
                                  The ID of the cart for which this cart
                                  redemption was initially redeemed
                              cart_line:
                                oneOf:
                                  - $ref: >-
                                      #/components/schemas/ActiveCartRedemptionCartLineShopify
                                type: object
                                discriminator:
                                  propertyName: kind
                                  mapping:
                                    shopify:
                                      $ref: >-
                                        #/components/schemas/ActiveCartRedemptionCartLineShopify
                              current_cart_state:
                                anyOf:
                                  - type: object
                                    properties:
                                      in_cart:
                                        type: boolean
                                        description: >-
                                          Indicates if the redemption is currently
                                          in the cart
                                      cart_requirements_met:
                                        type: boolean
                                        description: >-
                                          Indicates if all this redemption's
                                          requirements are currently met by the
                                          cart, such as a required minimum cart
                                          total or number of line items
                                      cart_requirements_detail:
                                        type: object
                                        properties:
                                          minimum_cart_total:
                                            oneOf:
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
                                            type: object
                                            discriminator:
                                              propertyName: state
                                              mapping:
                                                no_requirement:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                                                requirement_met:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                                                requirement_not_met:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
                                          minimum_line_item_quantity:
                                            oneOf:
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                                              - $ref: >-
                                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
                                            type: object
                                            discriminator:
                                              propertyName: state
                                              mapping:
                                                no_requirement:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                                                requirement_met:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                                                requirement_not_met:
                                                  $ref: >-
                                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
                                        required:
                                          - minimum_cart_total
                                          - minimum_line_item_quantity
                                        additionalProperties: false
                                    required:
                                      - in_cart
                                      - cart_requirements_met
                                      - cart_requirements_detail
                                    additionalProperties: false
                                  - type: 'null'
                                description: >-
                                  If this request included a serialized `cart`
                                  object whose `id` matches the `cart_id` of
                                  this redemption, this object includes
                                  information about this redemption's state in
                                  the current cart. It will be `null` if the
                                  request did not include a serialized cart or
                                  its `id` does not match
                            required:
                              - id
                              - claimed_reward_id
                              - expires_at
                              - product
                              - quantity
                              - cart_id
                              - cart_line
                              - current_cart_state
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The active cart redemption associated with this
                          product reward, if any. A product reward will have an
                          active cart redemption if it has been redeemed and has
                          not yet been checked out with an order, or expired
                    required:
                      - usage_status
                      - kind
                      - product
                      - quantity
                      - used_at
                      - cart_line_identifier
                      - active_cart_redemption
                    additionalProperties: false
                    title: Product cart
                    description: A free product that can be added to the customer's cart
                  - type: object
                    properties:
                      usage_status:
                        type: string
                        enum:
                          - not_used
                          - partially_used
                          - used
                        description: >-
                          The usage status of this redeemable. Redeemables that
                          are `used` cannot be used again, e.g. a voucher code
                          that has already been used with an order
                      kind:
                        type: string
                        const: custom
                      fulfilment_explanation:
                        description: >-
                          Optional fulfillment explanation as a short, plaintext
                          string. If present, this will explain to the customer
                          how and when the reward will be fulfilled
                        type:
                          - string
                          - 'null'
                      fulfilled_at:
                        description: >-
                          `ISO 8601` timestamp representing when this custom
                          redeemable was fulfilled, or `null` if it is not yet
                          fulfilled
                        type:
                          - string
                          - 'null'
                      code:
                        description: >-
                          The voucher code issued to the customer. Present only
                          for custom rewards that issue codes from a
                          merchant-uploaded pool; absent for other custom
                          rewards (e.g. those fulfilled manually or by webhook).
                        type: string
                    required:
                      - usage_status
                      - kind
                      - fulfilment_explanation
                      - fulfilled_at
                    additionalProperties: false
                    title: Custom
                    description: >-
                      A custom redemption that is fulfilled by the merchant
                      manually or using a webhook, or with a voucher code issued
                      from a merchant-uploaded pool
              auto_refund_at:
                description: >-
                  `ISO 8601` timestamp indicating when this reward and its
                  associated redeemable will be automatically voided and
                  refunded if it has not yet been used, or `null` if not
                  applicable
                type:
                  - string
                  - 'null'
            required:
              - id
              - claimed_at
              - reward_id
              - title
              - state
              - source
              - auto_refund_at
            additionalProperties: false
        available_rewards:
          description: >-
            A list of rewards that are enabled for this customer, based on their
            tier. This is the same as the list of rewards returned from [Get
            Configuration](/headless-api/2025-06/configuration/get-configuration),
            with a few differences:


            - instead of `variants`, each reward will have a `variant` property,
            which represents the applicable variant for this customer based on
            their tier. If there is no applicable enabled variant, the reward
            will not be included in this list, e.g. if it's disabled for the
            customer's current tier

            - each reward will have a `context` property, which includes
            information about the reward specific to this customer, such as the
            number of times they have claimed it, and if any limit is in effect.
            The `can_redeem` property is a quick way to determine if the
            customer is able to redeem the reward


            Note that the inclusion of a reward here does not mean it the
            customer can redeem it: they must have enough points, and it must
            not have reached its claim limit. You can determine this yourself,
            or use the `context.can_redeem` property
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/CustomerAvailableRewardGiftCard'
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardCartDiscountVoucher
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardCartVariableDiscountVoucher
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardFreeShippingVoucher
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardProductDiscountVoucher
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardCollectionDiscountVoucher
              - $ref: '#/components/schemas/CustomerAvailableRewardProductCart'
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardActiveSubscriptionDiscountVoucher
              - $ref: >-
                  #/components/schemas/CustomerAvailableRewardActiveSubscriptionProduct
              - $ref: '#/components/schemas/CustomerAvailableRewardCustom'
            type: object
            discriminator:
              propertyName: kind
              mapping:
                gift_card:
                  $ref: '#/components/schemas/CustomerAvailableRewardGiftCard'
                cart_discount_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardCartDiscountVoucher
                cart_variable_discount_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardCartVariableDiscountVoucher
                free_shipping_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardFreeShippingVoucher
                product_discount_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardProductDiscountVoucher
                collection_discount_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardCollectionDiscountVoucher
                product_cart:
                  $ref: '#/components/schemas/CustomerAvailableRewardProductCart'
                active_subscription_discount_voucher:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardActiveSubscriptionDiscountVoucher
                active_subscription_product:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRewardActiveSubscriptionProduct
                custom:
                  $ref: '#/components/schemas/CustomerAvailableRewardCustom'
        available_rules:
          description: >-
            A list of rules that are enabled for this customer, based on their
            tier. This is the same as the list of rules returned from [Get
            Configuration](/headless-api/2025-06/configuration/get-configuration),
            with a few differences:


            - instead of `variants`, each rule will have a `variant` property,
            which represents the applicable variant for this customer based on
            their tier. If there is no applicable enabled variant, the rule will
            not be included in this list, e.g. if it's disabled for the
            customer's current tier

            - each rule will have a `context` property, which includes
            information about this customer's interaction with the rule, such as
            the number of times they have completed it, and if any limit is in
            effect
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/CustomerAvailableRuleBirthday'
              - $ref: '#/components/schemas/CustomerAvailableRuleLoyaltyPassInstall'
              - $ref: '#/components/schemas/CustomerAvailableRuleCollectionPurchase'
              - $ref: '#/components/schemas/CustomerAvailableRuleNewsletterSignup'
              - $ref: '#/components/schemas/CustomerAvailableRulePageview'
              - $ref: '#/components/schemas/CustomerAvailableRuleProductPurchase'
              - $ref: '#/components/schemas/CustomerAvailableRulePurchase'
              - $ref: '#/components/schemas/CustomerAvailableRuleJoinProgram'
              - $ref: '#/components/schemas/CustomerAvailableRuleReview'
              - $ref: '#/components/schemas/CustomerAvailableRuleCustom'
              - $ref: '#/components/schemas/CustomerAvailableRuleFacebookLike'
              - $ref: '#/components/schemas/CustomerAvailableRuleTwitterFollow'
              - $ref: '#/components/schemas/CustomerAvailableRuleInstagramFollow'
              - $ref: '#/components/schemas/CustomerAvailableRuleInstagramMention'
              - $ref: '#/components/schemas/CustomerAvailableRuleInstagramPostHashtag'
              - $ref: '#/components/schemas/CustomerAvailableRuleTiktokFollow'
              - $ref: '#/components/schemas/CustomerAvailableRuleTiktokPostHashtag'
              - $ref: '#/components/schemas/CustomerAvailableRuleReferral'
              - $ref: '#/components/schemas/CustomerAvailableRuleClickthrough'
              - $ref: '#/components/schemas/CustomerAvailableRuleRetailPurchase'
            type: object
            discriminator:
              propertyName: kind
              mapping:
                birthday:
                  $ref: '#/components/schemas/CustomerAvailableRuleBirthday'
                loyalty_pass_install:
                  $ref: '#/components/schemas/CustomerAvailableRuleLoyaltyPassInstall'
                collection_purchase:
                  $ref: '#/components/schemas/CustomerAvailableRuleCollectionPurchase'
                newsletter_signup:
                  $ref: '#/components/schemas/CustomerAvailableRuleNewsletterSignup'
                pageview:
                  $ref: '#/components/schemas/CustomerAvailableRulePageview'
                product_purchase:
                  $ref: '#/components/schemas/CustomerAvailableRuleProductPurchase'
                purchase:
                  $ref: '#/components/schemas/CustomerAvailableRulePurchase'
                join_program:
                  $ref: '#/components/schemas/CustomerAvailableRuleJoinProgram'
                review:
                  $ref: '#/components/schemas/CustomerAvailableRuleReview'
                custom:
                  $ref: '#/components/schemas/CustomerAvailableRuleCustom'
                facebook_like:
                  $ref: '#/components/schemas/CustomerAvailableRuleFacebookLike'
                twitter_follow:
                  $ref: '#/components/schemas/CustomerAvailableRuleTwitterFollow'
                instagram_follow:
                  $ref: '#/components/schemas/CustomerAvailableRuleInstagramFollow'
                instagram_mention:
                  $ref: '#/components/schemas/CustomerAvailableRuleInstagramMention'
                instagram_post_hashtag:
                  $ref: >-
                    #/components/schemas/CustomerAvailableRuleInstagramPostHashtag
                tiktok_follow:
                  $ref: '#/components/schemas/CustomerAvailableRuleTiktokFollow'
                tiktok_post_hashtag:
                  $ref: '#/components/schemas/CustomerAvailableRuleTiktokPostHashtag'
                referral:
                  $ref: '#/components/schemas/CustomerAvailableRuleReferral'
                clickthrough:
                  $ref: '#/components/schemas/CustomerAvailableRuleClickthrough'
                retail_purchase:
                  $ref: '#/components/schemas/CustomerAvailableRuleRetailPurchase'
        history:
          description: >-
            A list of the most recent actions that have occurred for this
            customer, such as earning points, redeeming rewards, and joining
            tiers. This list is sorted by date with the most recent actions at
            the beginning.


            History actions are not the same as _transactions_. A single action
            may cover multiple transactions. For example, if points are added
            and then later voided, it will be represented by a single action
            whose state will initially be `approved`, and then later change to
            `void`. This keeps the customer's history concise whilst still
            showing the key information.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/CustomerHistoryActionEarnedPointsFromRule'
              - $ref: >-
                  #/components/schemas/CustomerHistoryActionRedeemedPointsForReward
              - $ref: '#/components/schemas/CustomerHistoryActionReceivedReward'
              - $ref: '#/components/schemas/CustomerHistoryActionPointsAdded'
              - $ref: '#/components/schemas/CustomerHistoryActionPointsRemoved'
              - $ref: '#/components/schemas/CustomerHistoryActionPointsExpired'
              - $ref: '#/components/schemas/CustomerHistoryActionEnteredTier'
            type: object
            discriminator:
              propertyName: kind
              mapping:
                earned_points_from_rule:
                  $ref: >-
                    #/components/schemas/CustomerHistoryActionEarnedPointsFromRule
                redeemed_points_for_reward:
                  $ref: >-
                    #/components/schemas/CustomerHistoryActionRedeemedPointsForReward
                received_reward:
                  $ref: '#/components/schemas/CustomerHistoryActionReceivedReward'
                points_added:
                  $ref: '#/components/schemas/CustomerHistoryActionPointsAdded'
                points_removed:
                  $ref: '#/components/schemas/CustomerHistoryActionPointsRemoved'
                points_expired:
                  $ref: '#/components/schemas/CustomerHistoryActionPointsExpired'
                entered_tier:
                  $ref: '#/components/schemas/CustomerHistoryActionEnteredTier'
        active_cart_redemptions:
          description: >-
            A list of active cart redemptions. When a `product_cart` reward is
            redeemed by the customer, a new active cart redemption is created.
            This will persist until it expires or the completes the order
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: >-
                  The unique ID of this cart redemption. This ID needs to be
                  attached to the cart line when the product is added to the
                  cart. For Shopify, this is used as the value of the
                  `__lion_sfp_id` attribute on the cart line
              claimed_reward_id:
                type: number
                description: >-
                  The ID of the claimed reward that this cart redemption is
                  associated with
              expires_at:
                type: string
                description: >-
                  `ISO 8601` timestamp representing when this cart redemption
                  will expire if it has not been checked out, at which point any
                  associated points will be returned to the customer
              product:
                type: object
                properties:
                  id:
                    type: string
                  handle:
                    type:
                      - string
                      - 'null'
                  title:
                    type:
                      - string
                      - 'null'
                  url:
                    type:
                      - string
                      - 'null'
                  image_url:
                    type:
                      - string
                      - 'null'
                  variant:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      inventory_count:
                        description: >-
                          The current inventory count of this product variant,
                          or `null` if inventory is not tracked. If the count is
                          zero, you should ensure it is not selectable by
                          customers when redeeming the reward
                        type:
                          - integer
                          - 'null'
                    required:
                      - id
                      - title
                      - inventory_count
                    additionalProperties: false
                required:
                  - id
                  - handle
                  - title
                  - url
                  - image_url
                  - variant
                additionalProperties: false
                description: The product and variant that this cart redemption is for
              quantity:
                type: number
                description: The quantity of the line item in this cart redemption
              cart_id:
                type: string
                description: >-
                  The ID of the cart for which this cart redemption was
                  initially redeemed
              cart_line:
                oneOf:
                  - $ref: '#/components/schemas/ActiveCartRedemptionCartLineShopify'
                type: object
                discriminator:
                  propertyName: kind
                  mapping:
                    shopify:
                      $ref: '#/components/schemas/ActiveCartRedemptionCartLineShopify'
              current_cart_state:
                anyOf:
                  - type: object
                    properties:
                      in_cart:
                        type: boolean
                        description: Indicates if the redemption is currently in the cart
                      cart_requirements_met:
                        type: boolean
                        description: >-
                          Indicates if all this redemption's requirements are
                          currently met by the cart, such as a required minimum
                          cart total or number of line items
                      cart_requirements_detail:
                        type: object
                        properties:
                          minimum_cart_total:
                            oneOf:
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
                            type: object
                            discriminator:
                              propertyName: state
                              mapping:
                                no_requirement:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                                requirement_met:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                                requirement_not_met:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
                          minimum_line_item_quantity:
                            oneOf:
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                              - $ref: >-
                                  #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
                            type: object
                            discriminator:
                              propertyName: state
                              mapping:
                                no_requirement:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                                requirement_met:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                                requirement_not_met:
                                  $ref: >-
                                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
                        required:
                          - minimum_cart_total
                          - minimum_line_item_quantity
                        additionalProperties: false
                    required:
                      - in_cart
                      - cart_requirements_met
                      - cart_requirements_detail
                    additionalProperties: false
                  - type: 'null'
                description: >-
                  If this request included a serialized `cart` object whose `id`
                  matches the `cart_id` of this redemption, this object includes
                  information about this redemption's state in the current cart.
                  It will be `null` if the request did not include a serialized
                  cart or its `id` does not match
            required:
              - id
              - claimed_reward_id
              - expires_at
              - product
              - quantity
              - cart_id
              - cart_line
              - current_cart_state
            additionalProperties: false
        email_marketing_consent:
          type: object
          properties:
            state:
              type: string
              enum:
                - subscribed
                - not_subscribed
                - unknown
              description: >-
                The state of the customer's email marketing consent. This is not
                guaranteed to be up to date, as LoyaltyLion relies on receiving
                changes for this value from your email marketing provider or
                ecommerce platform. Therefore, it should not be used as the
                source of truth for sending emails to this customer.


                If we have no information about the customer's email marketing
                consent, it will be `unknown`.
          required:
            - state
          additionalProperties: false
        sms_marketing_consent:
          type: object
          properties:
            state:
              type: string
              enum:
                - subscribed
                - not_subscribed
                - unknown
              description: >-
                The state of the customer's SMS marketing consent. This is not
                guaranteed to be up to date, as LoyaltyLion relies on receiving
                changes for this value from your SMS marketing provider or
                ecommerce platform. Therefore, it should not be used as the
                source of truth for sending SMS to this customer.


                If we have no information about the customer's SMS marketing
                consent, it will be `unknown`.
          required:
            - state
          additionalProperties: false
        receipt_upload_url:
          description: >-
            A URL that the customer can visit to upload a receipt for the retail
            purchase rule. Will be `null` if the retail purchase rule is not
            enabled for this program
          type:
            - string
            - 'null'
        referral_urls:
          anyOf:
            - type: object
              properties:
                direct:
                  type: string
                  description: >-
                    A generic referral link that is not associated with any
                    particular platform
                facebook:
                  type: string
                  description: A referral link intended for sharing on Facebook
                twitter:
                  type: string
                  description: A referral link intended for sharing on Twitter
                email:
                  type: string
                  description: A referral link intended for sharing via email
                whatsapp:
                  type: string
                  description: A referral link intended for sharing via WhatsApp
                instagram:
                  type: string
                  description: A referral link intended for sharing on Instagram
                device_share:
                  type: string
                  description: >-
                    A referral link intended for sharing via a mobile device
                    share prompt
              required:
                - direct
                - facebook
                - twitter
                - email
                - whatsapp
                - instagram
                - device_share
              additionalProperties: false
            - type: 'null'
          description: >-
            Referral URLs for different platforms, unique to this customer, or
            `null` if referrals are not enabled. Each URL has the same referral
            functionality, but will result in the referral being tracked for its
            platform. If unsure, use the `direct` URL for a generic link
      required:
        - state
        - id
        - merchant_id
        - email
        - first_name
        - last_name
        - points_approved
        - points_pending
        - points_spent
        - enrolled_at
        - tier_membership
        - birthday
        - next_birthday
        - claimed_rewards
        - available_rewards
        - available_rules
        - history
        - active_cart_redemptions
        - email_marketing_consent
        - sms_marketing_consent
        - receipt_upload_url
        - referral_urls
      additionalProperties: false
    TierProgressPoints:
      type: object
      properties:
        kind:
          type: string
          const: points
        valid_until:
          description: >-
            `ISO 8601` timestamp representing the date at which the calculated
            progress is no longer accurate. Tier evaluation uses a sliding
            evaluation window, so as time passes, contributing points or spend
            will no longer be counted if they are outside of the evaluation
            window. This will be `null` for lifetime tiers
          type:
            - string
            - 'null'
        points_needed_for_renewal:
          description: >-
            The number of additional points required to renew the current tier
            when the current membership expires. This will be `null` if the
            membership does not expire (e.g. a lifetime tier), or if the current
            membership is already for the bottom (default) tier
          type:
            - number
            - 'null'
        upgrade_tier_id:
          description: >-
            The ID of the next tier that this customer could upgrade to from
            their current tier. Will be `null` if the customer's current tier is
            already the highest tier in the program, a conditional tier, or a
            hidden tier
          type:
            - number
            - 'null'
        points_needed_for_upgrade:
          description: >-
            The number of additional points required to move into the next tier.
            Will be `null` if there is no eligible next tier (see
            `upgrade_tier_id`)
          type:
            - number
            - 'null'
        tier_points:
          type: object
          properties:
            now:
              type: number
              description: >-
                The number of points contributing to tier progress as of right
                now. This is equivalent to the number of eligible points from
                now, back to the start of the evaluation window.
            at_expiration:
              description: >-
                The predicted number of points contributing to tier progress as
                of the current tier's expiration date. This is similar to the
                `now` value, but instead of the window ending at `now`, it ends
                at the current tier expiration date. This can be used to
                determine if a customer would be able to renew their current
                tier when it expires This will be `null` if the membership never
                expires (e.g. lifetime tiers)
              type:
                - number
                - 'null'
          required:
            - now
            - at_expiration
          additionalProperties: false
        forecasted_tier_id:
          description: >-
            The ID of the tier the customer is forecasted to be in at their
            membership expiration, based on their predicted progress at that
            time. This can be used to warn customers if they are at risk of
            being downgraded. Will be `null` if the membership never expires
            (e.g. lifetime tiers, default tier memberships, or conditional tier
            memberships)
          type:
            - number
            - 'null'
      required:
        - kind
        - valid_until
        - points_needed_for_renewal
        - upgrade_tier_id
        - points_needed_for_upgrade
        - tier_points
        - forecasted_tier_id
      additionalProperties: false
      title: Points
    TierProgressSpend:
      type: object
      properties:
        kind:
          type: string
          const: spend
        valid_until:
          description: >-
            `ISO 8601` timestamp representing the date at which the calculated
            progress is no longer accurate. Tier evaluation uses a sliding
            evaluation window, so as time passes, contributing points or spend
            will no longer be counted if they are outside of the evaluation
            window. This will be `null` for lifetime tiers
          type:
            - string
            - 'null'
        spend_needed_for_renewal:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: 'null'
          description: >-
            The amount of additional spend required to renew the current tier
            when the current membership expires. Will be `null` if the
            membership does not expire (e.g. a lifetime tier), or if the current
            membership is already for the bottom (default) tier
        upgrade_tier_id:
          description: >-
            The ID of the next tier that this customer could upgrade to from
            their current tier. Will be `null` if the customer's current tier is
            already the highest tier in the program, a conditional tier, or a
            hidden tier
          type:
            - number
            - 'null'
        spend_needed_for_upgrade:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
            - type: 'null'
          description: >-
            The amount of additional spend required to move into the next tier.
            Will be `null` if there is no eligible next tier (see
            `upgrade_tier_id`)
        tier_spend:
          type: object
          properties:
            now:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: >-
                The amount of spend contributing to tier progress as of right
                now. This is equivalent to the amount of eligible spend from
                now, back to the start of the evaluation window.
            at_expiration:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                The predicted amount of spend contributing to tier progress as
                of the current tier's expiration date. This is similar to the
                `now` value, but instead of the window ending at `now`, it ends
                at the current tier expiration date. This can be used to
                determine if a customer would be able to renew their current
                tier when it expires This will be `null` if the membership never
                expires (e.g. lifetime tiers)
          required:
            - now
            - at_expiration
          additionalProperties: false
        forecasted_tier_id:
          description: >-
            The ID of the tier the customer is forecasted to be in at their
            membership expiration, based on their predicted progress at that
            time. This can be used to warn customers if they are at risk of
            being downgraded. Will be `null` if the membership never expires
            (e.g. lifetime tiers, default tier memberships, or conditional tier
            memberships)
          type:
            - number
            - 'null'
      required:
        - kind
        - valid_until
        - spend_needed_for_renewal
        - upgrade_tier_id
        - spend_needed_for_upgrade
        - tier_spend
        - forecasted_tier_id
      additionalProperties: false
      title: Spend
    ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge:
      type: object
      properties:
        kind:
          type: string
          const: recharge
        address_id:
          type: number
          description: >-
            The ID of the address in ReCharge that this free product will be
            sent to
        onetime_id:
          type: number
          description: >-
            The ID of the "onetime" line item created for this free product in
            ReCharge
        next_subscription_scheduled_at:
          type: string
          description: >-
            `ISO 8601` timestamp indicating when the next subscription
            containing this free product is scheduled
      required:
        - kind
        - address_id
        - onetime_id
        - next_subscription_scheduled_at
      additionalProperties: false
    ActiveCartRedemptionCartLineShopify:
      type: object
      properties:
        kind:
          type: string
          const: shopify
        merchandise_id:
          type: string
          description: The merchandise (variant) ID to add to the cart
          example: gid://shopify/ProductVariant/1001
        product_id:
          type: string
          description: The product ID to add to the cart
          example: gid://shopify/Product/100
        quantity:
          type: number
          description: The quantity of the cart line to add
          example: 1
        attributes:
          description: >-
            An array of key-value attributes that should be included with the
            cart line
          example:
            - key: __lion_sfp_id
              value: 19fdf4cb
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
            required:
              - key
              - value
            additionalProperties: false
      required:
        - kind
        - merchandise_id
        - product_id
        - quantity
        - attributes
      additionalProperties: false
      title: Shopify cart line
      description: >-
        Details of the cart line that should be added to the Shopify cart. When
        using the Storefront API, these should be passed into the [cartLinesAdd
        mutation](https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesAdd)
    CartRequirementsDetailMinimumCartTotalNoRequirement:
      type: object
      properties:
        state:
          type: string
          const: no_requirement
      required:
        - state
      additionalProperties: false
      title: No requirement
    CartRequirementsDetailMinimumCartTotalRequirementMet:
      type: object
      properties:
        state:
          type: string
          const: requirement_met
      required:
        - state
      additionalProperties: false
      title: Requirement met
    CartRequirementsDetailMinimumCartTotalRequirementNotMet:
      type: object
      properties:
        state:
          type: string
          const: requirement_not_met
        additional_amount_required:
          type: object
          properties:
            amount:
              type: number
            formatted:
              type: string
          required:
            - amount
            - formatted
          additionalProperties: false
      required:
        - state
        - additional_amount_required
      additionalProperties: false
      title: Requirement not met
    CartRequirementsDetailMinimumLineItemQuantityNoRequirement:
      type: object
      properties:
        state:
          type: string
          const: no_requirement
      required:
        - state
      additionalProperties: false
      title: No requirement
    CartRequirementsDetailMinimumLineItemQuantityRequirementMet:
      type: object
      properties:
        state:
          type: string
          const: requirement_met
      required:
        - state
      additionalProperties: false
      title: Requirement met
    CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet:
      type: object
      properties:
        state:
          type: string
          const: requirement_not_met
        additional_quantity_required:
          type: number
          description: >-
            The number of additional line items required before this requirement
            is met
      required:
        - state
        - additional_quantity_required
      additionalProperties: false
      title: Requirement not met
    CustomerAvailableRewardGiftCard:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: gift_card
        properties:
          type: object
          properties:
            initial_balance:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: The initial balance of the gift card
          required:
            - initial_balance
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Gift card
      description: >-
        A gift card that can be used for future orders until its balance runs
        out
    CustomerAvailableRewardCartDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: cart_discount_voucher
        properties:
          type: object
          properties:
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: The type of discount this voucher will apply to the cart
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to the cart. For `fixed` discounts
                this will be the currency amount. For `percentage` discounts, it
                will be a number from `1-100`
            applies_to_order_type:
              type: string
              enum:
                - all
                - one_time
                - subscription
              description: >-
                The type of order that this voucher will apply to. One of: `all`
                (applies to all types of order), `one_time` (applies to one-time
                orders), `subscription` (applies to subscription orders)
              example: one_time
            recurring_cycle_limit:
              description: >-
                The number of orders this discount will apply to, for discounts
                that can apply to subscription orders. If it's `1`, it means the
                discount will apply only to the first order with which it is
                used. If `null`, the discount will be applied to any number of
                orders for as long as it is active
              example: 1
              type:
                - number
                - 'null'
            supports_active_subscriptions:
              description: >-
                Whether or not this discount will also be able to be applied to
                active subscriptions in Recharge. If true, we will create a
                Recharge discount in addition to a Shopify discount whenever
                this reward is claimed.
              type: boolean
            minimum_spend:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: The minimum spend, if any, for the voucher to apply to the cart
              example:
                amount: 10
                formatted: $10
          required:
            - discount_type
            - discount
            - applies_to_order_type
            - recurring_cycle_limit
            - minimum_spend
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Cart discount voucher
      description: >-
        A discount voucher that applies a reduction to the total cost of an
        order
    CustomerAvailableRewardCartVariableDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: cart_variable_discount_voucher
        properties:
          type: object
          properties:
            minimum_discount:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: >-
                The minimum discount that can be selected, e.g. 1 for a minimum
                of $1
            maximum_discount:
              type: object
              properties:
                amount:
                  type: number
                formatted:
                  type: string
              required:
                - amount
                - formatted
              additionalProperties: false
              description: >-
                The maximum discount that can be selected, e.g. 5 for a maximum
                of $5
            minimum_spend_before_discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                The required minimum spend in cart before the reward can be
                redeemed
              example:
                amount: 10
                formatted: $10
            minimum_spend_after_discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                Only allow redemption of a discount value that would leave the
                cart total above this amount
              example:
                amount: 10
                formatted: $10
            applies_to_order_type:
              type: string
              enum:
                - all
                - one_time
                - subscription
              description: >-
                The type of order that this voucher will apply to. One of: `all`
                (applies to all types of order), `one_time` (applies to one-time
                orders), `subscription` (applies to subscription orders)
              example: one_time
          required:
            - minimum_discount
            - maximum_discount
            - minimum_spend_before_discount
            - minimum_spend_after_discount
            - applies_to_order_type
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Cart variable discount
      description: >-
        A variable-amount discount, e.g. 100 points per $1 discount. This is
        typically used during checkout to allow shoppers to use points to apply
        a discount to their cart
    CustomerAvailableRewardFreeShippingVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: free_shipping_voucher
        properties:
          type: object
          properties:
            max_shipping:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: >-
                Free shipping will only be applied if the shipping rate is equal
                to or less than this amount, or `null` if there is no maximum
          required:
            - max_shipping
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Free shipping voucher
      description: A voucher that applies free shipping to an order
    CustomerAvailableRewardProductDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: product_discount_voucher
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                image_url:
                  type:
                    - string
                    - 'null'
                variant_id:
                  description: >-
                    The variant ID to apply the discount to. If `null`, the
                    discount can be applied to all this product's variants
                  type:
                    - string
                    - 'null'
              required:
                - id
                - image_url
                - variant_id
              additionalProperties: false
              description: The product that this discount applies to
            discount:
              type: object
              properties:
                percentage:
                  type: number
                formatted:
                  type: string
              required:
                - percentage
                - formatted
              additionalProperties: false
              description: >-
                The discount that will apply to the product. Product discounts
                are always percentage based, so this will be a number from
                `1-100`
          required:
            - product
            - discount
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Product discount voucher
      description: A discount voucher that applies a reduction to a specific product
    CustomerAvailableRewardCollectionDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: collection_discount_voucher
        properties:
          type: object
          properties:
            collection:
              type: object
              properties:
                id:
                  type: string
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - title
                - url
              additionalProperties: false
              description: The collection that this discount applies to
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: >-
                The type of discount this voucher will apply to items in the
                collection
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to items in the collection. For
                `fixed` discounts this will be the currency amount. For
                `percentage` discounts, it will be a number from `1-100`
            minimum_spend:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: 'null'
              description: The minimum spend, if any, for the voucher to apply to the cart
              example:
                amount: 10
                formatted: $10
          required:
            - collection
            - discount_type
            - discount
            - minimum_spend
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Collection discount voucher
      description: >-
        A discount voucher that applies a reduction to one or more items in a
        collection
    CustomerAvailableRewardProductCart:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: product_cart
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                handle:
                  type:
                    - string
                    - 'null'
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
                image_url:
                  type:
                    - string
                    - 'null'
                variants:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      inventory_count:
                        description: >-
                          The current inventory count of this product variant,
                          or `null` if inventory is not tracked. If the count is
                          zero, you should ensure it is not selectable by
                          customers when redeeming the reward
                        type:
                          - integer
                          - 'null'
                      sort_key:
                        type: number
                    required:
                      - id
                      - title
                      - inventory_count
                      - sort_key
                    additionalProperties: false
              required:
                - id
                - handle
                - title
                - url
                - image_url
                - variants
              additionalProperties: false
              description: >-
                The product that can be added to the cart. If the product has
                more than one variant, the shopper should be able to choose
                which one to redeem
            max_redemptions_per_cart:
              description: >-
                The maximum number of times this product can be redeemed per
                cart, or `null` if there is no limit
              type:
                - integer
                - 'null'
            cart_requirements:
              type: object
              properties:
                minimum_cart_total:
                  anyOf:
                    - type: object
                      properties:
                        amount:
                          type: number
                        formatted:
                          type: string
                      required:
                        - amount
                        - formatted
                      additionalProperties: false
                    - type: 'null'
                  description: >-
                    The cart total must be equal to or greater than this amount,
                    or `null` if there is no minimum total
                minimum_line_item_count:
                  description: >-
                    The cart must contain at least this number of line items, or
                    `null` if there is no required line item count
                  type:
                    - number
                    - 'null'
              required:
                - minimum_cart_total
                - minimum_line_item_count
              additionalProperties: false
              description: >-
                Cart requirements that must be met before the reward can be
                redeemed
          required:
            - product
            - max_redemptions_per_cart
            - cart_requirements
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Product cart
      description: A free product that is added to the cart
    CustomerAvailableRewardActiveSubscriptionDiscountVoucher:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: active_subscription_discount_voucher
        properties:
          type: object
          properties:
            discount_type:
              type: string
              enum:
                - fixed
                - percentage
              description: The type of discount this voucher will apply to next order
            discount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    formatted:
                      type: string
                  required:
                    - amount
                    - formatted
                  additionalProperties: false
                - type: object
                  properties:
                    percentage:
                      type: number
                    formatted:
                      type: string
                  required:
                    - percentage
                    - formatted
                  additionalProperties: false
              description: >-
                The discount that will apply to the next order. For `fixed`
                discounts this will be the currency amount. For `percentage`
                discounts, it will be a number from `1-100`
            recurring_cycle_limit:
              description: >-
                The number of recurring orders this discount will apply to. If
                `null`, the discount will be applied to any number of orders for
                as long as it is active
              type:
                - number
                - 'null'
          required:
            - discount_type
            - discount
            - recurring_cycle_limit
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Active subscription discount voucher
      description: >-
        A discount that is applied to one or more upcoming recurring
        subscription orders
    CustomerAvailableRewardActiveSubscriptionProduct:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: active_subscription_product
        properties:
          type: object
          properties:
            product:
              type: object
              properties:
                id:
                  type: string
                handle:
                  type:
                    - string
                    - 'null'
                title:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
                image_url:
                  type:
                    - string
                    - 'null'
                variants:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      inventory_count:
                        description: >-
                          The current inventory count of this product variant,
                          or `null` if inventory is not tracked. If the count is
                          zero, you should ensure it is not selectable by
                          customers when redeeming the reward
                        type:
                          - integer
                          - 'null'
                      sort_key:
                        type: number
                    required:
                      - id
                      - title
                      - inventory_count
                      - sort_key
                    additionalProperties: false
              required:
                - id
                - handle
                - title
                - url
                - image_url
                - variants
              additionalProperties: false
              description: >-
                The product that can be added to an active subscription. If the
                product has more than one variant, the shopper should be able to
                choose which one to redeem
          required:
            - product
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Active subscription product
      description: A free product that is added to the next recurring subscription order
    CustomerAvailableRewardCustom:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this reward can be claimed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the reward can only ever be
                    claimed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this reward, which is applied per customer. Rewards with
            a limit set may only be claimed a set number of times in a given
            interval. The limit may be `null` if the reward has no limit and can
            therefore be claimed any number of times by the same customer
        kind:
          type: string
          const: custom
        properties:
          oneOf:
            - type: object
              properties:
                fulfillment_type:
                  type: string
                  const: store_fulfillment
                  description: >-
                    Fulfilled by the merchant — manually or via webhook (see
                    `fulfillment_method`).
                fulfillment_method:
                  type: string
                  enum:
                    - manual
                    - webhook
                  description: How the merchant fulfils this custom reward.
                fulfillment_webhook_url:
                  description: >-
                    The URL to which we'll send a webhook for reward
                    fulfillment, if one is configured
                  type:
                    - string
                    - 'null'
              required:
                - fulfillment_type
                - fulfillment_method
                - fulfillment_webhook_url
              additionalProperties: false
            - type: object
              properties:
                fulfillment_type:
                  type: string
                  const: voucher
                  description: >-
                    Fulfilled by issuing a code from a merchant-uploaded pool to
                    the customer at claim time.
              required:
                - fulfillment_type
              additionalProperties: false
          type: object
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this reward variant applies. This will
                always be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this reward. For example, '$5
                voucher', 'Free Water Bottle', or '$5 off next 3 subscription
                orders'
              example: $5 voucher
            enabled:
              type: boolean
              description: >-
                Indicates if this reward variant is enabled. For example, some
                rewards are only available for certain tiers
            cost:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: fixed
                    points:
                      type: number
                  required:
                    - kind
                    - points
                  additionalProperties: false
                  title: Fixed cost
                - type: object
                  properties:
                    kind:
                      type: string
                      const: variable
                    unit:
                      type: string
                      const: discount_amount
                    points_per_unit:
                      type: number
                  required:
                    - kind
                    - unit
                    - points_per_unit
                  additionalProperties: false
                  title: Variable cost
              description: >-
                The cost of this reward in points. Will be one of `fixed` (costs
                a fixed number of points) or `variable` (cost is multiplied by
                unit, e.g. 100 points per $1 discount)
            cost_text:
              type: string
              description: >-
                Short, localized text indicating the cost of this reward. For
                example, '100 points' or '10 points per $1'
              example: 100 points
          required:
            - tier_id
            - title
            - enabled
            - cost
            - cost_text
          additionalProperties: false
          description: >-
            The reward variant that is applicable to this customer and their
            tier
        context:
          type: object
          properties:
            can_redeem:
              oneOf:
                - $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemInsufficientPoints
                - $ref: '#/components/schemas/RewardContextCanRedeemClaimLimitReached'
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                - $ref: >-
                    #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                - $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                - $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
              description: >-
                An object that indicates if this reward can be redeemed by this
                customer. The `state` property indicates if it can be redeemed.
                If `state == "redeemable"`, the reward can be redeemed by the
                customer
              type: object
              discriminator:
                propertyName: state
                mapping:
                  redeemable:
                    $ref: '#/components/schemas/RewardContextCanRedeemRedeemable'
                  insufficient_points:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemInsufficientPoints
                  claim_limit_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemClaimLimitReached
                  cart_requirements_not_met:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemCartRequirementsNotMet
                  max_redemptions_for_cart_reached:
                    $ref: >-
                      #/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached
                  out_of_stock:
                    $ref: '#/components/schemas/RewardContextCanRedeemOutOfStock'
                  unknown:
                    $ref: '#/components/schemas/RewardContextCanRedeemUnknown'
            last_claimed_at:
              description: >-
                `ISO 8601` timestamp representing when this reward was last
                claimed by the customer, or `null` if the reward has never been
                claimed by the customer
              type:
                - string
                - 'null'
            claim_count:
              type: number
              description: The number of times this reward has been claimed by the customer
            claim_limit:
              oneOf:
                - $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                - $ref: '#/components/schemas/RewardContextClaimLimitLimitNotReached'
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this reward's claim limit
                specific to this customer. When rewards are limited, they can
                only be claimed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RewardContextClaimLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RewardContextClaimLimitLimitReachedUntilReset
          required:
            - can_redeem
            - last_claimed_at
            - claim_count
            - claim_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this reward, such
            as the number of times they have claimed it, or any limit that is in
            effect, and if they are currently able to redeem it
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Custom
      description: >-
        A custom reward that is fulfilled by the merchant manually or using a
        webhook, or by issuing a code from a merchant-uploaded pool
    CustomerAvailableRuleBirthday:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: birthday
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Birthday
    CustomerAvailableRuleLoyaltyPassInstall:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: loyalty_pass_install
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Loyalty pass install
    CustomerAvailableRuleCollectionPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: collection_purchase
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Collection purchase
    CustomerAvailableRuleNewsletterSignup:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: newsletter_signup
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Newsletter signup
    CustomerAvailableRulePageview:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: pageview
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Pageview
    CustomerAvailableRuleProductPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: product_purchase
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Product purchase
    CustomerAvailableRulePurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: purchase
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Purchase
    CustomerAvailableRuleJoinProgram:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: join_program
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Join program
    CustomerAvailableRuleReview:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: review
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Review
    CustomerAvailableRuleCustom:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: custom
        properties:
          type: object
          properties:
            name:
              type: string
              description: The name of this custom rule, as set by the merchant
          required:
            - name
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Custom
    CustomerAvailableRuleFacebookLike:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: facebook_like
        properties:
          type: object
          properties:
            facebook_like_url:
              type: string
          required:
            - facebook_like_url
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Facebook Like
    CustomerAvailableRuleTwitterFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: twitter_follow
        properties:
          type: object
          properties:
            twitter_handle:
              type: string
          required:
            - twitter_handle
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Twitter follow
    CustomerAvailableRuleInstagramFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_follow
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
          required:
            - instagram_handle
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Instagram follow
    CustomerAvailableRuleInstagramMention:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_mention
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
          required:
            - instagram_handle
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Instagram mention
    CustomerAvailableRuleInstagramPostHashtag:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: instagram_post_hashtag
        properties:
          type: object
          properties:
            instagram_handle:
              type: string
            hashtag:
              type: string
          required:
            - instagram_handle
            - hashtag
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Instagram post hashtag
    CustomerAvailableRuleTiktokFollow:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: tiktok_follow
        properties:
          type: object
          properties:
            tiktok_handle:
              type: string
          required:
            - tiktok_handle
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Tiktok follow
    CustomerAvailableRuleTiktokPostHashtag:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: tiktok_post_hashtag
        properties:
          type: object
          properties:
            hashtag:
              type: string
          required:
            - hashtag
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Tiktok post hashtag
    CustomerAvailableRuleReferral:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: referral
        properties:
          type: object
          properties:
            trigger:
              type: string
              enum:
                - any_purchase
                - qualifying_purchase
          required:
            - trigger
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Referral
    CustomerAvailableRuleClickthrough:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: clickthrough
        properties:
          type: object
          properties:
            destination_url:
              type: string
          required:
            - destination_url
          additionalProperties: false
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - properties
        - variant
        - context
      additionalProperties: false
      title: Clickthrough
    CustomerAvailableRuleRetailPurchase:
      type: object
      properties:
        id:
          type: number
        limit:
          anyOf:
            - type: object
              properties:
                count:
                  type: integer
                  description: >-
                    The number of times this rule can be completed for a
                    customer in the specified calendar `interval`, e.g. once a
                    week
                interval:
                  anyOf:
                    - type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                      description: The calendar interval for this limit
                    - type: 'null'
                  description: >-
                    The calendar interval for this limit. If `null`, it means
                    the limit will never reset and the rule can only ever be
                    completed for a customer a set number of times
              required:
                - count
                - interval
              additionalProperties: false
            - type: 'null'
          description: >-
            A limit for this rule, which is applied per customer. Rules with a
            limit set may only be completed a set number of times in a given
            interval. The limit may be `null` if the rule has no limit and can
            therefore be completed any number of times by the same customer
        kind:
          type: string
          const: retail_purchase
        variant:
          type: object
          properties:
            tier_id:
              description: >-
                The tier ID to which this rule variant applies. This will always
                be `null` if the program does not have tiers enabled
              type:
                - number
                - 'null'
            title:
              type: string
              description: >-
                Short, localized title for this rule. For example, 'Make a
                purchase' or 'Refer a friend'
              example: Make a purchase
            enabled:
              type: boolean
              description: >-
                Indicates if this rule variant is enabled. For example, some
                rules are only available for certain tiers
            result:
              oneOf:
                - $ref: '#/components/schemas/RuleResultPoints'
                  title: Points
                - $ref: '#/components/schemas/RuleResultReward'
                  title: Reward
              description: >-
                The result of completing this rule. Will be one of `points`
                (points are awarded to the customer), or `reward` (a reward is
                immediately granted, such as a cart discount voucher)
              type: object
              discriminator:
                propertyName: kind
                mapping:
                  points:
                    $ref: '#/components/schemas/RuleResultPoints'
                  reward:
                    $ref: '#/components/schemas/RuleResultReward'
            result_short_text:
              type: string
              description: >-
                Short, localized text indicating the result of completing this
                rule variant. For example: '100 points', '5 points per $1', or
                '$5 voucher'
              example: 5 points per $1
          required:
            - tier_id
            - title
            - enabled
            - result
            - result_short_text
          additionalProperties: false
          description: The rule variant that is applicable to this customer and their tier
        context:
          type: object
          properties:
            last_completed_at:
              description: >-
                `ISO 8601` timestamp representing when this rule was last
                completed by the customer, or `null` if the rule has never been
                completed by the customer
              type:
                - string
                - 'null'
            completion_count:
              type: number
              description: >-
                The number of times this rule has been completed by the customer
                in total
            completion_limit:
              oneOf:
                - $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitNotReached
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                - $ref: >-
                    #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
              description: >-
                An object indicating the state of this rule's completion limit
                specific to this customer. When rules are limited, they can only
                be completed by a customer a set number of times in a given
                interval (or forever). The `state` property indicates what
                limit, if any, is currently in effect
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_limit:
                    $ref: '#/components/schemas/RuleContextCompletionLimitNoLimit'
                  limit_not_reached:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitNotReached
                  limit_reached_forever:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedForever
                  limit_reached_until_reset:
                    $ref: >-
                      #/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset
          required:
            - last_completed_at
            - completion_count
            - completion_limit
          additionalProperties: false
          description: >-
            Information about this customer's interaction with this rule, such
            as the number of times they have completed it, or any limit that is
            in effect
      required:
        - id
        - limit
        - kind
        - variant
        - context
      additionalProperties: false
      title: Retail purchase
    CustomerHistoryActionEarnedPointsFromRule:
      type: object
      properties:
        kind:
          type: string
          const: earned_points_from_rule
          description: >-
            Represents points that the customer earned as the result of
            completing a rule.
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be the
            name of the associated rule
          example: Join our program
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        points:
          type: integer
          minimum: 0
          description: >-
            The number of points earned from the rule. This will always be 0 or
            higher
        points_text:
          type: string
          description: Short, localized text indicating the number of points earned
          example: 500 points
        rule:
          type: object
          properties:
            id:
              type: number
              description: >-
                The ID of the rule whose completion earned the points. If this
                does not match a `rule` in the current Site Configuration, it
                means the associated rule has been deleted
            kind:
              type: string
              enum:
                - birthday
                - loyalty_pass_install
                - collection_purchase
                - newsletter_signup
                - pageview
                - product_purchase
                - purchase
                - join_program
                - review
                - custom
                - facebook_like
                - twitter_follow
                - instagram_follow
                - instagram_mention
                - instagram_post_hashtag
                - tiktok_follow
                - tiktok_post_hashtag
                - referral
                - clickthrough
                - retail_purchase
          required:
            - id
            - kind
          additionalProperties: false
        points_will_approve_at:
          description: >-
            If the state of this action is `pending`, this will be an `ISO 8601`
            timestamp representing the date at which the points will become
            approved, unless they are declined in the meantime
          type:
            - string
            - 'null'
        points_will_expire_at:
          description: >-
            If 'Earned date' or 'Calendar' point expiration is enabled, this
            will be an `ISO 8601` timestamp representing the date at which these
            points will expire
          type:
            - string
            - 'null'
        state:
          type: string
          enum:
            - pending
            - declined
            - approved
            - void
            - expired
          description: >-
            The state of the points earned from this rule.


            - `pending` - the points cannot be redeemed yet, and will be
            declined or approved at a later date


            - `declined` - pending points were declined and cannot be used


            - `approved` - points that can be redeemed


            - `void` - approved points that have been voided and cannot be used


            - `expired` - points that have expired and cannot be used
      required:
        - kind
        - label
        - date
        - points
        - points_text
        - rule
        - points_will_approve_at
        - points_will_expire_at
        - state
      additionalProperties: false
      title: Earned points from rule
    CustomerHistoryActionRedeemedPointsForReward:
      type: object
      properties:
        kind:
          type: string
          const: redeemed_points_for_reward
          description: Represents a reward that the customer redeemed using points
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be the
            name of the redeemed reward
          example: $5 voucher
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        points:
          type: integer
          maximum: 0
          description: The number of points redeemed. This will always be 0 or lower
        points_text:
          type: string
          description: Short, localized text indicating the number of points redeemed
          example: '-500 points'
        reward:
          type: object
          properties:
            id:
              type: number
              description: >-
                The ID of the reward redeemed for the points. If this does not
                match a `reward` in the current Site Configuration, it means the
                associated reward has been deleted
            kind:
              type: string
              enum:
                - gift_card
                - cart_discount_voucher
                - cart_variable_discount_voucher
                - free_shipping_voucher
                - product_discount_voucher
                - collection_discount_voucher
                - product_cart
                - active_subscription_discount_voucher
                - active_subscription_product
                - custom
          required:
            - id
            - kind
          additionalProperties: false
        claimed_reward_id:
          type: number
          description: The ID of the associated claimed reward for the customer
        state:
          type: string
          enum:
            - pending
            - declined
            - approved
            - void
            - expired
          description: >-
            The state of the redeemed reward.


            - `pending` - the reward cannot be used yet, and will be declined or
            approved at a later date


            - `declined` - the reward was declined and cannot be used


            - `approved` - the reward can be used


            - `void` - the reward was voided and cannot be used


            - `expired` - the reward has expired and cannot be used
      required:
        - kind
        - label
        - date
        - points
        - points_text
        - reward
        - claimed_reward_id
        - state
      additionalProperties: false
      title: Redeemed points for reward
    CustomerHistoryActionReceivedReward:
      type: object
      properties:
        kind:
          type: string
          const: received_reward
          description: >-
            Represents a reward that the customer received without redeeming
            their points, such as from completing a rule or entering a new tier
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be the
            name of the received reward
          example: $5 voucher
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        reward:
          type: object
          properties:
            id:
              type: number
              description: >-
                The ID of the received reward. If this does not match a `reward`
                in the current Site Configuration, it means the associated
                reward has been deleted
            kind:
              type: string
              enum:
                - gift_card
                - cart_discount_voucher
                - cart_variable_discount_voucher
                - free_shipping_voucher
                - product_discount_voucher
                - collection_discount_voucher
                - product_cart
                - active_subscription_discount_voucher
                - active_subscription_product
                - custom
          required:
            - id
            - kind
          additionalProperties: false
        claimed_reward_id:
          type: number
          description: The ID of the associated claimed reward for the customer
        rule:
          anyOf:
            - type: object
              properties:
                id:
                  type: number
                  description: >-
                    The ID of the rule whose completion resulted in the reward.
                    If this does not match a `rule` in the current Site
                    Configuration, it means the associated rule has been deleted
                kind:
                  type: string
                  enum:
                    - birthday
                    - loyalty_pass_install
                    - collection_purchase
                    - newsletter_signup
                    - pageview
                    - product_purchase
                    - purchase
                    - join_program
                    - review
                    - custom
                    - facebook_like
                    - twitter_follow
                    - instagram_follow
                    - instagram_mention
                    - instagram_post_hashtag
                    - tiktok_follow
                    - tiktok_post_hashtag
                    - referral
                    - clickthrough
                    - retail_purchase
                title:
                  type: string
                  description: >-
                    Localized display title for the rule (the
                    merchant-configured title for the shopper-facing locale,
                    falling back to the default title for the rule kind). Useful
                    for surfacing the rule context alongside the reward — e.g.
                    "Refer a friend — $5 voucher".
              required:
                - id
                - kind
                - title
              additionalProperties: false
            - type: 'null'
          description: >-
            If this reward was received as a result of completing a rule, this
            will include the ID and kind of the related rule. It will be `null`
            if the reward some other way, such as from entering a new tier
        state:
          type: string
          enum:
            - pending
            - declined
            - approved
            - void
            - expired
          description: >-
            The state of the reward received from the rule.


            - `pending` - the reward cannot be used yet, and will be declined or
            approved at a later date


            - `declined` - the reward was declined and cannot be used


            - `approved` - the reward can be used


            - `void` - the reward was voided and cannot be used


            - `expired` - the reward has expired and cannot be used
      required:
        - kind
        - label
        - date
        - reward
        - claimed_reward_id
        - rule
        - state
      additionalProperties: false
      title: Received reward
    CustomerHistoryActionPointsAdded:
      type: object
      properties:
        kind:
          type: string
          const: points_added
          description: >-
            Represents points that were added to the customer, typically by a
            store administrator or an automated import
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be the
            administrator note associated with the adjustment
          example: Points imported
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        points:
          type: integer
          minimum: 0
          description: The number of points added. This will always be 0 or higher
        points_text:
          type: string
          description: Short, localized text indicating the number of points added
          example: 1,000 points
        points_will_expire_at:
          description: >-
            If 'Earned date' or 'Calendar' point expiration is enabled, this
            will be an `ISO 8601` timestamp representing the date at which these
            points will expire
          type:
            - string
            - 'null'
        state:
          type: string
          enum:
            - approved
            - void
            - expired
          description: |-
            The state of the points that were added.

            - `approved` - the points can be used

            - `void` - the points were voided and cannot be used

            - `expired` - the points have expired and cannot be used
      required:
        - kind
        - label
        - date
        - points
        - points_text
        - points_will_expire_at
        - state
      additionalProperties: false
      title: Points added
    CustomerHistoryActionPointsRemoved:
      type: object
      properties:
        kind:
          type: string
          const: points_removed
          description: >-
            Represents points that were removed from the customer, typically by
            a store administrator or an automated import. By default, removed
            points have the `applied` state. If the removal is voided
            (reverted), they will have the `void` state which adds the points
            back to the customer
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be the
            administrator note associated with the adjustment
          example: Duplicate points removed
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        points:
          type: integer
          maximum: 0
          description: The number of points removed. This will always be 0 or lower
        points_text:
          type: string
          description: Short, localized text indicating the number of points removed
          example: '-1,000 points'
        state:
          type: string
          enum:
            - applied
            - void
          description: >-
            The state of the points removal.


            - `applied` - the points have been removed


            - `void` - the removal has been voided and the points were added
            back
      required:
        - kind
        - label
        - date
        - points
        - points_text
        - state
      additionalProperties: false
      title: Points removed
    CustomerHistoryActionPointsExpired:
      type: object
      properties:
        kind:
          type: string
          const: points_expired
          description: >-
            Represents a set of points that have expired and been removed from
            the customer. Points can expire due to inactivity, or a set amount
            of time after they are earned.
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be a
            localized message indicating the expiry
          example: Points expired due to inactivity
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        points:
          type: integer
          maximum: 0
          description: The number of points that expired. This will always be 0 or lower
        points_text:
          type: string
          description: Short, localized text indicating the number of points expired
          example: '-500 points'
      required:
        - kind
        - label
        - date
        - points
        - points_text
      additionalProperties: false
      title: Points expired
    CustomerHistoryActionEnteredTier:
      type: object
      properties:
        kind:
          type: string
          const: entered_tier
          description: Represents the customer entering a new tier
        label:
          type: string
          description: >-
            Short text describing the history action. This will typically be a
            localized message referencing the tier
          example: Entered Gold tier
        date:
          type: string
          description: >-
            `ISO 8601` timestamp representing when this history action occurred.
            Note that actions may change over time, such as points being
            approved or voided, but this timestamp will always represent when
            the action originally happened
        tier:
          type: object
          properties:
            id:
              type: number
              description: The ID of the tier
            name:
              type: string
              description: The name of the tier
          required:
            - id
            - name
          additionalProperties: false
      required:
        - kind
        - label
        - date
        - tier
      additionalProperties: false
      title: Entered tier
    RewardContextCanRedeemRedeemable:
      type: object
      properties:
        state:
          type: string
          const: redeemable
      required:
        - state
      additionalProperties: false
      title: Redeemable
    RewardContextCanRedeemInsufficientPoints:
      type: object
      properties:
        state:
          type: string
          const: insufficient_points
        additional_points_required:
          type: number
          description: >-
            The number of additional points required before this customer can
            afford the reward
      required:
        - state
        - additional_points_required
      additionalProperties: false
      title: Insufficient points
    RewardContextCanRedeemClaimLimitReached:
      type: object
      properties:
        state:
          type: string
          const: claim_limit_reached
      required:
        - state
      additionalProperties: false
      title: Claim limit reached
    RewardContextCanRedeemCartRequirementsNotMet:
      type: object
      properties:
        state:
          type: string
          const: cart_requirements_not_met
        cart_requirements_detail:
          type: object
          properties:
            minimum_cart_total:
              oneOf:
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_requirement:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement
                  requirement_met:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet
                  requirement_not_met:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet
            minimum_line_item_quantity:
              oneOf:
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                - $ref: >-
                    #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
              type: object
              discriminator:
                propertyName: state
                mapping:
                  no_requirement:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement
                  requirement_met:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet
                  requirement_not_met:
                    $ref: >-
                      #/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet
          required:
            - minimum_cart_total
            - minimum_line_item_quantity
          additionalProperties: false
      required:
        - state
        - cart_requirements_detail
      additionalProperties: false
      title: Cart requirements not met
      description: >-
        For rewards that have requirements based on the customer's current cart,
        this indicates that the customer's current cart does not meet the
        requirements. This can only be determined if the request included a
        serialized `cart` object
    RewardContextCanRedeemMaxRedemptionsForCartReached:
      type: object
      properties:
        state:
          type: string
          const: max_redemptions_for_cart_reached
      required:
        - state
      additionalProperties: false
      title: Max redemptions for cart reached
      description: >-
        For rewards that have limits on how many times they can be redeemed per
        cart, this indicates that the customer has reached the maximum number of
        redemptions for the current cart
    RewardContextCanRedeemOutOfStock:
      type: object
      properties:
        state:
          type: string
          const: out_of_stock
      required:
        - state
      additionalProperties: false
      title: Out of stock
      description: >-
        For rewards that have managed inventory, or are linked to an external
        inventory, this indicates that the reward is out of stock. For rewards
        with multiple options (e.g. product variants), this means that all
        options are out of stock
    RewardContextCanRedeemUnknown:
      type: object
      properties:
        state:
          type: string
          const: unknown
      required:
        - state
      additionalProperties: false
      title: Unknown
      description: >-
        The redeemable state of this reward cannot be determined. For example,
        `product_cart` rewards where the request does not include a current cart
        will have this state, since we cannot determine if applicable cart
        requirements are met. It may be safe to treat this reward as redeemable
        if you perform your own checks
    RewardContextClaimLimitNoLimit:
      type: object
      properties:
        state:
          type: string
          const: no_limit
          description: >-
            The associated reward has no limit, so this customer can claim it
            any number of times
      required:
        - state
      additionalProperties: false
      title: No limit
    RewardContextClaimLimitLimitNotReached:
      type: object
      properties:
        state:
          type: string
          const: limit_not_reached
          description: >-
            The associated reward has a claim limit, but this customer has not
            yet reached it
        interval:
          anyOf:
            - type: string
              enum:
                - day
                - week
                - month
                - year
              description: The calendar interval for this limit
            - type: 'null'
          description: >-
            The calendar interval for this limit. If `null`, it means the limit
            will never reset and the reward can only ever be claimed for a
            customer a set number of times
        allowed_claims_within_interval:
          type: integer
          description: >-
            The number of times this reward can be claimed by the customer in
            the current limit interval
        claim_count_within_interval:
          type: integer
          description: >-
            The number of times this reward has been claimed by the customer in
            the current limit interval
        remaining_claims_within_interval:
          type: integer
          description: >-
            The number of times this reward can still be claimed by the customer
            in the current limit interval
      required:
        - state
        - interval
        - allowed_claims_within_interval
        - claim_count_within_interval
        - remaining_claims_within_interval
      additionalProperties: false
      title: Limit not reached
    RewardContextClaimLimitLimitReachedForever:
      type: object
      properties:
        state:
          type: string
          const: limit_reached_forever
          description: >-
            The associated reward has a limit, the customer has reached it, and
            the limit will never reset. This means the reward can never be
            claimed again by this customer
      required:
        - state
      additionalProperties: false
      title: Limit reached forever
    RewardContextClaimLimitLimitReachedUntilReset:
      type: object
      properties:
        state:
          type: string
          const: limit_reached_until_reset
          description: >-
            The associated reward has a limit and the customer has reached it.
            The customer will be able to claim the reward again once the limit
            resets, which will be at the specified `reset_at` date
        interval:
          type: string
          enum:
            - day
            - week
            - month
            - year
          description: The calendar interval for this limit
        resets_at:
          type: string
          description: >-
            `ISO 8601` timestamp representing when the limit will reset and the
            customer can claim the reward again. This will usually be the start
            of the next calendar interval
        resets_at_relative_to_now:
          type: string
          description: Localized text indicating when the limit will reset relative to now
          example: 3 days
      required:
        - state
        - interval
        - resets_at
        - resets_at_relative_to_now
      additionalProperties: false
      title: Limit reached until reset
    RuleResultPoints:
      type: object
      properties:
        kind:
          type: string
          const: points
        per_currency_unit:
          description: >-
            Indicates if the points value is per currency unit. For example, if
            a rule provides 5 points for every $1 spent, this will be `1`. If
            `null`, the points value is exact
          example: 1
          type:
            - number
            - 'null'
        points:
          type: number
          description: >-
            The number of points provided when this rule variant is completed.
            If `per_currency_unit` is not null, this will be the number of
            points per currency unit (e.g. 5 points per $1)
          example: 5
      required:
        - kind
        - per_currency_unit
        - points
      additionalProperties: false
    RuleResultReward:
      type: object
      properties:
        kind:
          type: string
          const: reward
        reward:
          type: object
          properties:
            kind:
              type: string
              enum:
                - gift_card
                - cart_discount_voucher
                - cart_variable_discount_voucher
                - free_shipping_voucher
                - product_discount_voucher
                - collection_discount_voucher
                - product_cart
                - active_subscription_discount_voucher
                - active_subscription_product
                - custom
            title:
              type: string
          required:
            - kind
            - title
          additionalProperties: false
      required:
        - kind
        - reward
      additionalProperties: false
    RuleContextCompletionLimitNoLimit:
      type: object
      properties:
        state:
          type: string
          const: no_limit
          description: >-
            The associated rule has no limit, so this customer can complete it
            any number of times
      required:
        - state
      additionalProperties: false
      title: No limit
      description: no limit
    RuleContextCompletionLimitLimitNotReached:
      type: object
      properties:
        state:
          type: string
          const: limit_not_reached
          description: >-
            The associated rule has a limit, but this customer has not yet
            reached it
        interval:
          anyOf:
            - type: string
              enum:
                - day
                - week
                - month
                - year
              description: The calendar interval for this limit
            - type: 'null'
          description: >-
            The calendar interval for this limit. If `null`, it means the limit
            will never reset and the rule can only ever be completed for a
            customer a set number of times
        allowed_completions_within_interval:
          type: integer
          description: >-
            The number of times this rule can be completed by the customer in
            the current limit interval
        completion_count_within_interval:
          type: integer
          description: >-
            The number of times this rule has been completed by the customer in
            the current limit interval
        remaining_completions_within_interval:
          type: integer
          description: >-
            The number of times this rule can still be completed by the customer
            in the current limit interval
      required:
        - state
        - interval
        - allowed_completions_within_interval
        - completion_count_within_interval
        - remaining_completions_within_interval
      additionalProperties: false
      title: Limit not reached
    RuleContextCompletionLimitLimitReachedForever:
      type: object
      properties:
        state:
          type: string
          const: limit_reached_forever
          description: >-
            The associated rule has a limit, the customer has reached it, and
            the limit will never reset. This means the rule can never be
            completed again by this customer
      required:
        - state
      additionalProperties: false
      title: Limit reached forever
    RuleContextCompletionLimitLimitReachedUntilReset:
      type: object
      properties:
        state:
          type: string
          const: limit_reached_until_reset
          description: >-
            The associated rule has a limit and the customer has reached it. The
            customer will be able to complete the rule again once the limit
            resets, which will be at the specified `reset_at` date
        interval:
          type: string
          enum:
            - day
            - week
            - month
            - year
          description: The calendar interval for this limit
        resets_at:
          type: string
          description: >-
            `ISO 8601` timestamp representing when the limit will reset and the
            customer can complete the rule again. This will usually be the start
            of the next calendar interval
        resets_at_relative_to_now:
          type: string
          description: Localized text indicating when the limit will reset relative to now
          example: 3 days
      required:
        - state
        - interval
        - resets_at
        - resets_at_relative_to_now
      additionalProperties: false
      title: Limit reached until reset
  responses:
    ClientErrorBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - message
            required:
              - error
  securitySchemes:
    ProgramApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key linked to a Program in LoyaltyLion, with a set of permissions
        (scopes). API keys can be created manually, or acquired through an
        OAuth2 flow. The API key should be provided as a `Bearer` token in the
        `Authorization` header

````