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 @@
### v2.58.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.

### v2.57.0 ( 2025-09-23)
* * *

Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class LineItemAddress(Model):
fields = ["line_item_id", "first_name", "last_name", "email", "company", "phone", "line1", "line2", "line3", "city", "state_code", "state", "country", "zip", "validation_status"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/credit_note_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand Down
12 changes: 8 additions & 4 deletions chargebee/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LineItemAddress(Model):
fields = ["line_item_id", "first_name", "last_name", "email", "company", "phone", "line1", "line2", "line3", "city", "state_code", "state", "country", "zip", "validation_status"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand All @@ -34,6 +34,9 @@ class TaxOrigin(Model):
class LinkedPayment(Model):
fields = ["txn_id", "applied_amount", "applied_at", "txn_status", "txn_date", "txn_amount"]
pass
class ReferenceTransaction(Model):
fields = ["applied_amount", "applied_at", "txn_id", "txn_status", "txn_date", "txn_amount", "txn_type", "amount_capturable", "authorization_reason"]
pass
class DunningAttempt(Model):
fields = ["attempt", "transaction_id", "dunning_type", "created_at", "txn_status", "txn_amount"]
pass
Expand Down Expand Up @@ -77,9 +80,10 @@ class SiteDetailsAtCreation(Model):
"term_finalized", "is_gifted", "generated_at", "expected_payment_date", "amount_to_collect", \
"round_off_amount", "line_items", "line_item_tiers", "line_item_discounts", "line_item_taxes", \
"line_item_credits", "line_item_addresses", "discounts", "taxes", "tax_origin", "linked_payments", \
"dunning_attempts", "applied_credits", "adjustment_credit_notes", "issued_credit_notes", "linked_orders", \
"notes", "shipping_address", "billing_address", "statement_descriptor", "einvoice", "void_reason_code", \
"deleted", "tax_category", "vat_number_prefix", "channel", "business_entity_id", "site_details_at_creation"]
"reference_transactions", "dunning_attempts", "applied_credits", "adjustment_credit_notes", \
"issued_credit_notes", "linked_orders", "notes", "shipping_address", "billing_address", "statement_descriptor", \
"einvoice", "void_reason_code", "deleted", "tax_category", "vat_number_prefix", "channel", "business_entity_id", \
"site_details_at_creation"]


@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/invoice_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LineItemAddress(Model):
fields = ["line_item_id", "first_name", "last_name", "email", "company", "phone", "line1", "line2", "line3", "city", "state_code", "state", "country", "zip", "validation_status"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand Down
8 changes: 6 additions & 2 deletions chargebee/models/payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@

class PaymentIntent(Model):
class PaymentAttempt(Model):
fields = ["id", "status", "payment_method_type", "id_at_gateway", "error_code", "error_text", "created_at", "modified_at", "error_detail"]
fields = ["id", "status", "payment_method_type", "id_at_gateway", "error_code", "error_text", "checkout_details", "created_at", "modified_at", "error_detail"]
pass
class PaymentAttempt(Model):
fields = ["id", "status", "payment_method_type", "id_at_gateway", "error_code", "error_text", "checkout_details", "created_at", "modified_at", "error_detail"]
pass

fields = ["id", "status", "currency_code", "amount", "gateway_account_id", "expires_at", \
"reference_id", "payment_method_type", "success_url", "failure_url", "created_at", "modified_at", \
"resource_version", "updated_at", "customer_id", "gateway", "active_payment_attempt", "business_entity_id"]
"resource_version", "updated_at", "customer_id", "gateway", "active_payment_attempt", "payment_attempts", \
"business_entity_id"]


