From c7c886f14556b5c43fcb54fe58389db6873c205c Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 4 Jan 2024 02:27:39 +0000 Subject: [PATCH] feat: add `None` default value to nullable response properties --- src/orb/pagination.py | 2 +- src/orb/types/coupon.py | 6 +- src/orb/types/credit_note.py | 20 +- src/orb/types/customer.py | 42 +-- .../balance_transaction_create_response.py | 6 +- .../balance_transaction_list_response.py | 6 +- .../cost_list_by_external_id_response.py | 6 +- src/orb/types/customers/cost_list_response.py | 6 +- .../credit_list_by_external_id_response.py | 4 +- .../types/customers/credit_list_response.py | 4 +- ...er_create_entry_by_external_id_response.py | 60 ++--- .../credits/ledger_create_entry_response.py | 60 ++--- .../ledger_list_by_external_id_response.py | 60 ++--- .../customers/credits/ledger_list_response.py | 60 ++--- src/orb/types/event_search_response.py | 4 +- .../types/events/backfill_close_response.py | 6 +- .../types/events/backfill_create_response.py | 6 +- .../types/events/backfill_fetch_response.py | 6 +- .../types/events/backfill_list_response.py | 6 +- .../types/events/backfill_revert_response.py | 6 +- src/orb/types/invoice.py | 112 ++++---- .../types/invoice_fetch_upcoming_response.py | 112 ++++---- .../invoice_line_item_create_response.py | 30 +-- src/orb/types/metric_create_response.py | 2 +- src/orb/types/metric_fetch_response.py | 2 +- src/orb/types/metric_list_response.py | 2 +- src/orb/types/plan.py | 46 ++-- src/orb/types/price.py | 252 +++++++++--------- src/orb/types/subscription.py | 40 +-- .../subscription_fetch_costs_response.py | 6 +- .../subscription_fetch_schedule_response.py | 8 +- src/orb/types/subscription_usage.py | 2 +- src/orb/types/subscriptions.py | 2 +- 33 files changed, 496 insertions(+), 496 deletions(-) diff --git a/src/orb/pagination.py b/src/orb/pagination.py index 5ff8a7ea..6b2c305c 100644 --- a/src/orb/pagination.py +++ b/src/orb/pagination.py @@ -13,7 +13,7 @@ class PagePaginationMetadata(BaseModel): has_more: bool - next_cursor: Optional[str] + next_cursor: Optional[str] = None class SyncPage(BaseSyncPage[ModelT], BasePage[ModelT], Generic[ModelT]): diff --git a/src/orb/types/coupon.py b/src/orb/types/coupon.py index 983e92f1..374eec6a 100644 --- a/src/orb/types/coupon.py +++ b/src/orb/types/coupon.py @@ -49,7 +49,7 @@ class Coupon(BaseModel): id: str """Also referred to as coupon_id in this documentation.""" - archived_at: Optional[datetime] + archived_at: Optional[datetime] = None """An archived coupon can no longer be redeemed. Active coupons will have a value of null for `archived_at`; this field will be @@ -58,13 +58,13 @@ class Coupon(BaseModel): discount: Discount - duration_in_months: Optional[int] + duration_in_months: Optional[int] = None """ This allows for a coupon's discount to apply for a limited time (determined in months); a `null` value here means "unlimited time". """ - max_redemptions: Optional[int] + max_redemptions: Optional[int] = None """ The maximum number of redemptions allowed for this coupon before it is exhausted; `null` here means "unlimited". diff --git a/src/orb/types/credit_note.py b/src/orb/types/credit_note.py index 42ca8754..af475624 100644 --- a/src/orb/types/credit_note.py +++ b/src/orb/types/credit_note.py @@ -23,7 +23,7 @@ class Customer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class DiscountAppliesToPrice(BaseModel): @@ -65,7 +65,7 @@ class LineItemSubLineItem(BaseModel): name: str - quantity: Optional[float] + quantity: Optional[float] = None class LineItemTaxAmount(BaseModel): @@ -75,7 +75,7 @@ class LineItemTaxAmount(BaseModel): tax_rate_description: str """The human-readable description of the applied tax rate.""" - tax_rate_percentage: Optional[str] + tax_rate_percentage: Optional[str] = None """The tax rate percentage, out of 100.""" @@ -92,7 +92,7 @@ class LineItem(BaseModel): name: str """The name of the corresponding invoice line item.""" - quantity: Optional[float] + quantity: Optional[float] = None """An optional quantity credited.""" sub_line_items: List[LineItemSubLineItem] @@ -133,7 +133,7 @@ class CreditNote(BaseModel): credit_note_number: str """The unique identifier for credit notes.""" - credit_note_pdf: Optional[str] + credit_note_pdf: Optional[str] = None """A URL to a PDF of the credit note.""" customer: Customer @@ -147,16 +147,16 @@ class CreditNote(BaseModel): line_items: List[LineItem] """All of the line items associated with this credit note.""" - maximum_amount_adjustment: Optional[MaximumAmountAdjustment] + maximum_amount_adjustment: Optional[MaximumAmountAdjustment] = None """The maximum amount applied on the original invoice""" - memo: Optional[str] + memo: Optional[str] = None """An optional memo supplied on the credit note.""" - minimum_amount_refunded: Optional[str] + minimum_amount_refunded: Optional[str] = None """Any credited amount from the applied minimum on the invoice.""" - reason: Optional[Literal["Duplicate", "Fraudulent", "Order change", "Product unsatisfactory"]] + reason: Optional[Literal["Duplicate", "Fraudulent", "Order change", "Product unsatisfactory"]] = None subtotal: str """The total prior to any creditable invoice-level discounts or minimums.""" @@ -166,5 +166,5 @@ class CreditNote(BaseModel): type: Literal["refund", "adjustment"] - voided_at: Optional[datetime] + voided_at: Optional[datetime] = None """The time at which the credit note was voided in Orb, if applicable.""" diff --git a/src/orb/types/customer.py b/src/orb/types/customer.py index 9dbe92c4..0f656f28 100644 --- a/src/orb/types/customer.py +++ b/src/orb/types/customer.py @@ -18,31 +18,31 @@ class BillingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class ShippingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class TaxID(BaseModel): @@ -169,7 +169,7 @@ class TaxID(BaseModel): class AccountingSyncConfigurationAccountingProvider(BaseModel): - external_provider_id: Optional[str] + external_provider_id: Optional[str] = None provider_type: Literal["quickbooks", "netsuite"] @@ -194,11 +194,11 @@ class Customer(BaseModel): balance: str """The customer's current balance in their currency.""" - billing_address: Optional[BillingAddress] + billing_address: Optional[BillingAddress] = None created_at: datetime - currency: Optional[str] + currency: Optional[str] = None email: str """A valid customer email, to be used for notifications. @@ -209,7 +209,7 @@ class Customer(BaseModel): email_delivery: bool - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None """ An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer. Use this field to identify a customer by @@ -227,24 +227,24 @@ class Customer(BaseModel): name: str """The full name of the customer""" - payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] + payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] = None """This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp. """ - payment_provider_id: Optional[str] + payment_provider_id: Optional[str] = None """The ID of this customer in an external payments solution, such as Stripe. This is used for creating charges or invoices in the external system via Orb. """ - portal_url: Optional[str] + portal_url: Optional[str] = None - shipping_address: Optional[ShippingAddress] + shipping_address: Optional[ShippingAddress] = None - tax_id: Optional[TaxID] + tax_id: Optional[TaxID] = None """ Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices. diff --git a/src/orb/types/customers/balance_transaction_create_response.py b/src/orb/types/customers/balance_transaction_create_response.py index a5707cd4..4b7304de 100644 --- a/src/orb/types/customers/balance_transaction_create_response.py +++ b/src/orb/types/customers/balance_transaction_create_response.py @@ -40,9 +40,9 @@ class BalanceTransactionCreateResponse(BaseModel): created_at: datetime """The creation time of this transaction.""" - credit_note: Optional[CreditNote] + credit_note: Optional[CreditNote] = None - description: Optional[str] + description: Optional[str] = None """An optional description provided for manual customer balance adjustments.""" ending_balance: str @@ -51,7 +51,7 @@ class BalanceTransactionCreateResponse(BaseModel): customer's currency. """ - invoice: Optional[Invoice] + invoice: Optional[Invoice] = None starting_balance: str """ diff --git a/src/orb/types/customers/balance_transaction_list_response.py b/src/orb/types/customers/balance_transaction_list_response.py index 20ad3f49..7fd35019 100644 --- a/src/orb/types/customers/balance_transaction_list_response.py +++ b/src/orb/types/customers/balance_transaction_list_response.py @@ -40,9 +40,9 @@ class BalanceTransactionListResponse(BaseModel): created_at: datetime """The creation time of this transaction.""" - credit_note: Optional[CreditNote] + credit_note: Optional[CreditNote] = None - description: Optional[str] + description: Optional[str] = None """An optional description provided for manual customer balance adjustments.""" ending_balance: str @@ -51,7 +51,7 @@ class BalanceTransactionListResponse(BaseModel): customer's currency. """ - invoice: Optional[Invoice] + invoice: Optional[Invoice] = None starting_balance: str """ diff --git a/src/orb/types/customers/cost_list_by_external_id_response.py b/src/orb/types/customers/cost_list_by_external_id_response.py index 1e86d117..7e37e553 100644 --- a/src/orb/types/customers/cost_list_by_external_id_response.py +++ b/src/orb/types/customers/cost_list_by_external_id_response.py @@ -13,12 +13,12 @@ class DataPerPriceCostPriceGroup(BaseModel): grouping_key: str """Grouping key to break down a single price's costs""" - grouping_value: Optional[str] + grouping_value: Optional[str] = None - secondary_grouping_key: Optional[str] + secondary_grouping_key: Optional[str] = None """If the price is a matrix price, this is the second dimension key""" - secondary_grouping_value: Optional[str] + secondary_grouping_value: Optional[str] = None total: str """Total costs for this group for the timeframe. diff --git a/src/orb/types/customers/cost_list_response.py b/src/orb/types/customers/cost_list_response.py index 6fd82fb1..61cb6af1 100644 --- a/src/orb/types/customers/cost_list_response.py +++ b/src/orb/types/customers/cost_list_response.py @@ -13,12 +13,12 @@ class DataPerPriceCostPriceGroup(BaseModel): grouping_key: str """Grouping key to break down a single price's costs""" - grouping_value: Optional[str] + grouping_value: Optional[str] = None - secondary_grouping_key: Optional[str] + secondary_grouping_key: Optional[str] = None """If the price is a matrix price, this is the second dimension key""" - secondary_grouping_value: Optional[str] + secondary_grouping_value: Optional[str] = None total: str """Total costs for this group for the timeframe. diff --git a/src/orb/types/customers/credit_list_by_external_id_response.py b/src/orb/types/customers/credit_list_by_external_id_response.py index 1b86c779..bbf2c251 100644 --- a/src/orb/types/customers/credit_list_by_external_id_response.py +++ b/src/orb/types/customers/credit_list_by_external_id_response.py @@ -13,6 +13,6 @@ class CreditListByExternalIDResponse(BaseModel): balance: float - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None diff --git a/src/orb/types/customers/credit_list_response.py b/src/orb/types/customers/credit_list_response.py index 80e9b3b6..05f48776 100644 --- a/src/orb/types/customers/credit_list_response.py +++ b/src/orb/types/customers/credit_list_response.py @@ -13,6 +13,6 @@ class CreditListResponse(BaseModel): balance: float - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None diff --git a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py index d7dd844f..d59922c2 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py +++ b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py @@ -35,15 +35,15 @@ class IncrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class IncrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class IncrementLedgerEntry(BaseModel): @@ -59,7 +59,7 @@ class IncrementLedgerEntry(BaseModel): customer: IncrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -83,15 +83,15 @@ class IncrementLedgerEntry(BaseModel): class DecrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class DecrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class DecrementLedgerEntry(BaseModel): @@ -107,7 +107,7 @@ class DecrementLedgerEntry(BaseModel): customer: DecrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -137,15 +137,15 @@ class DecrementLedgerEntry(BaseModel): class ExpirationChangeLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class ExpirationChangeLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class ExpirationChangeLedgerEntry(BaseModel): @@ -161,7 +161,7 @@ class ExpirationChangeLedgerEntry(BaseModel): customer: ExpirationChangeLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -187,15 +187,15 @@ class ExpirationChangeLedgerEntry(BaseModel): class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class CreditBlockExpiryLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CreditBlockExpiryLedgerEntry(BaseModel): @@ -211,7 +211,7 @@ class CreditBlockExpiryLedgerEntry(BaseModel): customer: CreditBlockExpiryLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -235,15 +235,15 @@ class CreditBlockExpiryLedgerEntry(BaseModel): class VoidLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidLedgerEntry(BaseModel): @@ -259,7 +259,7 @@ class VoidLedgerEntry(BaseModel): customer: VoidLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -281,21 +281,21 @@ class VoidLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class VoidInitiatedLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidInitiatedLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidInitiatedLedgerEntry(BaseModel): @@ -311,7 +311,7 @@ class VoidInitiatedLedgerEntry(BaseModel): customer: VoidInitiatedLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -335,21 +335,21 @@ class VoidInitiatedLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class AmendmentLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class AmendmentLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class AmendmentLedgerEntry(BaseModel): @@ -365,7 +365,7 @@ class AmendmentLedgerEntry(BaseModel): customer: AmendmentLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float diff --git a/src/orb/types/customers/credits/ledger_create_entry_response.py b/src/orb/types/customers/credits/ledger_create_entry_response.py index aed45870..d9b57560 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_response.py +++ b/src/orb/types/customers/credits/ledger_create_entry_response.py @@ -35,15 +35,15 @@ class IncrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class IncrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class IncrementLedgerEntry(BaseModel): @@ -59,7 +59,7 @@ class IncrementLedgerEntry(BaseModel): customer: IncrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -83,15 +83,15 @@ class IncrementLedgerEntry(BaseModel): class DecrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class DecrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class DecrementLedgerEntry(BaseModel): @@ -107,7 +107,7 @@ class DecrementLedgerEntry(BaseModel): customer: DecrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -137,15 +137,15 @@ class DecrementLedgerEntry(BaseModel): class ExpirationChangeLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class ExpirationChangeLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class ExpirationChangeLedgerEntry(BaseModel): @@ -161,7 +161,7 @@ class ExpirationChangeLedgerEntry(BaseModel): customer: ExpirationChangeLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -187,15 +187,15 @@ class ExpirationChangeLedgerEntry(BaseModel): class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class CreditBlockExpiryLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CreditBlockExpiryLedgerEntry(BaseModel): @@ -211,7 +211,7 @@ class CreditBlockExpiryLedgerEntry(BaseModel): customer: CreditBlockExpiryLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -235,15 +235,15 @@ class CreditBlockExpiryLedgerEntry(BaseModel): class VoidLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidLedgerEntry(BaseModel): @@ -259,7 +259,7 @@ class VoidLedgerEntry(BaseModel): customer: VoidLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -281,21 +281,21 @@ class VoidLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class VoidInitiatedLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidInitiatedLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidInitiatedLedgerEntry(BaseModel): @@ -311,7 +311,7 @@ class VoidInitiatedLedgerEntry(BaseModel): customer: VoidInitiatedLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -335,21 +335,21 @@ class VoidInitiatedLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class AmendmentLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class AmendmentLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class AmendmentLedgerEntry(BaseModel): @@ -365,7 +365,7 @@ class AmendmentLedgerEntry(BaseModel): customer: AmendmentLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float diff --git a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py index 2cfcbcb6..b1277fff 100644 --- a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py +++ b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py @@ -35,15 +35,15 @@ class IncrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class IncrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class IncrementLedgerEntry(BaseModel): @@ -59,7 +59,7 @@ class IncrementLedgerEntry(BaseModel): customer: IncrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -83,15 +83,15 @@ class IncrementLedgerEntry(BaseModel): class DecrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class DecrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class DecrementLedgerEntry(BaseModel): @@ -107,7 +107,7 @@ class DecrementLedgerEntry(BaseModel): customer: DecrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -137,15 +137,15 @@ class DecrementLedgerEntry(BaseModel): class ExpirationChangeLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class ExpirationChangeLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class ExpirationChangeLedgerEntry(BaseModel): @@ -161,7 +161,7 @@ class ExpirationChangeLedgerEntry(BaseModel): customer: ExpirationChangeLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -187,15 +187,15 @@ class ExpirationChangeLedgerEntry(BaseModel): class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class CreditBlockExpiryLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CreditBlockExpiryLedgerEntry(BaseModel): @@ -211,7 +211,7 @@ class CreditBlockExpiryLedgerEntry(BaseModel): customer: CreditBlockExpiryLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -235,15 +235,15 @@ class CreditBlockExpiryLedgerEntry(BaseModel): class VoidLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidLedgerEntry(BaseModel): @@ -259,7 +259,7 @@ class VoidLedgerEntry(BaseModel): customer: VoidLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -281,21 +281,21 @@ class VoidLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class VoidInitiatedLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidInitiatedLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidInitiatedLedgerEntry(BaseModel): @@ -311,7 +311,7 @@ class VoidInitiatedLedgerEntry(BaseModel): customer: VoidInitiatedLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -335,21 +335,21 @@ class VoidInitiatedLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class AmendmentLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class AmendmentLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class AmendmentLedgerEntry(BaseModel): @@ -365,7 +365,7 @@ class AmendmentLedgerEntry(BaseModel): customer: AmendmentLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float diff --git a/src/orb/types/customers/credits/ledger_list_response.py b/src/orb/types/customers/credits/ledger_list_response.py index 911f6866..72cac703 100644 --- a/src/orb/types/customers/credits/ledger_list_response.py +++ b/src/orb/types/customers/credits/ledger_list_response.py @@ -35,15 +35,15 @@ class IncrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class IncrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class IncrementLedgerEntry(BaseModel): @@ -59,7 +59,7 @@ class IncrementLedgerEntry(BaseModel): customer: IncrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -83,15 +83,15 @@ class IncrementLedgerEntry(BaseModel): class DecrementLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class DecrementLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class DecrementLedgerEntry(BaseModel): @@ -107,7 +107,7 @@ class DecrementLedgerEntry(BaseModel): customer: DecrementLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -137,15 +137,15 @@ class DecrementLedgerEntry(BaseModel): class ExpirationChangeLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class ExpirationChangeLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class ExpirationChangeLedgerEntry(BaseModel): @@ -161,7 +161,7 @@ class ExpirationChangeLedgerEntry(BaseModel): customer: ExpirationChangeLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -187,15 +187,15 @@ class ExpirationChangeLedgerEntry(BaseModel): class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class CreditBlockExpiryLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CreditBlockExpiryLedgerEntry(BaseModel): @@ -211,7 +211,7 @@ class CreditBlockExpiryLedgerEntry(BaseModel): customer: CreditBlockExpiryLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -235,15 +235,15 @@ class CreditBlockExpiryLedgerEntry(BaseModel): class VoidLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidLedgerEntry(BaseModel): @@ -259,7 +259,7 @@ class VoidLedgerEntry(BaseModel): customer: VoidLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -281,21 +281,21 @@ class VoidLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class VoidInitiatedLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class VoidInitiatedLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class VoidInitiatedLedgerEntry(BaseModel): @@ -311,7 +311,7 @@ class VoidInitiatedLedgerEntry(BaseModel): customer: VoidInitiatedLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float @@ -335,21 +335,21 @@ class VoidInitiatedLedgerEntry(BaseModel): void_amount: float - void_reason: Optional[str] + void_reason: Optional[str] = None class AmendmentLedgerEntryCreditBlock(BaseModel): id: str - expiry_date: Optional[datetime] + expiry_date: Optional[datetime] = None - per_unit_cost_basis: Optional[str] + per_unit_cost_basis: Optional[str] = None class AmendmentLedgerEntryCustomer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class AmendmentLedgerEntry(BaseModel): @@ -365,7 +365,7 @@ class AmendmentLedgerEntry(BaseModel): customer: AmendmentLedgerEntryCustomer - description: Optional[str] + description: Optional[str] = None ending_balance: float diff --git a/src/orb/types/event_search_response.py b/src/orb/types/event_search_response.py index abd923ff..82c7cec2 100644 --- a/src/orb/types/event_search_response.py +++ b/src/orb/types/event_search_response.py @@ -16,13 +16,13 @@ class Data(BaseModel): for safe request retries. """ - customer_id: Optional[str] + customer_id: Optional[str] = None """The Orb Customer identifier""" event_name: str """A name to meaningfully identify the action or event type.""" - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None """ An alias for the Orb customer, whose mapping is specified when creating the customer diff --git a/src/orb/types/events/backfill_close_response.py b/src/orb/types/events/backfill_close_response.py index 82dd653e..e11758f7 100644 --- a/src/orb/types/events/backfill_close_response.py +++ b/src/orb/types/events/backfill_close_response.py @@ -12,7 +12,7 @@ class BackfillCloseResponse(BaseModel): id: str - close_time: Optional[datetime] + close_time: Optional[datetime] = None """If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed. @@ -20,13 +20,13 @@ class BackfillCloseResponse(BaseModel): created_at: datetime - customer_id: Optional[str] + customer_id: Optional[str] = None """The customer ID this backfill is scoped to. If null, this backfill is not scoped to a single customer. """ - reverted_at: Optional[datetime] + reverted_at: Optional[datetime] = None """The time at which this backfill was reverted.""" status: Literal["pending", "reflected", "pending_revert", "reverted"] diff --git a/src/orb/types/events/backfill_create_response.py b/src/orb/types/events/backfill_create_response.py index 9f9fb965..99d4a7e7 100644 --- a/src/orb/types/events/backfill_create_response.py +++ b/src/orb/types/events/backfill_create_response.py @@ -12,7 +12,7 @@ class BackfillCreateResponse(BaseModel): id: str - close_time: Optional[datetime] + close_time: Optional[datetime] = None """If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed. @@ -20,13 +20,13 @@ class BackfillCreateResponse(BaseModel): created_at: datetime - customer_id: Optional[str] + customer_id: Optional[str] = None """The customer ID this backfill is scoped to. If null, this backfill is not scoped to a single customer. """ - reverted_at: Optional[datetime] + reverted_at: Optional[datetime] = None """The time at which this backfill was reverted.""" status: Literal["pending", "reflected", "pending_revert", "reverted"] diff --git a/src/orb/types/events/backfill_fetch_response.py b/src/orb/types/events/backfill_fetch_response.py index ca9a34af..81d8eb11 100644 --- a/src/orb/types/events/backfill_fetch_response.py +++ b/src/orb/types/events/backfill_fetch_response.py @@ -12,7 +12,7 @@ class BackfillFetchResponse(BaseModel): id: str - close_time: Optional[datetime] + close_time: Optional[datetime] = None """If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed. @@ -20,13 +20,13 @@ class BackfillFetchResponse(BaseModel): created_at: datetime - customer_id: Optional[str] + customer_id: Optional[str] = None """The customer ID this backfill is scoped to. If null, this backfill is not scoped to a single customer. """ - reverted_at: Optional[datetime] + reverted_at: Optional[datetime] = None """The time at which this backfill was reverted.""" status: Literal["pending", "reflected", "pending_revert", "reverted"] diff --git a/src/orb/types/events/backfill_list_response.py b/src/orb/types/events/backfill_list_response.py index 43507354..0ee5e8f2 100644 --- a/src/orb/types/events/backfill_list_response.py +++ b/src/orb/types/events/backfill_list_response.py @@ -12,7 +12,7 @@ class BackfillListResponse(BaseModel): id: str - close_time: Optional[datetime] + close_time: Optional[datetime] = None """If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed. @@ -20,13 +20,13 @@ class BackfillListResponse(BaseModel): created_at: datetime - customer_id: Optional[str] + customer_id: Optional[str] = None """The customer ID this backfill is scoped to. If null, this backfill is not scoped to a single customer. """ - reverted_at: Optional[datetime] + reverted_at: Optional[datetime] = None """The time at which this backfill was reverted.""" status: Literal["pending", "reflected", "pending_revert", "reverted"] diff --git a/src/orb/types/events/backfill_revert_response.py b/src/orb/types/events/backfill_revert_response.py index 66799547..4f411d3a 100644 --- a/src/orb/types/events/backfill_revert_response.py +++ b/src/orb/types/events/backfill_revert_response.py @@ -12,7 +12,7 @@ class BackfillRevertResponse(BaseModel): id: str - close_time: Optional[datetime] + close_time: Optional[datetime] = None """If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed. @@ -20,13 +20,13 @@ class BackfillRevertResponse(BaseModel): created_at: datetime - customer_id: Optional[str] + customer_id: Optional[str] = None """The customer ID this backfill is scoped to. If null, this backfill is not scoped to a single customer. """ - reverted_at: Optional[datetime] + reverted_at: Optional[datetime] = None """The time at which this backfill was reverted.""" status: Literal["pending", "reflected", "pending_revert", "reverted"] diff --git a/src/orb/types/invoice.py b/src/orb/types/invoice.py index 62e9fc2a..786ffd49 100644 --- a/src/orb/types/invoice.py +++ b/src/orb/types/invoice.py @@ -39,17 +39,17 @@ class AutoCollection(BaseModel): - enabled: Optional[bool] + enabled: Optional[bool] = None """True only if auto-collection is enabled for this invoice.""" - next_attempt_at: Optional[datetime] + next_attempt_at: Optional[datetime] = None """ If the invoice is scheduled for auto-collection, this field will reflect when the next attempt will occur. If dunning has been exhausted, or auto-collection is not enabled for this invoice, this field will be `null`. """ - previously_attempted_at: Optional[datetime] + previously_attempted_at: Optional[datetime] = None """ If Orb has ever attempted payment auto-collection for this invoice, this field will reflect when that attempt occurred. In conjunction with `next_attempt_at`, @@ -61,17 +61,17 @@ class AutoCollection(BaseModel): class BillingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class CreditNote(BaseModel): @@ -85,7 +85,7 @@ class CreditNote(BaseModel): type: str - voided_at: Optional[datetime] + voided_at: Optional[datetime] = None """ If the credit note has a status of `void`, this gives a timestamp when the credit note was voided. @@ -95,7 +95,7 @@ class CreditNote(BaseModel): class Customer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CustomerBalanceTransactionCreditNote(BaseModel): @@ -129,9 +129,9 @@ class CustomerBalanceTransaction(BaseModel): created_at: datetime """The creation time of this transaction.""" - credit_note: Optional[CustomerBalanceTransactionCreditNote] + credit_note: Optional[CustomerBalanceTransactionCreditNote] = None - description: Optional[str] + description: Optional[str] = None """An optional description provided for manual customer balance adjustments.""" ending_balance: str @@ -140,7 +140,7 @@ class CustomerBalanceTransaction(BaseModel): customer's currency. """ - invoice: Optional[CustomerBalanceTransactionInvoice] + invoice: Optional[CustomerBalanceTransactionInvoice] = None starting_balance: str """ @@ -299,7 +299,7 @@ class LineItemMinimum(BaseModel): class LineItemSubLineItemMatrixSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -312,7 +312,7 @@ class LineItemSubLineItemMatrixSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] = None matrix_config: LineItemSubLineItemMatrixSubLineItemMatrixConfig @@ -326,14 +326,14 @@ class LineItemSubLineItemMatrixSubLineItem(BaseModel): class LineItemSubLineItemTierSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" class LineItemSubLineItemTierSubLineItemTierConfig(BaseModel): first_unit: float - last_unit: Optional[float] + last_unit: Optional[float] = None unit_amount: str @@ -342,7 +342,7 @@ class LineItemSubLineItemTierSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] = None name: str @@ -356,7 +356,7 @@ class LineItemSubLineItemTierSubLineItem(BaseModel): class LineItemSubLineItemOtherSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -364,7 +364,7 @@ class LineItemSubLineItemOtherSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] = None name: str @@ -385,7 +385,7 @@ class LineItemTaxAmount(BaseModel): tax_rate_description: str """The human-readable description of the applied tax rate.""" - tax_rate_percentage: Optional[str] + tax_rate_percentage: Optional[str] = None """The tax rate percentage, out of 100.""" @@ -396,30 +396,30 @@ class LineItem(BaseModel): amount: str """The final amount after any discounts or minimums.""" - discount: Optional[Discount] + discount: Optional[Discount] = None end_date: datetime """The end date of the range of time applied for this line item's price.""" - grouping: Optional[str] + grouping: Optional[str] = None """ [DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The `amount` and `subtotal` will be the values for this particular grouping. """ - maximum: Optional[LineItemMaximum] + maximum: Optional[LineItemMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[LineItemMinimum] + minimum: Optional[LineItemMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None name: str """The name of the price associated with this line item.""" - price: Optional[Price] + price: Optional[Price] = None """ The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices @@ -698,17 +698,17 @@ class Minimum(BaseModel): class ShippingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class Subscription(BaseModel): @@ -726,7 +726,7 @@ class Invoice(BaseModel): auto_collection: AutoCollection - billing_address: Optional[BillingAddress] + billing_address: Optional[BillingAddress] = None created_at: datetime """The creation time of the resource in Orb.""" @@ -741,7 +741,7 @@ class Invoice(BaseModel): customer_balance_transactions: List[CustomerBalanceTransaction] - customer_tax_id: Optional[CustomerTaxID] + customer_tax_id: Optional[CustomerTaxID] = None """ Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices. @@ -830,21 +830,21 @@ class Invoice(BaseModel): | United States | `us_ein` | United States EIN | """ - discount: Optional[Discount] + discount: Optional[Discount] = None discounts: List[Discount] due_date: datetime """When the invoice payment is due.""" - eligible_to_issue_at: Optional[datetime] + eligible_to_issue_at: Optional[datetime] = None """ If the invoice has a status of `draft`, this will be the time that the invoice will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is true, the invoice will automatically begin issuing at this time. """ - hosted_invoice_url: Optional[str] + hosted_invoice_url: Optional[str] = None """A URL for the invoice portal.""" invoice_date: datetime @@ -857,16 +857,16 @@ class Invoice(BaseModel): account or customer. """ - invoice_pdf: Optional[str] + invoice_pdf: Optional[str] = None """The link to download the PDF representation of the `Invoice`.""" - issue_failed_at: Optional[datetime] + issue_failed_at: Optional[datetime] = None """ If the invoice failed to issue, this will be the last time it failed to issue (even if it is now in a different state.) """ - issued_at: Optional[datetime] + issued_at: Optional[datetime] = None """ If the invoice has been issued, this will be the time it transitioned to `issued` (even if it is now in a different state.) @@ -875,11 +875,11 @@ class Invoice(BaseModel): line_items: List[LineItem] """The breakdown of prices in this invoice.""" - maximum: Optional[Maximum] + maximum: Optional[Maximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - memo: Optional[str] + memo: Optional[str] = None """ Free-form text which is available on the invoice PDF and the Orb invoice portal. """ @@ -892,45 +892,45 @@ class Invoice(BaseModel): cleared by setting `metadata` to `null`. """ - minimum: Optional[Minimum] + minimum: Optional[Minimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None - paid_at: Optional[datetime] + paid_at: Optional[datetime] = None """ If the invoice has a status of `paid`, this gives a timestamp when the invoice was paid. """ - payment_failed_at: Optional[datetime] + payment_failed_at: Optional[datetime] = None """ If payment was attempted on this invoice but failed, this will be the time of the most recent attempt. """ - payment_started_at: Optional[datetime] + payment_started_at: Optional[datetime] = None """ If payment was attempted on this invoice, this will be the start time of the most recent attempt. This field is especially useful for delayed-notification payment mechanisms (like bank transfers), where payment can take 3 days or more. """ - scheduled_issue_at: Optional[datetime] + scheduled_issue_at: Optional[datetime] = None """ If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued. """ - shipping_address: Optional[ShippingAddress] + shipping_address: Optional[ShippingAddress] = None status: Literal["issued", "paid", "synced", "void", "draft"] - subscription: Optional[Subscription] + subscription: Optional[Subscription] = None subtotal: str """The total before any discounts and minimums are applied.""" - sync_failed_at: Optional[datetime] + sync_failed_at: Optional[datetime] = None """ If the invoice failed to sync, this will be the last time an external invoicing provider sync was attempted. This field will always be `null` for invoices using @@ -940,7 +940,7 @@ class Invoice(BaseModel): total: str """The total after any minimums and discounts have been applied.""" - voided_at: Optional[datetime] + voided_at: Optional[datetime] = None """ If the invoice has a status of `void`, this gives a timestamp when the invoice was voided. diff --git a/src/orb/types/invoice_fetch_upcoming_response.py b/src/orb/types/invoice_fetch_upcoming_response.py index a6fc93ae..03a311f3 100644 --- a/src/orb/types/invoice_fetch_upcoming_response.py +++ b/src/orb/types/invoice_fetch_upcoming_response.py @@ -39,17 +39,17 @@ class AutoCollection(BaseModel): - enabled: Optional[bool] + enabled: Optional[bool] = None """True only if auto-collection is enabled for this invoice.""" - next_attempt_at: Optional[datetime] + next_attempt_at: Optional[datetime] = None """ If the invoice is scheduled for auto-collection, this field will reflect when the next attempt will occur. If dunning has been exhausted, or auto-collection is not enabled for this invoice, this field will be `null`. """ - previously_attempted_at: Optional[datetime] + previously_attempted_at: Optional[datetime] = None """ If Orb has ever attempted payment auto-collection for this invoice, this field will reflect when that attempt occurred. In conjunction with `next_attempt_at`, @@ -61,17 +61,17 @@ class AutoCollection(BaseModel): class BillingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class CreditNote(BaseModel): @@ -85,7 +85,7 @@ class CreditNote(BaseModel): type: str - voided_at: Optional[datetime] + voided_at: Optional[datetime] = None """ If the credit note has a status of `void`, this gives a timestamp when the credit note was voided. @@ -95,7 +95,7 @@ class CreditNote(BaseModel): class Customer(BaseModel): id: str - external_customer_id: Optional[str] + external_customer_id: Optional[str] = None class CustomerBalanceTransactionCreditNote(BaseModel): @@ -129,9 +129,9 @@ class CustomerBalanceTransaction(BaseModel): created_at: datetime """The creation time of this transaction.""" - credit_note: Optional[CustomerBalanceTransactionCreditNote] + credit_note: Optional[CustomerBalanceTransactionCreditNote] = None - description: Optional[str] + description: Optional[str] = None """An optional description provided for manual customer balance adjustments.""" ending_balance: str @@ -140,7 +140,7 @@ class CustomerBalanceTransaction(BaseModel): customer's currency. """ - invoice: Optional[CustomerBalanceTransactionInvoice] + invoice: Optional[CustomerBalanceTransactionInvoice] = None starting_balance: str """ @@ -299,7 +299,7 @@ class LineItemMinimum(BaseModel): class LineItemSubLineItemMatrixSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -312,7 +312,7 @@ class LineItemSubLineItemMatrixSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] = None matrix_config: LineItemSubLineItemMatrixSubLineItemMatrixConfig @@ -326,14 +326,14 @@ class LineItemSubLineItemMatrixSubLineItem(BaseModel): class LineItemSubLineItemTierSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" class LineItemSubLineItemTierSubLineItemTierConfig(BaseModel): first_unit: float - last_unit: Optional[float] + last_unit: Optional[float] = None unit_amount: str @@ -342,7 +342,7 @@ class LineItemSubLineItemTierSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] = None name: str @@ -356,7 +356,7 @@ class LineItemSubLineItemTierSubLineItem(BaseModel): class LineItemSubLineItemOtherSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -364,7 +364,7 @@ class LineItemSubLineItemOtherSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] + grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] = None name: str @@ -385,7 +385,7 @@ class LineItemTaxAmount(BaseModel): tax_rate_description: str """The human-readable description of the applied tax rate.""" - tax_rate_percentage: Optional[str] + tax_rate_percentage: Optional[str] = None """The tax rate percentage, out of 100.""" @@ -396,30 +396,30 @@ class LineItem(BaseModel): amount: str """The final amount after any discounts or minimums.""" - discount: Optional[Discount] + discount: Optional[Discount] = None end_date: datetime """The end date of the range of time applied for this line item's price.""" - grouping: Optional[str] + grouping: Optional[str] = None """ [DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The `amount` and `subtotal` will be the values for this particular grouping. """ - maximum: Optional[LineItemMaximum] + maximum: Optional[LineItemMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[LineItemMinimum] + minimum: Optional[LineItemMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None name: str """The name of the price associated with this line item.""" - price: Optional[Price] + price: Optional[Price] = None """ The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices @@ -698,17 +698,17 @@ class Minimum(BaseModel): class ShippingAddress(BaseModel): - city: Optional[str] + city: Optional[str] = None - country: Optional[str] + country: Optional[str] = None - line1: Optional[str] + line1: Optional[str] = None - line2: Optional[str] + line2: Optional[str] = None - postal_code: Optional[str] + postal_code: Optional[str] = None - state: Optional[str] + state: Optional[str] = None class Subscription(BaseModel): @@ -726,7 +726,7 @@ class InvoiceFetchUpcomingResponse(BaseModel): auto_collection: AutoCollection - billing_address: Optional[BillingAddress] + billing_address: Optional[BillingAddress] = None created_at: datetime """The creation time of the resource in Orb.""" @@ -741,7 +741,7 @@ class InvoiceFetchUpcomingResponse(BaseModel): customer_balance_transactions: List[CustomerBalanceTransaction] - customer_tax_id: Optional[CustomerTaxID] + customer_tax_id: Optional[CustomerTaxID] = None """ Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices. @@ -830,21 +830,21 @@ class InvoiceFetchUpcomingResponse(BaseModel): | United States | `us_ein` | United States EIN | """ - discount: Optional[Discount] + discount: Optional[Discount] = None discounts: List[Discount] due_date: datetime """When the invoice payment is due.""" - eligible_to_issue_at: Optional[datetime] + eligible_to_issue_at: Optional[datetime] = None """ If the invoice has a status of `draft`, this will be the time that the invoice will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is true, the invoice will automatically begin issuing at this time. """ - hosted_invoice_url: Optional[str] + hosted_invoice_url: Optional[str] = None """A URL for the invoice portal.""" invoice_number: str @@ -854,16 +854,16 @@ class InvoiceFetchUpcomingResponse(BaseModel): account or customer. """ - invoice_pdf: Optional[str] + invoice_pdf: Optional[str] = None """The link to download the PDF representation of the `Invoice`.""" - issue_failed_at: Optional[datetime] + issue_failed_at: Optional[datetime] = None """ If the invoice failed to issue, this will be the last time it failed to issue (even if it is now in a different state.) """ - issued_at: Optional[datetime] + issued_at: Optional[datetime] = None """ If the invoice has been issued, this will be the time it transitioned to `issued` (even if it is now in a different state.) @@ -872,11 +872,11 @@ class InvoiceFetchUpcomingResponse(BaseModel): line_items: List[LineItem] """The breakdown of prices in this invoice.""" - maximum: Optional[Maximum] + maximum: Optional[Maximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - memo: Optional[str] + memo: Optional[str] = None """ Free-form text which is available on the invoice PDF and the Orb invoice portal. """ @@ -889,45 +889,45 @@ class InvoiceFetchUpcomingResponse(BaseModel): cleared by setting `metadata` to `null`. """ - minimum: Optional[Minimum] + minimum: Optional[Minimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None - paid_at: Optional[datetime] + paid_at: Optional[datetime] = None """ If the invoice has a status of `paid`, this gives a timestamp when the invoice was paid. """ - payment_failed_at: Optional[datetime] + payment_failed_at: Optional[datetime] = None """ If payment was attempted on this invoice but failed, this will be the time of the most recent attempt. """ - payment_started_at: Optional[datetime] + payment_started_at: Optional[datetime] = None """ If payment was attempted on this invoice, this will be the start time of the most recent attempt. This field is especially useful for delayed-notification payment mechanisms (like bank transfers), where payment can take 3 days or more. """ - scheduled_issue_at: Optional[datetime] + scheduled_issue_at: Optional[datetime] = None """ If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued. """ - shipping_address: Optional[ShippingAddress] + shipping_address: Optional[ShippingAddress] = None status: Literal["issued", "paid", "synced", "void", "draft"] - subscription: Optional[Subscription] + subscription: Optional[Subscription] = None subtotal: str """The total before any discounts and minimums are applied.""" - sync_failed_at: Optional[datetime] + sync_failed_at: Optional[datetime] = None """ If the invoice failed to sync, this will be the last time an external invoicing provider sync was attempted. This field will always be `null` for invoices using @@ -940,7 +940,7 @@ class InvoiceFetchUpcomingResponse(BaseModel): total: str """The total after any minimums and discounts have been applied.""" - voided_at: Optional[datetime] + voided_at: Optional[datetime] = None """ If the invoice has a status of `void`, this gives a timestamp when the invoice was voided. diff --git a/src/orb/types/invoice_line_item_create_response.py b/src/orb/types/invoice_line_item_create_response.py index 76d62553..bdb6c467 100644 --- a/src/orb/types/invoice_line_item_create_response.py +++ b/src/orb/types/invoice_line_item_create_response.py @@ -50,7 +50,7 @@ class Minimum(BaseModel): class SubLineItemMatrixSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -63,7 +63,7 @@ class SubLineItemMatrixSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[SubLineItemMatrixSubLineItemGrouping] + grouping: Optional[SubLineItemMatrixSubLineItemGrouping] = None matrix_config: SubLineItemMatrixSubLineItemMatrixConfig @@ -77,14 +77,14 @@ class SubLineItemMatrixSubLineItem(BaseModel): class SubLineItemTierSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" class SubLineItemTierSubLineItemTierConfig(BaseModel): first_unit: float - last_unit: Optional[float] + last_unit: Optional[float] = None unit_amount: str @@ -93,7 +93,7 @@ class SubLineItemTierSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[SubLineItemTierSubLineItemGrouping] + grouping: Optional[SubLineItemTierSubLineItemGrouping] = None name: str @@ -107,7 +107,7 @@ class SubLineItemTierSubLineItem(BaseModel): class SubLineItemOtherSubLineItemGrouping(BaseModel): key: str - value: Optional[str] + value: Optional[str] = None """No value indicates the default group""" @@ -115,7 +115,7 @@ class SubLineItemOtherSubLineItem(BaseModel): amount: str """The total amount for this sub line item.""" - grouping: Optional[SubLineItemOtherSubLineItemGrouping] + grouping: Optional[SubLineItemOtherSubLineItemGrouping] = None name: str @@ -134,7 +134,7 @@ class TaxAmount(BaseModel): tax_rate_description: str """The human-readable description of the applied tax rate.""" - tax_rate_percentage: Optional[str] + tax_rate_percentage: Optional[str] = None """The tax rate percentage, out of 100.""" @@ -145,30 +145,30 @@ class InvoiceLineItemCreateResponse(BaseModel): amount: str """The final amount after any discounts or minimums.""" - discount: Optional[Discount] + discount: Optional[Discount] = None end_date: datetime """The end date of the range of time applied for this line item's price.""" - grouping: Optional[str] + grouping: Optional[str] = None """ [DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The `amount` and `subtotal` will be the values for this particular grouping. """ - maximum: Optional[Maximum] + maximum: Optional[Maximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[Minimum] + minimum: Optional[Minimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None name: str """The name of the price associated with this line item.""" - price: Optional[Price] + price: Optional[Price] = None """ The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices diff --git a/src/orb/types/metric_create_response.py b/src/orb/types/metric_create_response.py index f3f521cc..7ec09341 100644 --- a/src/orb/types/metric_create_response.py +++ b/src/orb/types/metric_create_response.py @@ -12,7 +12,7 @@ class MetricCreateResponse(BaseModel): id: str - description: Optional[str] + description: Optional[str] = None item: Item """The Item resource represents a sellable product or good. diff --git a/src/orb/types/metric_fetch_response.py b/src/orb/types/metric_fetch_response.py index 8ceeeee0..a5606035 100644 --- a/src/orb/types/metric_fetch_response.py +++ b/src/orb/types/metric_fetch_response.py @@ -12,7 +12,7 @@ class MetricFetchResponse(BaseModel): id: str - description: Optional[str] + description: Optional[str] = None item: Item """The Item resource represents a sellable product or good. diff --git a/src/orb/types/metric_list_response.py b/src/orb/types/metric_list_response.py index e231e482..7546b72f 100644 --- a/src/orb/types/metric_list_response.py +++ b/src/orb/types/metric_list_response.py @@ -12,7 +12,7 @@ class MetricListResponse(BaseModel): id: str - description: Optional[str] + description: Optional[str] = None item: Item """The Item resource represents a sellable product or good. diff --git a/src/orb/types/plan.py b/src/orb/types/plan.py index 4e8b05c3..1cee8236 100644 --- a/src/orb/types/plan.py +++ b/src/orb/types/plan.py @@ -22,16 +22,16 @@ class BasePlan(BaseModel): - id: Optional[str] + id: Optional[str] = None - external_plan_id: Optional[str] + external_plan_id: Optional[str] = None """ 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] + name: Optional[str] = None class Maximum(BaseModel): @@ -81,25 +81,25 @@ class PlanPhaseMinimum(BaseModel): class PlanPhase(BaseModel): id: str - description: Optional[str] + description: Optional[str] = None - discount: Optional[Discount] + discount: Optional[Discount] = None - duration: Optional[int] + duration: Optional[int] = None """How many terms of length `duration_unit` this phase is active for. If null, this phase is evergreen and active indefinitely """ - duration_unit: Optional[Literal["daily", "monthly", "quarterly", "annual"]] + duration_unit: Optional[Literal["daily", "monthly", "quarterly", "annual"]] = None - maximum: Optional[PlanPhaseMaximum] + maximum: Optional[PlanPhaseMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[PlanPhaseMinimum] + minimum: Optional[PlanPhaseMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None name: str @@ -116,7 +116,7 @@ class Product(BaseModel): class TrialConfig(BaseModel): - trial_period: Optional[int] + trial_period: Optional[int] = None trial_period_unit: Literal["days"] @@ -124,9 +124,9 @@ class TrialConfig(BaseModel): class Plan(BaseModel): id: str - base_plan: Optional[BasePlan] + base_plan: Optional[BasePlan] = None - base_plan_id: Optional[str] + base_plan_id: Optional[str] = None """ The parent plan id if the given plan was created by overriding one or more of the parent's prices @@ -140,7 +140,7 @@ class Plan(BaseModel): prices. """ - default_invoice_memo: Optional[str] + default_invoice_memo: Optional[str] = None """ The default memo text on the invoices corresponding to subscriptions on this plan. Note that each subscription may configure its own memo. @@ -148,9 +148,9 @@ class Plan(BaseModel): description: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_plan_id: Optional[str] + external_plan_id: Optional[str] = None """ 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 @@ -163,9 +163,9 @@ class Plan(BaseModel): Matches `currency` unless `currency` is a custom pricing unit. """ - maximum: Optional[Maximum] + maximum: Optional[Maximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None metadata: Dict[str, str] """User specified key-value pairs for the resource. @@ -175,13 +175,13 @@ class Plan(BaseModel): cleared by setting `metadata` to `null`. """ - minimum: Optional[Minimum] + minimum: Optional[Minimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None name: str - net_terms: Optional[int] + net_terms: Optional[int] = None """Determines the difference between the invoice issue date and the due date. A value of "0" here signifies that invoices are due on issue, whereas a value of @@ -190,7 +190,7 @@ class Plan(BaseModel): configuration. """ - plan_phases: Optional[List[PlanPhase]] + plan_phases: Optional[List[PlanPhase]] = None prices: List[Price] """Prices for this plan. diff --git a/src/orb/types/price.py b/src/orb/types/price.py index a8540c2f..8d0f7123 100644 --- a/src/orb/types/price.py +++ b/src/orb/types/price.py @@ -140,7 +140,7 @@ class UnitPriceUnitConfig(BaseModel): class UnitPrice(BaseModel): id: str - billable_metric: Optional[UnitPriceBillableMetric] + billable_metric: Optional[UnitPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -148,27 +148,27 @@ class UnitPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: UnitPriceItem - maximum: Optional[UnitPriceMaximum] + maximum: Optional[UnitPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[UnitPriceMinimum] + minimum: Optional[UnitPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["unit"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -222,7 +222,7 @@ class PackagePricePackageConfig(BaseModel): class PackagePrice(BaseModel): id: str - billable_metric: Optional[PackagePriceBillableMetric] + billable_metric: Optional[PackagePriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -230,21 +230,21 @@ class PackagePrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: PackagePriceItem - maximum: Optional[PackagePriceMaximum] + maximum: Optional[PackagePriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[PackagePriceMinimum] + minimum: Optional[PackagePriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["package"] = FieldInfo(alias="model_type") @@ -252,7 +252,7 @@ class PackagePrice(BaseModel): package_config: PackagePricePackageConfig - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -324,7 +324,7 @@ class MatrixPriceMinimum(BaseModel): class MatrixPrice(BaseModel): id: str - billable_metric: Optional[MatrixPriceBillableMetric] + billable_metric: Optional[MatrixPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -332,29 +332,29 @@ class MatrixPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: MatrixPriceItem matrix_config: MatrixPriceMatrixConfig - maximum: Optional[MatrixPriceMaximum] + maximum: Optional[MatrixPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[MatrixPriceMinimum] + minimum: Optional[MatrixPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["matrix"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -410,7 +410,7 @@ class TieredPriceTieredConfig(BaseModel): class TieredPrice(BaseModel): id: str - billable_metric: Optional[TieredPriceBillableMetric] + billable_metric: Optional[TieredPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -418,27 +418,27 @@ class TieredPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: TieredPriceItem - maximum: Optional[TieredPriceMaximum] + maximum: Optional[TieredPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[TieredPriceMinimum] + minimum: Optional[TieredPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["tiered"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -502,7 +502,7 @@ class TieredBpsPriceTieredBpsConfig(BaseModel): class TieredBpsPrice(BaseModel): id: str - billable_metric: Optional[TieredBpsPriceBillableMetric] + billable_metric: Optional[TieredBpsPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -510,27 +510,27 @@ class TieredBpsPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: TieredBpsPriceItem - maximum: Optional[TieredBpsPriceMaximum] + maximum: Optional[TieredBpsPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[TieredBpsPriceMinimum] + minimum: Optional[TieredBpsPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["tiered_bps"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -580,7 +580,7 @@ class BpsPriceMinimum(BaseModel): class BpsPrice(BaseModel): id: str - billable_metric: Optional[BpsPriceBillableMetric] + billable_metric: Optional[BpsPriceBillableMetric] = None bps_config: BpsPriceBpsConfig @@ -590,27 +590,27 @@ class BpsPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: BpsPriceItem - maximum: Optional[BpsPriceMaximum] + maximum: Optional[BpsPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[BpsPriceMinimum] + minimum: Optional[BpsPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["bps"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -669,7 +669,7 @@ class BulkBpsPriceMinimum(BaseModel): class BulkBpsPrice(BaseModel): id: str - billable_metric: Optional[BulkBpsPriceBillableMetric] + billable_metric: Optional[BulkBpsPriceBillableMetric] = None bulk_bps_config: BulkBpsPriceBulkBpsConfig @@ -679,27 +679,27 @@ class BulkBpsPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: BulkBpsPriceItem - maximum: Optional[BulkBpsPriceMaximum] + maximum: Optional[BulkBpsPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[BulkBpsPriceMinimum] + minimum: Optional[BulkBpsPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["bulk_bps"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -752,7 +752,7 @@ class BulkPriceMinimum(BaseModel): class BulkPrice(BaseModel): id: str - billable_metric: Optional[BulkPriceBillableMetric] + billable_metric: Optional[BulkPriceBillableMetric] = None bulk_config: BulkPriceBulkConfig @@ -762,27 +762,27 @@ class BulkPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: BulkPriceItem - maximum: Optional[BulkPriceMaximum] + maximum: Optional[BulkPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[BulkPriceMinimum] + minimum: Optional[BulkPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["bulk"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -827,7 +827,7 @@ class TestRatingFunctionPrice(BaseModel): __test__ = False id: str - billable_metric: Optional[TestRatingFunctionPriceBillableMetric] + billable_metric: Optional[TestRatingFunctionPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -835,27 +835,27 @@ class TestRatingFunctionPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: TestRatingFunctionPriceItem - maximum: Optional[TestRatingFunctionPriceMaximum] + maximum: Optional[TestRatingFunctionPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[TestRatingFunctionPriceMinimum] + minimum: Optional[TestRatingFunctionPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["test_rating_function"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -897,7 +897,7 @@ class FivetranExamplePriceMinimum(BaseModel): class FivetranExamplePrice(BaseModel): id: str - billable_metric: Optional[FivetranExamplePriceBillableMetric] + billable_metric: Optional[FivetranExamplePriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -905,29 +905,29 @@ class FivetranExamplePrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None fivetran_example_config: Dict[str, object] - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: FivetranExamplePriceItem - maximum: Optional[FivetranExamplePriceMaximum] + maximum: Optional[FivetranExamplePriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[FivetranExamplePriceMinimum] + minimum: Optional[FivetranExamplePriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["fivetran_example"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -967,7 +967,7 @@ class ThresholdTotalAmountPriceMinimum(BaseModel): class ThresholdTotalAmountPrice(BaseModel): id: str - billable_metric: Optional[ThresholdTotalAmountPriceBillableMetric] + billable_metric: Optional[ThresholdTotalAmountPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -975,27 +975,27 @@ class ThresholdTotalAmountPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: ThresholdTotalAmountPriceItem - maximum: Optional[ThresholdTotalAmountPriceMaximum] + maximum: Optional[ThresholdTotalAmountPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[ThresholdTotalAmountPriceMinimum] + minimum: Optional[ThresholdTotalAmountPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["threshold_total_amount"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -1037,7 +1037,7 @@ class TieredPackagePriceMinimum(BaseModel): class TieredPackagePrice(BaseModel): id: str - billable_metric: Optional[TieredPackagePriceBillableMetric] + billable_metric: Optional[TieredPackagePriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -1045,27 +1045,27 @@ class TieredPackagePrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: TieredPackagePriceItem - maximum: Optional[TieredPackagePriceMaximum] + maximum: Optional[TieredPackagePriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[TieredPackagePriceMinimum] + minimum: Optional[TieredPackagePriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["tiered_package"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -1107,7 +1107,7 @@ class TieredWithMinimumPriceMinimum(BaseModel): class TieredWithMinimumPrice(BaseModel): id: str - billable_metric: Optional[TieredWithMinimumPriceBillableMetric] + billable_metric: Optional[TieredWithMinimumPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -1115,27 +1115,27 @@ class TieredWithMinimumPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: TieredWithMinimumPriceItem - maximum: Optional[TieredWithMinimumPriceMaximum] + maximum: Optional[TieredWithMinimumPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[TieredWithMinimumPriceMinimum] + minimum: Optional[TieredWithMinimumPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["tiered_with_minimum"] = FieldInfo(alias="model_type") name: str - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] @@ -1177,7 +1177,7 @@ class PackageWithAllocationPriceMinimum(BaseModel): class PackageWithAllocationPrice(BaseModel): id: str - billable_metric: Optional[PackageWithAllocationPriceBillableMetric] + billable_metric: Optional[PackageWithAllocationPriceBillableMetric] = None cadence: Literal["one_time", "monthly", "quarterly", "annual"] @@ -1185,21 +1185,21 @@ class PackageWithAllocationPrice(BaseModel): currency: str - discount: Optional[Discount] + discount: Optional[Discount] = None - external_price_id: Optional[str] + external_price_id: Optional[str] = None - fixed_price_quantity: Optional[float] + fixed_price_quantity: Optional[float] = None item: PackageWithAllocationPriceItem - maximum: Optional[PackageWithAllocationPriceMaximum] + maximum: Optional[PackageWithAllocationPriceMaximum] = None - maximum_amount: Optional[str] + maximum_amount: Optional[str] = None - minimum: Optional[PackageWithAllocationPriceMinimum] + minimum: Optional[PackageWithAllocationPriceMinimum] = None - minimum_amount: Optional[str] + minimum_amount: Optional[str] = None price_model_type: Literal["package_with_allocation"] = FieldInfo(alias="model_type") @@ -1207,7 +1207,7 @@ class PackageWithAllocationPrice(BaseModel): package_with_allocation_config: Dict[str, object] - plan_phase_order: Optional[int] + plan_phase_order: Optional[int] = None price_type: Literal["usage_price", "fixed_price"] diff --git a/src/orb/types/subscription.py b/src/orb/types/subscription.py index 1cd1f9e8..b38016d4 100644 --- a/src/orb/types/subscription.py +++ b/src/orb/types/subscription.py @@ -37,7 +37,7 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): discount_type: Literal["amount"] - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the discount interval.""" start_date: datetime @@ -53,7 +53,7 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): discount_type: Literal["percentage"] - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the discount interval.""" percentage_discount: float @@ -75,7 +75,7 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): discount_type: Literal["usage"] - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the discount interval.""" start_date: datetime @@ -96,7 +96,7 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): class FixedFeeQuantitySchedule(BaseModel): - end_date: Optional[datetime] + end_date: Optional[datetime] = None price_id: str @@ -112,7 +112,7 @@ class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the maximum interval.""" maximum_amount: str @@ -132,7 +132,7 @@ class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the minimum interval.""" minimum_amount: str @@ -159,7 +159,7 @@ class PriceInterval(BaseModel): billing_cycle_day: int """The day of the month that Orb bills for this price""" - current_billing_period_end_date: Optional[datetime] + current_billing_period_end_date: Optional[datetime] = None """The end of the current billing period. This is an exclusive timestamp, such that the instant returned is exactly the @@ -167,20 +167,20 @@ class PriceInterval(BaseModel): active. """ - current_billing_period_start_date: Optional[datetime] + current_billing_period_start_date: Optional[datetime] = None """The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if this price interval is not currently active. """ - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The end date of the price interval. This is the date that Orb stops billing for this price. """ - fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] + fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None """The fixed fee quantity transitions for this price interval. This is only relevant for fixed fees. @@ -431,25 +431,25 @@ class PriceInterval(BaseModel): class RedeemedCoupon(BaseModel): coupon_id: str - end_date: Optional[datetime] + end_date: Optional[datetime] = None start_date: datetime class TrialInfo(BaseModel): - end_date: Optional[datetime] + end_date: Optional[datetime] = None class Subscription(BaseModel): id: str - active_plan_phase_order: Optional[int] + active_plan_phase_order: Optional[int] = None """ The current plan phase that is active, only if the subscription's plan has phases. """ - auto_collection: Optional[bool] + auto_collection: Optional[bool] = None """ Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. This property defaults to @@ -466,14 +466,14 @@ class Subscription(BaseModel): created_at: datetime - current_billing_period_end_date: Optional[datetime] + current_billing_period_end_date: Optional[datetime] = None """The end of the current billing period. This is an exclusive timestamp, such that the instant returned is not part of the billing period. Set to null for subscriptions that are not currently active. """ - current_billing_period_start_date: Optional[datetime] + current_billing_period_start_date: Optional[datetime] = None """The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of @@ -503,7 +503,7 @@ class Subscription(BaseModel): on what this timezone parameter influences within Orb. """ - default_invoice_memo: Optional[str] + default_invoice_memo: Optional[str] = None """Determines the default memo on this subscriptions' invoices. Note that if this is not provided, it is determined by the plan configuration. @@ -512,12 +512,12 @@ class Subscription(BaseModel): discount_intervals: List[DiscountInterval] """The discount intervals for this subscription.""" - end_date: Optional[datetime] + end_date: Optional[datetime] = None """The date Orb stops billing for this subscription.""" fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule] - invoicing_threshold: Optional[str] + invoicing_threshold: Optional[str] = None maximum_intervals: List[MaximumInterval] """The maximum intervals for this subscription.""" @@ -552,7 +552,7 @@ class Subscription(BaseModel): price_intervals: List[PriceInterval] """The price intervals for this subscription.""" - redeemed_coupon: Optional[RedeemedCoupon] + redeemed_coupon: Optional[RedeemedCoupon] = None start_date: datetime """The date Orb starts billing for this subscription.""" diff --git a/src/orb/types/subscription_fetch_costs_response.py b/src/orb/types/subscription_fetch_costs_response.py index e778d1c8..30caae99 100644 --- a/src/orb/types/subscription_fetch_costs_response.py +++ b/src/orb/types/subscription_fetch_costs_response.py @@ -13,12 +13,12 @@ class DataPerPriceCostPriceGroup(BaseModel): grouping_key: str """Grouping key to break down a single price's costs""" - grouping_value: Optional[str] + grouping_value: Optional[str] = None - secondary_grouping_key: Optional[str] + secondary_grouping_key: Optional[str] = None """If the price is a matrix price, this is the second dimension key""" - secondary_grouping_value: Optional[str] + secondary_grouping_value: Optional[str] = None total: str """Total costs for this group for the timeframe. diff --git a/src/orb/types/subscription_fetch_schedule_response.py b/src/orb/types/subscription_fetch_schedule_response.py index c87e5ee6..dba7ff8a 100644 --- a/src/orb/types/subscription_fetch_schedule_response.py +++ b/src/orb/types/subscription_fetch_schedule_response.py @@ -9,20 +9,20 @@ class Plan(BaseModel): - id: Optional[str] + id: Optional[str] = None - external_plan_id: Optional[str] + external_plan_id: Optional[str] = None """ 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] + name: Optional[str] = None class SubscriptionFetchScheduleResponse(BaseModel): - end_date: Optional[datetime] + end_date: Optional[datetime] = None plan: Plan diff --git a/src/orb/types/subscription_usage.py b/src/orb/types/subscription_usage.py index 24d1c4e9..023caba8 100644 --- a/src/orb/types/subscription_usage.py +++ b/src/orb/types/subscription_usage.py @@ -80,7 +80,7 @@ class GroupedSubscriptionUsageData(BaseModel): class GroupedSubscriptionUsagePaginationMetadata(BaseModel): has_more: bool - next_cursor: Optional[str] + next_cursor: Optional[str] = None class GroupedSubscriptionUsage(BaseModel): diff --git a/src/orb/types/subscriptions.py b/src/orb/types/subscriptions.py index 4c15a264..86ca688a 100644 --- a/src/orb/types/subscriptions.py +++ b/src/orb/types/subscriptions.py @@ -11,7 +11,7 @@ class PaginationMetadata(BaseModel): has_more: bool - next_cursor: Optional[str] + next_cursor: Optional[str] = None class Subscriptions(BaseModel):