11# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
3- from typing import Optional
4- from datetime import datetime
3+ from typing import TYPE_CHECKING , Dict , Optional
54from typing_extensions import Literal
65
7- from .._models import BaseModel
8-
9- __all__ = ["BalanceLookup" , "Loan" , "LoanReceivables" ]
10-
6+ from pydantic import Field as FieldInfo
117
12- class LoanReceivables (BaseModel ):
13- """The receivables balances for the loan."""
14-
15- purchasable_balance : int
16- """The balance of seasoned receivables available to be purchased."""
8+ from .._models import BaseModel
179
18- purchased_balance : int
19- """The balance of receivables that have been purchased."""
10+ __all__ = ["BalanceLookup" , "Loan" ]
2011
2112
2213class Loan (BaseModel ):
2314 """The loan balances for the Account."""
2415
25- due_at : Optional [datetime ] = None
26- """
27- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the loan
28- payment is due.
29- """
30-
31- due_balance : int
32- """The total amount due on the loan."""
33-
3416 due_fees : Optional [int ] = None
3517 """The fees on the loan that are due and unpaid."""
3618
@@ -49,11 +31,17 @@ class Loan(BaseModel):
4931 not_due_principal : Optional [int ] = None
5032 """The principal on the loan that is not yet due."""
5133
52- past_due_balance : int
53- """The amount past due on the loan."""
54-
55- receivables : Optional [LoanReceivables ] = None
56- """The receivables balances for the loan."""
34+ if TYPE_CHECKING :
35+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
36+ # value to this field, so for compatibility we avoid doing it at runtime.
37+ __pydantic_extra__ : Dict [str , object ] = FieldInfo (init = False ) # pyright: ignore[reportIncompatibleVariableOverride]
38+
39+ # Stub to indicate that arbitrary properties are accepted.
40+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
41+ # `getattr(obj, '$type')`
42+ def __getattr__ (self , attr : str ) -> object : ...
43+ else :
44+ __pydantic_extra__ : Dict [str , object ]
5745
5846
5947class BalanceLookup (BaseModel ):
0 commit comments