diff --git a/CHANGELOG.md b/CHANGELOG.md index 42660b9..dbee68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) * * * diff --git a/chargebee/models/credit_note.py b/chargebee/models/credit_note.py index 4fefaf8..c195886 100644 --- a/chargebee/models/credit_note.py +++ b/chargebee/models/credit_note.py @@ -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"] diff --git a/chargebee/models/credit_note_estimate.py b/chargebee/models/credit_note_estimate.py index f12e80e..55e5e68 100644 --- a/chargebee/models/credit_note_estimate.py +++ b/chargebee/models/credit_note_estimate.py @@ -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"] diff --git a/chargebee/models/invoice.py b/chargebee/models/invoice.py index 8fca9e2..a593a3b 100644 --- a/chargebee/models/invoice.py +++ b/chargebee/models/invoice.py @@ -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"] @@ -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 @@ -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 diff --git a/chargebee/models/invoice_estimate.py b/chargebee/models/invoice_estimate.py index f0bee3a..cbdf64f 100644 --- a/chargebee/models/invoice_estimate.py +++ b/chargebee/models/invoice_estimate.py @@ -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"] diff --git a/chargebee/models/payment_intent.py b/chargebee/models/payment_intent.py index 8bcd3d0..6a0d5ce 100644 --- a/chargebee/models/payment_intent.py +++ b/chargebee/models/payment_intent.py @@ -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 diff --git a/chargebee/models/quote.py b/chargebee/models/quote.py index 38be891..73ab5ef 100644 --- a/chargebee/models/quote.py +++ b/chargebee/models/quote.py @@ -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"] diff --git a/chargebee/models/quote_line_group.py b/chargebee/models/quote_line_group.py index ce2beb7..3e6b487 100644 --- a/chargebee/models/quote_line_group.py +++ b/chargebee/models/quote_line_group.py @@ -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"] diff --git a/chargebee/result.py b/chargebee/result.py index 4348be2..54f01be 100644 --- a/chargebee/result.py +++ b/chargebee/result.py @@ -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 @@ -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 @@ -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 diff --git a/chargebee/version.py b/chargebee/version.py index 30af05b..ee9d362 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = '2.57.0' +VERSION = '2.58.0'