Skip to content

Migration guide for v21

Kamil Pajdzik edited this page Jul 31, 2022 · 1 revision

Changes in v21.0.0 - 2022-08-01

Major version release for API version 2020-08-27. "⚠️" symbol highlights breaking changes.

Added

  • Add ApiKeyMissingException.
  • Add validate field to CustomerCreateParams.
  • Add validate field to CustomerUpdateParams.
  • Add validate field to PaymentSourceCollectionCreateParams.
  • Add shippingCost, shippingDetails, and shippingOptions properties to checkout.Session resource.

⚠️ Removed

  • Removed deprecated AlipayAccount and related classes.
  • Removed deprecated BitcoinReceiver and related classes.
  • Removed deprecated BitcoinTransaction and related classes.
  • Removed deprecated Recipient and related classes.
  • Removed deprecated IssuerFraudRecord and related classes.
  • Removed deprecated Order and related classes.
  • Removed deprecated ThreeDSecure and related classes.
  • Removed unused QuoteFinalizeParams, QuoteCollectionListParams classes.
  • Removed unused BillingDetails class.
  • Removed CashBalance.retrieveCashBalance method. Prefer CashBalance.retrieve.
  • Removed Rule.getDeleted method. The property was never populated and always had the default value of false.
  • Removed LineItem.getDeleted method. The property was never populated and always had the default value of false.
  • Removed public constructors from TestHelper inner classes and made them static.
    • Removed Refund.TestHelpers constructor.
    • Removed Reader.TestHelpers constructor.
    • Removed InboundTransfer.TestHelpers constructor.
    • Removed OutboundPayment.TestHelpers constructor.
    • Removed OutboundTransfer.TestHelpers constructor.
  • Removed instance Account.refresh, Account.disconnect methods.
  • Removed deprecated TREASURY__RECEIVED_CREDIT__REVERSED, TREASURY__RECEIVED_DEBIT__CREATED, ORDER__UPDATED, ORDER_RETURN__CREATED, ORDER__PAYMENT_SUCCEEDED, TRANSFER__FAILED, TRANSFER__PAID webhook events.
  • Removed deprecated LoginLink.redirectUrl property.
  • Removed deprecated Charge.order property.
  • Removed deprecated Card.recipient property.
  • Removed defaultCurrency property from Customer resource. Please use Currency property instead.
  • Removed shipping and shippingOptions properties from checkout.Session resource. Please use shippingCost, shippingDetails, and shippingOptions properties instead.
  • Removed InitiatingPaymentMethodDetails class

⚠️ Changed

  • Default API version changed to "2022-07-28".
  • Changed CashBalance.retrieve method from an instance to a static.
  • Renamed PaymentIntent.FinancialAddresses class to FinancialAddress.
  • Check that apiKey is set (either globally or via request options) in StripeCollection.autoPagingIterable and StripeSearchResult.autoPagingIterable, and throw an exception if it is not.
  • Changed type of businessType field in AccountCreateParams from Object to BusinessType