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

from __future__ import annotations
import dataclasses
import requests as requests_http
from ..shared import creditledgerentries as shared_creditledgerentries
from datetime import datetime
from enum import Enum
from typing import Optional

class FetchCustomerCreditsLedgerExternalIDEntryStatusEntryStatus(str, Enum):
    COMMITTED = 'committed'
    PENDING = 'pending'

class FetchCustomerCreditsLedgerExternalIDEntryTypeEntryType(str, Enum):
    INCREMENT = 'increment'
    DECREMENT = 'decrement'
    EXPIRATION_CHANGE = 'expiration_change'
    CREDIT_BLOCK_EXPIRY = 'credit_block_expiry'
    VOID = 'void'
    VOID_INITIATED = 'void_initiated'
    AMENDMENT = 'amendment'



@dataclasses.dataclass
class FetchCustomerCreditsLedgerExternalIDRequest:
    external_customer_id: Optional[str] = dataclasses.field(metadata={'path_param': { 'field_name': 'external_customer_id', 'style': 'simple', 'explode': False }})
    created_at_gt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'created_at[gt]', 'style': 'form', 'explode': True }})
    created_at_gte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'created_at[gte]', 'style': 'form', 'explode': True }})
    created_at_lt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'created_at[lt]', 'style': 'form', 'explode': True }})
    created_at_lte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'created_at[lte]', 'style': 'form', 'explode': True }})
    currency: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'currency', 'style': 'form', 'explode': True }})
    cursor: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'cursor', 'style': 'form', 'explode': True }})
    entry_status: Optional[FetchCustomerCreditsLedgerExternalIDEntryStatusEntryStatus] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'entry_status', 'style': 'form', 'explode': True }})
    entry_type: Optional[FetchCustomerCreditsLedgerExternalIDEntryTypeEntryType] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'entry_type', 'style': 'form', 'explode': True }})
    limit: Optional[int] = dataclasses.field(default=20, metadata={'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': True }})
    minimum_amount: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'minimum_amount', 'style': 'form', 'explode': True }})
    




@dataclasses.dataclass
class FetchCustomerCreditsLedgerExternalIDResponse:
    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_entries: Optional[shared_creditledgerentries.CreditLedgerEntries] = dataclasses.field(default=None)
    r"""OK"""
    raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
    r"""Raw HTTP response; suitable for custom response parsing"""
    

