From 136bcfb7f2beadaa653ab6a282dfa02d10b045e4 Mon Sep 17 00:00:00 2001 From: cb-alish Date: Wed, 26 Nov 2025 11:14:15 +0530 Subject: [PATCH] Releasing v2.59.0 --- CHANGELOG.md | 40 +++++++++++++++++++++++++++ chargebee/models/__init__.py | 2 ++ chargebee/models/credit_note.py | 12 ++++---- chargebee/models/einvoice.py | 9 ++++++ chargebee/models/gift.py | 1 + chargebee/models/invoice.py | 10 +++---- chargebee/models/item_price.py | 6 ++++ chargebee/models/quoted_delta_ramp.py | 12 ++++++++ chargebee/result.py | 11 ++++++++ chargebee/version.py | 2 +- 10 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 chargebee/models/einvoice.py create mode 100644 chargebee/models/quoted_delta_ramp.py diff --git a/CHANGELOG.md b/CHANGELOG.md index dbee68b..458da92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,43 @@ +### v2.59.0 (2025-11-26) +* * * + +### New Resources: +* Einvoice has been added. +* QuotedDeltaRamp has been added. + +### New Attributes: +* line_items_next_offset has been added to CreditNote. +* line_items_next_offset has been added to Invoice. +* credit_lines has been added to SalesOrder. +* billable_unit_price has been added to SalesOrder#LineItem. +* billable_quantity has been added to SalesOrder#LineItem. +* billable_amount has been added to SalesOrder#LineItem. + +### New Endpoint: +* move has been added to ItemPrice. + +### New Parameters: +* line_items_limit has been added to CreditNote#RetrieveRequest. +* line_items_offset has been added to CreditNote#RetrieveRequest. +* line_items_limit has been added to Invoice#RetrieveRequest. +* line_items_offset has been added to Invoice#RetrieveRequest. +* item_tiers has been added to Estimate#GiftSubscriptionForItemsRequest. +* unit_price has been added to Estimate#SubscriptionItems#GiftSubscriptionForItemsRequest. +* unit_price_in_decimal has been added to Estimate#SubscriptionItems#GiftSubscriptionForItemsRequest. +* item_tiers has been added to Gift#CreateForItemsRequest. +* meta_data has been added to Gift#CreateForItemsRequest. +* unit_price has been added to Gift#SubscriptionItems#CreateForItemsRequest. +* unit_price_in_decimal has been added to Gift#SubscriptionItems#CreateForItemsRequest. +* item_tiers has been added to HostedPage#CheckoutGiftForItemsRequest. +* unit_price has been added to HostedPage#SubscriptionItems#CheckoutGiftForItemsRequest. +* unit_price_in_decimal has been added to HostedPage#SubscriptionItems#CheckoutGiftForItemsRequest. +* auto_select_local_currency has been added to PricingPageSession#CreateForNewSubscriptionRequest. + +### New Enums: +* EZIDEBIT has been added to GatewayEnum. +* BUSINESS_RULE has been added to EntityTypeEnum. +* RULESET has been added to EntityTypeEnum. + ### v2.58.0 ( 2025-10-28) * * * diff --git a/chargebee/models/__init__.py b/chargebee/models/__init__.py index 70512a0..9c9435d 100644 --- a/chargebee/models/__init__.py +++ b/chargebee/models/__init__.py @@ -23,6 +23,7 @@ from chargebee.models.differential_price import DifferentialPrice from chargebee.models.discount import Discount from chargebee.models.download import Download +from chargebee.models.einvoice import Einvoice from chargebee.models.entitlement import Entitlement from chargebee.models.entitlement_override import EntitlementOverride from chargebee.models.estimate import Estimate @@ -73,6 +74,7 @@ from chargebee.models.quote import Quote from chargebee.models.quote_line_group import QuoteLineGroup from chargebee.models.quoted_charge import QuotedCharge +from chargebee.models.quoted_delta_ramp import QuotedDeltaRamp from chargebee.models.quoted_ramp import QuotedRamp from chargebee.models.quoted_subscription import QuotedSubscription from chargebee.models.ramp import Ramp diff --git a/chargebee/models/credit_note.py b/chargebee/models/credit_note.py index c195886..a87b60a 100644 --- a/chargebee/models/credit_note.py +++ b/chargebee/models/credit_note.py @@ -50,12 +50,12 @@ class SiteDetailsAtCreation(Model): fields = ["id", "customer_id", "subscription_id", "reference_invoice_id", "type", "reason_code", \ "status", "vat_number", "date", "price_type", "currency_code", "total", "amount_allocated", \ "amount_refunded", "amount_available", "refunded_at", "voided_at", "generated_at", "resource_version", \ - "updated_at", "channel", "sub_total", "sub_total_in_local_currency", "total_in_local_currency", \ - "local_currency_code", "round_off_amount", "fractional_correction", "line_items", "line_item_tiers", \ - "line_item_discounts", "line_item_taxes", "line_item_addresses", "discounts", "taxes", "tax_origin", \ - "linked_refunds", "allocations", "deleted", "tax_category", "local_currency_exchange_rate", \ - "create_reason_code", "vat_number_prefix", "business_entity_id", "shipping_address", "billing_address", \ - "einvoice", "site_details_at_creation"] + "updated_at", "channel", "line_items_next_offset", "sub_total", "sub_total_in_local_currency", \ + "total_in_local_currency", "local_currency_code", "round_off_amount", "fractional_correction", \ + "line_items", "line_item_tiers", "line_item_discounts", "line_item_taxes", "line_item_addresses", \ + "discounts", "taxes", "tax_origin", "linked_refunds", "allocations", "deleted", "tax_category", \ + "local_currency_exchange_rate", "create_reason_code", "vat_number_prefix", "business_entity_id", \ + "shipping_address", "billing_address", "einvoice", "site_details_at_creation"] @staticmethod diff --git a/chargebee/models/einvoice.py b/chargebee/models/einvoice.py new file mode 100644 index 0000000..31ee5af --- /dev/null +++ b/chargebee/models/einvoice.py @@ -0,0 +1,9 @@ +import json +from chargebee.model import Model +from chargebee import request +from chargebee import APIError + +class Einvoice(Model): + + fields = ["id", "reference_number", "status", "message"] + diff --git a/chargebee/models/gift.py b/chargebee/models/gift.py index b6e4244..4375669 100644 --- a/chargebee/models/gift.py +++ b/chargebee/models/gift.py @@ -28,6 +28,7 @@ def create(params, env=None, headers=None): @staticmethod def create_for_items(params, env=None, headers=None): json_keys = { + "meta_data": 0, "additional_information": 1, } return request.send('post', request.uri_path("gifts","create_for_items"), params, env, headers, None, False,json_keys) diff --git a/chargebee/models/invoice.py b/chargebee/models/invoice.py index a593a3b..4726d95 100644 --- a/chargebee/models/invoice.py +++ b/chargebee/models/invoice.py @@ -76,11 +76,11 @@ class SiteDetailsAtCreation(Model): "local_currency_exchange_rate", "currency_code", "local_currency_code", "tax", "sub_total", \ "sub_total_in_local_currency", "total", "total_in_local_currency", "amount_due", "amount_adjusted", \ "amount_paid", "paid_at", "write_off_amount", "credits_applied", "dunning_status", "next_retry_at", \ - "voided_at", "resource_version", "updated_at", "first_invoice", "new_sales_amount", "has_advance_charges", \ - "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", \ - "reference_transactions", "dunning_attempts", "applied_credits", "adjustment_credit_notes", \ + "voided_at", "resource_version", "updated_at", "line_items_next_offset", "first_invoice", "new_sales_amount", \ + "has_advance_charges", "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", "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"] diff --git a/chargebee/models/item_price.py b/chargebee/models/item_price.py index 4c06323..d916ce4 100644 --- a/chargebee/models/item_price.py +++ b/chargebee/models/item_price.py @@ -70,3 +70,9 @@ def find_applicable_item_prices(id, params=None, env=None, headers=None): json_keys = { } return request.send('get', request.uri_path("item_prices",id,"applicable_item_prices"), params, env, headers, None, False,json_keys) + + @staticmethod + def move_item_price(id, params, env=None, headers=None): + json_keys = { + } + return request.send('post', request.uri_path("item_prices",id,"move"), params, env, headers, None, False,json_keys) diff --git a/chargebee/models/quoted_delta_ramp.py b/chargebee/models/quoted_delta_ramp.py new file mode 100644 index 0000000..ade8b0c --- /dev/null +++ b/chargebee/models/quoted_delta_ramp.py @@ -0,0 +1,12 @@ +import json +from chargebee.model import Model +from chargebee import request +from chargebee import APIError + +class QuotedDeltaRamp(Model): + class LineItem(Model): + fields = ["item_level_discount_per_billing_cycle_in_decimal"] + pass + + fields = ["line_items"] + diff --git a/chargebee/result.py b/chargebee/result.py index 54f01be..fe5e24f 100644 --- a/chargebee/result.py +++ b/chargebee/result.py @@ -119,6 +119,11 @@ def payment_schedule(self): {'schedule_entries' : PaymentSchedule.ScheduleEntry}); return payment_schedule; + @property + def einvoice(self): + einvoice = self._get('einvoice', Einvoice); + return einvoice; + @property def tax_withheld(self): tax_withheld = self._get('tax_withheld', TaxWithheld); @@ -205,6 +210,12 @@ def quoted_ramp(self): {'line_items' : QuotedRamp.LineItem, 'discounts' : QuotedRamp.Discount, 'item_tiers' : QuotedRamp.ItemTier, 'coupon_applicability_mappings' : QuotedRamp.CouponApplicabilityMapping}); return quoted_ramp; + @property + def quoted_delta_ramp(self): + quoted_delta_ramp = self._get('quoted_delta_ramp', QuotedDeltaRamp, + {'line_items' : QuotedDeltaRamp.LineItem}); + return quoted_delta_ramp; + @property def billing_configuration(self): billing_configuration = self._get('billing_configuration', BillingConfiguration, diff --git a/chargebee/version.py b/chargebee/version.py index ee9d362..b74ff65 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = '2.58.0' +VERSION = '2.59.0'