diff --git a/src/orb/types/invoice.py b/src/orb/types/invoice.py index ba6ad026..18faacf7 100644 --- a/src/orb/types/invoice.py +++ b/src/orb/types/invoice.py @@ -33,6 +33,7 @@ "LineItemTaxAmount", "Maximum", "Minimum", + "Plan", "ShippingAddress", "Subscription", ] @@ -695,6 +696,19 @@ class Minimum(BaseModel): """Minimum amount applied""" +class Plan(BaseModel): + id: Optional[str] + + external_plan_id: Optional[str] + """ + An optional user-defined ID for this plan resource, used throughout the system + as an alias for this Plan. Use this field to identify a plan by an existing + identifier in your system. + """ + + name: Optional[str] + + class ShippingAddress(BaseModel): city: Optional[str] @@ -912,6 +926,12 @@ class Invoice(BaseModel): payment mechanisms (like bank transfers), where payment can take 3 days or more. """ + plan: Optional[Plan] + """The active plan for this invoice's subscription on its invoice date. + + This field is only populated for invoices generated by subscriptions. + """ + scheduled_issue_at: Optional[datetime] """ If the invoice is in draft, this timestamp will reflect when the invoice is diff --git a/src/orb/types/invoice_fetch_upcoming_response.py b/src/orb/types/invoice_fetch_upcoming_response.py index 75a70e25..a532a752 100644 --- a/src/orb/types/invoice_fetch_upcoming_response.py +++ b/src/orb/types/invoice_fetch_upcoming_response.py @@ -33,6 +33,7 @@ "LineItemTaxAmount", "Maximum", "Minimum", + "Plan", "ShippingAddress", "Subscription", ] @@ -695,6 +696,19 @@ class Minimum(BaseModel): """Minimum amount applied""" +class Plan(BaseModel): + id: Optional[str] + + external_plan_id: Optional[str] + """ + An optional user-defined ID for this plan resource, used throughout the system + as an alias for this Plan. Use this field to identify a plan by an existing + identifier in your system. + """ + + name: Optional[str] + + class ShippingAddress(BaseModel): city: Optional[str] @@ -909,6 +923,12 @@ class InvoiceFetchUpcomingResponse(BaseModel): payment mechanisms (like bank transfers), where payment can take 3 days or more. """ + plan: Optional[Plan] + """The active plan for this invoice's subscription on its invoice date. + + This field is only populated for invoices generated by subscriptions. + """ + scheduled_issue_at: Optional[datetime] """ If the invoice is in draft, this timestamp will reflect when the invoice is