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

# Create contract

> Creates a new contract in Zenskar. Contracts represent revenue agreements with customers and serve as the foundation for billing, invoicing, and revenue recognition.

A contract defines commercial terms including pricing models, service periods, and billing cycles. Required fields are customer_id, name, status, currency, start_date, and at least one phase—all other fields are optional.



## OpenAPI

````yaml /openAPI/openapi-20240301.json post /contract_v2
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /contract_v2:
    post:
      tags:
        - Contracts
      summary: Create contract
      description: >-
        Creates a new contract in Zenskar. Contracts represent revenue
        agreements with customers and serve as the foundation for billing,
        invoicing, and revenue recognition.


        A contract defines commercial terms including pricing models, service
        periods, and billing cycles. Required fields are customer_id, name,
        status, currency, start_date, and at least one phase—all other fields
        are optional.
      operationId: Create-contract
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractRequestSchema'
            examples:
              example_1:
                summary: Basic contract
                description: >-
                  Create a contract with just the bare minimum required fields
                  (without products). Phases are required, but products can be
                  added later.
                value:
                  customer_id: 123e4567-e89b-12d3-a456-426614174000
                  name: Annual Subscription - Acme Corp
                  status: active
                  currency: USD
                  start_date: '2025-01-01T00:00:00Z'
                  end_date: '2025-12-31T23:59:59Z'
                  phases:
                    - name: Standard Phase
                      start_date: '2025-01-01T00:00:00Z'
                      end_date: '2025-12-31T23:59:59Z'
              example_2:
                summary: Contract with product IDs
                description: >-
                  Simplest way to create a contract with products - just provide
                  product_id and pricing_id references. No need to send full
                  product/pricing objects.
                value:
                  customer_id: 123e4567-e89b-12d3-a456-426614174000
                  name: Monthly Subscription
                  status: active
                  currency: USD
                  start_date: '2025-01-01T00:00:00Z'
                  end_date: '2025-12-31T23:59:59Z'
                  phases:
                    - name: Standard Phase
                      start_date: '2025-01-01T00:00:00Z'
                      end_date: '2025-12-31T23:59:59Z'
                      pricings:
                        - product_id: c19a0ece-63c3-412b-8549-e722bc28605d
                          pricing_id: 6cd431e4-d3d4-43dc-b0c4-9c6988a6c1b3
              example_3:
                summary: Full contract with phases
                description: >-
                  Create a comprehensive contract with multiple phases and
                  custom attributes
                value:
                  customer_id: 123e4567-e89b-12d3-a456-426614174000
                  name: Enterprise Plan - Q1 2025
                  description: 12-month enterprise subscription with professional services
                  status: active
                  currency: USD
                  start_date: '2025-01-01T00:00:00Z'
                  end_date: '2025-12-31T23:59:59Z'
                  anchor_date: '2025-01-01T00:00:00Z'
                  tags:
                    - enterprise
                    - annual
                  custom_attributes:
                    sales_rep: john.doe@company.com
                    deal_id: DEAL-2025-001
                    discount_reason: strategic_partnership
                  phases:
                    - name: Trial Phase
                      description: 30-day trial period
                      start_date: '2025-01-01T00:00:00Z'
                      end_date: '2025-01-31T23:59:59Z'
                      phase_type: active
                  renewal_policy: do_not_renew
      responses:
        '200':
          description: Contract created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponseSchema'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              example:
                detail: 'Validation error: start_date must be before end_date'
        '404':
          description: Customer not found
          content:
            application/json:
              example:
                detail: >-
                  Customer with id 123e4567-e89b-12d3-a456-426614174000 not
                  found
        '422':
          description: Validation error - invalid field values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - body
                      - currency
                    msg: 'Invalid currency: XYZ'
                    type: value_error
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                detail: An unexpected error occurred
components:
  schemas:
    CreateContractRequestSchema:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: >-
            Optional contract ID to use. If not provided, one will be generated
            automatically.
        name:
          type: string
          title: Name
          description: >-
            Human-readable name for the contract. Used for identification and
            reporting purposes.
          default: Annual Subscription - Acme Corp
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Detailed description of the contract terms, scope, or special
            conditions. Displayed in contract details and reports.
        tags:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tags
          description: >-
            Optional list of tags for categorizing and filtering contracts
            (e.g., ['enterprise', 'annual', 'discounted']). Useful for reporting
            and segmentation.
        status:
          $ref: '#/components/schemas/ContractStatus'
          description: >-
            Contract status. Only 'active' and 'draft' are accepted. Other
            statuses (expired, paused) are managed via dedicated endpoints.
          default: active
        currency:
          type: string
          title: Currency
          description: >-
            Three-letter ISO 4217 currency code for all monetary amounts in this
            contract (e.g., 'USD', 'EUR', 'GBP'). Must match customer's billing
            currency or be explicitly configured.
          default: USD
        start_date:
          type: string
          format: date-time
          title: Start Date
          description: >-
            Date when the contract becomes active and billing begins. Must be in
            ISO 8601 format. Used as the basis for billing cycle calculations
            and revenue recognition.
          default: '2025-01-01T00:00:00'
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: >-
            Optional date when the contract expires. If not provided, contract
            continues indefinitely until manually terminated. Must be after
            start_date. Used for automatic expiration and renewal calculations.
        customer_id:
          type: string
          format: uuid
          title: Customer Id
          description: >-
            The unique identifier of the customer who is party to this contract.
            Customer must exist in the system before contract creation.
          default: 123e4567-e89b-12d3-a456-426614174000
        anchor_date:
          type: string
          format: date-time
          title: Anchor Date
          description: >-
            Reference date for billing cycle calculations. When set, all billing
            cycles align to this date regardless of contract start. Useful for
            ensuring consistent billing dates across multiple contracts.
        is_last_day_of_month:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Last Day Of Month
          description: >-
            When true, billing cycles always end on the last day of the month,
            adjusting for varying month lengths. Commonly used for monthly
            subscriptions billed on the last day.
        plan_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Plan Id
          description: >-
            Optional reference to a predefined plan template. When provided,
            contract inherits phases, products, and pricing from the plan.
            Useful for standardized offerings.
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: >-
            Flexible key-value store for organization-specific metadata. Can
            include fields like sales_rep, deal_id, region, or any custom data
            needed for reporting and integrations.
        phases:
          anyOf:
            - items:
                $ref: '#/components/schemas/CreateContractPhaseRequestSchema'
              type: array
            - type: 'null'
          title: Phases
          description: >-
            List of contract phases defining distinct periods with different
            terms, products, or pricing. Common use cases include trial periods,
            promotional pricing, or stepped pricing models. Phases must not
            overlap and must fall within contract date boundaries.
          default:
            - name: Standard Phase
              pricings:
                - pricing_id: 6cd431e4-d3d4-43dc-b0c4-9c6988a6c1b3
                  product_id: c19a0ece-63c3-412b-8549-e722bc28605d
        renewal_policy:
          anyOf:
            - $ref: '#/components/schemas/RenewalPolicy'
            - type: 'null'
          description: >-
            Defines contract renewal behavior. Currently only 'do_not_renew' is
            supported—contracts must be manually renewed or replaced. Additional
            renewal options coming soon.
        contract_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Link
          description: >-
            URL to external contract document, signed agreement, or related
            resource. Useful for maintaining references to legal documents
            stored in external systems.
        bill_parent_customer:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Bill Parent Customer
          description: >-
            When true and customer has a parent relationship, invoices are sent
            to the parent customer instead. Used for hierarchical billing
            scenarios like subsidiaries or franchises.
        invoice_payer_customer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Invoice Payer Customer Id
          description: >-
            Optional customer ID who will receive and pay invoices for this
            contract, if different from the contract customer. Used when one
            entity uses services but another pays for them.
        source:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Source
          description: >-
            Metadata about the originating system or process that created this
            contract. Commonly includes fields like 'system', 'opportunity_id',
            or 'contract_number' for integration tracking and audit trails.
      type: object
      required:
        - name
        - status
        - currency
        - start_date
        - customer_id
      title: CreateContractRequestSchema
    ContractResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for this contract
        name:
          type: string
          title: Name
          description: >-
            Human-readable name for the contract. Used for identification and
            reporting purposes.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Detailed description of the contract terms, scope, or special
            conditions.
        tags:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tags
          description: >-
            List of tags for categorizing and filtering contracts. Useful for
            reporting and segmentation.
        status:
          $ref: '#/components/schemas/ContractStatus'
          description: >-
            Current status of the contract (e.g., active, draft, expired,
            terminated). System automatically updates to 'expired' when end_date
            is reached.
        currency:
          type: string
          title: Currency
          description: >-
            Three-letter ISO 4217 currency code for all monetary amounts in this
            contract (e.g., 'USD', 'EUR', 'GBP').
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: >-
            Date when the contract became or will become active. Billing and
            revenue recognition calculations start from this date.
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: >-
            Date when the contract expires. Null indicates an indefinite
            contract that continues until manually terminated.
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: >-
            Organization-specific metadata stored as key-value pairs. Can
            include fields like sales_rep, deal_id, region, or any custom data
            needed for reporting and integrations.
        source:
          additionalProperties: true
          type: object
          title: Source
          description: >-
            Metadata about the originating system or process that created this
            contract. Used for integration tracking and audit trails.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            Timestamp when this contract was created in the system. Used for
            audit trails and reporting.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: >-
            Timestamp of the last modification to this contract. Updates
            whenever any field or related entity changes.
        customer_id:
          type: string
          format: uuid
          title: Customer Id
          description: Unique identifier of the customer who is party to this contract.
        anchor_date:
          type: string
          format: date-time
          title: Anchor Date
          description: >-
            Reference date for billing cycle calculations. When set, billing
            cycles align to this date regardless of contract start date.
        is_last_day_of_month:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Last Day Of Month
          description: >-
            When true, billing cycles always end on the last day of the month,
            adjusting for varying month lengths.
        plan_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Plan Id
          description: >-
            Reference to the plan template used to create this contract, if
            applicable.
        renewal_policy:
          anyOf:
            - $ref: '#/components/schemas/RenewalPolicy'
            - type: 'null'
          description: >-
            Defines contract renewal behavior. Currently only 'do_not_renew' is
            supported—contracts must be manually renewed or replaced.
          default: do_not_renew
        phases:
          anyOf:
            - items:
                $ref: '#/components/schemas/ContractPhaseResponseSchema'
              type: array
            - type: 'null'
          title: Phases
          description: >-
            List of contract phases defining distinct periods with different
            terms, products, or pricing. Sorted chronologically by start date.
          default: []
        customer:
          $ref: '#/components/schemas/CustomerResponseSchema'
          description: >-
            Complete customer details including name, contact information, and
            billing preferences. The customer who is party to this contract.
        invoice_payer_customer:
          anyOf:
            - $ref: '#/components/schemas/CustomerResponseSchema'
            - type: 'null'
          description: >-
            Customer details for the invoice payer, if different from the
            contract customer. Used when one entity uses services but another
            pays for them.
        current_phase:
          anyOf:
            - $ref: '#/components/schemas/PhaseDetails'
            - type: 'null'
          description: >-
            The contract phase that is currently active based on today's date.
            Null if no phase is active or contract hasn't started.
        contract_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Link
          description: >-
            URL to external contract document, signed agreement, or related
            resource.
        bill_parent_customer:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Bill Parent Customer
          description: >-
            When true and customer has a parent relationship, invoices are sent
            to the parent customer instead.
          default: false
        invoice_payer_customer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Invoice Payer Customer Id
          description: >-
            Customer ID who will receive and pay invoices for this contract, if
            different from the contract customer.
      type: object
      required:
        - id
        - name
        - status
        - currency
        - created_at
        - updated_at
        - customer_id
        - customer
      title: ContractResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContractStatus:
      type: string
      enum:
        - draft
        - active
        - paused
        - expired
        - disputed
      title: ContractStatus
    CreateContractPhaseRequestSchema:
      properties:
        name:
          type: string
          title: Name
          description: >-
            Human-readable name for this phase (e.g., 'Trial Period', 'Standard
            Pricing', 'Promotional Discount'). Used for identification in
            reports and UI.
          default: Standard Phase
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Detailed description of what this phase represents, including any
            special terms, conditions, or business context.
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: >-
            Date when this phase begins. Must be within contract date boundaries
            and not overlap with other phases. If not provided, inherits from
            contract start or previous phase end.
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: >-
            Date when this phase ends. Must be after start_date and within
            contract boundaries. If not provided, phase continues until contract
            end or next phase start.
        pricings:
          anyOf:
            - items:
                $ref: '#/components/schemas/CreateContractPhasePricingRequestSchema'
              type: array
            - type: 'null'
          title: Pricings
          description: >-
            List of product-pricing associations for this phase. Each entry
            links a product with its specific pricing configuration, start/end
            dates, and any phase-specific terms.
          default:
            - pricing_id: 6cd431e4-d3d4-43dc-b0c4-9c6988a6c1b3
              product_id: c19a0ece-63c3-412b-8549-e722bc28605d
        features:
          anyOf:
            - $ref: '#/components/schemas/CreateProductPricingRequestSchema'
            - type: 'null'
          description: >-
            Optional feature pricing configuration applied to all products in
            this phase. Used for phase-wide features, add-ons, or entitlements.
        source_plan_phase_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Plan Phase Id
          description: >-
            Reference to the plan phase template used to create this phase, if
            applicable. Maintains linkage for plan-based contracts.
        phase_type:
          anyOf:
            - $ref: '#/components/schemas/PhaseType'
            - type: 'null'
          description: >-
            Type of phase indicating its purpose. 'active' for standard billing
            phases, 'trial' for trial periods, 'paused' for suspended phases.
        phase_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Phase Metadata
          description: >-
            Flexible key-value store for phase-specific metadata. Can include
            campaign codes, discount reasons, or any phase-specific tracking
            data.
      type: object
      required:
        - name
      title: CreateContractPhaseRequestSchema
    RenewalPolicy:
      type: string
      enum:
        - renew_with_default_contract
        - renew_with_existing
        - do_not_renew
      title: RenewalPolicy
      description: Enum for defining the renewal policy of a contract.
    ContractPhaseResponseSchema:
      properties:
        name:
          type: string
          title: Name
          description: >-
            Human-readable name for this phase. Used for identification in
            reports and UI.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Detailed description of what this phase represents, including any
            special terms or conditions.
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: >-
            Date when this phase begins. All billing and pricing in this phase
            start from this date.
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: >-
            Date when this phase ends. Null indicates this phase continues until
            contract end or next phase start.
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for this contract phase
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when this phase was created. Used for audit trails.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: >-
            Timestamp of the last modification to this phase or its nested
            entities.
        contract_id:
          type: string
          format: uuid
          title: Contract Id
          description: Unique identifier of the parent contract this phase belongs to
        features:
          anyOf:
            - $ref: '#/components/schemas/ProductPricingResponseSchema'
            - type: 'null'
          description: >-
            Feature pricing configuration applied to all products in this phase,
            if applicable.
        pricings:
          anyOf:
            - items:
                $ref: '#/components/schemas/ContractPhasePricingResponseSchema'
              type: array
            - type: 'null'
          title: Pricings
          description: >-
            List of product-pricing associations active during this phase. Each
            defines a product, its pricing, and any phase-specific terms.
          default: []
        source_plan_phase_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Plan Phase Id
          description: >-
            Reference to the plan phase template used to create this phase, if
            applicable.
        phase_type:
          anyOf:
            - $ref: '#/components/schemas/PhaseType'
            - type: 'null'
          description: Type of phase indicating its purpose (e.g., active, trial, paused).
          default: active
        phase_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Phase Metadata
          description: >-
            Phase-specific metadata stored as key-value pairs. Can include
            campaign codes, discount reasons, or tracking data.
      type: object
      required:
        - name
        - id
        - created_at
        - updated_at
        - contract_id
      title: ContractPhaseResponseSchema
    CustomerResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Customer Id
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External Customer Id
        customer_name:
          type: string
          title: Customer Name
          description: Customer name
        custom_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Data
          description: Customer Custom Data
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressResponse'
            - type: 'null'
          description: Customer Address
        ship_to_address:
          anyOf:
            - $ref: '#/components/schemas/AddressResponse'
            - type: 'null'
          description: Customer Ship To Address
        tax_info:
          anyOf:
            - items:
                $ref: '#/components/schemas/TaxId'
              type: array
            - type: 'null'
          title: Tax Info
          description: Customer Tax Ids
          default: []
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Customer primary email address
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: Customer Tags
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: Customer Phone Number
        communications_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Communications Enabled
          description: To enable/disable communications
          default: true
        auto_charge_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Auto Charge Enabled
          description: To enable/disable auto-charge
          default: true
        business_entity_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Business Entity Id
          description: Business Entity Id
      type: object
      required:
        - id
        - external_id
        - customer_name
        - custom_data
        - address
      title: CustomerResponseSchema
      description: Create Customer Response Schema
    PhaseDetails:
      properties:
        name:
          type: string
          title: Name
          description: Contract Phase name
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: End Date
        id:
          type: string
          format: uuid
          title: Id
          description: Contract Phase ID
        phase_type:
          anyOf:
            - $ref: '#/components/schemas/PhaseType'
            - type: 'null'
          description: Phase Type
          default: active
        phase_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Phase Metadata
          description: Phase Metadata
      type: object
      required:
        - name
        - id
      title: PhaseDetails
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CreateContractPhasePricingRequestSchema:
      properties:
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External ID
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: End Date
        anchor_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Anchor Date
          description: Anchor Date
        pricing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Pricing Id
          description: Pricing ID
          default: 6cd431e4-d3d4-43dc-b0c4-9c6988a6c1b3
        product_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Id
          description: Product ID
          default: c19a0ece-63c3-412b-8549-e722bc28605d
        custom_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Data
          description: Pricing Association Metadata
        pricing:
          anyOf:
            - $ref: '#/components/schemas/CreateProductPricingRequestSchema'
            - type: 'null'
          description: Pricing for the phase
        product:
          anyOf:
            - $ref: '#/components/schemas/CreateProductRequestSchema'
            - type: 'null'
          description: Product Name
        plan_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Plan Id
          description: Plan ID - reference to the plan_v3 this pricing is associated with
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Line item description for this pricing association. Overrides
            pricing and product descriptions if provided.
      type: object
      title: CreateContractPhasePricingRequestSchema
    CreateProductPricingRequestSchema:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pricing Model Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Pricing Model Description
        pricing_data:
          oneOf:
            - $ref: '#/components/schemas/MatrixPricing'
            - $ref: '#/components/schemas/CustomTieredPricing'
            - $ref: '#/components/schemas/TwoDimensionalTieredPricing'
            - $ref: '#/components/schemas/PercentPricing'
            - $ref: '#/components/schemas/TieredPricing'
            - $ref: '#/components/schemas/TieredWithFlatFeePricing'
            - $ref: '#/components/schemas/VolumePricing'
            - $ref: '#/components/schemas/VolumeWithFlatFeePricing'
            - $ref: '#/components/schemas/StepPricing'
            - $ref: '#/components/schemas/PackagePricing'
            - $ref: '#/components/schemas/PerUnitPricing'
            - $ref: '#/components/schemas/FlatFee'
            - $ref: '#/components/schemas/FeaturesPricing'
            - $ref: '#/components/schemas/CustomPricing'
            - $ref: '#/components/schemas/BundlePricing'
          title: Pricing Data
          description: Pricing Data
          discriminator:
            propertyName: pricing_type
            mapping:
              bundle:
                $ref: '#/components/schemas/BundlePricing'
              custom_pricing:
                $ref: '#/components/schemas/CustomPricing'
              custom_tiered:
                $ref: '#/components/schemas/CustomTieredPricing'
              features:
                $ref: '#/components/schemas/FeaturesPricing'
              flat_fee:
                $ref: '#/components/schemas/FlatFee'
              matrix:
                $ref: '#/components/schemas/MatrixPricing'
              package:
                $ref: '#/components/schemas/PackagePricing'
              per_unit:
                $ref: '#/components/schemas/PerUnitPricing'
              percent:
                $ref: '#/components/schemas/PercentPricing'
              step:
                $ref: '#/components/schemas/StepPricing'
              tiered:
                $ref: '#/components/schemas/TieredPricing'
              tiered_with_flat_fee:
                $ref: '#/components/schemas/TieredWithFlatFeePricing'
              two_dimensional_tiered:
                $ref: '#/components/schemas/TwoDimensionalTieredPricing'
              volume:
                $ref: '#/components/schemas/VolumePricing'
              volume_with_flat_fee:
                $ref: '#/components/schemas/VolumeWithFlatFeePricing'
        quantity:
          anyOf:
            - $ref: '#/components/schemas/Quantity'
            - type: 'null'
          description: Quantity
        grants:
          anyOf:
            - items:
                $ref: '#/components/schemas/Grant'
              type: array
            - type: 'null'
          title: Grants
          description: Grants
        consumptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/Consumption'
              type: array
            - type: 'null'
          title: Consumptions
          description: Consumptions
        link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Id
          description: Parent Link ID
        free_units:
          anyOf:
            - items:
                $ref: '#/components/schemas/FreeUnit'
              type: array
            - type: 'null'
          title: Free Units
          description: Free Units
        discounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Discount'
              type: array
            - type: 'null'
          title: Discounts
          description: Discounts
        commitments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Commitment'
              type: array
            - type: 'null'
          title: Commitments
          description: Commitments
        taxes:
          anyOf:
            - items:
                $ref: '#/components/schemas/Taxes'
              type: array
            - type: 'null'
          title: Taxes
          description: Taxes
        payment_terms:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaymentTerms'
              type: array
            - type: 'null'
          title: Payment Terms
          description: Payment Terms
        service_fees:
          anyOf:
            - items:
                $ref: '#/components/schemas/ServiceFee'
              type: array
            - type: 'null'
          title: Service Fees
          description: Service Fees
        execution_logic:
          anyOf:
            - $ref: '#/components/schemas/ExecutionLogic'
            - type: 'null'
          description: Execution Logic
        is_recurring:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Recurring
          description: Is Recurring or not
        billing_period:
          anyOf:
            - $ref: '#/components/schemas/Period'
            - type: 'null'
          description: Billing Cadence
        add_to_catalog:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Add To Catalog
          description: Part of product catalog or not
        usage_report_configs:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ProductPricingUsageAssociationRequestSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configuration
        overage_pricing:
          anyOf:
            - $ref: >-
                #/components/schemas/CreateProductPricingRequestSchema_Overagepricing
            - type: 'null'
          description: Overage Pricing Configuration
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/CreateProductInBundleRequestSchema'
              type: array
            - type: 'null'
          title: Products
          description: Products
      type: object
      required:
        - pricing_data
      title: CreateProductPricingRequestSchema
    PhaseType:
      type: string
      enum:
        - active
        - pause
        - trial
      title: PhaseType
    ProductPricingResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Pricing Model ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pricing Model Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Pricing Model Description
        pricing_data:
          oneOf:
            - $ref: '#/components/schemas/MatrixPricing'
            - $ref: '#/components/schemas/CustomTieredPricing'
            - $ref: '#/components/schemas/TwoDimensionalTieredPricing'
            - $ref: '#/components/schemas/PercentPricing'
            - $ref: '#/components/schemas/TieredPricing'
            - $ref: '#/components/schemas/TieredWithFlatFeePricing'
            - $ref: '#/components/schemas/VolumePricing'
            - $ref: '#/components/schemas/VolumeWithFlatFeePricing'
            - $ref: '#/components/schemas/StepPricing'
            - $ref: '#/components/schemas/PackagePricing'
            - $ref: '#/components/schemas/PerUnitPricing'
            - $ref: '#/components/schemas/FlatFee'
            - $ref: '#/components/schemas/FeaturesPricing'
            - $ref: '#/components/schemas/CustomPricing'
            - $ref: '#/components/schemas/BundlePricing'
          title: Pricing Data
          description: Pricing Data
          discriminator:
            propertyName: pricing_type
            mapping:
              bundle:
                $ref: '#/components/schemas/BundlePricing'
              custom_pricing:
                $ref: '#/components/schemas/CustomPricing'
              custom_tiered:
                $ref: '#/components/schemas/CustomTieredPricing'
              features:
                $ref: '#/components/schemas/FeaturesPricing'
              flat_fee:
                $ref: '#/components/schemas/FlatFee'
              matrix:
                $ref: '#/components/schemas/MatrixPricing'
              package:
                $ref: '#/components/schemas/PackagePricing'
              per_unit:
                $ref: '#/components/schemas/PerUnitPricing'
              percent:
                $ref: '#/components/schemas/PercentPricing'
              step:
                $ref: '#/components/schemas/StepPricing'
              tiered:
                $ref: '#/components/schemas/TieredPricing'
              tiered_with_flat_fee:
                $ref: '#/components/schemas/TieredWithFlatFeePricing'
              two_dimensional_tiered:
                $ref: '#/components/schemas/TwoDimensionalTieredPricing'
              volume:
                $ref: '#/components/schemas/VolumePricing'
              volume_with_flat_fee:
                $ref: '#/components/schemas/VolumeWithFlatFeePricing'
        quantity:
          anyOf:
            - $ref: '#/components/schemas/QuantityResponse'
            - type: 'null'
          description: Quantity
        grants:
          anyOf:
            - items:
                $ref: '#/components/schemas/GrantResponse'
              type: array
            - type: 'null'
          title: Grants
          description: Grants
          default: []
        consumptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConsumptionResponse'
              type: array
            - type: 'null'
          title: Consumptions
          description: Consumptions
          default: []
        link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Id
          description: Parent Link ID
        free_units:
          anyOf:
            - items:
                $ref: '#/components/schemas/FreeUnit'
              type: array
            - type: 'null'
          title: Free Units
          description: Free Units
          default: []
        discounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Discount'
              type: array
            - type: 'null'
          title: Discounts
          description: Discounts
          default: []
        commitments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Commitment'
              type: array
            - type: 'null'
          title: Commitments
          description: Commitments
          default: []
        taxes:
          anyOf:
            - items:
                $ref: '#/components/schemas/Taxes'
              type: array
            - type: 'null'
          title: Taxes
          description: Taxes
          default: []
        payment_terms:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaymentTerms'
              type: array
            - type: 'null'
          title: Payment Terms
          description: Payment Terms
          default: []
        service_fees:
          anyOf:
            - items:
                $ref: '#/components/schemas/ServiceFee'
              type: array
            - type: 'null'
          title: Service Fees
          description: Service Fees
          default: []
        execution_logic:
          anyOf:
            - $ref: '#/components/schemas/ExecutionLogic'
            - type: 'null'
          description: Execution Logic
        is_recurring:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Recurring
          description: Is Recurring or not
        billing_period:
          anyOf:
            - $ref: '#/components/schemas/Period'
            - type: 'null'
          description: Billing Cadence
        add_to_catalog:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Add To Catalog
          description: Part of product catalog or not
          default: true
        overage_pricing:
          anyOf:
            - $ref: '#/components/schemas/ProductPricingResponseSchema_Overagepricing'
            - type: 'null'
          description: Overage Pricing Configuration
        usage_report_configs:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ProductPricingUsageAssociationResponseSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configurations associated with the pricing model
          default: []
      type: object
      required:
        - id
        - pricing_data
      title: ProductPricingResponseSchema
    ContractPhasePricingResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Contract Phase Pricing ID
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External ID
        start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Date
          description: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
          description: End Date
        anchor_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Anchor Date
          description: Anchor Date
        phase_id:
          type: string
          format: uuid
          title: Phase Id
          description: Contract Phase ID
        pricing_id:
          type: string
          format: uuid
          title: Pricing Id
          description: Pricing ID
        product_id:
          type: string
          format: uuid
          title: Product Id
          description: Product ID
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Contract Phase Pricing created at
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Contract Phase Pricing updated at
        product:
          $ref: '#/components/schemas/ProductResponseSchema'
          description: Product details
        pricing:
          $ref: '#/components/schemas/ProductBundlePricingResponseSchema'
          description: Pricing details (with overrides applied)
        custom_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Data
          description: Pricing Association Metadata
        plan_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Plan Id
          description: Plan ID - reference to the plan_v3 this pricing is associated with
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Line item description for this pricing association. Overrides
            pricing and product descriptions if provided.
        resolved_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolved Description
          description: >-
            Effective description resolved from the fallback chain: description
            > pricing.description > product.description
        is_optional:
          type: boolean
          title: Is Optional
          description: >-
            When True, customers can enable/disable this line item in self-serve
            checkout
          default: false
        is_enabled:
          items:
            $ref: '#/components/schemas/EnabledEntry'
          type: array
          title: Is Enabled
          description: Schedule of enable/disable states for this line item over time
      type: object
      required:
        - id
        - phase_id
        - pricing_id
        - product_id
        - created_at
        - updated_at
        - product
        - pricing
      title: ContractPhasePricingResponseSchema
    AddressResponse:
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
          description: Street address line 1 (e.g., building number and street name)
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
          description: Street address line 2 (e.g., apartment, suite, unit number)
        line3:
          anyOf:
            - type: string
            - type: 'null'
          title: Line3
          description: Street address line 3 (additional address information)
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City or locality name
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State, province, or region
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: Postal code or ZIP code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country name (e.g., 'United States')
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
          description: Two-letter ISO country code (e.g., 'US', 'GB')
        validation_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Validation Status
          description: Address validation status
        connector_validation:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Connector Validation
          description: Validation data from external connector
      type: object
      title: AddressResponse
      description: Address Schema
    TaxId:
      properties:
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
          description: Two-letter ISO country code for the tax ID (e.g., 'US', 'GB', 'IN')
        tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Code
          description: Type of tax identifier (e.g., 'VAT', 'GST', 'EIN')
        tax_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Id
          description: The actual tax identification number
      type: object
      title: TaxId
      description: Tax Id Schema
    CreateProductRequestSchema:
      properties:
        name:
          type: string
          title: Name
          description: Product name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Product Description
        tags:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tags
          description: Product Tags
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
          description: Product SKU
        parent_link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Link Id
          description: Parent Link ID
        tax_codes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tax Codes
          description: Product Tax Codes
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
          description: Is Active or not
        type:
          $ref: '#/components/schemas/ProductTypeV2'
          description: Product Type
        default_pricing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Default Pricing Id
          description: Default Pricing ID
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: Custom Attributes
          default: {}
      type: object
      required:
        - name
        - type
      title: Create Product Request V1
    MatrixPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        dimensions:
          items:
            $ref: '#/components/schemas/Dimension'
          type: array
          title: Dimensions
        prices:
          anyOf:
            - items:
                anyOf:
                  - type: number
                    minimum: 0
                  - type: 'null'
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Prices
        display_alias:
          items:
            type: string
          type: array
          title: Display Alias
        pricing_type:
          type: string
          const: matrix
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - dimensions
        - prices
        - display_alias
        - pricing_type
      title: MatrixPricing
    CustomTieredPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        tier_type:
          items:
            type: string
            enum:
              - package
              - per_unit
          type: array
          title: Tier Type
        flat_fee:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Flat Fee
        package_sizes:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Package Sizes
        pricing_type:
          type: string
          const: custom_tiered
          title: Pricing Type
        model_type:
          type: string
          enum:
            - tiered
            - volume
          title: Model Type
      type: object
      required:
        - unit_amount
        - up_to
        - tier_type
        - flat_fee
        - package_sizes
        - pricing_type
        - model_type
      title: CustomTieredPricing
    TwoDimensionalTieredPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                items:
                  type: number
                  minimum: 0
                type: array
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        column_up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Column Up To
        pricing_type:
          type: string
          const: two_dimensional_tiered
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - up_to
        - column_up_to
        - pricing_type
      title: TwoDimensionalTieredPricing
    PercentPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        pricing_type:
          type: string
          const: percent
          title: Pricing Type
        proration_type:
          anyOf:
            - $ref: '#/components/schemas/ProrationType'
            - type: 'null'
          description: Type of proration to be applied
          default: day_based
      type: object
      required:
        - unit_amount
        - pricing_type
      title: PercentPricing
    TieredPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        flat_fee:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Flat Fee
        pricing_type:
          type: string
          const: tiered
          title: Pricing Type
        cumulative_quantity:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Cumulative Quantity
      type: object
      required:
        - unit_amount
        - up_to
        - pricing_type
      title: TieredPricing
    TieredWithFlatFeePricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        flat_fee:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Flat Fee
        pricing_type:
          type: string
          const: tiered_with_flat_fee
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - up_to
        - pricing_type
      title: TieredWithFlatFeePricing
    VolumePricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        flat_fee:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Flat Fee
        pricing_type:
          type: string
          const: volume
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - up_to
        - pricing_type
      title: VolumePricing
    VolumeWithFlatFeePricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        flat_fee:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Flat Fee
        pricing_type:
          type: string
          const: volume_with_flat_fee
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - up_to
        - pricing_type
      title: VolumeWithFlatFeePricing
    StepPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        up_to:
          anyOf:
            - items:
                type: number
                minimum: 0
              type: array
            - $ref: '#/components/schemas/EdgeInput'
          title: Up To
        pricing_type:
          type: string
          const: step
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - up_to
        - pricing_type
      title: StepPricing
    PackagePricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        package_size:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Package Size
        pricing_type:
          type: string
          const: package
          title: Pricing Type
        quantity_is_package_count:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Quantity Is Package Count
          description: >-
            If true, the input quantity represents number of packages; if false
            (default), it represents base quantity that needs to be divided by
            package size
        proration_type:
          anyOf:
            - $ref: '#/components/schemas/ProrationType'
            - type: 'null'
          description: Type of proration to be applied
          default: day_based
      type: object
      required:
        - unit_amount
        - package_size
        - pricing_type
      title: PackagePricing
    PerUnitPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        charge_full_amount:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Charge Full Amount
          description: If true, the proration won't happen for non-metered products
          default: false
        proration_type:
          anyOf:
            - $ref: '#/components/schemas/ProrationType'
            - type: 'null'
          description: Type of proration to be applied
          default: day_based
        pricing_type:
          type: string
          const: per_unit
          title: Pricing Type
      type: object
      required:
        - unit_amount
        - pricing_type
      title: PerUnitPricing
    FlatFee:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        pricing_type:
          type: string
          const: flat_fee
          title: Pricing Type
        charge_full_amount:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Charge Full Amount
          description: Always charge full amount or not (proration is not allowed)
        proration_type:
          anyOf:
            - $ref: '#/components/schemas/ProrationType'
            - type: 'null'
          description: Type of proration to be applied
          default: day_based
      type: object
      required:
        - unit_amount
        - pricing_type
      title: FlatFee
    FeaturesPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Unit Amount
        pricing_type:
          type: string
          const: features
          title: Pricing Type
      type: object
      required:
        - pricing_type
      title: FeaturesPricing
    CustomPricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Unit Amount
        custom_pricing:
          additionalProperties: true
          type: object
          title: Custom Pricing
        pricing_type:
          type: string
          const: custom_pricing
          title: Pricing Type
        custom_py_script_location:
          type: string
          title: Custom Py Script Location
      type: object
      required:
        - custom_pricing
        - pricing_type
        - custom_py_script_location
      title: CustomPricing
    BundlePricing:
      properties:
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Unit Amount
        pricing_type:
          type: string
          const: bundle
          title: Pricing Type
      type: object
      required:
        - pricing_type
      title: BundlePricing
    Quantity:
      properties:
        type:
          $ref: '#/components/schemas/QuantityType'
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: Label
        quantity:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Quantity
          description: Quantity
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: Unit
        aggregate_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Aggregate Id
          description: Aggregate ID
        quantity_entries:
          anyOf:
            - items:
                $ref: '#/components/schemas/QuantityEntry'
              type: array
            - type: 'null'
          title: Quantity Entries
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/GrantTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
        expires_at:
          anyOf:
            - $ref: '#/components/schemas/GrantExpirationType'
            - type: 'null'
          description: Validity of the entitlement
          default: end_of_product_billing_period
        expiry_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiry Period
          description: Custom validity of the entitlement
        grant_frequency_same_as_product:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Grant Frequency Same As Product
          description: Grant frequency same as product billing period
          default: true
        grant_frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Grant Frequency
          description: How often the product is granted
        feature_option_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Option Value
          description: Selected option from the option set for boolean entitlement
        numeric_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Numeric Value
          description: Numeric value for boolean entitlement
        allow_mid_cycle_cancellation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Allow Mid Cycle Cancellation
          description: Allow mid cycle cancellation
          default: false
        constraints:
          anyOf:
            - $ref: '#/components/schemas/QuantityConstraints'
            - type: 'null'
          description: 'Plan-level quantity constraints (None or {min: float, max: float})'
      type: object
      required:
        - type
      title: Quantity
    Grant:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        entitlement_id:
          type: string
          format: uuid
          title: Entitlement Id
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/GrantTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
        type:
          $ref: '#/components/schemas/EntitlementType'
        expires_at:
          anyOf:
            - $ref: '#/components/schemas/GrantExpirationType'
            - type: 'null'
          default: end_of_product_billing_period
        expiry_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiry Period
          description: ''
        grant_frequency_same_as_product:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Grant Frequency Same As Product
          description: Grant frequency same as product billing period
          default: true
        grant_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Grant Period
          description: ''
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        start_date:
          anyOf:
            - type: string
              format: date-time
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Start Date
          description: Start date
        feature_option_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Option Value
          description: Selected option from the option set for feature type products
        numeric_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Numeric Value
          description: Numeric value to store for feature type products
      type: object
      required:
        - unit_amount
        - entitlement_id
        - type
      title: Grant
      description: >-
        TODO:

        This doesn't consider the event when it should be granted for now its
        just period

        But it will be on payment success , on contract creation, Phase start,
        or when a product is added to a contract etc

        This also needs to take into account of expiry
    Consumption:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        entitlement_id:
          type: string
          format: uuid
          title: Entitlement Id
        type:
          $ref: '#/components/schemas/EntitlementType'
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        show_additional_info:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Show Additional Info
          description: Show additional info or not
          default: false
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/ConsumptionTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
      type: object
      required:
        - entitlement_id
        - type
      title: Consumption
    FreeUnit:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
      type: object
      required:
        - unit_amount
      title: FreeUnit
    Discount:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        type:
          $ref: '#/components/schemas/DiscountType'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - type
        - unit_amount
      title: Discount
    Commitment:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        type:
          $ref: '#/components/schemas/CommitmentType'
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        charge_full_amount:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Charge Full Amount
          description: Charge full amount or not
          default: false
        skip_zero_amount:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Skip Zero Amount
          description: Skip when input to minimum commitment is zero
          default: false
      type: object
      required:
        - type
        - unit_amount
      title: Commitment
    Taxes:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Unit Amount
        type:
          $ref: '#/components/schemas/TaxType'
      type: object
      required:
        - type
      title: Taxes
    PaymentTerms:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        payment_term_type:
          $ref: '#/components/schemas/PaymentTermType'
        due_days:
          type: integer
          exclusiveMinimum: 0
          title: Due Days
        payment_term_mode:
          anyOf:
            - $ref: '#/components/schemas/PaymentTermMode'
            - type: 'null'
          description: Payment Term Mode, relative or absolute
          default: relative
        last_day_of_month:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Last Day Of Month
          description: Last day of month or not
          default: false
      type: object
      required:
        - payment_term_type
        - due_days
      title: PaymentTerms
    ServiceFee:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        type:
          $ref: '#/components/schemas/ServiceFeeType'
        unit_amount:
          type: number
          minimum: 0
          title: Unit Amount
        pricing_period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - type
        - unit_amount
      title: ServiceFee
    ExecutionLogic:
      properties:
        additional_steps:
          items:
            $ref: '#/components/schemas/ExecutionStep'
          type: array
          title: Additional Steps
          description: Additional nodes to add to the workflow
      type: object
      title: ExecutionLogic
      description: Defines custom execution logic for a pricing instance
    Period:
      properties:
        cadence:
          anyOf:
            - type: string
            - type: 'null'
          title: Cadence
          description: Cadence
        offset:
          $ref: '#/components/schemas/PeriodOffset'
          description: Offset
      type: object
      required:
        - offset
      title: Period
    ProductPricingUsageAssociationRequestSchema:
      properties:
        aggregate_id:
          type: string
          format: uuid
          title: Aggregate Id
          description: Aggregate ID
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Usage Report Configuration
          default: {}
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: Is Default or not
          default: false
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Product Pricing Usage Association ID
      type: object
      required:
        - aggregate_id
      title: ProductPricingUsageAssociationRequestSchema
    CreateProductPricingRequestSchema_Overagepricing:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pricing Model Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Pricing Model Description
        pricing_data:
          oneOf:
            - $ref: '#/components/schemas/MatrixPricing'
            - $ref: '#/components/schemas/CustomTieredPricing'
            - $ref: '#/components/schemas/TwoDimensionalTieredPricing'
            - $ref: '#/components/schemas/PercentPricing'
            - $ref: '#/components/schemas/TieredPricing'
            - $ref: '#/components/schemas/TieredWithFlatFeePricing'
            - $ref: '#/components/schemas/VolumePricing'
            - $ref: '#/components/schemas/VolumeWithFlatFeePricing'
            - $ref: '#/components/schemas/StepPricing'
            - $ref: '#/components/schemas/PackagePricing'
            - $ref: '#/components/schemas/PerUnitPricing'
            - $ref: '#/components/schemas/FlatFee'
            - $ref: '#/components/schemas/FeaturesPricing'
            - $ref: '#/components/schemas/CustomPricing'
            - $ref: '#/components/schemas/BundlePricing'
          title: Pricing Data
          description: Pricing Data
          discriminator:
            propertyName: pricing_type
            mapping:
              bundle:
                $ref: '#/components/schemas/BundlePricing'
              custom_pricing:
                $ref: '#/components/schemas/CustomPricing'
              custom_tiered:
                $ref: '#/components/schemas/CustomTieredPricing'
              features:
                $ref: '#/components/schemas/FeaturesPricing'
              flat_fee:
                $ref: '#/components/schemas/FlatFee'
              matrix:
                $ref: '#/components/schemas/MatrixPricing'
              package:
                $ref: '#/components/schemas/PackagePricing'
              per_unit:
                $ref: '#/components/schemas/PerUnitPricing'
              percent:
                $ref: '#/components/schemas/PercentPricing'
              step:
                $ref: '#/components/schemas/StepPricing'
              tiered:
                $ref: '#/components/schemas/TieredPricing'
              tiered_with_flat_fee:
                $ref: '#/components/schemas/TieredWithFlatFeePricing'
              two_dimensional_tiered:
                $ref: '#/components/schemas/TwoDimensionalTieredPricing'
              volume:
                $ref: '#/components/schemas/VolumePricing'
              volume_with_flat_fee:
                $ref: '#/components/schemas/VolumeWithFlatFeePricing'
        quantity:
          anyOf:
            - $ref: '#/components/schemas/Quantity'
            - type: 'null'
          description: Quantity
        grants:
          anyOf:
            - items:
                $ref: '#/components/schemas/Grant'
              type: array
            - type: 'null'
          title: Grants
          description: Grants
        consumptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/Consumption'
              type: array
            - type: 'null'
          title: Consumptions
          description: Consumptions
        link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Id
          description: Parent Link ID
        free_units:
          anyOf:
            - items:
                $ref: '#/components/schemas/FreeUnit'
              type: array
            - type: 'null'
          title: Free Units
          description: Free Units
        discounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Discount'
              type: array
            - type: 'null'
          title: Discounts
          description: Discounts
        commitments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Commitment'
              type: array
            - type: 'null'
          title: Commitments
          description: Commitments
        taxes:
          anyOf:
            - items:
                $ref: '#/components/schemas/Taxes'
              type: array
            - type: 'null'
          title: Taxes
          description: Taxes
        payment_terms:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaymentTerms'
              type: array
            - type: 'null'
          title: Payment Terms
          description: Payment Terms
        service_fees:
          anyOf:
            - items:
                $ref: '#/components/schemas/ServiceFee'
              type: array
            - type: 'null'
          title: Service Fees
          description: Service Fees
        execution_logic:
          anyOf:
            - $ref: '#/components/schemas/ExecutionLogic'
            - type: 'null'
          description: Execution Logic
        is_recurring:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Recurring
          description: Is Recurring or not
        billing_period:
          anyOf:
            - $ref: '#/components/schemas/Period'
            - type: 'null'
          description: Billing Cadence
        add_to_catalog:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Add To Catalog
          description: Part of product catalog or not
        usage_report_configs:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ProductPricingUsageAssociationRequestSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configuration
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/CreateProductInBundleRequestSchema'
              type: array
            - type: 'null'
          title: Products
          description: Products
      type: object
      required:
        - pricing_data
      title: CreateProductPricingRequestSchema
    CreateProductInBundleRequestSchema:
      properties:
        product_id:
          type: string
          format: uuid
          title: Product Id
          description: Product ID
        product_pricing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Pricing Id
          description: Product Pricing ID
        product_pricing_data:
          anyOf:
            - $ref: '#/components/schemas/CreateProductPricingRequestSchema'
            - type: 'null'
          description: Product Pricing Data
      type: object
      required:
        - product_id
      title: CreateProductInBundleRequestSchema
    QuantityResponse:
      properties:
        type:
          $ref: '#/components/schemas/QuantityType'
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: Label
        quantity:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Quantity
          description: Quantity
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: Unit
        aggregate_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Aggregate Id
          description: Aggregate ID
        quantity_entries:
          anyOf:
            - items:
                $ref: '#/components/schemas/QuantityEntry'
              type: array
            - type: 'null'
          title: Quantity Entries
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/GrantTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
        expires_at:
          anyOf:
            - $ref: '#/components/schemas/GrantExpirationType'
            - type: 'null'
          description: Validity of the entitlement
          default: end_of_product_billing_period
        expiry_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiry Period
          description: Custom validity of the entitlement
        grant_frequency_same_as_product:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Grant Frequency Same As Product
          description: Grant frequency same as product billing period
          default: true
        grant_frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Grant Frequency
          description: How often the product is granted
        feature_option_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Option Value
          description: Selected option from the option set for boolean entitlement
        numeric_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Numeric Value
          description: Numeric value for boolean entitlement
        allow_mid_cycle_cancellation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Allow Mid Cycle Cancellation
          description: Allow mid cycle cancellation
          default: false
        constraints:
          anyOf:
            - $ref: '#/components/schemas/QuantityConstraints'
            - type: 'null'
          description: 'Plan-level quantity constraints (None or {min: float, max: float})'
        aggregate:
          anyOf:
            - $ref: '#/components/schemas/GetAggregateResponseSchema'
            - type: 'null'
      type: object
      required:
        - type
      title: QuantityResponse
    GrantResponse:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        unit_amount:
          anyOf:
            - type: number
            - $ref: '#/components/schemas/EdgeInput'
          title: Unit Amount
        entitlement_id:
          type: string
          format: uuid
          title: Entitlement Id
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/GrantTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
        type:
          $ref: '#/components/schemas/EntitlementType'
        expires_at:
          anyOf:
            - $ref: '#/components/schemas/GrantExpirationType'
            - type: 'null'
          default: end_of_product_billing_period
        expiry_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiry Period
          description: ''
        grant_frequency_same_as_product:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Grant Frequency Same As Product
          description: Grant frequency same as product billing period
          default: true
        grant_period:
          anyOf:
            - type: string
            - type: 'null'
          title: Grant Period
          description: ''
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        period:
          anyOf:
            - $ref: '#/components/schemas/PeriodCadence'
            - type: 'null'
        start_date:
          anyOf:
            - type: string
              format: date-time
            - $ref: '#/components/schemas/EdgeInput'
            - type: 'null'
          title: Start Date
          description: Start date
        feature_option_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Option Value
          description: Selected option from the option set for feature type products
        numeric_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Numeric Value
          description: Numeric value to store for feature type products
        entitlement:
          anyOf:
            - $ref: '#/components/schemas/EntitlementResponseSchema'
            - type: 'null'
      type: object
      required:
        - unit_amount
        - entitlement_id
        - type
      title: GrantResponse
    ConsumptionResponse:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Feature ID
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Unique identifier for the feature in the pricing instance
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
          description: >-
            Priority of the feature, features get applied in ascending order of
            priority
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        entitlement_id:
          type: string
          format: uuid
          title: Entitlement Id
        type:
          $ref: '#/components/schemas/EntitlementType'
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        show_additional_info:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Show Additional Info
          description: Show additional info or not
          default: false
        trigger_event:
          anyOf:
            - $ref: '#/components/schemas/ConsumptionTriggerEvent'
            - type: 'null'
          description: ''
          default: invoice_approval
        entitlement:
          anyOf:
            - $ref: '#/components/schemas/EntitlementResponseSchema'
            - type: 'null'
      type: object
      required:
        - entitlement_id
        - type
      title: ConsumptionResponse
    ProductPricingResponseSchema_Overagepricing:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Pricing Model ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pricing Model Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Pricing Model Description
        pricing_data:
          oneOf:
            - $ref: '#/components/schemas/MatrixPricing'
            - $ref: '#/components/schemas/CustomTieredPricing'
            - $ref: '#/components/schemas/TwoDimensionalTieredPricing'
            - $ref: '#/components/schemas/PercentPricing'
            - $ref: '#/components/schemas/TieredPricing'
            - $ref: '#/components/schemas/TieredWithFlatFeePricing'
            - $ref: '#/components/schemas/VolumePricing'
            - $ref: '#/components/schemas/VolumeWithFlatFeePricing'
            - $ref: '#/components/schemas/StepPricing'
            - $ref: '#/components/schemas/PackagePricing'
            - $ref: '#/components/schemas/PerUnitPricing'
            - $ref: '#/components/schemas/FlatFee'
            - $ref: '#/components/schemas/FeaturesPricing'
            - $ref: '#/components/schemas/CustomPricing'
            - $ref: '#/components/schemas/BundlePricing'
          title: Pricing Data
          description: Pricing Data
          discriminator:
            propertyName: pricing_type
            mapping:
              bundle:
                $ref: '#/components/schemas/BundlePricing'
              custom_pricing:
                $ref: '#/components/schemas/CustomPricing'
              custom_tiered:
                $ref: '#/components/schemas/CustomTieredPricing'
              features:
                $ref: '#/components/schemas/FeaturesPricing'
              flat_fee:
                $ref: '#/components/schemas/FlatFee'
              matrix:
                $ref: '#/components/schemas/MatrixPricing'
              package:
                $ref: '#/components/schemas/PackagePricing'
              per_unit:
                $ref: '#/components/schemas/PerUnitPricing'
              percent:
                $ref: '#/components/schemas/PercentPricing'
              step:
                $ref: '#/components/schemas/StepPricing'
              tiered:
                $ref: '#/components/schemas/TieredPricing'
              tiered_with_flat_fee:
                $ref: '#/components/schemas/TieredWithFlatFeePricing'
              two_dimensional_tiered:
                $ref: '#/components/schemas/TwoDimensionalTieredPricing'
              volume:
                $ref: '#/components/schemas/VolumePricing'
              volume_with_flat_fee:
                $ref: '#/components/schemas/VolumeWithFlatFeePricing'
        quantity:
          anyOf:
            - $ref: '#/components/schemas/QuantityResponse'
            - type: 'null'
          description: Quantity
        grants:
          anyOf:
            - items:
                $ref: '#/components/schemas/GrantResponse'
              type: array
            - type: 'null'
          title: Grants
          description: Grants
          default: []
        consumptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConsumptionResponse'
              type: array
            - type: 'null'
          title: Consumptions
          description: Consumptions
          default: []
        link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Id
          description: Parent Link ID
        free_units:
          anyOf:
            - items:
                $ref: '#/components/schemas/FreeUnit'
              type: array
            - type: 'null'
          title: Free Units
          description: Free Units
          default: []
        discounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Discount'
              type: array
            - type: 'null'
          title: Discounts
          description: Discounts
          default: []
        commitments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Commitment'
              type: array
            - type: 'null'
          title: Commitments
          description: Commitments
          default: []
        taxes:
          anyOf:
            - items:
                $ref: '#/components/schemas/Taxes'
              type: array
            - type: 'null'
          title: Taxes
          description: Taxes
          default: []
        payment_terms:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaymentTerms'
              type: array
            - type: 'null'
          title: Payment Terms
          description: Payment Terms
          default: []
        service_fees:
          anyOf:
            - items:
                $ref: '#/components/schemas/ServiceFee'
              type: array
            - type: 'null'
          title: Service Fees
          description: Service Fees
          default: []
        execution_logic:
          anyOf:
            - $ref: '#/components/schemas/ExecutionLogic'
            - type: 'null'
          description: Execution Logic
        is_recurring:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Recurring
          description: Is Recurring or not
        billing_period:
          anyOf:
            - $ref: '#/components/schemas/Period'
            - type: 'null'
          description: Billing Cadence
        add_to_catalog:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Add To Catalog
          description: Part of product catalog or not
          default: true
        usage_report_configs:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ProductPricingUsageAssociationResponseSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configurations associated with the pricing model
          default: []
      type: object
      required:
        - id
        - pricing_data
      title: ProductPricingResponseSchema
    ProductPricingUsageAssociationResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Product Pricing Usage Association ID
        aggregate_id:
          type: string
          format: uuid
          title: Aggregate Id
          description: Aggregate ID
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Usage Report Configuration
          default: {}
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: Is Default or not
          default: false
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Updated At
        aggregate:
          anyOf:
            - $ref: '#/components/schemas/GetAggregateResponseSchema'
            - type: 'null'
          description: Aggregate
      type: object
      required:
        - id
        - aggregate_id
      title: ProductPricingUsageAssociationResponseSchema
    ProductResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Product ID
        name:
          type: string
          title: Name
          description: Product name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Product Description
        tags:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tags
          description: Product Tags
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
          description: Product SKU
        parent_link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Link Id
          description: Parent Link ID
        tax_codes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tax Codes
          description: Product Tax Codes
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
          description: Is Active or not
        type:
          $ref: '#/components/schemas/ProductTypeV2'
          description: Product Type
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Updated At
        default_pricing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Default Pricing Id
          description: Default Pricing ID
        custom_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Attributes
          description: Custom Attributes
          default: {}
        product_category:
          anyOf:
            - $ref: '#/components/schemas/ProductCategory'
            - type: 'null'
          description: Product Category
        product_type:
          anyOf:
            - $ref: '#/components/schemas/ProductType'
            - type: 'null'
          description: Product Type
        product_sub_type:
          anyOf:
            - $ref: '#/components/schemas/ProductSubType'
            - type: 'null'
          description: Product Sub Type
        track_usage:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Track Usage
          description: Track Usage or not
        enum_values:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum Values
          description: Enum Values
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: Unit
        entitlements:
          anyOf:
            - items:
                $ref: '#/components/schemas/EntitlementResponseSchema'
              type: array
            - type: 'null'
          title: Entitlements
          description: Entitlement
      type: object
      required:
        - id
        - name
        - type
      title: ProductResponseSchema
    ProductBundlePricingResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Pricing Model ID
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Pricing Model Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Pricing Model Description
        pricing_data:
          oneOf:
            - $ref: '#/components/schemas/MatrixPricing'
            - $ref: '#/components/schemas/CustomTieredPricing'
            - $ref: '#/components/schemas/TwoDimensionalTieredPricing'
            - $ref: '#/components/schemas/PercentPricing'
            - $ref: '#/components/schemas/TieredPricing'
            - $ref: '#/components/schemas/TieredWithFlatFeePricing'
            - $ref: '#/components/schemas/VolumePricing'
            - $ref: '#/components/schemas/VolumeWithFlatFeePricing'
            - $ref: '#/components/schemas/StepPricing'
            - $ref: '#/components/schemas/PackagePricing'
            - $ref: '#/components/schemas/PerUnitPricing'
            - $ref: '#/components/schemas/FlatFee'
            - $ref: '#/components/schemas/FeaturesPricing'
            - $ref: '#/components/schemas/CustomPricing'
            - $ref: '#/components/schemas/BundlePricing'
          title: Pricing Data
          description: Pricing Data
          discriminator:
            propertyName: pricing_type
            mapping:
              bundle:
                $ref: '#/components/schemas/BundlePricing'
              custom_pricing:
                $ref: '#/components/schemas/CustomPricing'
              custom_tiered:
                $ref: '#/components/schemas/CustomTieredPricing'
              features:
                $ref: '#/components/schemas/FeaturesPricing'
              flat_fee:
                $ref: '#/components/schemas/FlatFee'
              matrix:
                $ref: '#/components/schemas/MatrixPricing'
              package:
                $ref: '#/components/schemas/PackagePricing'
              per_unit:
                $ref: '#/components/schemas/PerUnitPricing'
              percent:
                $ref: '#/components/schemas/PercentPricing'
              step:
                $ref: '#/components/schemas/StepPricing'
              tiered:
                $ref: '#/components/schemas/TieredPricing'
              tiered_with_flat_fee:
                $ref: '#/components/schemas/TieredWithFlatFeePricing'
              two_dimensional_tiered:
                $ref: '#/components/schemas/TwoDimensionalTieredPricing'
              volume:
                $ref: '#/components/schemas/VolumePricing'
              volume_with_flat_fee:
                $ref: '#/components/schemas/VolumeWithFlatFeePricing'
        quantity:
          anyOf:
            - $ref: '#/components/schemas/QuantityResponse'
            - type: 'null'
          description: Quantity
        grants:
          anyOf:
            - items:
                $ref: '#/components/schemas/GrantResponse'
              type: array
            - type: 'null'
          title: Grants
          description: Grants
          default: []
        consumptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConsumptionResponse'
              type: array
            - type: 'null'
          title: Consumptions
          description: Consumptions
          default: []
        link_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Id
          description: Parent Link ID
        free_units:
          anyOf:
            - items:
                $ref: '#/components/schemas/FreeUnit'
              type: array
            - type: 'null'
          title: Free Units
          description: Free Units
          default: []
        discounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Discount'
              type: array
            - type: 'null'
          title: Discounts
          description: Discounts
          default: []
        commitments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Commitment'
              type: array
            - type: 'null'
          title: Commitments
          description: Commitments
          default: []
        taxes:
          anyOf:
            - items:
                $ref: '#/components/schemas/Taxes'
              type: array
            - type: 'null'
          title: Taxes
          description: Taxes
          default: []
        payment_terms:
          anyOf:
            - items:
                $ref: '#/components/schemas/PaymentTerms'
              type: array
            - type: 'null'
          title: Payment Terms
          description: Payment Terms
          default: []
        service_fees:
          anyOf:
            - items:
                $ref: '#/components/schemas/ServiceFee'
              type: array
            - type: 'null'
          title: Service Fees
          description: Service Fees
          default: []
        execution_logic:
          anyOf:
            - $ref: '#/components/schemas/ExecutionLogic'
            - type: 'null'
          description: Execution Logic
        is_recurring:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Recurring
          description: Is Recurring or not
        billing_period:
          anyOf:
            - $ref: '#/components/schemas/Period'
            - type: 'null'
          description: Billing Cadence
        add_to_catalog:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Add To Catalog
          description: Part of product catalog or not
          default: true
        overage_pricing:
          anyOf:
            - $ref: '#/components/schemas/ProductPricingResponseSchema'
            - type: 'null'
          description: Overage Pricing Configuration
        usage_report_configs:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ProductPricingUsageAssociationResponseSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configurations associated with the pricing model
          default: []
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProductInBundleResponseSchema'
              type: array
            - type: 'null'
          title: Products
          description: List of Bundled Products
      type: object
      required:
        - id
        - pricing_data
      title: ProductBundlePricingResponseSchema
    EnabledEntry:
      properties:
        value:
          type: boolean
          title: Value
          description: Whether the line item is enabled (True) or disabled (False)
        effective_from:
          type: string
          format: date
          title: Effective From
          description: Date when this state becomes effective
      type: object
      required:
        - value
        - effective_from
      title: EnabledEntry
      description: >-
        Entry for tracking enable/disable state over time.


        Used internally by self-serve checkout to track when a customer
        enables/disables

        optional products. This schema is not exposed in public API
        documentation.


        Attributes:
            value: Whether the line item is enabled (True) or disabled (False)
            effective_from: Date when this enable/disable state becomes effective (required)
    ProductTypeV2:
      type: string
      enum:
        - product
        - group
      title: ProductTypeV2
    PeriodCadence:
      properties:
        cadence:
          anyOf:
            - type: string
            - type: 'null'
          title: Cadence
          description: Cadence
      type: object
      title: PeriodCadence
    EdgeInput:
      properties:
        step_name:
          type: string
          title: Step Name
          description: Step name
        output_field:
          type: string
          title: Output Field
          description: Output field
      type: object
      required:
        - step_name
        - output_field
      title: EdgeInput
      description: Represents an input that comes from another node's output
    Dimension:
      properties:
        name:
          type: string
          title: Name
        column_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Column Name
      type: object
      required:
        - name
      title: Dimension
    ProrationType:
      type: string
      enum:
        - day_based
        - cadence_based
      title: ProrationType
    QuantityType:
      type: string
      enum:
        - metered
        - fixed
      title: QuantityType
    QuantityEntry:
      properties:
        value:
          anyOf:
            - type: number
            - type: string
          title: Value
        effective_from:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Effective From
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - value
      title: QuantityEntry
    GrantTriggerEvent:
      type: string
      enum:
        - payment_success
        - invoice_creation
        - invoice_approval
      title: GrantTriggerEvent
    GrantExpirationType:
      type: string
      enum:
        - never
        - end_of_contract_date
        - end_of_product_date
        - end_of_phase_date
        - end_of_product_billing_period
        - custom
      title: GrantExpirationType
    QuantityConstraints:
      properties:
        min:
          type: number
          minimum: 0
          title: Min
          description: Minimum quantity (required)
        max:
          type: number
          minimum: 0
          title: Max
          description: Maximum quantity (required)
      type: object
      required:
        - min
        - max
      title: QuantityConstraints
      description: |-
        Quantity constraints for plan-level quantity configuration

        Both min and max are required when constraints are provided.
        The constraints object itself is optional on Quantity, but when present,
        both fields must have values.

        Attributes:
            min: Minimum allowed quantity (required, >= 0)
            max: Maximum allowed quantity (required, >= 0, must be >= min)
    EntitlementType:
      type: string
      enum:
        - Feature
        - Quantity
        - Credits
      title: EntitlementType
    ConsumptionTriggerEvent:
      type: string
      enum:
        - invoice_approval
        - invoice_creation
        - monitoring
      title: ConsumptionTriggerEvent
    DiscountType:
      type: string
      enum:
        - fixed
        - percent
        - quantity
      title: DiscountType
    CommitmentType:
      type: string
      enum:
        - minimum_spend
        - maximum_spend
      title: CommitmentType
    TaxType:
      type: string
      enum:
        - manual
        - avalara
      title: TaxType
    PaymentTermType:
      type: string
      enum:
        - on_approval
        - on_creation
      title: PaymentTermType
    PaymentTermMode:
      type: string
      enum:
        - relative
        - absolute
      title: PaymentTermMode
    ServiceFeeType:
      type: string
      enum:
        - fixed
        - percent
      title: ServiceFeeType
    ExecutionStep:
      properties:
        node_type:
          type: string
          title: Node Type
          description: Node type
        inputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Inputs
          description: Additional inputs for the node
        step_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Step Name
          description: Step name
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Step ID
      type: object
      required:
        - node_type
      title: ExecutionStep
      description: Represents a custom execution step to be added to the workflow
    PeriodOffset:
      type: string
      enum:
        - prepaid
        - postpaid
      title: PeriodOffset
    GetAggregateResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: aggregate Id
        name:
          type: string
          title: Name
          description: name of the aggregate
        dataschema:
          type: string
          title: Dataschema
          description: data schema of aggregate
        aggregation_query:
          type: string
          title: Aggregation Query
          description: aggregate query
        cust_agg_query:
          type: string
          title: Cust Agg Query
          description: customer aggregate query
        visual_query_builder:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Visual Query Builder
          description: visual query builder
        datasource:
          type: string
          format: uuid
          title: Datasource
          description: data source uuid
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Created_at
      type: object
      required:
        - id
        - name
        - dataschema
        - aggregation_query
        - cust_agg_query
        - visual_query_builder
        - datasource
      title: GetAggregateResponseSchema
      description: Aggregate Response Schema
    EntitlementResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Entitlement Id
        name:
          type: string
          title: Name
          description: Entitlement name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Entitlement Description
        entitlement_type:
          anyOf:
            - $ref: '#/components/schemas/EntitlementType'
            - type: 'null'
          description: Entitlement Type
        units:
          anyOf:
            - type: string
            - type: 'null'
          title: Units
          description: Entitlement Units
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
          description: Entitlement is active
          default: true
        product_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Id
          description: Product ID
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: created time
      type: object
      required:
        - id
        - name
      title: EntitlementResponseSchema
      description: Create Entitlement Response Schema
    ProductCategory:
      type: string
      enum:
        - group
        - standalone
        - bundle
      title: ProductCategory
    ProductType:
      type: string
      enum:
        - time_dependent
        - time_independent
      title: ProductType
    ProductSubType:
      type: string
      enum:
        - quantity
        - boolean
        - credits
      title: ProductSubType
    ProductInBundleResponseSchema:
      properties:
        product:
          $ref: '#/components/schemas/ProductResponseSchema'
          description: Product
        pricing_model:
          $ref: '#/components/schemas/ProductPricingResponseSchema'
          description: Pricing Model
      type: object
      required:
        - product
        - pricing_model
      title: ProductInBundleResponseSchema
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````