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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
* * *

Expand Down
2 changes: 2 additions & 0 deletions chargebee/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chargebee/models/credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions chargebee/models/einvoice.py
Original file line number Diff line number Diff line change
@@ -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"]

1 change: 1 addition & 0 deletions chargebee/models/gift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions chargebee/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 6 additions & 0 deletions chargebee/models/item_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 12 additions & 0 deletions chargebee/models/quoted_delta_ramp.py
Original file line number Diff line number Diff line change
@@ -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"]

11 changes: 11 additions & 0 deletions chargebee/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
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.58.0'
VERSION = '2.59.0'