From 848dd29b374aa0534e8b2d9c08a017222e85dfb9 Mon Sep 17 00:00:00 2001 From: cb-alish Date: Wed, 24 Sep 2025 13:04:58 +0530 Subject: [PATCH 1/2] Releasing v3.12.0 --- CHANGELOG.md | 57 ++++++++++ chargebee/main.py | 7 ++ chargebee/models/__init__.py | 12 ++ chargebee/models/addon/operations.py | 1 + chargebee/models/addon/responses.py | 2 + chargebee/models/address/operations.py | 1 + chargebee/models/address/responses.py | 1 + .../advance_invoice_schedule/operations.py | 1 + chargebee/models/attached_item/operations.py | 1 + chargebee/models/attached_item/responses.py | 2 + chargebee/models/attribute/operations.py | 1 + .../billing_configuration/operations.py | 1 + chargebee/models/brand/operations.py | 1 + .../models/business_entity/operations.py | 1 + chargebee/models/business_entity/responses.py | 1 + .../business_entity_transfer/operations.py | 1 + chargebee/models/card/operations.py | 1 + chargebee/models/card/responses.py | 1 + chargebee/models/comment/operations.py | 1 + chargebee/models/comment/responses.py | 2 + chargebee/models/configuration/operations.py | 1 + chargebee/models/configuration/responses.py | 1 + chargebee/models/contact/operations.py | 1 + chargebee/models/contract_term/operations.py | 1 + chargebee/models/coupon/operations.py | 1 + chargebee/models/coupon/responses.py | 2 + chargebee/models/coupon_code/operations.py | 1 + chargebee/models/coupon_code/responses.py | 2 + chargebee/models/coupon_set/operations.py | 1 + chargebee/models/coupon_set/responses.py | 2 + chargebee/models/credit_note/operations.py | 2 +- chargebee/models/credit_note/responses.py | 5 +- .../models/credit_note_estimate/operations.py | 75 ++++++------- .../models/credit_note_estimate/responses.py | 60 +++++----- chargebee/models/currency/operations.py | 9 +- chargebee/models/currency/responses.py | 10 +- chargebee/models/customer/operations.py | 2 + chargebee/models/customer/responses.py | 6 + .../models/customer_entitlement/operations.py | 1 + .../models/customer_entitlement/responses.py | 1 + .../models/differential_price/operations.py | 1 + .../models/differential_price/responses.py | 2 + chargebee/models/discount/operations.py | 1 + chargebee/models/download/operations.py | 1 + chargebee/models/entitlement/operations.py | 1 + chargebee/models/entitlement/responses.py | 1 + .../models/entitlement_override/operations.py | 1 + .../models/entitlement_override/responses.py | 1 + chargebee/models/enums.py | 23 ++++ chargebee/models/estimate/operations.py | 3 + chargebee/models/estimate/responses.py | 3 + chargebee/models/event/operations.py | 1 + chargebee/models/event/responses.py | 2 + chargebee/models/export/operations.py | 1 + chargebee/models/export/responses.py | 1 + chargebee/models/feature/operations.py | 1 + chargebee/models/feature/responses.py | 2 + .../models/gateway_error_detail/operations.py | 1 + .../models/gateway_error_detail/responses.py | 1 + chargebee/models/gift/operations.py | 1 + chargebee/models/gift/responses.py | 2 + chargebee/models/hierarchy/operations.py | 1 + chargebee/models/hosted_page/operations.py | 3 + chargebee/models/hosted_page/responses.py | 2 + .../models/impacted_customer/operations.py | 1 + chargebee/models/impacted_item/operations.py | 1 + .../models/impacted_item_price/operations.py | 1 + .../impacted_subscription/operations.py | 1 + .../models/in_app_subscription/operations.py | 1 + chargebee/models/invoice/operations.py | 2 +- chargebee/models/invoice/responses.py | 8 +- .../models/invoice_estimate/operations.py | 81 +++++++------- .../models/invoice_estimate/responses.py | 84 +++++++------- chargebee/models/item/operations.py | 1 + chargebee/models/item/responses.py | 2 + .../models/item_entitlement/operations.py | 1 + .../models/item_entitlement/responses.py | 2 + chargebee/models/item_family/operations.py | 1 + chargebee/models/item_family/responses.py | 2 + chargebee/models/item_price/operations.py | 1 + chargebee/models/item_price/responses.py | 4 + chargebee/models/metadata/operations.py | 1 + chargebee/models/offer_event/__init__.py | 2 + chargebee/models/offer_event/operations.py | 39 +++++++ chargebee/models/offer_event/responses.py | 14 +++ .../models/offer_fulfillment/__init__.py | 2 + .../models/offer_fulfillment/operations.py | 103 ++++++++++++++++++ .../models/offer_fulfillment/responses.py | 46 ++++++++ .../omnichannel_one_time_order/operations.py | 15 +-- .../omnichannel_one_time_order/responses.py | 19 +--- .../operations.py | 1 + .../omnichannel_subscription/operations.py | 36 +++--- .../omnichannel_subscription/responses.py | 34 +++--- .../operations.py | 2 + .../responses.py | 13 ++- .../__init__.py | 2 + .../operations.py | 11 ++ .../responses.py | 23 ++++ .../operations.py | 1 + .../omnichannel_transaction/operations.py | 7 ++ .../omnichannel_transaction/responses.py | 16 +++ chargebee/models/order/operations.py | 2 +- chargebee/models/order/responses.py | 4 +- chargebee/models/payment_intent/operations.py | 1 + chargebee/models/payment_intent/responses.py | 1 + .../payment_reference_number/operations.py | 1 + .../models/payment_schedule/operations.py | 1 + .../payment_schedule_estimate/operations.py | 1 + .../payment_schedule_scheme/operations.py | 1 + .../payment_schedule_scheme/responses.py | 1 + chargebee/models/payment_source/operations.py | 1 + chargebee/models/payment_source/responses.py | 2 + .../models/payment_voucher/operations.py | 1 + chargebee/models/payment_voucher/responses.py | 3 + .../models/personalized_offer/__init__.py | 2 + .../models/personalized_offer/operations.py | 78 +++++++++++++ .../models/personalized_offer/responses.py | 39 +++++++ chargebee/models/plan/operations.py | 1 + chargebee/models/plan/responses.py | 2 + chargebee/models/portal_session/operations.py | 1 + chargebee/models/portal_session/responses.py | 1 + chargebee/models/price_variant/operations.py | 1 + chargebee/models/price_variant/responses.py | 2 + .../models/pricing_page_session/operations.py | 1 + .../models/promotional_credit/operations.py | 1 + .../models/promotional_credit/responses.py | 2 + chargebee/models/purchase/operations.py | 1 + chargebee/models/quote/operations.py | 70 ++++++------ chargebee/models/quote/responses.py | 64 +++++------ .../models/quote_line_group/operations.py | 45 ++++---- .../models/quote_line_group/responses.py | 42 +++---- chargebee/models/quoted_charge/operations.py | 1 + chargebee/models/quoted_ramp/operations.py | 1 + .../models/quoted_subscription/operations.py | 1 + chargebee/models/ramp/operations.py | 45 ++++++++ chargebee/models/ramp/responses.py | 17 +++ .../models/recorded_purchase/operations.py | 1 + .../models/recorded_purchase/responses.py | 1 + .../models/resource_migration/operations.py | 1 + .../models/resource_migration/responses.py | 1 + chargebee/models/rule/operations.py | 1 + chargebee/models/rule/responses.py | 1 + .../site_migration_detail/operations.py | 1 + .../models/site_migration_detail/responses.py | 1 + chargebee/models/subscription/operations.py | 3 +- chargebee/models/subscription/responses.py | 8 +- .../subscription_entitlement/operations.py | 1 + .../subscription_entitlement/responses.py | 1 + .../operations.py | 1 + .../operations.py | 1 + .../subscription_estimate/operations.py | 2 +- .../models/subscription_estimate/responses.py | 1 - chargebee/models/tax_withheld/operations.py | 1 + .../third_party_payment_method/operations.py | 1 + chargebee/models/time_machine/operations.py | 1 + chargebee/models/time_machine/responses.py | 1 + chargebee/models/token/operations.py | 1 + chargebee/models/transaction/operations.py | 2 + chargebee/models/transaction/responses.py | 6 + .../models/unbilled_charge/operations.py | 1 + chargebee/models/unbilled_charge/responses.py | 1 + chargebee/models/usage/operations.py | 1 + chargebee/models/usage/responses.py | 2 + chargebee/models/usage_event/operations.py | 1 + chargebee/models/usage_file/operations.py | 1 + chargebee/models/usage_file/responses.py | 3 + .../models/virtual_bank_account/operations.py | 1 + .../models/virtual_bank_account/responses.py | 2 + .../models/webhook_endpoint/operations.py | 1 + .../models/webhook_endpoint/responses.py | 2 + chargebee/request.py | 4 +- chargebee/version.py | 2 +- 172 files changed, 1081 insertions(+), 336 deletions(-) create mode 100644 chargebee/models/offer_event/__init__.py create mode 100644 chargebee/models/offer_event/operations.py create mode 100644 chargebee/models/offer_event/responses.py create mode 100644 chargebee/models/offer_fulfillment/__init__.py create mode 100644 chargebee/models/offer_fulfillment/operations.py create mode 100644 chargebee/models/offer_fulfillment/responses.py create mode 100644 chargebee/models/omnichannel_subscription_item_offer/__init__.py create mode 100644 chargebee/models/omnichannel_subscription_item_offer/operations.py create mode 100644 chargebee/models/omnichannel_subscription_item_offer/responses.py create mode 100644 chargebee/models/personalized_offer/__init__.py create mode 100644 chargebee/models/personalized_offer/operations.py create mode 100644 chargebee/models/personalized_offer/responses.py diff --git a/CHANGELOG.md b/CHANGELOG.md index d8072de..7addce4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,60 @@ +### v3.12.0 (2025-09-24) +* * * + +### New Resources: +* PersonalizedOffer has been added. +* OfferFulfillment has been added. +* OfferEvent has been added. +* OmnichannelSubscriptionItemOffer has been added. + +### New Attributes: +* business_entity_id has been added to Customer#Balance. +* processor_advice_code has been added to GatewayErrorDetail. +* processor_advice_code has been added to Transaction#GatewayErrorDetail. +* omnichannel_subscription_item_offers has been added to OmnichannelSubscriptionItem. +* linked_omnichannel_subscriptions has been added to OmnichannelTransaction. +* linked_omnichannel_one_time_orders has been added to OmnichannelTransaction. +* contract_term has been added to Ramp. +* charge_once has been added to Ramp#ItemsToAdd. +* charge_on_option has been added to Ramp#ItemsToAdd. +* charge_on_event has been added to Ramp#ItemsToAdd. +* charge_once has been added to Ramp#ItemsToUpdate. +* charge_on_option has been added to Ramp#ItemsToUpdate. +* charge_on_event has been added to Ramp#ItemsToUpdate. +* error_file_path has been added to UsageFile. +* error_file_url has been added to UsageFile. + +### New Endpoint: +* move has been added to OmnichannelSubscription. + +### New Parameters: +* offline_payment_method has been added to Estimate#CreateSubItemEstimateRequest. +* offline_payment_method has been added to Estimate#CreateSubItemForCustomerEstimateRequest. +* offline_payment_method has been added to HostedPage#CheckoutNewForItemsRequest. +* offline_payment_method has been added to Quote#SubscriptionCreateSubItemsForCustomerQuoteRequest. +* offline_payment_method has been added to Quote#SubscriptionEditCreateSubCustomerQuoteForItemsRequest. +* contract_term has been added to Ramp#CreateForSubscriptionRequest. +* items_to_add has been added to Ramp#CreateForSubscriptionRequest. +* items_to_update has been added to Ramp#CreateForSubscriptionRequest. +* contract_term has been added to Ramp#UpdateRequest. +* items_to_add has been added to Ramp#UpdateRequest. +* items_to_update has been added to Ramp#UpdateRequest. + +### New Enums: +* DUNNING_UPDATED has been added EventType. +* OMNICHANNEL_SUBSCRIPTION_MOVED_IN has been added to EventType. + + +### Bug Fixes: +* currency list action has been marked as ListRequest. +* index has been removed from CreditNote#ShippingAddress. +* index has been removed from Invoice#ShippingAddress +* index has been removed from Order#ShippingAddress. +* index has been removed from Quote#ShippingAddress. +* index has been removed from SubscriptionEstimate#ShippingAddress. +* index has been removed from Subscription#ShippingAddress. + + ### v3.11.0b1 (2025-08-27) * * * diff --git a/chargebee/main.py b/chargebee/main.py index 9d87456..a304e32 100644 --- a/chargebee/main.py +++ b/chargebee/main.py @@ -7,6 +7,7 @@ @dataclass class Chargebee: + env: Environment = None idempotency_header: str = "chargebee-idempotency-key" @@ -83,6 +84,8 @@ def __init__( self.ItemFamily = chargebee.ItemFamily(self.env) self.ItemPrice = chargebee.ItemPrice(self.env) self.Metadata = chargebee.Metadata(self.env) + self.OfferEvent = chargebee.OfferEvent(self.env) + self.OfferFulfillment = chargebee.OfferFulfillment(self.env) self.OmnichannelOneTimeOrder = chargebee.OmnichannelOneTimeOrder(self.env) self.OmnichannelOneTimeOrderItem = chargebee.OmnichannelOneTimeOrderItem( self.env @@ -91,6 +94,9 @@ def __init__( self.OmnichannelSubscriptionItem = chargebee.OmnichannelSubscriptionItem( self.env ) + self.OmnichannelSubscriptionItemOffer = ( + chargebee.OmnichannelSubscriptionItemOffer(self.env) + ) self.OmnichannelSubscriptionItemScheduledChange = ( chargebee.OmnichannelSubscriptionItemScheduledChange(self.env) ) @@ -103,6 +109,7 @@ def __init__( self.PaymentScheduleScheme = chargebee.PaymentScheduleScheme(self.env) self.PaymentSource = chargebee.PaymentSource(self.env) self.PaymentVoucher = chargebee.PaymentVoucher(self.env) + self.PersonalizedOffer = chargebee.PersonalizedOffer(self.env) self.Plan = chargebee.Plan(self.env) self.PortalSession = chargebee.PortalSession(self.env) self.PriceVariant = chargebee.PriceVariant(self.env) diff --git a/chargebee/models/__init__.py b/chargebee/models/__init__.py index 3d1a9c4..6756891 100644 --- a/chargebee/models/__init__.py +++ b/chargebee/models/__init__.py @@ -13,6 +13,7 @@ BillingPeriodUnit, BillingStartOption, CancelOption, + Category, ChangeOption, Channel, ChargeModel, @@ -26,6 +27,7 @@ CustomerType, DedupeOption, DirectDebitScheme, + DiscountType, DispositionType, DunningType, DurationType, @@ -178,6 +180,10 @@ from chargebee.models.metadata.operations import Metadata +from chargebee.models.offer_event.operations import OfferEvent + +from chargebee.models.offer_fulfillment.operations import OfferFulfillment + from chargebee.models.omnichannel_one_time_order.operations import ( OmnichannelOneTimeOrder, ) @@ -192,6 +198,10 @@ OmnichannelSubscriptionItem, ) +from chargebee.models.omnichannel_subscription_item_offer.operations import ( + OmnichannelSubscriptionItemOffer, +) + from chargebee.models.omnichannel_subscription_item_scheduled_change.operations import ( OmnichannelSubscriptionItemScheduledChange, ) @@ -216,6 +226,8 @@ from chargebee.models.payment_voucher.operations import PaymentVoucher +from chargebee.models.personalized_offer.operations import PersonalizedOffer + from chargebee.models.plan.operations import Plan from chargebee.models.portal_session.operations import PortalSession diff --git a/chargebee/models/addon/operations.py b/chargebee/models/addon/operations.py index 54b5677..4e04ba3 100644 --- a/chargebee/models/addon/operations.py +++ b/chargebee/models/addon/operations.py @@ -8,6 +8,7 @@ @dataclass class Addon: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/addon/responses.py b/chargebee/models/addon/responses.py index 2a5e75d..ba2ecd4 100644 --- a/chargebee/models/addon/responses.py +++ b/chargebee/models/addon/responses.py @@ -93,12 +93,14 @@ class ListAddonResponse: @dataclass class ListResponse(Response): + list: List[ListAddonResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + addon: AddonResponse diff --git a/chargebee/models/address/operations.py b/chargebee/models/address/operations.py index 130b6d6..c0feeb1 100644 --- a/chargebee/models/address/operations.py +++ b/chargebee/models/address/operations.py @@ -6,6 +6,7 @@ @dataclass class Address: + env: environment.Environment class RetrieveParams(TypedDict): diff --git a/chargebee/models/address/responses.py b/chargebee/models/address/responses.py index cd7ad5d..202f06e 100644 --- a/chargebee/models/address/responses.py +++ b/chargebee/models/address/responses.py @@ -27,6 +27,7 @@ class AddressResponse(Model): @dataclass class RetrieveResponse(Response): + address: AddressResponse diff --git a/chargebee/models/advance_invoice_schedule/operations.py b/chargebee/models/advance_invoice_schedule/operations.py index 2f60337..bf060be 100644 --- a/chargebee/models/advance_invoice_schedule/operations.py +++ b/chargebee/models/advance_invoice_schedule/operations.py @@ -7,6 +7,7 @@ @dataclass class AdvanceInvoiceSchedule: + env: environment.Environment class ScheduleType(Enum): diff --git a/chargebee/models/attached_item/operations.py b/chargebee/models/attached_item/operations.py index c15fc25..93dae6c 100644 --- a/chargebee/models/attached_item/operations.py +++ b/chargebee/models/attached_item/operations.py @@ -8,6 +8,7 @@ @dataclass class AttachedItem: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/attached_item/responses.py b/chargebee/models/attached_item/responses.py index fc1f57e..78b4a9f 100644 --- a/chargebee/models/attached_item/responses.py +++ b/chargebee/models/attached_item/responses.py @@ -39,6 +39,7 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): + attached_item: AttachedItemResponse @@ -55,5 +56,6 @@ class ListAttachedItemResponse: @dataclass class ListResponse(Response): + list: List[ListAttachedItemResponse] next_offset: str = None diff --git a/chargebee/models/attribute/operations.py b/chargebee/models/attribute/operations.py index 609e561..4895d55 100644 --- a/chargebee/models/attribute/operations.py +++ b/chargebee/models/attribute/operations.py @@ -5,6 +5,7 @@ @dataclass class Attribute: + env: environment.Environment pass diff --git a/chargebee/models/billing_configuration/operations.py b/chargebee/models/billing_configuration/operations.py index 9acd99b..fea0c73 100644 --- a/chargebee/models/billing_configuration/operations.py +++ b/chargebee/models/billing_configuration/operations.py @@ -5,6 +5,7 @@ @dataclass class BillingConfiguration: + env: environment.Environment class BillingDate(TypedDict): diff --git a/chargebee/models/brand/operations.py b/chargebee/models/brand/operations.py index 04d9c94..f08f0d1 100644 --- a/chargebee/models/brand/operations.py +++ b/chargebee/models/brand/operations.py @@ -5,6 +5,7 @@ @dataclass class Brand: + env: environment.Environment pass diff --git a/chargebee/models/business_entity/operations.py b/chargebee/models/business_entity/operations.py index 9ebb708..2416b01 100644 --- a/chargebee/models/business_entity/operations.py +++ b/chargebee/models/business_entity/operations.py @@ -7,6 +7,7 @@ @dataclass class BusinessEntity: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/business_entity/responses.py b/chargebee/models/business_entity/responses.py index 750af65..0d207e8 100644 --- a/chargebee/models/business_entity/responses.py +++ b/chargebee/models/business_entity/responses.py @@ -30,5 +30,6 @@ class GetTransfersBusinessEntityResponse: @dataclass class GetTransfersResponse(Response): + list: List[GetTransfersBusinessEntityResponse] next_offset: str = None diff --git a/chargebee/models/business_entity_transfer/operations.py b/chargebee/models/business_entity_transfer/operations.py index 96cebe8..e0eb6a9 100644 --- a/chargebee/models/business_entity_transfer/operations.py +++ b/chargebee/models/business_entity_transfer/operations.py @@ -6,6 +6,7 @@ @dataclass class BusinessEntityTransfer: + env: environment.Environment class ResourceType(Enum): diff --git a/chargebee/models/card/operations.py b/chargebee/models/card/operations.py index 25d3e2e..3749d58 100644 --- a/chargebee/models/card/operations.py +++ b/chargebee/models/card/operations.py @@ -7,6 +7,7 @@ @dataclass class Card: + env: environment.Environment class PreferredScheme(Enum): diff --git a/chargebee/models/card/responses.py b/chargebee/models/card/responses.py index 2236b49..c7820b4 100644 --- a/chargebee/models/card/responses.py +++ b/chargebee/models/card/responses.py @@ -40,6 +40,7 @@ class CardResponse(Model): @dataclass class RetrieveResponse(Response): + card: CardResponse diff --git a/chargebee/models/comment/operations.py b/chargebee/models/comment/operations.py index 5cc1075..e51aff1 100644 --- a/chargebee/models/comment/operations.py +++ b/chargebee/models/comment/operations.py @@ -8,6 +8,7 @@ @dataclass class Comment: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/comment/responses.py b/chargebee/models/comment/responses.py index 5e9dd24..7c29d8e 100644 --- a/chargebee/models/comment/responses.py +++ b/chargebee/models/comment/responses.py @@ -25,6 +25,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + comment: CommentResponse @@ -35,6 +36,7 @@ class ListCommentResponse: @dataclass class ListResponse(Response): + list: List[ListCommentResponse] next_offset: str = None diff --git a/chargebee/models/configuration/operations.py b/chargebee/models/configuration/operations.py index e79f871..a422b0d 100644 --- a/chargebee/models/configuration/operations.py +++ b/chargebee/models/configuration/operations.py @@ -5,6 +5,7 @@ @dataclass class Configuration: + env: environment.Environment def list(self, headers=None) -> ListResponse: diff --git a/chargebee/models/configuration/responses.py b/chargebee/models/configuration/responses.py index 13a183d..3ca574a 100644 --- a/chargebee/models/configuration/responses.py +++ b/chargebee/models/configuration/responses.py @@ -14,4 +14,5 @@ class ConfigurationResponse(Model): @dataclass class ListResponse(Response): + configurations: List[ConfigurationResponse] diff --git a/chargebee/models/contact/operations.py b/chargebee/models/contact/operations.py index fef8a0e..9418aee 100644 --- a/chargebee/models/contact/operations.py +++ b/chargebee/models/contact/operations.py @@ -5,6 +5,7 @@ @dataclass class Contact: + env: environment.Environment pass diff --git a/chargebee/models/contract_term/operations.py b/chargebee/models/contract_term/operations.py index 34b78d9..17cb968 100644 --- a/chargebee/models/contract_term/operations.py +++ b/chargebee/models/contract_term/operations.py @@ -6,6 +6,7 @@ @dataclass class ContractTerm: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/coupon/operations.py b/chargebee/models/coupon/operations.py index 8d4e015..6246a8e 100644 --- a/chargebee/models/coupon/operations.py +++ b/chargebee/models/coupon/operations.py @@ -8,6 +8,7 @@ @dataclass class Coupon: + env: environment.Environment class DiscountType(Enum): diff --git a/chargebee/models/coupon/responses.py b/chargebee/models/coupon/responses.py index 6f413f8..cae2d85 100644 --- a/chargebee/models/coupon/responses.py +++ b/chargebee/models/coupon/responses.py @@ -93,12 +93,14 @@ class ListCouponResponse: @dataclass class ListResponse(Response): + list: List[ListCouponResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + coupon: CouponResponse diff --git a/chargebee/models/coupon_code/operations.py b/chargebee/models/coupon_code/operations.py index 1d48651..7ef3a6c 100644 --- a/chargebee/models/coupon_code/operations.py +++ b/chargebee/models/coupon_code/operations.py @@ -7,6 +7,7 @@ @dataclass class CouponCode: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/coupon_code/responses.py b/chargebee/models/coupon_code/responses.py index c0c962c..7d6241c 100644 --- a/chargebee/models/coupon_code/responses.py +++ b/chargebee/models/coupon_code/responses.py @@ -22,6 +22,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + coupon_code: CouponCodeResponse @@ -32,6 +33,7 @@ class ListCouponCodeResponse: @dataclass class ListResponse(Response): + list: List[ListCouponCodeResponse] next_offset: str = None diff --git a/chargebee/models/coupon_set/operations.py b/chargebee/models/coupon_set/operations.py index 082522e..9fca822 100644 --- a/chargebee/models/coupon_set/operations.py +++ b/chargebee/models/coupon_set/operations.py @@ -6,6 +6,7 @@ @dataclass class CouponSet: + env: environment.Environment class CreateParams(TypedDict): diff --git a/chargebee/models/coupon_set/responses.py b/chargebee/models/coupon_set/responses.py index 9c5a1f0..eb5bc17 100644 --- a/chargebee/models/coupon_set/responses.py +++ b/chargebee/models/coupon_set/responses.py @@ -35,12 +35,14 @@ class ListCouponSetResponse: @dataclass class ListResponse(Response): + list: List[ListCouponSetResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + coupon_set: CouponSetResponse diff --git a/chargebee/models/credit_note/operations.py b/chargebee/models/credit_note/operations.py index 8425c14..cdb4198 100644 --- a/chargebee/models/credit_note/operations.py +++ b/chargebee/models/credit_note/operations.py @@ -8,6 +8,7 @@ @dataclass class CreditNote: + env: environment.Environment class Type(Enum): @@ -233,7 +234,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class BillingAddress(TypedDict): first_name: NotRequired[str] diff --git a/chargebee/models/credit_note/responses.py b/chargebee/models/credit_note/responses.py index cd43c2b..65fe94a 100644 --- a/chargebee/models/credit_note/responses.py +++ b/chargebee/models/credit_note/responses.py @@ -167,7 +167,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass @@ -266,6 +265,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + credit_note: CreditNoteResponse @@ -277,6 +277,7 @@ class PdfResponse(Response): @dataclass class DownloadEinvoiceResponse(Response): + downloads: List["download.DownloadResponse"] @@ -307,6 +308,7 @@ class ListCreditNoteResponse: @dataclass class ListResponse(Response): + list: List[ListCreditNoteResponse] next_offset: str = None @@ -318,6 +320,7 @@ class CreditNotesForCustomerCreditNoteResponse: @dataclass class CreditNotesForCustomerResponse(Response): + list: List[CreditNotesForCustomerCreditNoteResponse] next_offset: str = None diff --git a/chargebee/models/credit_note_estimate/operations.py b/chargebee/models/credit_note_estimate/operations.py index 92c960f..3a6b61e 100644 --- a/chargebee/models/credit_note_estimate/operations.py +++ b/chargebee/models/credit_note_estimate/operations.py @@ -7,6 +7,7 @@ @dataclass class CreditNoteEstimate: + env: environment.Environment class Type(Enum): @@ -29,7 +30,7 @@ class LineItemEntityType(Enum): def __str__(self): return self.value - class DiscountEntityType(Enum): + class LineItemDiscountDiscountType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -40,14 +41,7 @@ class DiscountEntityType(Enum): def __str__(self): return self.value - class DiscountDiscountType(Enum): - FIXED_AMOUNT = "fixed_amount" - PERCENTAGE = "percentage" - - def __str__(self): - return self.value - - class LineItemDiscountDiscountType(Enum): + class DiscountEntityType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -58,6 +52,13 @@ class LineItemDiscountDiscountType(Enum): def __str__(self): return self.value + class DiscountDiscountType(Enum): + FIXED_AMOUNT = "fixed_amount" + PERCENTAGE = "percentage" + + def __str__(self): + return self.value + class LineItem(TypedDict): id: NotRequired[str] subscription_id: NotRequired[str] @@ -85,18 +86,25 @@ class LineItem(TypedDict): entity_id: NotRequired[str] customer_id: NotRequired[str] - class Discount(TypedDict): - amount: Required[int] - description: NotRequired[str] - entity_type: Required["CreditNoteEstimate.DiscountEntityType"] - discount_type: NotRequired["CreditNoteEstimate.DiscountDiscountType"] - entity_id: NotRequired[str] - coupon_set_code: NotRequired[str] + class LineItemTier(TypedDict): + line_item_id: NotRequired[str] + starting_unit: Required[int] + ending_unit: NotRequired[int] + quantity_used: Required[int] + unit_amount: Required[int] + starting_unit_in_decimal: NotRequired[str] + ending_unit_in_decimal: NotRequired[str] + quantity_used_in_decimal: NotRequired[str] + unit_amount_in_decimal: NotRequired[str] + pricing_type: NotRequired[enums.PricingType] + package_size: NotRequired[int] - class Tax(TypedDict): - name: Required[str] - amount: Required[int] - description: NotRequired[str] + class LineItemDiscount(TypedDict): + line_item_id: Required[str] + discount_type: Required["CreditNoteEstimate.LineItemDiscountDiscountType"] + coupon_id: NotRequired[str] + entity_id: NotRequired[str] + discount_amount: Required[int] class LineItemTax(TypedDict): line_item_id: NotRequired[str] @@ -115,24 +123,17 @@ class LineItemTax(TypedDict): tax_amount_in_local_currency: NotRequired[int] local_currency_code: NotRequired[str] - class LineItemDiscount(TypedDict): - line_item_id: Required[str] - discount_type: Required["CreditNoteEstimate.LineItemDiscountDiscountType"] - coupon_id: NotRequired[str] + class Discount(TypedDict): + amount: Required[int] + description: NotRequired[str] + entity_type: Required["CreditNoteEstimate.DiscountEntityType"] + discount_type: NotRequired["CreditNoteEstimate.DiscountDiscountType"] entity_id: NotRequired[str] - discount_amount: Required[int] + coupon_set_code: NotRequired[str] - class LineItemTier(TypedDict): - line_item_id: NotRequired[str] - starting_unit: Required[int] - ending_unit: NotRequired[int] - quantity_used: Required[int] - unit_amount: Required[int] - starting_unit_in_decimal: NotRequired[str] - ending_unit_in_decimal: NotRequired[str] - quantity_used_in_decimal: NotRequired[str] - unit_amount_in_decimal: NotRequired[str] - pricing_type: NotRequired[enums.PricingType] - package_size: NotRequired[int] + class Tax(TypedDict): + name: Required[str] + amount: Required[int] + description: NotRequired[str] pass diff --git a/chargebee/models/credit_note_estimate/responses.py b/chargebee/models/credit_note_estimate/responses.py index 1cba572..721242f 100644 --- a/chargebee/models/credit_note_estimate/responses.py +++ b/chargebee/models/credit_note_estimate/responses.py @@ -34,22 +34,29 @@ class LineItemResponse(Model): @dataclass -class DiscountResponse(Model): +class LineItemTierResponse(Model): raw_data: Dict[Any, Any] = None - amount: int = None - description: str = None - entity_type: str = None - discount_type: str = None - entity_id: str = None - coupon_set_code: str = None + line_item_id: str = None + starting_unit: int = None + ending_unit: int = None + quantity_used: int = None + unit_amount: int = None + starting_unit_in_decimal: str = None + ending_unit_in_decimal: str = None + quantity_used_in_decimal: str = None + unit_amount_in_decimal: str = None + pricing_type: str = None + package_size: int = None @dataclass -class TaxResponse(Model): +class LineItemDiscountResponse(Model): raw_data: Dict[Any, Any] = None - name: str = None - amount: int = None - description: str = None + line_item_id: str = None + discount_type: str = None + coupon_id: str = None + entity_id: str = None + discount_amount: int = None @dataclass @@ -73,29 +80,22 @@ class LineItemTaxResponse(Model): @dataclass -class LineItemDiscountResponse(Model): +class DiscountResponse(Model): raw_data: Dict[Any, Any] = None - line_item_id: str = None + amount: int = None + description: str = None + entity_type: str = None discount_type: str = None - coupon_id: str = None entity_id: str = None - discount_amount: int = None + coupon_set_code: str = None @dataclass -class LineItemTierResponse(Model): +class TaxResponse(Model): raw_data: Dict[Any, Any] = None - line_item_id: str = None - starting_unit: int = None - ending_unit: int = None - quantity_used: int = None - unit_amount: int = None - starting_unit_in_decimal: str = None - ending_unit_in_decimal: str = None - quantity_used_in_decimal: str = None - unit_amount_in_decimal: str = None - pricing_type: str = None - package_size: int = None + name: str = None + amount: int = None + description: str = None @dataclass @@ -110,10 +110,10 @@ class CreditNoteEstimateResponse(Model): amount_allocated: int = None amount_available: int = None line_items: List[LineItemResponse] = None + line_item_tiers: List[LineItemTierResponse] = None + line_item_discounts: List[LineItemDiscountResponse] = None + line_item_taxes: List[LineItemTaxResponse] = None discounts: List[DiscountResponse] = None taxes: List[TaxResponse] = None - line_item_taxes: List[LineItemTaxResponse] = None - line_item_discounts: List[LineItemDiscountResponse] = None - line_item_tiers: List[LineItemTierResponse] = None round_off_amount: int = None customer_id: str = None diff --git a/chargebee/models/currency/operations.py b/chargebee/models/currency/operations.py index e023d51..aef3a59 100644 --- a/chargebee/models/currency/operations.py +++ b/chargebee/models/currency/operations.py @@ -6,6 +6,7 @@ @dataclass class Currency: + env: environment.Environment class ForexType(Enum): @@ -15,6 +16,10 @@ class ForexType(Enum): def __str__(self): return self.value + class ListParams(TypedDict): + limit: NotRequired[int] + offset: NotRequired[str] + class CreateParams(TypedDict): currency_code: Required[str] forex_type: Required["Currency.ForexType"] @@ -28,14 +33,14 @@ class AddScheduleParams(TypedDict): manual_exchange_rate: Required[str] schedule_at: Required[int] - def list(self, headers=None) -> ListResponse: + def list(self, params: ListParams = None, headers=None) -> ListResponse: jsonKeys = {} options = {} return request.send_list_request( "get", request.uri_path("currencies", "list"), self.env, - None, + cast(Dict[Any, Any], params), headers, ListResponse, None, diff --git a/chargebee/models/currency/responses.py b/chargebee/models/currency/responses.py index f80f322..e5116c1 100644 --- a/chargebee/models/currency/responses.py +++ b/chargebee/models/currency/responses.py @@ -16,12 +16,20 @@ class CurrencyResponse(Model): @dataclass -class ListResponse(Response): +class ListCurrencyResponse: currency: CurrencyResponse +@dataclass +class ListResponse(Response): + + list: List[ListCurrencyResponse] + next_offset: str = None + + @dataclass class RetrieveResponse(Response): + currency: CurrencyResponse diff --git a/chargebee/models/customer/operations.py b/chargebee/models/customer/operations.py index b51efd9..35eddd7 100644 --- a/chargebee/models/customer/operations.py +++ b/chargebee/models/customer/operations.py @@ -8,6 +8,7 @@ @dataclass class Customer: + env: environment.Environment class VatNumberStatus(Enum): @@ -150,6 +151,7 @@ class Balance(TypedDict): unbilled_charges: Required[int] currency_code: Required[str] balance_currency_code: Required[str] + business_entity_id: NotRequired[str] class EntityIdentifier(TypedDict): id: Required[str] diff --git a/chargebee/models/customer/responses.py b/chargebee/models/customer/responses.py index 41bc27a..cb1b2f4 100644 --- a/chargebee/models/customer/responses.py +++ b/chargebee/models/customer/responses.py @@ -79,6 +79,7 @@ class BalanceResponse(Model): unbilled_charges: int = None currency_code: str = None balance_currency_code: str = None + business_entity_id: str = None @dataclass @@ -212,12 +213,14 @@ class ListCustomerResponse: @dataclass class ListResponse(Response): + list: List[ListCustomerResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + customer: CustomerResponse card: "card.CardResponse" = None @@ -250,6 +253,7 @@ class ContactsForCustomerCustomerResponse: @dataclass class ContactsForCustomerResponse(Response): + list: List[ContactsForCustomerCustomerResponse] next_offset: str = None @@ -359,6 +363,7 @@ class DeleteRelationshipResponse(Response): @dataclass class HierarchyResponse(Response): + hierarchies: List["hierarchy.HierarchyResponse"] @@ -369,6 +374,7 @@ class ListHierarchyDetailCustomerResponse: @dataclass class ListHierarchyDetailResponse(Response): + list: List[ListHierarchyDetailCustomerResponse] next_offset: str = None diff --git a/chargebee/models/customer_entitlement/operations.py b/chargebee/models/customer_entitlement/operations.py index 86dd52e..84a0b9a 100644 --- a/chargebee/models/customer_entitlement/operations.py +++ b/chargebee/models/customer_entitlement/operations.py @@ -5,6 +5,7 @@ @dataclass class CustomerEntitlement: + env: environment.Environment class EntitlementsForCustomerParams(TypedDict): diff --git a/chargebee/models/customer_entitlement/responses.py b/chargebee/models/customer_entitlement/responses.py index 0a18b92..5b212d3 100644 --- a/chargebee/models/customer_entitlement/responses.py +++ b/chargebee/models/customer_entitlement/responses.py @@ -22,5 +22,6 @@ class EntitlementsForCustomerCustomerEntitlementResponse: @dataclass class EntitlementsForCustomerResponse(Response): + list: List[EntitlementsForCustomerCustomerEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/differential_price/operations.py b/chargebee/models/differential_price/operations.py index d40fd6c..230c6ec 100644 --- a/chargebee/models/differential_price/operations.py +++ b/chargebee/models/differential_price/operations.py @@ -8,6 +8,7 @@ @dataclass class DifferentialPrice: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/differential_price/responses.py b/chargebee/models/differential_price/responses.py index f9aacce..188a100 100644 --- a/chargebee/models/differential_price/responses.py +++ b/chargebee/models/differential_price/responses.py @@ -52,6 +52,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + differential_price: DifferentialPriceResponse @@ -74,5 +75,6 @@ class ListDifferentialPriceResponse: @dataclass class ListResponse(Response): + list: List[ListDifferentialPriceResponse] next_offset: str = None diff --git a/chargebee/models/discount/operations.py b/chargebee/models/discount/operations.py index 3ded8c7..74c290d 100644 --- a/chargebee/models/discount/operations.py +++ b/chargebee/models/discount/operations.py @@ -6,6 +6,7 @@ @dataclass class Discount: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/download/operations.py b/chargebee/models/download/operations.py index b5d2a17..f0ecbf0 100644 --- a/chargebee/models/download/operations.py +++ b/chargebee/models/download/operations.py @@ -5,6 +5,7 @@ @dataclass class Download: + env: environment.Environment pass diff --git a/chargebee/models/entitlement/operations.py b/chargebee/models/entitlement/operations.py index 3a7740e..a787642 100644 --- a/chargebee/models/entitlement/operations.py +++ b/chargebee/models/entitlement/operations.py @@ -8,6 +8,7 @@ @dataclass class Entitlement: + env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/entitlement/responses.py b/chargebee/models/entitlement/responses.py index 68cc51a..42ebb47 100644 --- a/chargebee/models/entitlement/responses.py +++ b/chargebee/models/entitlement/responses.py @@ -23,6 +23,7 @@ class ListEntitlementResponse: @dataclass class ListResponse(Response): + list: List[ListEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/entitlement_override/operations.py b/chargebee/models/entitlement_override/operations.py index 62e4901..f2cf353 100644 --- a/chargebee/models/entitlement_override/operations.py +++ b/chargebee/models/entitlement_override/operations.py @@ -7,6 +7,7 @@ @dataclass class EntitlementOverride: + env: environment.Environment class ScheduleStatus(Enum): diff --git a/chargebee/models/entitlement_override/responses.py b/chargebee/models/entitlement_override/responses.py index b7496a2..3a115fa 100644 --- a/chargebee/models/entitlement_override/responses.py +++ b/chargebee/models/entitlement_override/responses.py @@ -32,5 +32,6 @@ class ListEntitlementOverrideForSubscriptionEntitlementOverrideResponse: @dataclass class ListEntitlementOverrideForSubscriptionResponse(Response): + list: List[ListEntitlementOverrideForSubscriptionEntitlementOverrideResponse] next_offset: str = None diff --git a/chargebee/models/enums.py b/chargebee/models/enums.py index 482b538..a0f128d 100644 --- a/chargebee/models/enums.py +++ b/chargebee/models/enums.py @@ -122,6 +122,15 @@ def __str__(self): return self.value +class Category(Enum): + INTRODUCTORY = "introductory" + PROMOTIONAL = "promotional" + DEVELOPER_DETERMINED = "developer_determined" + + def __str__(self): + return self.value + + class ChangeOption(Enum): IMMEDIATELY = "immediately" END_OF_TERM = "end_of_term" @@ -253,6 +262,15 @@ def __str__(self): return self.value +class DiscountType(Enum): + FIXED_AMOUNT = "fixed_amount" + PERCENTAGE = "percentage" + PRICE = "price" + + def __str__(self): + return self.value + + class DispositionType(Enum): ATTACHMENT = "attachment" INLINE = "inline" @@ -466,6 +484,7 @@ class EventType(Enum): TRANSACTION_DELETED = "transaction_deleted" PAYMENT_SUCCEEDED = "payment_succeeded" PAYMENT_FAILED = "payment_failed" + DUNNING_UPDATED = "dunning_updated" PAYMENT_REFUNDED = "payment_refunded" PAYMENT_INITIATED = "payment_initiated" REFUND_INITIATED = "refund_initiated" @@ -629,6 +648,7 @@ class EventType(Enum): OMNICHANNEL_SUBSCRIPTION_ITEM_PAUSE_SCHEDULED = ( "omnichannel_subscription_item_pause_scheduled" ) + OMNICHANNEL_SUBSCRIPTION_MOVED_IN = "omnichannel_subscription_moved_in" PLAN_CREATED = "plan_created" PLAN_UPDATED = "plan_updated" PLAN_DELETED = "plan_deleted" @@ -1140,6 +1160,9 @@ class Type(Enum): KLARNA_PAY_NOW = "klarna_pay_now" ONLINE_BANKING_POLAND = "online_banking_poland" PAYCONIQ_BY_BANCONTACT = "payconiq_by_bancontact" + FREE_TRIAL = "free_trial" + PAY_UP_FRONT = "pay_up_front" + PAY_AS_YOU_GO = "pay_as_you_go" def __str__(self): return self.value diff --git a/chargebee/models/estimate/operations.py b/chargebee/models/estimate/operations.py index 40f7e64..a55b6f3 100644 --- a/chargebee/models/estimate/operations.py +++ b/chargebee/models/estimate/operations.py @@ -16,6 +16,7 @@ @dataclass class Estimate: + env: environment.Environment class PaymentScheduleEstimateEntityType(Enum): @@ -118,6 +119,7 @@ class CreateSubItemEstimateSubscriptionParams(TypedDict): setup_fee: NotRequired[int] start_date: NotRequired[int] coupon: NotRequired[str] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] free_period: NotRequired[int] free_period_unit: NotRequired[enums.FreePeriodUnit] contract_term_billing_cycle_on_renewal: NotRequired[int] @@ -254,6 +256,7 @@ class CreateSubItemForCustomerEstimateSubscriptionParams(TypedDict): trial_end: NotRequired[int] setup_fee: NotRequired[int] start_date: NotRequired[int] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] free_period: NotRequired[int] free_period_unit: NotRequired[enums.FreePeriodUnit] contract_term_billing_cycle_on_renewal: NotRequired[int] diff --git a/chargebee/models/estimate/responses.py b/chargebee/models/estimate/responses.py index d7e0337..39eff9e 100644 --- a/chargebee/models/estimate/responses.py +++ b/chargebee/models/estimate/responses.py @@ -47,6 +47,7 @@ class CreateSubItemEstimateResponse(Response): @dataclass class CreateSubForCustomerEstimateResponse(Response): + estimate: EstimateResponse @@ -70,6 +71,7 @@ class UpdateSubscriptionForItemsResponse(Response): @dataclass class RenewalEstimateResponse(Response): + estimate: EstimateResponse @@ -87,6 +89,7 @@ class RegenerateInvoiceEstimateResponse(Response): @dataclass class UpcomingInvoicesEstimateResponse(Response): + estimate: EstimateResponse diff --git a/chargebee/models/event/operations.py b/chargebee/models/event/operations.py index c5c2e35..2ced185 100644 --- a/chargebee/models/event/operations.py +++ b/chargebee/models/event/operations.py @@ -9,6 +9,7 @@ @dataclass class Event: + env: environment.Environment class WebhookStatus(Enum): diff --git a/chargebee/models/event/responses.py b/chargebee/models/event/responses.py index 704c117..a291760 100644 --- a/chargebee/models/event/responses.py +++ b/chargebee/models/event/responses.py @@ -34,10 +34,12 @@ class ListEventResponse: @dataclass class ListResponse(Response): + list: List[ListEventResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + event: EventResponse diff --git a/chargebee/models/export/operations.py b/chargebee/models/export/operations.py index 28266bd..6dcb02c 100644 --- a/chargebee/models/export/operations.py +++ b/chargebee/models/export/operations.py @@ -8,6 +8,7 @@ @dataclass class Export: + env: environment.Environment class MimeType(Enum): diff --git a/chargebee/models/export/responses.py b/chargebee/models/export/responses.py index 1571eca..099c5d3 100644 --- a/chargebee/models/export/responses.py +++ b/chargebee/models/export/responses.py @@ -25,6 +25,7 @@ class ExportResponse(Model): @dataclass class RetrieveResponse(Response): + export: ExportResponse diff --git a/chargebee/models/feature/operations.py b/chargebee/models/feature/operations.py index 0d0e88b..c4efa4b 100644 --- a/chargebee/models/feature/operations.py +++ b/chargebee/models/feature/operations.py @@ -7,6 +7,7 @@ @dataclass class Feature: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/feature/responses.py b/chargebee/models/feature/responses.py index c88a26a..b39823e 100644 --- a/chargebee/models/feature/responses.py +++ b/chargebee/models/feature/responses.py @@ -35,6 +35,7 @@ class ListFeatureResponse: @dataclass class ListResponse(Response): + list: List[ListFeatureResponse] next_offset: str = None @@ -53,6 +54,7 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): + feature: FeatureResponse diff --git a/chargebee/models/gateway_error_detail/operations.py b/chargebee/models/gateway_error_detail/operations.py index 50afed5..19370ac 100644 --- a/chargebee/models/gateway_error_detail/operations.py +++ b/chargebee/models/gateway_error_detail/operations.py @@ -5,6 +5,7 @@ @dataclass class GatewayErrorDetail: + env: environment.Environment pass diff --git a/chargebee/models/gateway_error_detail/responses.py b/chargebee/models/gateway_error_detail/responses.py index beae84c..c7ee593 100644 --- a/chargebee/models/gateway_error_detail/responses.py +++ b/chargebee/models/gateway_error_detail/responses.py @@ -20,3 +20,4 @@ class GatewayErrorDetailResponse(Model): processor_error_code: str = None processor_error_message: str = None error_cause_id: str = None + processor_advice_code: str = None diff --git a/chargebee/models/gift/operations.py b/chargebee/models/gift/operations.py index 36721f8..ef5d1d3 100644 --- a/chargebee/models/gift/operations.py +++ b/chargebee/models/gift/operations.py @@ -8,6 +8,7 @@ @dataclass class Gift: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/gift/responses.py b/chargebee/models/gift/responses.py index 4c83997..87812a4 100644 --- a/chargebee/models/gift/responses.py +++ b/chargebee/models/gift/responses.py @@ -65,6 +65,7 @@ class CreateForItemsResponse(Response): @dataclass class RetrieveResponse(Response): + gift: GiftResponse subscription: "subscription.SubscriptionResponse" @@ -77,6 +78,7 @@ class ListGiftResponse: @dataclass class ListResponse(Response): + list: List[ListGiftResponse] next_offset: str = None diff --git a/chargebee/models/hierarchy/operations.py b/chargebee/models/hierarchy/operations.py index 851bb0d..84f2904 100644 --- a/chargebee/models/hierarchy/operations.py +++ b/chargebee/models/hierarchy/operations.py @@ -5,6 +5,7 @@ @dataclass class Hierarchy: + env: environment.Environment pass diff --git a/chargebee/models/hosted_page/operations.py b/chargebee/models/hosted_page/operations.py index b4e74c9..acd915d 100644 --- a/chargebee/models/hosted_page/operations.py +++ b/chargebee/models/hosted_page/operations.py @@ -8,6 +8,7 @@ @dataclass class HostedPage: + env: environment.Environment class Type(Enum): @@ -20,6 +21,7 @@ class Type(Enum): CHECKOUT_ONE_TIME = "checkout_one_time" PRE_CANCEL = "pre_cancel" VIEW_VOUCHER = "view_voucher" + ACCEPT_QUOTE = "accept_quote" CHECKOUT_GIFT = "checkout_gift" CLAIM_GIFT = "claim_gift" @@ -320,6 +322,7 @@ class CheckoutNewForItemsSubscriptionParams(TypedDict): start_date: NotRequired[int] coupon: NotRequired[str] auto_collection: NotRequired[enums.AutoCollection] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] invoice_notes: NotRequired[str] po_number: NotRequired[str] contract_term_billing_cycle_on_renewal: NotRequired[int] diff --git a/chargebee/models/hosted_page/responses.py b/chargebee/models/hosted_page/responses.py index dcc075e..b85c708 100644 --- a/chargebee/models/hosted_page/responses.py +++ b/chargebee/models/hosted_page/responses.py @@ -128,6 +128,7 @@ class AcknowledgeResponse(Response): @dataclass class RetrieveResponse(Response): + hosted_page: HostedPageResponse @@ -138,6 +139,7 @@ class ListHostedPageResponse: @dataclass class ListResponse(Response): + list: List[ListHostedPageResponse] next_offset: str = None diff --git a/chargebee/models/impacted_customer/operations.py b/chargebee/models/impacted_customer/operations.py index 93b89cb..c72f79f 100644 --- a/chargebee/models/impacted_customer/operations.py +++ b/chargebee/models/impacted_customer/operations.py @@ -5,6 +5,7 @@ @dataclass class ImpactedCustomer: + env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_item/operations.py b/chargebee/models/impacted_item/operations.py index 6c2f0f7..5dc7978 100644 --- a/chargebee/models/impacted_item/operations.py +++ b/chargebee/models/impacted_item/operations.py @@ -5,6 +5,7 @@ @dataclass class ImpactedItem: + env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_item_price/operations.py b/chargebee/models/impacted_item_price/operations.py index a093598..a8029ae 100644 --- a/chargebee/models/impacted_item_price/operations.py +++ b/chargebee/models/impacted_item_price/operations.py @@ -5,6 +5,7 @@ @dataclass class ImpactedItemPrice: + env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_subscription/operations.py b/chargebee/models/impacted_subscription/operations.py index ec2804a..b671361 100644 --- a/chargebee/models/impacted_subscription/operations.py +++ b/chargebee/models/impacted_subscription/operations.py @@ -5,6 +5,7 @@ @dataclass class ImpactedSubscription: + env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/in_app_subscription/operations.py b/chargebee/models/in_app_subscription/operations.py index d8ecb34..60d4169 100644 --- a/chargebee/models/in_app_subscription/operations.py +++ b/chargebee/models/in_app_subscription/operations.py @@ -6,6 +6,7 @@ @dataclass class InAppSubscription: + env: environment.Environment class StoreStatus(Enum): diff --git a/chargebee/models/invoice/operations.py b/chargebee/models/invoice/operations.py index e208a0e..a5df1fe 100644 --- a/chargebee/models/invoice/operations.py +++ b/chargebee/models/invoice/operations.py @@ -15,6 +15,7 @@ @dataclass class Invoice: + env: environment.Environment class Status(Enum): @@ -309,7 +310,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class BillingAddress(TypedDict): first_name: NotRequired[str] diff --git a/chargebee/models/invoice/responses.py b/chargebee/models/invoice/responses.py index 5e5bcc8..a910d55 100644 --- a/chargebee/models/invoice/responses.py +++ b/chargebee/models/invoice/responses.py @@ -241,7 +241,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass @@ -445,6 +444,7 @@ class ListInvoiceResponse: @dataclass class ListResponse(Response): + list: List[ListInvoiceResponse] next_offset: str = None @@ -456,6 +456,7 @@ class InvoicesForCustomerInvoiceResponse: @dataclass class InvoicesForCustomerResponse(Response): + list: List[InvoicesForCustomerInvoiceResponse] next_offset: str = None @@ -467,12 +468,14 @@ class InvoicesForSubscriptionInvoiceResponse: @dataclass class InvoicesForSubscriptionResponse(Response): + list: List[InvoicesForSubscriptionInvoiceResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + invoice: InvoiceResponse @@ -484,6 +487,7 @@ class PdfResponse(Response): @dataclass class DownloadEinvoiceResponse(Response): + downloads: List["download.DownloadResponse"] @@ -494,6 +498,7 @@ class ListPaymentReferenceNumbersInvoiceResponse: @dataclass class ListPaymentReferenceNumbersResponse(Response): + list: List[ListPaymentReferenceNumbersInvoiceResponse] next_offset: str = None @@ -612,6 +617,7 @@ class ApplyPaymentScheduleSchemeResponse(Response): @dataclass class PaymentSchedulesResponse(Response): + payment_schedules: List["payment_schedule.PaymentScheduleResponse"] diff --git a/chargebee/models/invoice_estimate/operations.py b/chargebee/models/invoice_estimate/operations.py index f1d265b..353abd6 100644 --- a/chargebee/models/invoice_estimate/operations.py +++ b/chargebee/models/invoice_estimate/operations.py @@ -7,6 +7,7 @@ @dataclass class InvoiceEstimate: + env: environment.Environment class LineItemEntityType(Enum): @@ -21,7 +22,7 @@ class LineItemEntityType(Enum): def __str__(self): return self.value - class DiscountEntityType(Enum): + class LineItemDiscountDiscountType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -32,14 +33,7 @@ class DiscountEntityType(Enum): def __str__(self): return self.value - class DiscountDiscountType(Enum): - FIXED_AMOUNT = "fixed_amount" - PERCENTAGE = "percentage" - - def __str__(self): - return self.value - - class LineItemDiscountDiscountType(Enum): + class DiscountEntityType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -50,6 +44,13 @@ class LineItemDiscountDiscountType(Enum): def __str__(self): return self.value + class DiscountDiscountType(Enum): + FIXED_AMOUNT = "fixed_amount" + PERCENTAGE = "percentage" + + def __str__(self): + return self.value + class LineItem(TypedDict): id: NotRequired[str] subscription_id: NotRequired[str] @@ -77,18 +78,25 @@ class LineItem(TypedDict): entity_id: NotRequired[str] customer_id: NotRequired[str] - class Discount(TypedDict): - amount: Required[int] - description: NotRequired[str] - entity_type: Required["InvoiceEstimate.DiscountEntityType"] - discount_type: NotRequired["InvoiceEstimate.DiscountDiscountType"] - entity_id: NotRequired[str] - coupon_set_code: NotRequired[str] + class LineItemTier(TypedDict): + line_item_id: NotRequired[str] + starting_unit: Required[int] + ending_unit: NotRequired[int] + quantity_used: Required[int] + unit_amount: Required[int] + starting_unit_in_decimal: NotRequired[str] + ending_unit_in_decimal: NotRequired[str] + quantity_used_in_decimal: NotRequired[str] + unit_amount_in_decimal: NotRequired[str] + pricing_type: NotRequired[enums.PricingType] + package_size: NotRequired[int] - class Tax(TypedDict): - name: Required[str] - amount: Required[int] - description: NotRequired[str] + class LineItemDiscount(TypedDict): + line_item_id: Required[str] + discount_type: Required["InvoiceEstimate.LineItemDiscountDiscountType"] + coupon_id: NotRequired[str] + entity_id: NotRequired[str] + discount_amount: Required[int] class LineItemTax(TypedDict): line_item_id: NotRequired[str] @@ -107,31 +115,11 @@ class LineItemTax(TypedDict): tax_amount_in_local_currency: NotRequired[int] local_currency_code: NotRequired[str] - class LineItemTier(TypedDict): - line_item_id: NotRequired[str] - starting_unit: Required[int] - ending_unit: NotRequired[int] - quantity_used: Required[int] - unit_amount: Required[int] - starting_unit_in_decimal: NotRequired[str] - ending_unit_in_decimal: NotRequired[str] - quantity_used_in_decimal: NotRequired[str] - unit_amount_in_decimal: NotRequired[str] - pricing_type: NotRequired[enums.PricingType] - package_size: NotRequired[int] - class LineItemCredit(TypedDict): cn_id: Required[str] applied_amount: Required[float] line_item_id: NotRequired[str] - class LineItemDiscount(TypedDict): - line_item_id: Required[str] - discount_type: Required["InvoiceEstimate.LineItemDiscountDiscountType"] - coupon_id: NotRequired[str] - entity_id: NotRequired[str] - discount_amount: Required[int] - class LineItemAddress(TypedDict): line_item_id: NotRequired[str] first_name: NotRequired[str] @@ -149,4 +137,17 @@ class LineItemAddress(TypedDict): zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] + class Discount(TypedDict): + amount: Required[int] + description: NotRequired[str] + entity_type: Required["InvoiceEstimate.DiscountEntityType"] + discount_type: NotRequired["InvoiceEstimate.DiscountDiscountType"] + entity_id: NotRequired[str] + coupon_set_code: NotRequired[str] + + class Tax(TypedDict): + name: Required[str] + amount: Required[int] + description: NotRequired[str] + pass diff --git a/chargebee/models/invoice_estimate/responses.py b/chargebee/models/invoice_estimate/responses.py index 08a60e9..bdd15f2 100644 --- a/chargebee/models/invoice_estimate/responses.py +++ b/chargebee/models/invoice_estimate/responses.py @@ -34,22 +34,29 @@ class LineItemResponse(Model): @dataclass -class DiscountResponse(Model): +class LineItemTierResponse(Model): raw_data: Dict[Any, Any] = None - amount: int = None - description: str = None - entity_type: str = None - discount_type: str = None - entity_id: str = None - coupon_set_code: str = None + line_item_id: str = None + starting_unit: int = None + ending_unit: int = None + quantity_used: int = None + unit_amount: int = None + starting_unit_in_decimal: str = None + ending_unit_in_decimal: str = None + quantity_used_in_decimal: str = None + unit_amount_in_decimal: str = None + pricing_type: str = None + package_size: int = None @dataclass -class TaxResponse(Model): +class LineItemDiscountResponse(Model): raw_data: Dict[Any, Any] = None - name: str = None - amount: int = None - description: str = None + line_item_id: str = None + discount_type: str = None + coupon_id: str = None + entity_id: str = None + discount_amount: int = None @dataclass @@ -72,22 +79,6 @@ class LineItemTaxResponse(Model): local_currency_code: str = None -@dataclass -class LineItemTierResponse(Model): - raw_data: Dict[Any, Any] = None - line_item_id: str = None - starting_unit: int = None - ending_unit: int = None - quantity_used: int = None - unit_amount: int = None - starting_unit_in_decimal: str = None - ending_unit_in_decimal: str = None - quantity_used_in_decimal: str = None - unit_amount_in_decimal: str = None - pricing_type: str = None - package_size: int = None - - @dataclass class LineItemCreditResponse(Model): raw_data: Dict[Any, Any] = None @@ -96,16 +87,6 @@ class LineItemCreditResponse(Model): line_item_id: str = None -@dataclass -class LineItemDiscountResponse(Model): - raw_data: Dict[Any, Any] = None - line_item_id: str = None - discount_type: str = None - coupon_id: str = None - entity_id: str = None - discount_amount: int = None - - @dataclass class LineItemAddressResponse(Model): raw_data: Dict[Any, Any] = None @@ -126,6 +107,25 @@ class LineItemAddressResponse(Model): validation_status: str = None +@dataclass +class DiscountResponse(Model): + raw_data: Dict[Any, Any] = None + amount: int = None + description: str = None + entity_type: str = None + discount_type: str = None + entity_id: str = None + coupon_set_code: str = None + + +@dataclass +class TaxResponse(Model): + raw_data: Dict[Any, Any] = None + name: str = None + amount: int = None + description: str = None + + @dataclass class InvoiceEstimateResponse(Model): raw_data: Dict[Any, Any] = None @@ -138,12 +138,12 @@ class InvoiceEstimateResponse(Model): amount_paid: int = None amount_due: int = None line_items: List[LineItemResponse] = None - discounts: List[DiscountResponse] = None - taxes: List[TaxResponse] = None - line_item_taxes: List[LineItemTaxResponse] = None line_item_tiers: List[LineItemTierResponse] = None - line_item_credits: List[LineItemCreditResponse] = None line_item_discounts: List[LineItemDiscountResponse] = None + line_item_taxes: List[LineItemTaxResponse] = None + line_item_credits: List[LineItemCreditResponse] = None + line_item_addresses: List[LineItemAddressResponse] = None + discounts: List[DiscountResponse] = None + taxes: List[TaxResponse] = None round_off_amount: int = None customer_id: str = None - line_item_addresses: List[LineItemAddressResponse] = None diff --git a/chargebee/models/item/operations.py b/chargebee/models/item/operations.py index 7ddc6e6..f75e71a 100644 --- a/chargebee/models/item/operations.py +++ b/chargebee/models/item/operations.py @@ -8,6 +8,7 @@ @dataclass class Item: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item/responses.py b/chargebee/models/item/responses.py index 0049dae..e932750 100644 --- a/chargebee/models/item/responses.py +++ b/chargebee/models/item/responses.py @@ -67,6 +67,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + item: ItemResponse @@ -83,6 +84,7 @@ class ListItemResponse: @dataclass class ListResponse(Response): + list: List[ListItemResponse] next_offset: str = None diff --git a/chargebee/models/item_entitlement/operations.py b/chargebee/models/item_entitlement/operations.py index 9aef846..9b01456 100644 --- a/chargebee/models/item_entitlement/operations.py +++ b/chargebee/models/item_entitlement/operations.py @@ -7,6 +7,7 @@ @dataclass class ItemEntitlement: + env: environment.Environment class ItemType(Enum): diff --git a/chargebee/models/item_entitlement/responses.py b/chargebee/models/item_entitlement/responses.py index f3b52aa..a1d2a4b 100644 --- a/chargebee/models/item_entitlement/responses.py +++ b/chargebee/models/item_entitlement/responses.py @@ -23,6 +23,7 @@ class ItemEntitlementsForItemItemEntitlementResponse: @dataclass class ItemEntitlementsForItemResponse(Response): + list: List[ItemEntitlementsForItemItemEntitlementResponse] next_offset: str = None @@ -34,6 +35,7 @@ class ItemEntitlementsForFeatureItemEntitlementResponse: @dataclass class ItemEntitlementsForFeatureResponse(Response): + list: List[ItemEntitlementsForFeatureItemEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/item_family/operations.py b/chargebee/models/item_family/operations.py index 1bb8b4c..8a17c7d 100644 --- a/chargebee/models/item_family/operations.py +++ b/chargebee/models/item_family/operations.py @@ -7,6 +7,7 @@ @dataclass class ItemFamily: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item_family/responses.py b/chargebee/models/item_family/responses.py index 0f7de0d..ded56c5 100644 --- a/chargebee/models/item_family/responses.py +++ b/chargebee/models/item_family/responses.py @@ -26,6 +26,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + item_family: ItemFamilyResponse @@ -36,6 +37,7 @@ class ListItemFamilyResponse: @dataclass class ListResponse(Response): + list: List[ListItemFamilyResponse] next_offset: str = None diff --git a/chargebee/models/item_price/operations.py b/chargebee/models/item_price/operations.py index 9733854..0f9d85e 100644 --- a/chargebee/models/item_price/operations.py +++ b/chargebee/models/item_price/operations.py @@ -8,6 +8,7 @@ @dataclass class ItemPrice: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item_price/responses.py b/chargebee/models/item_price/responses.py index 790b717..4ebc17a 100644 --- a/chargebee/models/item_price/responses.py +++ b/chargebee/models/item_price/responses.py @@ -105,6 +105,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + item_price: ItemPriceResponse @@ -121,6 +122,7 @@ class ListItemPriceResponse: @dataclass class ListResponse(Response): + list: List[ListItemPriceResponse] next_offset: str = None @@ -138,6 +140,7 @@ class FindApplicableItemsItemPriceResponse: @dataclass class FindApplicableItemsResponse(Response): + list: List[FindApplicableItemsItemPriceResponse] next_offset: str = None @@ -149,5 +152,6 @@ class FindApplicableItemPricesItemPriceResponse: @dataclass class FindApplicableItemPricesResponse(Response): + list: List[FindApplicableItemPricesItemPriceResponse] next_offset: str = None diff --git a/chargebee/models/metadata/operations.py b/chargebee/models/metadata/operations.py index 29094b7..1762be9 100644 --- a/chargebee/models/metadata/operations.py +++ b/chargebee/models/metadata/operations.py @@ -5,6 +5,7 @@ @dataclass class Metadata: + env: environment.Environment pass diff --git a/chargebee/models/offer_event/__init__.py b/chargebee/models/offer_event/__init__.py new file mode 100644 index 0000000..74c33e3 --- /dev/null +++ b/chargebee/models/offer_event/__init__.py @@ -0,0 +1,2 @@ +from .operations import OfferEvent +from .responses import OfferEventResponse diff --git a/chargebee/models/offer_event/operations.py b/chargebee/models/offer_event/operations.py new file mode 100644 index 0000000..c6be5f4 --- /dev/null +++ b/chargebee/models/offer_event/operations.py @@ -0,0 +1,39 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast +from enum import Enum + + +@dataclass +class OfferEvent: + + env: environment.Environment + + class Type(Enum): + VIEWED = "viewed" + DISMISSED = "dismissed" + + def __str__(self): + return self.value + + class OfferEventsParams(TypedDict): + personalized_offer_id: Required[str] + type: Required["OfferEvent.Type"] + + def offer_events( + self, params: OfferEventsParams, headers=None + ) -> OfferEventsResponse: + jsonKeys = {} + options = {} + return request.send( + "post", + request.uri_path("offer_events"), + self.env, + cast(Dict[Any, Any], params), + headers, + OfferEventsResponse, + "grow", + True, + jsonKeys, + options, + ) diff --git a/chargebee/models/offer_event/responses.py b/chargebee/models/offer_event/responses.py new file mode 100644 index 0000000..ce2f872 --- /dev/null +++ b/chargebee/models/offer_event/responses.py @@ -0,0 +1,14 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any +from chargebee.response import Response + + +@dataclass +class OfferEventResponse(Model): + raw_data: Dict[Any, Any] = None + + +@dataclass +class OfferEventsResponse(Response): + is_idempotency_replayed: bool diff --git a/chargebee/models/offer_fulfillment/__init__.py b/chargebee/models/offer_fulfillment/__init__.py new file mode 100644 index 0000000..7f4f8b5 --- /dev/null +++ b/chargebee/models/offer_fulfillment/__init__.py @@ -0,0 +1,2 @@ +from .operations import OfferFulfillment +from .responses import OfferFulfillmentResponse diff --git a/chargebee/models/offer_fulfillment/operations.py b/chargebee/models/offer_fulfillment/operations.py new file mode 100644 index 0000000..52987bf --- /dev/null +++ b/chargebee/models/offer_fulfillment/operations.py @@ -0,0 +1,103 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast +from enum import Enum + + +@dataclass +class OfferFulfillment: + + env: environment.Environment + + class ProcessingType(Enum): + BILLING_UPDATE = "billing_update" + CHECKOUT = "checkout" + URL_REDIRECT = "url_redirect" + WEBHOOK = "webhook" + EMAIL = "email" + + def __str__(self): + return self.value + + class Status(Enum): + IN_PROGRESS = "in_progress" + COMPLETED = "completed" + FAILED = "failed" + + def __str__(self): + return self.value + + class ErrorCode(Enum): + BILLING_UPDATE_FAILED = "billing_update_failed" + CHECKOUT_ABANDONED = "checkout_abandoned" + EXTERNAL_FULFILLMENT_FAILED = "external_fulfillment_failed" + INTERNAL_ERROR = "internal_error" + FULFILLMENT_EXPIRED = "fulfillment_expired" + + def __str__(self): + return self.value + + class Error(TypedDict): + code: Required["OfferFulfillment.ErrorCode"] + message: Required[str] + + class OfferFulfillmentsParams(TypedDict): + personalized_offer_id: Required[str] + option_id: Required[str] + + class OfferFulfillmentsUpdateParams(TypedDict): + id: Required[str] + status: Required["OfferFulfillment.Status"] + failure_reason: NotRequired[str] + + def offer_fulfillments( + self, params: OfferFulfillmentsParams, headers=None + ) -> OfferFulfillmentsResponse: + jsonKeys = {} + options = {} + return request.send( + "post", + request.uri_path("offer_fulfillments"), + self.env, + cast(Dict[Any, Any], params), + headers, + OfferFulfillmentsResponse, + "grow", + True, + jsonKeys, + options, + ) + + def offer_fulfillments_get(self, id, headers=None) -> OfferFulfillmentsGetResponse: + jsonKeys = {} + options = {} + return request.send( + "get", + request.uri_path("offer_fulfillments", id), + self.env, + None, + headers, + OfferFulfillmentsGetResponse, + "grow", + True, + jsonKeys, + options, + ) + + def offer_fulfillments_update( + self, id, params: OfferFulfillmentsUpdateParams, headers=None + ) -> OfferFulfillmentsUpdateResponse: + jsonKeys = {} + options = {} + return request.send( + "post", + request.uri_path("offer_fulfillments", id), + self.env, + cast(Dict[Any, Any], params), + headers, + OfferFulfillmentsUpdateResponse, + "grow", + True, + jsonKeys, + options, + ) diff --git a/chargebee/models/offer_fulfillment/responses.py b/chargebee/models/offer_fulfillment/responses.py new file mode 100644 index 0000000..74aaa34 --- /dev/null +++ b/chargebee/models/offer_fulfillment/responses.py @@ -0,0 +1,46 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any +from chargebee.response import Response +from chargebee.models import hosted_page + + +@dataclass +class ErrorResponse(Model): + raw_data: Dict[Any, Any] = None + code: str = None + message: str = None + + +@dataclass +class OfferFulfillmentResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + personalized_offer_id: str = None + option_id: str = None + processing_type: str = None + status: str = None + redirect_url: str = None + failed_at: int = None + created_at: int = None + completed_at: int = None + error: ErrorResponse = None + + +@dataclass +class OfferFulfillmentsResponse(Response): + is_idempotency_replayed: bool + offer_fulfillment: OfferFulfillmentResponse + hosted_page: "hosted_page.HostedPageResponse" = None + + +@dataclass +class OfferFulfillmentsGetResponse(Response): + + offer_fulfillment: OfferFulfillmentResponse + + +@dataclass +class OfferFulfillmentsUpdateResponse(Response): + is_idempotency_replayed: bool + offer_fulfillment: OfferFulfillmentResponse diff --git a/chargebee/models/omnichannel_one_time_order/operations.py b/chargebee/models/omnichannel_one_time_order/operations.py index 9f5652d..e8a4af4 100644 --- a/chargebee/models/omnichannel_one_time_order/operations.py +++ b/chargebee/models/omnichannel_one_time_order/operations.py @@ -3,11 +3,12 @@ from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast from enum import Enum from chargebee.filters import Filters -from chargebee.models import omnichannel_one_time_order_item +from chargebee.models import omnichannel_one_time_order_item, omnichannel_transaction @dataclass class OmnichannelOneTimeOrder: + env: environment.Environment class Source(Enum): @@ -36,18 +37,6 @@ class OmnichannelTransactionType(Enum): def __str__(self): return self.value - class OmnichannelTransaction(TypedDict): - id: Required[str] - id_at_source: Required[str] - app_id: Required[str] - price_currency: NotRequired[str] - price_units: NotRequired[int] - price_nanos: NotRequired[int] - type: Required["OmnichannelOneTimeOrder.OmnichannelTransactionType"] - transacted_at: NotRequired[int] - created_at: Required[int] - resource_version: NotRequired[int] - class ListParams(TypedDict): limit: NotRequired[int] offset: NotRequired[str] diff --git a/chargebee/models/omnichannel_one_time_order/responses.py b/chargebee/models/omnichannel_one_time_order/responses.py index e43c1bb..857b21d 100644 --- a/chargebee/models/omnichannel_one_time_order/responses.py +++ b/chargebee/models/omnichannel_one_time_order/responses.py @@ -2,22 +2,7 @@ from chargebee.model import Model from typing import Dict, List, Any from chargebee.response import Response -from chargebee.models import omnichannel_one_time_order_item - - -@dataclass -class OmnichannelTransactionResponse(Model): - raw_data: Dict[Any, Any] = None - id: str = None - id_at_source: str = None - app_id: str = None - price_currency: str = None - price_units: int = None - price_nanos: int = None - type: str = None - transacted_at: int = None - created_at: int = None - resource_version: int = None +from chargebee.models import omnichannel_one_time_order_item, omnichannel_transaction @dataclass @@ -41,6 +26,7 @@ class OmnichannelOneTimeOrderResponse(Model): @dataclass class RetrieveResponse(Response): + omnichannel_one_time_order: OmnichannelOneTimeOrderResponse @@ -51,5 +37,6 @@ class ListOmnichannelOneTimeOrderResponse: @dataclass class ListResponse(Response): + list: List[ListOmnichannelOneTimeOrderResponse] next_offset: str = None diff --git a/chargebee/models/omnichannel_one_time_order_item/operations.py b/chargebee/models/omnichannel_one_time_order_item/operations.py index 14bfc7d..07be1b0 100644 --- a/chargebee/models/omnichannel_one_time_order_item/operations.py +++ b/chargebee/models/omnichannel_one_time_order_item/operations.py @@ -6,6 +6,7 @@ @dataclass class OmnichannelOneTimeOrderItem: + env: environment.Environment class CancellationReason(Enum): diff --git a/chargebee/models/omnichannel_subscription/operations.py b/chargebee/models/omnichannel_subscription/operations.py index 8c2fa83..14283a4 100644 --- a/chargebee/models/omnichannel_subscription/operations.py +++ b/chargebee/models/omnichannel_subscription/operations.py @@ -3,11 +3,12 @@ from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast from enum import Enum from chargebee.filters import Filters -from chargebee.models import omnichannel_subscription_item +from chargebee.models import omnichannel_subscription_item, omnichannel_transaction @dataclass class OmnichannelSubscription: + env: environment.Environment class Source(Enum): @@ -62,18 +63,6 @@ class OmnichannelTransactionType(Enum): def __str__(self): return self.value - class OmnichannelTransaction(TypedDict): - id: Required[str] - id_at_source: Required[str] - app_id: Required[str] - price_currency: NotRequired[str] - price_units: NotRequired[int] - price_nanos: NotRequired[int] - type: Required["OmnichannelSubscription.OmnichannelTransactionType"] - transacted_at: NotRequired[int] - created_at: Required[int] - resource_version: NotRequired[int] - class ListParams(TypedDict): limit: NotRequired[int] offset: NotRequired[str] @@ -84,6 +73,9 @@ class OmnichannelTransactionsForOmnichannelSubscriptionParams(TypedDict): limit: NotRequired[int] offset: NotRequired[str] + class MoveParams(TypedDict): + to_customer_id: Required[str] + def retrieve(self, id, headers=None) -> RetrieveResponse: jsonKeys = {} options = {} @@ -138,3 +130,21 @@ def omnichannel_transactions_for_omnichannel_subscription( jsonKeys, options, ) + + def move(self, id, params: MoveParams, headers=None) -> MoveResponse: + jsonKeys = {} + options = { + "isIdempotent": True, + } + return request.send( + "post", + request.uri_path("omnichannel_subscriptions", id, "move"), + self.env, + cast(Dict[Any, Any], params), + headers, + MoveResponse, + None, + False, + jsonKeys, + options, + ) diff --git a/chargebee/models/omnichannel_subscription/responses.py b/chargebee/models/omnichannel_subscription/responses.py index 26b241f..cc20047 100644 --- a/chargebee/models/omnichannel_subscription/responses.py +++ b/chargebee/models/omnichannel_subscription/responses.py @@ -2,22 +2,11 @@ from chargebee.model import Model from typing import Dict, List, Any from chargebee.response import Response -from chargebee.models import omnichannel_subscription_item, omnichannel_transaction - - -@dataclass -class OmnichannelTransactionResponse(Model): - raw_data: Dict[Any, Any] = None - id: str = None - id_at_source: str = None - app_id: str = None - price_currency: str = None - price_units: int = None - price_nanos: int = None - type: str = None - transacted_at: int = None - created_at: int = None - resource_version: int = None +from chargebee.models import ( + omnichannel_subscription_item, + omnichannel_transaction, + omnichannel_transaction, +) @dataclass @@ -33,11 +22,14 @@ class OmnichannelSubscriptionResponse(Model): omnichannel_subscription_items: List[ "omnichannel_subscription_item.OmnichannelSubscriptionItemResponse" ] = None - initial_purchase_transaction: "omnichannel_transaction.OmnichannelTransactionResponse" = None + initial_purchase_transaction: ( + "omnichannel_transaction.OmnichannelTransactionResponse" + ) = None @dataclass class RetrieveResponse(Response): + omnichannel_subscription: OmnichannelSubscriptionResponse @@ -48,6 +40,7 @@ class ListOmnichannelSubscriptionResponse: @dataclass class ListResponse(Response): + list: List[ListOmnichannelSubscriptionResponse] next_offset: str = None @@ -59,7 +52,14 @@ class OmnichannelTransactionsForOmnichannelSubscriptionOmnichannelSubscriptionRe @dataclass class OmnichannelTransactionsForOmnichannelSubscriptionResponse(Response): + list: List[ OmnichannelTransactionsForOmnichannelSubscriptionOmnichannelSubscriptionResponse ] next_offset: str = None + + +@dataclass +class MoveResponse(Response): + is_idempotency_replayed: bool + omnichannel_subscription: OmnichannelSubscriptionResponse diff --git a/chargebee/models/omnichannel_subscription_item/operations.py b/chargebee/models/omnichannel_subscription_item/operations.py index bf6ce82..cfc1887 100644 --- a/chargebee/models/omnichannel_subscription_item/operations.py +++ b/chargebee/models/omnichannel_subscription_item/operations.py @@ -2,10 +2,12 @@ from chargebee import request, environment from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast from enum import Enum +from chargebee.models import omnichannel_subscription_item_offer @dataclass class OmnichannelSubscriptionItem: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/omnichannel_subscription_item/responses.py b/chargebee/models/omnichannel_subscription_item/responses.py index c6d17f5..e022cb0 100644 --- a/chargebee/models/omnichannel_subscription_item/responses.py +++ b/chargebee/models/omnichannel_subscription_item/responses.py @@ -2,7 +2,10 @@ from chargebee.model import Model from typing import Dict, List, Any from chargebee.response import Response -from chargebee.models import omnichannel_subscription_item_scheduled_change +from chargebee.models import ( + omnichannel_subscription_item_offer, + omnichannel_subscription_item_scheduled_change, +) @dataclass @@ -38,8 +41,11 @@ class OmnichannelSubscriptionItemResponse(Model): resumes_at: int = None has_scheduled_changes: bool = None resource_version: int = None - upcoming_renewal: UpcomingRenewalResponse = None - linked_item: LinkedItemResponse = None + omnichannel_subscription_item_offers: List[ + "omnichannel_subscription_item_offer.OmnichannelSubscriptionItemOfferResponse" + ] = None + upcoming_renewal: "upcoming_renewal.UpcomingRenewalResponse" = None + linked_item: "linked_item.LinkedItemResponse" = None @dataclass @@ -49,5 +55,6 @@ class ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemResponse: @dataclass class ListOmniSubItemScheduleChangesResponse(Response): + list: List[ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemResponse] next_offset: str = None diff --git a/chargebee/models/omnichannel_subscription_item_offer/__init__.py b/chargebee/models/omnichannel_subscription_item_offer/__init__.py new file mode 100644 index 0000000..2aadfb1 --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_offer/__init__.py @@ -0,0 +1,2 @@ +from .operations import OmnichannelSubscriptionItemOffer +from .responses import OmnichannelSubscriptionItemOfferResponse diff --git a/chargebee/models/omnichannel_subscription_item_offer/operations.py b/chargebee/models/omnichannel_subscription_item_offer/operations.py new file mode 100644 index 0000000..7d9f4ae --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_offer/operations.py @@ -0,0 +1,11 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast + + +@dataclass +class OmnichannelSubscriptionItemOffer: + + env: environment.Environment + + pass diff --git a/chargebee/models/omnichannel_subscription_item_offer/responses.py b/chargebee/models/omnichannel_subscription_item_offer/responses.py new file mode 100644 index 0000000..ffc7872 --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_offer/responses.py @@ -0,0 +1,23 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any + + +@dataclass +class OmnichannelSubscriptionItemOfferResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + offer_id_at_source: str = None + category: str = None + category_at_source: str = None + type: str = None + type_at_source: str = None + discount_type: str = None + duration: str = None + percentage: float = None + price_currency: str = None + price_units: int = None + price_nanos: int = None + offer_term_start: int = None + offer_term_end: int = None + resource_version: int = None diff --git a/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py b/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py index 2f73f4d..1b5cff5 100644 --- a/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py +++ b/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py @@ -6,6 +6,7 @@ @dataclass class OmnichannelSubscriptionItemScheduledChange: + env: environment.Environment class ChangeType(Enum): diff --git a/chargebee/models/omnichannel_transaction/operations.py b/chargebee/models/omnichannel_transaction/operations.py index 5cb6504..257e28e 100644 --- a/chargebee/models/omnichannel_transaction/operations.py +++ b/chargebee/models/omnichannel_transaction/operations.py @@ -6,6 +6,7 @@ @dataclass class OmnichannelTransaction: + env: environment.Environment class Type(Enum): @@ -15,4 +16,10 @@ class Type(Enum): def __str__(self): return self.value + class LinkedOmnichannelSubscription(TypedDict): + omnichannel_subscription_id: NotRequired[str] + + class LinkedOmnichannelOneTimeOrder(TypedDict): + omnichannel_one_time_order_id: NotRequired[str] + pass diff --git a/chargebee/models/omnichannel_transaction/responses.py b/chargebee/models/omnichannel_transaction/responses.py index 8b5149e..268a45a 100644 --- a/chargebee/models/omnichannel_transaction/responses.py +++ b/chargebee/models/omnichannel_transaction/responses.py @@ -3,6 +3,18 @@ from typing import Dict, List, Any +@dataclass +class LinkedOmnichannelSubscriptionResponse(Model): + raw_data: Dict[Any, Any] = None + omnichannel_subscription_id: str = None + + +@dataclass +class LinkedOmnichannelOneTimeOrderResponse(Model): + raw_data: Dict[Any, Any] = None + omnichannel_one_time_order_id: str = None + + @dataclass class OmnichannelTransactionResponse(Model): raw_data: Dict[Any, Any] = None @@ -16,3 +28,7 @@ class OmnichannelTransactionResponse(Model): transacted_at: int = None created_at: int = None resource_version: int = None + linked_omnichannel_subscriptions: List[LinkedOmnichannelSubscriptionResponse] = None + linked_omnichannel_one_time_orders: List[LinkedOmnichannelOneTimeOrderResponse] = ( + None + ) diff --git a/chargebee/models/order/operations.py b/chargebee/models/order/operations.py index 5b3cb5e..41949be 100644 --- a/chargebee/models/order/operations.py +++ b/chargebee/models/order/operations.py @@ -8,6 +8,7 @@ @dataclass class Order: + env: environment.Environment class Status(Enum): @@ -158,7 +159,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class BillingAddress(TypedDict): first_name: NotRequired[str] diff --git a/chargebee/models/order/responses.py b/chargebee/models/order/responses.py index ddc905e..97fcc67 100644 --- a/chargebee/models/order/responses.py +++ b/chargebee/models/order/responses.py @@ -47,7 +47,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass @@ -223,6 +222,7 @@ class ReopenResponse(Response): @dataclass class RetrieveResponse(Response): + order: OrderResponse @@ -239,6 +239,7 @@ class ListOrderResponse: @dataclass class ListResponse(Response): + list: List[ListOrderResponse] next_offset: str = None @@ -250,6 +251,7 @@ class OrdersForInvoiceOrderResponse: @dataclass class OrdersForInvoiceResponse(Response): + list: List[OrdersForInvoiceOrderResponse] next_offset: str = None diff --git a/chargebee/models/payment_intent/operations.py b/chargebee/models/payment_intent/operations.py index c30a0c7..2f08ea5 100644 --- a/chargebee/models/payment_intent/operations.py +++ b/chargebee/models/payment_intent/operations.py @@ -7,6 +7,7 @@ @dataclass class PaymentIntent: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_intent/responses.py b/chargebee/models/payment_intent/responses.py index 8587736..be86056 100644 --- a/chargebee/models/payment_intent/responses.py +++ b/chargebee/models/payment_intent/responses.py @@ -56,4 +56,5 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): + payment_intent: PaymentIntentResponse diff --git a/chargebee/models/payment_reference_number/operations.py b/chargebee/models/payment_reference_number/operations.py index f98e57b..57370be 100644 --- a/chargebee/models/payment_reference_number/operations.py +++ b/chargebee/models/payment_reference_number/operations.py @@ -6,6 +6,7 @@ @dataclass class PaymentReferenceNumber: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/payment_schedule/operations.py b/chargebee/models/payment_schedule/operations.py index 3397ee5..24a37e8 100644 --- a/chargebee/models/payment_schedule/operations.py +++ b/chargebee/models/payment_schedule/operations.py @@ -6,6 +6,7 @@ @dataclass class PaymentSchedule: + env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/payment_schedule_estimate/operations.py b/chargebee/models/payment_schedule_estimate/operations.py index 881353b..ea86597 100644 --- a/chargebee/models/payment_schedule_estimate/operations.py +++ b/chargebee/models/payment_schedule_estimate/operations.py @@ -6,6 +6,7 @@ @dataclass class PaymentScheduleEstimate: + env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/payment_schedule_scheme/operations.py b/chargebee/models/payment_schedule_scheme/operations.py index 5d83c55..f91e48a 100644 --- a/chargebee/models/payment_schedule_scheme/operations.py +++ b/chargebee/models/payment_schedule_scheme/operations.py @@ -6,6 +6,7 @@ @dataclass class PaymentScheduleScheme: + env: environment.Environment class PeriodUnit(Enum): diff --git a/chargebee/models/payment_schedule_scheme/responses.py b/chargebee/models/payment_schedule_scheme/responses.py index 2433065..1153b4a 100644 --- a/chargebee/models/payment_schedule_scheme/responses.py +++ b/chargebee/models/payment_schedule_scheme/responses.py @@ -34,6 +34,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + payment_schedule_scheme: PaymentScheduleSchemeResponse diff --git a/chargebee/models/payment_source/operations.py b/chargebee/models/payment_source/operations.py index bd78782..f46048b 100644 --- a/chargebee/models/payment_source/operations.py +++ b/chargebee/models/payment_source/operations.py @@ -8,6 +8,7 @@ @dataclass class PaymentSource: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_source/responses.py b/chargebee/models/payment_source/responses.py index ff8eb93..edd5e0d 100644 --- a/chargebee/models/payment_source/responses.py +++ b/chargebee/models/payment_source/responses.py @@ -216,6 +216,7 @@ class VerifyBankAccountResponse(Response): @dataclass class RetrieveResponse(Response): + payment_source: PaymentSourceResponse @@ -226,6 +227,7 @@ class ListPaymentSourceResponse: @dataclass class ListResponse(Response): + list: List[ListPaymentSourceResponse] next_offset: str = None diff --git a/chargebee/models/payment_voucher/operations.py b/chargebee/models/payment_voucher/operations.py index a288bf2..170bbe8 100644 --- a/chargebee/models/payment_voucher/operations.py +++ b/chargebee/models/payment_voucher/operations.py @@ -8,6 +8,7 @@ @dataclass class PaymentVoucher: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_voucher/responses.py b/chargebee/models/payment_voucher/responses.py index 6a7637a..28cc910 100644 --- a/chargebee/models/payment_voucher/responses.py +++ b/chargebee/models/payment_voucher/responses.py @@ -45,6 +45,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + payment_voucher: PaymentVoucherResponse @@ -55,6 +56,7 @@ class PaymentVouchersForInvoicePaymentVoucherResponse: @dataclass class PaymentVouchersForInvoiceResponse(Response): + list: List[PaymentVouchersForInvoicePaymentVoucherResponse] next_offset: str = None @@ -66,5 +68,6 @@ class PaymentVouchersForCustomerPaymentVoucherResponse: @dataclass class PaymentVouchersForCustomerResponse(Response): + list: List[PaymentVouchersForCustomerPaymentVoucherResponse] next_offset: str = None diff --git a/chargebee/models/personalized_offer/__init__.py b/chargebee/models/personalized_offer/__init__.py new file mode 100644 index 0000000..e80818c --- /dev/null +++ b/chargebee/models/personalized_offer/__init__.py @@ -0,0 +1,2 @@ +from .operations import PersonalizedOffer +from .responses import PersonalizedOfferResponse diff --git a/chargebee/models/personalized_offer/operations.py b/chargebee/models/personalized_offer/operations.py new file mode 100644 index 0000000..6d8126c --- /dev/null +++ b/chargebee/models/personalized_offer/operations.py @@ -0,0 +1,78 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast +from enum import Enum + + +@dataclass +class PersonalizedOffer: + + env: environment.Environment + + class OptionProcessingType(Enum): + BILLING_UPDATE = "billing_update" + CHECKOUT = "checkout" + URL_REDIRECT = "url_redirect" + WEBHOOK = "webhook" + EMAIL = "email" + + def __str__(self): + return self.value + + class OptionProcessingLayout(Enum): + IN_APP = "in_app" + FULL_PAGE = "full_page" + + def __str__(self): + return self.value + + class Content(TypedDict): + title: Required[str] + description: Required[str] + + class Option(TypedDict): + id: Required[str] + label: Required[str] + processing_type: Required["PersonalizedOffer.OptionProcessingType"] + processing_layout: Required["PersonalizedOffer.OptionProcessingLayout"] + redirect_url: Required[str] + + class PersonalizedOffersRequestContextParams(TypedDict): + user_agent: NotRequired[str] + locale: NotRequired[str] + timezone: NotRequired[str] + url: NotRequired[str] + referrer_url: NotRequired[str] + + class PersonalizedOffersParams(TypedDict): + first_name: NotRequired[str] + last_name: NotRequired[str] + email: NotRequired[str] + roles: NotRequired[List[str]] + external_user_id: NotRequired[str] + subscription_id: NotRequired[str] + customer_id: Required[str] + custom: NotRequired[Dict[Any, Any]] + request_context: NotRequired[ + "PersonalizedOffer.PersonalizedOffersRequestContextParams" + ] + + def personalized_offers( + self, params: PersonalizedOffersParams, headers=None + ) -> PersonalizedOffersResponse: + jsonKeys = { + "custom": 0, + } + options = {} + return request.send( + "post", + request.uri_path("personalized_offers"), + self.env, + cast(Dict[Any, Any], params), + headers, + PersonalizedOffersResponse, + "grow", + True, + jsonKeys, + options, + ) diff --git a/chargebee/models/personalized_offer/responses.py b/chargebee/models/personalized_offer/responses.py new file mode 100644 index 0000000..511749e --- /dev/null +++ b/chargebee/models/personalized_offer/responses.py @@ -0,0 +1,39 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any +from chargebee.response import Response +from chargebee.models import brand + + +@dataclass +class ContentResponse(Model): + raw_data: Dict[Any, Any] = None + title: str = None + description: str = None + + +@dataclass +class OptionResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + label: str = None + processing_type: str = None + processing_layout: str = None + redirect_url: str = None + + +@dataclass +class PersonalizedOfferResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + offer_id: str = None + content: ContentResponse = None + options: List[OptionResponse] = None + + +@dataclass +class PersonalizedOffersResponse(Response): + is_idempotency_replayed: bool + personalized_offers: List[PersonalizedOfferResponse] + expires_at: int + brand: "brand.BrandResponse" = None diff --git a/chargebee/models/plan/operations.py b/chargebee/models/plan/operations.py index 8558e5e..32fa8f8 100644 --- a/chargebee/models/plan/operations.py +++ b/chargebee/models/plan/operations.py @@ -8,6 +8,7 @@ @dataclass class Plan: + env: environment.Environment class PeriodUnit(Enum): diff --git a/chargebee/models/plan/responses.py b/chargebee/models/plan/responses.py index 8f036ab..bab43f1 100644 --- a/chargebee/models/plan/responses.py +++ b/chargebee/models/plan/responses.py @@ -131,12 +131,14 @@ class ListPlanResponse: @dataclass class ListResponse(Response): + list: List[ListPlanResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + plan: PlanResponse diff --git a/chargebee/models/portal_session/operations.py b/chargebee/models/portal_session/operations.py index 21ef4ec..988c6c2 100644 --- a/chargebee/models/portal_session/operations.py +++ b/chargebee/models/portal_session/operations.py @@ -6,6 +6,7 @@ @dataclass class PortalSession: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/portal_session/responses.py b/chargebee/models/portal_session/responses.py index 2597000..f10c78b 100644 --- a/chargebee/models/portal_session/responses.py +++ b/chargebee/models/portal_session/responses.py @@ -40,6 +40,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + portal_session: PortalSessionResponse diff --git a/chargebee/models/price_variant/operations.py b/chargebee/models/price_variant/operations.py index bdc42e4..bc9ce2a 100644 --- a/chargebee/models/price_variant/operations.py +++ b/chargebee/models/price_variant/operations.py @@ -7,6 +7,7 @@ @dataclass class PriceVariant: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/price_variant/responses.py b/chargebee/models/price_variant/responses.py index 7bdc1d5..358fed5 100644 --- a/chargebee/models/price_variant/responses.py +++ b/chargebee/models/price_variant/responses.py @@ -37,6 +37,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + price_variant: PriceVariantResponse @@ -59,5 +60,6 @@ class ListPriceVariantResponse: @dataclass class ListResponse(Response): + list: List[ListPriceVariantResponse] next_offset: str = None diff --git a/chargebee/models/pricing_page_session/operations.py b/chargebee/models/pricing_page_session/operations.py index d17d96f..a12b0d1 100644 --- a/chargebee/models/pricing_page_session/operations.py +++ b/chargebee/models/pricing_page_session/operations.py @@ -6,6 +6,7 @@ @dataclass class PricingPageSession: + env: environment.Environment class CreateForNewSubscriptionPricingPageParams(TypedDict): diff --git a/chargebee/models/promotional_credit/operations.py b/chargebee/models/promotional_credit/operations.py index 7c05654..70314d2 100644 --- a/chargebee/models/promotional_credit/operations.py +++ b/chargebee/models/promotional_credit/operations.py @@ -8,6 +8,7 @@ @dataclass class PromotionalCredit: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/promotional_credit/responses.py b/chargebee/models/promotional_credit/responses.py index 27f8f87..01a6dd1 100644 --- a/chargebee/models/promotional_credit/responses.py +++ b/chargebee/models/promotional_credit/responses.py @@ -51,10 +51,12 @@ class ListPromotionalCreditResponse: @dataclass class ListResponse(Response): + list: List[ListPromotionalCreditResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + promotional_credit: PromotionalCreditResponse diff --git a/chargebee/models/purchase/operations.py b/chargebee/models/purchase/operations.py index 18f6d62..08d0898 100644 --- a/chargebee/models/purchase/operations.py +++ b/chargebee/models/purchase/operations.py @@ -6,6 +6,7 @@ @dataclass class Purchase: + env: environment.Environment class CreatePurchaseItemParams(TypedDict): diff --git a/chargebee/models/quote/operations.py b/chargebee/models/quote/operations.py index b3d066a..603925e 100644 --- a/chargebee/models/quote/operations.py +++ b/chargebee/models/quote/operations.py @@ -8,6 +8,7 @@ @dataclass class Quote: + env: environment.Environment class Status(Enum): @@ -46,7 +47,7 @@ class LineItemEntityType(Enum): def __str__(self): return self.value - class DiscountEntityType(Enum): + class LineItemDiscountDiscountType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -57,14 +58,7 @@ class DiscountEntityType(Enum): def __str__(self): return self.value - class DiscountDiscountType(Enum): - FIXED_AMOUNT = "fixed_amount" - PERCENTAGE = "percentage" - - def __str__(self): - return self.value - - class LineItemDiscountDiscountType(Enum): + class DiscountEntityType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -75,6 +69,13 @@ class LineItemDiscountDiscountType(Enum): def __str__(self): return self.value + class DiscountDiscountType(Enum): + FIXED_AMOUNT = "fixed_amount" + PERCENTAGE = "percentage" + + def __str__(self): + return self.value + class LineItem(TypedDict): id: NotRequired[str] subscription_id: NotRequired[str] @@ -102,13 +103,18 @@ class LineItem(TypedDict): entity_id: NotRequired[str] customer_id: NotRequired[str] - class Discount(TypedDict): - amount: Required[int] - description: NotRequired[str] - entity_type: Required["Quote.DiscountEntityType"] - discount_type: NotRequired["Quote.DiscountDiscountType"] - entity_id: NotRequired[str] - coupon_set_code: NotRequired[str] + class LineItemTier(TypedDict): + line_item_id: NotRequired[str] + starting_unit: Required[int] + ending_unit: NotRequired[int] + quantity_used: Required[int] + unit_amount: Required[int] + starting_unit_in_decimal: NotRequired[str] + ending_unit_in_decimal: NotRequired[str] + quantity_used_in_decimal: NotRequired[str] + unit_amount_in_decimal: NotRequired[str] + pricing_type: NotRequired[enums.PricingType] + package_size: NotRequired[int] class LineItemDiscount(TypedDict): line_item_id: Required[str] @@ -117,11 +123,6 @@ class LineItemDiscount(TypedDict): entity_id: NotRequired[str] discount_amount: Required[int] - class Tax(TypedDict): - name: Required[str] - amount: Required[int] - description: NotRequired[str] - class LineItemTax(TypedDict): line_item_id: NotRequired[str] tax_name: Required[str] @@ -139,18 +140,18 @@ class LineItemTax(TypedDict): tax_amount_in_local_currency: NotRequired[int] local_currency_code: NotRequired[str] - class LineItemTier(TypedDict): - line_item_id: NotRequired[str] - starting_unit: Required[int] - ending_unit: NotRequired[int] - quantity_used: Required[int] - unit_amount: Required[int] - starting_unit_in_decimal: NotRequired[str] - ending_unit_in_decimal: NotRequired[str] - quantity_used_in_decimal: NotRequired[str] - unit_amount_in_decimal: NotRequired[str] - pricing_type: NotRequired[enums.PricingType] - package_size: NotRequired[int] + class Discount(TypedDict): + amount: Required[int] + description: NotRequired[str] + entity_type: Required["Quote.DiscountEntityType"] + discount_type: NotRequired["Quote.DiscountDiscountType"] + entity_id: NotRequired[str] + coupon_set_code: NotRequired[str] + + class Tax(TypedDict): + name: Required[str] + amount: Required[int] + description: NotRequired[str] class ShippingAddress(TypedDict): first_name: NotRequired[str] @@ -167,7 +168,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class BillingAddress(TypedDict): first_name: NotRequired[str] @@ -526,6 +526,7 @@ class CreateSubItemsForCustomerQuoteSubscriptionParams(TypedDict): trial_end: NotRequired[int] setup_fee: NotRequired[int] start_date: NotRequired[int] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] contract_term_billing_cycle_on_renewal: NotRequired[int] class CreateSubItemsForCustomerQuoteSubscriptionItemParams(TypedDict): @@ -617,6 +618,7 @@ class EditCreateSubCustomerQuoteForItemsSubscriptionParams(TypedDict): trial_end: NotRequired[int] setup_fee: NotRequired[int] start_date: NotRequired[int] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] contract_term_billing_cycle_on_renewal: NotRequired[int] class EditCreateSubCustomerQuoteForItemsSubscriptionItemParams(TypedDict): diff --git a/chargebee/models/quote/responses.py b/chargebee/models/quote/responses.py index 74a193d..1cfcba4 100644 --- a/chargebee/models/quote/responses.py +++ b/chargebee/models/quote/responses.py @@ -48,14 +48,19 @@ class LineItemResponse(Model): @dataclass -class DiscountResponse(Model): +class LineItemTierResponse(Model): raw_data: Dict[Any, Any] = None - amount: int = None - description: str = None - entity_type: str = None - discount_type: str = None - entity_id: str = None - coupon_set_code: str = None + line_item_id: str = None + starting_unit: int = None + ending_unit: int = None + quantity_used: int = None + unit_amount: int = None + starting_unit_in_decimal: str = None + ending_unit_in_decimal: str = None + quantity_used_in_decimal: str = None + unit_amount_in_decimal: str = None + pricing_type: str = None + package_size: int = None @dataclass @@ -68,14 +73,6 @@ class LineItemDiscountResponse(Model): discount_amount: int = None -@dataclass -class TaxResponse(Model): - raw_data: Dict[Any, Any] = None - name: str = None - amount: int = None - description: str = None - - @dataclass class LineItemTaxResponse(Model): raw_data: Dict[Any, Any] = None @@ -97,19 +94,22 @@ class LineItemTaxResponse(Model): @dataclass -class LineItemTierResponse(Model): +class DiscountResponse(Model): raw_data: Dict[Any, Any] = None - line_item_id: str = None - starting_unit: int = None - ending_unit: int = None - quantity_used: int = None - unit_amount: int = None - starting_unit_in_decimal: str = None - ending_unit_in_decimal: str = None - quantity_used_in_decimal: str = None - unit_amount_in_decimal: str = None - pricing_type: str = None - package_size: int = None + amount: int = None + description: str = None + entity_type: str = None + discount_type: str = None + entity_id: str = None + coupon_set_code: str = None + + +@dataclass +class TaxResponse(Model): + raw_data: Dict[Any, Any] = None + name: str = None + amount: int = None + description: str = None @dataclass @@ -129,7 +129,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass @@ -178,11 +177,11 @@ class QuoteResponse(Model): updated_at: int = None vat_number_prefix: str = None line_items: List[LineItemResponse] = None - discounts: List[DiscountResponse] = None + line_item_tiers: List[LineItemTierResponse] = None line_item_discounts: List[LineItemDiscountResponse] = None - taxes: List[TaxResponse] = None line_item_taxes: List[LineItemTaxResponse] = None - line_item_tiers: List[LineItemTierResponse] = None + discounts: List[DiscountResponse] = None + taxes: List[TaxResponse] = None tax_category: str = None currency_code: str = None notes: List[Dict[Any, Any]] = None @@ -199,6 +198,7 @@ class QuoteResponse(Model): @dataclass class RetrieveResponse(Response): + quote: QuoteResponse quoted_subscription: "quoted_subscription.QuotedSubscriptionResponse" = None quoted_charge: "quoted_charge.QuotedChargeResponse" = None @@ -302,6 +302,7 @@ class ListQuoteResponse: @dataclass class ListResponse(Response): + list: List[ListQuoteResponse] next_offset: str = None @@ -313,6 +314,7 @@ class QuoteLineGroupsForQuoteQuoteResponse: @dataclass class QuoteLineGroupsForQuoteResponse(Response): + list: List[QuoteLineGroupsForQuoteQuoteResponse] next_offset: str = None diff --git a/chargebee/models/quote_line_group/operations.py b/chargebee/models/quote_line_group/operations.py index 5cf8423..a6bda2e 100644 --- a/chargebee/models/quote_line_group/operations.py +++ b/chargebee/models/quote_line_group/operations.py @@ -7,6 +7,7 @@ @dataclass class QuoteLineGroup: + env: environment.Environment class ChargeEvent(Enum): @@ -32,7 +33,7 @@ class LineItemEntityType(Enum): def __str__(self): return self.value - class DiscountEntityType(Enum): + class LineItemDiscountDiscountType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -43,14 +44,7 @@ class DiscountEntityType(Enum): def __str__(self): return self.value - class DiscountDiscountType(Enum): - FIXED_AMOUNT = "fixed_amount" - PERCENTAGE = "percentage" - - def __str__(self): - return self.value - - class LineItemDiscountDiscountType(Enum): + class DiscountEntityType(Enum): ITEM_LEVEL_COUPON = "item_level_coupon" DOCUMENT_LEVEL_COUPON = "document_level_coupon" PROMOTIONAL_CREDITS = "promotional_credits" @@ -61,6 +55,13 @@ class LineItemDiscountDiscountType(Enum): def __str__(self): return self.value + class DiscountDiscountType(Enum): + FIXED_AMOUNT = "fixed_amount" + PERCENTAGE = "percentage" + + def __str__(self): + return self.value + class LineItem(TypedDict): id: NotRequired[str] subscription_id: NotRequired[str] @@ -88,14 +89,6 @@ class LineItem(TypedDict): entity_id: NotRequired[str] customer_id: NotRequired[str] - class Discount(TypedDict): - amount: Required[int] - description: NotRequired[str] - entity_type: Required["QuoteLineGroup.DiscountEntityType"] - discount_type: NotRequired["QuoteLineGroup.DiscountDiscountType"] - entity_id: NotRequired[str] - coupon_set_code: NotRequired[str] - class LineItemDiscount(TypedDict): line_item_id: Required[str] discount_type: Required["QuoteLineGroup.LineItemDiscountDiscountType"] @@ -103,11 +96,6 @@ class LineItemDiscount(TypedDict): entity_id: NotRequired[str] discount_amount: Required[int] - class Tax(TypedDict): - name: Required[str] - amount: Required[int] - description: NotRequired[str] - class LineItemTax(TypedDict): line_item_id: NotRequired[str] tax_name: Required[str] @@ -125,4 +113,17 @@ class LineItemTax(TypedDict): tax_amount_in_local_currency: NotRequired[int] local_currency_code: NotRequired[str] + class Discount(TypedDict): + amount: Required[int] + description: NotRequired[str] + entity_type: Required["QuoteLineGroup.DiscountEntityType"] + discount_type: NotRequired["QuoteLineGroup.DiscountDiscountType"] + entity_id: NotRequired[str] + coupon_set_code: NotRequired[str] + + class Tax(TypedDict): + name: Required[str] + amount: Required[int] + description: NotRequired[str] + pass diff --git a/chargebee/models/quote_line_group/responses.py b/chargebee/models/quote_line_group/responses.py index 0e48cb3..834c541 100644 --- a/chargebee/models/quote_line_group/responses.py +++ b/chargebee/models/quote_line_group/responses.py @@ -33,17 +33,6 @@ class LineItemResponse(Model): customer_id: str = None -@dataclass -class DiscountResponse(Model): - raw_data: Dict[Any, Any] = None - amount: int = None - description: str = None - entity_type: str = None - discount_type: str = None - entity_id: str = None - coupon_set_code: str = None - - @dataclass class LineItemDiscountResponse(Model): raw_data: Dict[Any, Any] = None @@ -54,14 +43,6 @@ class LineItemDiscountResponse(Model): discount_amount: int = None -@dataclass -class TaxResponse(Model): - raw_data: Dict[Any, Any] = None - name: str = None - amount: int = None - description: str = None - - @dataclass class LineItemTaxResponse(Model): raw_data: Dict[Any, Any] = None @@ -82,6 +63,25 @@ class LineItemTaxResponse(Model): local_currency_code: str = None +@dataclass +class DiscountResponse(Model): + raw_data: Dict[Any, Any] = None + amount: int = None + description: str = None + entity_type: str = None + discount_type: str = None + entity_id: str = None + coupon_set_code: str = None + + +@dataclass +class TaxResponse(Model): + raw_data: Dict[Any, Any] = None + name: str = None + amount: int = None + description: str = None + + @dataclass class QuoteLineGroupResponse(Model): raw_data: Dict[Any, Any] = None @@ -95,7 +95,7 @@ class QuoteLineGroupResponse(Model): charge_event: str = None billing_cycle_number: int = None line_items: List[LineItemResponse] = None - discounts: List[DiscountResponse] = None line_item_discounts: List[LineItemDiscountResponse] = None - taxes: List[TaxResponse] = None line_item_taxes: List[LineItemTaxResponse] = None + discounts: List[DiscountResponse] = None + taxes: List[TaxResponse] = None diff --git a/chargebee/models/quoted_charge/operations.py b/chargebee/models/quoted_charge/operations.py index 291d3b5..9ff4c3c 100644 --- a/chargebee/models/quoted_charge/operations.py +++ b/chargebee/models/quoted_charge/operations.py @@ -6,6 +6,7 @@ @dataclass class QuotedCharge: + env: environment.Environment class Charge(TypedDict): diff --git a/chargebee/models/quoted_ramp/operations.py b/chargebee/models/quoted_ramp/operations.py index 3dabc42..3326cea 100644 --- a/chargebee/models/quoted_ramp/operations.py +++ b/chargebee/models/quoted_ramp/operations.py @@ -7,6 +7,7 @@ @dataclass class QuotedRamp: + env: environment.Environment class DiscountType(Enum): diff --git a/chargebee/models/quoted_subscription/operations.py b/chargebee/models/quoted_subscription/operations.py index 1c8589e..6c47071 100644 --- a/chargebee/models/quoted_subscription/operations.py +++ b/chargebee/models/quoted_subscription/operations.py @@ -7,6 +7,7 @@ @dataclass class QuotedSubscription: + env: environment.Environment class ChangeOption(Enum): diff --git a/chargebee/models/ramp/operations.py b/chargebee/models/ramp/operations.py index 267f476..0f2f1cc 100644 --- a/chargebee/models/ramp/operations.py +++ b/chargebee/models/ramp/operations.py @@ -8,6 +8,7 @@ @dataclass class Ramp: + env: environment.Environment class Status(Enum): @@ -26,6 +27,15 @@ class DiscountsToAddType(Enum): def __str__(self): return self.value + class ContractTermActionAtTermEnd(Enum): + RENEW = "renew" + EVERGREEN = "evergreen" + CANCEL = "cancel" + RENEW_ONCE = "renew_once" + + def __str__(self): + return self.value + class ItemsToAdd(TypedDict): item_price_id: Required[str] item_type: Required[enums.ItemType] @@ -40,6 +50,9 @@ class ItemsToAdd(TypedDict): billing_cycles: NotRequired[int] service_period_days: NotRequired[int] metered_quantity: NotRequired[str] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] + charge_on_event: NotRequired[enums.ChargeOnEvent] class ItemsToUpdate(TypedDict): item_price_id: Required[str] @@ -55,6 +68,9 @@ class ItemsToUpdate(TypedDict): billing_cycles: NotRequired[int] service_period_days: NotRequired[int] metered_quantity: NotRequired[str] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] + charge_on_event: NotRequired[enums.ChargeOnEvent] class CouponsToAdd(TypedDict): coupon_id: Required[str] @@ -86,6 +102,11 @@ class ItemTier(TypedDict): package_size: NotRequired[int] index: Required[int] + class ContractTerm(TypedDict): + cancellation_cutoff_period: NotRequired[int] + renewal_billing_cycles: NotRequired[int] + action_at_term_end: Required["Ramp.ContractTermActionAtTermEnd"] + class StatusTransitionReason(TypedDict): code: NotRequired[str] message: NotRequired[str] @@ -98,6 +119,9 @@ class CreateForSubscriptionItemsToAddParams(TypedDict): unit_price_in_decimal: NotRequired[str] billing_cycles: NotRequired[int] service_period_days: NotRequired[int] + charge_on_event: NotRequired[enums.ChargeOnEvent] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] class CreateForSubscriptionItemsToUpdateParams(TypedDict): item_price_id: Required[str] @@ -107,6 +131,9 @@ class CreateForSubscriptionItemsToUpdateParams(TypedDict): unit_price_in_decimal: NotRequired[str] billing_cycles: NotRequired[int] service_period_days: NotRequired[int] + charge_on_event: NotRequired[enums.ChargeOnEvent] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] class CreateForSubscriptionItemTierParams(TypedDict): item_price_id: NotRequired[str] @@ -133,6 +160,11 @@ class CreateForSubscriptionDiscountsToAddParams(TypedDict): included_in_mrr: NotRequired[bool] item_price_id: NotRequired[str] + class CreateForSubscriptionContractTermParams(TypedDict): + action_at_term_end: NotRequired["Ramp.ContractTermActionAtTermEnd"] + cancellation_cutoff_period: NotRequired[int] + renewal_billing_cycles: NotRequired[int] + class UpdateItemsToAddParams(TypedDict): item_price_id: Required[str] quantity: NotRequired[int] @@ -141,6 +173,9 @@ class UpdateItemsToAddParams(TypedDict): unit_price_in_decimal: NotRequired[str] billing_cycles: NotRequired[int] service_period_days: NotRequired[int] + charge_on_event: NotRequired[enums.ChargeOnEvent] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] class UpdateItemsToUpdateParams(TypedDict): item_price_id: Required[str] @@ -150,6 +185,9 @@ class UpdateItemsToUpdateParams(TypedDict): unit_price_in_decimal: NotRequired[str] billing_cycles: NotRequired[int] service_period_days: NotRequired[int] + charge_on_event: NotRequired[enums.ChargeOnEvent] + charge_once: NotRequired[bool] + charge_on_option: NotRequired[enums.ChargeOnOption] class UpdateItemTierParams(TypedDict): item_price_id: NotRequired[str] @@ -176,6 +214,11 @@ class UpdateDiscountsToAddParams(TypedDict): included_in_mrr: NotRequired[bool] item_price_id: NotRequired[str] + class UpdateContractTermParams(TypedDict): + action_at_term_end: NotRequired["Ramp.ContractTermActionAtTermEnd"] + cancellation_cutoff_period: NotRequired[int] + renewal_billing_cycles: NotRequired[int] + class CreateForSubscriptionParams(TypedDict): effective_from: Required[int] description: NotRequired[str] @@ -191,6 +234,7 @@ class CreateForSubscriptionParams(TypedDict): discounts_to_add: Required[ List["Ramp.CreateForSubscriptionDiscountsToAddParams"] ] + contract_term: NotRequired["Ramp.CreateForSubscriptionContractTermParams"] class UpdateParams(TypedDict): effective_from: Required[int] @@ -203,6 +247,7 @@ class UpdateParams(TypedDict): item_tiers: NotRequired[List["Ramp.UpdateItemTierParams"]] coupons_to_add: NotRequired[List["Ramp.UpdateCouponsToAddParams"]] discounts_to_add: Required[List["Ramp.UpdateDiscountsToAddParams"]] + contract_term: NotRequired["Ramp.UpdateContractTermParams"] class ListParams(TypedDict): limit: NotRequired[int] diff --git a/chargebee/models/ramp/responses.py b/chargebee/models/ramp/responses.py index aabf610..6268e5d 100644 --- a/chargebee/models/ramp/responses.py +++ b/chargebee/models/ramp/responses.py @@ -20,6 +20,9 @@ class ItemsToAddResponse(Model): billing_cycles: int = None service_period_days: int = None metered_quantity: str = None + charge_once: bool = None + charge_on_option: str = None + charge_on_event: str = None @dataclass @@ -38,6 +41,9 @@ class ItemsToUpdateResponse(Model): billing_cycles: int = None service_period_days: int = None metered_quantity: str = None + charge_once: bool = None + charge_on_option: str = None + charge_on_event: str = None @dataclass @@ -79,6 +85,14 @@ class ItemTierResponse(Model): index: int = None +@dataclass +class ContractTermResponse(Model): + raw_data: Dict[Any, Any] = None + cancellation_cutoff_period: int = None + renewal_billing_cycles: int = None + action_at_term_end: str = None + + @dataclass class StatusTransitionReasonResponse(Model): raw_data: Dict[Any, Any] = None @@ -105,6 +119,7 @@ class RampResponse(Model): items_to_remove: List[str] = None coupons_to_remove: List[str] = None discounts_to_remove: List[str] = None + contract_term: ContractTermResponse = None deleted: bool = None status_transition_reason: StatusTransitionReasonResponse = None @@ -123,6 +138,7 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): + ramp: RampResponse @@ -139,5 +155,6 @@ class ListRampResponse: @dataclass class ListResponse(Response): + list: List[ListRampResponse] next_offset: str = None diff --git a/chargebee/models/recorded_purchase/operations.py b/chargebee/models/recorded_purchase/operations.py index ae35e46..94b1473 100644 --- a/chargebee/models/recorded_purchase/operations.py +++ b/chargebee/models/recorded_purchase/operations.py @@ -6,6 +6,7 @@ @dataclass class RecordedPurchase: + env: environment.Environment class Source(Enum): diff --git a/chargebee/models/recorded_purchase/responses.py b/chargebee/models/recorded_purchase/responses.py index b98cc99..7eb982c 100644 --- a/chargebee/models/recorded_purchase/responses.py +++ b/chargebee/models/recorded_purchase/responses.py @@ -50,4 +50,5 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + recorded_purchase: RecordedPurchaseResponse diff --git a/chargebee/models/resource_migration/operations.py b/chargebee/models/resource_migration/operations.py index 048a43e..fc89d1a 100644 --- a/chargebee/models/resource_migration/operations.py +++ b/chargebee/models/resource_migration/operations.py @@ -7,6 +7,7 @@ @dataclass class ResourceMigration: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/resource_migration/responses.py b/chargebee/models/resource_migration/responses.py index f20fcbf..05664a6 100644 --- a/chargebee/models/resource_migration/responses.py +++ b/chargebee/models/resource_migration/responses.py @@ -18,4 +18,5 @@ class ResourceMigrationResponse(Model): @dataclass class RetrieveLatestResponse(Response): + resource_migration: ResourceMigrationResponse diff --git a/chargebee/models/rule/operations.py b/chargebee/models/rule/operations.py index ef5c7f3..b4948ba 100644 --- a/chargebee/models/rule/operations.py +++ b/chargebee/models/rule/operations.py @@ -6,6 +6,7 @@ @dataclass class Rule: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/rule/responses.py b/chargebee/models/rule/responses.py index 17789ea..f56b701 100644 --- a/chargebee/models/rule/responses.py +++ b/chargebee/models/rule/responses.py @@ -21,4 +21,5 @@ class RuleResponse(Model): @dataclass class RetrieveResponse(Response): + rule: RuleResponse diff --git a/chargebee/models/site_migration_detail/operations.py b/chargebee/models/site_migration_detail/operations.py index 8754e01..cf0adc9 100644 --- a/chargebee/models/site_migration_detail/operations.py +++ b/chargebee/models/site_migration_detail/operations.py @@ -7,6 +7,7 @@ @dataclass class SiteMigrationDetail: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/site_migration_detail/responses.py b/chargebee/models/site_migration_detail/responses.py index bfddcba..b853b42 100644 --- a/chargebee/models/site_migration_detail/responses.py +++ b/chargebee/models/site_migration_detail/responses.py @@ -22,5 +22,6 @@ class ListSiteMigrationDetailResponse: @dataclass class ListResponse(Response): + list: List[ListSiteMigrationDetailResponse] next_offset: str = None diff --git a/chargebee/models/subscription/operations.py b/chargebee/models/subscription/operations.py index 710ce7c..3a67fcd 100644 --- a/chargebee/models/subscription/operations.py +++ b/chargebee/models/subscription/operations.py @@ -8,6 +8,7 @@ @dataclass class Subscription: + env: environment.Environment class Status(Enum): @@ -143,7 +144,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class ReferralInfo(TypedDict): referral_code: NotRequired[str] @@ -1275,6 +1275,7 @@ class CreateWithItemsParams(TypedDict): auto_collection: NotRequired[enums.AutoCollection] terms_to_charge: NotRequired[int] billing_alignment_mode: NotRequired[enums.BillingAlignmentMode] + offline_payment_method: NotRequired[enums.OfflinePaymentMethod] po_number: NotRequired[str] coupon_ids: NotRequired[List[str]] payment_source_id: NotRequired[str] diff --git a/chargebee/models/subscription/responses.py b/chargebee/models/subscription/responses.py index 76ee046..4fe9ed9 100644 --- a/chargebee/models/subscription/responses.py +++ b/chargebee/models/subscription/responses.py @@ -98,7 +98,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass @@ -324,6 +323,7 @@ class ListSubscriptionResponse: @dataclass class ListResponse(Response): + list: List[ListSubscriptionResponse] next_offset: str = None @@ -335,6 +335,7 @@ class SubscriptionsForCustomerSubscriptionResponse: @dataclass class SubscriptionsForCustomerResponse(Response): + list: List[SubscriptionsForCustomerSubscriptionResponse] next_offset: str = None @@ -346,6 +347,7 @@ class ContractTermsForSubscriptionSubscriptionResponse: @dataclass class ContractTermsForSubscriptionResponse(Response): + list: List[ContractTermsForSubscriptionSubscriptionResponse] next_offset: str = None @@ -357,12 +359,14 @@ class ListDiscountsSubscriptionResponse: @dataclass class ListDiscountsResponse(Response): + list: List[ListDiscountsSubscriptionResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + subscription: SubscriptionResponse customer: "customer.CustomerResponse" card: "card.CardResponse" = None @@ -370,6 +374,7 @@ class RetrieveResponse(Response): @dataclass class RetrieveWithScheduledChangesResponse(Response): + subscription: SubscriptionResponse customer: "customer.CustomerResponse" card: "card.CardResponse" = None @@ -477,6 +482,7 @@ class EditAdvanceInvoiceScheduleResponse(Response): @dataclass class RetrieveAdvanceInvoiceScheduleResponse(Response): + advance_invoice_schedules: List[ "advance_invoice_schedule.AdvanceInvoiceScheduleResponse" ] diff --git a/chargebee/models/subscription_entitlement/operations.py b/chargebee/models/subscription_entitlement/operations.py index 8d97836..d2500d2 100644 --- a/chargebee/models/subscription_entitlement/operations.py +++ b/chargebee/models/subscription_entitlement/operations.py @@ -7,6 +7,7 @@ @dataclass class SubscriptionEntitlement: + env: environment.Environment class ScheduleStatus(Enum): diff --git a/chargebee/models/subscription_entitlement/responses.py b/chargebee/models/subscription_entitlement/responses.py index ce7ba78..8ea7919 100644 --- a/chargebee/models/subscription_entitlement/responses.py +++ b/chargebee/models/subscription_entitlement/responses.py @@ -36,6 +36,7 @@ class SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementResponse: @dataclass class SubscriptionEntitlementsForSubscriptionResponse(Response): + list: List[SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/subscription_entitlements_created_detail/operations.py b/chargebee/models/subscription_entitlements_created_detail/operations.py index 663a410..3e89867 100644 --- a/chargebee/models/subscription_entitlements_created_detail/operations.py +++ b/chargebee/models/subscription_entitlements_created_detail/operations.py @@ -5,6 +5,7 @@ @dataclass class SubscriptionEntitlementsCreatedDetail: + env: environment.Environment pass diff --git a/chargebee/models/subscription_entitlements_updated_detail/operations.py b/chargebee/models/subscription_entitlements_updated_detail/operations.py index fb998c4..6123c74 100644 --- a/chargebee/models/subscription_entitlements_updated_detail/operations.py +++ b/chargebee/models/subscription_entitlements_updated_detail/operations.py @@ -5,6 +5,7 @@ @dataclass class SubscriptionEntitlementsUpdatedDetail: + env: environment.Environment pass diff --git a/chargebee/models/subscription_estimate/operations.py b/chargebee/models/subscription_estimate/operations.py index a225559..b18f3a8 100644 --- a/chargebee/models/subscription_estimate/operations.py +++ b/chargebee/models/subscription_estimate/operations.py @@ -7,6 +7,7 @@ @dataclass class SubscriptionEstimate: + env: environment.Environment class Status(Enum): @@ -54,7 +55,6 @@ class ShippingAddress(TypedDict): country: NotRequired[str] zip: NotRequired[str] validation_status: NotRequired[enums.ValidationStatus] - index: Required[int] class ContractTerm(TypedDict): id: Required[str] diff --git a/chargebee/models/subscription_estimate/responses.py b/chargebee/models/subscription_estimate/responses.py index a46fb16..2786429 100644 --- a/chargebee/models/subscription_estimate/responses.py +++ b/chargebee/models/subscription_estimate/responses.py @@ -20,7 +20,6 @@ class ShippingAddressResponse(Model): country: str = None zip: str = None validation_status: str = None - index: int = None @dataclass diff --git a/chargebee/models/tax_withheld/operations.py b/chargebee/models/tax_withheld/operations.py index 4148493..c015415 100644 --- a/chargebee/models/tax_withheld/operations.py +++ b/chargebee/models/tax_withheld/operations.py @@ -6,6 +6,7 @@ @dataclass class TaxWithheld: + env: environment.Environment class Type(Enum): diff --git a/chargebee/models/third_party_payment_method/operations.py b/chargebee/models/third_party_payment_method/operations.py index 19ae517..cae87f6 100644 --- a/chargebee/models/third_party_payment_method/operations.py +++ b/chargebee/models/third_party_payment_method/operations.py @@ -5,6 +5,7 @@ @dataclass class ThirdPartyPaymentMethod: + env: environment.Environment pass diff --git a/chargebee/models/time_machine/operations.py b/chargebee/models/time_machine/operations.py index 9d237c2..85dee7c 100644 --- a/chargebee/models/time_machine/operations.py +++ b/chargebee/models/time_machine/operations.py @@ -8,6 +8,7 @@ @dataclass class TimeMachine: + env: environment.Environment class TimeTravelStatus(Enum): diff --git a/chargebee/models/time_machine/responses.py b/chargebee/models/time_machine/responses.py index 81fce37..e35b89a 100644 --- a/chargebee/models/time_machine/responses.py +++ b/chargebee/models/time_machine/responses.py @@ -18,6 +18,7 @@ class TimeMachineResponse(Model): @dataclass class RetrieveResponse(Response): + time_machine: TimeMachineResponse diff --git a/chargebee/models/token/operations.py b/chargebee/models/token/operations.py index 171926a..b1e3681 100644 --- a/chargebee/models/token/operations.py +++ b/chargebee/models/token/operations.py @@ -6,6 +6,7 @@ @dataclass class Token: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/transaction/operations.py b/chargebee/models/transaction/operations.py index 4843ac6..4527489 100644 --- a/chargebee/models/transaction/operations.py +++ b/chargebee/models/transaction/operations.py @@ -8,6 +8,7 @@ @dataclass class Transaction: + env: environment.Environment class Type(Enum): @@ -111,6 +112,7 @@ class GatewayErrorDetail(TypedDict): processor_error_code: NotRequired[str] processor_error_message: NotRequired[str] error_cause_id: NotRequired[str] + processor_advice_code: NotRequired[str] class CreateAuthorizationParams(TypedDict): customer_id: Required[str] diff --git a/chargebee/models/transaction/responses.py b/chargebee/models/transaction/responses.py index f57f8fd..77762fe 100644 --- a/chargebee/models/transaction/responses.py +++ b/chargebee/models/transaction/responses.py @@ -65,6 +65,7 @@ class GatewayErrorDetailResponse(Model): processor_error_code: str = None processor_error_message: str = None error_cause_id: str = None + processor_advice_code: str = None @dataclass @@ -155,6 +156,7 @@ class ListTransactionResponse: @dataclass class ListResponse(Response): + list: List[ListTransactionResponse] next_offset: str = None @@ -166,6 +168,7 @@ class TransactionsForCustomerTransactionResponse: @dataclass class TransactionsForCustomerResponse(Response): + list: List[TransactionsForCustomerTransactionResponse] next_offset: str = None @@ -177,6 +180,7 @@ class TransactionsForSubscriptionTransactionResponse: @dataclass class TransactionsForSubscriptionResponse(Response): + list: List[TransactionsForSubscriptionTransactionResponse] next_offset: str = None @@ -188,12 +192,14 @@ class PaymentsForInvoiceTransactionResponse: @dataclass class PaymentsForInvoiceResponse(Response): + list: List[PaymentsForInvoiceTransactionResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): + transaction: TransactionResponse diff --git a/chargebee/models/unbilled_charge/operations.py b/chargebee/models/unbilled_charge/operations.py index 40b396e..87c7ef0 100644 --- a/chargebee/models/unbilled_charge/operations.py +++ b/chargebee/models/unbilled_charge/operations.py @@ -8,6 +8,7 @@ @dataclass class UnbilledCharge: + env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/unbilled_charge/responses.py b/chargebee/models/unbilled_charge/responses.py index 182657a..22fbacf 100644 --- a/chargebee/models/unbilled_charge/responses.py +++ b/chargebee/models/unbilled_charge/responses.py @@ -80,6 +80,7 @@ class ListUnbilledChargeResponse: @dataclass class ListResponse(Response): + list: List[ListUnbilledChargeResponse] next_offset: str = None diff --git a/chargebee/models/usage/operations.py b/chargebee/models/usage/operations.py index c649449..34f471c 100644 --- a/chargebee/models/usage/operations.py +++ b/chargebee/models/usage/operations.py @@ -7,6 +7,7 @@ @dataclass class Usage: + env: environment.Environment class PdfInvoiceParams(TypedDict): diff --git a/chargebee/models/usage/responses.py b/chargebee/models/usage/responses.py index 7627776..7b2a1db 100644 --- a/chargebee/models/usage/responses.py +++ b/chargebee/models/usage/responses.py @@ -30,6 +30,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + usage: UsageResponse @@ -46,6 +47,7 @@ class ListUsageResponse: @dataclass class ListResponse(Response): + list: List[ListUsageResponse] next_offset: str = None diff --git a/chargebee/models/usage_event/operations.py b/chargebee/models/usage_event/operations.py index 989bbca..de26d2c 100644 --- a/chargebee/models/usage_event/operations.py +++ b/chargebee/models/usage_event/operations.py @@ -5,6 +5,7 @@ @dataclass class UsageEvent: + env: environment.Environment class BatchIngestEventParams(TypedDict): diff --git a/chargebee/models/usage_file/operations.py b/chargebee/models/usage_file/operations.py index 10a9907..0693f90 100644 --- a/chargebee/models/usage_file/operations.py +++ b/chargebee/models/usage_file/operations.py @@ -6,6 +6,7 @@ @dataclass class UsageFile: + env: environment.Environment class Status(Enum): diff --git a/chargebee/models/usage_file/responses.py b/chargebee/models/usage_file/responses.py index d05fdb8..df87475 100644 --- a/chargebee/models/usage_file/responses.py +++ b/chargebee/models/usage_file/responses.py @@ -28,6 +28,8 @@ class UsageFileResponse(Model): processing_completed_at: int = None uploaded_by: str = None uploaded_at: int = None + error_file_path: str = None + error_file_url: str = None upload_details: UploadDetailResponse = None @@ -39,4 +41,5 @@ class UploadUrlResponse(Response): @dataclass class ProcessingStatusResponse(Response): + usage_file: UsageFileResponse diff --git a/chargebee/models/virtual_bank_account/operations.py b/chargebee/models/virtual_bank_account/operations.py index 6aff2f2..68884f6 100644 --- a/chargebee/models/virtual_bank_account/operations.py +++ b/chargebee/models/virtual_bank_account/operations.py @@ -7,6 +7,7 @@ @dataclass class VirtualBankAccount: + env: environment.Environment class Scheme(Enum): diff --git a/chargebee/models/virtual_bank_account/responses.py b/chargebee/models/virtual_bank_account/responses.py index 93ace82..8a67041 100644 --- a/chargebee/models/virtual_bank_account/responses.py +++ b/chargebee/models/virtual_bank_account/responses.py @@ -41,6 +41,7 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): + virtual_bank_account: VirtualBankAccountResponse @@ -51,6 +52,7 @@ class ListVirtualBankAccountResponse: @dataclass class ListResponse(Response): + list: List[ListVirtualBankAccountResponse] next_offset: str = None diff --git a/chargebee/models/webhook_endpoint/operations.py b/chargebee/models/webhook_endpoint/operations.py index 9533aa7..f410665 100644 --- a/chargebee/models/webhook_endpoint/operations.py +++ b/chargebee/models/webhook_endpoint/operations.py @@ -7,6 +7,7 @@ @dataclass class WebhookEndpoint: + env: environment.Environment class ApiVersion(Enum): diff --git a/chargebee/models/webhook_endpoint/responses.py b/chargebee/models/webhook_endpoint/responses.py index 02e619c..8a48a52 100644 --- a/chargebee/models/webhook_endpoint/responses.py +++ b/chargebee/models/webhook_endpoint/responses.py @@ -32,6 +32,7 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): + webhook_endpoint: WebhookEndpointResponse @@ -48,5 +49,6 @@ class ListWebhookEndpointResponse: @dataclass class ListResponse(Response): + list: List[ListWebhookEndpointResponse] next_offset: str = None diff --git a/chargebee/request.py b/chargebee/request.py index 7422b6a..6b6b610 100644 --- a/chargebee/request.py +++ b/chargebee/request.py @@ -70,9 +70,7 @@ def send( params = {} ser_params = ( - params - if isJsonRequest - else util.serialize(params, None, None, jsonKeys) + params if isJsonRequest else util.serialize(params, None, None, jsonKeys) ) request_args = { diff --git a/chargebee/version.py b/chargebee/version.py index 41994af..7ce5c1b 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = "3.11.0" +VERSION = "3.12.0" From 81a0d7721407c707b727d36c5abaf0d972bf0b21 Mon Sep 17 00:00:00 2001 From: Srinath Sankar Date: Thu, 25 Sep 2025 13:43:36 +1000 Subject: [PATCH 2/2] uvx ruff format --- chargebee/api_error.py | 1 - chargebee/main.py | 1 - chargebee/models/addon/operations.py | 1 - chargebee/models/addon/responses.py | 2 -- chargebee/models/address/operations.py | 1 - chargebee/models/address/responses.py | 1 - chargebee/models/advance_invoice_schedule/operations.py | 1 - chargebee/models/attached_item/operations.py | 1 - chargebee/models/attached_item/responses.py | 2 -- chargebee/models/attribute/operations.py | 1 - chargebee/models/billing_configuration/operations.py | 1 - chargebee/models/brand/operations.py | 1 - chargebee/models/business_entity/operations.py | 1 - chargebee/models/business_entity/responses.py | 1 - chargebee/models/business_entity_transfer/operations.py | 1 - chargebee/models/card/operations.py | 1 - chargebee/models/card/responses.py | 1 - chargebee/models/comment/operations.py | 1 - chargebee/models/comment/responses.py | 2 -- chargebee/models/configuration/operations.py | 1 - chargebee/models/configuration/responses.py | 1 - chargebee/models/contact/operations.py | 1 - chargebee/models/contract_term/operations.py | 1 - chargebee/models/coupon/operations.py | 1 - chargebee/models/coupon/responses.py | 2 -- chargebee/models/coupon_code/operations.py | 1 - chargebee/models/coupon_code/responses.py | 2 -- chargebee/models/coupon_set/operations.py | 1 - chargebee/models/coupon_set/responses.py | 2 -- chargebee/models/credit_note/operations.py | 1 - chargebee/models/credit_note/responses.py | 4 ---- chargebee/models/credit_note_estimate/operations.py | 1 - chargebee/models/currency/operations.py | 1 - chargebee/models/currency/responses.py | 2 -- chargebee/models/customer/operations.py | 1 - chargebee/models/customer/responses.py | 5 ----- chargebee/models/customer_entitlement/operations.py | 1 - chargebee/models/customer_entitlement/responses.py | 1 - chargebee/models/differential_price/operations.py | 1 - chargebee/models/differential_price/responses.py | 2 -- chargebee/models/discount/operations.py | 1 - chargebee/models/download/operations.py | 1 - chargebee/models/entitlement/operations.py | 1 - chargebee/models/entitlement/responses.py | 1 - chargebee/models/entitlement_override/operations.py | 1 - chargebee/models/entitlement_override/responses.py | 1 - chargebee/models/estimate/operations.py | 1 - chargebee/models/estimate/responses.py | 3 --- chargebee/models/event/operations.py | 1 - chargebee/models/event/responses.py | 2 -- chargebee/models/export/operations.py | 1 - chargebee/models/export/responses.py | 1 - chargebee/models/feature/operations.py | 1 - chargebee/models/feature/responses.py | 2 -- chargebee/models/gateway_error_detail/operations.py | 1 - chargebee/models/gift/operations.py | 1 - chargebee/models/gift/responses.py | 2 -- chargebee/models/hierarchy/operations.py | 1 - chargebee/models/hosted_page/operations.py | 1 - chargebee/models/hosted_page/responses.py | 2 -- chargebee/models/impacted_customer/operations.py | 1 - chargebee/models/impacted_item/operations.py | 1 - chargebee/models/impacted_item_price/operations.py | 1 - chargebee/models/impacted_subscription/operations.py | 1 - chargebee/models/in_app_subscription/operations.py | 1 - chargebee/models/invoice/operations.py | 1 - chargebee/models/invoice/responses.py | 7 ------- chargebee/models/invoice_estimate/operations.py | 1 - chargebee/models/item/operations.py | 1 - chargebee/models/item/responses.py | 2 -- chargebee/models/item_entitlement/operations.py | 1 - chargebee/models/item_entitlement/responses.py | 2 -- chargebee/models/item_family/operations.py | 1 - chargebee/models/item_family/responses.py | 2 -- chargebee/models/item_price/operations.py | 1 - chargebee/models/item_price/responses.py | 4 ---- chargebee/models/metadata/operations.py | 1 - chargebee/models/offer_event/operations.py | 1 - chargebee/models/offer_fulfillment/operations.py | 1 - chargebee/models/offer_fulfillment/responses.py | 1 - chargebee/models/omnichannel_one_time_order/operations.py | 1 - chargebee/models/omnichannel_one_time_order/responses.py | 2 -- .../models/omnichannel_one_time_order_item/operations.py | 1 - chargebee/models/omnichannel_subscription/operations.py | 1 - chargebee/models/omnichannel_subscription/responses.py | 7 +------ .../models/omnichannel_subscription_item/operations.py | 1 - .../models/omnichannel_subscription_item/responses.py | 1 - .../omnichannel_subscription_item_offer/operations.py | 1 - .../operations.py | 1 - chargebee/models/omnichannel_transaction/operations.py | 1 - chargebee/models/order/operations.py | 1 - chargebee/models/order/responses.py | 3 --- chargebee/models/payment_intent/operations.py | 1 - chargebee/models/payment_intent/responses.py | 1 - chargebee/models/payment_reference_number/operations.py | 1 - chargebee/models/payment_schedule/operations.py | 1 - chargebee/models/payment_schedule_estimate/operations.py | 1 - chargebee/models/payment_schedule_scheme/operations.py | 1 - chargebee/models/payment_schedule_scheme/responses.py | 1 - chargebee/models/payment_source/operations.py | 1 - chargebee/models/payment_source/responses.py | 2 -- chargebee/models/payment_voucher/operations.py | 1 - chargebee/models/payment_voucher/responses.py | 3 --- chargebee/models/personalized_offer/operations.py | 1 - chargebee/models/plan/operations.py | 1 - chargebee/models/plan/responses.py | 2 -- chargebee/models/portal_session/operations.py | 1 - chargebee/models/portal_session/responses.py | 1 - chargebee/models/price_variant/operations.py | 1 - chargebee/models/price_variant/responses.py | 2 -- chargebee/models/pricing_page_session/operations.py | 1 - chargebee/models/promotional_credit/operations.py | 1 - chargebee/models/promotional_credit/responses.py | 2 -- chargebee/models/purchase/operations.py | 1 - chargebee/models/quote/operations.py | 1 - chargebee/models/quote/responses.py | 3 --- chargebee/models/quote_line_group/operations.py | 1 - chargebee/models/quoted_charge/operations.py | 1 - chargebee/models/quoted_ramp/operations.py | 1 - chargebee/models/quoted_subscription/operations.py | 1 - chargebee/models/ramp/operations.py | 1 - chargebee/models/ramp/responses.py | 2 -- chargebee/models/recorded_purchase/operations.py | 1 - chargebee/models/recorded_purchase/responses.py | 1 - chargebee/models/resource_migration/operations.py | 1 - chargebee/models/resource_migration/responses.py | 1 - chargebee/models/rule/operations.py | 1 - chargebee/models/rule/responses.py | 1 - chargebee/models/site_migration_detail/operations.py | 1 - chargebee/models/site_migration_detail/responses.py | 1 - chargebee/models/subscription/operations.py | 1 - chargebee/models/subscription/responses.py | 7 ------- chargebee/models/subscription_entitlement/operations.py | 1 - chargebee/models/subscription_entitlement/responses.py | 1 - .../subscription_entitlements_created_detail/operations.py | 1 - .../subscription_entitlements_updated_detail/operations.py | 1 - chargebee/models/subscription_estimate/operations.py | 1 - chargebee/models/tax_withheld/operations.py | 1 - chargebee/models/third_party_payment_method/operations.py | 1 - chargebee/models/time_machine/operations.py | 1 - chargebee/models/time_machine/responses.py | 1 - chargebee/models/token/operations.py | 1 - chargebee/models/transaction/operations.py | 1 - chargebee/models/transaction/responses.py | 5 ----- chargebee/models/unbilled_charge/operations.py | 1 - chargebee/models/unbilled_charge/responses.py | 1 - chargebee/models/usage/operations.py | 1 - chargebee/models/usage/responses.py | 2 -- chargebee/models/usage_event/operations.py | 1 - chargebee/models/usage_file/operations.py | 1 - chargebee/models/usage_file/responses.py | 1 - chargebee/models/virtual_bank_account/operations.py | 1 - chargebee/models/virtual_bank_account/responses.py | 2 -- chargebee/models/webhook_endpoint/operations.py | 1 - chargebee/models/webhook_endpoint/responses.py | 2 -- 155 files changed, 1 insertion(+), 218 deletions(-) diff --git a/chargebee/api_error.py b/chargebee/api_error.py index 053a324..aeabb3e 100644 --- a/chargebee/api_error.py +++ b/chargebee/api_error.py @@ -1,5 +1,4 @@ class APIError(Exception): - def __init__(self, http_code, json_obj, headers=None): Exception.__init__(self, json_obj.get("message")) self.json_obj = json_obj diff --git a/chargebee/main.py b/chargebee/main.py index a304e32..66109a2 100644 --- a/chargebee/main.py +++ b/chargebee/main.py @@ -7,7 +7,6 @@ @dataclass class Chargebee: - env: Environment = None idempotency_header: str = "chargebee-idempotency-key" diff --git a/chargebee/models/addon/operations.py b/chargebee/models/addon/operations.py index 4e04ba3..54b5677 100644 --- a/chargebee/models/addon/operations.py +++ b/chargebee/models/addon/operations.py @@ -8,7 +8,6 @@ @dataclass class Addon: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/addon/responses.py b/chargebee/models/addon/responses.py index ba2ecd4..2a5e75d 100644 --- a/chargebee/models/addon/responses.py +++ b/chargebee/models/addon/responses.py @@ -93,14 +93,12 @@ class ListAddonResponse: @dataclass class ListResponse(Response): - list: List[ListAddonResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - addon: AddonResponse diff --git a/chargebee/models/address/operations.py b/chargebee/models/address/operations.py index c0feeb1..130b6d6 100644 --- a/chargebee/models/address/operations.py +++ b/chargebee/models/address/operations.py @@ -6,7 +6,6 @@ @dataclass class Address: - env: environment.Environment class RetrieveParams(TypedDict): diff --git a/chargebee/models/address/responses.py b/chargebee/models/address/responses.py index 202f06e..cd7ad5d 100644 --- a/chargebee/models/address/responses.py +++ b/chargebee/models/address/responses.py @@ -27,7 +27,6 @@ class AddressResponse(Model): @dataclass class RetrieveResponse(Response): - address: AddressResponse diff --git a/chargebee/models/advance_invoice_schedule/operations.py b/chargebee/models/advance_invoice_schedule/operations.py index bf060be..2f60337 100644 --- a/chargebee/models/advance_invoice_schedule/operations.py +++ b/chargebee/models/advance_invoice_schedule/operations.py @@ -7,7 +7,6 @@ @dataclass class AdvanceInvoiceSchedule: - env: environment.Environment class ScheduleType(Enum): diff --git a/chargebee/models/attached_item/operations.py b/chargebee/models/attached_item/operations.py index 93dae6c..c15fc25 100644 --- a/chargebee/models/attached_item/operations.py +++ b/chargebee/models/attached_item/operations.py @@ -8,7 +8,6 @@ @dataclass class AttachedItem: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/attached_item/responses.py b/chargebee/models/attached_item/responses.py index 78b4a9f..fc1f57e 100644 --- a/chargebee/models/attached_item/responses.py +++ b/chargebee/models/attached_item/responses.py @@ -39,7 +39,6 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): - attached_item: AttachedItemResponse @@ -56,6 +55,5 @@ class ListAttachedItemResponse: @dataclass class ListResponse(Response): - list: List[ListAttachedItemResponse] next_offset: str = None diff --git a/chargebee/models/attribute/operations.py b/chargebee/models/attribute/operations.py index 4895d55..609e561 100644 --- a/chargebee/models/attribute/operations.py +++ b/chargebee/models/attribute/operations.py @@ -5,7 +5,6 @@ @dataclass class Attribute: - env: environment.Environment pass diff --git a/chargebee/models/billing_configuration/operations.py b/chargebee/models/billing_configuration/operations.py index fea0c73..9acd99b 100644 --- a/chargebee/models/billing_configuration/operations.py +++ b/chargebee/models/billing_configuration/operations.py @@ -5,7 +5,6 @@ @dataclass class BillingConfiguration: - env: environment.Environment class BillingDate(TypedDict): diff --git a/chargebee/models/brand/operations.py b/chargebee/models/brand/operations.py index f08f0d1..04d9c94 100644 --- a/chargebee/models/brand/operations.py +++ b/chargebee/models/brand/operations.py @@ -5,7 +5,6 @@ @dataclass class Brand: - env: environment.Environment pass diff --git a/chargebee/models/business_entity/operations.py b/chargebee/models/business_entity/operations.py index 2416b01..9ebb708 100644 --- a/chargebee/models/business_entity/operations.py +++ b/chargebee/models/business_entity/operations.py @@ -7,7 +7,6 @@ @dataclass class BusinessEntity: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/business_entity/responses.py b/chargebee/models/business_entity/responses.py index 0d207e8..750af65 100644 --- a/chargebee/models/business_entity/responses.py +++ b/chargebee/models/business_entity/responses.py @@ -30,6 +30,5 @@ class GetTransfersBusinessEntityResponse: @dataclass class GetTransfersResponse(Response): - list: List[GetTransfersBusinessEntityResponse] next_offset: str = None diff --git a/chargebee/models/business_entity_transfer/operations.py b/chargebee/models/business_entity_transfer/operations.py index e0eb6a9..96cebe8 100644 --- a/chargebee/models/business_entity_transfer/operations.py +++ b/chargebee/models/business_entity_transfer/operations.py @@ -6,7 +6,6 @@ @dataclass class BusinessEntityTransfer: - env: environment.Environment class ResourceType(Enum): diff --git a/chargebee/models/card/operations.py b/chargebee/models/card/operations.py index 3749d58..25d3e2e 100644 --- a/chargebee/models/card/operations.py +++ b/chargebee/models/card/operations.py @@ -7,7 +7,6 @@ @dataclass class Card: - env: environment.Environment class PreferredScheme(Enum): diff --git a/chargebee/models/card/responses.py b/chargebee/models/card/responses.py index c7820b4..2236b49 100644 --- a/chargebee/models/card/responses.py +++ b/chargebee/models/card/responses.py @@ -40,7 +40,6 @@ class CardResponse(Model): @dataclass class RetrieveResponse(Response): - card: CardResponse diff --git a/chargebee/models/comment/operations.py b/chargebee/models/comment/operations.py index e51aff1..5cc1075 100644 --- a/chargebee/models/comment/operations.py +++ b/chargebee/models/comment/operations.py @@ -8,7 +8,6 @@ @dataclass class Comment: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/comment/responses.py b/chargebee/models/comment/responses.py index 7c29d8e..5e9dd24 100644 --- a/chargebee/models/comment/responses.py +++ b/chargebee/models/comment/responses.py @@ -25,7 +25,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - comment: CommentResponse @@ -36,7 +35,6 @@ class ListCommentResponse: @dataclass class ListResponse(Response): - list: List[ListCommentResponse] next_offset: str = None diff --git a/chargebee/models/configuration/operations.py b/chargebee/models/configuration/operations.py index a422b0d..e79f871 100644 --- a/chargebee/models/configuration/operations.py +++ b/chargebee/models/configuration/operations.py @@ -5,7 +5,6 @@ @dataclass class Configuration: - env: environment.Environment def list(self, headers=None) -> ListResponse: diff --git a/chargebee/models/configuration/responses.py b/chargebee/models/configuration/responses.py index 3ca574a..13a183d 100644 --- a/chargebee/models/configuration/responses.py +++ b/chargebee/models/configuration/responses.py @@ -14,5 +14,4 @@ class ConfigurationResponse(Model): @dataclass class ListResponse(Response): - configurations: List[ConfigurationResponse] diff --git a/chargebee/models/contact/operations.py b/chargebee/models/contact/operations.py index 9418aee..fef8a0e 100644 --- a/chargebee/models/contact/operations.py +++ b/chargebee/models/contact/operations.py @@ -5,7 +5,6 @@ @dataclass class Contact: - env: environment.Environment pass diff --git a/chargebee/models/contract_term/operations.py b/chargebee/models/contract_term/operations.py index 17cb968..34b78d9 100644 --- a/chargebee/models/contract_term/operations.py +++ b/chargebee/models/contract_term/operations.py @@ -6,7 +6,6 @@ @dataclass class ContractTerm: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/coupon/operations.py b/chargebee/models/coupon/operations.py index 6246a8e..8d4e015 100644 --- a/chargebee/models/coupon/operations.py +++ b/chargebee/models/coupon/operations.py @@ -8,7 +8,6 @@ @dataclass class Coupon: - env: environment.Environment class DiscountType(Enum): diff --git a/chargebee/models/coupon/responses.py b/chargebee/models/coupon/responses.py index cae2d85..6f413f8 100644 --- a/chargebee/models/coupon/responses.py +++ b/chargebee/models/coupon/responses.py @@ -93,14 +93,12 @@ class ListCouponResponse: @dataclass class ListResponse(Response): - list: List[ListCouponResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - coupon: CouponResponse diff --git a/chargebee/models/coupon_code/operations.py b/chargebee/models/coupon_code/operations.py index 7ef3a6c..1d48651 100644 --- a/chargebee/models/coupon_code/operations.py +++ b/chargebee/models/coupon_code/operations.py @@ -7,7 +7,6 @@ @dataclass class CouponCode: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/coupon_code/responses.py b/chargebee/models/coupon_code/responses.py index 7d6241c..c0c962c 100644 --- a/chargebee/models/coupon_code/responses.py +++ b/chargebee/models/coupon_code/responses.py @@ -22,7 +22,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - coupon_code: CouponCodeResponse @@ -33,7 +32,6 @@ class ListCouponCodeResponse: @dataclass class ListResponse(Response): - list: List[ListCouponCodeResponse] next_offset: str = None diff --git a/chargebee/models/coupon_set/operations.py b/chargebee/models/coupon_set/operations.py index 9fca822..082522e 100644 --- a/chargebee/models/coupon_set/operations.py +++ b/chargebee/models/coupon_set/operations.py @@ -6,7 +6,6 @@ @dataclass class CouponSet: - env: environment.Environment class CreateParams(TypedDict): diff --git a/chargebee/models/coupon_set/responses.py b/chargebee/models/coupon_set/responses.py index eb5bc17..9c5a1f0 100644 --- a/chargebee/models/coupon_set/responses.py +++ b/chargebee/models/coupon_set/responses.py @@ -35,14 +35,12 @@ class ListCouponSetResponse: @dataclass class ListResponse(Response): - list: List[ListCouponSetResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - coupon_set: CouponSetResponse diff --git a/chargebee/models/credit_note/operations.py b/chargebee/models/credit_note/operations.py index cdb4198..a4775ee 100644 --- a/chargebee/models/credit_note/operations.py +++ b/chargebee/models/credit_note/operations.py @@ -8,7 +8,6 @@ @dataclass class CreditNote: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/credit_note/responses.py b/chargebee/models/credit_note/responses.py index 65fe94a..2e7b2b6 100644 --- a/chargebee/models/credit_note/responses.py +++ b/chargebee/models/credit_note/responses.py @@ -265,7 +265,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - credit_note: CreditNoteResponse @@ -277,7 +276,6 @@ class PdfResponse(Response): @dataclass class DownloadEinvoiceResponse(Response): - downloads: List["download.DownloadResponse"] @@ -308,7 +306,6 @@ class ListCreditNoteResponse: @dataclass class ListResponse(Response): - list: List[ListCreditNoteResponse] next_offset: str = None @@ -320,7 +317,6 @@ class CreditNotesForCustomerCreditNoteResponse: @dataclass class CreditNotesForCustomerResponse(Response): - list: List[CreditNotesForCustomerCreditNoteResponse] next_offset: str = None diff --git a/chargebee/models/credit_note_estimate/operations.py b/chargebee/models/credit_note_estimate/operations.py index 3a6b61e..ec801de 100644 --- a/chargebee/models/credit_note_estimate/operations.py +++ b/chargebee/models/credit_note_estimate/operations.py @@ -7,7 +7,6 @@ @dataclass class CreditNoteEstimate: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/currency/operations.py b/chargebee/models/currency/operations.py index aef3a59..d417511 100644 --- a/chargebee/models/currency/operations.py +++ b/chargebee/models/currency/operations.py @@ -6,7 +6,6 @@ @dataclass class Currency: - env: environment.Environment class ForexType(Enum): diff --git a/chargebee/models/currency/responses.py b/chargebee/models/currency/responses.py index e5116c1..35d30f9 100644 --- a/chargebee/models/currency/responses.py +++ b/chargebee/models/currency/responses.py @@ -22,14 +22,12 @@ class ListCurrencyResponse: @dataclass class ListResponse(Response): - list: List[ListCurrencyResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - currency: CurrencyResponse diff --git a/chargebee/models/customer/operations.py b/chargebee/models/customer/operations.py index 35eddd7..0459a01 100644 --- a/chargebee/models/customer/operations.py +++ b/chargebee/models/customer/operations.py @@ -8,7 +8,6 @@ @dataclass class Customer: - env: environment.Environment class VatNumberStatus(Enum): diff --git a/chargebee/models/customer/responses.py b/chargebee/models/customer/responses.py index cb1b2f4..bab5bb4 100644 --- a/chargebee/models/customer/responses.py +++ b/chargebee/models/customer/responses.py @@ -213,14 +213,12 @@ class ListCustomerResponse: @dataclass class ListResponse(Response): - list: List[ListCustomerResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - customer: CustomerResponse card: "card.CardResponse" = None @@ -253,7 +251,6 @@ class ContactsForCustomerCustomerResponse: @dataclass class ContactsForCustomerResponse(Response): - list: List[ContactsForCustomerCustomerResponse] next_offset: str = None @@ -363,7 +360,6 @@ class DeleteRelationshipResponse(Response): @dataclass class HierarchyResponse(Response): - hierarchies: List["hierarchy.HierarchyResponse"] @@ -374,7 +370,6 @@ class ListHierarchyDetailCustomerResponse: @dataclass class ListHierarchyDetailResponse(Response): - list: List[ListHierarchyDetailCustomerResponse] next_offset: str = None diff --git a/chargebee/models/customer_entitlement/operations.py b/chargebee/models/customer_entitlement/operations.py index 84a0b9a..86dd52e 100644 --- a/chargebee/models/customer_entitlement/operations.py +++ b/chargebee/models/customer_entitlement/operations.py @@ -5,7 +5,6 @@ @dataclass class CustomerEntitlement: - env: environment.Environment class EntitlementsForCustomerParams(TypedDict): diff --git a/chargebee/models/customer_entitlement/responses.py b/chargebee/models/customer_entitlement/responses.py index 5b212d3..0a18b92 100644 --- a/chargebee/models/customer_entitlement/responses.py +++ b/chargebee/models/customer_entitlement/responses.py @@ -22,6 +22,5 @@ class EntitlementsForCustomerCustomerEntitlementResponse: @dataclass class EntitlementsForCustomerResponse(Response): - list: List[EntitlementsForCustomerCustomerEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/differential_price/operations.py b/chargebee/models/differential_price/operations.py index 230c6ec..d40fd6c 100644 --- a/chargebee/models/differential_price/operations.py +++ b/chargebee/models/differential_price/operations.py @@ -8,7 +8,6 @@ @dataclass class DifferentialPrice: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/differential_price/responses.py b/chargebee/models/differential_price/responses.py index 188a100..f9aacce 100644 --- a/chargebee/models/differential_price/responses.py +++ b/chargebee/models/differential_price/responses.py @@ -52,7 +52,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - differential_price: DifferentialPriceResponse @@ -75,6 +74,5 @@ class ListDifferentialPriceResponse: @dataclass class ListResponse(Response): - list: List[ListDifferentialPriceResponse] next_offset: str = None diff --git a/chargebee/models/discount/operations.py b/chargebee/models/discount/operations.py index 74c290d..3ded8c7 100644 --- a/chargebee/models/discount/operations.py +++ b/chargebee/models/discount/operations.py @@ -6,7 +6,6 @@ @dataclass class Discount: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/download/operations.py b/chargebee/models/download/operations.py index f0ecbf0..b5d2a17 100644 --- a/chargebee/models/download/operations.py +++ b/chargebee/models/download/operations.py @@ -5,7 +5,6 @@ @dataclass class Download: - env: environment.Environment pass diff --git a/chargebee/models/entitlement/operations.py b/chargebee/models/entitlement/operations.py index a787642..3a7740e 100644 --- a/chargebee/models/entitlement/operations.py +++ b/chargebee/models/entitlement/operations.py @@ -8,7 +8,6 @@ @dataclass class Entitlement: - env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/entitlement/responses.py b/chargebee/models/entitlement/responses.py index 42ebb47..68cc51a 100644 --- a/chargebee/models/entitlement/responses.py +++ b/chargebee/models/entitlement/responses.py @@ -23,7 +23,6 @@ class ListEntitlementResponse: @dataclass class ListResponse(Response): - list: List[ListEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/entitlement_override/operations.py b/chargebee/models/entitlement_override/operations.py index f2cf353..62e4901 100644 --- a/chargebee/models/entitlement_override/operations.py +++ b/chargebee/models/entitlement_override/operations.py @@ -7,7 +7,6 @@ @dataclass class EntitlementOverride: - env: environment.Environment class ScheduleStatus(Enum): diff --git a/chargebee/models/entitlement_override/responses.py b/chargebee/models/entitlement_override/responses.py index 3a115fa..b7496a2 100644 --- a/chargebee/models/entitlement_override/responses.py +++ b/chargebee/models/entitlement_override/responses.py @@ -32,6 +32,5 @@ class ListEntitlementOverrideForSubscriptionEntitlementOverrideResponse: @dataclass class ListEntitlementOverrideForSubscriptionResponse(Response): - list: List[ListEntitlementOverrideForSubscriptionEntitlementOverrideResponse] next_offset: str = None diff --git a/chargebee/models/estimate/operations.py b/chargebee/models/estimate/operations.py index a55b6f3..c348494 100644 --- a/chargebee/models/estimate/operations.py +++ b/chargebee/models/estimate/operations.py @@ -16,7 +16,6 @@ @dataclass class Estimate: - env: environment.Environment class PaymentScheduleEstimateEntityType(Enum): diff --git a/chargebee/models/estimate/responses.py b/chargebee/models/estimate/responses.py index 39eff9e..d7e0337 100644 --- a/chargebee/models/estimate/responses.py +++ b/chargebee/models/estimate/responses.py @@ -47,7 +47,6 @@ class CreateSubItemEstimateResponse(Response): @dataclass class CreateSubForCustomerEstimateResponse(Response): - estimate: EstimateResponse @@ -71,7 +70,6 @@ class UpdateSubscriptionForItemsResponse(Response): @dataclass class RenewalEstimateResponse(Response): - estimate: EstimateResponse @@ -89,7 +87,6 @@ class RegenerateInvoiceEstimateResponse(Response): @dataclass class UpcomingInvoicesEstimateResponse(Response): - estimate: EstimateResponse diff --git a/chargebee/models/event/operations.py b/chargebee/models/event/operations.py index 2ced185..c5c2e35 100644 --- a/chargebee/models/event/operations.py +++ b/chargebee/models/event/operations.py @@ -9,7 +9,6 @@ @dataclass class Event: - env: environment.Environment class WebhookStatus(Enum): diff --git a/chargebee/models/event/responses.py b/chargebee/models/event/responses.py index a291760..704c117 100644 --- a/chargebee/models/event/responses.py +++ b/chargebee/models/event/responses.py @@ -34,12 +34,10 @@ class ListEventResponse: @dataclass class ListResponse(Response): - list: List[ListEventResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - event: EventResponse diff --git a/chargebee/models/export/operations.py b/chargebee/models/export/operations.py index 6dcb02c..28266bd 100644 --- a/chargebee/models/export/operations.py +++ b/chargebee/models/export/operations.py @@ -8,7 +8,6 @@ @dataclass class Export: - env: environment.Environment class MimeType(Enum): diff --git a/chargebee/models/export/responses.py b/chargebee/models/export/responses.py index 099c5d3..1571eca 100644 --- a/chargebee/models/export/responses.py +++ b/chargebee/models/export/responses.py @@ -25,7 +25,6 @@ class ExportResponse(Model): @dataclass class RetrieveResponse(Response): - export: ExportResponse diff --git a/chargebee/models/feature/operations.py b/chargebee/models/feature/operations.py index c4efa4b..0d0e88b 100644 --- a/chargebee/models/feature/operations.py +++ b/chargebee/models/feature/operations.py @@ -7,7 +7,6 @@ @dataclass class Feature: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/feature/responses.py b/chargebee/models/feature/responses.py index b39823e..c88a26a 100644 --- a/chargebee/models/feature/responses.py +++ b/chargebee/models/feature/responses.py @@ -35,7 +35,6 @@ class ListFeatureResponse: @dataclass class ListResponse(Response): - list: List[ListFeatureResponse] next_offset: str = None @@ -54,7 +53,6 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): - feature: FeatureResponse diff --git a/chargebee/models/gateway_error_detail/operations.py b/chargebee/models/gateway_error_detail/operations.py index 19370ac..50afed5 100644 --- a/chargebee/models/gateway_error_detail/operations.py +++ b/chargebee/models/gateway_error_detail/operations.py @@ -5,7 +5,6 @@ @dataclass class GatewayErrorDetail: - env: environment.Environment pass diff --git a/chargebee/models/gift/operations.py b/chargebee/models/gift/operations.py index ef5d1d3..36721f8 100644 --- a/chargebee/models/gift/operations.py +++ b/chargebee/models/gift/operations.py @@ -8,7 +8,6 @@ @dataclass class Gift: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/gift/responses.py b/chargebee/models/gift/responses.py index 87812a4..4c83997 100644 --- a/chargebee/models/gift/responses.py +++ b/chargebee/models/gift/responses.py @@ -65,7 +65,6 @@ class CreateForItemsResponse(Response): @dataclass class RetrieveResponse(Response): - gift: GiftResponse subscription: "subscription.SubscriptionResponse" @@ -78,7 +77,6 @@ class ListGiftResponse: @dataclass class ListResponse(Response): - list: List[ListGiftResponse] next_offset: str = None diff --git a/chargebee/models/hierarchy/operations.py b/chargebee/models/hierarchy/operations.py index 84f2904..851bb0d 100644 --- a/chargebee/models/hierarchy/operations.py +++ b/chargebee/models/hierarchy/operations.py @@ -5,7 +5,6 @@ @dataclass class Hierarchy: - env: environment.Environment pass diff --git a/chargebee/models/hosted_page/operations.py b/chargebee/models/hosted_page/operations.py index acd915d..d3a6fad 100644 --- a/chargebee/models/hosted_page/operations.py +++ b/chargebee/models/hosted_page/operations.py @@ -8,7 +8,6 @@ @dataclass class HostedPage: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/hosted_page/responses.py b/chargebee/models/hosted_page/responses.py index b85c708..dcc075e 100644 --- a/chargebee/models/hosted_page/responses.py +++ b/chargebee/models/hosted_page/responses.py @@ -128,7 +128,6 @@ class AcknowledgeResponse(Response): @dataclass class RetrieveResponse(Response): - hosted_page: HostedPageResponse @@ -139,7 +138,6 @@ class ListHostedPageResponse: @dataclass class ListResponse(Response): - list: List[ListHostedPageResponse] next_offset: str = None diff --git a/chargebee/models/impacted_customer/operations.py b/chargebee/models/impacted_customer/operations.py index c72f79f..93b89cb 100644 --- a/chargebee/models/impacted_customer/operations.py +++ b/chargebee/models/impacted_customer/operations.py @@ -5,7 +5,6 @@ @dataclass class ImpactedCustomer: - env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_item/operations.py b/chargebee/models/impacted_item/operations.py index 5dc7978..6c2f0f7 100644 --- a/chargebee/models/impacted_item/operations.py +++ b/chargebee/models/impacted_item/operations.py @@ -5,7 +5,6 @@ @dataclass class ImpactedItem: - env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_item_price/operations.py b/chargebee/models/impacted_item_price/operations.py index a8029ae..a093598 100644 --- a/chargebee/models/impacted_item_price/operations.py +++ b/chargebee/models/impacted_item_price/operations.py @@ -5,7 +5,6 @@ @dataclass class ImpactedItemPrice: - env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/impacted_subscription/operations.py b/chargebee/models/impacted_subscription/operations.py index b671361..ec2804a 100644 --- a/chargebee/models/impacted_subscription/operations.py +++ b/chargebee/models/impacted_subscription/operations.py @@ -5,7 +5,6 @@ @dataclass class ImpactedSubscription: - env: environment.Environment class Download(TypedDict): diff --git a/chargebee/models/in_app_subscription/operations.py b/chargebee/models/in_app_subscription/operations.py index 60d4169..d8ecb34 100644 --- a/chargebee/models/in_app_subscription/operations.py +++ b/chargebee/models/in_app_subscription/operations.py @@ -6,7 +6,6 @@ @dataclass class InAppSubscription: - env: environment.Environment class StoreStatus(Enum): diff --git a/chargebee/models/invoice/operations.py b/chargebee/models/invoice/operations.py index a5df1fe..d3e2d19 100644 --- a/chargebee/models/invoice/operations.py +++ b/chargebee/models/invoice/operations.py @@ -15,7 +15,6 @@ @dataclass class Invoice: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/invoice/responses.py b/chargebee/models/invoice/responses.py index a910d55..2583bdb 100644 --- a/chargebee/models/invoice/responses.py +++ b/chargebee/models/invoice/responses.py @@ -444,7 +444,6 @@ class ListInvoiceResponse: @dataclass class ListResponse(Response): - list: List[ListInvoiceResponse] next_offset: str = None @@ -456,7 +455,6 @@ class InvoicesForCustomerInvoiceResponse: @dataclass class InvoicesForCustomerResponse(Response): - list: List[InvoicesForCustomerInvoiceResponse] next_offset: str = None @@ -468,14 +466,12 @@ class InvoicesForSubscriptionInvoiceResponse: @dataclass class InvoicesForSubscriptionResponse(Response): - list: List[InvoicesForSubscriptionInvoiceResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - invoice: InvoiceResponse @@ -487,7 +483,6 @@ class PdfResponse(Response): @dataclass class DownloadEinvoiceResponse(Response): - downloads: List["download.DownloadResponse"] @@ -498,7 +493,6 @@ class ListPaymentReferenceNumbersInvoiceResponse: @dataclass class ListPaymentReferenceNumbersResponse(Response): - list: List[ListPaymentReferenceNumbersInvoiceResponse] next_offset: str = None @@ -617,7 +611,6 @@ class ApplyPaymentScheduleSchemeResponse(Response): @dataclass class PaymentSchedulesResponse(Response): - payment_schedules: List["payment_schedule.PaymentScheduleResponse"] diff --git a/chargebee/models/invoice_estimate/operations.py b/chargebee/models/invoice_estimate/operations.py index 353abd6..1304063 100644 --- a/chargebee/models/invoice_estimate/operations.py +++ b/chargebee/models/invoice_estimate/operations.py @@ -7,7 +7,6 @@ @dataclass class InvoiceEstimate: - env: environment.Environment class LineItemEntityType(Enum): diff --git a/chargebee/models/item/operations.py b/chargebee/models/item/operations.py index f75e71a..7ddc6e6 100644 --- a/chargebee/models/item/operations.py +++ b/chargebee/models/item/operations.py @@ -8,7 +8,6 @@ @dataclass class Item: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item/responses.py b/chargebee/models/item/responses.py index e932750..0049dae 100644 --- a/chargebee/models/item/responses.py +++ b/chargebee/models/item/responses.py @@ -67,7 +67,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - item: ItemResponse @@ -84,7 +83,6 @@ class ListItemResponse: @dataclass class ListResponse(Response): - list: List[ListItemResponse] next_offset: str = None diff --git a/chargebee/models/item_entitlement/operations.py b/chargebee/models/item_entitlement/operations.py index 9b01456..9aef846 100644 --- a/chargebee/models/item_entitlement/operations.py +++ b/chargebee/models/item_entitlement/operations.py @@ -7,7 +7,6 @@ @dataclass class ItemEntitlement: - env: environment.Environment class ItemType(Enum): diff --git a/chargebee/models/item_entitlement/responses.py b/chargebee/models/item_entitlement/responses.py index a1d2a4b..f3b52aa 100644 --- a/chargebee/models/item_entitlement/responses.py +++ b/chargebee/models/item_entitlement/responses.py @@ -23,7 +23,6 @@ class ItemEntitlementsForItemItemEntitlementResponse: @dataclass class ItemEntitlementsForItemResponse(Response): - list: List[ItemEntitlementsForItemItemEntitlementResponse] next_offset: str = None @@ -35,7 +34,6 @@ class ItemEntitlementsForFeatureItemEntitlementResponse: @dataclass class ItemEntitlementsForFeatureResponse(Response): - list: List[ItemEntitlementsForFeatureItemEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/item_family/operations.py b/chargebee/models/item_family/operations.py index 8a17c7d..1bb8b4c 100644 --- a/chargebee/models/item_family/operations.py +++ b/chargebee/models/item_family/operations.py @@ -7,7 +7,6 @@ @dataclass class ItemFamily: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item_family/responses.py b/chargebee/models/item_family/responses.py index ded56c5..0f7de0d 100644 --- a/chargebee/models/item_family/responses.py +++ b/chargebee/models/item_family/responses.py @@ -26,7 +26,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - item_family: ItemFamilyResponse @@ -37,7 +36,6 @@ class ListItemFamilyResponse: @dataclass class ListResponse(Response): - list: List[ListItemFamilyResponse] next_offset: str = None diff --git a/chargebee/models/item_price/operations.py b/chargebee/models/item_price/operations.py index 0f9d85e..9733854 100644 --- a/chargebee/models/item_price/operations.py +++ b/chargebee/models/item_price/operations.py @@ -8,7 +8,6 @@ @dataclass class ItemPrice: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/item_price/responses.py b/chargebee/models/item_price/responses.py index 4ebc17a..790b717 100644 --- a/chargebee/models/item_price/responses.py +++ b/chargebee/models/item_price/responses.py @@ -105,7 +105,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - item_price: ItemPriceResponse @@ -122,7 +121,6 @@ class ListItemPriceResponse: @dataclass class ListResponse(Response): - list: List[ListItemPriceResponse] next_offset: str = None @@ -140,7 +138,6 @@ class FindApplicableItemsItemPriceResponse: @dataclass class FindApplicableItemsResponse(Response): - list: List[FindApplicableItemsItemPriceResponse] next_offset: str = None @@ -152,6 +149,5 @@ class FindApplicableItemPricesItemPriceResponse: @dataclass class FindApplicableItemPricesResponse(Response): - list: List[FindApplicableItemPricesItemPriceResponse] next_offset: str = None diff --git a/chargebee/models/metadata/operations.py b/chargebee/models/metadata/operations.py index 1762be9..29094b7 100644 --- a/chargebee/models/metadata/operations.py +++ b/chargebee/models/metadata/operations.py @@ -5,7 +5,6 @@ @dataclass class Metadata: - env: environment.Environment pass diff --git a/chargebee/models/offer_event/operations.py b/chargebee/models/offer_event/operations.py index c6be5f4..210702c 100644 --- a/chargebee/models/offer_event/operations.py +++ b/chargebee/models/offer_event/operations.py @@ -6,7 +6,6 @@ @dataclass class OfferEvent: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/offer_fulfillment/operations.py b/chargebee/models/offer_fulfillment/operations.py index 52987bf..d6f42b5 100644 --- a/chargebee/models/offer_fulfillment/operations.py +++ b/chargebee/models/offer_fulfillment/operations.py @@ -6,7 +6,6 @@ @dataclass class OfferFulfillment: - env: environment.Environment class ProcessingType(Enum): diff --git a/chargebee/models/offer_fulfillment/responses.py b/chargebee/models/offer_fulfillment/responses.py index 74aaa34..abd1c8a 100644 --- a/chargebee/models/offer_fulfillment/responses.py +++ b/chargebee/models/offer_fulfillment/responses.py @@ -36,7 +36,6 @@ class OfferFulfillmentsResponse(Response): @dataclass class OfferFulfillmentsGetResponse(Response): - offer_fulfillment: OfferFulfillmentResponse diff --git a/chargebee/models/omnichannel_one_time_order/operations.py b/chargebee/models/omnichannel_one_time_order/operations.py index e8a4af4..b2df08b 100644 --- a/chargebee/models/omnichannel_one_time_order/operations.py +++ b/chargebee/models/omnichannel_one_time_order/operations.py @@ -8,7 +8,6 @@ @dataclass class OmnichannelOneTimeOrder: - env: environment.Environment class Source(Enum): diff --git a/chargebee/models/omnichannel_one_time_order/responses.py b/chargebee/models/omnichannel_one_time_order/responses.py index 857b21d..b9936d8 100644 --- a/chargebee/models/omnichannel_one_time_order/responses.py +++ b/chargebee/models/omnichannel_one_time_order/responses.py @@ -26,7 +26,6 @@ class OmnichannelOneTimeOrderResponse(Model): @dataclass class RetrieveResponse(Response): - omnichannel_one_time_order: OmnichannelOneTimeOrderResponse @@ -37,6 +36,5 @@ class ListOmnichannelOneTimeOrderResponse: @dataclass class ListResponse(Response): - list: List[ListOmnichannelOneTimeOrderResponse] next_offset: str = None diff --git a/chargebee/models/omnichannel_one_time_order_item/operations.py b/chargebee/models/omnichannel_one_time_order_item/operations.py index 07be1b0..14bfc7d 100644 --- a/chargebee/models/omnichannel_one_time_order_item/operations.py +++ b/chargebee/models/omnichannel_one_time_order_item/operations.py @@ -6,7 +6,6 @@ @dataclass class OmnichannelOneTimeOrderItem: - env: environment.Environment class CancellationReason(Enum): diff --git a/chargebee/models/omnichannel_subscription/operations.py b/chargebee/models/omnichannel_subscription/operations.py index 14283a4..3e094d2 100644 --- a/chargebee/models/omnichannel_subscription/operations.py +++ b/chargebee/models/omnichannel_subscription/operations.py @@ -8,7 +8,6 @@ @dataclass class OmnichannelSubscription: - env: environment.Environment class Source(Enum): diff --git a/chargebee/models/omnichannel_subscription/responses.py b/chargebee/models/omnichannel_subscription/responses.py index cc20047..9587179 100644 --- a/chargebee/models/omnichannel_subscription/responses.py +++ b/chargebee/models/omnichannel_subscription/responses.py @@ -22,14 +22,11 @@ class OmnichannelSubscriptionResponse(Model): omnichannel_subscription_items: List[ "omnichannel_subscription_item.OmnichannelSubscriptionItemResponse" ] = None - initial_purchase_transaction: ( - "omnichannel_transaction.OmnichannelTransactionResponse" - ) = None + initial_purchase_transaction: "omnichannel_transaction.OmnichannelTransactionResponse" = None @dataclass class RetrieveResponse(Response): - omnichannel_subscription: OmnichannelSubscriptionResponse @@ -40,7 +37,6 @@ class ListOmnichannelSubscriptionResponse: @dataclass class ListResponse(Response): - list: List[ListOmnichannelSubscriptionResponse] next_offset: str = None @@ -52,7 +48,6 @@ class OmnichannelTransactionsForOmnichannelSubscriptionOmnichannelSubscriptionRe @dataclass class OmnichannelTransactionsForOmnichannelSubscriptionResponse(Response): - list: List[ OmnichannelTransactionsForOmnichannelSubscriptionOmnichannelSubscriptionResponse ] diff --git a/chargebee/models/omnichannel_subscription_item/operations.py b/chargebee/models/omnichannel_subscription_item/operations.py index cfc1887..2870922 100644 --- a/chargebee/models/omnichannel_subscription_item/operations.py +++ b/chargebee/models/omnichannel_subscription_item/operations.py @@ -7,7 +7,6 @@ @dataclass class OmnichannelSubscriptionItem: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/omnichannel_subscription_item/responses.py b/chargebee/models/omnichannel_subscription_item/responses.py index e022cb0..c028820 100644 --- a/chargebee/models/omnichannel_subscription_item/responses.py +++ b/chargebee/models/omnichannel_subscription_item/responses.py @@ -55,6 +55,5 @@ class ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemResponse: @dataclass class ListOmniSubItemScheduleChangesResponse(Response): - list: List[ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemResponse] next_offset: str = None diff --git a/chargebee/models/omnichannel_subscription_item_offer/operations.py b/chargebee/models/omnichannel_subscription_item_offer/operations.py index 7d9f4ae..87d0186 100644 --- a/chargebee/models/omnichannel_subscription_item_offer/operations.py +++ b/chargebee/models/omnichannel_subscription_item_offer/operations.py @@ -5,7 +5,6 @@ @dataclass class OmnichannelSubscriptionItemOffer: - env: environment.Environment pass diff --git a/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py b/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py index 1b5cff5..2f73f4d 100644 --- a/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py +++ b/chargebee/models/omnichannel_subscription_item_scheduled_change/operations.py @@ -6,7 +6,6 @@ @dataclass class OmnichannelSubscriptionItemScheduledChange: - env: environment.Environment class ChangeType(Enum): diff --git a/chargebee/models/omnichannel_transaction/operations.py b/chargebee/models/omnichannel_transaction/operations.py index 257e28e..5eb9657 100644 --- a/chargebee/models/omnichannel_transaction/operations.py +++ b/chargebee/models/omnichannel_transaction/operations.py @@ -6,7 +6,6 @@ @dataclass class OmnichannelTransaction: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/order/operations.py b/chargebee/models/order/operations.py index 41949be..0d7d5aa 100644 --- a/chargebee/models/order/operations.py +++ b/chargebee/models/order/operations.py @@ -8,7 +8,6 @@ @dataclass class Order: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/order/responses.py b/chargebee/models/order/responses.py index 97fcc67..f91a682 100644 --- a/chargebee/models/order/responses.py +++ b/chargebee/models/order/responses.py @@ -222,7 +222,6 @@ class ReopenResponse(Response): @dataclass class RetrieveResponse(Response): - order: OrderResponse @@ -239,7 +238,6 @@ class ListOrderResponse: @dataclass class ListResponse(Response): - list: List[ListOrderResponse] next_offset: str = None @@ -251,7 +249,6 @@ class OrdersForInvoiceOrderResponse: @dataclass class OrdersForInvoiceResponse(Response): - list: List[OrdersForInvoiceOrderResponse] next_offset: str = None diff --git a/chargebee/models/payment_intent/operations.py b/chargebee/models/payment_intent/operations.py index 2f08ea5..c30a0c7 100644 --- a/chargebee/models/payment_intent/operations.py +++ b/chargebee/models/payment_intent/operations.py @@ -7,7 +7,6 @@ @dataclass class PaymentIntent: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_intent/responses.py b/chargebee/models/payment_intent/responses.py index be86056..8587736 100644 --- a/chargebee/models/payment_intent/responses.py +++ b/chargebee/models/payment_intent/responses.py @@ -56,5 +56,4 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): - payment_intent: PaymentIntentResponse diff --git a/chargebee/models/payment_reference_number/operations.py b/chargebee/models/payment_reference_number/operations.py index 57370be..f98e57b 100644 --- a/chargebee/models/payment_reference_number/operations.py +++ b/chargebee/models/payment_reference_number/operations.py @@ -6,7 +6,6 @@ @dataclass class PaymentReferenceNumber: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/payment_schedule/operations.py b/chargebee/models/payment_schedule/operations.py index 24a37e8..3397ee5 100644 --- a/chargebee/models/payment_schedule/operations.py +++ b/chargebee/models/payment_schedule/operations.py @@ -6,7 +6,6 @@ @dataclass class PaymentSchedule: - env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/payment_schedule_estimate/operations.py b/chargebee/models/payment_schedule_estimate/operations.py index ea86597..881353b 100644 --- a/chargebee/models/payment_schedule_estimate/operations.py +++ b/chargebee/models/payment_schedule_estimate/operations.py @@ -6,7 +6,6 @@ @dataclass class PaymentScheduleEstimate: - env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/payment_schedule_scheme/operations.py b/chargebee/models/payment_schedule_scheme/operations.py index f91e48a..5d83c55 100644 --- a/chargebee/models/payment_schedule_scheme/operations.py +++ b/chargebee/models/payment_schedule_scheme/operations.py @@ -6,7 +6,6 @@ @dataclass class PaymentScheduleScheme: - env: environment.Environment class PeriodUnit(Enum): diff --git a/chargebee/models/payment_schedule_scheme/responses.py b/chargebee/models/payment_schedule_scheme/responses.py index 1153b4a..2433065 100644 --- a/chargebee/models/payment_schedule_scheme/responses.py +++ b/chargebee/models/payment_schedule_scheme/responses.py @@ -34,7 +34,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - payment_schedule_scheme: PaymentScheduleSchemeResponse diff --git a/chargebee/models/payment_source/operations.py b/chargebee/models/payment_source/operations.py index f46048b..bd78782 100644 --- a/chargebee/models/payment_source/operations.py +++ b/chargebee/models/payment_source/operations.py @@ -8,7 +8,6 @@ @dataclass class PaymentSource: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_source/responses.py b/chargebee/models/payment_source/responses.py index edd5e0d..ff8eb93 100644 --- a/chargebee/models/payment_source/responses.py +++ b/chargebee/models/payment_source/responses.py @@ -216,7 +216,6 @@ class VerifyBankAccountResponse(Response): @dataclass class RetrieveResponse(Response): - payment_source: PaymentSourceResponse @@ -227,7 +226,6 @@ class ListPaymentSourceResponse: @dataclass class ListResponse(Response): - list: List[ListPaymentSourceResponse] next_offset: str = None diff --git a/chargebee/models/payment_voucher/operations.py b/chargebee/models/payment_voucher/operations.py index 170bbe8..a288bf2 100644 --- a/chargebee/models/payment_voucher/operations.py +++ b/chargebee/models/payment_voucher/operations.py @@ -8,7 +8,6 @@ @dataclass class PaymentVoucher: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/payment_voucher/responses.py b/chargebee/models/payment_voucher/responses.py index 28cc910..6a7637a 100644 --- a/chargebee/models/payment_voucher/responses.py +++ b/chargebee/models/payment_voucher/responses.py @@ -45,7 +45,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - payment_voucher: PaymentVoucherResponse @@ -56,7 +55,6 @@ class PaymentVouchersForInvoicePaymentVoucherResponse: @dataclass class PaymentVouchersForInvoiceResponse(Response): - list: List[PaymentVouchersForInvoicePaymentVoucherResponse] next_offset: str = None @@ -68,6 +66,5 @@ class PaymentVouchersForCustomerPaymentVoucherResponse: @dataclass class PaymentVouchersForCustomerResponse(Response): - list: List[PaymentVouchersForCustomerPaymentVoucherResponse] next_offset: str = None diff --git a/chargebee/models/personalized_offer/operations.py b/chargebee/models/personalized_offer/operations.py index 6d8126c..9371265 100644 --- a/chargebee/models/personalized_offer/operations.py +++ b/chargebee/models/personalized_offer/operations.py @@ -6,7 +6,6 @@ @dataclass class PersonalizedOffer: - env: environment.Environment class OptionProcessingType(Enum): diff --git a/chargebee/models/plan/operations.py b/chargebee/models/plan/operations.py index 32fa8f8..8558e5e 100644 --- a/chargebee/models/plan/operations.py +++ b/chargebee/models/plan/operations.py @@ -8,7 +8,6 @@ @dataclass class Plan: - env: environment.Environment class PeriodUnit(Enum): diff --git a/chargebee/models/plan/responses.py b/chargebee/models/plan/responses.py index bab43f1..8f036ab 100644 --- a/chargebee/models/plan/responses.py +++ b/chargebee/models/plan/responses.py @@ -131,14 +131,12 @@ class ListPlanResponse: @dataclass class ListResponse(Response): - list: List[ListPlanResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - plan: PlanResponse diff --git a/chargebee/models/portal_session/operations.py b/chargebee/models/portal_session/operations.py index 988c6c2..21ef4ec 100644 --- a/chargebee/models/portal_session/operations.py +++ b/chargebee/models/portal_session/operations.py @@ -6,7 +6,6 @@ @dataclass class PortalSession: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/portal_session/responses.py b/chargebee/models/portal_session/responses.py index f10c78b..2597000 100644 --- a/chargebee/models/portal_session/responses.py +++ b/chargebee/models/portal_session/responses.py @@ -40,7 +40,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - portal_session: PortalSessionResponse diff --git a/chargebee/models/price_variant/operations.py b/chargebee/models/price_variant/operations.py index bc9ce2a..bdc42e4 100644 --- a/chargebee/models/price_variant/operations.py +++ b/chargebee/models/price_variant/operations.py @@ -7,7 +7,6 @@ @dataclass class PriceVariant: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/price_variant/responses.py b/chargebee/models/price_variant/responses.py index 358fed5..7bdc1d5 100644 --- a/chargebee/models/price_variant/responses.py +++ b/chargebee/models/price_variant/responses.py @@ -37,7 +37,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - price_variant: PriceVariantResponse @@ -60,6 +59,5 @@ class ListPriceVariantResponse: @dataclass class ListResponse(Response): - list: List[ListPriceVariantResponse] next_offset: str = None diff --git a/chargebee/models/pricing_page_session/operations.py b/chargebee/models/pricing_page_session/operations.py index a12b0d1..d17d96f 100644 --- a/chargebee/models/pricing_page_session/operations.py +++ b/chargebee/models/pricing_page_session/operations.py @@ -6,7 +6,6 @@ @dataclass class PricingPageSession: - env: environment.Environment class CreateForNewSubscriptionPricingPageParams(TypedDict): diff --git a/chargebee/models/promotional_credit/operations.py b/chargebee/models/promotional_credit/operations.py index 70314d2..7c05654 100644 --- a/chargebee/models/promotional_credit/operations.py +++ b/chargebee/models/promotional_credit/operations.py @@ -8,7 +8,6 @@ @dataclass class PromotionalCredit: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/promotional_credit/responses.py b/chargebee/models/promotional_credit/responses.py index 01a6dd1..27f8f87 100644 --- a/chargebee/models/promotional_credit/responses.py +++ b/chargebee/models/promotional_credit/responses.py @@ -51,12 +51,10 @@ class ListPromotionalCreditResponse: @dataclass class ListResponse(Response): - list: List[ListPromotionalCreditResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - promotional_credit: PromotionalCreditResponse diff --git a/chargebee/models/purchase/operations.py b/chargebee/models/purchase/operations.py index 08d0898..18f6d62 100644 --- a/chargebee/models/purchase/operations.py +++ b/chargebee/models/purchase/operations.py @@ -6,7 +6,6 @@ @dataclass class Purchase: - env: environment.Environment class CreatePurchaseItemParams(TypedDict): diff --git a/chargebee/models/quote/operations.py b/chargebee/models/quote/operations.py index 603925e..ad2b91b 100644 --- a/chargebee/models/quote/operations.py +++ b/chargebee/models/quote/operations.py @@ -8,7 +8,6 @@ @dataclass class Quote: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/quote/responses.py b/chargebee/models/quote/responses.py index 1cfcba4..3b01564 100644 --- a/chargebee/models/quote/responses.py +++ b/chargebee/models/quote/responses.py @@ -198,7 +198,6 @@ class QuoteResponse(Model): @dataclass class RetrieveResponse(Response): - quote: QuoteResponse quoted_subscription: "quoted_subscription.QuotedSubscriptionResponse" = None quoted_charge: "quoted_charge.QuotedChargeResponse" = None @@ -302,7 +301,6 @@ class ListQuoteResponse: @dataclass class ListResponse(Response): - list: List[ListQuoteResponse] next_offset: str = None @@ -314,7 +312,6 @@ class QuoteLineGroupsForQuoteQuoteResponse: @dataclass class QuoteLineGroupsForQuoteResponse(Response): - list: List[QuoteLineGroupsForQuoteQuoteResponse] next_offset: str = None diff --git a/chargebee/models/quote_line_group/operations.py b/chargebee/models/quote_line_group/operations.py index a6bda2e..12f2bd1 100644 --- a/chargebee/models/quote_line_group/operations.py +++ b/chargebee/models/quote_line_group/operations.py @@ -7,7 +7,6 @@ @dataclass class QuoteLineGroup: - env: environment.Environment class ChargeEvent(Enum): diff --git a/chargebee/models/quoted_charge/operations.py b/chargebee/models/quoted_charge/operations.py index 9ff4c3c..291d3b5 100644 --- a/chargebee/models/quoted_charge/operations.py +++ b/chargebee/models/quoted_charge/operations.py @@ -6,7 +6,6 @@ @dataclass class QuotedCharge: - env: environment.Environment class Charge(TypedDict): diff --git a/chargebee/models/quoted_ramp/operations.py b/chargebee/models/quoted_ramp/operations.py index 3326cea..3dabc42 100644 --- a/chargebee/models/quoted_ramp/operations.py +++ b/chargebee/models/quoted_ramp/operations.py @@ -7,7 +7,6 @@ @dataclass class QuotedRamp: - env: environment.Environment class DiscountType(Enum): diff --git a/chargebee/models/quoted_subscription/operations.py b/chargebee/models/quoted_subscription/operations.py index 6c47071..1c8589e 100644 --- a/chargebee/models/quoted_subscription/operations.py +++ b/chargebee/models/quoted_subscription/operations.py @@ -7,7 +7,6 @@ @dataclass class QuotedSubscription: - env: environment.Environment class ChangeOption(Enum): diff --git a/chargebee/models/ramp/operations.py b/chargebee/models/ramp/operations.py index 0f2f1cc..a1efe5b 100644 --- a/chargebee/models/ramp/operations.py +++ b/chargebee/models/ramp/operations.py @@ -8,7 +8,6 @@ @dataclass class Ramp: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/ramp/responses.py b/chargebee/models/ramp/responses.py index 6268e5d..582cbbd 100644 --- a/chargebee/models/ramp/responses.py +++ b/chargebee/models/ramp/responses.py @@ -138,7 +138,6 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): - ramp: RampResponse @@ -155,6 +154,5 @@ class ListRampResponse: @dataclass class ListResponse(Response): - list: List[ListRampResponse] next_offset: str = None diff --git a/chargebee/models/recorded_purchase/operations.py b/chargebee/models/recorded_purchase/operations.py index 94b1473..ae35e46 100644 --- a/chargebee/models/recorded_purchase/operations.py +++ b/chargebee/models/recorded_purchase/operations.py @@ -6,7 +6,6 @@ @dataclass class RecordedPurchase: - env: environment.Environment class Source(Enum): diff --git a/chargebee/models/recorded_purchase/responses.py b/chargebee/models/recorded_purchase/responses.py index 7eb982c..b98cc99 100644 --- a/chargebee/models/recorded_purchase/responses.py +++ b/chargebee/models/recorded_purchase/responses.py @@ -50,5 +50,4 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - recorded_purchase: RecordedPurchaseResponse diff --git a/chargebee/models/resource_migration/operations.py b/chargebee/models/resource_migration/operations.py index fc89d1a..048a43e 100644 --- a/chargebee/models/resource_migration/operations.py +++ b/chargebee/models/resource_migration/operations.py @@ -7,7 +7,6 @@ @dataclass class ResourceMigration: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/resource_migration/responses.py b/chargebee/models/resource_migration/responses.py index 05664a6..f20fcbf 100644 --- a/chargebee/models/resource_migration/responses.py +++ b/chargebee/models/resource_migration/responses.py @@ -18,5 +18,4 @@ class ResourceMigrationResponse(Model): @dataclass class RetrieveLatestResponse(Response): - resource_migration: ResourceMigrationResponse diff --git a/chargebee/models/rule/operations.py b/chargebee/models/rule/operations.py index b4948ba..ef5c7f3 100644 --- a/chargebee/models/rule/operations.py +++ b/chargebee/models/rule/operations.py @@ -6,7 +6,6 @@ @dataclass class Rule: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/rule/responses.py b/chargebee/models/rule/responses.py index f56b701..17789ea 100644 --- a/chargebee/models/rule/responses.py +++ b/chargebee/models/rule/responses.py @@ -21,5 +21,4 @@ class RuleResponse(Model): @dataclass class RetrieveResponse(Response): - rule: RuleResponse diff --git a/chargebee/models/site_migration_detail/operations.py b/chargebee/models/site_migration_detail/operations.py index cf0adc9..8754e01 100644 --- a/chargebee/models/site_migration_detail/operations.py +++ b/chargebee/models/site_migration_detail/operations.py @@ -7,7 +7,6 @@ @dataclass class SiteMigrationDetail: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/site_migration_detail/responses.py b/chargebee/models/site_migration_detail/responses.py index b853b42..bfddcba 100644 --- a/chargebee/models/site_migration_detail/responses.py +++ b/chargebee/models/site_migration_detail/responses.py @@ -22,6 +22,5 @@ class ListSiteMigrationDetailResponse: @dataclass class ListResponse(Response): - list: List[ListSiteMigrationDetailResponse] next_offset: str = None diff --git a/chargebee/models/subscription/operations.py b/chargebee/models/subscription/operations.py index 3a67fcd..883e5b8 100644 --- a/chargebee/models/subscription/operations.py +++ b/chargebee/models/subscription/operations.py @@ -8,7 +8,6 @@ @dataclass class Subscription: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/subscription/responses.py b/chargebee/models/subscription/responses.py index 4fe9ed9..0627665 100644 --- a/chargebee/models/subscription/responses.py +++ b/chargebee/models/subscription/responses.py @@ -323,7 +323,6 @@ class ListSubscriptionResponse: @dataclass class ListResponse(Response): - list: List[ListSubscriptionResponse] next_offset: str = None @@ -335,7 +334,6 @@ class SubscriptionsForCustomerSubscriptionResponse: @dataclass class SubscriptionsForCustomerResponse(Response): - list: List[SubscriptionsForCustomerSubscriptionResponse] next_offset: str = None @@ -347,7 +345,6 @@ class ContractTermsForSubscriptionSubscriptionResponse: @dataclass class ContractTermsForSubscriptionResponse(Response): - list: List[ContractTermsForSubscriptionSubscriptionResponse] next_offset: str = None @@ -359,14 +356,12 @@ class ListDiscountsSubscriptionResponse: @dataclass class ListDiscountsResponse(Response): - list: List[ListDiscountsSubscriptionResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - subscription: SubscriptionResponse customer: "customer.CustomerResponse" card: "card.CardResponse" = None @@ -374,7 +369,6 @@ class RetrieveResponse(Response): @dataclass class RetrieveWithScheduledChangesResponse(Response): - subscription: SubscriptionResponse customer: "customer.CustomerResponse" card: "card.CardResponse" = None @@ -482,7 +476,6 @@ class EditAdvanceInvoiceScheduleResponse(Response): @dataclass class RetrieveAdvanceInvoiceScheduleResponse(Response): - advance_invoice_schedules: List[ "advance_invoice_schedule.AdvanceInvoiceScheduleResponse" ] diff --git a/chargebee/models/subscription_entitlement/operations.py b/chargebee/models/subscription_entitlement/operations.py index d2500d2..8d97836 100644 --- a/chargebee/models/subscription_entitlement/operations.py +++ b/chargebee/models/subscription_entitlement/operations.py @@ -7,7 +7,6 @@ @dataclass class SubscriptionEntitlement: - env: environment.Environment class ScheduleStatus(Enum): diff --git a/chargebee/models/subscription_entitlement/responses.py b/chargebee/models/subscription_entitlement/responses.py index 8ea7919..ce7ba78 100644 --- a/chargebee/models/subscription_entitlement/responses.py +++ b/chargebee/models/subscription_entitlement/responses.py @@ -36,7 +36,6 @@ class SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementResponse: @dataclass class SubscriptionEntitlementsForSubscriptionResponse(Response): - list: List[SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementResponse] next_offset: str = None diff --git a/chargebee/models/subscription_entitlements_created_detail/operations.py b/chargebee/models/subscription_entitlements_created_detail/operations.py index 3e89867..663a410 100644 --- a/chargebee/models/subscription_entitlements_created_detail/operations.py +++ b/chargebee/models/subscription_entitlements_created_detail/operations.py @@ -5,7 +5,6 @@ @dataclass class SubscriptionEntitlementsCreatedDetail: - env: environment.Environment pass diff --git a/chargebee/models/subscription_entitlements_updated_detail/operations.py b/chargebee/models/subscription_entitlements_updated_detail/operations.py index 6123c74..fb998c4 100644 --- a/chargebee/models/subscription_entitlements_updated_detail/operations.py +++ b/chargebee/models/subscription_entitlements_updated_detail/operations.py @@ -5,7 +5,6 @@ @dataclass class SubscriptionEntitlementsUpdatedDetail: - env: environment.Environment pass diff --git a/chargebee/models/subscription_estimate/operations.py b/chargebee/models/subscription_estimate/operations.py index b18f3a8..da7b58d 100644 --- a/chargebee/models/subscription_estimate/operations.py +++ b/chargebee/models/subscription_estimate/operations.py @@ -7,7 +7,6 @@ @dataclass class SubscriptionEstimate: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/tax_withheld/operations.py b/chargebee/models/tax_withheld/operations.py index c015415..4148493 100644 --- a/chargebee/models/tax_withheld/operations.py +++ b/chargebee/models/tax_withheld/operations.py @@ -6,7 +6,6 @@ @dataclass class TaxWithheld: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/third_party_payment_method/operations.py b/chargebee/models/third_party_payment_method/operations.py index cae87f6..19ae517 100644 --- a/chargebee/models/third_party_payment_method/operations.py +++ b/chargebee/models/third_party_payment_method/operations.py @@ -5,7 +5,6 @@ @dataclass class ThirdPartyPaymentMethod: - env: environment.Environment pass diff --git a/chargebee/models/time_machine/operations.py b/chargebee/models/time_machine/operations.py index 85dee7c..9d237c2 100644 --- a/chargebee/models/time_machine/operations.py +++ b/chargebee/models/time_machine/operations.py @@ -8,7 +8,6 @@ @dataclass class TimeMachine: - env: environment.Environment class TimeTravelStatus(Enum): diff --git a/chargebee/models/time_machine/responses.py b/chargebee/models/time_machine/responses.py index e35b89a..81fce37 100644 --- a/chargebee/models/time_machine/responses.py +++ b/chargebee/models/time_machine/responses.py @@ -18,7 +18,6 @@ class TimeMachineResponse(Model): @dataclass class RetrieveResponse(Response): - time_machine: TimeMachineResponse diff --git a/chargebee/models/token/operations.py b/chargebee/models/token/operations.py index b1e3681..171926a 100644 --- a/chargebee/models/token/operations.py +++ b/chargebee/models/token/operations.py @@ -6,7 +6,6 @@ @dataclass class Token: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/transaction/operations.py b/chargebee/models/transaction/operations.py index 4527489..2755863 100644 --- a/chargebee/models/transaction/operations.py +++ b/chargebee/models/transaction/operations.py @@ -8,7 +8,6 @@ @dataclass class Transaction: - env: environment.Environment class Type(Enum): diff --git a/chargebee/models/transaction/responses.py b/chargebee/models/transaction/responses.py index 77762fe..9e2efaf 100644 --- a/chargebee/models/transaction/responses.py +++ b/chargebee/models/transaction/responses.py @@ -156,7 +156,6 @@ class ListTransactionResponse: @dataclass class ListResponse(Response): - list: List[ListTransactionResponse] next_offset: str = None @@ -168,7 +167,6 @@ class TransactionsForCustomerTransactionResponse: @dataclass class TransactionsForCustomerResponse(Response): - list: List[TransactionsForCustomerTransactionResponse] next_offset: str = None @@ -180,7 +178,6 @@ class TransactionsForSubscriptionTransactionResponse: @dataclass class TransactionsForSubscriptionResponse(Response): - list: List[TransactionsForSubscriptionTransactionResponse] next_offset: str = None @@ -192,14 +189,12 @@ class PaymentsForInvoiceTransactionResponse: @dataclass class PaymentsForInvoiceResponse(Response): - list: List[PaymentsForInvoiceTransactionResponse] next_offset: str = None @dataclass class RetrieveResponse(Response): - transaction: TransactionResponse diff --git a/chargebee/models/unbilled_charge/operations.py b/chargebee/models/unbilled_charge/operations.py index 87c7ef0..40b396e 100644 --- a/chargebee/models/unbilled_charge/operations.py +++ b/chargebee/models/unbilled_charge/operations.py @@ -8,7 +8,6 @@ @dataclass class UnbilledCharge: - env: environment.Environment class EntityType(Enum): diff --git a/chargebee/models/unbilled_charge/responses.py b/chargebee/models/unbilled_charge/responses.py index 22fbacf..182657a 100644 --- a/chargebee/models/unbilled_charge/responses.py +++ b/chargebee/models/unbilled_charge/responses.py @@ -80,7 +80,6 @@ class ListUnbilledChargeResponse: @dataclass class ListResponse(Response): - list: List[ListUnbilledChargeResponse] next_offset: str = None diff --git a/chargebee/models/usage/operations.py b/chargebee/models/usage/operations.py index 34f471c..c649449 100644 --- a/chargebee/models/usage/operations.py +++ b/chargebee/models/usage/operations.py @@ -7,7 +7,6 @@ @dataclass class Usage: - env: environment.Environment class PdfInvoiceParams(TypedDict): diff --git a/chargebee/models/usage/responses.py b/chargebee/models/usage/responses.py index 7b2a1db..7627776 100644 --- a/chargebee/models/usage/responses.py +++ b/chargebee/models/usage/responses.py @@ -30,7 +30,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - usage: UsageResponse @@ -47,7 +46,6 @@ class ListUsageResponse: @dataclass class ListResponse(Response): - list: List[ListUsageResponse] next_offset: str = None diff --git a/chargebee/models/usage_event/operations.py b/chargebee/models/usage_event/operations.py index de26d2c..989bbca 100644 --- a/chargebee/models/usage_event/operations.py +++ b/chargebee/models/usage_event/operations.py @@ -5,7 +5,6 @@ @dataclass class UsageEvent: - env: environment.Environment class BatchIngestEventParams(TypedDict): diff --git a/chargebee/models/usage_file/operations.py b/chargebee/models/usage_file/operations.py index 0693f90..10a9907 100644 --- a/chargebee/models/usage_file/operations.py +++ b/chargebee/models/usage_file/operations.py @@ -6,7 +6,6 @@ @dataclass class UsageFile: - env: environment.Environment class Status(Enum): diff --git a/chargebee/models/usage_file/responses.py b/chargebee/models/usage_file/responses.py index df87475..ebebd04 100644 --- a/chargebee/models/usage_file/responses.py +++ b/chargebee/models/usage_file/responses.py @@ -41,5 +41,4 @@ class UploadUrlResponse(Response): @dataclass class ProcessingStatusResponse(Response): - usage_file: UsageFileResponse diff --git a/chargebee/models/virtual_bank_account/operations.py b/chargebee/models/virtual_bank_account/operations.py index 68884f6..6aff2f2 100644 --- a/chargebee/models/virtual_bank_account/operations.py +++ b/chargebee/models/virtual_bank_account/operations.py @@ -7,7 +7,6 @@ @dataclass class VirtualBankAccount: - env: environment.Environment class Scheme(Enum): diff --git a/chargebee/models/virtual_bank_account/responses.py b/chargebee/models/virtual_bank_account/responses.py index 8a67041..93ace82 100644 --- a/chargebee/models/virtual_bank_account/responses.py +++ b/chargebee/models/virtual_bank_account/responses.py @@ -41,7 +41,6 @@ class CreateResponse(Response): @dataclass class RetrieveResponse(Response): - virtual_bank_account: VirtualBankAccountResponse @@ -52,7 +51,6 @@ class ListVirtualBankAccountResponse: @dataclass class ListResponse(Response): - list: List[ListVirtualBankAccountResponse] next_offset: str = None diff --git a/chargebee/models/webhook_endpoint/operations.py b/chargebee/models/webhook_endpoint/operations.py index f410665..9533aa7 100644 --- a/chargebee/models/webhook_endpoint/operations.py +++ b/chargebee/models/webhook_endpoint/operations.py @@ -7,7 +7,6 @@ @dataclass class WebhookEndpoint: - env: environment.Environment class ApiVersion(Enum): diff --git a/chargebee/models/webhook_endpoint/responses.py b/chargebee/models/webhook_endpoint/responses.py index 8a48a52..02e619c 100644 --- a/chargebee/models/webhook_endpoint/responses.py +++ b/chargebee/models/webhook_endpoint/responses.py @@ -32,7 +32,6 @@ class UpdateResponse(Response): @dataclass class RetrieveResponse(Response): - webhook_endpoint: WebhookEndpointResponse @@ -49,6 +48,5 @@ class ListWebhookEndpointResponse: @dataclass class ListResponse(Response): - list: List[ListWebhookEndpointResponse] next_offset: str = None