Skip to content

Commit 7b2ce8a

Browse files
authored
Release version 3.9.0 (#84)
1 parent fb957a7 commit 7b2ce8a

47 files changed

Lines changed: 894 additions & 277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
### v3.9.0 (2025-08-19)
2+
* * *
3+
### New Resources:
4+
* WebhookEndpoints has been added.
5+
* OmnichannelOneTimeOrder has been added.
6+
* OmnichannelOneTimeOrderItem has been added.
7+
8+
### New Attributes:
9+
* business_entity_id has been added to Comment.
10+
* business_entity_id has been added to PromotionalCredit.
11+
* quantity has been added to Discount.
12+
* business_entity_id has been added to PromotionalCredit.
13+
* coupon_applicability_mappings[] has been added to QuotedCharge.
14+
* linked_omnichannel_one_time_orders[] has been added to RecordedPurchase.
15+
* quantity has been added to Subscripiton#Discount.
16+
17+
### New Input Parameters:
18+
* transaction[id] has been added to Customer#RecordExcessPaymentRequest.
19+
* discounts[quantity][] has been added to Estimate#CreateSubItemEstimateRequest.
20+
* consolidate_entitlements has been added to CustomerEntitlement#EntitlementsForCustomer.
21+
* discounts[quantity][] has been added to Estimate#CreateSubItemEstimateRequest.
22+
* discounts[quantity][] has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
23+
* discounts[quantity][] has been added to Estimate#UpdateSubscriptionForItemsRequest.
24+
* discounts[quantity][] has been added to Estimate#CreateInvoiceForItemsRequest.
25+
* discounts[quantity][] has been added to HostedPage#CheckoutOneTimeForItemsRequest.
26+
* discounts[quantity][] has been added to HostedPage#CheckoutNewForItemsRequest.
27+
* discounts[quantity][] has been added to HostedPage#CheckoutExistingForItemsRequest.
28+
* discounts[quantity][] has been added to PricingPageSession#CreateForNewSubscriptionRequest.
29+
* discounts[quantity][] has been added to PricingPageSession#CreateForExistingSubscriptionRequest.
30+
* discounts[quantity][] has been added to Purchase#CreateRequest.
31+
* discounts[quantity][] has been added to Purchase#EstimateRequest.
32+
* discounts[quantity][] has been added to Quote#CreateSubItemsForCustomerQuoteRequest.
33+
* discounts[quantity][] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequest.
34+
* discounts[quantity][] has been added to Quote#UpdateSubscriptionQuoteForItemsRequest.
35+
* discounts[quantity][] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequest.
36+
* discounts[quantity][] has been added to Quote#CreateForChargeItemsAndChargesRequest.
37+
* discounts[quantity][] has been added to Quote#EditForChargeItemsAndChargesRequest.
38+
* discounts[quantity][] has been added to Subscription#CreateWithItemsRequest.
39+
* discounts[quantity][] has been added to Subscription#UpdateForItemsRequest.
40+
* discounts[quantity][] has been added to Subscription#ImportForItemsRequest.
41+
* google_play_store[product_id] has been added to RecordedPurchase#CreateRequest.
42+
* google_play_store[order_id] has been added to RecordedPurchase#CreateRequest.
43+
44+
### New Enums
45+
* PAUSE has been added to OmnichannelSubscriptionItemScheduledChange#ChangeType.
46+
* OFFER_QUANTITY has been added to Discount#Type.
47+
* OFFER_QUANTITY has been added to Subscription#Discount#Type.
48+
* OMNICHANNEL_ONE_TIME_ORDER has been added to EntityType.
49+
* OMNICHANNEL_ONE_TIME_ORDER_ITEM has been added to EntityType.
50+
* USAGE_FILE has been added to EntityType.
51+
* OMNICHANNEL_ONE_TIME_ORDER_CREATED has been added to EventType.
52+
* OMNICHANNEL_ONE_TIME_ORDER_ITEM_CANCELLED has been added to EventType.
53+
* USAGE_FILE_INGESTED has been added to EventType.
54+
* OMNICHANNEL_SUBSCRIPTION_ITEM_PAUSE_SCHEDULED has been added to EventType.
55+
56+
157
### v3.8.0 (2025-07-18)
258
* * *
359

chargebee/main.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def __init__(
6969
self.Gift = chargebee.Gift(self.env)
7070
self.Hierarchy = chargebee.Hierarchy(self.env)
7171
self.HostedPage = chargebee.HostedPage(self.env)
72+
self.ImpactedCustomer = chargebee.ImpactedCustomer(self.env)
7273
self.ImpactedItem = chargebee.ImpactedItem(self.env)
7374
self.ImpactedItemPrice = chargebee.ImpactedItemPrice(self.env)
7475
self.ImpactedSubscription = chargebee.ImpactedSubscription(self.env)
@@ -80,6 +81,10 @@ def __init__(
8081
self.ItemFamily = chargebee.ItemFamily(self.env)
8182
self.ItemPrice = chargebee.ItemPrice(self.env)
8283
self.Metadata = chargebee.Metadata(self.env)
84+
self.OmnichannelOneTimeOrder = chargebee.OmnichannelOneTimeOrder(self.env)
85+
self.OmnichannelOneTimeOrderItem = chargebee.OmnichannelOneTimeOrderItem(
86+
self.env
87+
)
8388
self.OmnichannelSubscription = chargebee.OmnichannelSubscription(self.env)
8489
self.OmnichannelSubscriptionItem = chargebee.OmnichannelSubscriptionItem(
8590
self.env
@@ -114,6 +119,12 @@ def __init__(
114119
self.SiteMigrationDetail = chargebee.SiteMigrationDetail(self.env)
115120
self.Subscription = chargebee.Subscription(self.env)
116121
self.SubscriptionEntitlement = chargebee.SubscriptionEntitlement(self.env)
122+
self.SubscriptionEntitlementsCreatedDetail = (
123+
chargebee.SubscriptionEntitlementsCreatedDetail(self.env)
124+
)
125+
self.SubscriptionEntitlementsUpdatedDetail = (
126+
chargebee.SubscriptionEntitlementsUpdatedDetail(self.env)
127+
)
117128
self.SubscriptionEstimate = chargebee.SubscriptionEstimate(self.env)
118129
self.TaxWithheld = chargebee.TaxWithheld(self.env)
119130
self.ThirdPartyPaymentMethod = chargebee.ThirdPartyPaymentMethod(self.env)
@@ -125,6 +136,7 @@ def __init__(
125136
self.UsageEvent = chargebee.UsageEvent(self.env)
126137
self.UsageFile = chargebee.UsageFile(self.env)
127138
self.VirtualBankAccount = chargebee.VirtualBankAccount(self.env)
139+
self.WebhookEndpoint = chargebee.WebhookEndpoint(self.env)
128140

129141
def update_connect_timeout_secs(self, connect_timeout):
130142
self.env.connect_timeout = connect_timeout

chargebee/models/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154

155155
from chargebee.models.hosted_page.operations import HostedPage
156156

157+
from chargebee.models.impacted_customer.operations import ImpactedCustomer
158+
157159
from chargebee.models.impacted_item.operations import ImpactedItem
158160

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

177179
from chargebee.models.metadata.operations import Metadata
178180

181+
from chargebee.models.omnichannel_one_time_order.operations import (
182+
OmnichannelOneTimeOrder,
183+
)
184+
185+
from chargebee.models.omnichannel_one_time_order_item.operations import (
186+
OmnichannelOneTimeOrderItem,
187+
)
188+
179189
from chargebee.models.omnichannel_subscription.operations import OmnichannelSubscription
180190

181191
from chargebee.models.omnichannel_subscription_item.operations import (
@@ -242,6 +252,14 @@
242252

243253
from chargebee.models.subscription_entitlement.operations import SubscriptionEntitlement
244254

255+
from chargebee.models.subscription_entitlements_created_detail.operations import (
256+
SubscriptionEntitlementsCreatedDetail,
257+
)
258+
259+
from chargebee.models.subscription_entitlements_updated_detail.operations import (
260+
SubscriptionEntitlementsUpdatedDetail,
261+
)
262+
245263
from chargebee.models.subscription_estimate.operations import SubscriptionEstimate
246264

247265
from chargebee.models.tax_withheld.operations import TaxWithheld
@@ -265,3 +283,5 @@
265283
from chargebee.models.usage_file.operations import UsageFile
266284

267285
from chargebee.models.virtual_bank_account.operations import VirtualBankAccount
286+
287+
from chargebee.models.webhook_endpoint.operations import WebhookEndpoint

chargebee/models/comment/responses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class CommentResponse(Model):
1414
created_at: int = None
1515
type: str = None
1616
entity_id: str = None
17+
business_entity_id: str = None
1718

1819

1920
@dataclass

chargebee/models/credit_note/operations.py

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@ class Status(Enum):
4545
def __str__(self):
4646
return self.value
4747

48-
class EinvoiceStatus(Enum):
49-
SCHEDULED = "scheduled"
50-
SKIPPED = "skipped"
51-
IN_PROGRESS = "in_progress"
52-
SUCCESS = "success"
53-
FAILED = "failed"
54-
REGISTERED = "registered"
55-
56-
def __str__(self):
57-
return self.value
58-
5948
class LineItemEntityType(Enum):
6049
ADHOC = "adhoc"
6150
PLAN_ITEM_PRICE = "plan_item_price"
@@ -68,7 +57,7 @@ class LineItemEntityType(Enum):
6857
def __str__(self):
6958
return self.value
7059

71-
class DiscountEntityType(Enum):
60+
class LineItemDiscountDiscountType(Enum):
7261
ITEM_LEVEL_COUPON = "item_level_coupon"
7362
DOCUMENT_LEVEL_COUPON = "document_level_coupon"
7463
PROMOTIONAL_CREDITS = "promotional_credits"
@@ -79,14 +68,7 @@ class DiscountEntityType(Enum):
7968
def __str__(self):
8069
return self.value
8170

82-
class DiscountDiscountType(Enum):
83-
FIXED_AMOUNT = "fixed_amount"
84-
PERCENTAGE = "percentage"
85-
86-
def __str__(self):
87-
return self.value
88-
89-
class LineItemDiscountDiscountType(Enum):
71+
class DiscountEntityType(Enum):
9072
ITEM_LEVEL_COUPON = "item_level_coupon"
9173
DOCUMENT_LEVEL_COUPON = "document_level_coupon"
9274
PROMOTIONAL_CREDITS = "promotional_credits"
@@ -97,18 +79,30 @@ class LineItemDiscountDiscountType(Enum):
9779
def __str__(self):
9880
return self.value
9981

82+
class DiscountDiscountType(Enum):
83+
FIXED_AMOUNT = "fixed_amount"
84+
PERCENTAGE = "percentage"
85+
86+
def __str__(self):
87+
return self.value
88+
10089
class AppliedCreditTaxApplication(Enum):
10190
PRE_TAX = "pre_tax"
10291
POST_TAX = "post_tax"
10392

10493
def __str__(self):
10594
return self.value
10695

107-
class Einvoice(TypedDict):
108-
id: Required[str]
109-
reference_number: NotRequired[str]
110-
status: Required["CreditNote.EinvoiceStatus"]
111-
message: NotRequired[str]
96+
class EinvoiceStatus(Enum):
97+
SCHEDULED = "scheduled"
98+
SKIPPED = "skipped"
99+
IN_PROGRESS = "in_progress"
100+
SUCCESS = "success"
101+
FAILED = "failed"
102+
REGISTERED = "registered"
103+
104+
def __str__(self):
105+
return self.value
112106

113107
class LineItem(TypedDict):
114108
id: NotRequired[str]
@@ -137,21 +131,6 @@ class LineItem(TypedDict):
137131
entity_id: NotRequired[str]
138132
customer_id: NotRequired[str]
139133

140-
class Discount(TypedDict):
141-
amount: Required[int]
142-
description: NotRequired[str]
143-
entity_type: Required["CreditNote.DiscountEntityType"]
144-
discount_type: NotRequired["CreditNote.DiscountDiscountType"]
145-
entity_id: NotRequired[str]
146-
coupon_set_code: NotRequired[str]
147-
148-
class LineItemDiscount(TypedDict):
149-
line_item_id: Required[str]
150-
discount_type: Required["CreditNote.LineItemDiscountDiscountType"]
151-
coupon_id: NotRequired[str]
152-
entity_id: NotRequired[str]
153-
discount_amount: Required[int]
154-
155134
class LineItemTier(TypedDict):
156135
line_item_id: NotRequired[str]
157136
starting_unit: Required[int]
@@ -165,10 +144,12 @@ class LineItemTier(TypedDict):
165144
pricing_type: NotRequired[enums.PricingType]
166145
package_size: NotRequired[int]
167146

168-
class Tax(TypedDict):
169-
name: Required[str]
170-
amount: Required[int]
171-
description: NotRequired[str]
147+
class LineItemDiscount(TypedDict):
148+
line_item_id: Required[str]
149+
discount_type: Required["CreditNote.LineItemDiscountDiscountType"]
150+
coupon_id: NotRequired[str]
151+
entity_id: NotRequired[str]
152+
discount_amount: Required[int]
172153

173154
class LineItemTax(TypedDict):
174155
line_item_id: NotRequired[str]
@@ -187,6 +168,40 @@ class LineItemTax(TypedDict):
187168
tax_amount_in_local_currency: NotRequired[int]
188169
local_currency_code: NotRequired[str]
189170

171+
class LineItemAddress(TypedDict):
172+
line_item_id: NotRequired[str]
173+
first_name: NotRequired[str]
174+
last_name: NotRequired[str]
175+
email: NotRequired[str]
176+
company: NotRequired[str]
177+
phone: NotRequired[str]
178+
line1: NotRequired[str]
179+
line2: NotRequired[str]
180+
line3: NotRequired[str]
181+
city: NotRequired[str]
182+
state_code: NotRequired[str]
183+
state: NotRequired[str]
184+
country: NotRequired[str]
185+
zip: NotRequired[str]
186+
validation_status: NotRequired[enums.ValidationStatus]
187+
188+
class Discount(TypedDict):
189+
amount: Required[int]
190+
description: NotRequired[str]
191+
entity_type: Required["CreditNote.DiscountEntityType"]
192+
discount_type: NotRequired["CreditNote.DiscountDiscountType"]
193+
entity_id: NotRequired[str]
194+
coupon_set_code: NotRequired[str]
195+
196+
class Tax(TypedDict):
197+
name: Required[str]
198+
amount: Required[int]
199+
description: NotRequired[str]
200+
201+
class TaxOrigin(TypedDict):
202+
country: NotRequired[str]
203+
registration_number: NotRequired[str]
204+
190205
class LinkedRefund(TypedDict):
191206
txn_id: Required[str]
192207
applied_amount: Required[int]
@@ -237,31 +252,16 @@ class BillingAddress(TypedDict):
237252
zip: NotRequired[str]
238253
validation_status: NotRequired[enums.ValidationStatus]
239254

255+
class Einvoice(TypedDict):
256+
id: Required[str]
257+
reference_number: NotRequired[str]
258+
status: Required["CreditNote.EinvoiceStatus"]
259+
message: NotRequired[str]
260+
240261
class SiteDetailsAtCreation(TypedDict):
241262
timezone: NotRequired[str]
242263
organization_address: NotRequired[Dict[Any, Any]]
243264

244-
class TaxOrigin(TypedDict):
245-
country: NotRequired[str]
246-
registration_number: NotRequired[str]
247-
248-
class LineItemAddress(TypedDict):
249-
line_item_id: NotRequired[str]
250-
first_name: NotRequired[str]
251-
last_name: NotRequired[str]
252-
email: NotRequired[str]
253-
company: NotRequired[str]
254-
phone: NotRequired[str]
255-
line1: NotRequired[str]
256-
line2: NotRequired[str]
257-
line3: NotRequired[str]
258-
city: NotRequired[str]
259-
state_code: NotRequired[str]
260-
state: NotRequired[str]
261-
country: NotRequired[str]
262-
zip: NotRequired[str]
263-
validation_status: NotRequired[enums.ValidationStatus]
264-
265265
class CreateLineItemParams(TypedDict):
266266
reference_line_item_id: NotRequired[str]
267267
unit_amount: NotRequired[int]
@@ -280,6 +280,7 @@ class RetrieveLineItemParams(TypedDict):
280280
customer_id: NotRequired[Filters.StringFilter]
281281

282282
class RecordRefundTransactionParams(TypedDict):
283+
id: NotRequired[str]
283284
amount: NotRequired[int]
284285
payment_method: Required[enums.PaymentMethod]
285286
reference_number: NotRequired[str]
@@ -364,6 +365,7 @@ class ImportCreditNoteAllocationParams(TypedDict):
364365
allocated_at: Required[int]
365366

366367
class ImportCreditNoteLinkedRefundParams(TypedDict):
368+
id: NotRequired[str]
367369
amount: Required[int]
368370
payment_method: Required[enums.PaymentMethod]
369371
date: Required[int]

0 commit comments

Comments
 (0)