Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Mage ai Mage ai Chargebee Common Quotes Schema

From Leeroopedia


Knowledge Sources
Domains Data_Integration, Chargebee, Schema
Last Updated 2026-02-09 00:00 GMT

Overview

JSON Schema definition for Chargebee quote records used by the Singer-based Chargebee source connector.

Description

This schema defines the structure and types for quote data extracted from the Chargebee API. It is loaded by the Chargebee source connector during stream discovery to validate and type-check extracted records. The schema follows the JSON Schema specification and includes properties such as id, name, po_number, customer_id, subscription_id, invoice_id, status, operation_type, vat_number, price_type, valid_till, date, total_payable, charge_on_acceptance, and sub_total. The root type is a nullable object with additionalProperties set to false, ensuring strict validation against the defined property set. Quotes represent pricing proposals in the Chargebee billing workflow.

Usage

This schema is automatically loaded by the Chargebee source connector during the discovery phase. It defines the available columns and their types for the quotes stream.

Code Reference

Source Location

  • Repository: mage-ai
  • File: mage_integrations/mage_integrations/sources/chargebee/schemas/common/quotes.json
  • Lines: 1-380

Signature

{
  "type": ["null", "object"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": ["null", "string"] },
    "name": { "type": ["null", "string"] },
    "po_number": { "type": ["null", "string"] },
    "customer_id": { "type": ["null", "string"] },
    "subscription_id": { "type": ["null", "string"] },
    "invoice_id": { "type": ["null", "string"] },
    "status": { "type": ["null", "string"] },
    "operation_type": { "type": ["null", "string"] },
    "vat_number": { "type": ["null", "string"] },
    "price_type": { "type": ["null", "string"] },
    "valid_till": { "type": ["null", "string"], "format": "date-time" },
    "date": { "type": ["null", "string"], "format": "date-time" },
    "total_payable": { "type": ["null", "integer"] },
    "charge_on_acceptance": { "type": ["null", "integer"] },
    "sub_total": { "type": ["null", "integer"] }
    // ... additional properties
  }
}

Import

# Loaded automatically by Source.load_schemas_from_folder()
# Path: mage_integrations/mage_integrations/sources/chargebee/schemas/common/quotes.json

I/O Contract

Inputs

Name Type Required Description
(none) JSON file Yes Loaded from disk by schema loader

Outputs

Name Type Description
schema dict JSON Schema object with properties, types, and format constraints

Usage Examples

import json
import os

# Schema is auto-loaded by the Chargebee source connector
# Manual loading example:
schema_path = os.path.join(
    "mage_integrations/mage_integrations/sources/chargebee/schemas/common",
    "quotes.json"
)
with open(schema_path) as f:
    schema = json.load(f)

# schema["properties"] contains field definitions
print(list(schema["properties"].keys()))

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment