"""
Connector model for chargebee.

This file is auto-generated from the connector definition at build time.
DO NOT EDIT MANUALLY - changes will be overwritten on next generation.
"""

from __future__ import annotations

from ._vendored.connector_sdk.types import (
    Action,
    AuthConfig,
    AuthType,
    ConnectorModel,
    EndpointDefinition,
    EntityDefinition,
)
from ._vendored.connector_sdk.schema.security import (
    AirbyteAuthConfig,
    AuthConfigFieldSpec,
)
from uuid import (
    UUID,
)

ChargebeeConnectorModel: ConnectorModel = ConnectorModel(
    id=UUID('686473f1-76d9-4994-9cc7-9b13da46147c'),
    name='chargebee',
    version='1.0.1',
    base_url='https://{site}.chargebee.com/api/v2',
    auth=AuthConfig(
        type=AuthType.BASIC,
        user_config_spec=AirbyteAuthConfig(
            title='API Key Authentication',
            type='object',
            required=['api_key'],
            properties={
                'api_key': AuthConfigFieldSpec(
                    title='API Key',
                    description='Your Chargebee API key (used as the HTTP Basic username)',
                ),
            },
            auth_mapping={'username': '${api_key}', 'password': ''},
            replication_auth_key_mapping={'site_api_key': 'api_key'},
        ),
    ),
    entities=[
        EntityDefinition(
            name='customer',
            stream_name='customer',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/customers',
                    action=Action.LIST,
                    description='List customers',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of customers',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'customer': {
                                            'type': 'object',
                                            'description': 'Chargebee customer object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the customer'},
                                                'first_name': {'type': 'string', 'description': 'First name of the customer'},
                                                'last_name': {'type': 'string', 'description': 'Last name of the customer'},
                                                'email': {'type': 'string', 'description': 'Email address of the customer'},
                                                'phone': {'type': 'string', 'description': 'Phone number of the customer'},
                                                'company': {'type': 'string', 'description': 'Company name of the customer'},
                                                'vat_number': {'type': 'string', 'description': 'VAT/tax registration number'},
                                                'auto_collection': {'type': 'string', 'description': 'Automatic collection setting (on/off)'},
                                                'offline_payment_method': {'type': 'string', 'description': 'Preferred offline payment method'},
                                                'net_term_days': {'type': 'integer', 'description': 'Number of days for payment net terms'},
                                                'vat_number_validated_time': {'type': 'integer', 'description': 'Recent VAT number validation timestamp'},
                                                'vat_number_status': {'type': 'string', 'description': 'VAT validation status'},
                                                'allow_direct_debit': {'type': 'boolean', 'description': 'Whether the customer can pay via Direct Debit'},
                                                'is_location_valid': {'type': 'boolean', 'description': 'Whether the customer location is valid'},
                                                'created_at': {'type': 'integer', 'description': 'Timestamp when the customer was created'},
                                                'created_from_ip': {'type': 'string', 'description': 'IP address from which the customer was created'},
                                                'taxability': {'type': 'string', 'description': 'Taxability status of the customer'},
                                                'entity_code': {'type': 'string', 'description': 'Tax exemption category code'},
                                                'exempt_number': {'type': 'string', 'description': 'Tax exemption number'},
                                                'resource_version': {'type': 'integer', 'description': 'Version number of this resource'},
                                                'updated_at': {'type': 'integer', 'description': 'Timestamp of last update'},
                                                'locale': {'type': 'string', 'description': 'Customer locale setting'},
                                                'billing_date': {'type': 'integer', 'description': 'Billing date for calendar billing'},
                                                'billing_date_mode': {'type': 'string', 'description': 'Billing date mode'},
                                                'billing_day_of_week': {'type': 'string', 'description': 'Billing day of week for weekly subscriptions'},
                                                'billing_day_of_week_mode': {'type': 'string', 'description': 'Billing day of week mode'},
                                                'billing_month': {'type': 'integer', 'description': 'Billing month for yearly subscriptions'},
                                                'pii_cleared': {'type': 'string', 'description': 'PII cleared status'},
                                                'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                                                'channel': {'type': 'string', 'description': 'Channel the customer originated from'},
                                                'fraud_flag': {'type': 'string', 'description': 'Fraud flag status'},
                                                'primary_payment_source_id': {'type': 'string', 'description': 'Primary payment source ID'},
                                                'backup_payment_source_id': {'type': 'string', 'description': 'Backup payment source ID'},
                                                'invoice_notes': {'type': 'string', 'description': 'Notes on customer invoices'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'preferred_currency_code': {'type': 'string', 'description': 'Preferred currency code (ISO 4217)'},
                                                'promotional_credits': {'type': 'integer', 'description': 'Promotional credits balance (in cents)'},
                                                'unbilled_charges': {'type': 'integer', 'description': 'Total unbilled charges (in cents)'},
                                                'refundable_credits': {'type': 'integer', 'description': 'Refundable credits balance (in cents)'},
                                                'excess_payments': {'type': 'integer', 'description': 'Total excess payments (in cents)'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the customer is deleted'},
                                                'registered_for_gst': {'type': 'boolean', 'description': 'Whether registered for GST'},
                                                'consolidated_invoicing': {'type': 'boolean', 'description': 'Whether invoices are consolidated'},
                                                'customer_type': {'type': 'string', 'description': 'Customer type for tax purposes'},
                                                'business_customer_without_vat_number': {'type': 'boolean', 'description': 'Business customer without VAT number flag'},
                                                'client_profile_id': {'type': 'string', 'description': 'Avalara client profile ID'},
                                                'use_default_hierarchy_settings': {'type': 'boolean', 'description': 'Whether using default hierarchy settings'},
                                                'vat_number_prefix': {'type': 'string', 'description': 'VAT number prefix override'},
                                                'billing_address': {'type': 'object', 'description': 'Billing address'},
                                                'referral_urls': {
                                                    'type': 'array',
                                                    'description': 'Referral URLs',
                                                    'items': {'type': 'object'},
                                                },
                                                'contacts': {
                                                    'type': 'array',
                                                    'description': 'Contact details',
                                                    'items': {'type': 'object'},
                                                },
                                                'payment_method': {'type': 'object', 'description': 'Primary payment method details'},
                                                'balances': {
                                                    'type': 'array',
                                                    'description': 'Balance information',
                                                    'items': {'type': 'object'},
                                                },
                                                'relationship': {'type': 'object', 'description': 'Account hierarchy relationship'},
                                                'parent_account_access': {'type': 'object', 'description': 'Parent account access rights'},
                                                'child_account_access': {'type': 'object', 'description': 'Child account access rights'},
                                                'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                                                'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue from the customer'},
                                                'exemption_details': {
                                                    'type': 'array',
                                                    'description': 'Tax exemption details',
                                                    'items': {'type': 'object'},
                                                },
                                                'tax_providers_fields': {
                                                    'type': 'array',
                                                    'description': 'Tax provider fields',
                                                    'items': {'type': 'object'},
                                                },
                                                'object': {'type': 'string', 'description': 'Object type identifier'},
                                                'card_status': {'type': 'string', 'description': 'Status of payment card'},
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields associated with the customer',
                                                    'items': {'type': 'object'},
                                                },
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'customer',
                                            'x-airbyte-stream-name': 'customer',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].customer',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/customers/{id}',
                    action=Action.GET,
                    description='Retrieve a customer',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'customer': {
                                'type': 'object',
                                'description': 'Chargebee customer object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the customer'},
                                    'first_name': {'type': 'string', 'description': 'First name of the customer'},
                                    'last_name': {'type': 'string', 'description': 'Last name of the customer'},
                                    'email': {'type': 'string', 'description': 'Email address of the customer'},
                                    'phone': {'type': 'string', 'description': 'Phone number of the customer'},
                                    'company': {'type': 'string', 'description': 'Company name of the customer'},
                                    'vat_number': {'type': 'string', 'description': 'VAT/tax registration number'},
                                    'auto_collection': {'type': 'string', 'description': 'Automatic collection setting (on/off)'},
                                    'offline_payment_method': {'type': 'string', 'description': 'Preferred offline payment method'},
                                    'net_term_days': {'type': 'integer', 'description': 'Number of days for payment net terms'},
                                    'vat_number_validated_time': {'type': 'integer', 'description': 'Recent VAT number validation timestamp'},
                                    'vat_number_status': {'type': 'string', 'description': 'VAT validation status'},
                                    'allow_direct_debit': {'type': 'boolean', 'description': 'Whether the customer can pay via Direct Debit'},
                                    'is_location_valid': {'type': 'boolean', 'description': 'Whether the customer location is valid'},
                                    'created_at': {'type': 'integer', 'description': 'Timestamp when the customer was created'},
                                    'created_from_ip': {'type': 'string', 'description': 'IP address from which the customer was created'},
                                    'taxability': {'type': 'string', 'description': 'Taxability status of the customer'},
                                    'entity_code': {'type': 'string', 'description': 'Tax exemption category code'},
                                    'exempt_number': {'type': 'string', 'description': 'Tax exemption number'},
                                    'resource_version': {'type': 'integer', 'description': 'Version number of this resource'},
                                    'updated_at': {'type': 'integer', 'description': 'Timestamp of last update'},
                                    'locale': {'type': 'string', 'description': 'Customer locale setting'},
                                    'billing_date': {'type': 'integer', 'description': 'Billing date for calendar billing'},
                                    'billing_date_mode': {'type': 'string', 'description': 'Billing date mode'},
                                    'billing_day_of_week': {'type': 'string', 'description': 'Billing day of week for weekly subscriptions'},
                                    'billing_day_of_week_mode': {'type': 'string', 'description': 'Billing day of week mode'},
                                    'billing_month': {'type': 'integer', 'description': 'Billing month for yearly subscriptions'},
                                    'pii_cleared': {'type': 'string', 'description': 'PII cleared status'},
                                    'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                                    'channel': {'type': 'string', 'description': 'Channel the customer originated from'},
                                    'fraud_flag': {'type': 'string', 'description': 'Fraud flag status'},
                                    'primary_payment_source_id': {'type': 'string', 'description': 'Primary payment source ID'},
                                    'backup_payment_source_id': {'type': 'string', 'description': 'Backup payment source ID'},
                                    'invoice_notes': {'type': 'string', 'description': 'Notes on customer invoices'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'preferred_currency_code': {'type': 'string', 'description': 'Preferred currency code (ISO 4217)'},
                                    'promotional_credits': {'type': 'integer', 'description': 'Promotional credits balance (in cents)'},
                                    'unbilled_charges': {'type': 'integer', 'description': 'Total unbilled charges (in cents)'},
                                    'refundable_credits': {'type': 'integer', 'description': 'Refundable credits balance (in cents)'},
                                    'excess_payments': {'type': 'integer', 'description': 'Total excess payments (in cents)'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the customer is deleted'},
                                    'registered_for_gst': {'type': 'boolean', 'description': 'Whether registered for GST'},
                                    'consolidated_invoicing': {'type': 'boolean', 'description': 'Whether invoices are consolidated'},
                                    'customer_type': {'type': 'string', 'description': 'Customer type for tax purposes'},
                                    'business_customer_without_vat_number': {'type': 'boolean', 'description': 'Business customer without VAT number flag'},
                                    'client_profile_id': {'type': 'string', 'description': 'Avalara client profile ID'},
                                    'use_default_hierarchy_settings': {'type': 'boolean', 'description': 'Whether using default hierarchy settings'},
                                    'vat_number_prefix': {'type': 'string', 'description': 'VAT number prefix override'},
                                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                                    'referral_urls': {
                                        'type': 'array',
                                        'description': 'Referral URLs',
                                        'items': {'type': 'object'},
                                    },
                                    'contacts': {
                                        'type': 'array',
                                        'description': 'Contact details',
                                        'items': {'type': 'object'},
                                    },
                                    'payment_method': {'type': 'object', 'description': 'Primary payment method details'},
                                    'balances': {
                                        'type': 'array',
                                        'description': 'Balance information',
                                        'items': {'type': 'object'},
                                    },
                                    'relationship': {'type': 'object', 'description': 'Account hierarchy relationship'},
                                    'parent_account_access': {'type': 'object', 'description': 'Parent account access rights'},
                                    'child_account_access': {'type': 'object', 'description': 'Child account access rights'},
                                    'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                                    'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue from the customer'},
                                    'exemption_details': {
                                        'type': 'array',
                                        'description': 'Tax exemption details',
                                        'items': {'type': 'object'},
                                    },
                                    'tax_providers_fields': {
                                        'type': 'array',
                                        'description': 'Tax provider fields',
                                        'items': {'type': 'object'},
                                    },
                                    'object': {'type': 'string', 'description': 'Object type identifier'},
                                    'card_status': {'type': 'string', 'description': 'Status of payment card'},
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields associated with the customer',
                                        'items': {'type': 'object'},
                                    },
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'customer',
                                'x-airbyte-stream-name': 'customer',
                            },
                        },
                    },
                    record_extractor='$.customer',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee customer object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the customer'},
                    'first_name': {'type': 'string', 'description': 'First name of the customer'},
                    'last_name': {'type': 'string', 'description': 'Last name of the customer'},
                    'email': {'type': 'string', 'description': 'Email address of the customer'},
                    'phone': {'type': 'string', 'description': 'Phone number of the customer'},
                    'company': {'type': 'string', 'description': 'Company name of the customer'},
                    'vat_number': {'type': 'string', 'description': 'VAT/tax registration number'},
                    'auto_collection': {'type': 'string', 'description': 'Automatic collection setting (on/off)'},
                    'offline_payment_method': {'type': 'string', 'description': 'Preferred offline payment method'},
                    'net_term_days': {'type': 'integer', 'description': 'Number of days for payment net terms'},
                    'vat_number_validated_time': {'type': 'integer', 'description': 'Recent VAT number validation timestamp'},
                    'vat_number_status': {'type': 'string', 'description': 'VAT validation status'},
                    'allow_direct_debit': {'type': 'boolean', 'description': 'Whether the customer can pay via Direct Debit'},
                    'is_location_valid': {'type': 'boolean', 'description': 'Whether the customer location is valid'},
                    'created_at': {'type': 'integer', 'description': 'Timestamp when the customer was created'},
                    'created_from_ip': {'type': 'string', 'description': 'IP address from which the customer was created'},
                    'taxability': {'type': 'string', 'description': 'Taxability status of the customer'},
                    'entity_code': {'type': 'string', 'description': 'Tax exemption category code'},
                    'exempt_number': {'type': 'string', 'description': 'Tax exemption number'},
                    'resource_version': {'type': 'integer', 'description': 'Version number of this resource'},
                    'updated_at': {'type': 'integer', 'description': 'Timestamp of last update'},
                    'locale': {'type': 'string', 'description': 'Customer locale setting'},
                    'billing_date': {'type': 'integer', 'description': 'Billing date for calendar billing'},
                    'billing_date_mode': {'type': 'string', 'description': 'Billing date mode'},
                    'billing_day_of_week': {'type': 'string', 'description': 'Billing day of week for weekly subscriptions'},
                    'billing_day_of_week_mode': {'type': 'string', 'description': 'Billing day of week mode'},
                    'billing_month': {'type': 'integer', 'description': 'Billing month for yearly subscriptions'},
                    'pii_cleared': {'type': 'string', 'description': 'PII cleared status'},
                    'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                    'channel': {'type': 'string', 'description': 'Channel the customer originated from'},
                    'fraud_flag': {'type': 'string', 'description': 'Fraud flag status'},
                    'primary_payment_source_id': {'type': 'string', 'description': 'Primary payment source ID'},
                    'backup_payment_source_id': {'type': 'string', 'description': 'Backup payment source ID'},
                    'invoice_notes': {'type': 'string', 'description': 'Notes on customer invoices'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'preferred_currency_code': {'type': 'string', 'description': 'Preferred currency code (ISO 4217)'},
                    'promotional_credits': {'type': 'integer', 'description': 'Promotional credits balance (in cents)'},
                    'unbilled_charges': {'type': 'integer', 'description': 'Total unbilled charges (in cents)'},
                    'refundable_credits': {'type': 'integer', 'description': 'Refundable credits balance (in cents)'},
                    'excess_payments': {'type': 'integer', 'description': 'Total excess payments (in cents)'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the customer is deleted'},
                    'registered_for_gst': {'type': 'boolean', 'description': 'Whether registered for GST'},
                    'consolidated_invoicing': {'type': 'boolean', 'description': 'Whether invoices are consolidated'},
                    'customer_type': {'type': 'string', 'description': 'Customer type for tax purposes'},
                    'business_customer_without_vat_number': {'type': 'boolean', 'description': 'Business customer without VAT number flag'},
                    'client_profile_id': {'type': 'string', 'description': 'Avalara client profile ID'},
                    'use_default_hierarchy_settings': {'type': 'boolean', 'description': 'Whether using default hierarchy settings'},
                    'vat_number_prefix': {'type': 'string', 'description': 'VAT number prefix override'},
                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                    'referral_urls': {
                        'type': 'array',
                        'description': 'Referral URLs',
                        'items': {'type': 'object'},
                    },
                    'contacts': {
                        'type': 'array',
                        'description': 'Contact details',
                        'items': {'type': 'object'},
                    },
                    'payment_method': {'type': 'object', 'description': 'Primary payment method details'},
                    'balances': {
                        'type': 'array',
                        'description': 'Balance information',
                        'items': {'type': 'object'},
                    },
                    'relationship': {'type': 'object', 'description': 'Account hierarchy relationship'},
                    'parent_account_access': {'type': 'object', 'description': 'Parent account access rights'},
                    'child_account_access': {'type': 'object', 'description': 'Child account access rights'},
                    'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                    'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue from the customer'},
                    'exemption_details': {
                        'type': 'array',
                        'description': 'Tax exemption details',
                        'items': {'type': 'object'},
                    },
                    'tax_providers_fields': {
                        'type': 'array',
                        'description': 'Tax provider fields',
                        'items': {'type': 'object'},
                    },
                    'object': {'type': 'string', 'description': 'Object type identifier'},
                    'card_status': {'type': 'string', 'description': 'Status of payment card'},
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields associated with the customer',
                        'items': {'type': 'object'},
                    },
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'customer',
                'x-airbyte-stream-name': 'customer',
            },
        ),
        EntityDefinition(
            name='subscription',
            stream_name='subscription',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/subscriptions',
                    action=Action.LIST,
                    description='List subscriptions',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of subscriptions',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'subscription': {
                                            'type': 'object',
                                            'description': 'Chargebee subscription object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the subscription'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'plan_id': {'type': 'string', 'description': 'Plan ID'},
                                                'plan_quantity': {'type': 'integer', 'description': 'Plan quantity'},
                                                'plan_unit_price': {'type': 'integer', 'description': 'Plan unit price (in cents)'},
                                                'plan_amount': {'type': 'integer', 'description': 'Plan amount (in cents)'},
                                                'plan_free_quantity': {'type': 'integer', 'description': 'Plan free quantity'},
                                                'status': {'type': 'string', 'description': 'Subscription status'},
                                                'trial_start': {'type': 'integer', 'description': 'Trial start timestamp'},
                                                'trial_end': {'type': 'integer', 'description': 'Trial end timestamp'},
                                                'current_term_start': {'type': 'integer', 'description': 'Current term start timestamp'},
                                                'current_term_end': {'type': 'integer', 'description': 'Current term end timestamp'},
                                                'next_billing_at': {'type': 'integer', 'description': 'Next billing timestamp'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                                'started_at': {'type': 'integer', 'description': 'Start timestamp'},
                                                'activated_at': {'type': 'integer', 'description': 'Activation timestamp'},
                                                'cancelled_at': {'type': 'integer', 'description': 'Cancellation timestamp'},
                                                'cancel_reason': {'type': 'string', 'description': 'Reason for cancellation'},
                                                'channel': {'type': 'string', 'description': 'Channel the subscription originated from'},
                                                'billing_period': {'type': 'integer', 'description': 'Billing period'},
                                                'billing_period_unit': {'type': 'string', 'description': 'Billing period unit'},
                                                'auto_collection': {'type': 'string', 'description': 'Automatic collection setting'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'remaining_billing_cycles': {'type': 'integer', 'description': 'Remaining billing cycles'},
                                                'po_number': {'type': 'string', 'description': 'Purchase order number'},
                                                'created_from_ip': {'type': 'string', 'description': 'IP address from creation'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'has_scheduled_changes': {'type': 'boolean', 'description': 'Whether scheduled changes exist'},
                                                'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                                                'plan_free_quantity_in_decimal': {'type': 'string', 'description': 'Plan free quantity in decimal'},
                                                'plan_quantity_in_decimal': {'type': 'string', 'description': 'Plan quantity in decimal'},
                                                'plan_unit_price_in_decimal': {'type': 'string', 'description': 'Plan unit price in decimal'},
                                                'plan_amount_in_decimal': {'type': 'string', 'description': 'Plan amount in decimal'},
                                                'due_invoices_count': {'type': 'integer', 'description': 'Count of due invoices'},
                                                'due_since': {'type': 'integer', 'description': 'Due since timestamp'},
                                                'total_dues': {'type': 'integer', 'description': 'Total dues amount (in cents)'},
                                                'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue (in cents)'},
                                                'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                                'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                                'override_relationship': {'type': 'boolean', 'description': 'Whether relationship is overridden'},
                                                'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                                                'pause_date': {'type': 'integer', 'description': 'Pause date timestamp'},
                                                'resume_date': {'type': 'integer', 'description': 'Resume date timestamp'},
                                                'cancelled_at_term_end': {'type': 'boolean', 'description': 'Whether cancelled at term end'},
                                                'has_scheduled_advance_invoices': {'type': 'boolean', 'description': 'Whether advance invoices are scheduled'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'addons': {
                                                    'type': 'array',
                                                    'description': 'Addon details',
                                                    'items': {'type': 'object'},
                                                },
                                                'coupons': {
                                                    'type': 'array',
                                                    'description': 'Coupon details',
                                                    'items': {'type': 'object'},
                                                },
                                                'discounts': {
                                                    'type': 'array',
                                                    'description': 'Discount details',
                                                    'items': {'type': 'object'},
                                                },
                                                'subscription_items': {
                                                    'type': 'array',
                                                    'description': 'Subscription item details',
                                                    'items': {'type': 'object'},
                                                },
                                                'item_tiers': {
                                                    'type': 'array',
                                                    'description': 'Item tier details',
                                                    'items': {'type': 'object'},
                                                },
                                                'charged_items': {
                                                    'type': 'array',
                                                    'description': 'Charged items',
                                                    'items': {'type': 'object'},
                                                },
                                                'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                                'contract_term': {'type': 'object', 'description': 'Contract term details'},
                                                'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the subscription is deleted'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'free_period': {'type': 'integer', 'description': 'Free period'},
                                                'free_period_unit': {'type': 'string', 'description': 'Free period unit'},
                                                'cf_mandate_id': {'type': 'string', 'description': 'Custom field mandate ID'},
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields associated with the subscription',
                                                    'items': {'type': 'object'},
                                                },
                                                'changes_scheduled_at': {'type': 'integer', 'description': 'Timestamp of scheduled changes'},
                                                'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                                'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                                                'offline_payment_method': {'type': 'string', 'description': 'Offline payment method'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'subscription',
                                            'x-airbyte-stream-name': 'subscription',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].subscription',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/subscriptions/{id}',
                    action=Action.GET,
                    description='Retrieve a subscription',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'subscription': {
                                'type': 'object',
                                'description': 'Chargebee subscription object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the subscription'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'plan_id': {'type': 'string', 'description': 'Plan ID'},
                                    'plan_quantity': {'type': 'integer', 'description': 'Plan quantity'},
                                    'plan_unit_price': {'type': 'integer', 'description': 'Plan unit price (in cents)'},
                                    'plan_amount': {'type': 'integer', 'description': 'Plan amount (in cents)'},
                                    'plan_free_quantity': {'type': 'integer', 'description': 'Plan free quantity'},
                                    'status': {'type': 'string', 'description': 'Subscription status'},
                                    'trial_start': {'type': 'integer', 'description': 'Trial start timestamp'},
                                    'trial_end': {'type': 'integer', 'description': 'Trial end timestamp'},
                                    'current_term_start': {'type': 'integer', 'description': 'Current term start timestamp'},
                                    'current_term_end': {'type': 'integer', 'description': 'Current term end timestamp'},
                                    'next_billing_at': {'type': 'integer', 'description': 'Next billing timestamp'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                    'started_at': {'type': 'integer', 'description': 'Start timestamp'},
                                    'activated_at': {'type': 'integer', 'description': 'Activation timestamp'},
                                    'cancelled_at': {'type': 'integer', 'description': 'Cancellation timestamp'},
                                    'cancel_reason': {'type': 'string', 'description': 'Reason for cancellation'},
                                    'channel': {'type': 'string', 'description': 'Channel the subscription originated from'},
                                    'billing_period': {'type': 'integer', 'description': 'Billing period'},
                                    'billing_period_unit': {'type': 'string', 'description': 'Billing period unit'},
                                    'auto_collection': {'type': 'string', 'description': 'Automatic collection setting'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'remaining_billing_cycles': {'type': 'integer', 'description': 'Remaining billing cycles'},
                                    'po_number': {'type': 'string', 'description': 'Purchase order number'},
                                    'created_from_ip': {'type': 'string', 'description': 'IP address from creation'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'has_scheduled_changes': {'type': 'boolean', 'description': 'Whether scheduled changes exist'},
                                    'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                                    'plan_free_quantity_in_decimal': {'type': 'string', 'description': 'Plan free quantity in decimal'},
                                    'plan_quantity_in_decimal': {'type': 'string', 'description': 'Plan quantity in decimal'},
                                    'plan_unit_price_in_decimal': {'type': 'string', 'description': 'Plan unit price in decimal'},
                                    'plan_amount_in_decimal': {'type': 'string', 'description': 'Plan amount in decimal'},
                                    'due_invoices_count': {'type': 'integer', 'description': 'Count of due invoices'},
                                    'due_since': {'type': 'integer', 'description': 'Due since timestamp'},
                                    'total_dues': {'type': 'integer', 'description': 'Total dues amount (in cents)'},
                                    'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue (in cents)'},
                                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                    'override_relationship': {'type': 'boolean', 'description': 'Whether relationship is overridden'},
                                    'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                                    'pause_date': {'type': 'integer', 'description': 'Pause date timestamp'},
                                    'resume_date': {'type': 'integer', 'description': 'Resume date timestamp'},
                                    'cancelled_at_term_end': {'type': 'boolean', 'description': 'Whether cancelled at term end'},
                                    'has_scheduled_advance_invoices': {'type': 'boolean', 'description': 'Whether advance invoices are scheduled'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'addons': {
                                        'type': 'array',
                                        'description': 'Addon details',
                                        'items': {'type': 'object'},
                                    },
                                    'coupons': {
                                        'type': 'array',
                                        'description': 'Coupon details',
                                        'items': {'type': 'object'},
                                    },
                                    'discounts': {
                                        'type': 'array',
                                        'description': 'Discount details',
                                        'items': {'type': 'object'},
                                    },
                                    'subscription_items': {
                                        'type': 'array',
                                        'description': 'Subscription item details',
                                        'items': {'type': 'object'},
                                    },
                                    'item_tiers': {
                                        'type': 'array',
                                        'description': 'Item tier details',
                                        'items': {'type': 'object'},
                                    },
                                    'charged_items': {
                                        'type': 'array',
                                        'description': 'Charged items',
                                        'items': {'type': 'object'},
                                    },
                                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                    'contract_term': {'type': 'object', 'description': 'Contract term details'},
                                    'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the subscription is deleted'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'free_period': {'type': 'integer', 'description': 'Free period'},
                                    'free_period_unit': {'type': 'string', 'description': 'Free period unit'},
                                    'cf_mandate_id': {'type': 'string', 'description': 'Custom field mandate ID'},
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields associated with the subscription',
                                        'items': {'type': 'object'},
                                    },
                                    'changes_scheduled_at': {'type': 'integer', 'description': 'Timestamp of scheduled changes'},
                                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                    'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                                    'offline_payment_method': {'type': 'string', 'description': 'Offline payment method'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'subscription',
                                'x-airbyte-stream-name': 'subscription',
                            },
                        },
                    },
                    record_extractor='$.subscription',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee subscription object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the subscription'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'plan_id': {'type': 'string', 'description': 'Plan ID'},
                    'plan_quantity': {'type': 'integer', 'description': 'Plan quantity'},
                    'plan_unit_price': {'type': 'integer', 'description': 'Plan unit price (in cents)'},
                    'plan_amount': {'type': 'integer', 'description': 'Plan amount (in cents)'},
                    'plan_free_quantity': {'type': 'integer', 'description': 'Plan free quantity'},
                    'status': {'type': 'string', 'description': 'Subscription status'},
                    'trial_start': {'type': 'integer', 'description': 'Trial start timestamp'},
                    'trial_end': {'type': 'integer', 'description': 'Trial end timestamp'},
                    'current_term_start': {'type': 'integer', 'description': 'Current term start timestamp'},
                    'current_term_end': {'type': 'integer', 'description': 'Current term end timestamp'},
                    'next_billing_at': {'type': 'integer', 'description': 'Next billing timestamp'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                    'started_at': {'type': 'integer', 'description': 'Start timestamp'},
                    'activated_at': {'type': 'integer', 'description': 'Activation timestamp'},
                    'cancelled_at': {'type': 'integer', 'description': 'Cancellation timestamp'},
                    'cancel_reason': {'type': 'string', 'description': 'Reason for cancellation'},
                    'channel': {'type': 'string', 'description': 'Channel the subscription originated from'},
                    'billing_period': {'type': 'integer', 'description': 'Billing period'},
                    'billing_period_unit': {'type': 'string', 'description': 'Billing period unit'},
                    'auto_collection': {'type': 'string', 'description': 'Automatic collection setting'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'remaining_billing_cycles': {'type': 'integer', 'description': 'Remaining billing cycles'},
                    'po_number': {'type': 'string', 'description': 'Purchase order number'},
                    'created_from_ip': {'type': 'string', 'description': 'IP address from creation'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'has_scheduled_changes': {'type': 'boolean', 'description': 'Whether scheduled changes exist'},
                    'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                    'plan_free_quantity_in_decimal': {'type': 'string', 'description': 'Plan free quantity in decimal'},
                    'plan_quantity_in_decimal': {'type': 'string', 'description': 'Plan quantity in decimal'},
                    'plan_unit_price_in_decimal': {'type': 'string', 'description': 'Plan unit price in decimal'},
                    'plan_amount_in_decimal': {'type': 'string', 'description': 'Plan amount in decimal'},
                    'due_invoices_count': {'type': 'integer', 'description': 'Count of due invoices'},
                    'due_since': {'type': 'integer', 'description': 'Due since timestamp'},
                    'total_dues': {'type': 'integer', 'description': 'Total dues amount (in cents)'},
                    'mrr': {'type': 'integer', 'description': 'Monthly recurring revenue (in cents)'},
                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                    'override_relationship': {'type': 'boolean', 'description': 'Whether relationship is overridden'},
                    'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                    'pause_date': {'type': 'integer', 'description': 'Pause date timestamp'},
                    'resume_date': {'type': 'integer', 'description': 'Resume date timestamp'},
                    'cancelled_at_term_end': {'type': 'boolean', 'description': 'Whether cancelled at term end'},
                    'has_scheduled_advance_invoices': {'type': 'boolean', 'description': 'Whether advance invoices are scheduled'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'addons': {
                        'type': 'array',
                        'description': 'Addon details',
                        'items': {'type': 'object'},
                    },
                    'coupons': {
                        'type': 'array',
                        'description': 'Coupon details',
                        'items': {'type': 'object'},
                    },
                    'discounts': {
                        'type': 'array',
                        'description': 'Discount details',
                        'items': {'type': 'object'},
                    },
                    'subscription_items': {
                        'type': 'array',
                        'description': 'Subscription item details',
                        'items': {'type': 'object'},
                    },
                    'item_tiers': {
                        'type': 'array',
                        'description': 'Item tier details',
                        'items': {'type': 'object'},
                    },
                    'charged_items': {
                        'type': 'array',
                        'description': 'Charged items',
                        'items': {'type': 'object'},
                    },
                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                    'contract_term': {'type': 'object', 'description': 'Contract term details'},
                    'meta_data': {'type': 'object', 'description': 'Additional metadata'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the subscription is deleted'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'free_period': {'type': 'integer', 'description': 'Free period'},
                    'free_period_unit': {'type': 'string', 'description': 'Free period unit'},
                    'cf_mandate_id': {'type': 'string', 'description': 'Custom field mandate ID'},
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields associated with the subscription',
                        'items': {'type': 'object'},
                    },
                    'changes_scheduled_at': {'type': 'integer', 'description': 'Timestamp of scheduled changes'},
                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                    'auto_close_invoices': {'type': 'boolean', 'description': 'Whether invoices are auto-closed'},
                    'offline_payment_method': {'type': 'string', 'description': 'Offline payment method'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'subscription',
                'x-airbyte-stream-name': 'subscription',
            },
        ),
        EntityDefinition(
            name='invoice',
            stream_name='invoice',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/invoices',
                    action=Action.LIST,
                    description='List invoices',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of invoices',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'invoice': {
                                            'type': 'object',
                                            'description': 'Chargebee invoice object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the invoice'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                                'recurring': {'type': 'boolean', 'description': 'Whether this is a recurring invoice'},
                                                'status': {'type': 'string', 'description': 'Invoice status'},
                                                'price_type': {'type': 'string', 'description': 'Price type'},
                                                'date': {'type': 'integer', 'description': 'Invoice date timestamp'},
                                                'due_date': {'type': 'integer', 'description': 'Due date timestamp'},
                                                'net_term_days': {'type': 'integer', 'description': 'Net term days'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                                'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                                                'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                                                'write_off_amount': {'type': 'integer', 'description': 'Write-off amount (in cents)'},
                                                'credits_applied': {'type': 'integer', 'description': 'Credits applied (in cents)'},
                                                'amount_due': {'type': 'integer', 'description': 'Amount due (in cents)'},
                                                'paid_at': {'type': 'integer', 'description': 'Paid at timestamp'},
                                                'dunning_status': {'type': 'string', 'description': 'Dunning status'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the invoice is deleted'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'first_invoice': {'type': 'boolean', 'description': 'Whether this is the first invoice'},
                                                'amount_to_collect': {'type': 'integer', 'description': 'Amount to collect (in cents)'},
                                                'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                                                'new_sales_amount': {'type': 'integer', 'description': 'New sales amount (in cents)'},
                                                'has_advance_charges': {'type': 'boolean', 'description': 'Whether advance charges exist'},
                                                'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                                                'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                                'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                                                'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                                                'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                                'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                                'is_gifted': {'type': 'boolean', 'description': 'Whether the invoice is for a gift'},
                                                'generated_at': {'type': 'integer', 'description': 'Generation timestamp'},
                                                'expected_payment_date': {'type': 'integer', 'description': 'Expected payment date'},
                                                'channel': {'type': 'string', 'description': 'Channel'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'line_items': {
                                                    'type': 'array',
                                                    'description': 'Invoice line items',
                                                    'items': {'type': 'object'},
                                                },
                                                'discounts': {
                                                    'type': 'array',
                                                    'description': 'Discounts applied',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_discounts': {
                                                    'type': 'array',
                                                    'description': 'Line item discounts',
                                                    'items': {'type': 'object'},
                                                },
                                                'taxes': {
                                                    'type': 'array',
                                                    'description': 'Tax details',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_taxes': {
                                                    'type': 'array',
                                                    'description': 'Line item tax details',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_tiers': {
                                                    'type': 'array',
                                                    'description': 'Line item tier details',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_payments': {
                                                    'type': 'array',
                                                    'description': 'Linked payment details',
                                                    'items': {'type': 'object'},
                                                },
                                                'dunning_attempts': {
                                                    'type': 'array',
                                                    'description': 'Dunning attempt details',
                                                    'items': {'type': 'object'},
                                                },
                                                'applied_credits': {
                                                    'type': 'array',
                                                    'description': 'Applied credit details',
                                                    'items': {'type': 'object'},
                                                },
                                                'adjustment_credit_notes': {
                                                    'type': 'array',
                                                    'description': 'Adjustment credit notes',
                                                    'items': {'type': 'object'},
                                                },
                                                'issued_credit_notes': {
                                                    'type': 'array',
                                                    'description': 'Issued credit notes',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_orders': {
                                                    'type': 'array',
                                                    'description': 'Linked orders',
                                                    'items': {'type': 'object'},
                                                },
                                                'notes': {
                                                    'type': 'array',
                                                    'description': 'Invoice notes',
                                                    'items': {'type': 'object'},
                                                },
                                                'billing_address': {'type': 'object', 'description': 'Billing address'},
                                                'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                                'linked_taxes_withheld': {
                                                    'type': 'array',
                                                    'description': 'Linked taxes withheld',
                                                    'items': {'type': 'object'},
                                                },
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                                'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                                                'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'invoice',
                                            'x-airbyte-stream-name': 'invoice',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].invoice',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/invoices/{id}',
                    action=Action.GET,
                    description='Retrieve an invoice',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'invoice': {
                                'type': 'object',
                                'description': 'Chargebee invoice object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the invoice'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                    'recurring': {'type': 'boolean', 'description': 'Whether this is a recurring invoice'},
                                    'status': {'type': 'string', 'description': 'Invoice status'},
                                    'price_type': {'type': 'string', 'description': 'Price type'},
                                    'date': {'type': 'integer', 'description': 'Invoice date timestamp'},
                                    'due_date': {'type': 'integer', 'description': 'Due date timestamp'},
                                    'net_term_days': {'type': 'integer', 'description': 'Net term days'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                    'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                                    'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                                    'write_off_amount': {'type': 'integer', 'description': 'Write-off amount (in cents)'},
                                    'credits_applied': {'type': 'integer', 'description': 'Credits applied (in cents)'},
                                    'amount_due': {'type': 'integer', 'description': 'Amount due (in cents)'},
                                    'paid_at': {'type': 'integer', 'description': 'Paid at timestamp'},
                                    'dunning_status': {'type': 'string', 'description': 'Dunning status'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the invoice is deleted'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'first_invoice': {'type': 'boolean', 'description': 'Whether this is the first invoice'},
                                    'amount_to_collect': {'type': 'integer', 'description': 'Amount to collect (in cents)'},
                                    'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                                    'new_sales_amount': {'type': 'integer', 'description': 'New sales amount (in cents)'},
                                    'has_advance_charges': {'type': 'boolean', 'description': 'Whether advance charges exist'},
                                    'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                    'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                                    'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                    'is_gifted': {'type': 'boolean', 'description': 'Whether the invoice is for a gift'},
                                    'generated_at': {'type': 'integer', 'description': 'Generation timestamp'},
                                    'expected_payment_date': {'type': 'integer', 'description': 'Expected payment date'},
                                    'channel': {'type': 'string', 'description': 'Channel'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'line_items': {
                                        'type': 'array',
                                        'description': 'Invoice line items',
                                        'items': {'type': 'object'},
                                    },
                                    'discounts': {
                                        'type': 'array',
                                        'description': 'Discounts applied',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_discounts': {
                                        'type': 'array',
                                        'description': 'Line item discounts',
                                        'items': {'type': 'object'},
                                    },
                                    'taxes': {
                                        'type': 'array',
                                        'description': 'Tax details',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_taxes': {
                                        'type': 'array',
                                        'description': 'Line item tax details',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_tiers': {
                                        'type': 'array',
                                        'description': 'Line item tier details',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_payments': {
                                        'type': 'array',
                                        'description': 'Linked payment details',
                                        'items': {'type': 'object'},
                                    },
                                    'dunning_attempts': {
                                        'type': 'array',
                                        'description': 'Dunning attempt details',
                                        'items': {'type': 'object'},
                                    },
                                    'applied_credits': {
                                        'type': 'array',
                                        'description': 'Applied credit details',
                                        'items': {'type': 'object'},
                                    },
                                    'adjustment_credit_notes': {
                                        'type': 'array',
                                        'description': 'Adjustment credit notes',
                                        'items': {'type': 'object'},
                                    },
                                    'issued_credit_notes': {
                                        'type': 'array',
                                        'description': 'Issued credit notes',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_orders': {
                                        'type': 'array',
                                        'description': 'Linked orders',
                                        'items': {'type': 'object'},
                                    },
                                    'notes': {
                                        'type': 'array',
                                        'description': 'Invoice notes',
                                        'items': {'type': 'object'},
                                    },
                                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                    'linked_taxes_withheld': {
                                        'type': 'array',
                                        'description': 'Linked taxes withheld',
                                        'items': {'type': 'object'},
                                    },
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                    'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'invoice',
                                'x-airbyte-stream-name': 'invoice',
                            },
                        },
                    },
                    record_extractor='$.invoice',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee invoice object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the invoice'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                    'recurring': {'type': 'boolean', 'description': 'Whether this is a recurring invoice'},
                    'status': {'type': 'string', 'description': 'Invoice status'},
                    'price_type': {'type': 'string', 'description': 'Price type'},
                    'date': {'type': 'integer', 'description': 'Invoice date timestamp'},
                    'due_date': {'type': 'integer', 'description': 'Due date timestamp'},
                    'net_term_days': {'type': 'integer', 'description': 'Net term days'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                    'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                    'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                    'write_off_amount': {'type': 'integer', 'description': 'Write-off amount (in cents)'},
                    'credits_applied': {'type': 'integer', 'description': 'Credits applied (in cents)'},
                    'amount_due': {'type': 'integer', 'description': 'Amount due (in cents)'},
                    'paid_at': {'type': 'integer', 'description': 'Paid at timestamp'},
                    'dunning_status': {'type': 'string', 'description': 'Dunning status'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the invoice is deleted'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'first_invoice': {'type': 'boolean', 'description': 'Whether this is the first invoice'},
                    'amount_to_collect': {'type': 'integer', 'description': 'Amount to collect (in cents)'},
                    'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                    'new_sales_amount': {'type': 'integer', 'description': 'New sales amount (in cents)'},
                    'has_advance_charges': {'type': 'boolean', 'description': 'Whether advance charges exist'},
                    'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                    'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                    'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                    'is_gifted': {'type': 'boolean', 'description': 'Whether the invoice is for a gift'},
                    'generated_at': {'type': 'integer', 'description': 'Generation timestamp'},
                    'expected_payment_date': {'type': 'integer', 'description': 'Expected payment date'},
                    'channel': {'type': 'string', 'description': 'Channel'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'line_items': {
                        'type': 'array',
                        'description': 'Invoice line items',
                        'items': {'type': 'object'},
                    },
                    'discounts': {
                        'type': 'array',
                        'description': 'Discounts applied',
                        'items': {'type': 'object'},
                    },
                    'line_item_discounts': {
                        'type': 'array',
                        'description': 'Line item discounts',
                        'items': {'type': 'object'},
                    },
                    'taxes': {
                        'type': 'array',
                        'description': 'Tax details',
                        'items': {'type': 'object'},
                    },
                    'line_item_taxes': {
                        'type': 'array',
                        'description': 'Line item tax details',
                        'items': {'type': 'object'},
                    },
                    'line_item_tiers': {
                        'type': 'array',
                        'description': 'Line item tier details',
                        'items': {'type': 'object'},
                    },
                    'linked_payments': {
                        'type': 'array',
                        'description': 'Linked payment details',
                        'items': {'type': 'object'},
                    },
                    'dunning_attempts': {
                        'type': 'array',
                        'description': 'Dunning attempt details',
                        'items': {'type': 'object'},
                    },
                    'applied_credits': {
                        'type': 'array',
                        'description': 'Applied credit details',
                        'items': {'type': 'object'},
                    },
                    'adjustment_credit_notes': {
                        'type': 'array',
                        'description': 'Adjustment credit notes',
                        'items': {'type': 'object'},
                    },
                    'issued_credit_notes': {
                        'type': 'array',
                        'description': 'Issued credit notes',
                        'items': {'type': 'object'},
                    },
                    'linked_orders': {
                        'type': 'array',
                        'description': 'Linked orders',
                        'items': {'type': 'object'},
                    },
                    'notes': {
                        'type': 'array',
                        'description': 'Invoice notes',
                        'items': {'type': 'object'},
                    },
                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                    'linked_taxes_withheld': {
                        'type': 'array',
                        'description': 'Linked taxes withheld',
                        'items': {'type': 'object'},
                    },
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                    'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'invoice',
                'x-airbyte-stream-name': 'invoice',
            },
        ),
        EntityDefinition(
            name='credit_note',
            stream_name='credit_note',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/credit_notes',
                    action=Action.LIST,
                    description='List credit notes',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of credit notes',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'credit_note': {
                                            'type': 'object',
                                            'description': 'Chargebee credit note object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the credit note'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                                'reference_invoice_id': {'type': 'string', 'description': 'Reference invoice ID'},
                                                'type': {'type': 'string', 'description': 'Credit note type'},
                                                'reason_code': {'type': 'string', 'description': 'Reason code'},
                                                'status': {'type': 'string', 'description': 'Credit note status'},
                                                'date': {'type': 'integer', 'description': 'Credit note date timestamp'},
                                                'price_type': {'type': 'string', 'description': 'Price type'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                                'amount_allocated': {'type': 'integer', 'description': 'Amount allocated (in cents)'},
                                                'amount_refunded': {'type': 'integer', 'description': 'Amount refunded (in cents)'},
                                                'amount_available': {'type': 'integer', 'description': 'Amount available (in cents)'},
                                                'refunded_at': {'type': 'integer', 'description': 'Refunded at timestamp'},
                                                'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                                'generated_at': {'type': 'integer', 'description': 'Generated at timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                                'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                                                'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                                                'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                                                'channel': {'type': 'string', 'description': 'Channel'},
                                                'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                                'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the credit note is deleted'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'create_reason_code': {'type': 'string', 'description': 'Creation reason code'},
                                                'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                                                'fractional_correction': {'type': 'integer', 'description': 'Fractional correction amount (in cents)'},
                                                'line_items': {
                                                    'type': 'array',
                                                    'description': 'Line items',
                                                    'items': {'type': 'object'},
                                                },
                                                'discounts': {
                                                    'type': 'array',
                                                    'description': 'Discounts',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_discounts': {
                                                    'type': 'array',
                                                    'description': 'Line item discounts',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_tiers': {
                                                    'type': 'array',
                                                    'description': 'Line item tiers',
                                                    'items': {'type': 'object'},
                                                },
                                                'taxes': {
                                                    'type': 'array',
                                                    'description': 'Tax details',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_taxes': {
                                                    'type': 'array',
                                                    'description': 'Line item taxes',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_refunds': {
                                                    'type': 'array',
                                                    'description': 'Linked refunds',
                                                    'items': {'type': 'object'},
                                                },
                                                'allocations': {
                                                    'type': 'array',
                                                    'description': 'Allocations',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_tax_withheld_refunds': {
                                                    'type': 'array',
                                                    'description': 'Linked tax withheld refunds',
                                                    'items': {'type': 'object'},
                                                },
                                                'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                                'billing_address': {'type': 'object', 'description': 'Billing address'},
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'credit_note',
                                            'x-airbyte-stream-name': 'credit_note',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].credit_note',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/credit_notes/{id}',
                    action=Action.GET,
                    description='Retrieve a credit note',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'credit_note': {
                                'type': 'object',
                                'description': 'Chargebee credit note object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the credit note'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                    'reference_invoice_id': {'type': 'string', 'description': 'Reference invoice ID'},
                                    'type': {'type': 'string', 'description': 'Credit note type'},
                                    'reason_code': {'type': 'string', 'description': 'Reason code'},
                                    'status': {'type': 'string', 'description': 'Credit note status'},
                                    'date': {'type': 'integer', 'description': 'Credit note date timestamp'},
                                    'price_type': {'type': 'string', 'description': 'Price type'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                    'amount_allocated': {'type': 'integer', 'description': 'Amount allocated (in cents)'},
                                    'amount_refunded': {'type': 'integer', 'description': 'Amount refunded (in cents)'},
                                    'amount_available': {'type': 'integer', 'description': 'Amount available (in cents)'},
                                    'refunded_at': {'type': 'integer', 'description': 'Refunded at timestamp'},
                                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                    'generated_at': {'type': 'integer', 'description': 'Generated at timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                    'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                                    'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                                    'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                                    'channel': {'type': 'string', 'description': 'Channel'},
                                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the credit note is deleted'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'create_reason_code': {'type': 'string', 'description': 'Creation reason code'},
                                    'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                                    'fractional_correction': {'type': 'integer', 'description': 'Fractional correction amount (in cents)'},
                                    'line_items': {
                                        'type': 'array',
                                        'description': 'Line items',
                                        'items': {'type': 'object'},
                                    },
                                    'discounts': {
                                        'type': 'array',
                                        'description': 'Discounts',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_discounts': {
                                        'type': 'array',
                                        'description': 'Line item discounts',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_tiers': {
                                        'type': 'array',
                                        'description': 'Line item tiers',
                                        'items': {'type': 'object'},
                                    },
                                    'taxes': {
                                        'type': 'array',
                                        'description': 'Tax details',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_taxes': {
                                        'type': 'array',
                                        'description': 'Line item taxes',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_refunds': {
                                        'type': 'array',
                                        'description': 'Linked refunds',
                                        'items': {'type': 'object'},
                                    },
                                    'allocations': {
                                        'type': 'array',
                                        'description': 'Allocations',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_tax_withheld_refunds': {
                                        'type': 'array',
                                        'description': 'Linked tax withheld refunds',
                                        'items': {'type': 'object'},
                                    },
                                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'credit_note',
                                'x-airbyte-stream-name': 'credit_note',
                            },
                        },
                    },
                    record_extractor='$.credit_note',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee credit note object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the credit note'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                    'reference_invoice_id': {'type': 'string', 'description': 'Reference invoice ID'},
                    'type': {'type': 'string', 'description': 'Credit note type'},
                    'reason_code': {'type': 'string', 'description': 'Reason code'},
                    'status': {'type': 'string', 'description': 'Credit note status'},
                    'date': {'type': 'integer', 'description': 'Credit note date timestamp'},
                    'price_type': {'type': 'string', 'description': 'Price type'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                    'amount_allocated': {'type': 'integer', 'description': 'Amount allocated (in cents)'},
                    'amount_refunded': {'type': 'integer', 'description': 'Amount refunded (in cents)'},
                    'amount_available': {'type': 'integer', 'description': 'Amount available (in cents)'},
                    'refunded_at': {'type': 'integer', 'description': 'Refunded at timestamp'},
                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                    'generated_at': {'type': 'integer', 'description': 'Generated at timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                    'sub_total_in_local_currency': {'type': 'integer', 'description': 'Subtotal in local currency (in cents)'},
                    'total_in_local_currency': {'type': 'integer', 'description': 'Total in local currency (in cents)'},
                    'round_off_amount': {'type': 'integer', 'description': 'Round-off amount (in cents)'},
                    'channel': {'type': 'string', 'description': 'Channel'},
                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the credit note is deleted'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'create_reason_code': {'type': 'string', 'description': 'Creation reason code'},
                    'void_reason_code': {'type': 'string', 'description': 'Void reason code'},
                    'fractional_correction': {'type': 'integer', 'description': 'Fractional correction amount (in cents)'},
                    'line_items': {
                        'type': 'array',
                        'description': 'Line items',
                        'items': {'type': 'object'},
                    },
                    'discounts': {
                        'type': 'array',
                        'description': 'Discounts',
                        'items': {'type': 'object'},
                    },
                    'line_item_discounts': {
                        'type': 'array',
                        'description': 'Line item discounts',
                        'items': {'type': 'object'},
                    },
                    'line_item_tiers': {
                        'type': 'array',
                        'description': 'Line item tiers',
                        'items': {'type': 'object'},
                    },
                    'taxes': {
                        'type': 'array',
                        'description': 'Tax details',
                        'items': {'type': 'object'},
                    },
                    'line_item_taxes': {
                        'type': 'array',
                        'description': 'Line item taxes',
                        'items': {'type': 'object'},
                    },
                    'linked_refunds': {
                        'type': 'array',
                        'description': 'Linked refunds',
                        'items': {'type': 'object'},
                    },
                    'allocations': {
                        'type': 'array',
                        'description': 'Allocations',
                        'items': {'type': 'object'},
                    },
                    'linked_tax_withheld_refunds': {
                        'type': 'array',
                        'description': 'Linked tax withheld refunds',
                        'items': {'type': 'object'},
                    },
                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'credit_note',
                'x-airbyte-stream-name': 'credit_note',
            },
        ),
        EntityDefinition(
            name='coupon',
            stream_name='coupon',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/coupons',
                    action=Action.LIST,
                    description='List coupons',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of coupons',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'coupon': {
                                            'type': 'object',
                                            'description': 'Chargebee coupon object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the coupon'},
                                                'name': {'type': 'string', 'description': 'Name of the coupon'},
                                                'invoice_name': {'type': 'string', 'description': 'Name displayed on invoices'},
                                                'discount_type': {'type': 'string', 'description': 'Type of discount'},
                                                'discount_percentage': {'type': 'number', 'description': 'Percentage discount'},
                                                'discount_amount': {'type': 'integer', 'description': 'Fixed discount amount (in cents)'},
                                                'discount_quantity': {'type': 'integer', 'description': 'Number of free units'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'duration_type': {'type': 'string', 'description': 'Duration type'},
                                                'duration_month': {'type': 'integer', 'description': 'Duration in months'},
                                                'valid_till': {'type': 'integer', 'description': 'Valid until timestamp'},
                                                'max_redemptions': {'type': 'integer', 'description': 'Maximum redemptions allowed'},
                                                'status': {'type': 'string', 'description': 'Coupon status'},
                                                'apply_discount_on': {'type': 'string', 'description': 'Where discount is applied'},
                                                'apply_on': {'type': 'string', 'description': 'What items the coupon applies to'},
                                                'plan_constraint': {'type': 'string', 'description': 'Plan constraint'},
                                                'addon_constraint': {'type': 'string', 'description': 'Addon constraint'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                                'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'redemptions': {'type': 'integer', 'description': 'Number of redemptions'},
                                                'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                                'period': {'type': 'integer', 'description': 'Validity period'},
                                                'period_unit': {'type': 'string', 'description': 'Period unit'},
                                                'item_constraints': {
                                                    'type': 'array',
                                                    'description': 'Item constraints',
                                                    'items': {'type': 'object'},
                                                },
                                                'item_constraint_criteria': {
                                                    'type': 'array',
                                                    'description': 'Item constraint criteria',
                                                    'items': {'type': 'object'},
                                                },
                                                'coupon_constraints': {
                                                    'type': 'array',
                                                    'description': 'Coupon constraints',
                                                    'items': {'type': 'object'},
                                                },
                                                'deleted': {'type': 'boolean', 'description': 'Whether the coupon is deleted'},
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'coupon',
                                            'x-airbyte-stream-name': 'coupon',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].coupon',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/coupons/{id}',
                    action=Action.GET,
                    description='Retrieve a coupon',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'coupon': {
                                'type': 'object',
                                'description': 'Chargebee coupon object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the coupon'},
                                    'name': {'type': 'string', 'description': 'Name of the coupon'},
                                    'invoice_name': {'type': 'string', 'description': 'Name displayed on invoices'},
                                    'discount_type': {'type': 'string', 'description': 'Type of discount'},
                                    'discount_percentage': {'type': 'number', 'description': 'Percentage discount'},
                                    'discount_amount': {'type': 'integer', 'description': 'Fixed discount amount (in cents)'},
                                    'discount_quantity': {'type': 'integer', 'description': 'Number of free units'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'duration_type': {'type': 'string', 'description': 'Duration type'},
                                    'duration_month': {'type': 'integer', 'description': 'Duration in months'},
                                    'valid_till': {'type': 'integer', 'description': 'Valid until timestamp'},
                                    'max_redemptions': {'type': 'integer', 'description': 'Maximum redemptions allowed'},
                                    'status': {'type': 'string', 'description': 'Coupon status'},
                                    'apply_discount_on': {'type': 'string', 'description': 'Where discount is applied'},
                                    'apply_on': {'type': 'string', 'description': 'What items the coupon applies to'},
                                    'plan_constraint': {'type': 'string', 'description': 'Plan constraint'},
                                    'addon_constraint': {'type': 'string', 'description': 'Addon constraint'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'redemptions': {'type': 'integer', 'description': 'Number of redemptions'},
                                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                    'period': {'type': 'integer', 'description': 'Validity period'},
                                    'period_unit': {'type': 'string', 'description': 'Period unit'},
                                    'item_constraints': {
                                        'type': 'array',
                                        'description': 'Item constraints',
                                        'items': {'type': 'object'},
                                    },
                                    'item_constraint_criteria': {
                                        'type': 'array',
                                        'description': 'Item constraint criteria',
                                        'items': {'type': 'object'},
                                    },
                                    'coupon_constraints': {
                                        'type': 'array',
                                        'description': 'Coupon constraints',
                                        'items': {'type': 'object'},
                                    },
                                    'deleted': {'type': 'boolean', 'description': 'Whether the coupon is deleted'},
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'coupon',
                                'x-airbyte-stream-name': 'coupon',
                            },
                        },
                    },
                    record_extractor='$.coupon',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee coupon object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the coupon'},
                    'name': {'type': 'string', 'description': 'Name of the coupon'},
                    'invoice_name': {'type': 'string', 'description': 'Name displayed on invoices'},
                    'discount_type': {'type': 'string', 'description': 'Type of discount'},
                    'discount_percentage': {'type': 'number', 'description': 'Percentage discount'},
                    'discount_amount': {'type': 'integer', 'description': 'Fixed discount amount (in cents)'},
                    'discount_quantity': {'type': 'integer', 'description': 'Number of free units'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'duration_type': {'type': 'string', 'description': 'Duration type'},
                    'duration_month': {'type': 'integer', 'description': 'Duration in months'},
                    'valid_till': {'type': 'integer', 'description': 'Valid until timestamp'},
                    'max_redemptions': {'type': 'integer', 'description': 'Maximum redemptions allowed'},
                    'status': {'type': 'string', 'description': 'Coupon status'},
                    'apply_discount_on': {'type': 'string', 'description': 'Where discount is applied'},
                    'apply_on': {'type': 'string', 'description': 'What items the coupon applies to'},
                    'plan_constraint': {'type': 'string', 'description': 'Plan constraint'},
                    'addon_constraint': {'type': 'string', 'description': 'Addon constraint'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'redemptions': {'type': 'integer', 'description': 'Number of redemptions'},
                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                    'period': {'type': 'integer', 'description': 'Validity period'},
                    'period_unit': {'type': 'string', 'description': 'Period unit'},
                    'item_constraints': {
                        'type': 'array',
                        'description': 'Item constraints',
                        'items': {'type': 'object'},
                    },
                    'item_constraint_criteria': {
                        'type': 'array',
                        'description': 'Item constraint criteria',
                        'items': {'type': 'object'},
                    },
                    'coupon_constraints': {
                        'type': 'array',
                        'description': 'Coupon constraints',
                        'items': {'type': 'object'},
                    },
                    'deleted': {'type': 'boolean', 'description': 'Whether the coupon is deleted'},
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'coupon',
                'x-airbyte-stream-name': 'coupon',
            },
        ),
        EntityDefinition(
            name='transaction',
            stream_name='transaction',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/transactions',
                    action=Action.LIST,
                    description='List transactions',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of transactions',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'transaction': {
                                            'type': 'object',
                                            'description': 'Chargebee transaction object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the transaction'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                                'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                                                'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                                                'payment_method': {'type': 'string', 'description': 'Payment method type'},
                                                'reference_number': {'type': 'string', 'description': 'Reference number'},
                                                'gateway': {'type': 'string', 'description': 'Payment gateway'},
                                                'type': {'type': 'string', 'description': 'Transaction type'},
                                                'date': {'type': 'integer', 'description': 'Transaction date timestamp'},
                                                'settled_at': {'type': 'integer', 'description': 'Settled at timestamp'},
                                                'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'amount': {'type': 'integer', 'description': 'Transaction amount (in cents)'},
                                                'id_at_gateway': {'type': 'string', 'description': 'Transaction ID at gateway'},
                                                'status': {'type': 'string', 'description': 'Transaction status'},
                                                'fraud_flag': {'type': 'string', 'description': 'Fraud flag'},
                                                'initiator_type': {'type': 'string', 'description': 'Initiator type'},
                                                'three_d_secure': {'type': 'boolean', 'description': 'Whether 3D Secure was used'},
                                                'authorization_reason': {'type': 'string', 'description': 'Authorization reason'},
                                                'error_code': {'type': 'string', 'description': 'Error code'},
                                                'error_text': {'type': 'string', 'description': 'Error text'},
                                                'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'fraud_reason': {'type': 'string', 'description': 'Fraud reason'},
                                                'amount_unused': {'type': 'integer', 'description': 'Unused amount (in cents)'},
                                                'masked_card_number': {'type': 'string', 'description': 'Masked card number'},
                                                'reference_transaction_id': {'type': 'string', 'description': 'Reference transaction ID'},
                                                'refunded_txn_id': {'type': 'string', 'description': 'Refunded transaction ID'},
                                                'reference_authorization_id': {'type': 'string', 'description': 'Reference authorization ID'},
                                                'amount_capturable': {'type': 'integer', 'description': 'Capturable amount (in cents)'},
                                                'reversal_transaction_id': {'type': 'string', 'description': 'Reversal transaction ID'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the transaction is deleted'},
                                                'iin': {'type': 'string', 'description': 'Card IIN'},
                                                'last4': {'type': 'string', 'description': 'Last four digits of card'},
                                                'merchant_reference_id': {'type': 'string', 'description': 'Merchant reference ID'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'payment_method_details': {'description': 'Payment method details'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                                'linked_invoices': {
                                                    'type': 'array',
                                                    'description': 'Linked invoices',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_credit_notes': {
                                                    'type': 'array',
                                                    'description': 'Linked credit notes',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_refunds': {
                                                    'type': 'array',
                                                    'description': 'Linked refunds',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_payments': {
                                                    'type': 'array',
                                                    'description': 'Linked payments',
                                                    'items': {'type': 'object'},
                                                },
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'transaction',
                                            'x-airbyte-stream-name': 'transaction',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].transaction',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/transactions/{id}',
                    action=Action.GET,
                    description='Retrieve a transaction',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'transaction': {
                                'type': 'object',
                                'description': 'Chargebee transaction object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the transaction'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                    'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                                    'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                                    'payment_method': {'type': 'string', 'description': 'Payment method type'},
                                    'reference_number': {'type': 'string', 'description': 'Reference number'},
                                    'gateway': {'type': 'string', 'description': 'Payment gateway'},
                                    'type': {'type': 'string', 'description': 'Transaction type'},
                                    'date': {'type': 'integer', 'description': 'Transaction date timestamp'},
                                    'settled_at': {'type': 'integer', 'description': 'Settled at timestamp'},
                                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'amount': {'type': 'integer', 'description': 'Transaction amount (in cents)'},
                                    'id_at_gateway': {'type': 'string', 'description': 'Transaction ID at gateway'},
                                    'status': {'type': 'string', 'description': 'Transaction status'},
                                    'fraud_flag': {'type': 'string', 'description': 'Fraud flag'},
                                    'initiator_type': {'type': 'string', 'description': 'Initiator type'},
                                    'three_d_secure': {'type': 'boolean', 'description': 'Whether 3D Secure was used'},
                                    'authorization_reason': {'type': 'string', 'description': 'Authorization reason'},
                                    'error_code': {'type': 'string', 'description': 'Error code'},
                                    'error_text': {'type': 'string', 'description': 'Error text'},
                                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'fraud_reason': {'type': 'string', 'description': 'Fraud reason'},
                                    'amount_unused': {'type': 'integer', 'description': 'Unused amount (in cents)'},
                                    'masked_card_number': {'type': 'string', 'description': 'Masked card number'},
                                    'reference_transaction_id': {'type': 'string', 'description': 'Reference transaction ID'},
                                    'refunded_txn_id': {'type': 'string', 'description': 'Refunded transaction ID'},
                                    'reference_authorization_id': {'type': 'string', 'description': 'Reference authorization ID'},
                                    'amount_capturable': {'type': 'integer', 'description': 'Capturable amount (in cents)'},
                                    'reversal_transaction_id': {'type': 'string', 'description': 'Reversal transaction ID'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the transaction is deleted'},
                                    'iin': {'type': 'string', 'description': 'Card IIN'},
                                    'last4': {'type': 'string', 'description': 'Last four digits of card'},
                                    'merchant_reference_id': {'type': 'string', 'description': 'Merchant reference ID'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'payment_method_details': {'description': 'Payment method details'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                                    'linked_invoices': {
                                        'type': 'array',
                                        'description': 'Linked invoices',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_credit_notes': {
                                        'type': 'array',
                                        'description': 'Linked credit notes',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_refunds': {
                                        'type': 'array',
                                        'description': 'Linked refunds',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_payments': {
                                        'type': 'array',
                                        'description': 'Linked payments',
                                        'items': {'type': 'object'},
                                    },
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'transaction',
                                'x-airbyte-stream-name': 'transaction',
                            },
                        },
                    },
                    record_extractor='$.transaction',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee transaction object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the transaction'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                    'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                    'payment_source_id': {'type': 'string', 'description': 'Payment source ID'},
                    'payment_method': {'type': 'string', 'description': 'Payment method type'},
                    'reference_number': {'type': 'string', 'description': 'Reference number'},
                    'gateway': {'type': 'string', 'description': 'Payment gateway'},
                    'type': {'type': 'string', 'description': 'Transaction type'},
                    'date': {'type': 'integer', 'description': 'Transaction date timestamp'},
                    'settled_at': {'type': 'integer', 'description': 'Settled at timestamp'},
                    'exchange_rate': {'type': 'number', 'description': 'Exchange rate'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'amount': {'type': 'integer', 'description': 'Transaction amount (in cents)'},
                    'id_at_gateway': {'type': 'string', 'description': 'Transaction ID at gateway'},
                    'status': {'type': 'string', 'description': 'Transaction status'},
                    'fraud_flag': {'type': 'string', 'description': 'Fraud flag'},
                    'initiator_type': {'type': 'string', 'description': 'Initiator type'},
                    'three_d_secure': {'type': 'boolean', 'description': 'Whether 3D Secure was used'},
                    'authorization_reason': {'type': 'string', 'description': 'Authorization reason'},
                    'error_code': {'type': 'string', 'description': 'Error code'},
                    'error_text': {'type': 'string', 'description': 'Error text'},
                    'voided_at': {'type': 'integer', 'description': 'Voided at timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'fraud_reason': {'type': 'string', 'description': 'Fraud reason'},
                    'amount_unused': {'type': 'integer', 'description': 'Unused amount (in cents)'},
                    'masked_card_number': {'type': 'string', 'description': 'Masked card number'},
                    'reference_transaction_id': {'type': 'string', 'description': 'Reference transaction ID'},
                    'refunded_txn_id': {'type': 'string', 'description': 'Refunded transaction ID'},
                    'reference_authorization_id': {'type': 'string', 'description': 'Reference authorization ID'},
                    'amount_capturable': {'type': 'integer', 'description': 'Capturable amount (in cents)'},
                    'reversal_transaction_id': {'type': 'string', 'description': 'Reversal transaction ID'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the transaction is deleted'},
                    'iin': {'type': 'string', 'description': 'Card IIN'},
                    'last4': {'type': 'string', 'description': 'Last four digits of card'},
                    'merchant_reference_id': {'type': 'string', 'description': 'Merchant reference ID'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'payment_method_details': {'description': 'Payment method details'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'base_currency_code': {'type': 'string', 'description': 'Base currency code'},
                    'linked_invoices': {
                        'type': 'array',
                        'description': 'Linked invoices',
                        'items': {'type': 'object'},
                    },
                    'linked_credit_notes': {
                        'type': 'array',
                        'description': 'Linked credit notes',
                        'items': {'type': 'object'},
                    },
                    'linked_refunds': {
                        'type': 'array',
                        'description': 'Linked refunds',
                        'items': {'type': 'object'},
                    },
                    'linked_payments': {
                        'type': 'array',
                        'description': 'Linked payments',
                        'items': {'type': 'object'},
                    },
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'transaction',
                'x-airbyte-stream-name': 'transaction',
            },
        ),
        EntityDefinition(
            name='event',
            stream_name='event',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/events',
                    action=Action.LIST,
                    description='List events',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of events',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'event': {
                                            'type': 'object',
                                            'description': 'Chargebee event object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the event'},
                                                'occurred_at': {'type': 'integer', 'description': 'Timestamp when the event occurred'},
                                                'source': {'type': 'string', 'description': 'Source of the event'},
                                                'user': {'type': 'string', 'description': 'User who triggered the event'},
                                                'event_type': {'type': 'string', 'description': 'Type of event'},
                                                'api_version': {'type': 'string', 'description': 'API version'},
                                                'content': {'type': 'object', 'description': 'Event content/payload'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'webhook_status': {'type': 'string', 'description': 'Webhook delivery status'},
                                                'webhooks': {
                                                    'type': 'array',
                                                    'description': 'Webhook details',
                                                    'items': {'type': 'object'},
                                                },
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'event',
                                            'x-airbyte-stream-name': 'event',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].event',
                    meta_extractor={'next_offset': '$.next_offset'},
                    preferred_for_check=True,
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/events/{id}',
                    action=Action.GET,
                    description='Retrieve an event',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'event': {
                                'type': 'object',
                                'description': 'Chargebee event object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the event'},
                                    'occurred_at': {'type': 'integer', 'description': 'Timestamp when the event occurred'},
                                    'source': {'type': 'string', 'description': 'Source of the event'},
                                    'user': {'type': 'string', 'description': 'User who triggered the event'},
                                    'event_type': {'type': 'string', 'description': 'Type of event'},
                                    'api_version': {'type': 'string', 'description': 'API version'},
                                    'content': {'type': 'object', 'description': 'Event content/payload'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'webhook_status': {'type': 'string', 'description': 'Webhook delivery status'},
                                    'webhooks': {
                                        'type': 'array',
                                        'description': 'Webhook details',
                                        'items': {'type': 'object'},
                                    },
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'event',
                                'x-airbyte-stream-name': 'event',
                            },
                        },
                    },
                    record_extractor='$.event',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee event object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the event'},
                    'occurred_at': {'type': 'integer', 'description': 'Timestamp when the event occurred'},
                    'source': {'type': 'string', 'description': 'Source of the event'},
                    'user': {'type': 'string', 'description': 'User who triggered the event'},
                    'event_type': {'type': 'string', 'description': 'Type of event'},
                    'api_version': {'type': 'string', 'description': 'API version'},
                    'content': {'type': 'object', 'description': 'Event content/payload'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'webhook_status': {'type': 'string', 'description': 'Webhook delivery status'},
                    'webhooks': {
                        'type': 'array',
                        'description': 'Webhook details',
                        'items': {'type': 'object'},
                    },
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'event',
                'x-airbyte-stream-name': 'event',
            },
        ),
        EntityDefinition(
            name='order',
            stream_name='order',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/orders',
                    action=Action.LIST,
                    description='List orders',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of orders',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'order': {
                                            'type': 'object',
                                            'description': 'Chargebee order object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the order'},
                                                'document_number': {'type': 'string', 'description': 'Document number'},
                                                'invoice_id': {'type': 'string', 'description': 'Invoice ID'},
                                                'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'status': {'type': 'string', 'description': 'Order status'},
                                                'cancellation_reason': {'type': 'string', 'description': 'Cancellation reason'},
                                                'payment_status': {'type': 'string', 'description': 'Payment status'},
                                                'order_type': {'type': 'string', 'description': 'Order type'},
                                                'price_type': {'type': 'string', 'description': 'Price type'},
                                                'reference_id': {'type': 'string', 'description': 'Reference ID'},
                                                'fulfillment_status': {'type': 'string', 'description': 'Fulfillment status'},
                                                'order_date': {'type': 'integer', 'description': 'Order date timestamp'},
                                                'shipping_date': {'type': 'integer', 'description': 'Shipping date timestamp'},
                                                'note': {'type': 'string', 'description': 'Order notes'},
                                                'tracking_id': {'type': 'string', 'description': 'Tracking ID'},
                                                'tracking_url': {'type': 'string', 'description': 'Tracking URL'},
                                                'batch_id': {'type': 'string', 'description': 'Batch ID'},
                                                'created_by': {'type': 'string', 'description': 'Created by user'},
                                                'shipment_carrier': {'type': 'string', 'description': 'Shipment carrier'},
                                                'invoice_round_off_amount': {'type': 'integer', 'description': 'Invoice round-off amount (in cents)'},
                                                'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                                                'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                                                'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                                                'refundable_credits_issued': {'type': 'integer', 'description': 'Refundable credits issued (in cents)'},
                                                'refundable_credits': {'type': 'integer', 'description': 'Refundable credits (in cents)'},
                                                'rounding_adjustement': {'type': 'integer', 'description': 'Rounding adjustment amount (in cents)'},
                                                'paid_on': {'type': 'integer', 'description': 'Paid on timestamp'},
                                                'shipping_cut_off_date': {'type': 'integer', 'description': 'Shipping cut-off date timestamp'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                                'status_update_at': {'type': 'integer', 'description': 'Status update timestamp'},
                                                'delivered_at': {'type': 'integer', 'description': 'Delivered at timestamp'},
                                                'shipped_at': {'type': 'integer', 'description': 'Shipped at timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'cancelled_at': {'type': 'integer', 'description': 'Cancelled at timestamp'},
                                                'resent_status': {'type': 'string', 'description': 'Resent status'},
                                                'is_resent': {'type': 'boolean', 'description': 'Whether this is a resent order'},
                                                'original_order_id': {'type': 'string', 'description': 'Original order ID'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the order is deleted'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'is_gifted': {'type': 'boolean', 'description': 'Whether the order is a gift'},
                                                'gift_note': {'type': 'string', 'description': 'Gift note'},
                                                'gift_id': {'type': 'string', 'description': 'Gift ID'},
                                                'resend_reason': {'type': 'string', 'description': 'Resend reason'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'discount': {'type': 'integer', 'description': 'Discount amount (in cents)'},
                                                'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                                'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                                'order_line_items': {
                                                    'type': 'array',
                                                    'description': 'Order line items',
                                                    'items': {'type': 'object'},
                                                },
                                                'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                                'billing_address': {'type': 'object', 'description': 'Billing address'},
                                                'line_item_taxes': {
                                                    'type': 'array',
                                                    'description': 'Line item taxes',
                                                    'items': {'type': 'object'},
                                                },
                                                'line_item_discounts': {
                                                    'type': 'array',
                                                    'description': 'Line item discounts',
                                                    'items': {'type': 'object'},
                                                },
                                                'linked_credit_notes': {
                                                    'type': 'array',
                                                    'description': 'Linked credit notes',
                                                    'items': {'type': 'object'},
                                                },
                                                'resent_orders': {
                                                    'type': 'array',
                                                    'description': 'Resent orders',
                                                    'items': {'type': 'object'},
                                                },
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'order',
                                            'x-airbyte-stream-name': 'order',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].order',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/orders/{id}',
                    action=Action.GET,
                    description='Retrieve an order',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'order': {
                                'type': 'object',
                                'description': 'Chargebee order object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the order'},
                                    'document_number': {'type': 'string', 'description': 'Document number'},
                                    'invoice_id': {'type': 'string', 'description': 'Invoice ID'},
                                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'status': {'type': 'string', 'description': 'Order status'},
                                    'cancellation_reason': {'type': 'string', 'description': 'Cancellation reason'},
                                    'payment_status': {'type': 'string', 'description': 'Payment status'},
                                    'order_type': {'type': 'string', 'description': 'Order type'},
                                    'price_type': {'type': 'string', 'description': 'Price type'},
                                    'reference_id': {'type': 'string', 'description': 'Reference ID'},
                                    'fulfillment_status': {'type': 'string', 'description': 'Fulfillment status'},
                                    'order_date': {'type': 'integer', 'description': 'Order date timestamp'},
                                    'shipping_date': {'type': 'integer', 'description': 'Shipping date timestamp'},
                                    'note': {'type': 'string', 'description': 'Order notes'},
                                    'tracking_id': {'type': 'string', 'description': 'Tracking ID'},
                                    'tracking_url': {'type': 'string', 'description': 'Tracking URL'},
                                    'batch_id': {'type': 'string', 'description': 'Batch ID'},
                                    'created_by': {'type': 'string', 'description': 'Created by user'},
                                    'shipment_carrier': {'type': 'string', 'description': 'Shipment carrier'},
                                    'invoice_round_off_amount': {'type': 'integer', 'description': 'Invoice round-off amount (in cents)'},
                                    'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                                    'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                                    'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                                    'refundable_credits_issued': {'type': 'integer', 'description': 'Refundable credits issued (in cents)'},
                                    'refundable_credits': {'type': 'integer', 'description': 'Refundable credits (in cents)'},
                                    'rounding_adjustement': {'type': 'integer', 'description': 'Rounding adjustment amount (in cents)'},
                                    'paid_on': {'type': 'integer', 'description': 'Paid on timestamp'},
                                    'shipping_cut_off_date': {'type': 'integer', 'description': 'Shipping cut-off date timestamp'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                    'status_update_at': {'type': 'integer', 'description': 'Status update timestamp'},
                                    'delivered_at': {'type': 'integer', 'description': 'Delivered at timestamp'},
                                    'shipped_at': {'type': 'integer', 'description': 'Shipped at timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'cancelled_at': {'type': 'integer', 'description': 'Cancelled at timestamp'},
                                    'resent_status': {'type': 'string', 'description': 'Resent status'},
                                    'is_resent': {'type': 'boolean', 'description': 'Whether this is a resent order'},
                                    'original_order_id': {'type': 'string', 'description': 'Original order ID'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the order is deleted'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'is_gifted': {'type': 'boolean', 'description': 'Whether the order is a gift'},
                                    'gift_note': {'type': 'string', 'description': 'Gift note'},
                                    'gift_id': {'type': 'string', 'description': 'Gift ID'},
                                    'resend_reason': {'type': 'string', 'description': 'Resend reason'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'discount': {'type': 'integer', 'description': 'Discount amount (in cents)'},
                                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                                    'order_line_items': {
                                        'type': 'array',
                                        'description': 'Order line items',
                                        'items': {'type': 'object'},
                                    },
                                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                                    'line_item_taxes': {
                                        'type': 'array',
                                        'description': 'Line item taxes',
                                        'items': {'type': 'object'},
                                    },
                                    'line_item_discounts': {
                                        'type': 'array',
                                        'description': 'Line item discounts',
                                        'items': {'type': 'object'},
                                    },
                                    'linked_credit_notes': {
                                        'type': 'array',
                                        'description': 'Linked credit notes',
                                        'items': {'type': 'object'},
                                    },
                                    'resent_orders': {
                                        'type': 'array',
                                        'description': 'Resent orders',
                                        'items': {'type': 'object'},
                                    },
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'order',
                                'x-airbyte-stream-name': 'order',
                            },
                        },
                    },
                    record_extractor='$.order',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee order object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the order'},
                    'document_number': {'type': 'string', 'description': 'Document number'},
                    'invoice_id': {'type': 'string', 'description': 'Invoice ID'},
                    'subscription_id': {'type': 'string', 'description': 'Subscription ID'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'status': {'type': 'string', 'description': 'Order status'},
                    'cancellation_reason': {'type': 'string', 'description': 'Cancellation reason'},
                    'payment_status': {'type': 'string', 'description': 'Payment status'},
                    'order_type': {'type': 'string', 'description': 'Order type'},
                    'price_type': {'type': 'string', 'description': 'Price type'},
                    'reference_id': {'type': 'string', 'description': 'Reference ID'},
                    'fulfillment_status': {'type': 'string', 'description': 'Fulfillment status'},
                    'order_date': {'type': 'integer', 'description': 'Order date timestamp'},
                    'shipping_date': {'type': 'integer', 'description': 'Shipping date timestamp'},
                    'note': {'type': 'string', 'description': 'Order notes'},
                    'tracking_id': {'type': 'string', 'description': 'Tracking ID'},
                    'tracking_url': {'type': 'string', 'description': 'Tracking URL'},
                    'batch_id': {'type': 'string', 'description': 'Batch ID'},
                    'created_by': {'type': 'string', 'description': 'Created by user'},
                    'shipment_carrier': {'type': 'string', 'description': 'Shipment carrier'},
                    'invoice_round_off_amount': {'type': 'integer', 'description': 'Invoice round-off amount (in cents)'},
                    'tax': {'type': 'integer', 'description': 'Tax amount (in cents)'},
                    'amount_paid': {'type': 'integer', 'description': 'Amount paid (in cents)'},
                    'amount_adjusted': {'type': 'integer', 'description': 'Amount adjusted (in cents)'},
                    'refundable_credits_issued': {'type': 'integer', 'description': 'Refundable credits issued (in cents)'},
                    'refundable_credits': {'type': 'integer', 'description': 'Refundable credits (in cents)'},
                    'rounding_adjustement': {'type': 'integer', 'description': 'Rounding adjustment amount (in cents)'},
                    'paid_on': {'type': 'integer', 'description': 'Paid on timestamp'},
                    'shipping_cut_off_date': {'type': 'integer', 'description': 'Shipping cut-off date timestamp'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                    'status_update_at': {'type': 'integer', 'description': 'Status update timestamp'},
                    'delivered_at': {'type': 'integer', 'description': 'Delivered at timestamp'},
                    'shipped_at': {'type': 'integer', 'description': 'Shipped at timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'cancelled_at': {'type': 'integer', 'description': 'Cancelled at timestamp'},
                    'resent_status': {'type': 'string', 'description': 'Resent status'},
                    'is_resent': {'type': 'boolean', 'description': 'Whether this is a resent order'},
                    'original_order_id': {'type': 'string', 'description': 'Original order ID'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the order is deleted'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'is_gifted': {'type': 'boolean', 'description': 'Whether the order is a gift'},
                    'gift_note': {'type': 'string', 'description': 'Gift note'},
                    'gift_id': {'type': 'string', 'description': 'Gift ID'},
                    'resend_reason': {'type': 'string', 'description': 'Resend reason'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'discount': {'type': 'integer', 'description': 'Discount amount (in cents)'},
                    'sub_total': {'type': 'integer', 'description': 'Subtotal (in cents)'},
                    'total': {'type': 'integer', 'description': 'Total amount (in cents)'},
                    'order_line_items': {
                        'type': 'array',
                        'description': 'Order line items',
                        'items': {'type': 'object'},
                    },
                    'shipping_address': {'type': 'object', 'description': 'Shipping address'},
                    'billing_address': {'type': 'object', 'description': 'Billing address'},
                    'line_item_taxes': {
                        'type': 'array',
                        'description': 'Line item taxes',
                        'items': {'type': 'object'},
                    },
                    'line_item_discounts': {
                        'type': 'array',
                        'description': 'Line item discounts',
                        'items': {'type': 'object'},
                    },
                    'linked_credit_notes': {
                        'type': 'array',
                        'description': 'Linked credit notes',
                        'items': {'type': 'object'},
                    },
                    'resent_orders': {
                        'type': 'array',
                        'description': 'Resent orders',
                        'items': {'type': 'object'},
                    },
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'order',
                'x-airbyte-stream-name': 'order',
            },
        ),
        EntityDefinition(
            name='item',
            stream_name='item',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/items',
                    action=Action.LIST,
                    description='List items',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of items',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'item': {
                                            'type': 'object',
                                            'description': 'Chargebee item object (Product Catalog 2.0)',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the item'},
                                                'name': {'type': 'string', 'description': 'Item name'},
                                                'external_name': {'type': 'string', 'description': 'External display name'},
                                                'description': {'type': 'string', 'description': 'Item description'},
                                                'status': {'type': 'string', 'description': 'Item status'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                                                'type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                                                'is_shippable': {'type': 'boolean', 'description': 'Whether the item is shippable'},
                                                'is_giftable': {'type': 'boolean', 'description': 'Whether the item is giftable'},
                                                'redirect_url': {'type': 'string', 'description': 'Redirect URL after checkout'},
                                                'enabled_for_checkout': {'type': 'boolean', 'description': 'Whether enabled for checkout'},
                                                'enabled_in_portal': {'type': 'boolean', 'description': 'Whether enabled in portal'},
                                                'included_in_mrr': {'type': 'boolean', 'description': 'Whether included in MRR'},
                                                'item_applicability': {'type': 'string', 'description': 'Item applicability setting'},
                                                'gift_claim_redirect_url': {'type': 'string', 'description': 'Gift claim redirect URL'},
                                                'unit': {'type': 'string', 'description': 'Unit of measure'},
                                                'metered': {'type': 'boolean', 'description': 'Whether the item is metered'},
                                                'usage_calculation': {'type': 'string', 'description': 'Usage calculation method'},
                                                'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                                'channel': {'type': 'string', 'description': 'Channel'},
                                                'metadata': {'type': 'object', 'description': 'Additional metadata'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the item is deleted'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'applicable_items': {
                                                    'type': 'array',
                                                    'description': 'Applicable items for plan-items',
                                                    'items': {'type': 'object'},
                                                },
                                                'bundle_items': {
                                                    'type': 'array',
                                                    'description': 'Bundle items',
                                                    'items': {'type': 'object'},
                                                },
                                                'bundle_configuration': {'type': 'object', 'description': 'Bundle configuration'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'is_percentage_pricing': {'type': 'boolean', 'description': 'Whether percentage pricing is used'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'item',
                                            'x-airbyte-stream-name': 'item',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].item',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/items/{id}',
                    action=Action.GET,
                    description='Retrieve an item',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'item': {
                                'type': 'object',
                                'description': 'Chargebee item object (Product Catalog 2.0)',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the item'},
                                    'name': {'type': 'string', 'description': 'Item name'},
                                    'external_name': {'type': 'string', 'description': 'External display name'},
                                    'description': {'type': 'string', 'description': 'Item description'},
                                    'status': {'type': 'string', 'description': 'Item status'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                                    'type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                                    'is_shippable': {'type': 'boolean', 'description': 'Whether the item is shippable'},
                                    'is_giftable': {'type': 'boolean', 'description': 'Whether the item is giftable'},
                                    'redirect_url': {'type': 'string', 'description': 'Redirect URL after checkout'},
                                    'enabled_for_checkout': {'type': 'boolean', 'description': 'Whether enabled for checkout'},
                                    'enabled_in_portal': {'type': 'boolean', 'description': 'Whether enabled in portal'},
                                    'included_in_mrr': {'type': 'boolean', 'description': 'Whether included in MRR'},
                                    'item_applicability': {'type': 'string', 'description': 'Item applicability setting'},
                                    'gift_claim_redirect_url': {'type': 'string', 'description': 'Gift claim redirect URL'},
                                    'unit': {'type': 'string', 'description': 'Unit of measure'},
                                    'metered': {'type': 'boolean', 'description': 'Whether the item is metered'},
                                    'usage_calculation': {'type': 'string', 'description': 'Usage calculation method'},
                                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                    'channel': {'type': 'string', 'description': 'Channel'},
                                    'metadata': {'type': 'object', 'description': 'Additional metadata'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the item is deleted'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'applicable_items': {
                                        'type': 'array',
                                        'description': 'Applicable items for plan-items',
                                        'items': {'type': 'object'},
                                    },
                                    'bundle_items': {
                                        'type': 'array',
                                        'description': 'Bundle items',
                                        'items': {'type': 'object'},
                                    },
                                    'bundle_configuration': {'type': 'object', 'description': 'Bundle configuration'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'is_percentage_pricing': {'type': 'boolean', 'description': 'Whether percentage pricing is used'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'item',
                                'x-airbyte-stream-name': 'item',
                            },
                        },
                    },
                    record_extractor='$.item',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee item object (Product Catalog 2.0)',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the item'},
                    'name': {'type': 'string', 'description': 'Item name'},
                    'external_name': {'type': 'string', 'description': 'External display name'},
                    'description': {'type': 'string', 'description': 'Item description'},
                    'status': {'type': 'string', 'description': 'Item status'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                    'type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                    'is_shippable': {'type': 'boolean', 'description': 'Whether the item is shippable'},
                    'is_giftable': {'type': 'boolean', 'description': 'Whether the item is giftable'},
                    'redirect_url': {'type': 'string', 'description': 'Redirect URL after checkout'},
                    'enabled_for_checkout': {'type': 'boolean', 'description': 'Whether enabled for checkout'},
                    'enabled_in_portal': {'type': 'boolean', 'description': 'Whether enabled in portal'},
                    'included_in_mrr': {'type': 'boolean', 'description': 'Whether included in MRR'},
                    'item_applicability': {'type': 'string', 'description': 'Item applicability setting'},
                    'gift_claim_redirect_url': {'type': 'string', 'description': 'Gift claim redirect URL'},
                    'unit': {'type': 'string', 'description': 'Unit of measure'},
                    'metered': {'type': 'boolean', 'description': 'Whether the item is metered'},
                    'usage_calculation': {'type': 'string', 'description': 'Usage calculation method'},
                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                    'channel': {'type': 'string', 'description': 'Channel'},
                    'metadata': {'type': 'object', 'description': 'Additional metadata'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the item is deleted'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'applicable_items': {
                        'type': 'array',
                        'description': 'Applicable items for plan-items',
                        'items': {'type': 'object'},
                    },
                    'bundle_items': {
                        'type': 'array',
                        'description': 'Bundle items',
                        'items': {'type': 'object'},
                    },
                    'bundle_configuration': {'type': 'object', 'description': 'Bundle configuration'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'is_percentage_pricing': {'type': 'boolean', 'description': 'Whether percentage pricing is used'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'item',
                'x-airbyte-stream-name': 'item',
            },
        ),
        EntityDefinition(
            name='item_price',
            stream_name='item_price',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/item_prices',
                    action=Action.LIST,
                    description='List item prices',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of item prices',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'item_price': {
                                            'type': 'object',
                                            'description': 'Chargebee item price object (Product Catalog 2.0)',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the item price'},
                                                'name': {'type': 'string', 'description': 'Item price name'},
                                                'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                                                'item_id': {'type': 'string', 'description': 'Item ID'},
                                                'item_type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                                                'description': {'type': 'string', 'description': 'Item price description'},
                                                'status': {'type': 'string', 'description': 'Item price status'},
                                                'external_name': {'type': 'string', 'description': 'External display name'},
                                                'pricing_model': {'type': 'string', 'description': 'Pricing model'},
                                                'price': {'type': 'integer', 'description': 'Price (in cents)'},
                                                'price_in_decimal': {'type': 'string', 'description': 'Price in decimal'},
                                                'period': {'type': 'integer', 'description': 'Billing period'},
                                                'period_unit': {'type': 'string', 'description': 'Period unit'},
                                                'trial_period': {'type': 'integer', 'description': 'Trial period'},
                                                'trial_period_unit': {'type': 'string', 'description': 'Trial period unit'},
                                                'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                                                'shipping_period': {'type': 'integer', 'description': 'Shipping period'},
                                                'shipping_period_unit': {'type': 'string', 'description': 'Shipping period unit'},
                                                'billing_cycles': {'type': 'integer', 'description': 'Number of billing cycles'},
                                                'free_quantity': {'type': 'integer', 'description': 'Free quantity'},
                                                'free_quantity_in_decimal': {'type': 'string', 'description': 'Free quantity in decimal'},
                                                'currency_code': {'type': 'string', 'description': 'Currency code'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                                'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                                'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                                'is_taxable': {'type': 'boolean', 'description': 'Whether the item price is taxable'},
                                                'metadata': {'type': 'object', 'description': 'Additional metadata'},
                                                'tax_detail': {'type': 'object', 'description': 'Tax details'},
                                                'accounting_detail': {'type': 'object', 'description': 'Accounting details'},
                                                'tiers': {
                                                    'type': 'array',
                                                    'description': 'Pricing tiers',
                                                    'items': {'type': 'object'},
                                                },
                                                'tax_providers_fields': {
                                                    'type': 'array',
                                                    'description': 'Tax provider fields',
                                                    'items': {'type': 'object'},
                                                },
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'channel': {'type': 'string', 'description': 'Channel'},
                                                'show_description_in_invoices': {'type': 'boolean', 'description': 'Whether to show description in invoices'},
                                                'show_description_in_quotes': {'type': 'boolean', 'description': 'Whether to show description in quotes'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the item price is deleted'},
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'item_price',
                                            'x-airbyte-stream-name': 'item_price',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].item_price',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/item_prices/{id}',
                    action=Action.GET,
                    description='Retrieve an item price',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'item_price': {
                                'type': 'object',
                                'description': 'Chargebee item price object (Product Catalog 2.0)',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the item price'},
                                    'name': {'type': 'string', 'description': 'Item price name'},
                                    'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                                    'item_id': {'type': 'string', 'description': 'Item ID'},
                                    'item_type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                                    'description': {'type': 'string', 'description': 'Item price description'},
                                    'status': {'type': 'string', 'description': 'Item price status'},
                                    'external_name': {'type': 'string', 'description': 'External display name'},
                                    'pricing_model': {'type': 'string', 'description': 'Pricing model'},
                                    'price': {'type': 'integer', 'description': 'Price (in cents)'},
                                    'price_in_decimal': {'type': 'string', 'description': 'Price in decimal'},
                                    'period': {'type': 'integer', 'description': 'Billing period'},
                                    'period_unit': {'type': 'string', 'description': 'Period unit'},
                                    'trial_period': {'type': 'integer', 'description': 'Trial period'},
                                    'trial_period_unit': {'type': 'string', 'description': 'Trial period unit'},
                                    'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                                    'shipping_period': {'type': 'integer', 'description': 'Shipping period'},
                                    'shipping_period_unit': {'type': 'string', 'description': 'Shipping period unit'},
                                    'billing_cycles': {'type': 'integer', 'description': 'Number of billing cycles'},
                                    'free_quantity': {'type': 'integer', 'description': 'Free quantity'},
                                    'free_quantity_in_decimal': {'type': 'string', 'description': 'Free quantity in decimal'},
                                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                                    'is_taxable': {'type': 'boolean', 'description': 'Whether the item price is taxable'},
                                    'metadata': {'type': 'object', 'description': 'Additional metadata'},
                                    'tax_detail': {'type': 'object', 'description': 'Tax details'},
                                    'accounting_detail': {'type': 'object', 'description': 'Accounting details'},
                                    'tiers': {
                                        'type': 'array',
                                        'description': 'Pricing tiers',
                                        'items': {'type': 'object'},
                                    },
                                    'tax_providers_fields': {
                                        'type': 'array',
                                        'description': 'Tax provider fields',
                                        'items': {'type': 'object'},
                                    },
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'channel': {'type': 'string', 'description': 'Channel'},
                                    'show_description_in_invoices': {'type': 'boolean', 'description': 'Whether to show description in invoices'},
                                    'show_description_in_quotes': {'type': 'boolean', 'description': 'Whether to show description in quotes'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the item price is deleted'},
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'item_price',
                                'x-airbyte-stream-name': 'item_price',
                            },
                        },
                    },
                    record_extractor='$.item_price',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee item price object (Product Catalog 2.0)',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the item price'},
                    'name': {'type': 'string', 'description': 'Item price name'},
                    'item_family_id': {'type': 'string', 'description': 'Item family ID'},
                    'item_id': {'type': 'string', 'description': 'Item ID'},
                    'item_type': {'type': 'string', 'description': 'Item type (plan, addon, charge)'},
                    'description': {'type': 'string', 'description': 'Item price description'},
                    'status': {'type': 'string', 'description': 'Item price status'},
                    'external_name': {'type': 'string', 'description': 'External display name'},
                    'pricing_model': {'type': 'string', 'description': 'Pricing model'},
                    'price': {'type': 'integer', 'description': 'Price (in cents)'},
                    'price_in_decimal': {'type': 'string', 'description': 'Price in decimal'},
                    'period': {'type': 'integer', 'description': 'Billing period'},
                    'period_unit': {'type': 'string', 'description': 'Period unit'},
                    'trial_period': {'type': 'integer', 'description': 'Trial period'},
                    'trial_period_unit': {'type': 'string', 'description': 'Trial period unit'},
                    'trial_end_action': {'type': 'string', 'description': 'Action at trial end'},
                    'shipping_period': {'type': 'integer', 'description': 'Shipping period'},
                    'shipping_period_unit': {'type': 'string', 'description': 'Shipping period unit'},
                    'billing_cycles': {'type': 'integer', 'description': 'Number of billing cycles'},
                    'free_quantity': {'type': 'integer', 'description': 'Free quantity'},
                    'free_quantity_in_decimal': {'type': 'string', 'description': 'Free quantity in decimal'},
                    'currency_code': {'type': 'string', 'description': 'Currency code'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                    'archived_at': {'type': 'integer', 'description': 'Archived at timestamp'},
                    'invoice_notes': {'type': 'string', 'description': 'Invoice notes'},
                    'is_taxable': {'type': 'boolean', 'description': 'Whether the item price is taxable'},
                    'metadata': {'type': 'object', 'description': 'Additional metadata'},
                    'tax_detail': {'type': 'object', 'description': 'Tax details'},
                    'accounting_detail': {'type': 'object', 'description': 'Accounting details'},
                    'tiers': {
                        'type': 'array',
                        'description': 'Pricing tiers',
                        'items': {'type': 'object'},
                    },
                    'tax_providers_fields': {
                        'type': 'array',
                        'description': 'Tax provider fields',
                        'items': {'type': 'object'},
                    },
                    'object': {'type': 'string', 'description': 'Object type'},
                    'channel': {'type': 'string', 'description': 'Channel'},
                    'show_description_in_invoices': {'type': 'boolean', 'description': 'Whether to show description in invoices'},
                    'show_description_in_quotes': {'type': 'boolean', 'description': 'Whether to show description in quotes'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the item price is deleted'},
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'item_price',
                'x-airbyte-stream-name': 'item_price',
            },
        ),
        EntityDefinition(
            name='payment_source',
            stream_name='payment_source',
            actions=[Action.LIST, Action.GET],
            endpoints={
                Action.LIST: EndpointDefinition(
                    method='GET',
                    path='/payment_sources',
                    action=Action.LIST,
                    description='List payment sources',
                    query_params=['limit', 'offset'],
                    query_params_schema={
                        'limit': {
                            'type': 'integer',
                            'required': False,
                            'default': 100,
                        },
                        'offset': {'type': 'string', 'required': False},
                    },
                    response_schema={
                        'type': 'object',
                        'description': 'Paginated list of payment sources',
                        'properties': {
                            'list': {
                                'type': 'array',
                                'items': {
                                    'type': 'object',
                                    'properties': {
                                        'payment_source': {
                                            'type': 'object',
                                            'description': 'Chargebee payment source object',
                                            'properties': {
                                                'id': {'type': 'string', 'description': 'Unique identifier for the payment source'},
                                                'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                                'type': {'type': 'string', 'description': 'Payment source type'},
                                                'reference_id': {'type': 'string', 'description': 'Reference ID'},
                                                'status': {'type': 'string', 'description': 'Payment source status'},
                                                'gateway': {'type': 'string', 'description': 'Payment gateway'},
                                                'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                                                'ip_address': {'type': 'string', 'description': 'IP address'},
                                                'issuing_country': {'type': 'string', 'description': 'Issuing country'},
                                                'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                                'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                                'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                                'deleted': {'type': 'boolean', 'description': 'Whether the payment source is deleted'},
                                                'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                                'object': {'type': 'string', 'description': 'Object type'},
                                                'card': {'type': 'object', 'description': 'Card payment details'},
                                                'bank_account': {'type': 'object', 'description': 'Bank account details'},
                                                'amazon_payment': {'type': 'object', 'description': 'Amazon payment details'},
                                                'paypal': {'type': 'object', 'description': 'PayPal payment details'},
                                                'upi': {'type': 'object', 'description': 'UPI payment details'},
                                                'mandates': {'type': 'object', 'description': 'Mandate details'},
                                                'custom_fields': {
                                                    'type': 'array',
                                                    'description': 'Custom fields',
                                                    'items': {'type': 'object'},
                                                },
                                            },
                                            'required': ['id'],
                                            'x-airbyte-entity-name': 'payment_source',
                                            'x-airbyte-stream-name': 'payment_source',
                                        },
                                    },
                                },
                            },
                            'next_offset': {'type': 'string', 'description': 'Cursor for next page'},
                        },
                    },
                    record_extractor='$.list[*].payment_source',
                    meta_extractor={'next_offset': '$.next_offset'},
                ),
                Action.GET: EndpointDefinition(
                    method='GET',
                    path='/payment_sources/{id}',
                    action=Action.GET,
                    description='Retrieve a payment source',
                    path_params=['id'],
                    path_params_schema={
                        'id': {'type': 'string', 'required': True},
                    },
                    response_schema={
                        'type': 'object',
                        'properties': {
                            'payment_source': {
                                'type': 'object',
                                'description': 'Chargebee payment source object',
                                'properties': {
                                    'id': {'type': 'string', 'description': 'Unique identifier for the payment source'},
                                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                                    'type': {'type': 'string', 'description': 'Payment source type'},
                                    'reference_id': {'type': 'string', 'description': 'Reference ID'},
                                    'status': {'type': 'string', 'description': 'Payment source status'},
                                    'gateway': {'type': 'string', 'description': 'Payment gateway'},
                                    'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                                    'ip_address': {'type': 'string', 'description': 'IP address'},
                                    'issuing_country': {'type': 'string', 'description': 'Issuing country'},
                                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                                    'deleted': {'type': 'boolean', 'description': 'Whether the payment source is deleted'},
                                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                                    'object': {'type': 'string', 'description': 'Object type'},
                                    'card': {'type': 'object', 'description': 'Card payment details'},
                                    'bank_account': {'type': 'object', 'description': 'Bank account details'},
                                    'amazon_payment': {'type': 'object', 'description': 'Amazon payment details'},
                                    'paypal': {'type': 'object', 'description': 'PayPal payment details'},
                                    'upi': {'type': 'object', 'description': 'UPI payment details'},
                                    'mandates': {'type': 'object', 'description': 'Mandate details'},
                                    'custom_fields': {
                                        'type': 'array',
                                        'description': 'Custom fields',
                                        'items': {'type': 'object'},
                                    },
                                },
                                'required': ['id'],
                                'x-airbyte-entity-name': 'payment_source',
                                'x-airbyte-stream-name': 'payment_source',
                            },
                        },
                    },
                    record_extractor='$.payment_source',
                ),
            },
            entity_schema={
                'type': 'object',
                'description': 'Chargebee payment source object',
                'properties': {
                    'id': {'type': 'string', 'description': 'Unique identifier for the payment source'},
                    'customer_id': {'type': 'string', 'description': 'Customer ID'},
                    'type': {'type': 'string', 'description': 'Payment source type'},
                    'reference_id': {'type': 'string', 'description': 'Reference ID'},
                    'status': {'type': 'string', 'description': 'Payment source status'},
                    'gateway': {'type': 'string', 'description': 'Payment gateway'},
                    'gateway_account_id': {'type': 'string', 'description': 'Gateway account ID'},
                    'ip_address': {'type': 'string', 'description': 'IP address'},
                    'issuing_country': {'type': 'string', 'description': 'Issuing country'},
                    'created_at': {'type': 'integer', 'description': 'Creation timestamp'},
                    'updated_at': {'type': 'integer', 'description': 'Last update timestamp'},
                    'resource_version': {'type': 'integer', 'description': 'Resource version'},
                    'deleted': {'type': 'boolean', 'description': 'Whether the payment source is deleted'},
                    'business_entity_id': {'type': 'string', 'description': 'Business entity ID'},
                    'object': {'type': 'string', 'description': 'Object type'},
                    'card': {'type': 'object', 'description': 'Card payment details'},
                    'bank_account': {'type': 'object', 'description': 'Bank account details'},
                    'amazon_payment': {'type': 'object', 'description': 'Amazon payment details'},
                    'paypal': {'type': 'object', 'description': 'PayPal payment details'},
                    'upi': {'type': 'object', 'description': 'UPI payment details'},
                    'mandates': {'type': 'object', 'description': 'Mandate details'},
                    'custom_fields': {
                        'type': 'array',
                        'description': 'Custom fields',
                        'items': {'type': 'object'},
                    },
                },
                'required': ['id'],
                'x-airbyte-entity-name': 'payment_source',
                'x-airbyte-stream-name': 'payment_source',
            },
        ),
    ],
    search_field_paths={
        'subscription': [
            'activated_at',
            'addons',
            'addons[]',
            'affiliate_token',
            'auto_close_invoices',
            'auto_collection',
            'base_currency_code',
            'billing_period',
            'billing_period_unit',
            'business_entity_id',
            'cancel_reason',
            'cancel_reason_code',
            'cancel_schedule_created_at',
            'cancelled_at',
            'channel',
            'charged_event_based_addons',
            'charged_event_based_addons[]',
            'charged_items',
            'charged_items[]',
            'contract_term',
            'contract_term_billing_cycle_on_renewal',
            'coupon',
            'coupons',
            'coupons[]',
            'create_pending_invoices',
            'created_at',
            'created_from_ip',
            'currency_code',
            'current_term_end',
            'current_term_start',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'deleted',
            'discounts',
            'discounts[]',
            'due_invoices_count',
            'due_since',
            'event_based_addons',
            'event_based_addons[]',
            'exchange_rate',
            'free_period',
            'free_period_unit',
            'gift_id',
            'has_scheduled_advance_invoices',
            'has_scheduled_changes',
            'id',
            'invoice_notes',
            'item_tiers',
            'item_tiers[]',
            'meta_data',
            'metadata',
            'mrr',
            'next_billing_at',
            'object',
            'offline_payment_method',
            'override_relationship',
            'pause_date',
            'payment_source_id',
            'plan_amount',
            'plan_amount_in_decimal',
            'plan_free_quantity',
            'plan_free_quantity_in_decimal',
            'plan_id',
            'plan_quantity',
            'plan_quantity_in_decimal',
            'plan_unit_price',
            'plan_unit_price_in_decimal',
            'po_number',
            'referral_info',
            'remaining_billing_cycles',
            'resource_version',
            'resume_date',
            'setup_fee',
            'shipping_address',
            'start_date',
            'started_at',
            'status',
            'subscription_items',
            'subscription_items[]',
            'total_dues',
            'trial_end',
            'trial_end_action',
            'trial_start',
            'updated_at',
        ],
        'customer': [
            'allow_direct_debit',
            'auto_close_invoices',
            'auto_collection',
            'backup_payment_source_id',
            'balances',
            'balances[]',
            'billing_address',
            'billing_date',
            'billing_date_mode',
            'billing_day_of_week',
            'billing_day_of_week_mode',
            'billing_month',
            'business_customer_without_vat_number',
            'business_entity_id',
            'card_status',
            'channel',
            'child_account_access',
            'client_profile_id',
            'company',
            'consolidated_invoicing',
            'contacts',
            'contacts[]',
            'created_at',
            'created_from_ip',
            'custom_fields',
            'custom_fields[]',
            'customer_type',
            'deleted',
            'email',
            'entity_code',
            'excess_payments',
            'exempt_number',
            'exemption_details',
            'exemption_details[]',
            'first_name',
            'fraud_flag',
            'id',
            'invoice_notes',
            'is_location_valid',
            'last_name',
            'locale',
            'meta_data',
            'mrr',
            'net_term_days',
            'object',
            'offline_payment_method',
            'parent_account_access',
            'payment_method',
            'phone',
            'pii_cleared',
            'preferred_currency_code',
            'primary_payment_source_id',
            'promotional_credits',
            'referral_urls',
            'referral_urls[]',
            'refundable_credits',
            'registered_for_gst',
            'relationship',
            'resource_version',
            'tax_providers_fields',
            'tax_providers_fields[]',
            'taxability',
            'unbilled_charges',
            'updated_at',
            'use_default_hierarchy_settings',
            'vat_number',
            'vat_number_prefix',
            'vat_number_status',
            'vat_number_validated_time',
        ],
        'invoice': [
            'adjustment_credit_notes',
            'adjustment_credit_notes[]',
            'amount_adjusted',
            'amount_due',
            'amount_paid',
            'amount_to_collect',
            'applied_credits',
            'applied_credits[]',
            'base_currency_code',
            'billing_address',
            'business_entity_id',
            'channel',
            'credits_applied',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'date',
            'deleted',
            'discounts',
            'discounts[]',
            'due_date',
            'dunning_attempts',
            'dunning_attempts[]',
            'dunning_status',
            'einvoice',
            'exchange_rate',
            'expected_payment_date',
            'first_invoice',
            'generated_at',
            'has_advance_charges',
            'id',
            'is_digital',
            'is_gifted',
            'issued_credit_notes',
            'issued_credit_notes[]',
            'line_item_discounts',
            'line_item_discounts[]',
            'line_item_taxes',
            'line_item_taxes[]',
            'line_item_tiers',
            'line_item_tiers[]',
            'line_items',
            'line_items[]',
            'linked_orders',
            'linked_orders[]',
            'linked_payments',
            'linked_payments[]',
            'linked_taxes_withheld',
            'linked_taxes_withheld[]',
            'local_currency_code',
            'local_currency_exchange_rate',
            'net_term_days',
            'new_sales_amount',
            'next_retry_at',
            'notes',
            'notes[]',
            'object',
            'paid_at',
            'payment_owner',
            'po_number',
            'price_type',
            'recurring',
            'resource_version',
            'round_off_amount',
            'shipping_address',
            'statement_descriptor',
            'status',
            'sub_total',
            'sub_total_in_local_currency',
            'subscription_id',
            'tax',
            'tax_category',
            'taxes',
            'taxes[]',
            'term_finalized',
            'total',
            'total_in_local_currency',
            'updated_at',
            'vat_number',
            'vat_number_prefix',
            'void_reason_code',
            'voided_at',
            'write_off_amount',
        ],
        'credit_note': [
            'allocations',
            'allocations[]',
            'amount_allocated',
            'amount_available',
            'amount_refunded',
            'base_currency_code',
            'billing_address',
            'business_entity_id',
            'channel',
            'create_reason_code',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'customer_notes',
            'date',
            'deleted',
            'discounts',
            'discounts[]',
            'exchange_rate',
            'fractional_correction',
            'generated_at',
            'id',
            'is_digital',
            'is_vat_moss_registered',
            'line_item_discounts',
            'line_item_discounts[]',
            'line_item_taxes',
            'line_item_taxes[]',
            'line_item_tiers',
            'line_item_tiers[]',
            'line_items',
            'line_items[]',
            'linked_refunds',
            'linked_refunds[]',
            'linked_tax_withheld_refunds',
            'linked_tax_withheld_refunds[]',
            'local_currency_code',
            'object',
            'price_type',
            'reason_code',
            'reference_invoice_id',
            'refunded_at',
            'resource_version',
            'round_off_amount',
            'shipping_address',
            'status',
            'sub_total',
            'sub_total_in_local_currency',
            'subscription_id',
            'taxes',
            'taxes[]',
            'total',
            'total_in_local_currency',
            'type',
            'updated_at',
            'vat_number',
            'vat_number_prefix',
            'voided_at',
        ],
        'coupon': [
            'apply_discount_on',
            'apply_on',
            'archived_at',
            'coupon_constraints',
            'coupon_constraints[]',
            'created_at',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'discount_amount',
            'discount_percentage',
            'discount_quantity',
            'discount_type',
            'duration_month',
            'duration_type',
            'id',
            'invoice_name',
            'invoice_notes',
            'item_constraint_criteria',
            'item_constraint_criteria[]',
            'item_constraints',
            'item_constraints[]',
            'max_redemptions',
            'name',
            'object',
            'period',
            'period_unit',
            'redemptions',
            'resource_version',
            'status',
            'updated_at',
            'valid_till',
        ],
        'transaction': [
            'amount',
            'amount_capturable',
            'amount_unused',
            'authorization_reason',
            'base_currency_code',
            'business_entity_id',
            'cn_create_reason_code',
            'cn_date',
            'cn_reference_invoice_id',
            'cn_status',
            'cn_total',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'date',
            'deleted',
            'error_code',
            'error_detail',
            'error_text',
            'exchange_rate',
            'fraud_flag',
            'fraud_reason',
            'gateway',
            'gateway_account_id',
            'id',
            'id_at_gateway',
            'iin',
            'initiator_type',
            'last4',
            'linked_credit_notes',
            'linked_credit_notes[]',
            'linked_invoices',
            'linked_invoices[]',
            'linked_payments',
            'linked_payments[]',
            'linked_refunds',
            'linked_refunds[]',
            'masked_card_number',
            'merchant_reference_id',
            'object',
            'payment_method',
            'payment_method_details',
            'payment_source_id',
            'reference_authorization_id',
            'reference_number',
            'reference_transaction_id',
            'refrence_number',
            'refunded_txn_id',
            'resource_version',
            'reversal_transaction_id',
            'settled_at',
            'status',
            'subscription_id',
            'three_d_secure',
            'txn_amount',
            'txn_date',
            'type',
            'updated_at',
            'voided_at',
        ],
        'event': [
            'api_version',
            'content',
            'custom_fields',
            'custom_fields[]',
            'event_type',
            'id',
            'object',
            'occurred_at',
            'source',
            'user',
            'webhook_status',
            'webhooks',
            'webhooks[]',
        ],
        'order': [
            'amount_adjusted',
            'amount_paid',
            'base_currency_code',
            'batch_id',
            'billing_address',
            'business_entity_id',
            'cancellation_reason',
            'cancelled_at',
            'created_at',
            'created_by',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'deleted',
            'delivered_at',
            'discount',
            'document_number',
            'exchange_rate',
            'fulfillment_status',
            'gift_id',
            'gift_note',
            'id',
            'invoice_id',
            'invoice_round_off_amount',
            'is_gifted',
            'is_resent',
            'line_item_discounts',
            'line_item_discounts[]',
            'line_item_taxes',
            'line_item_taxes[]',
            'linked_credit_notes',
            'linked_credit_notes[]',
            'note',
            'object',
            'order_date',
            'order_line_items',
            'order_line_items[]',
            'order_type',
            'original_order_id',
            'paid_on',
            'payment_status',
            'price_type',
            'reference_id',
            'refundable_credits',
            'refundable_credits_issued',
            'resend_reason',
            'resent_orders',
            'resent_orders[]',
            'resent_status',
            'resource_version',
            'rounding_adjustement',
            'shipment_carrier',
            'shipped_at',
            'shipping_address',
            'shipping_cut_off_date',
            'shipping_date',
            'status',
            'status_update_at',
            'sub_total',
            'subscription_id',
            'tax',
            'total',
            'tracking_id',
            'tracking_url',
            'updated_at',
        ],
        'payment_source': [
            'amazon_payment',
            'bank_account',
            'business_entity_id',
            'card',
            'created_at',
            'custom_fields',
            'custom_fields[]',
            'customer_id',
            'deleted',
            'gateway',
            'gateway_account_id',
            'id',
            'ip_address',
            'issuing_country',
            'mandates',
            'object',
            'paypal',
            'reference_id',
            'resource_version',
            'status',
            'type',
            'updated_at',
            'upi',
        ],
        'item': [
            'applicable_items',
            'applicable_items[]',
            'archived_at',
            'channel',
            'custom_fields',
            'custom_fields[]',
            'description',
            'enabled_for_checkout',
            'enabled_in_portal',
            'external_name',
            'gift_claim_redirect_url',
            'id',
            'included_in_mrr',
            'is_giftable',
            'is_shippable',
            'item_applicability',
            'item_family_id',
            'metadata',
            'metered',
            'name',
            'object',
            'redirect_url',
            'resource_version',
            'status',
            'type',
            'unit',
            'updated_at',
            'usage_calculation',
        ],
        'item_price': [
            'accounting_detail',
            'archived_at',
            'billing_cycles',
            'channel',
            'created_at',
            'currency_code',
            'custom_fields',
            'custom_fields[]',
            'description',
            'external_name',
            'free_quantity',
            'free_quantity_in_decimal',
            'id',
            'invoice_notes',
            'is_taxable',
            'item_family_id',
            'item_id',
            'item_type',
            'metadata',
            'name',
            'object',
            'period',
            'period_unit',
            'price',
            'price_in_decimal',
            'pricing_model',
            'resource_version',
            'shipping_period',
            'shipping_period_unit',
            'show_description_in_invoices',
            'show_description_in_quotes',
            'status',
            'tax_detail',
            'tiers',
            'tiers[]',
            'trial_end_action',
            'trial_period',
            'trial_period_unit',
            'updated_at',
        ],
    },
    server_variable_defaults={'site': 'your-site'},
)