diff --git a/CHANGELOG.md b/CHANGELOG.md index f1fba8c..401480a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### v3.22.0 (2026-05-07) +* * * + +### Bug fixes: + +- Fixed an inconsistency in required parameters for API methods between the SDK Generator and OpenAPI specifications. + + + ### v3.21.0 (2026-05-04) * * * ### New Resources: diff --git a/VERSION b/VERSION index 6075c9a..a7e7070 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.21.0 +3.22.0 diff --git a/chargebee/models/addon/operations.py b/chargebee/models/addon/operations.py index 54b5677..a05e43c 100644 --- a/chargebee/models/addon/operations.py +++ b/chargebee/models/addon/operations.py @@ -141,7 +141,7 @@ class CreateParams(TypedDict): show_description_in_invoices: NotRequired[bool] show_description_in_quotes: NotRequired[bool] price_in_decimal: NotRequired[str] - tax_providers_fields: Required[List["Addon.CreateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[List["Addon.CreateTaxProvidersFieldParams"]] proration_type: NotRequired["Addon.ProrationType"] status: NotRequired["Addon.Status"] @@ -182,7 +182,7 @@ class UpdateParams(TypedDict): show_description_in_invoices: NotRequired[bool] show_description_in_quotes: NotRequired[bool] price_in_decimal: NotRequired[str] - tax_providers_fields: Required[List["Addon.UpdateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[List["Addon.UpdateTaxProvidersFieldParams"]] proration_type: NotRequired["Addon.ProrationType"] class ListParams(TypedDict): diff --git a/chargebee/models/alert/operations.py b/chargebee/models/alert/operations.py index 4d7c469..f3a9f28 100644 --- a/chargebee/models/alert/operations.py +++ b/chargebee/models/alert/operations.py @@ -36,7 +36,7 @@ class CreateParams(TypedDict): description: NotRequired[str] metered_feature_id: Required[str] subscription_id: NotRequired[str] - threshold: Required["Alert.CreateThresholdParams"] + threshold: NotRequired["Alert.CreateThresholdParams"] meta: NotRequired[str] filter_conditions: NotRequired[List["Alert.CreateFilterConditionParams"]] diff --git a/chargebee/models/coupon/operations.py b/chargebee/models/coupon/operations.py index 54eb348..3c2af83 100644 --- a/chargebee/models/coupon/operations.py +++ b/chargebee/models/coupon/operations.py @@ -203,12 +203,12 @@ class CreateForItemsParams(TypedDict): included_in_mrr: NotRequired[bool] period: NotRequired[int] period_unit: NotRequired[enums.PeriodUnit] - item_constraints: Required[List["Coupon.CreateForItemsItemConstraintParams"]] + item_constraints: NotRequired[List["Coupon.CreateForItemsItemConstraintParams"]] item_constraint_criteria: NotRequired[ List["Coupon.CreateForItemsItemConstraintCriteriaParams"] ] status: NotRequired["Coupon.Status"] - coupon_constraints: Required[ + coupon_constraints: NotRequired[ List["Coupon.CreateForItemsCouponConstraintParams"] ] @@ -231,11 +231,11 @@ class UpdateForItemsParams(TypedDict): included_in_mrr: NotRequired[bool] period: NotRequired[int] period_unit: NotRequired[enums.PeriodUnit] - item_constraints: Required[List["Coupon.UpdateForItemsItemConstraintParams"]] + item_constraints: NotRequired[List["Coupon.UpdateForItemsItemConstraintParams"]] item_constraint_criteria: NotRequired[ List["Coupon.UpdateForItemsItemConstraintCriteriaParams"] ] - coupon_constraints: Required[ + coupon_constraints: NotRequired[ List["Coupon.UpdateForItemsCouponConstraintParams"] ] diff --git a/chargebee/models/credit_note/operations.py b/chargebee/models/credit_note/operations.py index f9de702..3e5045b 100644 --- a/chargebee/models/credit_note/operations.py +++ b/chargebee/models/credit_note/operations.py @@ -407,7 +407,7 @@ class RefundParams(TypedDict): refund_reason_code: NotRequired[str] class RecordRefundParams(TypedDict): - transaction: Required["CreditNote.RecordRefundTransactionParams"] + transaction: NotRequired["CreditNote.RecordRefundTransactionParams"] refund_reason_code: NotRequired[str] comment: NotRequired[str] @@ -446,7 +446,7 @@ class DeleteParams(TypedDict): comment: NotRequired[str] class RemoveTaxWithheldRefundParams(TypedDict): - tax_withheld: Required["CreditNote.RemoveTaxWithheldRefundTaxWithheldParams"] + tax_withheld: NotRequired["CreditNote.RemoveTaxWithheldRefundTaxWithheldParams"] class ImportCreditNoteParams(TypedDict): id: Required[str] @@ -465,12 +465,16 @@ class ImportCreditNoteParams(TypedDict): round_off_amount: NotRequired[int] fractional_correction: NotRequired[int] vat_number_prefix: NotRequired[str] - line_items: Required[List["CreditNote.ImportCreditNoteLineItemParams"]] - line_item_tiers: Required[List["CreditNote.ImportCreditNoteLineItemTierParams"]] - discounts: Required[List["CreditNote.ImportCreditNoteDiscountParams"]] - taxes: Required[List["CreditNote.ImportCreditNoteTaxParams"]] - allocations: Required[List["CreditNote.ImportCreditNoteAllocationParams"]] - linked_refunds: Required[List["CreditNote.ImportCreditNoteLinkedRefundParams"]] + line_items: NotRequired[List["CreditNote.ImportCreditNoteLineItemParams"]] + line_item_tiers: NotRequired[ + List["CreditNote.ImportCreditNoteLineItemTierParams"] + ] + discounts: NotRequired[List["CreditNote.ImportCreditNoteDiscountParams"]] + taxes: NotRequired[List["CreditNote.ImportCreditNoteTaxParams"]] + allocations: NotRequired[List["CreditNote.ImportCreditNoteAllocationParams"]] + linked_refunds: NotRequired[ + List["CreditNote.ImportCreditNoteLinkedRefundParams"] + ] def create(self, params: CreateParams, headers=None) -> CreateResponse: jsonKeys = {} diff --git a/chargebee/models/customer/operations.py b/chargebee/models/customer/operations.py index 0459a01..d89ec9a 100644 --- a/chargebee/models/customer/operations.py +++ b/chargebee/models/customer/operations.py @@ -537,7 +537,7 @@ class UpdateParams(TypedDict): ] class UpdatePaymentMethodParams(TypedDict): - payment_method: Required["Customer.UpdatePaymentMethodPaymentMethodParams"] + payment_method: NotRequired["Customer.UpdatePaymentMethodPaymentMethodParams"] class UpdateBillingInfoParams(TypedDict): billing_address: NotRequired["Customer.UpdateBillingInfoBillingAddressParams"] @@ -565,13 +565,13 @@ class AssignPaymentRoleParams(TypedDict): role: Required[enums.Role] class AddContactParams(TypedDict): - contact: Required["Customer.AddContactContactParams"] + contact: NotRequired["Customer.AddContactContactParams"] class UpdateContactParams(TypedDict): - contact: Required["Customer.UpdateContactContactParams"] + contact: NotRequired["Customer.UpdateContactContactParams"] class DeleteContactParams(TypedDict): - contact: Required["Customer.DeleteContactContactParams"] + contact: NotRequired["Customer.DeleteContactContactParams"] class AddPromotionalCreditsParams(TypedDict): amount: Required[int] @@ -595,12 +595,12 @@ class SetPromotionalCreditsParams(TypedDict): reference: NotRequired[str] class RecordExcessPaymentParams(TypedDict): - transaction: Required["Customer.RecordExcessPaymentTransactionParams"] + transaction: NotRequired["Customer.RecordExcessPaymentTransactionParams"] comment: NotRequired[str] class CollectPaymentParams(TypedDict): amount: NotRequired[int] - invoice_allocations: Required[ + invoice_allocations: NotRequired[ List["Customer.CollectPaymentInvoiceAllocationParams"] ] payment_source_id: NotRequired[str] diff --git a/chargebee/models/differential_price/operations.py b/chargebee/models/differential_price/operations.py index d40fd6c..7667830 100644 --- a/chargebee/models/differential_price/operations.py +++ b/chargebee/models/differential_price/operations.py @@ -72,7 +72,7 @@ class CreateParams(TypedDict): parent_item_id: Required[str] price: NotRequired[int] price_in_decimal: NotRequired[str] - parent_periods: Required[List["DifferentialPrice.CreateParentPeriodParams"]] + parent_periods: NotRequired[List["DifferentialPrice.CreateParentPeriodParams"]] tiers: NotRequired[List["DifferentialPrice.CreateTierParams"]] business_entity_id: NotRequired[str] @@ -83,7 +83,7 @@ class UpdateParams(TypedDict): item_price_id: Required[str] price: NotRequired[int] price_in_decimal: NotRequired[str] - parent_periods: Required[List["DifferentialPrice.UpdateParentPeriodParams"]] + parent_periods: NotRequired[List["DifferentialPrice.UpdateParentPeriodParams"]] tiers: NotRequired[List["DifferentialPrice.UpdateTierParams"]] class DeleteParams(TypedDict): diff --git a/chargebee/models/entitlement/operations.py b/chargebee/models/entitlement/operations.py index 3a7740e..31e0cb9 100644 --- a/chargebee/models/entitlement/operations.py +++ b/chargebee/models/entitlement/operations.py @@ -39,7 +39,7 @@ class ListParams(TypedDict): class CreateParams(TypedDict): action: Required[enums.Action] change_reason: NotRequired[str] - entitlements: Required[List["Entitlement.CreateEntitlementParams"]] + entitlements: NotRequired[List["Entitlement.CreateEntitlementParams"]] def list(self, params: ListParams = None, headers=None) -> ListResponse: jsonKeys = {} diff --git a/chargebee/models/entitlement_override/operations.py b/chargebee/models/entitlement_override/operations.py index 1bd759d..813e558 100644 --- a/chargebee/models/entitlement_override/operations.py +++ b/chargebee/models/entitlement_override/operations.py @@ -28,7 +28,7 @@ class AddEntitlementOverrideForSubscriptionEntitlementOverrideParams(TypedDict): class AddEntitlementOverrideForSubscriptionParams(TypedDict): action: NotRequired[enums.Action] - entitlement_overrides: Required[ + entitlement_overrides: NotRequired[ List[ "EntitlementOverride.AddEntitlementOverrideForSubscriptionEntitlementOverrideParams" ] diff --git a/chargebee/models/estimate/operations.py b/chargebee/models/estimate/operations.py index ad8b543..0ee24ed 100644 --- a/chargebee/models/estimate/operations.py +++ b/chargebee/models/estimate/operations.py @@ -756,7 +756,7 @@ class CreateInvoiceForItemsBillingAddressParams(TypedDict): validation_status: NotRequired[enums.ValidationStatus] class CreateSubscriptionParams(TypedDict): - subscription: Required["Estimate.CreateSubscriptionSubscriptionParams"] + subscription: NotRequired["Estimate.CreateSubscriptionSubscriptionParams"] billing_cycles: NotRequired[int] addons: NotRequired[List["Estimate.CreateSubscriptionAddonParams"]] event_based_addons: NotRequired[ @@ -782,10 +782,10 @@ class CreateSubscriptionParams(TypedDict): class CreateSubItemEstimateParams(TypedDict): subscription: NotRequired["Estimate.CreateSubItemEstimateSubscriptionParams"] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Estimate.CreateSubItemEstimateSubscriptionItemParams"] ] - discounts: Required[List["Estimate.CreateSubItemEstimateDiscountParams"]] + discounts: NotRequired[List["Estimate.CreateSubItemEstimateDiscountParams"]] mandatory_items_to_remove: NotRequired[List[str]] item_tiers: NotRequired[List["Estimate.CreateSubItemEstimateItemTierParams"]] terms_to_charge: NotRequired[int] @@ -836,10 +836,10 @@ class CreateSubItemForCustomerEstimateParams(TypedDict): ] invoice_immediately: NotRequired[bool] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Estimate.CreateSubItemForCustomerEstimateSubscriptionItemParams"] ] - discounts: Required[ + discounts: NotRequired[ List["Estimate.CreateSubItemForCustomerEstimateDiscountParams"] ] mandatory_items_to_remove: NotRequired[List[str]] @@ -864,7 +864,7 @@ class CreateSubItemForCustomerEstimateParams(TypedDict): ] class UpdateSubscriptionParams(TypedDict): - subscription: Required["Estimate.UpdateSubscriptionSubscriptionParams"] + subscription: NotRequired["Estimate.UpdateSubscriptionSubscriptionParams"] changes_scheduled_at: NotRequired[int] change_option: NotRequired[enums.ChangeOption] addons: NotRequired[List["Estimate.UpdateSubscriptionAddonParams"]] @@ -894,15 +894,19 @@ class UpdateSubscriptionParams(TypedDict): invoice_immediately: NotRequired[bool] class UpdateSubscriptionForItemsParams(TypedDict): - subscription: Required["Estimate.UpdateSubscriptionForItemsSubscriptionParams"] + subscription: NotRequired[ + "Estimate.UpdateSubscriptionForItemsSubscriptionParams" + ] changes_scheduled_at: NotRequired[int] change_option: NotRequired[enums.ChangeOption] - subscription_items: Required[ + subscription_items: NotRequired[ List["Estimate.UpdateSubscriptionForItemsSubscriptionItemParams"] ] mandatory_items_to_remove: NotRequired[List[str]] replace_items_list: NotRequired[bool] - discounts: Required[List["Estimate.UpdateSubscriptionForItemsDiscountParams"]] + discounts: NotRequired[ + List["Estimate.UpdateSubscriptionForItemsDiscountParams"] + ] item_tiers: NotRequired[ List["Estimate.UpdateSubscriptionForItemsItemTierParams"] ] @@ -1010,18 +1014,20 @@ class ResumeSubscriptionParams(TypedDict): class GiftSubscriptionParams(TypedDict): gift: NotRequired["Estimate.GiftSubscriptionGiftParams"] - gifter: Required["Estimate.GiftSubscriptionGifterParams"] - gift_receiver: Required["Estimate.GiftSubscriptionGiftReceiverParams"] + gifter: NotRequired["Estimate.GiftSubscriptionGifterParams"] + gift_receiver: NotRequired["Estimate.GiftSubscriptionGiftReceiverParams"] coupon_ids: NotRequired[List[str]] payment_intent: NotRequired["Estimate.GiftSubscriptionPaymentIntentParams"] shipping_address: NotRequired["Estimate.GiftSubscriptionShippingAddressParams"] - subscription: Required["Estimate.GiftSubscriptionSubscriptionParams"] + subscription: NotRequired["Estimate.GiftSubscriptionSubscriptionParams"] addons: NotRequired[List["Estimate.GiftSubscriptionAddonParams"]] class GiftSubscriptionForItemsParams(TypedDict): gift: NotRequired["Estimate.GiftSubscriptionForItemsGiftParams"] - gifter: Required["Estimate.GiftSubscriptionForItemsGifterParams"] - gift_receiver: Required["Estimate.GiftSubscriptionForItemsGiftReceiverParams"] + gifter: NotRequired["Estimate.GiftSubscriptionForItemsGifterParams"] + gift_receiver: NotRequired[ + "Estimate.GiftSubscriptionForItemsGiftReceiverParams" + ] coupon_ids: NotRequired[List[str]] payment_intent: NotRequired[ "Estimate.GiftSubscriptionForItemsPaymentIntentParams" @@ -1069,7 +1075,7 @@ class CreateInvoiceForItemsParams(TypedDict): authorization_transaction_id: NotRequired[str] payment_source_id: NotRequired[str] auto_collection: NotRequired[enums.AutoCollection] - discounts: Required[List["Estimate.CreateInvoiceForItemsDiscountParams"]] + discounts: NotRequired[List["Estimate.CreateInvoiceForItemsDiscountParams"]] shipping_address: NotRequired[ "Estimate.CreateInvoiceForItemsShippingAddressParams" ] diff --git a/chargebee/models/gift/operations.py b/chargebee/models/gift/operations.py index 76ded5b..e942806 100644 --- a/chargebee/models/gift/operations.py +++ b/chargebee/models/gift/operations.py @@ -153,12 +153,12 @@ class CreateParams(TypedDict): auto_claim: NotRequired[bool] no_expiry: NotRequired[bool] claim_expiry_date: NotRequired[int] - gifter: Required["Gift.CreateGifterParams"] - gift_receiver: Required["Gift.CreateGiftReceiverParams"] + gifter: NotRequired["Gift.CreateGifterParams"] + gift_receiver: NotRequired["Gift.CreateGiftReceiverParams"] coupon_ids: NotRequired[List[str]] payment_intent: NotRequired["Gift.CreatePaymentIntentParams"] shipping_address: NotRequired["Gift.CreateShippingAddressParams"] - subscription: Required["Gift.CreateSubscriptionParams"] + subscription: NotRequired["Gift.CreateSubscriptionParams"] addons: NotRequired[List["Gift.CreateAddonParams"]] class CreateForItemsParams(TypedDict): @@ -166,8 +166,8 @@ class CreateForItemsParams(TypedDict): auto_claim: NotRequired[bool] no_expiry: NotRequired[bool] claim_expiry_date: NotRequired[int] - gifter: Required["Gift.CreateForItemsGifterParams"] - gift_receiver: Required["Gift.CreateForItemsGiftReceiverParams"] + gifter: NotRequired["Gift.CreateForItemsGifterParams"] + gift_receiver: NotRequired["Gift.CreateForItemsGiftReceiverParams"] coupon_ids: NotRequired[List[str]] payment_intent: NotRequired["Gift.CreateForItemsPaymentIntentParams"] shipping_address: NotRequired["Gift.CreateForItemsShippingAddressParams"] diff --git a/chargebee/models/hosted_page/operations.py b/chargebee/models/hosted_page/operations.py index 25169ac..dd27eab 100644 --- a/chargebee/models/hosted_page/operations.py +++ b/chargebee/models/hosted_page/operations.py @@ -630,7 +630,7 @@ class ViewVoucherCustomerParams(TypedDict): locale: NotRequired[str] class CheckoutNewParams(TypedDict): - subscription: Required["HostedPage.CheckoutNewSubscriptionParams"] + subscription: NotRequired["HostedPage.CheckoutNewSubscriptionParams"] customer: NotRequired["HostedPage.CheckoutNewCustomerParams"] billing_cycles: NotRequired[int] addons: NotRequired[List["HostedPage.CheckoutNewAddonParams"]] @@ -681,7 +681,7 @@ class CheckoutOneTimeForItemsParams(TypedDict): List["HostedPage.CheckoutOneTimeForItemsItemTierParams"] ] charges: NotRequired[List["HostedPage.CheckoutOneTimeForItemsChargeParams"]] - discounts: Required[List["HostedPage.CheckoutOneTimeForItemsDiscountParams"]] + discounts: NotRequired[List["HostedPage.CheckoutOneTimeForItemsDiscountParams"]] invoice_note: NotRequired[str] invoice: NotRequired["HostedPage.CheckoutOneTimeForItemsInvoiceParams"] coupon: NotRequired[str] @@ -707,10 +707,10 @@ class CheckoutNewForItemsParams(TypedDict): business_entity_id: NotRequired[str] customer: NotRequired["HostedPage.CheckoutNewForItemsCustomerParams"] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["HostedPage.CheckoutNewForItemsSubscriptionItemParams"] ] - discounts: Required[List["HostedPage.CheckoutNewForItemsDiscountParams"]] + discounts: NotRequired[List["HostedPage.CheckoutNewForItemsDiscountParams"]] mandatory_items_to_remove: NotRequired[List[str]] item_tiers: NotRequired[List["HostedPage.CheckoutNewForItemsItemTierParams"]] terms_to_charge: NotRequired[int] @@ -733,7 +733,7 @@ class CheckoutNewForItemsParams(TypedDict): contract_term: NotRequired["HostedPage.CheckoutNewForItemsContractTermParams"] class CheckoutExistingParams(TypedDict): - subscription: Required["HostedPage.CheckoutExistingSubscriptionParams"] + subscription: NotRequired["HostedPage.CheckoutExistingSubscriptionParams"] addons: NotRequired[List["HostedPage.CheckoutExistingAddonParams"]] event_based_addons: NotRequired[ List["HostedPage.CheckoutExistingEventBasedAddonParams"] @@ -761,13 +761,17 @@ class CheckoutExistingParams(TypedDict): class CheckoutExistingForItemsParams(TypedDict): layout: NotRequired[enums.Layout] - subscription: Required["HostedPage.CheckoutExistingForItemsSubscriptionParams"] - subscription_items: Required[ + subscription: NotRequired[ + "HostedPage.CheckoutExistingForItemsSubscriptionParams" + ] + subscription_items: NotRequired[ List["HostedPage.CheckoutExistingForItemsSubscriptionItemParams"] ] mandatory_items_to_remove: NotRequired[List[str]] replace_items_list: NotRequired[bool] - discounts: Required[List["HostedPage.CheckoutExistingForItemsDiscountParams"]] + discounts: NotRequired[ + List["HostedPage.CheckoutExistingForItemsDiscountParams"] + ] item_tiers: NotRequired[ List["HostedPage.CheckoutExistingForItemsItemTierParams"] ] @@ -797,7 +801,7 @@ class CheckoutExistingForItemsParams(TypedDict): ] class UpdateCardParams(TypedDict): - customer: Required["HostedPage.UpdateCardCustomerParams"] + customer: NotRequired["HostedPage.UpdateCardCustomerParams"] card: NotRequired["HostedPage.UpdateCardCardParams"] redirect_url: NotRequired[str] cancel_url: NotRequired[str] @@ -806,7 +810,7 @@ class UpdateCardParams(TypedDict): iframe_messaging: NotRequired[bool] class UpdatePaymentMethodParams(TypedDict): - customer: Required["HostedPage.UpdatePaymentMethodCustomerParams"] + customer: NotRequired["HostedPage.UpdatePaymentMethodCustomerParams"] card: NotRequired["HostedPage.UpdatePaymentMethodCardParams"] redirect_url: NotRequired[str] cancel_url: NotRequired[str] @@ -816,31 +820,31 @@ class UpdatePaymentMethodParams(TypedDict): class ManagePaymentSourcesParams(TypedDict): business_entity_id: NotRequired[str] - customer: Required["HostedPage.ManagePaymentSourcesCustomerParams"] + customer: NotRequired["HostedPage.ManagePaymentSourcesCustomerParams"] redirect_url: NotRequired[str] card: NotRequired["HostedPage.ManagePaymentSourcesCardParams"] class CollectNowParams(TypedDict): - customer: Required["HostedPage.CollectNowCustomerParams"] + customer: NotRequired["HostedPage.CollectNowCustomerParams"] redirect_url: NotRequired[str] card: NotRequired["HostedPage.CollectNowCardParams"] currency_code: NotRequired[str] payment_method_save_policy: NotRequired[enums.PaymentMethodSavePolicy] class AcceptQuoteParams(TypedDict): - quote: Required["HostedPage.AcceptQuoteQuoteParams"] + quote: NotRequired["HostedPage.AcceptQuoteQuoteParams"] redirect_url: NotRequired[str] layout: NotRequired[enums.Layout] class ExtendSubscriptionParams(TypedDict): - subscription: Required["HostedPage.ExtendSubscriptionSubscriptionParams"] + subscription: NotRequired["HostedPage.ExtendSubscriptionSubscriptionParams"] expiry: NotRequired[int] billing_cycle: NotRequired[int] class CheckoutGiftParams(TypedDict): gifter: NotRequired["HostedPage.CheckoutGiftGifterParams"] redirect_url: NotRequired[str] - subscription: Required["HostedPage.CheckoutGiftSubscriptionParams"] + subscription: NotRequired["HostedPage.CheckoutGiftSubscriptionParams"] addons: NotRequired[List["HostedPage.CheckoutGiftAddonParams"]] coupon_ids: NotRequired[List[str]] @@ -855,7 +859,7 @@ class CheckoutGiftForItemsParams(TypedDict): coupon_ids: NotRequired[List[str]] class ClaimGiftParams(TypedDict): - gift: Required["HostedPage.ClaimGiftGiftParams"] + gift: NotRequired["HostedPage.ClaimGiftGiftParams"] redirect_url: NotRequired[str] customer: NotRequired["HostedPage.ClaimGiftCustomerParams"] @@ -871,7 +875,7 @@ class ListParams(TypedDict): updated_at: NotRequired[Filters.TimestampFilter] class PreCancelParams(TypedDict): - subscription: Required["HostedPage.PreCancelSubscriptionParams"] + subscription: NotRequired["HostedPage.PreCancelSubscriptionParams"] pass_thru_content: NotRequired[str] cancel_url: NotRequired[str] redirect_url: NotRequired[str] @@ -882,7 +886,7 @@ class EventsParams(TypedDict): event_data: Required[Dict[Any, Any]] class ViewVoucherParams(TypedDict): - payment_voucher: Required["HostedPage.ViewVoucherPaymentVoucherParams"] + payment_voucher: NotRequired["HostedPage.ViewVoucherPaymentVoucherParams"] customer: NotRequired["HostedPage.ViewVoucherCustomerParams"] def checkout_new( diff --git a/chargebee/models/in_app_subscription/operations.py b/chargebee/models/in_app_subscription/operations.py index d8ecb34..b9ec35c 100644 --- a/chargebee/models/in_app_subscription/operations.py +++ b/chargebee/models/in_app_subscription/operations.py @@ -55,16 +55,18 @@ class ImportSubscriptionCustomerParams(TypedDict): class ProcessReceiptParams(TypedDict): receipt: Required[str] - product: Required["InAppSubscription.ProcessReceiptProductParams"] + product: NotRequired["InAppSubscription.ProcessReceiptProductParams"] customer: NotRequired["InAppSubscription.ProcessReceiptCustomerParams"] class ImportReceiptParams(TypedDict): receipt: Required[str] - product: Required["InAppSubscription.ImportReceiptProductParams"] + product: NotRequired["InAppSubscription.ImportReceiptProductParams"] customer: NotRequired["InAppSubscription.ImportReceiptCustomerParams"] class ImportSubscriptionParams(TypedDict): - subscription: Required["InAppSubscription.ImportSubscriptionSubscriptionParams"] + subscription: NotRequired[ + "InAppSubscription.ImportSubscriptionSubscriptionParams" + ] customer: NotRequired["InAppSubscription.ImportSubscriptionCustomerParams"] class RetrieveStoreSubsParams(TypedDict): diff --git a/chargebee/models/invoice/operations.py b/chargebee/models/invoice/operations.py index c64ae78..acdf09d 100644 --- a/chargebee/models/invoice/operations.py +++ b/chargebee/models/invoice/operations.py @@ -945,7 +945,7 @@ class CreateForChargeItemsAndChargesParams(TypedDict): tax_providers_fields: NotRequired[ List["Invoice.CreateForChargeItemsAndChargesTaxProvidersFieldParams"] ] - discounts: Required[ + discounts: NotRequired[ List["Invoice.CreateForChargeItemsAndChargesDiscountParams"] ] invoice_date: NotRequired[int] @@ -1010,7 +1010,7 @@ class ChargeAddonParams(TypedDict): class CreateForChargeItemParams(TypedDict): customer_id: NotRequired[str] subscription_id: NotRequired[str] - item_price: Required["Invoice.CreateForChargeItemItemPriceParams"] + item_price: NotRequired["Invoice.CreateForChargeItemItemPriceParams"] item_tiers: NotRequired[List["Invoice.CreateForChargeItemItemTierParams"]] po_number: NotRequired[str] coupon: NotRequired[str] @@ -1051,15 +1051,15 @@ class ImportInvoiceParams(TypedDict): net_term_days: NotRequired[int] has_advance_charges: NotRequired[bool] use_for_proration: NotRequired[bool] - line_items: Required[List["Invoice.ImportInvoiceLineItemParams"]] - payment_reference_numbers: Required[ + line_items: NotRequired[List["Invoice.ImportInvoiceLineItemParams"]] + payment_reference_numbers: NotRequired[ List["Invoice.ImportInvoicePaymentReferenceNumberParams"] ] - line_item_tiers: Required[List["Invoice.ImportInvoiceLineItemTierParams"]] - discounts: Required[List["Invoice.ImportInvoiceDiscountParams"]] - taxes: Required[List["Invoice.ImportInvoiceTaxParams"]] + line_item_tiers: NotRequired[List["Invoice.ImportInvoiceLineItemTierParams"]] + discounts: NotRequired[List["Invoice.ImportInvoiceDiscountParams"]] + taxes: NotRequired[List["Invoice.ImportInvoiceTaxParams"]] credit_note: NotRequired["Invoice.ImportInvoiceCreditNoteParams"] - payments: Required[List["Invoice.ImportInvoicePaymentParams"]] + payments: NotRequired[List["Invoice.ImportInvoicePaymentParams"]] notes: NotRequired[List["Invoice.ImportInvoiceNoteParams"]] billing_address: NotRequired["Invoice.ImportInvoiceBillingAddressParams"] shipping_address: NotRequired["Invoice.ImportInvoiceShippingAddressParams"] @@ -1154,7 +1154,7 @@ class AddAddonChargeParams(TypedDict): subscription_id: NotRequired[str] class AddChargeItemParams(TypedDict): - item_price: Required["Invoice.AddChargeItemItemPriceParams"] + item_price: NotRequired["Invoice.AddChargeItemItemPriceParams"] item_tiers: NotRequired[List["Invoice.AddChargeItemItemTierParams"]] comment: NotRequired[str] subscription_id: NotRequired[str] @@ -1174,14 +1174,14 @@ class CollectPaymentParams(TypedDict): payment_initiator: NotRequired[enums.PaymentInitiator] class RecordPaymentParams(TypedDict): - transaction: Required["Invoice.RecordPaymentTransactionParams"] + transaction: NotRequired["Invoice.RecordPaymentTransactionParams"] comment: NotRequired[str] class RecordTaxWithheldParams(TypedDict): - tax_withheld: Required["Invoice.RecordTaxWithheldTaxWithheldParams"] + tax_withheld: NotRequired["Invoice.RecordTaxWithheldTaxWithheldParams"] class RemoveTaxWithheldParams(TypedDict): - tax_withheld: Required["Invoice.RemoveTaxWithheldTaxWithheldParams"] + tax_withheld: NotRequired["Invoice.RemoveTaxWithheldTaxWithheldParams"] class RefundParams(TypedDict): refund_amount: NotRequired[int] @@ -1190,16 +1190,16 @@ class RefundParams(TypedDict): customer_notes: NotRequired[str] class RecordRefundParams(TypedDict): - transaction: Required["Invoice.RecordRefundTransactionParams"] + transaction: NotRequired["Invoice.RecordRefundTransactionParams"] credit_note: NotRequired["Invoice.RecordRefundCreditNoteParams"] comment: NotRequired[str] customer_notes: NotRequired[str] class RemovePaymentParams(TypedDict): - transaction: Required["Invoice.RemovePaymentTransactionParams"] + transaction: NotRequired["Invoice.RemovePaymentTransactionParams"] class RemoveCreditNoteParams(TypedDict): - credit_note: Required["Invoice.RemoveCreditNoteCreditNoteParams"] + credit_note: NotRequired["Invoice.RemoveCreditNoteCreditNoteParams"] class VoidInvoiceParams(TypedDict): comment: NotRequired[str] diff --git a/chargebee/models/item_entitlement/operations.py b/chargebee/models/item_entitlement/operations.py index 9aef846..b6b3572 100644 --- a/chargebee/models/item_entitlement/operations.py +++ b/chargebee/models/item_entitlement/operations.py @@ -41,13 +41,13 @@ class ItemEntitlementsForFeatureParams(TypedDict): class AddItemEntitlementsParams(TypedDict): action: Required[enums.Action] - item_entitlements: Required[ + item_entitlements: NotRequired[ List["ItemEntitlement.AddItemEntitlementsItemEntitlementParams"] ] class UpsertOrRemoveItemEntitlementsForItemParams(TypedDict): action: Required[enums.Action] - item_entitlements: Required[ + item_entitlements: NotRequired[ List[ "ItemEntitlement.UpsertOrRemoveItemEntitlementsForItemItemEntitlementParams" ] diff --git a/chargebee/models/item_price/operations.py b/chargebee/models/item_price/operations.py index 9733854..26e719f 100644 --- a/chargebee/models/item_price/operations.py +++ b/chargebee/models/item_price/operations.py @@ -188,7 +188,9 @@ class CreateParams(TypedDict): billing_cycles: NotRequired[int] trial_end_action: NotRequired["ItemPrice.TrialEndAction"] tax_detail: NotRequired["ItemPrice.CreateTaxDetailParams"] - tax_providers_fields: Required[List["ItemPrice.CreateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[ + List["ItemPrice.CreateTaxProvidersFieldParams"] + ] accounting_detail: NotRequired["ItemPrice.CreateAccountingDetailParams"] class UpdateParams(TypedDict): @@ -220,7 +222,9 @@ class UpdateParams(TypedDict): billing_cycles: NotRequired[int] trial_end_action: NotRequired["ItemPrice.TrialEndAction"] tax_detail: NotRequired["ItemPrice.UpdateTaxDetailParams"] - tax_providers_fields: Required[List["ItemPrice.UpdateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[ + List["ItemPrice.UpdateTaxProvidersFieldParams"] + ] accounting_detail: NotRequired["ItemPrice.UpdateAccountingDetailParams"] show_description_in_invoices: NotRequired[bool] show_description_in_quotes: NotRequired[bool] diff --git a/chargebee/models/order/operations.py b/chargebee/models/order/operations.py index 0d7d5aa..1c67e03 100644 --- a/chargebee/models/order/operations.py +++ b/chargebee/models/order/operations.py @@ -339,7 +339,7 @@ class CancelParams(TypedDict): cancelled_at: NotRequired[int] class CreateRefundableCreditNoteParams(TypedDict): - credit_note: Required["Order.CreateRefundableCreditNoteCreditNoteParams"] + credit_note: NotRequired["Order.CreateRefundableCreditNoteCreditNoteParams"] customer_notes: NotRequired[str] comment: NotRequired[str] diff --git a/chargebee/models/payment_source/operations.py b/chargebee/models/payment_source/operations.py index 27f2189..af7b634 100644 --- a/chargebee/models/payment_source/operations.py +++ b/chargebee/models/payment_source/operations.py @@ -268,13 +268,13 @@ class CreateUsingPaymentIntentParams(TypedDict): class CreateVoucherPaymentSourceParams(TypedDict): customer_id: Required[str] - voucher_payment_source: Required[ + voucher_payment_source: NotRequired[ "PaymentSource.CreateVoucherPaymentSourceVoucherPaymentSourceParams" ] class CreateCardParams(TypedDict): customer_id: Required[str] - card: Required["PaymentSource.CreateCardCardParams"] + card: NotRequired["PaymentSource.CreateCardCardParams"] replace_primary_payment_source: NotRequired[bool] class CreateBankAccountParams(TypedDict): diff --git a/chargebee/models/payment_voucher/operations.py b/chargebee/models/payment_voucher/operations.py index a288bf2..d31db5b 100644 --- a/chargebee/models/payment_voucher/operations.py +++ b/chargebee/models/payment_voucher/operations.py @@ -32,10 +32,10 @@ class CreateInvoiceAllocationParams(TypedDict): class CreateParams(TypedDict): customer_id: Required[str] - voucher_payment_source: Required[ + voucher_payment_source: NotRequired[ "PaymentVoucher.CreateVoucherPaymentSourceParams" ] - invoice_allocations: Required[ + invoice_allocations: NotRequired[ List["PaymentVoucher.CreateInvoiceAllocationParams"] ] payment_source_id: NotRequired[str] diff --git a/chargebee/models/plan/operations.py b/chargebee/models/plan/operations.py index 8558e5e..a0ca4c8 100644 --- a/chargebee/models/plan/operations.py +++ b/chargebee/models/plan/operations.py @@ -209,7 +209,7 @@ class CreateParams(TypedDict): is_shippable: NotRequired[bool] shipping_frequency_period: NotRequired[int] shipping_frequency_period_unit: NotRequired["Plan.ShippingFrequencyPeriodUnit"] - tax_providers_fields: Required[List["Plan.CreateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[List["Plan.CreateTaxProvidersFieldParams"]] applicable_addons: NotRequired[List["Plan.CreateApplicableAddonParams"]] event_based_addons: NotRequired[List["Plan.CreateEventBasedAddonParams"]] attached_addons: NotRequired[List["Plan.CreateAttachedAddonParams"]] @@ -262,7 +262,7 @@ class UpdateParams(TypedDict): is_shippable: NotRequired[bool] shipping_frequency_period: NotRequired[int] shipping_frequency_period_unit: NotRequired["Plan.ShippingFrequencyPeriodUnit"] - tax_providers_fields: Required[List["Plan.UpdateTaxProvidersFieldParams"]] + tax_providers_fields: NotRequired[List["Plan.UpdateTaxProvidersFieldParams"]] applicable_addons: NotRequired[List["Plan.UpdateApplicableAddonParams"]] event_based_addons: NotRequired[List["Plan.UpdateEventBasedAddonParams"]] attached_addons: NotRequired[List["Plan.UpdateAttachedAddonParams"]] diff --git a/chargebee/models/portal_session/operations.py b/chargebee/models/portal_session/operations.py index 21ef4ec..45d7406 100644 --- a/chargebee/models/portal_session/operations.py +++ b/chargebee/models/portal_session/operations.py @@ -29,7 +29,7 @@ class CreateCustomerParams(TypedDict): id: Required[str] class CreateParams(TypedDict): - customer: Required["PortalSession.CreateCustomerParams"] + customer: NotRequired["PortalSession.CreateCustomerParams"] redirect_url: NotRequired[str] forward_url: NotRequired[str] diff --git a/chargebee/models/price_variant/operations.py b/chargebee/models/price_variant/operations.py index bdc42e4..82f4f2c 100644 --- a/chargebee/models/price_variant/operations.py +++ b/chargebee/models/price_variant/operations.py @@ -36,7 +36,7 @@ class CreateParams(TypedDict): description: NotRequired[str] variant_group: NotRequired[str] business_entity_id: NotRequired[str] - attributes: Required[List["PriceVariant.CreateAttributeParams"]] + attributes: NotRequired[List["PriceVariant.CreateAttributeParams"]] class UpdateParams(TypedDict): name: NotRequired[str] @@ -44,7 +44,7 @@ class UpdateParams(TypedDict): description: NotRequired[str] variant_group: NotRequired[str] status: NotRequired["PriceVariant.Status"] - attributes: Required[List["PriceVariant.UpdateAttributeParams"]] + attributes: NotRequired[List["PriceVariant.UpdateAttributeParams"]] class ListParams(TypedDict): limit: NotRequired[int] diff --git a/chargebee/models/pricing_page_session/operations.py b/chargebee/models/pricing_page_session/operations.py index e3ec0c1..991f638 100644 --- a/chargebee/models/pricing_page_session/operations.py +++ b/chargebee/models/pricing_page_session/operations.py @@ -95,7 +95,7 @@ class CreateForExistingSubscriptionContractTermParams(TypedDict): class CreateForNewSubscriptionParams(TypedDict): redirect_url: NotRequired[str] - pricing_page: Required[ + pricing_page: NotRequired[ "PricingPageSession.CreateForNewSubscriptionPricingPageParams" ] subscription: NotRequired[ @@ -107,7 +107,7 @@ class CreateForNewSubscriptionParams(TypedDict): customer: NotRequired[ "PricingPageSession.CreateForNewSubscriptionCustomerParams" ] - discounts: Required[ + discounts: NotRequired[ List["PricingPageSession.CreateForNewSubscriptionDiscountParams"] ] billing_address: NotRequired[ @@ -125,11 +125,11 @@ class CreateForExistingSubscriptionParams(TypedDict): pricing_page: NotRequired[ "PricingPageSession.CreateForExistingSubscriptionPricingPageParams" ] - subscription: Required[ + subscription: NotRequired[ "PricingPageSession.CreateForExistingSubscriptionSubscriptionParams" ] custom: NotRequired[Dict[Any, Any]] - discounts: Required[ + discounts: NotRequired[ List["PricingPageSession.CreateForExistingSubscriptionDiscountParams"] ] contract_term: NotRequired[ diff --git a/chargebee/models/purchase/operations.py b/chargebee/models/purchase/operations.py index 18f6d62..ab2c33c 100644 --- a/chargebee/models/purchase/operations.py +++ b/chargebee/models/purchase/operations.py @@ -158,12 +158,12 @@ class EstimateBillingAddressParams(TypedDict): validation_status: NotRequired[enums.ValidationStatus] class CreateParams(TypedDict): - purchase_items: Required[List["Purchase.CreatePurchaseItemParams"]] - item_tiers: Required[List["Purchase.CreateItemTierParams"]] + purchase_items: NotRequired[List["Purchase.CreatePurchaseItemParams"]] + item_tiers: NotRequired[List["Purchase.CreateItemTierParams"]] shipping_addresses: NotRequired[List["Purchase.CreateShippingAddressParams"]] discounts: NotRequired[List["Purchase.CreateDiscountParams"]] - subscription_info: Required[List["Purchase.CreateSubscriptionInfoParams"]] - contract_terms: Required[List["Purchase.CreateContractTermParams"]] + subscription_info: NotRequired[List["Purchase.CreateSubscriptionInfoParams"]] + contract_terms: NotRequired[List["Purchase.CreateContractTermParams"]] invoice_info: NotRequired["Purchase.CreateInvoiceInfoParams"] payment_schedule: NotRequired["Purchase.CreatePaymentScheduleParams"] statement_descriptor: NotRequired["Purchase.CreateStatementDescriptorParams"] @@ -173,12 +173,12 @@ class CreateParams(TypedDict): replace_primary_payment_source: NotRequired[bool] class EstimateParams(TypedDict): - purchase_items: Required[List["Purchase.EstimatePurchaseItemParams"]] - item_tiers: Required[List["Purchase.EstimateItemTierParams"]] + purchase_items: NotRequired[List["Purchase.EstimatePurchaseItemParams"]] + item_tiers: NotRequired[List["Purchase.EstimateItemTierParams"]] shipping_addresses: NotRequired[List["Purchase.EstimateShippingAddressParams"]] discounts: NotRequired[List["Purchase.EstimateDiscountParams"]] - subscription_info: Required[List["Purchase.EstimateSubscriptionInfoParams"]] - contract_terms: Required[List["Purchase.EstimateContractTermParams"]] + subscription_info: NotRequired[List["Purchase.EstimateSubscriptionInfoParams"]] + contract_terms: NotRequired[List["Purchase.EstimateContractTermParams"]] customer: NotRequired["Purchase.EstimateCustomerParams"] billing_address: NotRequired["Purchase.EstimateBillingAddressParams"] client_profile_id: NotRequired[str] diff --git a/chargebee/models/quote/operations.py b/chargebee/models/quote/operations.py index 51522b4..399520b 100644 --- a/chargebee/models/quote/operations.py +++ b/chargebee/models/quote/operations.py @@ -1064,7 +1064,7 @@ class CreateSubForCustomerQuoteParams(TypedDict): name: NotRequired[str] notes: NotRequired[str] expires_at: NotRequired[int] - subscription: Required["Quote.CreateSubForCustomerQuoteSubscriptionParams"] + subscription: NotRequired["Quote.CreateSubForCustomerQuoteSubscriptionParams"] billing_cycles: NotRequired[int] addons: NotRequired[List["Quote.CreateSubForCustomerQuoteAddonParams"]] event_based_addons: NotRequired[ @@ -1082,7 +1082,9 @@ class CreateSubForCustomerQuoteParams(TypedDict): class EditCreateSubForCustomerQuoteParams(TypedDict): notes: NotRequired[str] expires_at: NotRequired[int] - subscription: Required["Quote.EditCreateSubForCustomerQuoteSubscriptionParams"] + subscription: NotRequired[ + "Quote.EditCreateSubForCustomerQuoteSubscriptionParams" + ] billing_cycles: NotRequired[int] addons: NotRequired[List["Quote.EditCreateSubForCustomerQuoteAddonParams"]] event_based_addons: NotRequired[ @@ -1103,7 +1105,7 @@ class UpdateSubscriptionQuoteParams(TypedDict): name: NotRequired[str] notes: NotRequired[str] expires_at: NotRequired[int] - subscription: Required["Quote.UpdateSubscriptionQuoteSubscriptionParams"] + subscription: NotRequired["Quote.UpdateSubscriptionQuoteSubscriptionParams"] addons: NotRequired[List["Quote.UpdateSubscriptionQuoteAddonParams"]] event_based_addons: NotRequired[ List["Quote.UpdateSubscriptionQuoteEventBasedAddonParams"] @@ -1200,10 +1202,12 @@ class CreateSubItemsForCustomerQuoteParams(TypedDict): "Quote.CreateSubItemsForCustomerQuoteSubscriptionParams" ] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Quote.CreateSubItemsForCustomerQuoteSubscriptionItemParams"] ] - discounts: Required[List["Quote.CreateSubItemsForCustomerQuoteDiscountParams"]] + discounts: NotRequired[ + List["Quote.CreateSubItemsForCustomerQuoteDiscountParams"] + ] mandatory_items_to_remove: NotRequired[List[str]] item_tiers: NotRequired[ List["Quote.CreateSubItemsForCustomerQuoteItemTierParams"] @@ -1231,10 +1235,10 @@ class EditCreateSubCustomerQuoteForItemsParams(TypedDict): "Quote.EditCreateSubCustomerQuoteForItemsSubscriptionParams" ] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Quote.EditCreateSubCustomerQuoteForItemsSubscriptionItemParams"] ] - discounts: Required[ + discounts: NotRequired[ List["Quote.EditCreateSubCustomerQuoteForItemsDiscountParams"] ] mandatory_items_to_remove: NotRequired[List[str]] @@ -1263,15 +1267,17 @@ class UpdateSubscriptionQuoteForItemsParams(TypedDict): name: NotRequired[str] notes: NotRequired[str] expires_at: NotRequired[int] - subscription: Required[ + subscription: NotRequired[ "Quote.UpdateSubscriptionQuoteForItemsSubscriptionParams" ] - subscription_items: Required[ + subscription_items: NotRequired[ List["Quote.UpdateSubscriptionQuoteForItemsSubscriptionItemParams"] ] mandatory_items_to_remove: NotRequired[List[str]] replace_items_list: NotRequired[bool] - discounts: Required[List["Quote.UpdateSubscriptionQuoteForItemsDiscountParams"]] + discounts: NotRequired[ + List["Quote.UpdateSubscriptionQuoteForItemsDiscountParams"] + ] item_tiers: NotRequired[ List["Quote.UpdateSubscriptionQuoteForItemsItemTierParams"] ] @@ -1301,7 +1307,7 @@ class UpdateSubscriptionQuoteForItemsParams(TypedDict): class EditUpdateSubscriptionQuoteForItemsParams(TypedDict): notes: NotRequired[str] expires_at: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Quote.EditUpdateSubscriptionQuoteForItemsSubscriptionItemParams"] ] mandatory_items_to_remove: NotRequired[List[str]] @@ -1309,7 +1315,7 @@ class EditUpdateSubscriptionQuoteForItemsParams(TypedDict): subscription: NotRequired[ "Quote.EditUpdateSubscriptionQuoteForItemsSubscriptionParams" ] - discounts: Required[ + discounts: NotRequired[ List["Quote.EditUpdateSubscriptionQuoteForItemsDiscountParams"] ] item_tiers: NotRequired[ @@ -1363,7 +1369,9 @@ class CreateForChargeItemsAndChargesParams(TypedDict): shipping_address: NotRequired[ "Quote.CreateForChargeItemsAndChargesShippingAddressParams" ] - discounts: Required[List["Quote.CreateForChargeItemsAndChargesDiscountParams"]] + discounts: NotRequired[ + List["Quote.CreateForChargeItemsAndChargesDiscountParams"] + ] tax_providers_fields: NotRequired[ List["Quote.CreateForChargeItemsAndChargesTaxProvidersFieldParams"] ] @@ -1389,7 +1397,7 @@ class EditForChargeItemsAndChargesParams(TypedDict): shipping_address: NotRequired[ "Quote.EditForChargeItemsAndChargesShippingAddressParams" ] - discounts: Required[List["Quote.EditForChargeItemsAndChargesDiscountParams"]] + discounts: NotRequired[List["Quote.EditForChargeItemsAndChargesDiscountParams"]] tax_providers_fields: NotRequired[ List["Quote.EditForChargeItemsAndChargesTaxProvidersFieldParams"] ] diff --git a/chargebee/models/ramp/operations.py b/chargebee/models/ramp/operations.py index a1efe5b..9abb0e7 100644 --- a/chargebee/models/ramp/operations.py +++ b/chargebee/models/ramp/operations.py @@ -224,13 +224,15 @@ class CreateForSubscriptionParams(TypedDict): coupons_to_remove: NotRequired[List[str]] discounts_to_remove: NotRequired[List[str]] items_to_remove: NotRequired[List[str]] - items_to_add: Required[List["Ramp.CreateForSubscriptionItemsToAddParams"]] - items_to_update: Required[List["Ramp.CreateForSubscriptionItemsToUpdateParams"]] + items_to_add: NotRequired[List["Ramp.CreateForSubscriptionItemsToAddParams"]] + items_to_update: NotRequired[ + List["Ramp.CreateForSubscriptionItemsToUpdateParams"] + ] item_tiers: NotRequired[List["Ramp.CreateForSubscriptionItemTierParams"]] coupons_to_add: NotRequired[ List["Ramp.CreateForSubscriptionCouponsToAddParams"] ] - discounts_to_add: Required[ + discounts_to_add: NotRequired[ List["Ramp.CreateForSubscriptionDiscountsToAddParams"] ] contract_term: NotRequired["Ramp.CreateForSubscriptionContractTermParams"] @@ -241,11 +243,11 @@ class UpdateParams(TypedDict): coupons_to_remove: NotRequired[List[str]] discounts_to_remove: NotRequired[List[str]] items_to_remove: NotRequired[List[str]] - items_to_add: Required[List["Ramp.UpdateItemsToAddParams"]] - items_to_update: Required[List["Ramp.UpdateItemsToUpdateParams"]] + items_to_add: NotRequired[List["Ramp.UpdateItemsToAddParams"]] + items_to_update: NotRequired[List["Ramp.UpdateItemsToUpdateParams"]] item_tiers: NotRequired[List["Ramp.UpdateItemTierParams"]] coupons_to_add: NotRequired[List["Ramp.UpdateCouponsToAddParams"]] - discounts_to_add: Required[List["Ramp.UpdateDiscountsToAddParams"]] + discounts_to_add: NotRequired[List["Ramp.UpdateDiscountsToAddParams"]] contract_term: NotRequired["Ramp.UpdateContractTermParams"] class ListParams(TypedDict): diff --git a/chargebee/models/recorded_purchase/operations.py b/chargebee/models/recorded_purchase/operations.py index ae35e46..7f11f44 100644 --- a/chargebee/models/recorded_purchase/operations.py +++ b/chargebee/models/recorded_purchase/operations.py @@ -51,7 +51,7 @@ class CreateOmnichannelSubscriptionParams(TypedDict): class CreateParams(TypedDict): app_id: Required[str] - customer: Required["RecordedPurchase.CreateCustomerParams"] + customer: NotRequired["RecordedPurchase.CreateCustomerParams"] apple_app_store: NotRequired["RecordedPurchase.CreateAppleAppStoreParams"] google_play_store: NotRequired["RecordedPurchase.CreateGooglePlayStoreParams"] omnichannel_subscription: NotRequired[ diff --git a/chargebee/models/subscription/operations.py b/chargebee/models/subscription/operations.py index 33df031..5d6e869 100644 --- a/chargebee/models/subscription/operations.py +++ b/chargebee/models/subscription/operations.py @@ -1261,11 +1261,11 @@ class CreateWithItemsParams(TypedDict): business_entity_id: NotRequired[str] trial_end: NotRequired[int] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Subscription.CreateWithItemsSubscriptionItemParams"] ] setup_fee: NotRequired[int] - discounts: Required[List["Subscription.CreateWithItemsDiscountParams"]] + discounts: NotRequired[List["Subscription.CreateWithItemsDiscountParams"]] mandatory_items_to_remove: NotRequired[List[str]] item_tiers: NotRequired[List["Subscription.CreateWithItemsItemTierParams"]] net_term_days: NotRequired[int] @@ -1408,13 +1408,13 @@ class UpdateParams(TypedDict): coupons: NotRequired[List["Subscription.UpdateCouponParams"]] class UpdateForItemsParams(TypedDict): - subscription_items: Required[ + subscription_items: NotRequired[ List["Subscription.UpdateForItemsSubscriptionItemParams"] ] mandatory_items_to_remove: NotRequired[List[str]] replace_items_list: NotRequired[bool] setup_fee: NotRequired[int] - discounts: Required[List["Subscription.UpdateForItemsDiscountParams"]] + discounts: NotRequired[List["Subscription.UpdateForItemsDiscountParams"]] item_tiers: NotRequired[List["Subscription.UpdateForItemsItemTierParams"]] net_term_days: NotRequired[int] invoice_date: NotRequired[int] @@ -1637,22 +1637,22 @@ class ImportContractTermParams(TypedDict): contract_term_billing_cycle_on_renewal: NotRequired[int] class ImportUnbilledChargesParams(TypedDict): - unbilled_charges: Required[ + unbilled_charges: NotRequired[ List["Subscription.ImportUnbilledChargesUnbilledChargeParams"] ] - discounts: Required[List["Subscription.ImportUnbilledChargesDiscountParams"]] - tiers: Required[List["Subscription.ImportUnbilledChargesTierParams"]] + discounts: NotRequired[List["Subscription.ImportUnbilledChargesDiscountParams"]] + tiers: NotRequired[List["Subscription.ImportUnbilledChargesTierParams"]] class ImportForItemsParams(TypedDict): exhausted_coupon_ids: NotRequired[List[str]] id: NotRequired[str] trial_end: NotRequired[int] billing_cycles: NotRequired[int] - subscription_items: Required[ + subscription_items: NotRequired[ List["Subscription.ImportForItemsSubscriptionItemParams"] ] setup_fee: NotRequired[int] - discounts: Required[List["Subscription.ImportForItemsDiscountParams"]] + discounts: NotRequired[List["Subscription.ImportForItemsDiscountParams"]] charged_items: NotRequired[List["Subscription.ImportForItemsChargedItemParams"]] item_tiers: NotRequired[List["Subscription.ImportForItemsItemTierParams"]] net_term_days: NotRequired[int] diff --git a/chargebee/models/subscription_entitlement/operations.py b/chargebee/models/subscription_entitlement/operations.py index 8d97836..c7a65ce 100644 --- a/chargebee/models/subscription_entitlement/operations.py +++ b/chargebee/models/subscription_entitlement/operations.py @@ -36,7 +36,7 @@ class SubscriptionEntitlementsForSubscriptionParams(TypedDict): class SetSubscriptionEntitlementAvailabilityParams(TypedDict): is_enabled: Required[bool] - subscription_entitlements: Required[ + subscription_entitlements: NotRequired[ List[ "SubscriptionEntitlement.SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementParams" ] diff --git a/chargebee/models/usage/operations.py b/chargebee/models/usage/operations.py index c649449..00d0fa2 100644 --- a/chargebee/models/usage/operations.py +++ b/chargebee/models/usage/operations.py @@ -39,7 +39,7 @@ class ListParams(TypedDict): sort_by: NotRequired[Filters.SortFilter] class PdfParams(TypedDict): - invoice: Required["Usage.PdfInvoiceParams"] + invoice: NotRequired["Usage.PdfInvoiceParams"] disposition_type: NotRequired[enums.DispositionType] def create(self, id, params: CreateParams, headers=None) -> CreateResponse: diff --git a/chargebee/models/usage_event/operations.py b/chargebee/models/usage_event/operations.py index 989bbca..f71a303 100644 --- a/chargebee/models/usage_event/operations.py +++ b/chargebee/models/usage_event/operations.py @@ -20,7 +20,7 @@ class CreateParams(TypedDict): properties: Required[Dict[Any, Any]] class BatchIngestParams(TypedDict): - events: Required[List["UsageEvent.BatchIngestEventParams"]] + events: NotRequired[List["UsageEvent.BatchIngestEventParams"]] def create(self, params: CreateParams, headers=None) -> CreateResponse: jsonKeys = { diff --git a/chargebee/version.py b/chargebee/version.py index 6b71007..5f976da 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = "3.21.0" +VERSION = "3.22.0"