> ## 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.

# Update product pricing

> Updates an existing pricing model for a product.



## OpenAPI

````yaml /openAPI/openapi-20240301.json patch /products/{product_id}/pricing/{pricing_id}
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /products/{product_id}/pricing/{pricing_id}:
    patch:
      tags:
        - Products
      summary: Update product pricing
      description: Updates an existing pricing model for a product.
      operationId: Update-product-pricing
      parameters:
        - name: pricing_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Pricing Id
        - name: product_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Product Id
        - name: return_existing
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            examples:
              - return_existing=True
            default: false
            title: Return Existing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProductPricingRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateProductPricingRequestSchema:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          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:
          anyOf:
            - 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'
              discriminator:
                propertyName: pricing_type
                mapping:
                  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'
            - type: 'null'
          title: Pricing Data
          description: Pricing Data
        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/ProductPricingUsageAssociationResponseSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configuration
        overage_pricing:
          anyOf:
            - $ref: >-
                #/components/schemas/UpdateProductPricingRequestSchema_Overagepricing
            - type: 'null'
          description: Overage Pricing Configuration
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/UpdateProductInBundleRequestSchema'
              type: array
            - type: 'null'
          title: Products
          description: List of Bundled Products
      type: object
      title: UpdateProductPricingRequestSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    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
    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
    UpdateProductPricingRequestSchema_Overagepricing:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          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:
          anyOf:
            - 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'
              discriminator:
                propertyName: pricing_type
                mapping:
                  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'
            - type: 'null'
          title: Pricing Data
          description: Pricing Data
        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/ProductPricingUsageAssociationResponseSchema
              type: array
            - type: 'null'
          title: Usage Report Configs
          description: Usage Report Configuration
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/UpdateProductInBundleRequestSchema'
              type: array
            - type: 'null'
          title: Products
          description: List of Bundled Products
      type: object
      title: UpdateProductPricingRequestSchema
    UpdateProductInBundleRequestSchema:
      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'
            - $ref: '#/components/schemas/UpdateProductPricingRequestSchema'
            - type: 'null'
          title: Product Pricing Data
          description: Product Pricing Data
      type: object
      required:
        - product_id
      title: UpdateProductInBundleRequestSchema
    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
    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
    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
    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
    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
  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>

````