From f4661f4f206bc9a8d83210fddd0edccfff830db9 Mon Sep 17 00:00:00 2001 From: chargebee-ci Date: Wed, 12 Aug 2026 11:47:52 +0000 Subject: [PATCH] Releasing v3.28.0 --- CHANGELOG.md | 51 ++++++++++++ VERSION | 2 +- chargebee/main.py | 5 ++ chargebee/models/__init__.py | 11 +++ chargebee/models/credit_note/operations.py | 23 ++++++ chargebee/models/credit_note/responses.py | 6 ++ chargebee/models/enums.py | 80 +++++++++++++++++++ chargebee/models/export/operations.py | 30 +++++++ chargebee/models/export/responses.py | 6 ++ .../gateway_payment_method_token/__init__.py | 2 + .../operations.py | 19 +++++ .../gateway_payment_method_token/responses.py | 16 ++++ chargebee/models/invoice/operations.py | 2 +- .../__init__.py | 2 + .../operations.py | 10 +++ .../responses.py | 19 +++++ chargebee/models/payment_intent/operations.py | 16 ++-- chargebee/models/payment_source/operations.py | 25 ++++++ chargebee/models/payment_source/responses.py | 15 ++++ .../models/pricing_page_session/operations.py | 2 +- chargebee/models/quote/operations.py | 4 + chargebee/models/quoted_ramp/operations.py | 1 + chargebee/models/quoted_ramp/responses.py | 1 + .../models/vaulted_payment_method/__init__.py | 2 + .../vaulted_payment_method/operations.py | 26 ++++++ .../vaulted_payment_method/responses.py | 19 +++++ chargebee/version.py | 2 +- 27 files changed, 383 insertions(+), 14 deletions(-) create mode 100644 chargebee/models/gateway_payment_method_token/__init__.py create mode 100644 chargebee/models/gateway_payment_method_token/operations.py create mode 100644 chargebee/models/gateway_payment_method_token/responses.py create mode 100644 chargebee/models/omnichannel_subscription_item_metric/__init__.py create mode 100644 chargebee/models/omnichannel_subscription_item_metric/operations.py create mode 100644 chargebee/models/omnichannel_subscription_item_metric/responses.py create mode 100644 chargebee/models/vaulted_payment_method/__init__.py create mode 100644 chargebee/models/vaulted_payment_method/operations.py create mode 100644 chargebee/models/vaulted_payment_method/responses.py diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6eaf9c..08321d17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,54 @@ +### v3.28.0 (2026-08-12) +* * * +### New Resources: +- [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens) has been added. +- [`OmnichannelSubscriptionItemMetric`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_item_metrics) has been added. +- [`VaultedPaymentMethod`](https://apidocs.chargebee.com/docs/api/vaulted_payment_methods) has been added. + + +### New Actions: +- [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes). +- [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) has been added to [`Export`](https://apidocs.chargebee.com/docs/api/exports). +- [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). + + +### New Attributes: +- [`vault_token`](https://apidocs.chargebee.com/docs/api/payment_sources/payment-source-object#vault_token) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). + + +### New Parameters: +- [`updated_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_between) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`updated_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_on) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`purchased_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_between) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`purchased_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_on) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions). +- [`limit`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#limit) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). +- [`offset`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#offset) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). +- [`include_deleted`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#include_deleted) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources). +- [`comment`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details#comment) has been added as request body parameter to [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes). +- [`ramp`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#ramp) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports). +- [`export_type`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#export_type) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports). +- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items#subscription_items_description) 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). +- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items#subscription_items_description) has been added as request body parameter to [`edit_update_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes). +- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items#subscription_items_description) 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). +- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items#subscription_items_description) has been added as request body parameter to [`create_a_quote_for_update_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes). + + +### New Events: +- [`vault_token_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_updated) has been added. +- [`vault_token_deleted`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_deleted) has been added. +- [`omnichannel_subscription_item_mrr_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_mrr_updated) has been added. +- [`vault_token_created`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_created) has been added. + + +### New Enums: +- `omnichannel_subscription_item_metric` has been added as a new value enum `EntityType`. +- `omnichannel_subscription_item_mrr_updated`, `vault_token_created`, `vault_token_updated`, and `vault_token_deleted` have been added as new values enum `EventType`. +- `chargebee`, `chargebee_payments`, `adyen`, `stripe`, `wepay`, `braintree`, `authorize_net`, `paypal_pro`, `pin`, `eway`, `eway_rapid`, `worldpay`, `balanced_payments`, `beanstream`, `bluepay`, `elavon`, `first_data_global`, `hdfc`, `migs`, `nmi`, `ogone`, `paymill`, `paypal_payflow_pro`, `sage_pay`, `tco`, `wirecard`, `amazon_payments`, `paypal_express_checkout`, `gocardless`, `orbital`, `moneris_us`, `moneris`, `bluesnap`, `cybersource`, `vantiv`, `checkout_com`, `paypal`, `ingenico_direct`, `exact`, `mollie`, `quickbooks`, `razorpay`, `global_payments`, `bank_of_america`, `ecentric`, `metrics_global`, `windcave`, `pay_com`, `ebanx`, `dlocal`, `nuvei`, `solidgate`, `paystack`, `jp_morgan`, `deutsche_bank`, `ezidebit`, `twikey`, `tempus`, `moyasar`, `payway`, and `not_applicable` have been added as new values enum `GatewayName`. +- `active`, `inactive`, and `pending_verification` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens/gateway-payment-method-token-object#status) in [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens). +- `payment_method_helper`, `card_components`, `checkout`, `collect_now`, `portal`, and `payment_components` have been added as new values to enum attribute [`payment_intent_metadata.source`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata_source) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). + + + ### v3.27.0 (2026-07-30) * * * ### New Resources: diff --git a/VERSION b/VERSION index 8c531204..a72fd67b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.27.0 +3.28.0 diff --git a/chargebee/main.py b/chargebee/main.py index fd856309..9db72fea 100644 --- a/chargebee/main.py +++ b/chargebee/main.py @@ -80,6 +80,7 @@ def __init__( self.Feature = chargebee.Feature(self.env) self.FilterCondition = chargebee.FilterCondition(self.env) self.GatewayErrorDetail = chargebee.GatewayErrorDetail(self.env) + self.GatewayPaymentMethodToken = chargebee.GatewayPaymentMethodToken(self.env) self.Gift = chargebee.Gift(self.env) self.GrantBlock = chargebee.GrantBlock(self.env) self.Hierarchy = chargebee.Hierarchy(self.env) @@ -111,6 +112,9 @@ def __init__( self.OmnichannelSubscriptionItem = chargebee.OmnichannelSubscriptionItem( self.env ) + self.OmnichannelSubscriptionItemMetric = ( + chargebee.OmnichannelSubscriptionItemMetric(self.env) + ) self.OmnichannelSubscriptionItemOffer = ( chargebee.OmnichannelSubscriptionItemOffer(self.env) ) @@ -165,6 +169,7 @@ def __init__( self.UsageEvent = chargebee.UsageEvent(self.env) self.UsageFile = chargebee.UsageFile(self.env) self.UsageSummary = chargebee.UsageSummary(self.env) + self.VaultedPaymentMethod = chargebee.VaultedPaymentMethod(self.env) self.VirtualBankAccount = chargebee.VirtualBankAccount(self.env) self.WebhookEndpoint = chargebee.WebhookEndpoint(self.env) diff --git a/chargebee/models/__init__.py b/chargebee/models/__init__.py index aeebdb87..7f0bc90c 100644 --- a/chargebee/models/__init__.py +++ b/chargebee/models/__init__.py @@ -44,6 +44,7 @@ FreePeriodUnit, FriendOfferType, Gateway, + GatewayName, HierarchyOperationType, InvoiceDunningHandling, ItemType, @@ -176,6 +177,10 @@ from chargebee.models.gateway_error_detail.operations import GatewayErrorDetail +from chargebee.models.gateway_payment_method_token.operations import ( + GatewayPaymentMethodToken, +) + from chargebee.models.gift.operations import Gift from chargebee.models.grant_block.operations import GrantBlock @@ -236,6 +241,10 @@ OmnichannelSubscriptionItem, ) +from chargebee.models.omnichannel_subscription_item_metric.operations import ( + OmnichannelSubscriptionItemMetric, +) + from chargebee.models.omnichannel_subscription_item_offer.operations import ( OmnichannelSubscriptionItemOffer, ) @@ -340,6 +349,8 @@ from chargebee.models.usage_summary.operations import UsageSummary +from chargebee.models.vaulted_payment_method.operations import VaultedPaymentMethod + from chargebee.models.virtual_bank_account.operations import VirtualBankAccount from chargebee.models.webhook_endpoint.operations import WebhookEndpoint diff --git a/chargebee/models/credit_note/operations.py b/chargebee/models/credit_note/operations.py index 3b388978..05f76d88 100644 --- a/chargebee/models/credit_note/operations.py +++ b/chargebee/models/credit_note/operations.py @@ -460,6 +460,9 @@ class CreditNotesForCustomerParams(TypedDict): class DeleteParams(TypedDict): comment: NotRequired[str] + class UpdateParams(TypedDict): + comment: NotRequired[str] + class RemoveTaxWithheldRefundParams(TypedDict): tax_withheld: NotRequired["CreditNote.RemoveTaxWithheldRefundTaxWithheldParams"] @@ -691,6 +694,26 @@ def delete(self, id, params: DeleteParams = None, headers=None) -> DeleteRespons operation="delete", ) + def update(self, id, params: UpdateParams = None, headers=None) -> UpdateResponse: + jsonKeys = {} + options = { + "isIdempotent": True, + } + return request.send( + "post", + request.uri_path("credit_notes", id, "update"), + self.env, + cast(Dict[Any, Any], params), + headers, + UpdateResponse, + None, + False, + jsonKeys, + options, + resource="creditNote", + operation="update", + ) + def remove_tax_withheld_refund( self, id, params: RemoveTaxWithheldRefundParams, headers=None ) -> RemoveTaxWithheldRefundResponse: diff --git a/chargebee/models/credit_note/responses.py b/chargebee/models/credit_note/responses.py index 06bda953..a010fd7e 100644 --- a/chargebee/models/credit_note/responses.py +++ b/chargebee/models/credit_note/responses.py @@ -341,6 +341,12 @@ class DeleteResponse(Response): credit_note: CreditNoteResponse +@dataclass +class UpdateResponse(Response): + is_idempotency_replayed: bool + credit_note: CreditNoteResponse + + @dataclass class RemoveTaxWithheldRefundResponse(Response): is_idempotency_replayed: bool diff --git a/chargebee/models/enums.py b/chargebee/models/enums.py index 9f946b9d..778d8357 100644 --- a/chargebee/models/enums.py +++ b/chargebee/models/enums.py @@ -590,10 +590,16 @@ class EnabledEvents(Enum): ALERT_STATUS_CHANGED = "alert_status_changed" OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated" OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered" + OMNICHANNEL_SUBSCRIPTION_ITEM_MRR_UPDATED = ( + "omnichannel_subscription_item_mrr_updated" + ) LEDGER_ACCOUNT_BALANCE_UPDATED = "ledger_account_balance_updated" GRANT_BLOCKS_CREATED = "grant_blocks_created" GRANT_BLOCKS_UPDATED = "grant_blocks_updated" LEDGER_UPDATED = "ledger_updated" + VAULT_TOKEN_CREATED = "vault_token_created" + VAULT_TOKEN_UPDATED = "vault_token_updated" + VAULT_TOKEN_DELETED = "vault_token_deleted" PLAN_CREATED = "plan_created" PLAN_UPDATED = "plan_updated" PLAN_DELETED = "plan_deleted" @@ -684,6 +690,7 @@ class EntityType(Enum): BUSINESS_RULE = "business_rule" RULESET = "ruleset" ALERT_STATUS = "alert_status" + OMNICHANNEL_SUBSCRIPTION_ITEM_METRIC = "omnichannel_subscription_item_metric" def __str__(self): return self.value @@ -949,10 +956,16 @@ class EventType(Enum): ALERT_STATUS_CHANGED = "alert_status_changed" OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated" OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered" + OMNICHANNEL_SUBSCRIPTION_ITEM_MRR_UPDATED = ( + "omnichannel_subscription_item_mrr_updated" + ) LEDGER_ACCOUNT_BALANCE_UPDATED = "ledger_account_balance_updated" GRANT_BLOCKS_CREATED = "grant_blocks_created" GRANT_BLOCKS_UPDATED = "grant_blocks_updated" LEDGER_UPDATED = "ledger_updated" + VAULT_TOKEN_CREATED = "vault_token_created" + VAULT_TOKEN_UPDATED = "vault_token_updated" + VAULT_TOKEN_DELETED = "vault_token_deleted" PLAN_CREATED = "plan_created" PLAN_UPDATED = "plan_updated" PLAN_DELETED = "plan_deleted" @@ -1066,6 +1079,73 @@ def __str__(self): return self.value +class GatewayName(Enum): + CHARGEBEE = "chargebee" + CHARGEBEE_PAYMENTS = "chargebee_payments" + ADYEN = "adyen" + STRIPE = "stripe" + WEPAY = "wepay" + BRAINTREE = "braintree" + AUTHORIZE_NET = "authorize_net" + PAYPAL_PRO = "paypal_pro" + PIN = "pin" + EWAY = "eway" + EWAY_RAPID = "eway_rapid" + WORLDPAY = "worldpay" + BALANCED_PAYMENTS = "balanced_payments" + BEANSTREAM = "beanstream" + BLUEPAY = "bluepay" + ELAVON = "elavon" + FIRST_DATA_GLOBAL = "first_data_global" + HDFC = "hdfc" + MIGS = "migs" + NMI = "nmi" + OGONE = "ogone" + PAYMILL = "paymill" + PAYPAL_PAYFLOW_PRO = "paypal_payflow_pro" + SAGE_PAY = "sage_pay" + TCO = "tco" + WIRECARD = "wirecard" + AMAZON_PAYMENTS = "amazon_payments" + PAYPAL_EXPRESS_CHECKOUT = "paypal_express_checkout" + GOCARDLESS = "gocardless" + ORBITAL = "orbital" + MONERIS_US = "moneris_us" + MONERIS = "moneris" + BLUESNAP = "bluesnap" + CYBERSOURCE = "cybersource" + VANTIV = "vantiv" + CHECKOUT_COM = "checkout_com" + PAYPAL = "paypal" + INGENICO_DIRECT = "ingenico_direct" + EXACT = "exact" + MOLLIE = "mollie" + QUICKBOOKS = "quickbooks" + RAZORPAY = "razorpay" + GLOBAL_PAYMENTS = "global_payments" + BANK_OF_AMERICA = "bank_of_america" + ECENTRIC = "ecentric" + METRICS_GLOBAL = "metrics_global" + WINDCAVE = "windcave" + PAY_COM = "pay_com" + EBANX = "ebanx" + DLOCAL = "dlocal" + NUVEI = "nuvei" + SOLIDGATE = "solidgate" + PAYSTACK = "paystack" + JP_MORGAN = "jp_morgan" + DEUTSCHE_BANK = "deutsche_bank" + EZIDEBIT = "ezidebit" + TWIKEY = "twikey" + TEMPUS = "tempus" + MOYASAR = "moyasar" + PAYWAY = "payway" + NOT_APPLICABLE = "not_applicable" + + def __str__(self): + return self.value + + class HierarchyOperationType(Enum): COMPLETE_HIERARCHY = "complete_hierarchy" SUBORDINATES = "subordinates" diff --git a/chargebee/models/export/operations.py b/chargebee/models/export/operations.py index 13faffd0..ad0177f0 100644 --- a/chargebee/models/export/operations.py +++ b/chargebee/models/export/operations.py @@ -336,6 +336,12 @@ class PriceVariantsPriceVariantParams(TypedDict): updated_at: NotRequired[Filters.TimestampFilter] created_at: NotRequired[Filters.TimestampFilter] + class RampsRampParams(TypedDict): + status: NotRequired[Filters.EnumFilter] + subscription_id: NotRequired[Filters.StringFilter] + effective_from: NotRequired[Filters.TimestampFilter] + updated_at: NotRequired[Filters.TimestampFilter] + def wait_for_export_completion( self, export: ExportResponse, headers=None ) -> RetrieveResponse: @@ -465,6 +471,10 @@ class PriceVariantsParams(TypedDict): business_entity_id: NotRequired[Filters.StringFilter] include_site_level_resources: NotRequired[Filters.BooleanFilter] + class RampsParams(TypedDict): + ramp: NotRequired["Export.RampsRampParams"] + export_type: NotRequired[enums.ExportType] + def retrieve(self, id, headers=None) -> RetrieveResponse: jsonKeys = {} options = {} @@ -844,3 +854,23 @@ def price_variants( resource="export", operation="priceVariants", ) + + def ramps(self, params: RampsParams = None, headers=None) -> RampsResponse: + jsonKeys = {} + options = { + "isIdempotent": True, + } + return request.send( + "post", + request.uri_path("exports", "ramps"), + self.env, + cast(Dict[Any, Any], params), + headers, + RampsResponse, + None, + False, + jsonKeys, + options, + resource="export", + operation="ramps", + ) diff --git a/chargebee/models/export/responses.py b/chargebee/models/export/responses.py index 1571eca4..9c6013e1 100644 --- a/chargebee/models/export/responses.py +++ b/chargebee/models/export/responses.py @@ -128,3 +128,9 @@ class DifferentialPricesResponse(Response): class PriceVariantsResponse(Response): is_idempotency_replayed: bool export: ExportResponse + + +@dataclass +class RampsResponse(Response): + is_idempotency_replayed: bool + export: ExportResponse diff --git a/chargebee/models/gateway_payment_method_token/__init__.py b/chargebee/models/gateway_payment_method_token/__init__.py new file mode 100644 index 00000000..86867a31 --- /dev/null +++ b/chargebee/models/gateway_payment_method_token/__init__.py @@ -0,0 +1,2 @@ +from .operations import GatewayPaymentMethodToken +from .responses import GatewayPaymentMethodTokenResponse diff --git a/chargebee/models/gateway_payment_method_token/operations.py b/chargebee/models/gateway_payment_method_token/operations.py new file mode 100644 index 00000000..2616c100 --- /dev/null +++ b/chargebee/models/gateway_payment_method_token/operations.py @@ -0,0 +1,19 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast +from enum import Enum + + +@dataclass +class GatewayPaymentMethodToken: + env: environment.Environment + + class Status(Enum): + ACTIVE = "active" + INACTIVE = "inactive" + PENDING_VERIFICATION = "pending_verification" + + def __str__(self): + return self.value + + pass diff --git a/chargebee/models/gateway_payment_method_token/responses.py b/chargebee/models/gateway_payment_method_token/responses.py new file mode 100644 index 00000000..092d01a7 --- /dev/null +++ b/chargebee/models/gateway_payment_method_token/responses.py @@ -0,0 +1,16 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any + + +@dataclass +class GatewayPaymentMethodTokenResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + gateway_account_id: str = None + gateway_name: str = None + gateway_customer_id: str = None + gateway_token: str = None + status: str = None + created_at: int = None + updated_at: int = None diff --git a/chargebee/models/invoice/operations.py b/chargebee/models/invoice/operations.py index abcdbdd2..0c462165 100644 --- a/chargebee/models/invoice/operations.py +++ b/chargebee/models/invoice/operations.py @@ -275,7 +275,7 @@ class ReferenceTransaction(TypedDict): txn_date: NotRequired[int] txn_amount: NotRequired[int] txn_type: Required["Invoice.TxnType"] - amount_capturable: Required[int] + amount_capturable: NotRequired[int] authorization_reason: NotRequired["Invoice.AuthorizationReason"] class DunningAttempt(TypedDict): diff --git a/chargebee/models/omnichannel_subscription_item_metric/__init__.py b/chargebee/models/omnichannel_subscription_item_metric/__init__.py new file mode 100644 index 00000000..c39bfa0a --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_metric/__init__.py @@ -0,0 +1,2 @@ +from .operations import OmnichannelSubscriptionItemMetric +from .responses import OmnichannelSubscriptionItemMetricResponse diff --git a/chargebee/models/omnichannel_subscription_item_metric/operations.py b/chargebee/models/omnichannel_subscription_item_metric/operations.py new file mode 100644 index 00000000..17d328cc --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_metric/operations.py @@ -0,0 +1,10 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast + + +@dataclass +class OmnichannelSubscriptionItemMetric: + env: environment.Environment + + pass diff --git a/chargebee/models/omnichannel_subscription_item_metric/responses.py b/chargebee/models/omnichannel_subscription_item_metric/responses.py new file mode 100644 index 00000000..0dd10694 --- /dev/null +++ b/chargebee/models/omnichannel_subscription_item_metric/responses.py @@ -0,0 +1,19 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any + + +@dataclass +class OmnichannelSubscriptionItemMetricResponse(Model): + raw_data: Dict[Any, Any] = None + customer_id: str = None + omnichannel_subscription_id: str = None + omnichannel_subscription_item_id: str = None + item_id_at_source: str = None + mrr_currency: str = None + mrr_units: int = None + mrr_nanos: int = None + effective_from: int = None + calculated_at: int = None + created_at: int = None + resource_version: int = None diff --git a/chargebee/models/payment_intent/operations.py b/chargebee/models/payment_intent/operations.py index 60198b60..b2a62cd0 100644 --- a/chargebee/models/payment_intent/operations.py +++ b/chargebee/models/payment_intent/operations.py @@ -101,16 +101,12 @@ def __str__(self): return self.value class PaymentIntentMetadataSource(Enum): - CB_JS = "cb_js" - COMPONENTS_FIELDS = "components_fields" - CHECKOUT_V3 = "checkout_v3" - PAYNOW_V3 = "paynow_v3" - PORTAL_V3 = "portal_v3" - GIFT_V3 = "gift_v3" - CHECKOUT_V4 = "checkout_v4" - PAYMENT_COMPONENT = "payment_component" - PC_INAPP_V4 = "pc_inapp_v4" - PC_FPC_V4 = "pc_fpc_v4" + PAYMENT_METHOD_HELPER = "payment_method_helper" + CARD_COMPONENTS = "card_components" + CHECKOUT = "checkout" + COLLECT_NOW = "collect_now" + PORTAL = "portal" + PAYMENT_COMPONENTS = "payment_components" def __str__(self): return self.value diff --git a/chargebee/models/payment_source/operations.py b/chargebee/models/payment_source/operations.py index be47b424..a97d9136 100644 --- a/chargebee/models/payment_source/operations.py +++ b/chargebee/models/payment_source/operations.py @@ -295,6 +295,11 @@ class VerifyBankAccountParams(TypedDict): amount1: Required[int] amount2: Required[int] + class ListGatewayTokensForPaymentSourceParams(TypedDict): + limit: NotRequired[int] + offset: NotRequired[str] + include_deleted: NotRequired[bool] + class ListParams(TypedDict): limit: NotRequired[int] offset: NotRequired[str] @@ -547,6 +552,26 @@ def verify_bank_account( operation="verifyBankAccount", ) + def list_gateway_tokens_for_payment_source( + self, id, params: ListGatewayTokensForPaymentSourceParams = None, headers=None + ) -> ListGatewayTokensForPaymentSourceResponse: + jsonKeys = {} + options = {} + return request.send( + "get", + request.uri_path("payment_sources", id, "gateway_payment_method_tokens"), + self.env, + cast(Dict[Any, Any], params), + headers, + ListGatewayTokensForPaymentSourceResponse, + None, + False, + jsonKeys, + options, + resource="paymentSource", + operation="listGatewayTokensForPaymentSource", + ) + def retrieve(self, id, headers=None) -> RetrieveResponse: jsonKeys = {} options = {} diff --git a/chargebee/models/payment_source/responses.py b/chargebee/models/payment_source/responses.py index ff8eb93d..4d1f4fa8 100644 --- a/chargebee/models/payment_source/responses.py +++ b/chargebee/models/payment_source/responses.py @@ -6,6 +6,7 @@ payment_intent, card, customer, + gateway_payment_method_token, third_party_payment_method, download, ) @@ -141,6 +142,7 @@ class PaymentSourceResponse(Model): venmo: VenmoResponse = None klarna_pay_now: KlarnaPayNowResponse = None mandates: List[MandateResponse] = None + vault_token: Dict[Any, Any] = None deleted: bool = None business_entity_id: str = None @@ -214,6 +216,19 @@ class VerifyBankAccountResponse(Response): payment_source: PaymentSourceResponse +@dataclass +class ListGatewayTokensForPaymentSourcePaymentSourceResponse: + gateway_payment_method_token: ( + "gateway_payment_method_token.GatewayPaymentMethodTokenResponse" + ) + + +@dataclass +class ListGatewayTokensForPaymentSourceResponse(Response): + list: List[ListGatewayTokensForPaymentSourcePaymentSourceResponse] + next_offset: str = None + + @dataclass class RetrieveResponse(Response): payment_source: PaymentSourceResponse diff --git a/chargebee/models/pricing_page_session/operations.py b/chargebee/models/pricing_page_session/operations.py index b61f3905..55f5e9cc 100644 --- a/chargebee/models/pricing_page_session/operations.py +++ b/chargebee/models/pricing_page_session/operations.py @@ -9,7 +9,7 @@ class PricingPageSession: env: environment.Environment class CreateForNewSubscriptionPricingPageParams(TypedDict): - id: Required[str] + id: NotRequired[str] class CreateForNewSubscriptionSubscriptionParams(TypedDict): id: NotRequired[str] diff --git a/chargebee/models/quote/operations.py b/chargebee/models/quote/operations.py index 3a7e3b54..9566f8af 100644 --- a/chargebee/models/quote/operations.py +++ b/chargebee/models/quote/operations.py @@ -556,6 +556,7 @@ class CreateSubItemsForCustomerQuoteSubscriptionItemParams(TypedDict): charge_on_option: NotRequired[enums.ChargeOnOption] start_date: NotRequired[int] end_date: NotRequired[int] + description: NotRequired[str] ramp_tier_id: NotRequired[str] class CreateSubItemsForCustomerQuoteDiscountParams(TypedDict): @@ -650,6 +651,7 @@ class EditCreateSubCustomerQuoteForItemsSubscriptionItemParams(TypedDict): charge_on_option: NotRequired[enums.ChargeOnOption] start_date: NotRequired[int] end_date: NotRequired[int] + description: NotRequired[str] ramp_tier_id: NotRequired[str] class EditCreateSubCustomerQuoteForItemsDiscountParams(TypedDict): @@ -743,6 +745,7 @@ class UpdateSubscriptionQuoteForItemsSubscriptionItemParams(TypedDict): item_type: NotRequired[enums.ItemType] start_date: NotRequired[int] end_date: NotRequired[int] + description: NotRequired[str] ramp_tier_id: NotRequired[str] class UpdateSubscriptionQuoteForItemsDiscountParams(TypedDict): @@ -833,6 +836,7 @@ class EditUpdateSubscriptionQuoteForItemsSubscriptionItemParams(TypedDict): item_type: NotRequired[enums.ItemType] start_date: NotRequired[int] end_date: NotRequired[int] + description: NotRequired[str] ramp_tier_id: NotRequired[str] class EditUpdateSubscriptionQuoteForItemsSubscriptionParams(TypedDict): diff --git a/chargebee/models/quoted_ramp/operations.py b/chargebee/models/quoted_ramp/operations.py index 3dabc426..e10b3819 100644 --- a/chargebee/models/quoted_ramp/operations.py +++ b/chargebee/models/quoted_ramp/operations.py @@ -55,6 +55,7 @@ class LineItem(TypedDict): amount_per_billing_cycle_in_decimal: NotRequired[str] net_amount_per_billing_cycle: NotRequired[int] net_amount_per_billing_cycle_in_decimal: NotRequired[str] + description: NotRequired[str] class Discount(TypedDict): id: Required[str] diff --git a/chargebee/models/quoted_ramp/responses.py b/chargebee/models/quoted_ramp/responses.py index 0a329ed6..1ba1420f 100644 --- a/chargebee/models/quoted_ramp/responses.py +++ b/chargebee/models/quoted_ramp/responses.py @@ -35,6 +35,7 @@ class LineItemResponse(Model): amount_per_billing_cycle_in_decimal: str = None net_amount_per_billing_cycle: int = None net_amount_per_billing_cycle_in_decimal: str = None + description: str = None @dataclass diff --git a/chargebee/models/vaulted_payment_method/__init__.py b/chargebee/models/vaulted_payment_method/__init__.py new file mode 100644 index 00000000..fe71ada4 --- /dev/null +++ b/chargebee/models/vaulted_payment_method/__init__.py @@ -0,0 +1,2 @@ +from .operations import VaultedPaymentMethod +from .responses import VaultedPaymentMethodResponse diff --git a/chargebee/models/vaulted_payment_method/operations.py b/chargebee/models/vaulted_payment_method/operations.py new file mode 100644 index 00000000..11abb30e --- /dev/null +++ b/chargebee/models/vaulted_payment_method/operations.py @@ -0,0 +1,26 @@ +from .responses import * +from chargebee import request, environment +from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast + + +@dataclass +class VaultedPaymentMethod: + env: environment.Environment + + def retrieve(self, id, headers=None) -> RetrieveResponse: + jsonKeys = {} + options = {} + return request.send( + "get", + request.uri_path("vaulted_payment_methods", id), + self.env, + None, + headers, + RetrieveResponse, + None, + False, + jsonKeys, + options, + resource="vaultedPaymentMethod", + operation="retrieve", + ) diff --git a/chargebee/models/vaulted_payment_method/responses.py b/chargebee/models/vaulted_payment_method/responses.py new file mode 100644 index 00000000..ec9119b2 --- /dev/null +++ b/chargebee/models/vaulted_payment_method/responses.py @@ -0,0 +1,19 @@ +from dataclasses import dataclass +from chargebee.model import Model +from typing import Dict, List, Any +from chargebee.response import Response + + +@dataclass +class VaultedPaymentMethodResponse(Model): + raw_data: Dict[Any, Any] = None + id: str = None + customer_id: str = None + credit_card_id: str = None + created_at: int = None + modified_at: int = None + + +@dataclass +class RetrieveResponse(Response): + vaulted_payment_method: VaultedPaymentMethodResponse diff --git a/chargebee/version.py b/chargebee/version.py index 4daebf63..19ff2992 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = "3.27.0" +VERSION = "3.28.0"