"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import requests as requests_http
from ..shared import addamendmentcreditledgerentryrequestparams as shared_addamendmentcreditledgerentryrequestparams
from ..shared import adddecrementcreditledgerentryrequestparams as shared_adddecrementcreditledgerentryrequestparams
from ..shared import addexpirationchangecreditledgerentryrequestparams as shared_addexpirationchangecreditledgerentryrequestparams
from ..shared import addincrementcreditledgerentryrequestparams as shared_addincrementcreditledgerentryrequestparams
from ..shared import addvoidcreditledgerentryrequestparams as shared_addvoidcreditledgerentryrequestparams
from ..shared import amendmentledgerentry as shared_amendmentledgerentry
from ..shared import creditblockexpiryledgerentry as shared_creditblockexpiryledgerentry
from ..shared import decrementledgerentry as shared_decrementledgerentry
from ..shared import expirationchangeledgerentry as shared_expirationchangeledgerentry
from ..shared import incrementledgerentry as shared_incrementledgerentry
from ..shared import voidinitiatedledgerentry as shared_voidinitiatedledgerentry
from ..shared import voidledgerentry as shared_voidledgerentry
from typing import Optional, Union



@dataclasses.dataclass
class CreateLedgerEntryExternalIDRequest:
    external_customer_id: Optional[str] = dataclasses.field(metadata={'path_param': { 'field_name': 'external_customer_id', 'style': 'simple', 'explode': False }})
    add_credit_ledger_entry_request_params: Optional[Union[shared_addincrementcreditledgerentryrequestparams.AddIncrementCreditLedgerEntryRequestParams, shared_adddecrementcreditledgerentryrequestparams.AddDecrementCreditLedgerEntryRequestParams, shared_addexpirationchangecreditledgerentryrequestparams.AddExpirationChangeCreditLedgerEntryRequestParams, shared_addvoidcreditledgerentryrequestparams.AddVoidCreditLedgerEntryRequestParams, shared_addamendmentcreditledgerentryrequestparams.AddAmendmentCreditLedgerEntryRequestParams]] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
    




@dataclasses.dataclass
class CreateLedgerEntryExternalIDResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    credit_ledger_entry: Optional[Union[shared_incrementledgerentry.IncrementLedgerEntry, shared_decrementledgerentry.DecrementLedgerEntry, shared_expirationchangeledgerentry.ExpirationChangeLedgerEntry, shared_creditblockexpiryledgerentry.CreditBlockExpiryLedgerEntry, shared_voidledgerentry.VoidLedgerEntry, shared_voidinitiatedledgerentry.VoidInitiatedLedgerEntry, shared_amendmentledgerentry.AmendmentLedgerEntry]] = dataclasses.field(default=None)
    r"""Created"""
    raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
    r"""Raw HTTP response; suitable for custom response parsing"""
    

