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

# Complete Checkout Session from Client

> ### Intent

Runs the complete checkout session from client action.

### When to call it

Call this when your workflow reaches the point where it must complete checkout session from client.

### Access boundary

Use the credential type and authentication scheme shown for this operation.

### Successful result

A successful request returns `200`. The response schema below defines the body your integration receives.

### Operational notes

Complete a checkout session by client secret.

Orders and subscriptions will be processed.

export const RubaSocials = () => {
  if (typeof document === "undefined") {
    return null;
  }
  const inject = () => {
    const footer = document.getElementById("footer");
    if (!footer || document.getElementById("ruba-socials")) {
      return false;
    }
    const isDark = document.querySelector("html.dark") || document.querySelector('html[class*="dark"]');
    const lineColor = isDark ? "#383838" : "#e8e8ed";
    const iconColor = isDark ? "#8e8e93" : "#86868b";
    const markColor = isDark ? "#ffffff" : "#08080c";
    const hoverColor = "#0071e3";
    const div = document.createElement("div");
    div.id = "ruba-socials";
    div.style.cssText = `display:flex;align-items:center;gap:20px;padding-top:20px;margin-top:20px;border-top:1px solid ${lineColor};width:100%`;
    const logo = `<a href="https://getruba.com" style="display:inline-flex;height:24px;align-items:center;gap:8px;text-decoration:none;color:${markColor};line-height:1;"><svg width="24" height="24" viewBox="0 0 120 120" aria-hidden="true" style="display:block;flex:none;"><g transform="translate(2.5 0)"><path d="M19 25h59L65.43 47H19a4 4 0 0 1-4-4V29a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M19 73h31.57L38 95H19a4 4 0 0 1-4-4V77a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M85 25h25L70 95H45Z" fill="#007AFF"/></g></svg><span style="display:inline-flex;height:24px;align-items:center;font-weight:600;font-size:15px;color:${markColor};letter-spacing:-0.01em;line-height:1;">Ruba</span></a>`;
    const spacer = `<div style="flex:1"></div>`;
    const ig = `<a href="https://instagram.com/getruba" target="_blank" rel="noopener" aria-label="Instagram" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></svg></a>`;
    const li = `<a href="https://linkedin.com/company/getruba" target="_blank" rel="noopener" aria-label="LinkedIn" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg></a>`;
    const x = `<a href="https://x.com/getruba" target="_blank" rel="noopener" aria-label="X" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg></a>`;
    const github = `<a href="https://github.com/rubadot" target="_blank" rel="noopener" aria-label="GitHub" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .7a11.5 11.5 0 0 0-3.64 22.4c.58.1.79-.25.79-.56v-2.24c-3.22.7-3.9-1.37-3.9-1.37-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.78 1.2 1.78 1.2 1.04 1.77 2.72 1.26 3.38.96.1-.75.4-1.26.74-1.55-2.57-.3-5.27-1.29-5.27-5.69 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.47.11-3.05 0 0 .97-.31 3.16 1.18A10.96 10.96 0 0 1 12 6.09c.98 0 1.94.13 2.86.39 2.2-1.49 3.16-1.18 3.16-1.18.63 1.58.23 2.76.11 3.05.74.8 1.19 1.83 1.19 3.09 0 4.42-2.7 5.39-5.28 5.68.42.36.79 1.06.79 2.14v3.28c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .7Z"/></svg></a>`;
    div.innerHTML = logo + spacer + ig + li + x + github;
    footer.appendChild(div);
    return true;
  };
  if (!document.documentElement.dataset.rubaSocialsObserver) {
    document.documentElement.dataset.rubaSocialsObserver = "true";
    const observer = new MutationObserver(() => {
      if (!document.getElementById("ruba-socials")) {
        inject();
      }
    });
    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  }
  setTimeout(() => {
    if (!inject()) {
      const interval = setInterval(() => {
        if (inject()) {
          clearInterval(interval);
        }
      }, 500);
      setTimeout(() => clearInterval(interval), 10000);
    }
  }, 300);
  return null;
};

<link rel="stylesheet" href="/style.css" />

<RubaSocials />


## OpenAPI

````yaml post /v1/checkouts/client/{client_secret}/confirm
openapi: 3.1.0
info:
  title: Ruba API
  summary: Ruba HTTP and Webhooks API
  description: '**Details:** Read the docs at https://docs.getruba.com/api-reference.'
  version: 2026-04
servers:
  - url: https://api.getruba.com
    description: '**Details:** Production environment.'
    x-speakeasy-server-id: production
  - url: https://sandbox-api.getruba.com
    description: '**Details:** Sandbox environment.'
    x-speakeasy-server-id: sandbox
security: []
tags:
  - name: public
    description: >-
      **Details:** Endpoints shown and documented in the Ruba API documentation
      and available in our SDKs.
  - name: private
    description: >-
      **Details:** Endpoints that should appear in the schema only in
      development to generate our internal JS SDK.
paths:
  /v1/checkouts/client/{client_secret}/confirm:
    post:
      tags:
        - checkouts
        - public
      summary: Complete Checkout Session from Client
      description: >-
        ### Intent


        Runs the complete checkout session from client action.


        ### When to call it


        Call this when your workflow reaches the point where it must complete
        checkout session from client.


        ### Access boundary


        Use the credential type and authentication scheme shown for this
        operation.


        ### Successful result


        A successful request returns `200`. The response schema below defines
        the body your integration receives.


        ### Operational notes


        Complete a checkout session by client secret.


        Orders and subscriptions will be processed.
      operationId: checkouts:client_confirm
      parameters:
        - name: client_secret
          in: path
          required: true
          schema:
            type: string
            description: '**Parameter:** Checkout session client secret.'
            title: Client Secret
          description: '**Parameter:** Checkout session client secret.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutConfirmStripe'
      responses:
        '200':
          description: '**Response:** Checkout session confirmed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutPublicConfirmed'
        '400':
          description: '**Response:** Payment failed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentError'
        '403':
          description: >-
            **Response:** Checkout is expired, the customer already has an
            active subscription, or the organization is not ready to accept
            payments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutForbiddenError'
        '404':
          description: '**Response:** Checkout session could not be found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '410':
          description: '**Response:** Checkout session is expired.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpiredCheckoutError'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - oidc: []
        - pat: []
