Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
### v3.9.0 (2025-08-19)
* * *
### New Resources:
* WebhookEndpoints has been added.
* OmnichannelOneTimeOrder has been added.
* OmnichannelOneTimeOrderItem has been added.

### New Attributes:
* business_entity_id has been added to Comment.
* business_entity_id has been added to PromotionalCredit.
* quantity has been added to Discount.
* business_entity_id has been added to PromotionalCredit.
* coupon_applicability_mappings[] has been added to QuotedCharge.
* linked_omnichannel_one_time_orders[] has been added to RecordedPurchase.
* quantity has been added to Subscripiton#Discount.

### New Input Parameters:
* transaction[id] has been added to Customer#RecordExcessPaymentRequest.
* discounts[quantity][] has been added to Estimate#CreateSubItemEstimateRequest.
* consolidate_entitlements has been added to CustomerEntitlement#EntitlementsForCustomer.
* discounts[quantity][] has been added to Estimate#CreateSubItemEstimateRequest.
* discounts[quantity][] has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
* discounts[quantity][] has been added to Estimate#UpdateSubscriptionForItemsRequest.
* discounts[quantity][] has been added to Estimate#CreateInvoiceForItemsRequest.
* discounts[quantity][] has been added to HostedPage#CheckoutOneTimeForItemsRequest.
* discounts[quantity][] has been added to HostedPage#CheckoutNewForItemsRequest.
* discounts[quantity][] has been added to HostedPage#CheckoutExistingForItemsRequest.
* discounts[quantity][] has been added to PricingPageSession#CreateForNewSubscriptionRequest.
* discounts[quantity][] has been added to PricingPageSession#CreateForExistingSubscriptionRequest.
* discounts[quantity][] has been added to Purchase#CreateRequest.
* discounts[quantity][] has been added to Purchase#EstimateRequest.
* discounts[quantity][] has been added to Quote#CreateSubItemsForCustomerQuoteRequest.
* discounts[quantity][] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequest.
* discounts[quantity][] has been added to Quote#UpdateSubscriptionQuoteForItemsRequest.
* discounts[quantity][] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequest.
* discounts[quantity][] has been added to Quote#CreateForChargeItemsAndChargesRequest.
* discounts[quantity][] has been added to Quote#EditForChargeItemsAndChargesRequest.
* discounts[quantity][] has been added to Subscription#CreateWithItemsRequest.
* discounts[quantity][] has been added to Subscription#UpdateForItemsRequest.
* discounts[quantity][] has been added to Subscription#ImportForItemsRequest.
* google_play_store[product_id] has been added to RecordedPurchase#CreateRequest.
* google_play_store[order_id] has been added to RecordedPurchase#CreateRequest.

### New Enums
* PAUSE has been added to OmnichannelSubscriptionItemScheduledChange#ChangeType.
* OFFER_QUANTITY has been added to Discount#Type.
* OFFER_QUANTITY has been added to Subscription#Discount#Type.
* OMNICHANNEL_ONE_TIME_ORDER has been added to EntityType.
* OMNICHANNEL_ONE_TIME_ORDER_ITEM has been added to EntityType.
* USAGE_FILE has been added to EntityType.
* OMNICHANNEL_ONE_TIME_ORDER_CREATED has been added to EventType.
* OMNICHANNEL_ONE_TIME_ORDER_ITEM_CANCELLED has been added to EventType.
* USAGE_FILE_INGESTED has been added to EventType.
* OMNICHANNEL_SUBSCRIPTION_ITEM_PAUSE_SCHEDULED has been added to EventType.


### v3.8.0 (2025-07-18)
* * *