@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/quote_line_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class Discount(Model):
fields = ["amount", "description", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
fields = ["amount", "description", "line_item_id", "entity_type", "discount_type", "entity_id", "coupon_set_code"]
pass
class Tax(Model):
fields = ["name", "amount", "description"]
Expand Down
6 changes: 3 additions & 3 deletions chargebee/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def promotional_credit(self):
@property
def invoice(self):
invoice = self._get('invoice', Invoice,
{'line_items' : Invoice.LineItem, 'line_item_tiers' : Invoice.LineItemTier, 'line_item_discounts' : Invoice.LineItemDiscount, 'line_item_taxes' : Invoice.LineItemTax, 'line_item_credits' : Invoice.LineItemCredit, 'line_item_addresses' : Invoice.LineItemAddress, 'discounts' : Invoice.Discount, 'taxes' : Invoice.Tax, 'tax_origin' : Invoice.TaxOrigin, 'linked_payments' : Invoice.LinkedPayment, 'dunning_attempts' : Invoice.DunningAttempt, 'applied_credits' : Invoice.AppliedCredit, 'adjustment_credit_notes' : Invoice.AdjustmentCreditNote, 'issued_credit_notes' : Invoice.IssuedCreditNote, 'linked_orders' : Invoice.LinkedOrder, 'notes' : Invoice.Note, 'shipping_address' : Invoice.ShippingAddress, 'billing_address' : Invoice.BillingAddress, 'statement_descriptor' : Invoice.StatementDescriptor, 'einvoice' : Invoice.Einvoice, 'site_details_at_creation' : Invoice.SiteDetailsAtCreation});
{'line_items' : Invoice.LineItem, 'line_item_tiers' : Invoice.LineItemTier, 'line_item_discounts' : Invoice.LineItemDiscount, 'line_item_taxes' : Invoice.LineItemTax, 'line_item_credits' : Invoice.LineItemCredit, 'line_item_addresses' : Invoice.LineItemAddress, 'discounts' : Invoice.Discount, 'taxes' : Invoice.Tax, 'tax_origin' : Invoice.TaxOrigin, 'linked_payments' : Invoice.LinkedPayment, 'reference_transactions' : Invoice.ReferenceTransaction, 'dunning_attempts' : Invoice.DunningAttempt, 'applied_credits' : Invoice.AppliedCredit, 'adjustment_credit_notes' : Invoice.AdjustmentCreditNote, 'issued_credit_notes' : Invoice.IssuedCreditNote, 'linked_orders' : Invoice.LinkedOrder, 'notes' : Invoice.Note, 'shipping_address' : Invoice.ShippingAddress, 'billing_address' : Invoice.BillingAddress, 'statement_descriptor' : Invoice.StatementDescriptor, 'einvoice' : Invoice.Einvoice, 'site_details_at_creation' : Invoice.SiteDetailsAtCreation});
return invoice;

@property
Expand Down Expand Up @@ -301,7 +301,7 @@ def export(self):
@property
def payment_intent(self):
payment_intent = self._get('payment_intent', PaymentIntent,
{'payment_attempt' : PaymentIntent.PaymentAttempt});
{'payment_attempt' : PaymentIntent.PaymentAttempt, 'payment_attempts' : PaymentIntent.PaymentAttempt});
return payment_intent;

@property
Expand Down Expand Up @@ -581,7 +581,7 @@ def hierarchies(self):
@property
def invoices(self):
invoices = self._get_list('invoices', Invoice,
{'line_items' : Invoice.LineItem, 'line_item_tiers' : Invoice.LineItemTier, 'line_item_discounts' : Invoice.LineItemDiscount, 'line_item_taxes' : Invoice.LineItemTax, 'line_item_credits' : Invoice.LineItemCredit, 'line_item_addresses' : Invoice.LineItemAddress, 'discounts' : Invoice.Discount, 'taxes' : Invoice.Tax, 'tax_origin' : Invoice.TaxOrigin, 'linked_payments' : Invoice.LinkedPayment, 'dunning_attempts' : Invoice.DunningAttempt, 'applied_credits' : Invoice.AppliedCredit, 'adjustment_credit_notes' : Invoice.AdjustmentCreditNote, 'issued_credit_notes' : Invoice.IssuedCreditNote, 'linked_orders' : Invoice.LinkedOrder, 'notes' : Invoice.Note, 'shipping_address' : Invoice.ShippingAddress, 'billing_address' : Invoice.BillingAddress, 'statement_descriptor' : Invoice.StatementDescriptor, 'einvoice' : Invoice.Einvoice, 'site_details_at_creation' : Invoice.SiteDetailsAtCreation});
{'line_items' : Invoice.LineItem, 'line_item_tiers' : Invoice.LineItemTier, 'line_item_discounts' : Invoice.LineItemDiscount, 'line_item_taxes' : Invoice.LineItemTax, 'line_item_credits' : Invoice.LineItemCredit, 'line_item_addresses' : Invoice.LineItemAddress, 'discounts' : Invoice.Discount, 'taxes' : Invoice.Tax, 'tax_origin' : Invoice.TaxOrigin, 'linked_payments' : Invoice.LinkedPayment, 'reference_transactions' : Invoice.ReferenceTransaction, 'dunning_attempts' : Invoice.DunningAttempt, 'applied_credits' : Invoice.AppliedCredit, 'adjustment_credit_notes' : Invoice.AdjustmentCreditNote, 'issued_credit_notes' : Invoice.IssuedCreditNote, 'linked_orders' : Invoice.LinkedOrder, 'notes' : Invoice.Note, 'shipping_address' : Invoice.ShippingAddress, 'billing_address' : Invoice.BillingAddress, 'statement_descriptor' : Invoice.StatementDescriptor, 'einvoice' : Invoice.Einvoice, 'site_details_at_creation' : Invoice.SiteDetailsAtCreation});
return invoices;

@property
Expand Down
2 changes: 1 addition & 1 deletion chargebee/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.57.0'
VERSION = '2.58.0'