components:
  schemas:
    CheckoutConfirmStripe:
      properties:
        custom_field_data:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
              - type: string
                format: date-time
              - type: 'null'
          type: object
          title: Custom Field Data
          description: Map containing values collected through custom fields.
        product_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Product Id
          description: >-
            Identifier of the product to checkout. Must be present in the
            checkout's product list.
        product_price_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Product Price Id
          description: >-
            Identifier of the product price to checkout. Must correspond to a
            price present in the checkout's product list.
          deprecated: true
        amount:
          anyOf:
            - type: integer
              minimum: 0
              description: >-
                **Amount:** Amount in cents, before discounts and taxes. Only
                useful for custom prices, it'll be ignored for fixed and free
                prices.
            - type: 'null'
          title: Amount
        seats:
          anyOf:
            - type: integer
              maximum: 10000
              minimum: 1
            - type: 'null'
          title: Seats
          description: Count of seats for seat-based pricing.
        is_business_customer:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Business Customer
        customer_name:
          anyOf:
            - type: string
              maxLength: 256
              description: Name assigned to the customer.
              examples:
                - John Doe
            - type: 'null'
          title: Customer Name
        customer_email:
          anyOf:
            - type: string
              format: email
              description: Email used to identify and contact the customer.
            - type: 'null'
          title: Customer Email
        customer_billing_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Billing Name
        customer_billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressInput'
              description: Customer address used for billing and tax calculations.
            - type: 'null'
        customer_tax_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Tax Id
        locale:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-[0-9]{3})?$
              description: >-
                **Locale:** Locale of the customer, given as an IETF BCP 47
                language tag. Supported: language code (e.g. `en`) or language +
                region (e.g. `en-US`). If `null` or unsupported, the locale will
                default to `en`.
              examples:
                - en
                - en-US
                - fr
                - fr-CA
            - type: 'null'
          title: Locale
        discount_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Discount Code
          description: '**Discount Code:** Discount code to apply to the checkout.'
        allow_trial:
          anyOf:
            - type: boolean
              const: false
            - type: 'null'
          title: Allow Trial
          description: >-
            **Allow Trial:** Disable the trial period for the checkout session.
            It's mainly useful when the trial is blocked because the customer
            already redeemed one.
        confirmation_token_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Confirmation Token Id
          description: >-
            Identifier of the Stripe confirmation token. Required for fixed
            prices and custom prices.
      type: object
      title: CheckoutConfirmStripe
      description: Confirm a checkout session using a Stripe confirmation token.
    CheckoutPublicConfirmed:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        custom_field_data:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
              - type: string
                format: date-time
              - type: 'null'
          type: object
          title: Custom Field Data
          description: Map containing values collected through custom fields.
        payment_processor:
          $ref: '#/components/schemas/PaymentProcessor'
          description: '**Payment Processor:** Payment processor used.'
        status:
          type: string
          const: confirmed
          title: Status
        client_secret:
          type: string
          title: Client Secret
          description: >-
            **Client Secret:** Client secret used to update and complete the
            checkout session from the client.
        url:
          type: string
          title: Url
          description: '**Url:** URL where the customer can access the checkout session.'
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: '**Expires At:** Expiration date and time of the checkout session.'
        success_url:
          type: string
          title: Success Url
          description: >-
            **Success Url:** URL where the customer will be redirected after a
            successful payment.
        return_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Return Url
          description: >-
            If provided, a back button will be shown in the checkout to return
            to this URL.
        embed_origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Embed Origin
          description: >-
            **Embed Origin:** When checkout is embedded, represents the Origin
            of the page embedding the checkout. Used as a security measure to
            send messages only to the embedding page.
        amount:
          type: integer
          title: Amount
          description: '**Amount:** Amount in cents, before discounts and taxes.'
        seats:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seats
          description: >-
            **Seats:** Predefined number of seats (works with seat-based pricing
            only).
        min_seats:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Seats
          description: >-
            **Min Seats:** Minimum number of seats (works with seat-based
            pricing only).
        max_seats:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Seats
          description: >-
            **Max Seats:** Maximum number of seats (works with seat-based
            pricing only).
        discount_amount:
          type: integer
          title: Discount Amount
          description: '**Discount Amount:** Discount amount in cents.'
        net_amount:
          type: integer
          title: Net Amount
          description: '**Net Amount:** Amount in cents, after discounts but before taxes.'
        tax_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tax Amount
          description: >-
            **Tax Amount:** Sales tax amount in cents. If `null`, it means there
            is no enough information yet to calculate it.
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehavior'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the checkout. `inclusive` means
            the price includes tax, `exclusive` means tax is added on top. If
            `null`, tax is not yet calculated.
        total_amount:
          type: integer
          title: Total Amount
          description: '**Total Amount:** Amount in cents, after discounts and taxes.'
        currency:
          type: string
          title: Currency
          description: '**Currency:** Currency code of the checkout session.'
        allow_trial:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Allow Trial
          description: >-
            Indicates whether to enable the trial period for the checkout
            session. If `false`, the trial period will be disabled, even if the
            selected product has a trial configured.
        active_trial_interval:
          anyOf:
            - $ref: '#/components/schemas/TrialInterval'
            - type: 'null'
          description: >-
            **Active Trial Interval:** Interval unit of the trial period, if
            any. This value is either set from the checkout, if `trial_interval`
            is set, or from the selected product.
        active_trial_interval_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Trial Interval Count
          description: >-
            Count of interval units of the trial period, if any. This value is
            either set from the checkout, if `trial_interval_count` is set, or
            from the selected product.
        trial_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Trial End
          description: '**Trial End:** End date and time of the trial period, if any.'
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Identifier of the organization owning the checkout session.
        product_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Product Id
          description: Identifier of the product to checkout.
        product_price_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Product Price Id
          description: Identifier of the product price to checkout.
          deprecated: true
        discount_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Discount Id
          description: Identifier of the discount applied to the checkout.
        allow_discount_codes:
          type: boolean
          title: Allow Discount Codes
          description: >-
            Indicates whether to allow the customer to apply discount codes. If
            you apply a discount through `discount_id`, it'll still be applied,
            but the customer won't be able to change it.
        require_billing_address:
          type: boolean
          title: Require Billing Address
          description: >-
            Indicates whether to require the customer to fill their full billing
            address, instead of just the country. Customers in the US will
            always be required to fill their full address, regardless of this
            setting. If you preset the billing address, this setting will be
            automatically set to `true`.
        is_discount_applicable:
          type: boolean
          title: Is Discount Applicable
          description: >-
            Indicates whether the discount is applicable to the checkout.
            Typically, free and custom prices are not discountable.
        is_free_product_price:
          type: boolean
          title: Is Free Product Price
          description: >-
            Indicates whether the product price is free, regardless of
            discounts.
        is_payment_required:
          type: boolean
          title: Is Payment Required
          description: >-
            Indicates whether the checkout requires payment, e.g. in case of
            free products or discounts that cover the total amount.
        is_payment_setup_required:
          type: boolean
          title: Is Payment Setup Required
          description: >-
            Indicates whether the checkout requires setting up a payment method,
            regardless of the amount, e.g. subscriptions that have first free
            cycles.
        is_payment_form_required:
          type: boolean
          title: Is Payment Form Required
          description: >-
            Indicates whether the checkout requires a payment form, whether
            because of a payment or payment method setup.
        customer_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Customer Id
        is_business_customer:
          type: boolean
          title: Is Business Customer
          description: >-
            Indicates whether the customer is a business or an individual. If
            `true`, the customer will be required to fill their full billing
            address and billing name.
        customer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Name
          description: '**Customer Name:** Name of the customer.'
        customer_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Email
          description: Email used to identify and contact the customer.
        customer_ip_address:
          anyOf:
            - type: string
              format: ipvanyaddress
            - type: 'null'
          title: Customer Ip Address
        customer_billing_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Billing Name
        customer_billing_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
              description: Customer address used for billing and tax calculations.
            - type: 'null'
        customer_tax_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Tax Id
        locale:
          anyOf:
            - type: string
            - type: 'null'
          title: Locale
        payment_processor_metadata:
          additionalProperties:
            type: string
          type: object
          title: Payment Processor Metadata
        billing_address_fields:
          $ref: '#/components/schemas/CheckoutBillingAddressFields'
          description: >-
            **Billing Address Fields:** Determines which billing address fields
            should be disabled, optional or required in the checkout form.
        products:
          items:
            $ref: '#/components/schemas/CheckoutProduct'
          type: array
          title: Products
          description: Collection of products available to select.
        product:
          anyOf:
            - $ref: '#/components/schemas/CheckoutProduct'
            - type: 'null'
          description: '**Product:** Product selected to checkout.'
        product_price:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/LegacyRecurringProductPrice'
                - $ref: '#/components/schemas/ProductPrice'
            - type: 'null'
          title: Product Price
          description: '**Product Price:** Price of the selected product.'
          deprecated: true
        prices:
          anyOf:
            - additionalProperties:
                items:
                  oneOf:
                    - $ref: '#/components/schemas/LegacyRecurringProductPrice'
                    - $ref: '#/components/schemas/ProductPrice'
                type: array
                description: Collection of prices for this product.
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Prices
          description: '**Prices:** Mapping of product IDs to their list of prices.'
        discount:
          anyOf:
            - oneOf:
                - $ref: >-
                    #/components/schemas/CheckoutDiscountFixedOnceForeverDuration
                - $ref: '#/components/schemas/CheckoutDiscountFixedRepeatDuration'
                - $ref: >-
                    #/components/schemas/CheckoutDiscountPercentageOnceForeverDuration
                - $ref: >-
                    #/components/schemas/CheckoutDiscountPercentageRepeatDuration
            - type: 'null'
          title: Discount
        organization:
          $ref: '#/components/schemas/CheckoutOrganization'
        attached_custom_fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/AttachedCustomField'
              type: array
            - type: 'null'
          title: Attached Custom Fields
        customer_session_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Session Token
      type: object
      required:
        - id
        - created_at
        - modified_at
        - payment_processor
        - status
        - client_secret
        - url
        - expires_at
        - success_url
        - return_url
        - embed_origin
        - amount
        - discount_amount
        - net_amount
        - tax_amount
        - tax_behavior
        - total_amount
        - currency
        - allow_trial
        - active_trial_interval
        - active_trial_interval_count
        - trial_end
        - organization_id
        - product_id
        - product_price_id
        - discount_id
        - allow_discount_codes
        - require_billing_address
        - is_discount_applicable
        - is_free_product_price
        - is_payment_required
        - is_payment_setup_required
        - is_payment_form_required
        - customer_id
        - is_business_customer
        - customer_name
        - customer_email
        - customer_ip_address
        - customer_billing_name
        - customer_billing_address
        - customer_tax_id
        - payment_processor_metadata
        - billing_address_fields
        - products
        - product
        - product_price
        - prices
        - discount
        - organization
        - attached_custom_fields
        - customer_session_token
      title: CheckoutPublicConfirmed
      description: >-
        Checkout session data retrieved using the client secret after
        confirmation.


        It contains a customer session token to retrieve order information

        right after the checkout.
    PaymentError:
      properties:
        error:
          type: string
          const: PaymentError
          title: Error
          examples:
            - PaymentError
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: PaymentError
    CheckoutForbiddenError:
      anyOf:
        - $ref: '#/components/schemas/AlreadyActiveSubscriptionError'
        - $ref: '#/components/schemas/NotOpenCheckout'
        - $ref: '#/components/schemas/PaymentNotReady'
        - $ref: '#/components/schemas/TrialAlreadyRedeemed'
    ResourceNotFound:
      properties:
        error:
          type: string
          const: ResourceNotFound
          title: Error
          examples:
            - ResourceNotFound
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: ResourceNotFound
    ExpiredCheckoutError:
      properties:
        error:
          type: string
          const: ExpiredCheckoutError
          title: Error
          examples:
            - ExpiredCheckoutError
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: ExpiredCheckoutError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AddressInput:
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        country:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          title: CountryAlpha2Input
          examples:
            - US
            - SE
            - FR
          x-speakeasy-enums:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
      type: object
      required:
        - country
      title: AddressInput
    PaymentProcessor:
      type: string
      enum:
        - stripe
      title: PaymentProcessor
    TaxBehavior:
      type: string
      enum:
        - inclusive
        - exclusive
      title: TaxBehavior
    TrialInterval:
      type: string
      enum:
        - day
        - week
        - month
        - year
      title: TrialInterval
    Address:
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        country:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          title: CountryAlpha2
          examples:
            - US
            - SE
            - FR
          x-speakeasy-enums:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
      type: object
      required:
        - country
      title: Address
    CheckoutBillingAddressFields:
      properties:
        country:
          $ref: '#/components/schemas/BillingAddressFieldMode'
        state:
          $ref: '#/components/schemas/BillingAddressFieldMode'
        city:
          $ref: '#/components/schemas/BillingAddressFieldMode'
        postal_code:
          $ref: '#/components/schemas/BillingAddressFieldMode'
        line1:
          $ref: '#/components/schemas/BillingAddressFieldMode'
        line2:
          $ref: '#/components/schemas/BillingAddressFieldMode'
      type: object
      required:
        - country
        - state
        - city
        - postal_code
        - line1
        - line2
      title: CheckoutBillingAddressFields
    CheckoutProduct:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        trial_interval:
          anyOf:
            - $ref: '#/components/schemas/TrialInterval'
            - type: 'null'
          description: Unit used to measure the trial period.
        trial_interval_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trial Interval Count
          description: Length of the trial measured in the selected interval.
        name:
          type: string
          title: Name
          description: Customer-facing name assigned to the product.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Customer-facing description attached to the product.
        visibility:
          $ref: '#/components/schemas/ProductVisibility'
          description: Controls where customers can discover the product.
        recurring_interval:
          anyOf:
            - $ref: '#/components/schemas/RecurringInterval'
            - type: 'null'
          description: >-
            **Recurring Interval:** Recurring interval of the product. If
            `None`, the product is a one-time purchase.
        recurring_interval_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Recurring Interval Count
          description: >-
            Count of interval units of the subscription. If this is set to 1 the
            charge will happen every interval (e.g. every month), if set to 2 it
            will be every other month, and so on. None for one-time products.
        is_recurring:
          type: boolean
          title: Is Recurring
          description: Indicates whether the product is a subscription.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the product is archived and no longer available.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the product.
        prices:
          items:
            oneOf:
              - $ref: '#/components/schemas/LegacyRecurringProductPrice'
              - $ref: '#/components/schemas/ProductPrice'
          type: array
          title: Prices
          description: Collection of prices for this product.
        benefits:
          items:
            $ref: '#/components/schemas/BenefitPublic'
          type: array
          title: BenefitPublic
          description: Collection of benefits granted by the product.
        medias:
          items:
            $ref: '#/components/schemas/ProductMediaFileRead'
          type: array
          title: Medias
          description: Collection of medias associated to the product.
      type: object
      required:
        - id
        - created_at
        - modified_at
        - trial_interval
        - trial_interval_count
        - name
        - description
        - visibility
        - recurring_interval
        - recurring_interval_count
        - is_recurring
        - is_archived
        - organization_id
        - prices
        - benefits
        - medias
      title: CheckoutProduct
      description: Product data for a checkout session.
    LegacyRecurringProductPrice:
      oneOf:
        - $ref: '#/components/schemas/LegacyRecurringProductPriceFixed'
        - $ref: '#/components/schemas/LegacyRecurringProductPriceCustom'
      discriminator:
        propertyName: amount_type
        mapping:
          custom:
            $ref: '#/components/schemas/LegacyRecurringProductPriceCustom'
          fixed:
            $ref: '#/components/schemas/LegacyRecurringProductPriceFixed'
    ProductPrice:
      oneOf:
        - $ref: '#/components/schemas/ProductPriceFixed'
        - $ref: '#/components/schemas/ProductPriceCustom'
        - $ref: '#/components/schemas/ProductPriceSeatBased'
        - $ref: '#/components/schemas/ProductPriceMeteredUnit'
      discriminator:
        propertyName: amount_type
        mapping:
          custom:
            $ref: '#/components/schemas/ProductPriceCustom'
          fixed:
            $ref: '#/components/schemas/ProductPriceFixed'
          metered_unit:
            $ref: '#/components/schemas/ProductPriceMeteredUnit'
          seat_based:
            $ref: '#/components/schemas/ProductPriceSeatBased'
    CheckoutDiscountFixedOnceForeverDuration:
      properties:
        duration:
          $ref: '#/components/schemas/DiscountDuration'
        type:
          $ref: '#/components/schemas/DiscountType'
        amount:
          type: integer
          title: Amount
          deprecated: true
          examples:
            - 1000
        currency:
          type: string
          title: Currency
          deprecated: true
          examples:
            - usd
        amounts:
          additionalProperties:
            type: integer
          type: object
          title: Amounts
          description: >-
            **Amounts:** Map of currency to fixed amount to discount from the
            total.
          examples:
            - eur: 900
              usd: 1000
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      type: object
      required:
        - duration
        - type
        - amount
        - currency
        - amounts
        - id
        - name
        - code
      title: CheckoutDiscountFixedOnceForeverDuration
      description: Schema for a fixed amount discount that is applied once or forever.
    CheckoutDiscountFixedRepeatDuration:
      properties:
        duration:
          $ref: '#/components/schemas/DiscountDuration'
        duration_in_months:
          type: integer
          title: Duration In Months
        type:
          $ref: '#/components/schemas/DiscountType'
        amount:
          type: integer
          title: Amount
          deprecated: true
          examples:
            - 1000
        currency:
          type: string
          title: Currency
          deprecated: true
          examples:
            - usd
        amounts:
          additionalProperties:
            type: integer
          type: object
          title: Amounts
          description: >-
            **Amounts:** Map of currency to fixed amount to discount from the
            total.
          examples:
            - eur: 900
              usd: 1000
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      type: object
      required:
        - duration
        - duration_in_months
        - type
        - amount
        - currency
        - amounts
        - id
        - name
        - code
      title: CheckoutDiscountFixedRepeatDuration
      description: |-
        Schema for a fixed amount discount that is applied on every invoice
        for a certain number of months.
    CheckoutDiscountPercentageOnceForeverDuration:
      properties:
        duration:
          $ref: '#/components/schemas/DiscountDuration'
        type:
          $ref: '#/components/schemas/DiscountType'
        basis_points:
          type: integer
          title: Basis Points
          description: >-
            **Basis Points:** Discount percentage in basis points. A basis point
            is 1/100th of a percent. For example, 1000 basis points equals a 10%
            discount.
          examples:
            - 1000
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      type: object
      required:
        - duration
        - type
        - basis_points
        - id
        - name
        - code
      title: CheckoutDiscountPercentageOnceForeverDuration
      description: Schema for a percentage discount that is applied once or forever.
    CheckoutDiscountPercentageRepeatDuration:
      properties:
        duration:
          $ref: '#/components/schemas/DiscountDuration'
        duration_in_months:
          type: integer
          title: Duration In Months
        type:
          $ref: '#/components/schemas/DiscountType'
        basis_points:
          type: integer
          title: Basis Points
          description: >-
            **Basis Points:** Discount percentage in basis points. A basis point
            is 1/100th of a percent. For example, 1000 basis points equals a 10%
            discount.
          examples:
            - 1000
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      type: object
      required:
        - duration
        - duration_in_months
        - type
        - basis_points
        - id
        - name
        - code
      title: CheckoutDiscountPercentageRepeatDuration
      description: |-
        Schema for a percentage discount that is applied on every invoice
        for a certain number of months.
    CheckoutOrganization:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
          description: >-
            **Name:** Organization name shown in checkout, customer portal,
            emails etc.
        slug:
          type: string
          title: Slug
          description: >-
            **Slug:** Unique organization slug in checkout, customer portal and
            credit card statements.
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: >-
            **Avatar Url:** Avatar URL shown in checkout, customer portal,
            emails etc.
        proration_behavior:
          $ref: '#/components/schemas/SubscriptionProrationBehavior'
          description: >-
            **Proration Behavior:** Proration behavior applied when customer
            updates their subscription from the portal.
        allow_customer_updates:
          type: boolean
          title: Allow Customer Updates
          description: >-
            Indicates whether customers can update their subscriptions from the
            customer portal.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - name
        - slug
        - avatar_url
        - proration_behavior
        - allow_customer_updates
      title: CheckoutOrganization
    AttachedCustomField:
      properties:
        custom_field_id:
          type: string
          format: uuid4
          title: Custom Field Id
          description: Identifier of the custom field.
        custom_field:
          $ref: '#/components/schemas/CustomField'
          title: CustomField
        order:
          type: integer
          title: Order
          description: '**Order:** Order of the custom field in the resource.'
        required:
          type: boolean
          title: Required
          description: Indicates whether the value is required for this custom field.
      type: object
      required:
        - custom_field_id
        - custom_field
        - order
        - required
      title: AttachedCustomField
      description: Schema of a custom field attached to a resource.
    AlreadyActiveSubscriptionError:
      properties:
        error:
          type: string
          const: AlreadyActiveSubscriptionError
          title: Error
          examples:
            - AlreadyActiveSubscriptionError
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: AlreadyActiveSubscriptionError
    NotOpenCheckout:
      properties:
        error:
          type: string
          const: NotOpenCheckout
          title: Error
          examples:
            - NotOpenCheckout
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: NotOpenCheckout
    PaymentNotReady:
      properties:
        error:
          type: string
          const: PaymentNotReady
          title: Error
          examples:
            - PaymentNotReady
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: PaymentNotReady
    TrialAlreadyRedeemed:
      properties:
        error:
          type: string
          const: TrialAlreadyRedeemed
          title: Error
          examples:
            - TrialAlreadyRedeemed
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: TrialAlreadyRedeemed
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BillingAddressFieldMode:
      type: string
      enum:
        - required
        - optional
        - disabled
      title: BillingAddressFieldMode
    ProductVisibility:
      type: string
      enum:
        - draft
        - private
        - public
      title: Visibility
    RecurringInterval:
      type: string
      enum:
        - day
        - week
        - month
        - year
      title: RecurringInterval
    BenefitPublic:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          $ref: '#/components/schemas/BenefitType'
          description: '**Type:** Type of the benefit.'
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
      title: BenefitPublic
    ProductMediaFileRead:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
        name:
          type: string
          title: Name
        path:
          type: string
          title: Path
        mime_type:
          type: string
          title: Mime Type
        size:
          type: integer
          title: Size
        storage_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Storage Version
        checksum_etag:
          anyOf:
            - type: string
            - type: 'null'
          title: Checksum Etag
        checksum_sha256_base64:
          anyOf:
            - type: string
            - type: 'null'
          title: Checksum Sha256 Base64
        checksum_sha256_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: Checksum Sha256 Hex
        last_modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Modified At
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        service:
          type: string
          const: product_media
          title: Service
        is_uploaded:
          type: boolean
          title: Is Uploaded
        created_at:
          type: string
          format: date-time
          title: Created At
        size_readable:
          type: string
          title: Size Readable
          readOnly: true
        public_url:
          type: string
          title: Public Url
          readOnly: true
      type: object
      required:
        - id
        - organization_id
        - name
        - path
        - mime_type
        - size
        - storage_version
        - checksum_etag
        - checksum_sha256_base64
        - checksum_sha256_hex
        - last_modified_at
        - version
        - service
        - is_uploaded
        - created_at
        - size_readable
        - public_url
      title: ProductMediaFileRead
      description: File to be used as a product media file.
    LegacyRecurringProductPriceFixed:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: fixed
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        type:
          type: string
          const: recurring
          title: Type
          description: '**Type:** Type of the price.'
        recurring_interval:
          $ref: '#/components/schemas/RecurringInterval'
          description: '**Recurring Interval:** Recurring interval of the price.'
        price_amount:
          type: integer
          title: Price Amount
          description: '**Price Amount:** Price in cents.'
        legacy:
          type: boolean
          const: true
          title: Legacy
          readOnly: true
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - type
        - recurring_interval
        - price_amount
        - legacy
      title: LegacyRecurringProductPriceFixed
      description: >-
        A recurring price for a product, i.e. a subscription.


        **Deprecated**: The recurring interval should be set on the product
        itself.
    LegacyRecurringProductPriceCustom:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: custom
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        type:
          type: string
          const: recurring
          title: Type
          description: '**Type:** Type of the price.'
        recurring_interval:
          $ref: '#/components/schemas/RecurringInterval'
          description: '**Recurring Interval:** Recurring interval of the price.'
        minimum_amount:
          type: integer
          title: Minimum Amount
          description: >-
            **Minimum Amount:** Minimum amount the customer can pay. If 0, the
            price is 'free or pay what you want'.
        maximum_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maximum Amount
          description: '**Maximum Amount:** Maximum amount the customer can pay.'
        preset_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Preset Amount
          description: '**Preset Amount:** Initial amount shown to the customer.'
        legacy:
          type: boolean
          const: true
          title: Legacy
          readOnly: true
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - type
        - recurring_interval
        - minimum_amount
        - maximum_amount
        - preset_amount
        - legacy
      title: LegacyRecurringProductPriceCustom
      description: >-
        A pay-what-you-want recurring price for a product, i.e. a subscription.


        **Deprecated**: The recurring interval should be set on the product
        itself.
    ProductPriceFixed:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: fixed
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        price_amount:
          type: integer
          title: Price Amount
          description: '**Price Amount:** Price in cents.'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - price_amount
      title: ProductPriceFixed
      description: Object representing fixed price for a product.
    ProductPriceCustom:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: custom
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        minimum_amount:
          type: integer
          title: Minimum Amount
          description: >-
            **Minimum Amount:** Minimum amount the customer can pay. If 0, the
            price is 'free or pay what you want'.
        maximum_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maximum Amount
          description: '**Maximum Amount:** Maximum amount the customer can pay.'
        preset_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Preset Amount
          description: '**Preset Amount:** Initial amount shown to the customer.'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - minimum_amount
        - maximum_amount
        - preset_amount
      title: ProductPriceCustom
      description: Object representing pay-what-you-want price for a product.
    ProductPriceSeatBased:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: seat_based
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        seat_tiers:
          $ref: '#/components/schemas/ProductPriceSeatTiers-Output'
          description: '**Seat Tiers:** Tiered pricing based on seat quantity.'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - seat_tiers
      title: ProductPriceSeatBased
      description: Object representing seat-based price for a product.
    ProductPriceMeteredUnit:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the price.
        source:
          $ref: '#/components/schemas/ProductPriceSource'
          description: >-
            **Source:** Source of the price . `catalog` is a predefined price,
            while `ad_hoc` is a price created dynamically on a Checkout session.
        amount_type:
          type: string
          const: metered_unit
          title: Amount Type
        price_currency:
          type: string
          title: Price Currency
          description: '**Price Currency:** Currency in which the customer will be charged.'
        tax_behavior:
          anyOf:
            - $ref: '#/components/schemas/TaxBehaviorOption'
            - type: 'null'
          description: >-
            **Tax Behavior:** Tax behavior of the price. If null, it defaults to
            the organization's default tax behavior.
        is_archived:
          type: boolean
          title: Is Archived
          description: Indicates whether the price is archived and no longer available.
        product_id:
          type: string
          format: uuid4
          title: Product Id
          description: Unique identifier for the product owning the price.
        unit_amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Unit Amount
          description: '**Unit Amount:** Price per unit in cents.'
        cap_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cap Amount
          description: >-
            **Cap Amount:** Maximum amount in cents that can be charged,
            regardless of the number of units consumed.
        meter_id:
          type: string
          format: uuid4
          title: Meter Id
          description: Unique identifier for the meter associated to the price.
        meter:
          $ref: '#/components/schemas/ProductPriceMeter'
          description: '**Meter:** Meter associated to the price.'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - source
        - amount_type
        - price_currency
        - tax_behavior
        - is_archived
        - product_id
        - unit_amount
        - cap_amount
        - meter_id
        - meter
      title: ProductPriceMeteredUnit
      description: >-
        Object representing metered, usage-based, price for a product, with a
        fixed unit price.
    DiscountDuration:
      type: string
      enum:
        - once
        - forever
        - repeating
      title: DiscountDuration
    DiscountType:
      type: string
      enum:
        - fixed
        - percentage
      title: DiscountType
    SubscriptionProrationBehavior:
      type: string
      enum:
        - invoice
        - prorate
        - next_period
        - reset
      title: SubscriptionProrationBehavior
    CustomField:
      oneOf:
        - $ref: '#/components/schemas/CustomFieldText'
        - $ref: '#/components/schemas/CustomFieldNumber'
        - $ref: '#/components/schemas/CustomFieldDate'
        - $ref: '#/components/schemas/CustomFieldCheckbox'
        - $ref: '#/components/schemas/CustomFieldSelect'
      discriminator:
        propertyName: type
        mapping:
          checkbox:
            $ref: '#/components/schemas/CustomFieldCheckbox'
          date:
            $ref: '#/components/schemas/CustomFieldDate'
          number:
            $ref: '#/components/schemas/CustomFieldNumber'
          select:
            $ref: '#/components/schemas/CustomFieldSelect'
          text:
            $ref: '#/components/schemas/CustomFieldText'
    BenefitType:
      type: string
      enum:
        - custom
        - discord
        - github_repository
        - downloadables
        - license_keys
        - meter_credit
        - feature_flag
        - slack_shared_channel
      title: BenefitType
    ProductPriceSource:
      type: string
      enum:
        - catalog
        - ad_hoc
      title: ProductPriceSource
    TaxBehaviorOption:
      type: string
      enum:
        - location
        - inclusive
        - exclusive
      title: TaxBehaviorOption
    ProductPriceSeatTiers-Output:
      properties:
        seat_tier_type:
          $ref: '#/components/schemas/SeatTierType'
          description: >-
            **Seat Tier Type:** How tiers are applied. 'volume' prices all seats
            at the matching tier's rate. 'graduated' prices each tier's range
            independently.
          default: volume
        tiers:
          items:
            $ref: '#/components/schemas/ProductPriceSeatTier'
          type: array
          minItems: 1
          title: Tiers
          description: Collection of pricing tiers.
        minimum_seats:
          type: integer
          title: Minimum Seats
          description: >-
            **Minimum Seats:** Minimum number of seats required for purchase,
            derived from first tier.
          readOnly: true
        maximum_seats:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maximum Seats
          description: >-
            **Maximum Seats:** Maximum number of seats allowed for purchase,
            derived from last tier. None for unlimited.
          readOnly: true
      type: object
      required:
        - tiers
        - minimum_seats
        - maximum_seats
      title: ProductPriceSeatTiers
      description: |-
        List of pricing tiers for seat-based pricing.

        The minimum and maximum seat limits are derived from the tiers:
        - minimum_seats = first tier's min_seats
        - maximum_seats = last tier's max_seats (None for unlimited)
    ProductPriceMeter:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        name:
          type: string
          title: Name
          description: Name assigned to the meter.
        unit:
          $ref: '#/components/schemas/MeterUnit'
          description: '**Unit:** Unit of the meter.'
        custom_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Label
          description: '**Custom Label:** Label for the custom unit.'
        custom_multiplier:
          anyOf:
            - type: integer
            - type: 'null'
          title: Custom Multiplier
          description: >-
            **Custom Multiplier:** Multiplier to convert from base unit to
            display scale.
      type: object
      required:
        - id
        - name
        - unit
      title: ProductPriceMeter
      description: Object representing meter associated to a metered price.
    CustomFieldText:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        type:
          type: string
          const: text
          title: Type
        slug:
          type: string
          title: Slug
          description: '**Slug:** Storage key used for this custom field.'
        name:
          type: string
          title: Name
          description: Display name assigned to the custom field.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the custom field.
          examples:
            - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
          x-ruba-selector-widget:
            displayProperty: name
            resourceName: Organization
            resourceRoot: /v1/organizations
        properties:
          $ref: '#/components/schemas/CustomFieldTextProperties'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - metadata
        - type
        - slug
        - name
        - organization_id
        - properties
      title: CustomFieldText
      description: Schema for a custom field of type text.
    CustomFieldNumber:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        type:
          type: string
          const: number
          title: Type
        slug:
          type: string
          title: Slug
          description: '**Slug:** Storage key used for this custom field.'
        name:
          type: string
          title: Name
          description: Display name assigned to the custom field.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the custom field.
          examples:
            - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
          x-ruba-selector-widget:
            displayProperty: name
            resourceName: Organization
            resourceRoot: /v1/organizations
        properties:
          $ref: '#/components/schemas/CustomFieldNumberProperties'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - metadata
        - type
        - slug
        - name
        - organization_id
        - properties
      title: CustomFieldNumber
      description: Schema for a custom field of type number.
    CustomFieldDate:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        type:
          type: string
          const: date
          title: Type
        slug:
          type: string
          title: Slug
          description: '**Slug:** Storage key used for this custom field.'
        name:
          type: string
          title: Name
          description: Display name assigned to the custom field.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the custom field.
          examples:
            - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
          x-ruba-selector-widget:
            displayProperty: name
            resourceName: Organization
            resourceRoot: /v1/organizations
        properties:
          $ref: '#/components/schemas/CustomFieldDateProperties'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - metadata
        - type
        - slug
        - name
        - organization_id
        - properties
      title: CustomFieldDate
      description: Schema for a custom field of type date.
    CustomFieldCheckbox:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        type:
          type: string
          const: checkbox
          title: Type
        slug:
          type: string
          title: Slug
          description: '**Slug:** Storage key used for this custom field.'
        name:
          type: string
          title: Name
          description: Display name assigned to the custom field.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the custom field.
          examples:
            - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
          x-ruba-selector-widget:
            displayProperty: name
            resourceName: Organization
            resourceRoot: /v1/organizations
        properties:
          $ref: '#/components/schemas/CustomFieldCheckboxProperties'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - metadata
        - type
        - slug
        - name
        - organization_id
        - properties
      title: CustomFieldCheckbox
      description: Schema for a custom field of type checkbox.
    CustomFieldSelect:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        id:
          type: string
          format: uuid4
          title: Id
          description: The stable identifier for this record.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        type:
          type: string
          const: select
          title: Type
        slug:
          type: string
          title: Slug
          description: '**Slug:** Storage key used for this custom field.'
        name:
          type: string
          title: Name
          description: Display name assigned to the custom field.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the custom field.
          examples:
            - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
          x-ruba-selector-widget:
            displayProperty: name
            resourceName: Organization
            resourceRoot: /v1/organizations
        properties:
          $ref: '#/components/schemas/CustomFieldSelectProperties'
      type: object
      required:
        - created_at
        - modified_at
        - id
        - metadata
        - type
        - slug
        - name
        - organization_id
        - properties
      title: CustomFieldSelect
      description: Schema for a custom field of type select.
    SeatTierType:
      type: string
      enum:
        - volume
        - graduated
      title: SeatTierType
    ProductPriceSeatTier:
      properties:
        min_seats:
          type: integer
          minimum: 1
          title: Min Seats
          description: '**Min Seats:** Minimum number of seats (inclusive).'
        max_seats:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Seats
          description: >-
            **Max Seats:** Maximum number of seats (inclusive). None for
            unlimited.
        price_per_seat:
          type: integer
          minimum: 0
          title: Price Per Seat
          description: '**Price Per Seat:** Price per seat in cents for this tier.'
      type: object
      required:
        - min_seats
        - price_per_seat
      title: ProductPriceSeatTier
      description: Object representing pricing tier for seat-based pricing.
    MeterUnit:
      type: string
      enum:
        - scalar
        - token
        - custom
      title: MeterUnit
    MetadataOutputType:
      additionalProperties:
        anyOf:
          - type: string
          - type: integer
          - type: number
          - type: boolean
      type: object
    CustomFieldTextProperties:
      properties:
        form_label:
          type: string
          minLength: 1
          title: Form Label
        form_help_text:
          type: string
          minLength: 1
          title: Form Help Text
        form_placeholder:
          type: string
          minLength: 1
          title: Form Placeholder
        textarea:
          type: boolean
          title: Textarea
        min_length:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Min Length
        max_length:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Max Length
      type: object
      title: CustomFieldTextProperties
    CustomFieldNumberProperties:
      properties:
        form_label:
          type: string
          minLength: 1
          title: Form Label
        form_help_text:
          type: string
          minLength: 1
          title: Form Help Text
        form_placeholder:
          type: string
          minLength: 1
          title: Form Placeholder
        ge:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Ge
        le:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Le
      type: object
      title: CustomFieldNumberProperties
    CustomFieldDateProperties:
      properties:
        form_label:
          type: string
          minLength: 1
          title: Form Label
        form_help_text:
          type: string
          minLength: 1
          title: Form Help Text
        form_placeholder:
          type: string
          minLength: 1
          title: Form Placeholder
        ge:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Ge
        le:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Le
      type: object
      title: CustomFieldDateProperties
    CustomFieldCheckboxProperties:
      properties:
        form_label:
          type: string
          minLength: 1
          title: Form Label
        form_help_text:
          type: string
          minLength: 1
          title: Form Help Text
        form_placeholder:
          type: string
          minLength: 1
          title: Form Placeholder
      type: object
      title: CustomFieldCheckboxProperties
    CustomFieldSelectProperties:
      properties:
        form_label:
          type: string
          minLength: 1
          title: Form Label
        form_help_text:
          type: string
          minLength: 1
          title: Form Help Text
        form_placeholder:
          type: string
          minLength: 1
          title: Form Placeholder
        options:
          items:
            $ref: '#/components/schemas/CustomFieldSelectOption'
          type: array
          minItems: 1
          title: Options
      type: object
      required:
        - options
      title: CustomFieldSelectProperties
    CustomFieldSelectOption:
      properties:
        value:
          type: string
          minLength: 1
          title: Value
        label:
          type: string
          minLength: 1
          title: Label
      type: object
      required:
        - value
        - label
      title: CustomFieldSelectOption
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration
    pat:
      type: http
      description: >-
        **Authentication:** You can generate a **Personal Access Token** from
        your [settings](https://getruba.com/settings).
      scheme: bearer

````