diff --git a/CHANGELOG.md b/CHANGELOG.md index 823c13d..cb3d742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) * * * diff --git a/chargebee/models/credit_note/operations.py b/chargebee/models/credit_note/operations.py index a4775ee..c135c7b 100644 --- a/chargebee/models/credit_note/operations.py +++ b/chargebee/models/credit_note/operations.py @@ -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] @@ -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] diff --git a/chargebee/models/credit_note/responses.py b/chargebee/models/credit_note/responses.py index 2e7b2b6..03f3844 100644 --- a/chargebee/models/credit_note/responses.py +++ b/chargebee/models/credit_note/responses.py @@ -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 diff --git a/chargebee/models/credit_note_estimate/operations.py b/chargebee/models/credit_note_estimate/operations.py index ec801de..4247cca 100644 --- a/chargebee/models/credit_note_estimate/operations.py +++ b/chargebee/models/credit_note_estimate/operations.py @@ -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] diff --git a/chargebee/models/credit_note_estimate/responses.py b/chargebee/models/credit_note_estimate/responses.py index 721242f..15b5608 100644 --- a/chargebee/models/credit_note_estimate/responses.py +++ b/chargebee/models/credit_note_estimate/responses.py @@ -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 diff --git a/chargebee/models/customer/responses.py b/chargebee/models/customer/responses.py index bab5bb4..800e075 100644 --- a/chargebee/models/customer/responses.py +++ b/chargebee/models/customer/responses.py @@ -365,7 +365,7 @@ class HierarchyResponse(Response): @dataclass class ListHierarchyDetailCustomerResponse: - hierarchies: List["hierarchy.HierarchyResponse"] + hierarchy: "hierarchy.HierarchyResponse" @dataclass diff --git a/chargebee/models/enums.py b/chargebee/models/enums.py index a0f128d..d87413e 100644 --- a/chargebee/models/enums.py +++ b/chargebee/models/enums.py @@ -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" @@ -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" diff --git a/chargebee/models/invoice/operations.py b/chargebee/models/invoice/operations.py index d3e2d19..62423bc 100644 --- a/chargebee/models/invoice/operations.py +++ b/chargebee/models/invoice/operations.py @@ -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] @@ -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] @@ -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] diff --git a/chargebee/models/invoice/responses.py b/chargebee/models/invoice/responses.py index 2583bdb..b196a1a 100644 --- a/chargebee/models/invoice/responses.py +++ b/chargebee/models/invoice/responses.py @@ -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 @@ -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 @@ -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 diff --git a/chargebee/models/invoice_estimate/operations.py b/chargebee/models/invoice_estimate/operations.py index 1304063..f022134 100644 --- a/chargebee/models/invoice_estimate/operations.py +++ b/chargebee/models/invoice_estimate/operations.py @@ -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] diff --git a/chargebee/models/invoice_estimate/responses.py b/chargebee/models/invoice_estimate/responses.py index bdd15f2..fdcb203 100644 --- a/chargebee/models/invoice_estimate/responses.py +++ b/chargebee/models/invoice_estimate/responses.py @@ -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 diff --git a/chargebee/models/payment_intent/operations.py b/chargebee/models/payment_intent/operations.py index c30a0c7..e8154c3 100644 --- a/chargebee/models/payment_intent/operations.py +++ b/chargebee/models/payment_intent/operations.py @@ -57,6 +57,30 @@ 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"] @@ -64,6 +88,7 @@ class PaymentAttempt(TypedDict): 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] diff --git a/chargebee/models/payment_intent/responses.py b/chargebee/models/payment_intent/responses.py index 8587736..4f9e2f6 100644 --- a/chargebee/models/payment_intent/responses.py +++ b/chargebee/models/payment_intent/responses.py @@ -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 @@ -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 diff --git a/chargebee/models/quote/operations.py b/chargebee/models/quote/operations.py index ad2b91b..17c5058 100644 --- a/chargebee/models/quote/operations.py +++ b/chargebee/models/quote/operations.py @@ -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] diff --git a/chargebee/models/quote/responses.py b/chargebee/models/quote/responses.py index 3b01564..ed130bb 100644 --- a/chargebee/models/quote/responses.py +++ b/chargebee/models/quote/responses.py @@ -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 diff --git a/chargebee/models/quote_line_group/operations.py b/chargebee/models/quote_line_group/operations.py index 12f2bd1..c0bfbac 100644 --- a/chargebee/models/quote_line_group/operations.py +++ b/chargebee/models/quote_line_group/operations.py @@ -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] diff --git a/chargebee/models/quote_line_group/responses.py b/chargebee/models/quote_line_group/responses.py index 834c541..8d2e46d 100644 --- a/chargebee/models/quote_line_group/responses.py +++ b/chargebee/models/quote_line_group/responses.py @@ -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 diff --git a/chargebee/models/transaction/operations.py b/chargebee/models/transaction/operations.py index 2755863..ffddf3b 100644 --- a/chargebee/models/transaction/operations.py +++ b/chargebee/models/transaction/operations.py @@ -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 diff --git a/chargebee/version.py b/chargebee/version.py index 671c282..2edc062 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = "3.12.2" +VERSION = "3.13.0"