Skip to content

v46.0.0

Compare
Choose a tag to compare
@ramya-stripe ramya-stripe released this 01 Oct 18:33
· 29 commits to master since this release
  • #2980 Support for APIs in the new API version 2024-09-30.acacia

    This release changes the pinned API version to 2024-09-30.acacia. Please read the API Upgrade Guide and carefully review the API changes before upgrading.

    ⚠️ Breaking changes due to changes in the API

    • Rename UsageThresholdConfig to UsageThreshold on Billing.Alert and Billing.AlertCreateOptions
    • Remove support for Filter on Billing.Alert and BillingAlert.AlertCreateOptions . Use the filters on the UsageThreshold instead
    • Remove support for CustomerConsentCollected on Terminal.ReaderProcessSetupIntentOptions

    ⚠️ Other Breaking changes in the SDK

    Refer to our migration guide for v46 for a list of backwards incompatible changes in this release. Here is a summary of things to watch out for:

    Additions

    • Add support for UsageThreshold on Billing.AlertCreateOptions and BillingAlert
    • Add support for CustomUnitAmount on ProductDefaultPriceDataOptions
    • Add support for AllowRedisplay on Terminal.ReaderProcessSetupIntentOptions and TerminalReaderProcessConfigOptions
    • Add support for new Usage Billing APIs Billing.MeterEvent, Billing.MeterEventAdjustments, Billing.MeterEventSession, Billing.MeterEventStream and the new Events API Core.Events under the v2 namespace
    • Add method ParseThinEvent() on the StripeClient class to parse thin events.
    • Add methods RawRequestAsync() on the StripeClient class that takes a HTTP method type, url and relevant parameters to make requests to the Stripe API that are not yet supported in the SDK.
    • Add access to services to StripeClient under V1 and V2 property accessors, so that instead of
      StripeConfiguration.ApiKey = apiKey;
      var svc = new CustomerService();
      svc.Get(customerId);

    you can write:

    var client = new StripeClient(apiKey);
    client.V1.Customers.Get(customerId)

    This supports a move towards a services-based client pattern where a StripeClient instance consolidates configuration and service access. This enables you simultaneously use multiple clients with different configuration options (such as API keys), and makes it much easier to discover what services are available by inspecting the V1 and V2 properties (either manually or via your code editors auto-completion).

See the changelog for more details.