Skip to content

Releasing v3.22.0#124

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

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

Conversation

@cb-alish
Copy link
Copy Markdown
Collaborator

@cb-alish cb-alish commented May 8, 2026

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
Copy link
Copy Markdown

snyk-io Bot commented May 8, 2026

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

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

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

Copy link
Copy Markdown

@hivel-marco hivel-marco Bot left a comment

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
File Change summary
CHANGELOG.md Added v3.22.0 entry documenting the bug fix about required parameter inconsistencies.
VERSION Bumped the version string from 3.21.0 to 3.22.0.
chargebee/models/addon/operations.py Made tax_providers_fields optional in addon create and update parameter definitions.
chargebee/models/alert/operations.py Made threshold optional in alert create parameters.
chargebee/models/coupon/operations.py Made item and coupon constraint collections optional for coupon create/update for items.
chargebee/models/credit_note/operations.py Relaxed several credit note parameters (transactions, tax_withheld, import collections) from required to optional.
chargebee/models/customer/operations.py Made various nested objects (payment_method, contact, transaction, invoice_allocations) optional in customer-related parameter types.
chargebee/models/differential_price/operations.py Made parent_periods optional for differential price create and update operations.
chargebee/models/entitlement/operations.py Made entitlements optional in entitlement create parameters.
chargebee/models/entitlement_override/operations.py Made entitlement_overrides optional for adding entitlement overrides to subscriptions.
chargebee/models/estimate/operations.py Relaxed multiple estimate parameters (subscription, subscription_items, discounts, gifter/gift_receiver, invoice discounts) from required to optional.
chargebee/models/gift/operations.py Made gifter, gift_receiver, and subscription nested objects optional in gift creation parameters.
chargebee/models/hosted_page/operations.py Made many nested structures (subscription, customer, discounts, customer/gift/quote/payment entities) optional across hosted page flows.
chargebee/models/in_app_subscription/operations.py Made product and subscription nested parameters optional in in-app subscription receipt and import operations.
chargebee/models/invoice/operations.py Relaxed requirements on item_price, discounts, import collections, transaction and tax/credit-note related nested parameters in invoice operations.
chargebee/models/item_entitlement/operations.py Made item_entitlements optional in add and upsert/remove item entitlement operations.
chargebee/models/item_price/operations.py Made tax_providers_fields optional in item price create and update parameters.
chargebee/models/order/operations.py Made the nested credit_note object optional when creating a refundable credit note for an order.
chargebee/models/payment_source/operations.py Made voucher_payment_source and card nested objects optional in payment source creation flows.
chargebee/models/payment_voucher/operations.py Made voucher payment source and invoice allocations optional in payment voucher create parameters.
chargebee/models/plan/operations.py Made tax_providers_fields optional in plan create and update parameters.
chargebee/models/portal_session/operations.py Made the customer object optional when creating a portal session.
chargebee/models/price_variant/operations.py Made attributes optional in price variant create and update parameters.
chargebee/models/pricing_page_session/operations.py Made pricing_page, subscription, and discounts optional in pricing page session create parameters.
chargebee/models/purchase/operations.py Relaxed requirements on purchase items, item tiers, subscription_info, and contract_terms for purchase create and estimate operations.
chargebee/models/quote/operations.py Made subscription, subscription_items, and discounts optional across multiple quote create/update flows, including items and charge-items quotes.
chargebee/models/ramp/operations.py Made collections like items_to_add/items_to_update and discounts_to_add optional in ramp create/update parameters.
chargebee/models/recorded_purchase/operations.py Made the nested customer object optional when creating a recorded purchase.
chargebee/models/subscription/operations.py Made subscription_items, discounts, unbilled_charges, tiers, and related collections optional in several subscription create/update/import flows.
chargebee/models/subscription_entitlement/operations.py Made the subscription_entitlements collection optional for setting entitlement availability.
chargebee/models/usage/operations.py Made the nested invoice object optional in usage PDF parameters.
chargebee/models/usage_event/operations.py Made the events collection optional in usage event batch ingest parameters.
chargebee/version.py Updated the internal SDK version constant to "3.22.0".

@cb-alish cb-alish merged commit 07c4977 into master May 8, 2026
5 checks passed
@cb-alish cb-alish deleted the release-v3.22.0 branch May 8, 2026 05:46
Sign up for free to 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