"""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 ..shared import entrystatus as shared_entrystatus
from ..shared import entrytype as shared_entrytype
from typing import Optional



@dataclasses.dataclass
class FetchCustomerCreditsLedgerRequest:
    customer_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'customer_id', 'style': 'simple', 'explode': False }})
    cursor: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'cursor', 'style': 'form', 'explode': True }})
    r"""Cursor for pagination. This can be populated by the `next_cursor` value returned from the initial request."""
    entry_status: Optional[shared_entrystatus.EntryStatus] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'entry_status', 'style': 'form', 'explode': True }})
    r"""Filters to a single status of ledger entry"""
    entry_type: Optional[shared_entrytype.EntryType] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'entry_type', 'style': 'form', 'explode': True }})
    r"""Filter to a single type of ledger entry"""
    limit: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': True }})
    r"""The number of items to fetch. Defaults to 20."""
    minimum_amount: Optional[float] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'minimum_amount', 'style': 'form', 'explode': True }})
    r"""Filter to ledger entries that affect at least this amount"""
    




@dataclasses.dataclass
class FetchCustomerCreditsLedgerResponse:
    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"""
    

