55from typing_extensions import Literal
66
77from ...._models import BaseModel
8- from ..category_balances import CategoryBalances
8+ from ..transaction_category_balances import TransactionCategoryBalances
99
1010__all__ = ["InstallmentPlanStatement" , "Installment" , "InstallmentPayment" ]
1111
@@ -14,30 +14,35 @@ class InstallmentPayment(BaseModel):
1414 amount : int
1515 """Amount applied to the installment in cents"""
1616
17+ amount_details : TransactionCategoryBalances
18+
1719 date : datetime .date
1820 """Date the payment was applied to the installment"""
1921
22+ is_adjustment : Optional [bool ] = None
23+ """
24+ True when the source of the payment is an adjustment of an underlying account or
25+ transaction
26+ """
27+
2028
2129class Installment (BaseModel ):
22- """One installment of a plan as of the statement.
23-
24- Amounts are totalled across transaction categories rather than broken out by them, which the installment plan endpoint does
25- """
30+ """One installment of a plan as of the statement"""
2631
2732 amount_due : int
2833 """Amount the installment was opened for in cents"""
2934
30- amount_due_details : CategoryBalances
35+ amount_due_details : TransactionCategoryBalances
3136
3237 amount_outstanding : int
3338 """Amount still owed on the installment in cents"""
3439
35- amount_outstanding_details : CategoryBalances
40+ amount_outstanding_details : TransactionCategoryBalances
3641
3742 amount_paid : int
3843 """Amount paid towards the installment in cents"""
3944
40- amount_paid_details : CategoryBalances
45+ amount_paid_details : TransactionCategoryBalances
4146
4247 date_assessed : Optional [datetime .date ] = None
4348 """
@@ -57,6 +62,12 @@ class Installment(BaseModel):
5762 payments : List [InstallmentPayment ]
5863 """Payments applied to this installment, oldest first"""
5964
65+ installment_adjustment : Optional [int ] = None
66+ """
67+ Amount from installment_plan_adjustment credited to this installment as of this
68+ statement
69+ """
70+
6071
6172class InstallmentPlanStatement (BaseModel ):
6273 """
@@ -71,9 +82,25 @@ class InstallmentPlanStatement(BaseModel):
7182 pagination cursor
7283 """
7384
85+ closed_at : Optional [datetime .date ] = None
86+ """
87+ Date the plan was paid off or cancelled, or null if it was still open as of this
88+ statement
89+ """
90+
91+ created : datetime .datetime
92+ """Timestamp of when the installment plan was created"""
93+
7494 fee_amount : int
7595 """Enrollment fee charged when the plan was created in cents"""
7696
97+ installment_plan_adjustment : int
98+ """
99+ Amount credited to this plan after the plan was recalculated, as of this
100+ statement. The plan amount is not changed, and this credit reduces the amount
101+ owed
102+ """
103+
77104 installment_plan_token : str
78105 """Globally unique identifier for the installment plan this snapshot is of"""
79106
@@ -95,6 +122,18 @@ class InstallmentPlanStatement(BaseModel):
95122 principal_amount : int
96123 """Balance the plan was opened on in cents, excluding the enrollment fee"""
97124
125+ source_amounts : Optional [TransactionCategoryBalances ] = None
126+ """
127+ Balance the plan was opened on, broken out by category, or null if it was not
128+ recorded
129+ """
130+
131+ source_id : str
132+ """
133+ Identifier of the record the plan was opened from, such as the closing statement
134+ for an unpaid balance
135+ """
136+
98137 source_type : Literal ["UNPAID_BALANCE" , "TRANSACTION" ]
99138
100139 start_date : datetime .date
@@ -109,3 +148,6 @@ class InstallmentPlanStatement(BaseModel):
109148
110149 total_paid : int
111150 """Amount paid towards the plan as of this statement in cents"""
151+
152+ updated : datetime .datetime
153+ """Timestamp of when the installment plan was last updated as of this statement"""
0 commit comments