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

# Update Billing Schedule

> Update an existing [Billing Schedule](/billing/create-billing-schedules).



## OpenAPI

````yaml billing.latest.product.live PUT /billing-schedules/{billingScheduleId}
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: 0.0.1
servers:
  - url: https://dev.seqhq.io
    description: E2E
  - url: https://dev.seqhq.io
    description: DEV
  - url: https://sandbox.sequencehq.com
    description: SANDBOX
  - url: https://eu.sequencehq.com
    description: PRODUCTION
security: []
tags:
  - name: Prices
  - name: Billing Schedules
  - name: Credits
  - name: Discounts
paths:
  /billing-schedules/{billingScheduleId}:
    servers: []
    parameters: []
    put:
      tags:
        - Billing Schedules
      summary: Update Billing Schedule
      description: >-
        Update an existing [Billing
        Schedule](/billing/create-billing-schedules).
      operationId: putBillingSchedulesByBillingScheduleId
      parameters:
        - name: billingScheduleId
          in: path
          description: Billing Schedule ID
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: sequence-version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBillingScheduleRequest'
              example:
                startDate: '2022-01-01'
                endDate: '2022-12-01'
                recurrenceDayOfMonth: 1
                taxRates:
                  - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                autoIssueInvoices: true
                purchaseOrderNumber: PO123
                rollUpBilling: false
                phases:
                  - externalContractRef: ACME-2022-MSA
                    priceIds:
                      - bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    startDate: '2022-01-01'
                    endDate: '2022-12-01'
                    discounts: []
                    minimums: []
                    creditGrants:
                      - id: 0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40
                        name: Monthly usage credits
                        creditUnitType: CURRENCY
                        currency: GBP
                        amount: 100
                        costOfCredit: 0
                        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                        grantRefreshFrequency: MONTHLY
                        billingFrequency: MONTHLY
                        rolloverMode: NONE
                        restrictToPrices:
                          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                    listPriceIds:
                      - b4d7e884-e007-4183-8355-4771865c5100
                    recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                    phasePriceMetadata:
                      - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        arrCalculation: INCLUDE
                    phaseListPriceMetadata:
                      - listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                        arrCalculation: INCLUDE
                attachmentAssetIds:
                  - 5055cd17-d5e8-4286-bddf-79729ddabf51
                defaultDueDateDays: 30
                memo: Example Billing Schedule
                customFields:
                  key: value
            examples:
              UpdateBillingScheduleRequest:
                summary: ''
                value:
                  startDate: '2022-01-01'
                  endDate: '2022-12-01'
                  recurrenceDayOfMonth: 1
                  taxRates:
                    - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                      taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                  autoIssueInvoices: true
                  purchaseOrderNumber: PO123
                  rollUpBilling: false
                  phases:
                    - externalContractRef: ACME-2022-MSA
                      priceIds:
                        - bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                      startDate: '2022-01-01'
                      endDate: '2022-12-01'
                      discounts: []
                      minimums: []
                      creditGrants:
                        - id: 0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40
                          name: Monthly usage credits
                          creditUnitType: CURRENCY
                          currency: GBP
                          amount: 100
                          costOfCredit: 0
                          taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                          grantRefreshFrequency: MONTHLY
                          billingFrequency: MONTHLY
                          rolloverMode: NONE
                          restrictToPrices:
                            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                      listPriceIds:
                        - b4d7e884-e007-4183-8355-4771865c5100
                      recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                      phasePriceMetadata:
                        - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          arrCalculation: INCLUDE
                      phaseListPriceMetadata:
                        - listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                          arrCalculation: INCLUDE
                  attachmentAssetIds:
                    - 5055cd17-d5e8-4286-bddf-79729ddabf51
                  defaultDueDateDays: 30
                  memo: Example Billing Schedule
                  customFields:
                    key: value
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingScheduleResponse'
                example:
                  id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                  customerId: cca32597-b6b0-4499-9669-128aef8702e4
                  status: ACTIVE
                  startDate: '2022-01-01'
                  endDate: '2022-12-01'
                  taxRates:
                    - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                      taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                  firstBillingDate: '2022-02-02'
                  autoIssueInvoices: false
                  purchaseOrderNumber: PO123
                  reference: ref
                  label: label
                  recurrenceDayOfMonth: 1
                  prices:
                    - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                      productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                      name: Demo Product
                      currency: GBP
                      structure:
                        pricePerUnit: '0.25'
                        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                        isPricePercentage: false
                        pricingType: LINEAR
                      billingFrequency: MONTHLY
                      billingType: IN_ARREARS
                      createdAt: '2022-06-28T16:47:00Z'
                      updatedAt: '2022-06-28T16:47:00Z'
                      integrationIds:
                        - service: Xero
                          id: '123'
                          isPending: false
                      customMetricParameters:
                        - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                          value: '10'
                      listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                      usageCalculationPeriod:
                        frequency: MONTHLY
                        interval: 1
                      status: ACTIVE
                  createdAt: '2022-06-28T16:47:00Z'
                  updatedAt: '2022-06-28T16:47:00Z'
                  lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
                  phases:
                    - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      name: Onboarding
                      externalContractRef: ACME-2022-MSA
                      createdAt: '2022-06-28T16:47:00Z'
                      billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                      priceIds:
                        - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      startDate: '2022-01-01'
                      endDate: '2022-06-30'
                      discounts:
                        - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                          restrictToPrices:
                            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          type: PERCENTAGE
                          amount: 15
                          message: 15% Discount
                          separateLineItem: true
                          seatDiscountType: ALL_SEATS
                      minimums:
                        - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                          billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                          phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          amount: 100
                          restrictToPrices:
                            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          createdAt: '2022-06-28T16:47:00Z'
                          updatedAt: '2022-06-28T16:47:00Z'
                      creditGrants:
                        - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                          name: Monthly usage credits
                          creditUnitType: CURRENCY
                          currency: GBP
                          amount: 100
                          costOfCredit: 0
                          taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                          grantRefreshFrequency: MONTHLY
                          billingFrequency: MONTHLY
                          rolloverMode: NONE
                          restrictToPrices:
                            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                      integrationIds:
                        - service: NetSuite
                          id: SO-1024
                          lastSynced: '2022-06-28T16:47:00Z'
                          url: >-
                            https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                          isPending: false
                      recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                      phasePriceMetadata:
                        - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          arrCalculation: INCLUDE
                  archivedAt: '2022-06-28T16:47:00Z'
                  rollUpBilling: false
                  integrationIds:
                    - service: Salesforce
                      id: a0CQy00000Ipz5VMAR
                      lastSynced: '2024-08-14T17:14:17Z'
                      url: >-
                        https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                      isPending: false
                  attachmentAssets:
                    - id: e007e884-5100-4183-8355-4771865cb4dd
                      createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                      type: IMAGE
                      format: PNG
                      fileName: my-image.png
                      fileSizeBytes: 12345
                      url: >-
                        https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                      createdAt: '2022-06-28T16:47:00Z'
                  contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
                  defaultDueDateDays: 30
                  memo: Example Billing Schedule
                  customFields:
                    key: value
                  paymentProvider: STRIPE
                  autoCharge: true
              examples:
                BillingScheduleResponse:
                  summary: ''
                  value:
                    id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                    customerId: cca32597-b6b0-4499-9669-128aef8702e4
                    status: ACTIVE
                    startDate: '2022-01-01'
                    endDate: '2022-12-01'
                    taxRates:
                      - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                        taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                    firstBillingDate: '2022-02-02'
                    autoIssueInvoices: false
                    purchaseOrderNumber: PO123
                    reference: ref
                    label: label
                    recurrenceDayOfMonth: 1
                    prices:
                      - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                        productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                        name: Demo Product
                        currency: GBP
                        structure:
                          pricePerUnit: '0.25'
                          usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                          isPricePercentage: false
                          pricingType: LINEAR
                        billingFrequency: MONTHLY
                        billingType: IN_ARREARS
                        createdAt: '2022-06-28T16:47:00Z'
                        updatedAt: '2022-06-28T16:47:00Z'
                        integrationIds:
                          - service: Xero
                            id: '123'
                            isPending: false
                        customMetricParameters:
                          - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                            value: '10'
                        listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                        usageCalculationPeriod:
                          frequency: MONTHLY
                          interval: 1
                        status: ACTIVE
                    createdAt: '2022-06-28T16:47:00Z'
                    updatedAt: '2022-06-28T16:47:00Z'
                    lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
                    phases:
                      - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        name: Onboarding
                        externalContractRef: ACME-2022-MSA
                        createdAt: '2022-06-28T16:47:00Z'
                        billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                        priceIds:
                          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        startDate: '2022-01-01'
                        endDate: '2022-06-30'
                        discounts:
                          - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                            restrictToPrices:
                              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            type: PERCENTAGE
                            amount: 15
                            message: 15% Discount
                            separateLineItem: true
                            seatDiscountType: ALL_SEATS
                        minimums:
                          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                            phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            amount: 100
                            restrictToPrices:
                              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            createdAt: '2022-06-28T16:47:00Z'
                            updatedAt: '2022-06-28T16:47:00Z'
                        creditGrants:
                          - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                            name: Monthly usage credits
                            creditUnitType: CURRENCY
                            currency: GBP
                            amount: 100
                            costOfCredit: 0
                            taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                            grantRefreshFrequency: MONTHLY
                            billingFrequency: MONTHLY
                            rolloverMode: NONE
                            restrictToPrices:
                              - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                        integrationIds:
                          - service: NetSuite
                            id: SO-1024
                            lastSynced: '2022-06-28T16:47:00Z'
                            url: >-
                              https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                            isPending: false
                        recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                        phasePriceMetadata:
                          - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            arrCalculation: INCLUDE
                    archivedAt: '2022-06-28T16:47:00Z'
                    rollUpBilling: false
                    integrationIds:
                      - service: Salesforce
                        id: a0CQy00000Ipz5VMAR
                        lastSynced: '2024-08-14T17:14:17Z'
                        url: >-
                          https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                        isPending: false
                    attachmentAssets:
                      - id: e007e884-5100-4183-8355-4771865cb4dd
                        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                        type: IMAGE
                        format: PNG
                        fileName: my-image.png
                        fileSizeBytes: 12345
                        url: >-
                          https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                        createdAt: '2022-06-28T16:47:00Z'
                    contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
                    defaultDueDateDays: 30
                    memo: Example Billing Schedule
                    customFields:
                      key: value
                    paymentProvider: STRIPE
                    autoCharge: true
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    UpdateBillingScheduleRequest:
      required:
        - autoIssueInvoices
        - phases
        - rollUpBilling
        - startDate
        - taxRates
      type: object
      example:
        startDate: '2022-01-01'
        endDate: '2022-12-01'
        recurrenceDayOfMonth: 1
        taxRates:
          - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
        autoIssueInvoices: true
        purchaseOrderNumber: PO123
        rollUpBilling: false
        phases:
          - externalContractRef: ACME-2022-MSA
            priceIds:
              - bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            startDate: '2022-01-01'
            endDate: '2022-12-01'
            discounts: []
            minimums: []
            creditGrants:
              - id: 0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40
                name: Monthly usage credits
                creditUnitType: CURRENCY
                currency: GBP
                amount: 100
                costOfCredit: 0
                taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                grantRefreshFrequency: MONTHLY
                billingFrequency: MONTHLY
                rolloverMode: NONE
                restrictToPrices:
                  - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
            listPriceIds:
              - b4d7e884-e007-4183-8355-4771865c5100
            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
            phasePriceMetadata:
              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                arrCalculation: INCLUDE
            phaseListPriceMetadata:
              - listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                arrCalculation: INCLUDE
        attachmentAssetIds:
          - 5055cd17-d5e8-4286-bddf-79729ddabf51
        defaultDueDateDays: 30
        memo: Example Billing Schedule
        customFields:
          key: value
      properties:
        startDate:
          type: string
          description: Start date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          example: '2022-12-01'
        recurrenceDayOfMonth:
          type: integer
          description: Recurrence day of month
          format: int32
          example: 1
        taxRates:
          type: array
          description: Tax Rate for each Product
          example:
            - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
          items:
            $ref: '#/components/schemas/ProductTaxRateRepresentation'
        autoIssueInvoices:
          type: boolean
          description: Auto-issue invoices for this billing schedule
          example: true
        purchaseOrderNumber:
          type: string
          description: Optional purchase order number to be added to invoices
          example: PO123
        rollUpBilling:
          type: boolean
          description: Toggles Roll-up billing
          example: false
        phases:
          type: array
          description: Phases
          example:
            - externalContractRef: ACME-2022-MSA
              priceIds:
                - bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              startDate: '2022-01-01'
              endDate: '2022-12-01'
              discounts: []
              minimums: []
              creditGrants:
                - id: 0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40
                  name: Monthly usage credits
                  creditUnitType: CURRENCY
                  currency: GBP
                  amount: 100
                  costOfCredit: 0
                  taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                  grantRefreshFrequency: MONTHLY
                  billingFrequency: MONTHLY
                  rolloverMode: NONE
                  restrictToPrices:
                    - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
              listPriceIds:
                - b4d7e884-e007-4183-8355-4771865c5100
              recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
              phasePriceMetadata:
                - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  arrCalculation: INCLUDE
              phaseListPriceMetadata:
                - listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                  arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhaseRequest'
        attachmentAssetIds:
          type: array
          description: IDs of assets that are attached to this schedule
          example:
            - 5055cd17-d5e8-4286-bddf-79729ddabf51
          items:
            type: string
        defaultDueDateDays:
          type: integer
          description: >-
            Default number of days between invoice issue date and due date.
            Overrides any invoice level set default due date
          example: 30
        memo:
          type: string
          description: Billing schedule memo. Overrides any invoice level set memo
          example: Example Billing Schedule
        customFields:
          type: object
          description: >-
            Custom key-value fields. Providing this field replaces all existing
            custom fields. Omitting it leaves them unchanged.
          example:
            key: value
          additionalProperties:
            type: string
    BillingScheduleResponse:
      required:
        - attachmentAssets
        - autoIssueInvoices
        - createdAt
        - customFields
        - customerId
        - id
        - integrationIds
        - phases
        - prices
        - rollUpBilling
        - startDate
        - status
        - updatedAt
      type: object
      example:
        id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        customerId: cca32597-b6b0-4499-9669-128aef8702e4
        status: ACTIVE
        startDate: '2022-01-01'
        endDate: '2022-12-01'
        taxRates:
          - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
        firstBillingDate: '2022-02-02'
        autoIssueInvoices: false
        purchaseOrderNumber: PO123
        reference: ref
        label: label
        recurrenceDayOfMonth: 1
        prices:
          - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
            name: Demo Product
            currency: GBP
            structure:
              pricePerUnit: '0.25'
              usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
              isPricePercentage: false
              pricingType: LINEAR
            billingFrequency: MONTHLY
            billingType: IN_ARREARS
            createdAt: '2022-06-28T16:47:00Z'
            updatedAt: '2022-06-28T16:47:00Z'
            integrationIds:
              - service: Xero
                id: '123'
                isPending: false
            customMetricParameters:
              - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                value: '10'
            listPriceId: b4d7e884-e007-4183-8355-4771865c5100
            usageCalculationPeriod:
              frequency: MONTHLY
              interval: 1
            status: ACTIVE
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
        lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
        phases:
          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            name: Onboarding
            externalContractRef: ACME-2022-MSA
            createdAt: '2022-06-28T16:47:00Z'
            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
            priceIds:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            startDate: '2022-01-01'
            endDate: '2022-06-30'
            discounts:
              - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                restrictToPrices:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                type: PERCENTAGE
                amount: 15
                message: 15% Discount
                separateLineItem: true
                seatDiscountType: ALL_SEATS
            minimums:
              - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                amount: 100
                restrictToPrices:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                createdAt: '2022-06-28T16:47:00Z'
                updatedAt: '2022-06-28T16:47:00Z'
            creditGrants:
              - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                name: Monthly usage credits
                creditUnitType: CURRENCY
                currency: GBP
                amount: 100
                costOfCredit: 0
                taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                grantRefreshFrequency: MONTHLY
                billingFrequency: MONTHLY
                rolloverMode: NONE
                restrictToPrices:
                  - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
            integrationIds:
              - service: NetSuite
                id: SO-1024
                lastSynced: '2022-06-28T16:47:00Z'
                url: >-
                  https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                isPending: false
            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
            phasePriceMetadata:
              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                arrCalculation: INCLUDE
        archivedAt: '2022-06-28T16:47:00Z'
        rollUpBilling: false
        integrationIds:
          - service: Salesforce
            id: a0CQy00000Ipz5VMAR
            lastSynced: '2024-08-14T17:14:17Z'
            url: >-
              https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
            isPending: false
        attachmentAssets:
          - id: e007e884-5100-4183-8355-4771865cb4dd
            createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
            type: IMAGE
            format: PNG
            fileName: my-image.png
            fileSizeBytes: 12345
            url: >-
              https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
            createdAt: '2022-06-28T16:47:00Z'
        contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
        defaultDueDateDays: 30
        memo: Example Billing Schedule
        customFields:
          key: value
        paymentProvider: STRIPE
        autoCharge: true
      properties:
        id:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        customerId:
          type: string
          description: Customer ID
          example: cca32597-b6b0-4499-9669-128aef8702e4
        status:
          $ref: '#/components/schemas/ApiBillingScheduleStatus'
          description: Billing schedule status
        startDate:
          type: string
          description: Start date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          example: '2022-12-01'
        taxRates:
          type: array
          description: Tax Rate for each Product
          example:
            - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
          items:
            $ref: '#/components/schemas/ProductTaxRateRepresentation'
        firstBillingDate:
          type: string
          description: First billing date
          example: '2022-02-02'
        autoIssueInvoices:
          type: boolean
          description: >-
            If true, invoices will be automatically sent for this billing
            schedule
          example: false
        purchaseOrderNumber:
          type: string
          description: Optional purchase order number to be added to invoices
          example: PO123
        reference:
          type: string
          description: Optional reference to be added to invoices
          example: ref
        label:
          type: string
          description: Optional label
          example: label
        recurrenceDayOfMonth:
          type: integer
          description: The day of the month on which billing recurs
          format: int32
          example: 1
        prices:
          type: array
          description: Prices
          example:
            - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
              name: Demo Product
              currency: GBP
              structure:
                pricePerUnit: '0.25'
                usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                isPricePercentage: false
                pricingType: LINEAR
              billingFrequency: MONTHLY
              billingType: IN_ARREARS
              createdAt: '2022-06-28T16:47:00Z'
              updatedAt: '2022-06-28T16:47:00Z'
              integrationIds:
                - service: Xero
                  id: '123'
                  isPending: false
              customMetricParameters:
                - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                  value: '10'
              listPriceId: b4d7e884-e007-4183-8355-4771865c5100
              usageCalculationPeriod:
                frequency: MONTHLY
                interval: 1
              status: ACTIVE
          items:
            $ref: '#/components/schemas/PriceResponse'
        createdAt:
          type: string
          description: >-
            Time at which the schedule was initially created, in ISO 8601
            format.
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Time at which the schedule was last updated, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        lastInvoiceId:
          type: string
          description: ID of the last invoice (if there has been one)
          example: bdbf78a5-b007-4d46-aa7d-d0417a649d64
        phases:
          type: array
          description: Phases
          example:
            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              name: Onboarding
              externalContractRef: ACME-2022-MSA
              createdAt: '2022-06-28T16:47:00Z'
              billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
              priceIds:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              startDate: '2022-01-01'
              endDate: '2022-06-30'
              discounts:
                - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                  restrictToPrices:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  type: PERCENTAGE
                  amount: 15
                  message: 15% Discount
                  separateLineItem: true
                  seatDiscountType: ALL_SEATS
              minimums:
                - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                  billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                  phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  amount: 100
                  restrictToPrices:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  createdAt: '2022-06-28T16:47:00Z'
                  updatedAt: '2022-06-28T16:47:00Z'
              creditGrants:
                - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                  name: Monthly usage credits
                  creditUnitType: CURRENCY
                  currency: GBP
                  amount: 100
                  costOfCredit: 0
                  taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                  grantRefreshFrequency: MONTHLY
                  billingFrequency: MONTHLY
                  rolloverMode: NONE
                  restrictToPrices:
                    - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
              integrationIds:
                - service: NetSuite
                  id: SO-1024
                  lastSynced: '2022-06-28T16:47:00Z'
                  url: >-
                    https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                  isPending: false
              recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
              phasePriceMetadata:
                - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/Phase'
        archivedAt:
          type: string
          description: Time at which the schedule was archived, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        rollUpBilling:
          type: boolean
          description: Roll up billing
          example: false
        integrationIds:
          type: array
          description: External services which are linked to this customer
          example:
            - service: Salesforce
              id: a0CQy00000Ipz5VMAR
              lastSynced: '2024-08-14T17:14:17Z'
              url: >-
                https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        attachmentAssets:
          type: array
          description: Assets attached to this billing schedule
          example:
            - id: e007e884-5100-4183-8355-4771865cb4dd
              createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
              type: IMAGE
              format: PNG
              fileName: my-image.png
              fileSizeBytes: 12345
              url: >-
                https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
              createdAt: '2022-06-28T16:47:00Z'
          items:
            $ref: '#/components/schemas/AssetResponse'
        contractId:
          type: string
          description: Optional ID of the contract used to create this billing schedule
          example: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
        defaultDueDateDays:
          type: integer
          description: Default number of days between invoice issue date and due date
          example: 30
        memo:
          type: string
          description: Billing schedule memo
          example: Example Billing Schedule
        customFields:
          type: object
          description: Custom key-value fields for this billing schedule
          example:
            key: value
          additionalProperties:
            type: string
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: >-
            Payment provider configured for collecting invoices on this billing
            schedule
        autoCharge:
          type: boolean
          description: Whether invoices for this billing schedule are automatically charged
          example: true
    ProductTaxRateRepresentation:
      required:
        - priceId
        - taxRateId
      type: object
      example:
        priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
      properties:
        priceId:
          type: string
          description: ID of the Price
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId:
          type: string
          description: ID of the Tax Rate
          example: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
    PhaseRequest:
      required:
        - priceIds
        - startDate
      type: object
      example:
        name: Trial Period
        externalContractRef: ACME-2022-MSA
        priceIds:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        startDate: '2022-01-01'
        endDate: '2022-06-30'
        discounts:
          - restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            type: PERCENTAGE
            amount: 8
            message: 8% Discount
            separateLineItem: true
            seatDiscountType: ALL_SEATS
        minimums:
          - restrictToPrices:
              - 9fe9986b-e205-42b7-a58f-42845c91f03f
            amount: 100
        creditGrants:
          - name: Monthly usage credits
            creditUnitType: CURRENCY
            currency: GBP
            amount: 100
            costOfCredit: 0
            taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
            grantRefreshFrequency: MONTHLY
            billingFrequency: MONTHLY
            rolloverMode: NONE
            restrictToPrices:
              - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
        listPriceIds:
          - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
        phasePriceMetadata:
          - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            arrCalculation: INCLUDE
        phaseListPriceMetadata:
          - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
            arrCalculation: INCLUDE
      properties:
        name:
          type: string
          description: Optional name for the Phase
          example: Trial Period
        externalContractRef:
          type: string
          description: >-
            Free-text reference to the contract this phase rolls up to in an
            external system. Phases sharing a reference belong to the same
            contract; surrounding whitespace is trimmed, and matching is
            case-sensitive. On update, omitting this field or sending null
            clears any existing reference and has the phase roll up to the
            billing schedule itself.
          example: ACME-2022-MSA
        priceIds:
          type: array
          description: The price IDs included in this phase
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        startDate:
          type: string
          description: Phase start date
          example: '2022-01-01'
        endDate:
          type: string
          description: >-
            Phase end date. A null end date denotes an open-ended phase. Only
            the last phase can be open-ended.
          example: '2022-06-30'
        discounts:
          type: array
          description: Discounts applicable to this phase
          example:
            - restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              type: PERCENTAGE
              amount: 8
              message: 8% Discount
              separateLineItem: true
              seatDiscountType: ALL_SEATS
          items:
            $ref: '#/components/schemas/EmbeddableDiscountRequest'
        minimums:
          type: array
          description: Minimums applicable to this phase
          example:
            - restrictToPrices:
                - 9fe9986b-e205-42b7-a58f-42845c91f03f
              amount: 100
          items:
            $ref: '#/components/schemas/MinimumRequest'
        creditGrants:
          type: array
          description: >-
            Credit grants applicable to this phase. Omit this field on every
            phase to leave the schedule's existing grants untouched. Once any
            phase provides it, the grants across all phases are the schedule's
            full grant spec: grants without an ID are created, grants re-sent
            with their ID are kept, and grants left out are removed. Grants
            cannot be updated through this request, and a grant that has already
            been drawn down cannot be removed this way — delete it through the
            credit grant endpoint instead.
          example:
            - name: Monthly usage credits
              creditUnitType: CURRENCY
              currency: GBP
              amount: 100
              costOfCredit: 0
              taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
              grantRefreshFrequency: MONTHLY
              billingFrequency: MONTHLY
              rolloverMode: NONE
              restrictToPrices:
                - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            $ref: '#/components/schemas/EmbeddableCreditGrantRequest'
        listPriceIds:
          type: array
          description: IDs of list prices from which to create prices for this phase
          example:
            - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
          items:
            type: string
        recurrencePreference:
          $ref: '#/components/schemas/PhaseRecurrencePreference'
          description: Phase recurrence preference
        phasePriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            price
          example:
            - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhasePriceMetadata'
        phaseListPriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            list price
          example:
            - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhaseListPriceMetadata'
    ApiBillingScheduleStatus:
      type: string
      example: ACTIVE
      enum:
        - DRAFT
        - PENDING
        - ACTIVE
        - SUSPENDED
        - CANCELLED
        - COMPLETED
    PriceResponse:
      required:
        - billingFrequency
        - billingType
        - createdAt
        - currency
        - customMetricParameters
        - id
        - integrationIds
        - name
        - productId
        - status
        - structure
      type: object
      example:
        id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        productId: d07037d5-3e31-4c3a-a360-e58555e2bf44
        name: Demo Product
        currency: GBP
        structure:
          tiers:
            - upperBound: '200'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: false
            - upperBound: '400'
              price: '0.75'
              fee: '25.00'
              isPricePercentage: false
            - price: '0.50'
              fee: '0.00'
              isPricePercentage: false
          usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
          usageCalculationMode: BILLING_PERIOD
          pricingType: GRADUATED
        billingFrequency: MONTHLY
        billingType: IN_ARREARS
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
        integrationIds:
          - service: Xero
            id: '123'
            isPending: false
        customMetricParameters:
          - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
            value: '10'
        listPriceId: b4d7e884-e007-4183-8355-4771865c5100
        usageCalculationPeriod:
          frequency: MONTHLY
          interval: 1
        status: ACTIVE
      properties:
        id:
          type: string
          description: Unique Price ID, generated by Sequence on creation.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        productId:
          type: string
          description: The ID of the Product that this Price is associated with.
          example: d07037d5-3e31-4c3a-a360-e58555e2bf44
        name:
          type: string
          description: >-
            A short form description of the price, which appears as the title of
            line items on invoices.
          example: Demo Product
        currency:
          $ref: '#/components/schemas/Currency'
          description: >-
            The currency in which this price is denominated. This must be a
            valid ISO 4217 currency code, that is currently part of currencies
            supported by Sequence.
        structure:
          oneOf:
            - $ref: '#/components/schemas/GraduatedPricingStructure'
            - $ref: '#/components/schemas/VolumePricingStructure'
            - $ref: '#/components/schemas/SeatBasedPricingStructure'
            - $ref: '#/components/schemas/PackagePricingStructure'
            - $ref: '#/components/schemas/LinearPricingStructure'
            - $ref: '#/components/schemas/FixedPricingStructure'
            - $ref: '#/components/schemas/OneTimePricingStructure'
        billingFrequency:
          $ref: '#/components/schemas/BillingFrequency'
          description: The frequency with which this price is billed.
        billingType:
          $ref: '#/components/schemas/BillingType'
          description: >-
            Indicate at which point of the billing period to generate the
            invoice for this price. This can be either in-arrears (after the
            period ends), or in-advnace (at the beginning of the period).
        createdAt:
          type: string
          description: Time at which the Price was initially created, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Time at which the Price was last updated, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        integrationIds:
          type: array
          description: Alternate IDs for this Price in third-party integration systems
          example:
            - service: Xero
              id: '123'
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        customMetricParameters:
          type: array
          description: >-
            Specific parameters to influence usage calculation for this Price,
            and are only required when using custom metric. Please speak to your
            Sequence contacts for further information prior to usage.
          example:
            - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
              value: '10'
          items:
            $ref: '#/components/schemas/PriceParameter'
        listPriceId:
          type: string
          description: >-
            The list price ID, if this price variant was created from a list
            price
          example: b4d7e884-e007-4183-8355-4771865c5100
        usageCalculationPeriod:
          $ref: '#/components/schemas/UsageCalculationPeriod'
        status:
          $ref: '#/components/schemas/PriceStatus'
          description: >-
            Price status:

            - DRAFT means the price has been extracted from a contract and has
            not yet been approved. It cannot be used while it is in DRAFT.

            - ACTIVE is the default state when a price is created via API or
            dashboard.
    Phase:
      required:
        - billingScheduleId
        - createdAt
        - creditGrants
        - discounts
        - id
        - integrationIds
        - minimums
        - phasePriceMetadata
        - priceIds
        - recurrencePreference
        - startDate
      type: object
      example:
        id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        name: Onboarding
        externalContractRef: ACME-2022-MSA
        createdAt: '2022-06-28T16:47:00Z'
        billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        priceIds:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        startDate: '2022-01-01'
        endDate: '2022-06-30'
        discounts:
          - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
            restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            type: PERCENTAGE
            amount: 15
            message: 15% Discount
            separateLineItem: true
            seatDiscountType: ALL_SEATS
        minimums:
          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
            phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            amount: 100
            restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            createdAt: '2022-06-28T16:47:00Z'
            updatedAt: '2022-06-28T16:47:00Z'
        creditGrants:
          - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
            name: Monthly usage credits
            creditUnitType: CURRENCY
            currency: GBP
            amount: 100
            costOfCredit: 0
            taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
            grantRefreshFrequency: MONTHLY
            billingFrequency: MONTHLY
            rolloverMode: NONE
            restrictToPrices:
              - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
        integrationIds:
          - service: NetSuite
            id: SO-1024
            lastSynced: '2022-06-28T16:47:00Z'
            url: >-
              https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
            isPending: false
        recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
        phasePriceMetadata:
          - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            arrCalculation: INCLUDE
      properties:
        id:
          type: string
          description: Phase ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        name:
          type: string
          description: Name
          example: Onboarding
        externalContractRef:
          type: string
          description: >-
            Free-text reference to the contract this phase rolls up to in an
            external system. Phases sharing a reference belong to the same
            contract. Null means the phase rolls up to the billing schedule
            itself.
          example: ACME-2022-MSA
        createdAt:
          type: string
          description: Created at
          example: '2022-06-28T16:47:00Z'
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        priceIds:
          type: array
          description: Price IDs
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        startDate:
          type: string
          description: Start Date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          example: '2022-06-30'
        discounts:
          type: array
          description: Discounts in Phase
          example:
            - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
              restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              type: PERCENTAGE
              amount: 15
              message: 15% Discount
              separateLineItem: true
              seatDiscountType: ALL_SEATS
          items:
            $ref: '#/components/schemas/EmbeddableDiscount'
        minimums:
          type: array
          example:
            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
              billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
              phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              amount: 100
              restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              createdAt: '2022-06-28T16:47:00Z'
              updatedAt: '2022-06-28T16:47:00Z'
          items:
            $ref: '#/components/schemas/Minimum'
        creditGrants:
          type: array
          description: Credit grants in Phase
          example:
            - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
              name: Monthly usage credits
              creditUnitType: CURRENCY
              currency: GBP
              amount: 100
              costOfCredit: 0
              taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
              grantRefreshFrequency: MONTHLY
              billingFrequency: MONTHLY
              rolloverMode: NONE
              restrictToPrices:
                - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            $ref: '#/components/schemas/EmbeddableCreditGrant'
        integrationIds:
          type: array
          description: External services which this phase is linked to
          example:
            - service: NetSuite
              id: SO-1024
              lastSynced: '2022-06-28T16:47:00Z'
              url: >-
                https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        recurrencePreference:
          $ref: '#/components/schemas/PhaseRecurrencePreference'
        phasePriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            price
          example:
            - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhasePriceMetadata'
    IntegrationId:
      required:
        - id
        - isPending
        - service
      type: object
      example:
        service: Xero
        id: '123'
        isPending: false
      properties:
        service:
          $ref: '#/components/schemas/IntegrationService'
        id:
          type: string
          example: '123'
        isPending:
          type: boolean
          example: false
    AssetResponse:
      required:
        - createdAt
        - createdBy
        - fileName
        - fileSizeBytes
        - format
        - id
        - type
        - url
      type: object
      example:
        id: e007e884-5100-4183-8355-4771865cb4dd
        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
        type: IMAGE
        format: PNG
        fileName: my-image.png
        fileSizeBytes: 12345
        url: >-
          https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
        createdAt: '2022-06-28T16:47:00Z'
      properties:
        id:
          type: string
          description: Unique ID
          example: e007e884-5100-4183-8355-4771865cb4dd
        createdBy:
          type: string
          description: The Sequence user who created this asset
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        type:
          $ref: '#/components/schemas/AssetType'
          description: Either image or document
        format:
          $ref: '#/components/schemas/AssetFormat'
          description: >-
            Identifies the intended data format. Allowed formats are: jpg, jpeg,
            png, and pdf
        fileName:
          type: string
          description: Filename of the uploaded file
          example: my-image.png
        fileSizeBytes:
          type: integer
          description: Size of the uploaded file in bytes
          format: int32
          example: 12345
        url:
          type: string
          description: URL to download the asset
          example: >-
            https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
        createdAt:
          type: string
          description: Creation timestamp. Formatted as an ISO 8601 timestamp.
          example: '2022-06-28T16:47:00Z'
    PaymentProvider:
      type: string
      example: STRIPE
      enum:
        - STRIPE
        - GOCARDLESS
        - NONE
    EmbeddableDiscountRequest:
      required:
        - amount
        - message
        - separateLineItem
        - type
      type: object
      example:
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        type: PERCENTAGE
        amount: 8
        message: 8% Discount
        separateLineItem: true
        seatDiscountType: ALL_SEATS
      properties:
        restrictToPrices:
          type: array
          description: Price IDs to which this discount applies
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        type:
          $ref: '#/components/schemas/DiscountCalculationType'
          description: Whether the discount is a nominal or percentage amount
        amount:
          type: number
          description: The discount amount
          example: 8
        message:
          type: string
          description: The message to show on an invoice
          example: 8% Discount
        separateLineItem:
          type: boolean
          description: If true the discount will show as a separate line item on an invoice
          example: true
        seatDiscountType:
          $ref: '#/components/schemas/SeatDiscountType'
          description: Determines how the discount is applied to any seat-based prices
    MinimumRequest:
      required:
        - amount
      type: object
      example:
        restrictToPrices:
          - 9fe9986b-e205-42b7-a58f-42845c91f03f
        amount: 100
      properties:
        restrictToPrices:
          type: array
          description: Price IDs to which this minimum applies
          example:
            - 9fe9986b-e205-42b7-a58f-42845c91f03f
          items:
            type: string
        amount:
          type: number
          description: The minimum amount
          example: 100
    EmbeddableCreditGrantRequest:
      required:
        - amount
        - creditUnitType
        - grantRefreshFrequency
        - name
        - rolloverMode
      type: object
      example:
        name: Monthly usage credits
        creditUnitType: CURRENCY
        currency: GBP
        amount: 100
        costOfCredit: 0
        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency: MONTHLY
        billingFrequency: MONTHLY
        rolloverMode: NONE
        restrictToPrices:
          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
      properties:
        name:
          type: string
          description: Name of the credit grant.
          example: Monthly usage credits
        creditUnitType:
          $ref: '#/components/schemas/CreditUnitType'
          description: Type of the unit of credit.
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency of cash credit if creditUnitType is CURRENCY.
        amount:
          type: number
          description: Amount of units granted.
          example: 100
        costOfCredit:
          type: number
          description: Cost of credit grant.
          example: 0
        taxRateId:
          type: string
          description: Tax rate ID for the credit grant.
          example: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency:
          $ref: '#/components/schemas/GrantRefreshFrequency'
          description: How often the credit grant refreshes its balance.
        billingFrequency:
          $ref: '#/components/schemas/GrantBillingFrequency'
          description: >-
            How often the customer is charged for the credit grant. Omit to
            charge on the refresh cadence. One charge must cover whole refresh
            periods, so a quarterly refresh cannot be billed monthly. Cannot be
            changed once the grant exists: when id is set, send the stored value
            or omit it.
        rolloverMode:
          $ref: '#/components/schemas/RolloverMode'
          description: Whether unused balance carries over when the grant refreshes.
        restrictToPrices:
          type: array
          description: >-
            Price IDs the grant is consumed against. Omit or leave empty to
            apply to every price in the phase.
          example:
            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            type: string
    PhaseRecurrencePreference:
      type: string
      example: CONTINUE_FROM_PREVIOUS_PHASE
      enum:
        - CONTINUE_FROM_PREVIOUS_PHASE
        - RESET
    PhasePriceMetadata:
      required:
        - arrCalculation
        - priceId
      type: object
      example:
        priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation: INCLUDE
      properties:
        priceId:
          type: string
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation:
          $ref: '#/components/schemas/ArrCalculation'
    PhaseListPriceMetadata:
      required:
        - arrCalculation
        - listPriceId
      type: object
      example:
        listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        arrCalculation: INCLUDE
      properties:
        listPriceId:
          type: string
          example: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        arrCalculation:
          $ref: '#/components/schemas/ArrCalculation'
    Currency:
      type: string
      example: GBP
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - BGN
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - NOK
        - NZD
        - PLN
        - SAR
        - SEK
        - SGD
        - THB
        - USD
        - UYU
        - ZAR
    GraduatedPricingStructure:
      required:
        - pricingType
        - tiers
        - usageCalculationMode
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        tiers:
          - upperBound: '200'
            price: '1.00'
            fee: '50.00'
            isPricePercentage: false
          - upperBound: '400'
            price: '0.75'
            fee: '25.00'
            isPricePercentage: false
          - price: '0.50'
            fee: '0.00'
            isPricePercentage: false
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        usageCalculationMode: BILLING_PERIOD
        pricingType: GRADUATED
      properties:
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '200'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: false
            - upperBound: '400'
              price: '0.75'
              fee: '25.00'
              isPricePercentage: false
            - price: '0.50'
              fee: '0.00'
              isPricePercentage: false
          items:
            $ref: '#/components/schemas/GraduatedUsageTier'
        usageMetricId:
          type: string
          description: The usage metric associated to this pricing structure
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        usageCalculationMode:
          $ref: '#/components/schemas/UsageCalculationMode'
          description: Indicates the scope of usage calculation
        pricingType:
          $ref: '#/components/schemas/GraduatedPricingType'
          description: The type of pricing
    VolumePricingStructure:
      required:
        - pricingType
        - tiers
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        tiers:
          - upperBound: '100'
            price: '1.00'
            fee: '50.00'
            isPricePercentage: true
            maxPrice: '10'
            minPrice: '5'
          - price: '0.75'
            fee: '25.00'
            isPricePercentage: true
            maxPrice: '10'
            minPrice: '5'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType: VOLUME
      properties:
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '100'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: true
              maxPrice: '10'
              minPrice: '5'
            - price: '0.75'
              fee: '25.00'
              isPricePercentage: true
              maxPrice: '10'
              minPrice: '5'
          items:
            $ref: '#/components/schemas/VolumeUsageTier'
        usageMetricId:
          type: string
          description: The usage metric associated to this tier
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType:
          $ref: '#/components/schemas/VolumePricingType'
          description: The type of pricing
    SeatBasedPricingStructure:
      required:
        - contractedMinimumSeats
        - pricePerSeat
        - pricingType
        - prorationStrategy
        - seatMetricId
        - tiers
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        seatMetricId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        pricePerSeat: '0.25'
        prorationStrategy: USE_MAXIMUM
        contractedMinimumSeats: 10
        overagesBillingFrequency: YEARLY
        tiers:
          - upperBound: '100'
            price: '1.00'
            fee: '50.00'
          - price: '0.75'
            fee: '25.00'
        prorateFlatFees: false
        pricingType: SEAT_BASED
      properties:
        seatMetricId:
          type: string
          description: Seat metric associated to this pricing structure
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        pricePerSeat:
          type: string
          description: Price charged per seat per full billing period
          example: '0.25'
        prorationStrategy:
          $ref: '#/components/schemas/SeatProrationStrategy'
          description: >-
            The proration strategy to use when calculating the price for a seat.
            A `USE_MAXIMUM` will not prorate and charge the highest seat balance
            for the entire billing period, while a PRORATE_INCREMENTS will
            charge incremental seats from the day they're added
        contractedMinimumSeats:
          type: integer
          description: The number of contractually agreed minimum seats
          example: 10
        overagesBillingFrequency:
          $ref: '#/components/schemas/OveragesFrequency'
          description: The frequency with which to charge overages
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '100'
              price: '1.00'
              fee: '50.00'
            - price: '0.75'
              fee: '25.00'
          items:
            $ref: '#/components/schemas/SeatUsageTier'
        prorateFlatFees:
          type: boolean
          description: >-
            If set any flat fees will be pro-rated if the invoice service period
            length does not match the billing frequency
          example: false
        pricingType:
          $ref: '#/components/schemas/SeatBasedPricingType'
          description: The type of pricing
    PackagePricingStructure:
      required:
        - packageSize
        - pricePerPackage
        - pricingType
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        packageSize: '50'
        pricePerPackage: '2.00'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType: PACKAGE
      properties:
        packageSize:
          type: string
          description: The amount of usage allowed for the price in this structure
          example: '50'
        pricePerPackage:
          type: string
          description: The price charged for each package
          example: '2.00'
        usageMetricId:
          type: string
          description: The usage metric associated to this tier
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType:
          $ref: '#/components/schemas/PackagePricingType'
          description: The type of pricing
    LinearPricingStructure:
      required:
        - isPricePercentage
        - pricePerUnit
        - pricingType
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        pricePerUnit: '0.25'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        isPricePercentage: false
        pricingType: LINEAR
      properties:
        pricePerUnit:
          type: string
          description: >-
            The per unit rate to apply to usage for this product. In the case of
            percentage pricing where `isPricePercentage` is set to `true`, a
            value of 1 represents 100%.
          example: '0.25'
        usageMetricId:
          type: string
          description: Usage metric associated to this pricing structure
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: false
        pricingType:
          $ref: '#/components/schemas/LinearPricingType'
          description: The type of pricing
    FixedPricingStructure:
      required:
        - price
        - pricingType
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        price: '20.00'
        pricingType: FIXED
      properties:
        price:
          type: string
          description: A fixed amount that is charged once every billing period.
          example: '20.00'
        pricingType:
          $ref: '#/components/schemas/FixedPricingType'
          description: The type of pricing
    OneTimePricingStructure:
      required:
        - price
        - pricingType
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        price: '150.00'
        pricingType: ONE_TIME
      properties:
        price:
          type: string
          description: A fixed amount that is charged once.
          example: '150.00'
        pricingType:
          $ref: '#/components/schemas/OneTimePricingType'
          description: The type of pricing
    BillingFrequency:
      type: string
      example: MONTHLY
      enum:
        - ON_DEMAND
        - ONE_TIME
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
        - PER_EVENT
    BillingType:
      type: string
      example: IN_ARREARS
      enum:
        - IN_ARREARS
        - IN_ADVANCE
    PriceParameter:
      required:
        - parameterId
        - value
      type: object
      example:
        parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
        value: '10'
      properties:
        parameterId:
          type: string
          description: Custom metric parameter ID
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        value:
          type: string
          description: Parameter value
          example: '10'
    UsageCalculationPeriod:
      required:
        - frequency
        - interval
      type: object
      description: The period over which usage is aggregated.
      example:
        frequency: MONTHLY
        interval: 1
      properties:
        frequency:
          $ref: '#/components/schemas/UsageCalculationFrequency'
          description: Frequency determines the time period over which usage is aggregated.
        interval:
          type: integer
          description: >-
            Interval determines the time period over which usage is aggregated.
            For example, if the frequency is MONTHLY and the interval is 3, the
            usage is aggregated over 3 months before starting at 0 again.
          format: int32
          example: 1
    PriceStatus:
      type: string
      example: ACTIVE
      enum:
        - DRAFT
        - ACTIVE
    EmbeddableDiscount:
      required:
        - amount
        - id
        - message
        - separateLineItem
        - type
      type: object
      example:
        id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        type: PERCENTAGE
        amount: 15
        message: 15% Discount
        separateLineItem: true
        seatDiscountType: ALL_SEATS
      properties:
        id:
          type: string
          description: Discount ID
          example: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
        restrictToPrices:
          type: array
          description: Price IDs to which this discount applies
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        type:
          $ref: '#/components/schemas/DiscountCalculationType'
          description: Whether the discount is a nominal or percentage amount
        amount:
          type: number
          description: The discount amount
          example: 15
        message:
          type: string
          description: The message to show on an invoice
          example: 15% Discount
        separateLineItem:
          type: boolean
          description: If true the discount will show as a separate line item on an invoice
          example: true
        seatDiscountType:
          $ref: '#/components/schemas/SeatDiscountType'
          description: Determines how the discount is applied to any seat-based prices
    Minimum:
      required:
        - amount
        - billingScheduleId
        - createdAt
        - id
        - phaseId
        - restrictToPrices
        - sequenceAccountId
        - updatedAt
      type: object
      example:
        id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
        billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        amount: 100
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
      properties:
        id:
          type: string
          description: Minimum ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        sequenceAccountId:
          type: string
          description: Sequence Account ID
          example: c4602d51-0fb4-4b48-b689-6ba28f540d1e
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        phaseId:
          type: string
          description: Phase ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        amount:
          type: number
          description: Minimum amount
          example: 100
        restrictToPrices:
          type: array
          description: Price IDs the minimum is restricted to
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        createdAt:
          type: string
          description: Created at
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Updated at
          example: '2022-06-28T16:47:00Z'
    EmbeddableCreditGrant:
      required:
        - amount
        - billingFrequency
        - creditUnitType
        - grantRefreshFrequency
        - id
        - name
        - restrictToPrices
        - rolloverMode
      type: object
      example:
        id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
        name: Monthly usage credits
        creditUnitType: CURRENCY
        currency: GBP
        amount: 100
        costOfCredit: 0
        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency: MONTHLY
        billingFrequency: MONTHLY
        rolloverMode: NONE
        restrictToPrices:
          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
      properties:
        id:
          type: string
          description: Credit grant ID.
          example: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
        name:
          type: string
          description: Name of the credit grant.
          example: Monthly usage credits
        creditUnitType:
          $ref: '#/components/schemas/CreditUnitType'
          description: Type of the unit of credit.
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency of cash credit if creditUnitType is CURRENCY.
        amount:
          type: number
          description: Amount of units granted.
          example: 100
        costOfCredit:
          type: number
          description: Cost of credit grant.
          example: 0
        taxRateId:
          type: string
          description: Tax rate ID for the credit grant.
          example: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency:
          $ref: '#/components/schemas/GrantRefreshFrequency'
          description: How often the credit grant refreshes its balance.
        billingFrequency:
          $ref: '#/components/schemas/GrantBillingFrequency'
          description: How often the customer is charged for the credit grant.
        rolloverMode:
          $ref: '#/components/schemas/RolloverMode'
          description: Whether unused balance carries over when the grant refreshes.
        restrictToPrices:
          type: array
          description: Price IDs the grant is consumed against.
          example:
            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            type: string
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere
    AssetType:
      type: string
      example: IMAGE
      enum:
        - IMAGE
        - DOCUMENT
        - BINARY
    AssetFormat:
      type: string
      example: PNG
      enum:
        - JPEG
        - JPG
        - PNG
        - PDF
        - CSV
        - TXT
        - RTF
        - MD
        - XLS
        - XLSX
        - XLSM
        - DOC
        - DOCX
        - ZIP
        - ODT
        - ODS
    DiscountCalculationType:
      type: string
      example: PERCENTAGE
      enum:
        - PERCENTAGE
        - NOMINAL
    SeatDiscountType:
      type: string
      example: ALL_SEATS
      enum:
        - INCLUDED_SEATS_ONLY
        - OVERAGE_SEATS_ONLY
        - ALL_SEATS
    CreditUnitType:
      type: string
      example: CURRENCY
      enum:
        - CURRENCY
        - METRIC
    GrantRefreshFrequency:
      type: string
      example: MONTHLY
      enum:
        - NONE
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    GrantBillingFrequency:
      type: string
      example: MONTHLY
      enum:
        - ONE_TIME
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    RolloverMode:
      type: string
      example: NONE
      enum:
        - NONE
        - ON_GRANT_REFRESH
        - ON_GRANT_REFRESH_AND_PHASE
    ArrCalculation:
      type: string
      example: INCLUDE
      enum:
        - INCLUDE
        - EXCLUDE
    GraduatedUsageTier:
      required:
        - isPricePercentage
        - price
      type: object
      example:
        upperBound: '200'
        price: '1.00'
        fee: '50.00'
        isPricePercentage: false
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '200'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: false
    UsageCalculationMode:
      type: string
      example: BILLING_PERIOD
      enum:
        - BILLING_PERIOD
        - CUMULATIVE
        - PERIODIC
    GraduatedPricingType:
      type: string
      example: GRADUATED
      enum:
        - GRADUATED
    VolumeUsageTier:
      required:
        - isPricePercentage
        - price
      type: object
      example:
        upperBound: '100'
        price: '1.00'
        fee: '50.00'
        isPricePercentage: true
        maxPrice: '10'
        minPrice: '5'
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '100'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: true
        maxPrice:
          type: string
          description: Maximum Price to Charge for each Unit if Price is Percentage Based
          example: '10'
        minPrice:
          type: string
          description: Minimum Price to Charge for each Unit if Price is Percentage Based
          example: '5'
    VolumePricingType:
      type: string
      example: VOLUME
      enum:
        - VOLUME
    SeatProrationStrategy:
      type: string
      example: USE_MAXIMUM
      enum:
        - USE_MAXIMUM
        - PRORATE_INCREMENTS
        - PRORATE_ALL_CHANGES
    OveragesFrequency:
      type: string
      example: YEARLY
      enum:
        - NONE
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    SeatUsageTier:
      required:
        - price
      type: object
      example:
        upperBound: '100'
        price: '1.00'
        fee: '50.00'
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '100'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
    SeatBasedPricingType:
      type: string
      example: SEAT_BASED
      enum:
        - SEAT_BASED
    PackagePricingType:
      type: string
      example: PACKAGE
      enum:
        - PACKAGE
    LinearPricingType:
      type: string
      example: LINEAR
      enum:
        - LINEAR
    FixedPricingType:
      type: string
      example: FIXED
      enum:
        - FIXED
    OneTimePricingType:
      type: string
      example: ONE_TIME
      enum:
        - ONE_TIME
    UsageCalculationFrequency:
      type: string
      example: MONTHLY
      enum:
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY

````