Skip to content

Releasing v3.22.0 - #124

Merged
cb-alish merged 1 commit into
masterfrom
release-v3.22.0
May 8, 2026
Merged

Releasing v3.22.0#124
cb-alish merged 1 commit into
masterfrom
release-v3.22.0

Conversation

@cb-alish

Copy link
Copy Markdown
Collaborator

v3.22.0 (2026-05-07)


Bug fixes:

  • Fixed an inconsistency in required parameters for API methods between the SDK Generator and OpenAPI specifications.

@snyk-io

snyk-ioBot commented May 8, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

StatusScan Engine Critical High Medium LowTotal (0)
Open Source Security0000 0 issues
Licenses0000 0 issues
Code Security0000 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@hivel-marcohivel-marcoBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Complexity Score: 5.2 - Moderate

View Breakdown
  • Lines Changed: 323
  • Files Changed: 33
  • Complexity Added: 0
  • Raw Score: 105.46
Overview

This PR releases SDK version 3.22.0 and documents it in the changelog.
It fixes mismatches between the SDK’s required parameters and the OpenAPI specifications by making various request fields optional instead of required across many model operation parameter types.
The changes primarily affect TypedDict definitions for request payloads in multiple resources (subscriptions, invoices, quotes, hosted pages, etc.).

Key Changes
  • Bumped the SDK version from 3.21.0 to 3.22.0 and added a changelog entry describing the bug fix.
  • Updated numerous TypedDict-based request parameter schemas so fields previously marked as Required[...] are now NotRequired[...], aligning the SDK with the OpenAPI contracts regarding which parameters are actually mandatory.
  • Specifically relaxed requirements for nested structures such as subscription, customer, discounts, subscription_items, tax_providers_fields, item_entitlements, and various nested transaction/tax/credit-note/payment structures used in create/update/import and hosted flows.
  • Ensured more consistent behavior between SDK-generated types and the API’s true validation rules, reducing false “required field” constraints for SDK consumers.
Risks & Considerations
  • Relaxing required fields may allow construction of request payloads that are now type-valid in the SDK but still rejected at runtime by the API if certain combinations are logically required but not modeled as such (e.g., business rules not captured in OpenAPI).
  • Existing client code relying on type checking for these fields being required may no longer get static warnings, potentially hiding mistakes until runtime.
  • Reviewers should validate that each field changed from required to optional is indeed optional in the current OpenAPI specification and server behavior, to avoid introducing under-specified client contracts.
File-level change summary
FileChange summary
CHANGELOG.mdAdded v3.22.0 entry documenting the bug fix about required parameter inconsistencies.
VERSIONBumped the version string from 3.21.0 to 3.22.0.
chargebee/models/addon/operations.pyMade tax_providers_fields optional in addon create and update parameter definitions.
chargebee/models/alert/operations.pyMade threshold optional in alert create parameters.
chargebee/models/coupon/operations.pyMade item and coupon constraint collections optional for coupon create/update for items.
chargebee/models/credit_note/operations.pyRelaxed several credit note parameters (transactions, tax_withheld, import collections) from required to optional.
chargebee/models/customer/operations.pyMade various nested objects (payment_method, contact, transaction, invoice_allocations) optional in customer-related parameter types.
chargebee/models/differential_price/operations.pyMade parent_periods optional for differential price create and update operations.
chargebee/models/entitlement/operations.pyMade entitlements optional in entitlement create parameters.
chargebee/models/entitlement_override/operations.pyMade entitlement_overrides optional for adding entitlement overrides to subscriptions.
chargebee/models/estimate/operations.pyRelaxed multiple estimate parameters (subscription, subscription_items, discounts, gifter/gift_receiver, invoice discounts) from required to optional.
chargebee/models/gift/operations.pyMade gifter, gift_receiver, and subscription nested objects optional in gift creation parameters.
chargebee/models/hosted_page/operations.pyMade many nested structures (subscription, customer, discounts, customer/gift/quote/payment entities) optional across hosted page flows.
chargebee/models/in_app_subscription/operations.pyMade product and subscription nested parameters optional in in-app subscription receipt and import operations.
chargebee/models/invoice/operations.pyRelaxed requirements on item_price, discounts, import collections, transaction and tax/credit-note related nested parameters in invoice operations.
chargebee/models/item_entitlement/operations.pyMade item_entitlements optional in add and upsert/remove item entitlement operations.
chargebee/models/item_price/operations.pyMade tax_providers_fields optional in item price create and update parameters.
chargebee/models/order/operations.pyMade the nested credit_note object optional when creating a refundable credit note for an order.
chargebee/models/payment_source/operations.pyMade voucher_payment_source and card nested objects optional in payment source creation flows.
chargebee/models/payment_voucher/operations.pyMade voucher payment source and invoice allocations optional in payment voucher create parameters.
chargebee/models/plan/operations.pyMade tax_providers_fields optional in plan create and update parameters.
chargebee/models/portal_session/operations.pyMade the customer object optional when creating a portal session.
chargebee/models/price_variant/operations.pyMade attributes optional in price variant create and update parameters.
chargebee/models/pricing_page_session/operations.pyMade pricing_page, subscription, and discounts optional in pricing page session create parameters.
chargebee/models/purchase/operations.pyRelaxed requirements on purchase items, item tiers, subscription_info, and contract_terms for purchase create and estimate operations.
chargebee/models/quote/operations.pyMade subscription, subscription_items, and discounts optional across multiple quote create/update flows, including items and charge-items quotes.
chargebee/models/ramp/operations.pyMade collections like items_to_add/items_to_update and discounts_to_add optional in ramp create/update parameters.
chargebee/models/recorded_purchase/operations.pyMade the nested customer object optional when creating a recorded purchase.
chargebee/models/subscription/operations.pyMade subscription_items, discounts, unbilled_charges, tiers, and related collections optional in several subscription create/update/import flows.
chargebee/models/subscription_entitlement/operations.pyMade the subscription_entitlements collection optional for setting entitlement availability.
chargebee/models/usage/operations.pyMade the nested invoice object optional in usage PDF parameters.
chargebee/models/usage_event/operations.pyMade the events collection optional in usage event batch ingest parameters.
chargebee/version.pyUpdated the internal SDK version constant to "3.22.0".

@cb-alish
cb-alish merged commit 07c4977 into masterMay 8, 2026
5 checks passed
@cb-alish
cb-alish deleted the release-v3.22.0 branch May 8, 2026 05:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@cb-alish@cb-srinaths