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
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
### v3.13.0 (2025-10-28)
* * *

### New Attributes:
* reference_transactions has been added to Invoice.
* payment_attempts[] has been added to PaymentIntent.
* checkout_details has been added to PaymentIntent#PaymentAttempt.
* line_item_id has been added to CreditNoteEstimate#Discount.
* line_item_id has been added to CreditNote#Discount.
* line_item_id has been added to InvoiceEstimate#Discount.
* line_item_id has been added to Invoice#Discount.
* line_item_id has been added to InvoiceEstimate#Discount.
* line_item_id has been added to Quote#Discount.
* line_item_id has been added to QuoteLineGroup#Discount.

### Modified Attributes:
* omnichannel_subscription_item_offers has been made optional attribute from required attribute.

### New Input Parameters:
* discount[line_item_id] has been added to CreditNote#ImportCreditNoteRequest.
* discount[line_item_id] has been added to CreditNote#ImportInvoiceRequest.

### New Enums:
* OMNICHANNEL_TRANSACTION_CREATED has been added to EventTypeEnum.
* DEUTSCHE_BANK has been added to Gateway.

### v3.12.2 (2025-10-10)
* * *

Expand Down
2 changes: 2 additions & 0 deletions chargebee/models/credit_note/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class LineItemAddress(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["CreditNote.DiscountEntityType"]
discount_type: NotRequired["CreditNote.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand Down Expand Up @@ -343,6 +344,7 @@ class ImportCreditNoteLineItemTierParams(TypedDict):
unit_amount_in_decimal: NotRequired[str]

class ImportCreditNoteDiscountParams(TypedDict):
line_item_id: NotRequired[str]
entity_type: Required["CreditNote.DiscountEntityType"]
entity_id: NotRequired[str]
description: NotRequired[str]
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/credit_note/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/credit_note_estimate/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class LineItemTax(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["CreditNoteEstimate.DiscountEntityType"]
discount_type: NotRequired["CreditNoteEstimate.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/credit_note_estimate/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/customer/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class HierarchyResponse(Response):

@dataclass
class ListHierarchyDetailCustomerResponse:
hierarchies: List["hierarchy.HierarchyResponse"]
hierarchy: "hierarchy.HierarchyResponse"


@dataclass
Expand Down
2 changes: 2 additions & 0 deletions chargebee/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ class EventType(Enum):
"omnichannel_subscription_item_pause_scheduled"
)
OMNICHANNEL_SUBSCRIPTION_MOVED_IN = "omnichannel_subscription_moved_in"
OMNICHANNEL_TRANSACTION_CREATED = "omnichannel_transaction_created"
PLAN_CREATED = "plan_created"
PLAN_UPDATED = "plan_updated"
PLAN_DELETED = "plan_deleted"
Expand Down Expand Up @@ -741,6 +742,7 @@ class Gateway(Enum):
SOLIDGATE = "solidgate"
PAYSTACK = "paystack"
JP_MORGAN = "jp_morgan"
DEUTSCHE_BANK = "deutsche_bank"
GOCARDLESS = "gocardless"
NOT_APPLICABLE = "not_applicable"

Expand Down
13 changes: 13 additions & 0 deletions chargebee/models/invoice/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class LineItemAddress(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["Invoice.DiscountEntityType"]
discount_type: NotRequired["Invoice.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand All @@ -245,6 +246,17 @@ class LinkedPayment(TypedDict):
txn_date: NotRequired[int]
txn_amount: NotRequired[int]

class ReferenceTransaction(TypedDict):
applied_amount: Required[int]
applied_at: Required[int]
txn_id: Required[str]
txn_status: NotRequired["transaction.Transaction.Status"]
txn_date: NotRequired[int]
txn_amount: NotRequired[int]
txn_type: Required["Invoice.TxnType"]
amount_capturable: Required[int]
authorization_reason: NotRequired["Invoice.AuthorizationReason"]

class DunningAttempt(TypedDict):
attempt: Required[int]
transaction_id: NotRequired[str]
Expand Down Expand Up @@ -663,6 +675,7 @@ class ImportInvoiceLineItemTierParams(TypedDict):
unit_amount_in_decimal: NotRequired[str]

class ImportInvoiceDiscountParams(TypedDict):
line_item_id: NotRequired[str]
entity_type: Required["Invoice.DiscountEntityType"]
entity_id: NotRequired[str]
description: NotRequired[str]
Expand Down
16 changes: 16 additions & 0 deletions chargebee/models/invoice/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down Expand Up @@ -157,6 +158,20 @@ class LinkedPaymentResponse(Model):
txn_amount: int = None


@dataclass
class ReferenceTransactionResponse(Model):
raw_data: Dict[Any, Any] = None
applied_amount: int = None
applied_at: int = None
txn_id: str = None
txn_status: str = None
txn_date: int = None
txn_amount: int = None
txn_type: str = None
amount_capturable: int = None
authorization_reason: str = None


@dataclass
class DunningAttemptResponse(Model):
raw_data: Dict[Any, Any] = None
Expand Down Expand Up @@ -339,6 +354,7 @@ class InvoiceResponse(Model):
taxes: List[TaxResponse] = None
tax_origin: TaxOriginResponse = None
linked_payments: List[LinkedPaymentResponse] = None
reference_transactions: List[ReferenceTransactionResponse] = None
dunning_attempts: List[DunningAttemptResponse] = None
applied_credits: List[AppliedCreditResponse] = None
adjustment_credit_notes: List[AdjustmentCreditNoteResponse] = None
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/invoice_estimate/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class LineItemAddress(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["InvoiceEstimate.DiscountEntityType"]
discount_type: NotRequired["InvoiceEstimate.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/invoice_estimate/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down
25 changes: 25 additions & 0 deletions chargebee/models/payment_intent/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,38 @@ class PaymentAttemptStatus(Enum):
def __str__(self):
return self.value

class PaymentAttemptStatus(Enum):
INITED = "inited"
REQUIRES_IDENTIFICATION = "requires_identification"
REQUIRES_CHALLENGE = "requires_challenge"
REQUIRES_REDIRECTION = "requires_redirection"
AUTHORIZED = "authorized"
REFUSED = "refused"
PENDING_AUTHORIZATION = "pending_authorization"

def __str__(self):
return self.value

class PaymentAttempt(TypedDict):
id: NotRequired[str]
status: Required["PaymentIntent.PaymentAttemptStatus"]
payment_method_type: NotRequired["PaymentIntent.PaymentMethodType"]
id_at_gateway: NotRequired[str]
error_code: NotRequired[str]
error_text: NotRequired[str]
checkout_details: NotRequired[str]
created_at: Required[int]
modified_at: Required[int]
error_detail: NotRequired[gateway_error_detail.GatewayErrorDetailResponse]

class PaymentAttempt(TypedDict):
id: NotRequired[str]
status: Required["PaymentIntent.PaymentAttemptStatus"]
payment_method_type: NotRequired["PaymentIntent.PaymentMethodType"]
id_at_gateway: NotRequired[str]
error_code: NotRequired[str]
error_text: NotRequired[str]
checkout_details: NotRequired[str]
created_at: Required[int]
modified_at: Required[int]
error_detail: NotRequired[gateway_error_detail.GatewayErrorDetailResponse]
Expand Down
17 changes: 17 additions & 0 deletions chargebee/models/payment_intent/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ class PaymentAttemptResponse(Model):
id_at_gateway: str = None
error_code: str = None
error_text: str = None
checkout_details: str = None
created_at: int = None
modified_at: int = None
error_detail: gateway_error_detail.GatewayErrorDetailResponse = None


@dataclass
class PaymentAttemptResponse(Model):
raw_data: Dict[Any, Any] = None
id: str = None
status: str = None
payment_method_type: str = None
id_at_gateway: str = None
error_code: str = None
error_text: str = None
checkout_details: str = None
created_at: int = None
modified_at: int = None
error_detail: gateway_error_detail.GatewayErrorDetailResponse = None
Expand All @@ -39,6 +55,7 @@ class PaymentIntentResponse(Model):
customer_id: str = None
gateway: str = None
active_payment_attempt: PaymentAttemptResponse = None
payment_attempts: List[PaymentAttemptResponse] = None
business_entity_id: str = None


Expand Down
1 change: 1 addition & 0 deletions chargebee/models/quote/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class LineItemTax(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["Quote.DiscountEntityType"]
discount_type: NotRequired["Quote.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/quote/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/quote_line_group/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class LineItemTax(TypedDict):
class Discount(TypedDict):
amount: Required[int]
description: NotRequired[str]
line_item_id: NotRequired[str]
entity_type: Required["QuoteLineGroup.DiscountEntityType"]
discount_type: NotRequired["QuoteLineGroup.DiscountDiscountType"]
entity_id: NotRequired[str]
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/quote_line_group/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class DiscountResponse(Model):
raw_data: Dict[Any, Any] = None
amount: int = None
description: str = None
line_item_id: str = None
entity_type: str = None
discount_type: str = None
entity_id: str = None
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/transaction/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __str__(self):
class AuthorizationReason(Enum):
BLOCKING_FUNDS = "blocking_funds"
VERIFICATION = "verification"
SCHEDULED_CAPTURE = "scheduled_capture"

def __str__(self):
return self.value
Expand Down
2 changes: 1 addition & 1 deletion chargebee/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "3.12.2"
VERSION = "3.13.0"