Skip to content

Commit bcfe29d

Browse files
authored
Merge pull request #118 from chargebee/release-v2.69.0
Release v2.69.0
2 parents 5fc964f + ae5f680 commit bcfe29d

10 files changed

Lines changed: 102 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
### v2.69.0 (2026-03-02)
2+
* * *
3+
### New Resources:
4+
- [`UsageCharge`](https://apidocs.chargebee.com/docs/api/usage_charges) has been added.
5+
- [`UsageSummary`](https://apidocs.chargebee.com/docs/api/usage_summaries) has been added.
6+
7+
8+
### New Attributes:
9+
- [`free_period`](https://apidocs.chargebee.com/docs/api/quoted_subscriptions/quoted-subscription-object#free_period) has been added to [`QuotedSubscription`](https://apidocs.chargebee.com/docs/api/quoted_subscriptions).
10+
- [`free_period_unit`](https://apidocs.chargebee.com/docs/api/quoted_subscriptions/quoted-subscription-object#free_period_unit) has been added to [`QuotedSubscription`](https://apidocs.chargebee.com/docs/api/quoted_subscriptions).
11+
12+
13+
### New Parameters:
14+
- [`net_term_days`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#net_term_days) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
15+
- [`contract_term`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-existing-subscription#contract_term) has been added as request body parameter to [`create_pricing_page_for_existing_subscription`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-existing-subscription) in [`PricingPageSession`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions).
16+
- [`contract_term`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-new-subscription#contract_term) has been added as request body parameter to [`create_pricing_page_for_new_subscription`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-new-subscription) in [`PricingPageSession`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions).
17+
- [`subscription.free_period`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items#subscription_free_period) has been added as request body parameter to [`create_a_quote_for_a_new_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
18+
- [`subscription.free_period_unit`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items#subscription_free_period_unit) has been added as request body parameter to [`create_a_quote_for_a_new_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
19+
- [`subscription.free_period`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items#subscription_free_period) has been added as request body parameter to [`edit_create_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
20+
- [`subscription.free_period_unit`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items#subscription_free_period_unit) has been added as request body parameter to [`edit_create_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
21+
22+
23+
### New Enums:
24+
- `month`, `week`, `day`, `hour`, and `minute` have been added as new values enum `WindowSize`.
25+
- `cancel`, `renew_once`, `renew`, and `evergreen` have been added as new values to enum request body parameter `contract_term.action_at_term_end` in [`create_pricing_page_for_existing_subscription`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-existing-subscription) of [`PricingPageSession`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions).
26+
- `cancel`, `renew_once`, `renew`, and `evergreen` have been added as new values to enum request body parameter `contract_term.action_at_term_end` in [`create_pricing_page_for_new_subscription`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions/create-pricing-page-for-new-subscription) of [`PricingPageSession`](https://apidocs.chargebee.com/docs/api/pricing_page_sessions).
27+
28+
29+
130
### v2.68.0 (2026-02-06)
231
* * *
332
### New Attributes:

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
chargebee (2.68.0)
4+
chargebee (2.69.0)
55
cgi (>= 0.1.0, < 1.0.0)
66

77
GEM

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ update-version:
1515
@echo "$(VERSION)" > $(VERSION_FILE)
1616
@perl -pi -e 's|s\.version\s*=\s*'\''[.\-\d\w]+'\''|s.version = '\''$(VERSION)'\''|' $(GEMSPEC_FILE)
1717
@perl -pi -e 's|VERSION = '\''[.\-\d\w]+'\''|VERSION = '\''$(VERSION)'\''|' $(LIB_FILE)
18-
@echo "Updated version to $(VERSION)"
18+
@perl -pi -e "s|s\\.date\\s*=\\s*'[^']*'|s.date = '$(shell date +%Y-%m-%d)'|" $(GEMSPEC_FILE)
19+
@echo "Updated version to $(VERSION) and date to $(shell date +%Y-%m-%d)"
1920
@if [ -f "Gemfile.lock" ]; then \
2021
echo "Updating Gemfile.lock..."; \
2122
$(BUNDLE) install --quiet; \
@@ -66,7 +67,7 @@ validate:
6667
check: test
6768
@echo "All checks passed!"
6869

69-
build: clean
70+
build: clean update-manifest
7071
@echo "Building gem..."
7172
@$(GEM) build $(GEMSPEC_FILE)
7273

@@ -95,4 +96,17 @@ outdated:
9596
@$(BUNDLE) outdated
9697

9798
format:
98-
@echo "Formatter not configured."
99+
@echo "Formatter not configured."
100+
101+
update-manifest:
102+
@echo "Updating file manifest in $(GEMSPEC_FILE)..."
103+
@$(RUBY) -e \
104+
'files = `git ls-files`.split("\n").sort \
105+
.reject { |f| f =~ /^\./ } \
106+
.reject { |f| f =~ /^(rdoc|pkg)/ } \
107+
.map { |f| " #{f}" } \
108+
.join("\n"); \
109+
spec = File.read("$(GEMSPEC_FILE)"); \
110+
spec.sub!(/s\.files = %w\[.*?\]/m, "s.files = %w[\n#{files}\n ]"); \
111+
File.write("$(GEMSPEC_FILE)", spec)'
112+
@echo "Manifest updated."

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.68.0
1+
2.69.0

chargebee.gemspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
44
s.rubygems_version = '1.3.5'
55
s.required_ruby_version = '>= 1.9.3'
66
s.name = 'chargebee'
7-
s.version = '2.68.0'
8-
s.date = '2026-01-16'
7+
s.version = '2.69.0'
8+
s.date = '2026-03-02'
99
s.summary = "Ruby client for Chargebee API."
1010
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
1111
s.metadata = {
@@ -32,9 +32,11 @@ Gem::Specification.new do |s|
3232
Gemfile
3333
Gemfile.lock
3434
LICENSE
35+
Makefile
3536
README.md
3637
README.rdoc
3738
Rakefile
39+
VERSION
3840
chargebee.gemspec
3941
lib/chargebee.rb
4042
lib/chargebee/environment.rb

lib/chargebee.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
module ChargeBee
102102

103-
VERSION = '2.68.0'
103+
VERSION = '2.69.0'
104104

105105
@@default_env = nil
106106
@@verify_ca_certs = true

lib/chargebee/models/quoted_subscription.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class QuotedContractTerm < Model
2828
attr_accessor :id, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
2929
:billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
3030
:plan_quantity_in_decimal, :plan_unit_price_in_decimal, :changes_scheduled_at, :change_option,
31-
:contract_term_billing_cycle_on_renewal, :addons, :event_based_addons, :coupons, :subscription_items,
32-
:item_tiers, :quoted_contract_term
31+
:free_period, :free_period_unit, :contract_term_billing_cycle_on_renewal, :addons, :event_based_addons,
32+
:coupons, :subscription_items, :item_tiers, :quoted_contract_term
3333

3434
# OPERATIONS
3535
#-----------
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module ChargeBee
2+
class UsageCharge < Model
3+
4+
attr_accessor :subscription_id, :feature_id, :included_usage, :total_usage, :on_demand_usage,
5+
:metered_item_price_id, :amount, :currency_code, :usage_from, :usage_to
6+
7+
# OPERATIONS
8+
#-----------
9+
10+
# @deprecated This method is deprecated and will be removed in a future version.
11+
def self.retrieve_usage_charges_for_subscription(id, params={}, env=nil, headers={})
12+
jsonKeys = {
13+
}
14+
options = {}
15+
Request.send('get', uri_path("subscriptions",id.to_s,"usage_charges"), params, env, headers,nil, false, jsonKeys, options)
16+
end
17+
18+
end # ~UsageCharge
19+
end # ~ChargeBee
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module ChargeBee
2+
class UsageSummary < Model
3+
4+
attr_accessor :subscription_id, :feature_id, :aggregated_value, :aggregated_from, :aggregated_to
5+
6+
# OPERATIONS
7+
#-----------
8+
9+
# @deprecated This method is deprecated and will be removed in a future version.
10+
def self.retrieve_usage_summary_for_subscription(id, params, env=nil, headers={})
11+
jsonKeys = {
12+
}
13+
options = {}
14+
Request.send('get', uri_path("subscriptions",id.to_s,"usage_summary"), params, env, headers,nil, false, jsonKeys, options)
15+
end
16+
17+
end # ~UsageSummary
18+
end # ~ChargeBee

lib/chargebee/result.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,16 @@ def webhook_endpoint()
563563
return webhook_endpoint;
564564
end
565565

566+
def usage_summary()
567+
usage_summary = get(:usage_summary, UsageSummary);
568+
return usage_summary;
569+
end
570+
571+
def usage_charge()
572+
usage_charge = get(:usage_charge, UsageCharge);
573+
return usage_charge;
574+
end
575+
566576
def impacted_customer()
567577
impacted_customer = get(:impacted_customer, ImpactedCustomer,
568578
{:download => ImpactedCustomer::Download});

0 commit comments

Comments
 (0)