Expand Down
12 changes: 12 additions & 0 deletions chargebee/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def __init__(
self.Gift = chargebee.Gift(self.env)
self.Hierarchy = chargebee.Hierarchy(self.env)
self.HostedPage = chargebee.HostedPage(self.env)
self.ImpactedCustomer = chargebee.ImpactedCustomer(self.env)
self.ImpactedItem = chargebee.ImpactedItem(self.env)
self.ImpactedItemPrice = chargebee.ImpactedItemPrice(self.env)
self.ImpactedSubscription = chargebee.ImpactedSubscription(self.env)
Expand All @@ -80,6 +81,10 @@ def __init__(
self.ItemFamily = chargebee.ItemFamily(self.env)
self.ItemPrice = chargebee.ItemPrice(self.env)
self.Metadata = chargebee.Metadata(self.env)
self.OmnichannelOneTimeOrder = chargebee.OmnichannelOneTimeOrder(self.env)
self.OmnichannelOneTimeOrderItem = chargebee.OmnichannelOneTimeOrderItem(
self.env
)
self.OmnichannelSubscription = chargebee.OmnichannelSubscription(self.env)
self.OmnichannelSubscriptionItem = chargebee.OmnichannelSubscriptionItem(
self.env
Expand Down Expand Up @@ -114,6 +119,12 @@ def __init__(
self.SiteMigrationDetail = chargebee.SiteMigrationDetail(self.env)
self.Subscription = chargebee.Subscription(self.env)
self.SubscriptionEntitlement = chargebee.SubscriptionEntitlement(self.env)
self.SubscriptionEntitlementsCreatedDetail = (
chargebee.SubscriptionEntitlementsCreatedDetail(self.env)
)
self.SubscriptionEntitlementsUpdatedDetail = (
chargebee.SubscriptionEntitlementsUpdatedDetail(self.env)
)
self.SubscriptionEstimate = chargebee.SubscriptionEstimate(self.env)
self.TaxWithheld = chargebee.TaxWithheld(self.env)
self.ThirdPartyPaymentMethod = chargebee.ThirdPartyPaymentMethod(self.env)
Expand All @@ -125,6 +136,7 @@ def __init__(
self.UsageEvent = chargebee.UsageEvent(self.env)
self.UsageFile = chargebee.UsageFile(self.env)
self.VirtualBankAccount = chargebee.VirtualBankAccount(self.env)
self.WebhookEndpoint = chargebee.WebhookEndpoint(self.env)

def update_connect_timeout_secs(self, connect_timeout):
self.env.connect_timeout = connect_timeout
Expand Down
20 changes: 20 additions & 0 deletions chargebee/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@

from chargebee.models.hosted_page.operations import HostedPage

from chargebee.models.impacted_customer.operations import ImpactedCustomer

from chargebee.models.impacted_item.operations import ImpactedItem

from chargebee.models.impacted_item_price.operations import ImpactedItemPrice
Expand All @@ -176,6 +178,14 @@

from chargebee.models.metadata.operations import Metadata

from chargebee.models.omnichannel_one_time_order.operations import (
OmnichannelOneTimeOrder,
)

from chargebee.models.omnichannel_one_time_order_item.operations import (
OmnichannelOneTimeOrderItem,
)

from chargebee.models.omnichannel_subscription.operations import OmnichannelSubscription

from chargebee.models.omnichannel_subscription_item.operations import (
Expand Down Expand Up @@ -242,6 +252,14 @@

from chargebee.models.subscription_entitlement.operations import SubscriptionEntitlement

from chargebee.models.subscription_entitlements_created_detail.operations import (
SubscriptionEntitlementsCreatedDetail,
)

from chargebee.models.subscription_entitlements_updated_detail.operations import (
SubscriptionEntitlementsUpdatedDetail,
)

from chargebee.models.subscription_estimate.operations import SubscriptionEstimate

from chargebee.models.tax_withheld.operations import TaxWithheld
Expand All @@ -265,3 +283,5 @@
from chargebee.models.usage_file.operations import UsageFile

from chargebee.models.virtual_bank_account.operations import VirtualBankAccount

from chargebee.models.webhook_endpoint.operations import WebhookEndpoint
1 change: 1 addition & 0 deletions chargebee/models/comment/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CommentResponse(Model):
created_at: int = None
type: str = None
entity_id: str = None
business_entity_id: str = None


@dataclass
Expand Down
132 changes: 67 additions & 65 deletions chargebee/models/credit_note/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ class Status(Enum):
def __str__(self):
return self.value

class EinvoiceStatus(Enum):
SCHEDULED = "scheduled"
SKIPPED = "skipped"
IN_PROGRESS = "in_progress"
SUCCESS = "success"
FAILED = "failed"
REGISTERED = "registered"

def __str__(self):
return self.value

class LineItemEntityType(Enum):
ADHOC = "adhoc"
PLAN_ITEM_PRICE = "plan_item_price"
Expand All @@ -68,7 +57,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"
Expand All @@ -79,14 +68,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"
Expand All @@ -97,18 +79,30 @@ 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 AppliedCreditTaxApplication(Enum):
PRE_TAX = "pre_tax"
POST_TAX = "post_tax"

def __str__(self):
return self.value

class Einvoice(TypedDict):
id: Required[str]
reference_number: NotRequired[str]
status: Required["CreditNote.EinvoiceStatus"]
message: NotRequired[str]
class EinvoiceStatus(Enum):
SCHEDULED = "scheduled"
SKIPPED = "skipped"
IN_PROGRESS = "in_progress"
SUCCESS = "success"
FAILED = "failed"
REGISTERED = "registered"

def __str__(self):
return self.value

class LineItem(TypedDict):
id: NotRequired[str]
Expand Down Expand Up @@ -137,21 +131,6 @@ class LineItem(TypedDict):
entity_id: NotRequired[str]
customer_id: NotRequired[str]

class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
entity_type: Required["CreditNote.DiscountEntityType"]
discount_type: NotRequired["CreditNote.DiscountDiscountType"]
entity_id: NotRequired[str]
coupon_set_code: NotRequired[str]

class LineItemDiscount(TypedDict):
line_item_id: Required[str]
discount_type: Required["CreditNote.LineItemDiscountDiscountType"]
coupon_id: NotRequired[str]
entity_id: NotRequired[str]
discount_amount: Required[int]

class LineItemTier(TypedDict):
line_item_id: NotRequired[str]
starting_unit: Required[int]
Expand All @@ -165,10 +144,12 @@ class LineItemTier(TypedDict):
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["CreditNote.LineItemDiscountDiscountType"]
coupon_id: NotRequired[str]
entity_id: NotRequired[str]
discount_amount: Required[int]

class LineItemTax(TypedDict):
line_item_id: NotRequired[str]
Expand All @@ -187,6 +168,40 @@ class LineItemTax(TypedDict):
tax_amount_in_local_currency: NotRequired[int]
local_currency_code: NotRequired[str]

class LineItemAddress(TypedDict):
line_item_id: NotRequired[str]
first_name: NotRequired[str]
last_name: NotRequired[str]
email: NotRequired[str]
company: NotRequired[str]
phone: NotRequired[str]
line1: NotRequired[str]
line2: NotRequired[str]
line3: NotRequired[str]
city: NotRequired[str]
state_code: NotRequired[str]
state: NotRequired[str]
country: NotRequired[str]
zip: NotRequired[str]
validation_status: NotRequired[enums.ValidationStatus]

class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
entity_type: Required["CreditNote.DiscountEntityType"]
discount_type: NotRequired["CreditNote.DiscountDiscountType"]
entity_id: NotRequired[str]
coupon_set_code: NotRequired[str]

class Tax(TypedDict):
name: Required[str]
amount: Required[int]
description: NotRequired[str]

class TaxOrigin(TypedDict):
country: NotRequired[str]
registration_number: NotRequired[str]

class LinkedRefund(TypedDict):
txn_id: Required[str]
applied_amount: Required[int]
Expand Down Expand Up @@ -237,31 +252,16 @@ class BillingAddress(TypedDict):
zip: NotRequired[str]
validation_status: NotRequired[enums.ValidationStatus]

class Einvoice(TypedDict):
id: Required[str]
reference_number: NotRequired[str]
status: Required["CreditNote.EinvoiceStatus"]
message: NotRequired[str]

class SiteDetailsAtCreation(TypedDict):
timezone: NotRequired[str]
organization_address: NotRequired[Dict[Any, Any]]

class TaxOrigin(TypedDict):
country: NotRequired[str]
registration_number: NotRequired[str]

class LineItemAddress(TypedDict):
line_item_id: NotRequired[str]
first_name: NotRequired[str]
last_name: NotRequired[str]
email: NotRequired[str]
company: NotRequired[str]
phone: NotRequired[str]
line1: NotRequired[str]
line2: NotRequired[str]
line3: NotRequired[str]
city: NotRequired[str]
state_code: NotRequired[str]
state: NotRequired[str]
country: NotRequired[str]
zip: NotRequired[str]
validation_status: NotRequired[enums.ValidationStatus]

class CreateLineItemParams(TypedDict):
reference_line_item_id: NotRequired[str]
unit_amount: NotRequired[int]
Expand All @@ -280,6 +280,7 @@ class RetrieveLineItemParams(TypedDict):
customer_id: NotRequired[Filters.StringFilter]

class RecordRefundTransactionParams(TypedDict):
id: NotRequired[str]
amount: NotRequired[int]
payment_method: Required[enums.PaymentMethod]
reference_number: NotRequired[str]
Expand Down Expand Up @@ -364,6 +365,7 @@ class ImportCreditNoteAllocationParams(TypedDict):
allocated_at: Required[int]

class ImportCreditNoteLinkedRefundParams(TypedDict):
id: NotRequired[str]
amount: Required[int]
payment_method: Required[enums.PaymentMethod]
date: Required[int]
Expand Down
Loading