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 Item Model Item Prices Schema

From Leeroopedia


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

Overview

JSON Schema definition for Chargebee item price records under the item model, used by the Singer-based Chargebee source connector.

Description

This schema defines the structure and types for item price data extracted from the Chargebee API when using the item-based billing model. 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, channel, item_family_id, item_id, description, status, external_name, pricing_model, price, price_in_decimal, period, and currency_code. The root type is a nullable object. Item prices represent the pricing configuration for individual items in the Chargebee item-based billing model, supporting various pricing models and currency configurations.

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 item_prices stream when configured for the item billing model.

Code Reference

Source Location

  • Repository: mage-ai
  • File: mage_integrations/mage_integrations/sources/chargebee/schemas/item_model/item_prices.json
  • Lines: 1-342

Signature

{
  "type": ["null", "object"],
  "properties": {
    "id": { "type": ["null", "string"] },
    "name": { "type": ["null", "string"] },
    "channel": { "type": ["null", "string"] },
    "item_family_id": { "type": ["null", "string"] },
    "item_id": { "type": ["null", "string"] },
    "description": { "type": ["null", "string"] },
    "status": { "type": ["null", "string"] },
    "external_name": { "type": ["null", "string"] },
    "pricing_model": { "type": ["null", "string"] },
    "price": { "type": ["null", "integer"] },
    "price_in_decimal": { "type": ["null", "string"] },
    "period": { "type": ["null", "integer"] },
    "currency_code": { "type": ["null", "string"] }
    // ... additional properties
  }
}

Import

# Loaded automatically by Source.load_schemas_from_folder()
# Path: mage_integrations/mage_integrations/sources/chargebee/schemas/item_model/item_prices.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 for item pricing data

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/item_model",
    "item_prices.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