diff --git a/example/lib/screens/wallets/payment_sheet_screen_subscription.dart b/example/lib/screens/wallets/payment_sheet_screen_subscription.dart index 584afc624..c966ccdd9 100644 --- a/example/lib/screens/wallets/payment_sheet_screen_subscription.dart +++ b/example/lib/screens/wallets/payment_sheet_screen_subscription.dart @@ -108,10 +108,15 @@ class _PaymentSheetScreenState extends State { request: PaymentRequestType.recurring( description: 'subscription', managementUrl: 'https://flutter.dev', - billing: ImmediateCartSummaryItem( + billing: RecurringCartSummaryItem( label: 'Subscription', amount: '10.0', - isPending: false, + intervalCount: 12, + intervalUnit: ApplePayIntervalUnit.month, + startDate: DateTime.now().millisecondsSinceEpoch, + endDate: DateTime.now() + .add(Duration(days: 365)) + .millisecondsSinceEpoch, ), ), ), diff --git a/packages/stripe/lib/src/widgets/card_form_field.dart b/packages/stripe/lib/src/widgets/card_form_field.dart index f7d00c80b..0f60ba0fc 100644 --- a/packages/stripe/lib/src/widgets/card_form_field.dart +++ b/packages/stripe/lib/src/widgets/card_form_field.dart @@ -49,6 +49,8 @@ class CardFormField extends StatefulWidget { /// Defaults is `true`. If your configuration in Stripe requires a postalcode /// check as defined in https://stripe.com/docs/radar/rules#traditional-bank-checks /// make sure this one is set to `true`. + /// + /// This is only supported on android final bool enablePostalCode; /// Android only: Controls the postal code entry shown (when `enablePostalCode` is set to true). @@ -217,7 +219,7 @@ class _MethodChannelCardFormField extends StatefulWidget { Key? key, this.onFocus, this.style, - this.enablePostalCode = false, + this.enablePostalCode = true, double? width, double? height, BoxConstraints? constraints, diff --git a/packages/stripe_android/android/build.gradle b/packages/stripe_android/android/build.gradle index ca867db02..e659240d9 100644 --- a/packages/stripe_android/android/build.gradle +++ b/packages/stripe_android/android/build.gradle @@ -3,7 +3,7 @@ version '1.0-SNAPSHOT' buildscript { ext.kotlin_version = '1.8.0' - ext.stripe_version = '20.41.+' + ext.stripe_version = '20.44.+' repositories { google() @@ -60,7 +60,7 @@ dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' // play-services-wallet is already included in stripe-android - compileOnly "com.google.android.gms:play-services-wallet:19.2.0" + compileOnly "com.google.android.gms:play-services-wallet:19.3.0" // Users need to declare this dependency on their own, otherwise all methods are a no-op compileOnly 'com.stripe:stripe-android-issuing-push-provisioning:1.1.0' diff --git a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentLauncherFragment.kt b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentLauncherFragment.kt index d4926021f..520434ff0 100644 --- a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentLauncherFragment.kt +++ b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentLauncherFragment.kt @@ -284,7 +284,8 @@ class PaymentLauncherFragment( StripeIntent.NextActionType.DisplayOxxoDetails, StripeIntent.NextActionType.DisplayBoletoDetails, StripeIntent.NextActionType.DisplayKonbiniDetails, - StripeIntent.NextActionType.VerifyWithMicrodeposits -> true + StripeIntent.NextActionType.VerifyWithMicrodeposits, + StripeIntent.NextActionType.DisplayMultibancoDetails -> true StripeIntent.NextActionType.RedirectToUrl, StripeIntent.NextActionType.UseStripeSdk, StripeIntent.NextActionType.AlipayRedirect, diff --git a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentSheetFragment.kt b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentSheetFragment.kt index 75fabe128..0daffa5e4 100644 --- a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentSheetFragment.kt +++ b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/PaymentSheetFragment.kt @@ -23,11 +23,13 @@ import com.reactnativestripesdk.addresssheet.AddressSheetView import com.reactnativestripesdk.utils.* import com.reactnativestripesdk.utils.createError import com.reactnativestripesdk.utils.createResult +import com.stripe.android.ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi import com.stripe.android.paymentsheet.* import kotlinx.coroutines.CompletableDeferred import java.io.ByteArrayOutputStream import kotlin.Exception +@OptIn(ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi::class) class PaymentSheetFragment( private val context: ReactApplicationContext, private val initPromise: Promise @@ -67,6 +69,8 @@ class PaymentSheetFragment( val allowsDelayedPaymentMethods = arguments?.getBoolean("allowsDelayedPaymentMethods") val billingDetailsBundle = arguments?.getBundle("defaultBillingDetails") val billingConfigParams = arguments?.getBundle("billingDetailsCollectionConfiguration") + val paymentMethodOrder = arguments?.getStringArrayList("paymentMethodOrder") + val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod") paymentIntentClientSecret = arguments?.getString("paymentIntentClientSecret").orEmpty() setupIntentClientSecret = arguments?.getString("setupIntentClientSecret").orEmpty() intentConfiguration = try { @@ -181,22 +185,29 @@ class PaymentSheetFragment( billingDetailsBundle.getString("name"), billingDetailsBundle.getString("phone")) } + val configurationBuilder = PaymentSheet.Configuration.Builder(merchantDisplayName) + .allowsDelayedPaymentMethods(allowsDelayedPaymentMethods ?: false) + .defaultBillingDetails(defaultBillingDetails) + .customer( + if (customerId.isNotEmpty() && customerEphemeralKeySecret.isNotEmpty()) PaymentSheet.CustomerConfiguration( + id = customerId, + ephemeralKeySecret = customerEphemeralKeySecret + ) else null + ) + .googlePay(googlePayConfig) + .appearance(appearance) + .shippingDetails(shippingDetails) + .billingDetailsCollectionConfiguration(billingDetailsConfig) + .preferredNetworks(mapToPreferredNetworks(arguments?.getIntegerArrayList("preferredNetworks"))) + .allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod ?: true) + primaryButtonLabel?.let { + configurationBuilder.primaryButtonLabel(it) + } + paymentMethodOrder?.let { + configurationBuilder.paymentMethodOrder(it) + } - paymentSheetConfiguration = PaymentSheet.Configuration( - merchantDisplayName = merchantDisplayName, - allowsDelayedPaymentMethods = allowsDelayedPaymentMethods ?: false, - defaultBillingDetails=defaultBillingDetails, - customer = if (customerId.isNotEmpty() && customerEphemeralKeySecret.isNotEmpty()) PaymentSheet.CustomerConfiguration( - id = customerId, - ephemeralKeySecret = customerEphemeralKeySecret - ) else null, - googlePay = googlePayConfig, - appearance = appearance, - shippingDetails = shippingDetails, - primaryButtonLabel = primaryButtonLabel, - billingDetailsCollectionConfiguration = billingDetailsConfig, - preferredNetworks = mapToPreferredNetworks(arguments?.getIntegerArrayList("preferredNetworks")) - ) + paymentSheetConfiguration = configurationBuilder.build() if (arguments?.getBoolean("customFlow") == true) { flowController = if (intentConfiguration != null) { diff --git a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt index 78ea3402f..0347a4c85 100644 --- a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +++ b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt @@ -15,6 +15,7 @@ import androidx.fragment.app.Fragment import com.facebook.react.bridge.* import com.reactnativestripesdk.customersheet.ReactNativeCustomerAdapter import com.reactnativestripesdk.utils.* +import com.stripe.android.ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi import com.stripe.android.customersheet.CustomerAdapter import com.stripe.android.customersheet.CustomerEphemeralKey import com.stripe.android.customersheet.CustomerSheet @@ -28,7 +29,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch -@OptIn(ExperimentalCustomerSheetApi::class) +@OptIn(ExperimentalCustomerSheetApi::class, ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi::class) class CustomerSheetFragment : Fragment() { private var customerSheet: CustomerSheet? = null internal var customerAdapter: ReactNativeCustomerAdapter? = null @@ -67,7 +68,8 @@ class CustomerSheetFragment : Fragment() { val customerId = arguments?.getString("customerId") val customerEphemeralKeySecret = arguments?.getString("customerEphemeralKeySecret") val customerAdapterOverrideParams = arguments?.getBundle("customerAdapter") - + val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod") + val paymentMethodOrder = arguments?.getStringArrayList("paymentMethodOrder") if (customerId == null) { initPromise.resolve(createError(ErrorType.Failed.toString(), "You must provide a value for `customerId`")) return @@ -89,7 +91,11 @@ class CustomerSheetFragment : Fragment() { .googlePayEnabled(googlePayEnabled) .headerTextForSelectionScreen(headerTextForSelectionScreen) .preferredNetworks(mapToPreferredNetworks(arguments?.getIntegerArrayList("preferredNetworks"))) + .allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod ?: true) + paymentMethodOrder?.let { + configuration.paymentMethodOrder(it) + } billingDetailsBundle?.let { configuration.defaultBillingDetails(createDefaultBillingDetails(billingDetailsBundle)) } diff --git a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/utils/Mappers.kt b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/utils/Mappers.kt index 6b91a18ca..ca66b44a7 100644 --- a/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/utils/Mappers.kt +++ b/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/utils/Mappers.kt @@ -513,6 +513,12 @@ internal fun mapNextAction(type: NextActionType?, data: NextActionData?): Writab nextActionMap.putString("mobileAuthUrl", it.mobileAuthUrl) } } + NextActionType.DisplayMultibancoDetails -> { + (data as? NextActionData.DisplayMultibancoDetails)?.let { + nextActionMap.putString("type", "multibanco") + nextActionMap.putString("voucherURL", it.hostedVoucherUrl) + } + } } return nextActionMap } diff --git a/packages/stripe_ios/ios/Classes/Stripe Sdk/CustomerSheet/CustomerSheetUtils.swift b/packages/stripe_ios/ios/Classes/Stripe Sdk/CustomerSheet/CustomerSheetUtils.swift index d764cd9d0..bd836b7d5 100644 --- a/packages/stripe_ios/ios/Classes/Stripe Sdk/CustomerSheet/CustomerSheetUtils.swift +++ b/packages/stripe_ios/ios/Classes/Stripe Sdk/CustomerSheet/CustomerSheetUtils.swift @@ -6,7 +6,7 @@ // import Foundation -@_spi(PrivateBetaCustomerSheet) import StripePaymentSheet +@_spi(PrivateBetaCustomerSheet) @_spi(STP) import StripePaymentSheet class CustomerSheetUtils { internal class func buildCustomerSheetConfiguration( @@ -19,7 +19,8 @@ class CustomerSheetUtils { merchantDisplayName: String?, billingDetailsCollectionConfiguration: NSDictionary?, defaultBillingDetails: NSDictionary?, - preferredNetworks: Array? + preferredNetworks: Array?, + allowsRemovalOfLastSavedPaymentMethod: Bool? ) -> CustomerSheet.Configuration { var config = CustomerSheet.Configuration() config.appearance = appearance @@ -54,6 +55,9 @@ class CustomerSheetUtils { state: address["state"]) } } + if let allowsRemovalOfLastSavedPaymentMethod = allowsRemovalOfLastSavedPaymentMethod { + config.allowsRemovalOfLastSavedPaymentMethod = allowsRemovalOfLastSavedPaymentMethod + } return config } diff --git a/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+CustomerSheet.swift b/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+CustomerSheet.swift index a616c9801..49630a3d2 100644 --- a/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+CustomerSheet.swift +++ b/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+CustomerSheet.swift @@ -23,7 +23,8 @@ extension StripeSdk { merchantDisplayName: params["merchantDisplayName"] as? String, billingDetailsCollectionConfiguration: params["billingDetailsCollectionConfiguration"] as? NSDictionary, defaultBillingDetails: params["defaultBillingDetails"] as? NSDictionary, - preferredNetworks: params["preferredNetworks"] as? Array + preferredNetworks: params["preferredNetworks"] as? Array, + allowsRemovalOfLastSavedPaymentMethod: params["allowsRemovalOfLastSavedPaymentMethod"] as? Bool ) } catch { resolve( diff --git a/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+PaymentSheet.swift b/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+PaymentSheet.swift index c39247aef..497b330f7 100644 --- a/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+PaymentSheet.swift +++ b/packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk+PaymentSheet.swift @@ -6,7 +6,7 @@ // import Foundation -import StripePaymentSheet +@_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(STP) import StripePaymentSheet extension StripeSdk { internal func buildPaymentSheetConfiguration( @@ -103,6 +103,14 @@ extension StripeSdk { configuration.preferredNetworks = preferredNetworksAsInts.map(Mappers.intToCardBrand).compactMap { $0 } } + if let allowsRemovalOfLastSavedPaymentMethod = params["allowsRemovalOfLastSavedPaymentMethod"] as? Bool { + configuration.allowsRemovalOfLastSavedPaymentMethod = allowsRemovalOfLastSavedPaymentMethod + } + + if let paymentMethodOrder = params["paymentMethodOrder"] as? Array { + configuration.paymentMethodOrder = paymentMethodOrder + } + return (nil, configuration) } diff --git a/packages/stripe_ios/ios/Classes/StripePlugin.swift b/packages/stripe_ios/ios/Classes/StripePlugin.swift index 30052c3e2..0e5ac6f29 100644 --- a/packages/stripe_ios/ios/Classes/StripePlugin.swift +++ b/packages/stripe_ios/ios/Classes/StripePlugin.swift @@ -204,6 +204,8 @@ class StripePlugin: StripeSdk, FlutterPlugin, ViewManagerDelegate { resolver: resolver(for: result), rejecter: rejecter(for: result) ) + case "handleNextActionForSetupIntent": + return handleNextActionForSetupIntent(call, result: result) default: result(FlutterMethodNotImplemented) } diff --git a/packages/stripe_platform_interface/lib/src/models/ach_params.freezed.dart b/packages/stripe_platform_interface/lib/src/models/ach_params.freezed.dart index eb76582c3..3babcdbda 100644 --- a/packages/stripe_platform_interface/lib/src/models/ach_params.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/ach_params.freezed.dart @@ -12,7 +12,7 @@ part of 'ach_params.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); CollectBankAccountParams _$CollectBankAccountParamsFromJson( Map json) { @@ -160,7 +160,7 @@ class _$CollectBankAccountParamsImpl implements _CollectBankAccountParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CollectBankAccountParamsImpl && @@ -362,7 +362,7 @@ class _$VerifyMicroDepositsParamsImpl implements _VerifyMicroDepositsParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$VerifyMicroDepositsParamsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/address.freezed.dart b/packages/stripe_platform_interface/lib/src/models/address.freezed.dart index 76ea8d820..0c9335b92 100644 --- a/packages/stripe_platform_interface/lib/src/models/address.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/address.freezed.dart @@ -12,7 +12,7 @@ part of 'address.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); AddressDetails _$AddressDetailsFromJson(Map json) { return _AddressDetails.fromJson(json); @@ -165,7 +165,7 @@ class _$AddressDetailsImpl implements _AddressDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddressDetailsImpl && @@ -422,7 +422,7 @@ class _$AddressImpl extends _Address { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddressImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/app_info.freezed.dart b/packages/stripe_platform_interface/lib/src/models/app_info.freezed.dart index 3c71d6865..0cb98869c 100644 --- a/packages/stripe_platform_interface/lib/src/models/app_info.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/app_info.freezed.dart @@ -12,7 +12,7 @@ part of 'app_info.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); AppInfo _$AppInfoFromJson(Map json) { return _AppInfo.fromJson(json); @@ -148,7 +148,7 @@ class _$AppInfoImpl implements _AppInfo { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AppInfoImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/apple_pay.dart b/packages/stripe_platform_interface/lib/src/models/apple_pay.dart index 3fcb4f0e7..ecfb4b093 100644 --- a/packages/stripe_platform_interface/lib/src/models/apple_pay.dart +++ b/packages/stripe_platform_interface/lib/src/models/apple_pay.dart @@ -138,8 +138,9 @@ class ApplePayCartSummaryItem with _$ApplePayCartSummaryItem { /// The unix timestamp of the start date. Measured in seconds. int? startDate, + ////The unix timestamp of the end date. Measured in seconds. */ - int? number, + int? endDate, }) = RecurringCartSummaryItem; factory ApplePayCartSummaryItem.fromJson(Map json) => diff --git a/packages/stripe_platform_interface/lib/src/models/apple_pay.freezed.dart b/packages/stripe_platform_interface/lib/src/models/apple_pay.freezed.dart index 0b5827095..f3d2b5216 100644 --- a/packages/stripe_platform_interface/lib/src/models/apple_pay.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/apple_pay.freezed.dart @@ -12,7 +12,7 @@ part of 'apple_pay.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); ApplePayShippingMethod _$ApplePayShippingMethodFromJson( Map json) { @@ -258,7 +258,7 @@ class _$ApplePayShippingMethodImpl implements _ApplePayShippingMethod { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayShippingMethodImpl && @@ -387,7 +387,7 @@ mixin _$ApplePayCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number) + int? endDate) recurring, }) => throw _privateConstructorUsedError; @@ -401,7 +401,7 @@ mixin _$ApplePayCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, }) => throw _privateConstructorUsedError; @@ -415,7 +415,7 @@ mixin _$ApplePayCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, required TResult orElse(), }) => @@ -568,7 +568,7 @@ class _$ImmediateCartSummaryItemImpl implements ImmediateCartSummaryItem { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ImmediateCartSummaryItemImpl && @@ -602,7 +602,7 @@ class _$ImmediateCartSummaryItemImpl implements ImmediateCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number) + int? endDate) recurring, }) { return immediate(label, amount, isPending); @@ -619,7 +619,7 @@ class _$ImmediateCartSummaryItemImpl implements ImmediateCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, }) { return immediate?.call(label, amount, isPending); @@ -636,7 +636,7 @@ class _$ImmediateCartSummaryItemImpl implements ImmediateCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, required TResult orElse(), }) { @@ -793,7 +793,7 @@ class _$DeferredSummaryItemImpl implements DeferredSummaryItem { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeferredSummaryItemImpl && @@ -827,7 +827,7 @@ class _$DeferredSummaryItemImpl implements DeferredSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number) + int? endDate) recurring, }) { return deferred(label, amount, deferredDate); @@ -844,7 +844,7 @@ class _$DeferredSummaryItemImpl implements DeferredSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, }) { return deferred?.call(label, amount, deferredDate); @@ -861,7 +861,7 @@ class _$DeferredSummaryItemImpl implements DeferredSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, required TResult orElse(), }) { @@ -954,7 +954,7 @@ abstract class _$$RecurringCartSummaryItemImplCopyWith<$Res> ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number}); + int? endDate}); } /// @nodoc @@ -975,7 +975,7 @@ class __$$RecurringCartSummaryItemImplCopyWithImpl<$Res> Object? intervalUnit = null, Object? intervalCount = null, Object? startDate = freezed, - Object? number = freezed, + Object? endDate = freezed, }) { return _then(_$RecurringCartSummaryItemImpl( label: null == label @@ -998,9 +998,9 @@ class __$$RecurringCartSummaryItemImplCopyWithImpl<$Res> ? _value.startDate : startDate // ignore: cast_nullable_to_non_nullable as int?, - number: freezed == number - ? _value.number - : number // ignore: cast_nullable_to_non_nullable + endDate: freezed == endDate + ? _value.endDate + : endDate // ignore: cast_nullable_to_non_nullable as int?, )); } @@ -1016,7 +1016,7 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { required this.intervalUnit, required this.intervalCount, this.startDate, - this.number, + this.endDate, final String? $type}) : $type = $type ?? 'Recurring'; @@ -1044,18 +1044,18 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { final int? startDate; ////The unix timestamp of the end date. Measured in seconds. */ @override - final int? number; + final int? endDate; @JsonKey(name: 'paymentType') final String $type; @override String toString() { - return 'ApplePayCartSummaryItem.recurring(label: $label, amount: $amount, intervalUnit: $intervalUnit, intervalCount: $intervalCount, startDate: $startDate, number: $number)'; + return 'ApplePayCartSummaryItem.recurring(label: $label, amount: $amount, intervalUnit: $intervalUnit, intervalCount: $intervalCount, startDate: $startDate, endDate: $endDate)'; } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecurringCartSummaryItemImpl && @@ -1067,13 +1067,13 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { other.intervalCount == intervalCount) && (identical(other.startDate, startDate) || other.startDate == startDate) && - (identical(other.number, number) || other.number == number)); + (identical(other.endDate, endDate) || other.endDate == endDate)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash(runtimeType, label, amount, intervalUnit, - intervalCount, startDate, number); + intervalCount, startDate, endDate); @JsonKey(ignore: true) @override @@ -1095,11 +1095,11 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number) + int? endDate) recurring, }) { return recurring( - label, amount, intervalUnit, intervalCount, startDate, number); + label, amount, intervalUnit, intervalCount, startDate, endDate); } @override @@ -1113,11 +1113,11 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, }) { return recurring?.call( - label, amount, intervalUnit, intervalCount, startDate, number); + label, amount, intervalUnit, intervalCount, startDate, endDate); } @override @@ -1131,13 +1131,13 @@ class _$RecurringCartSummaryItemImpl implements RecurringCartSummaryItem { ApplePayIntervalUnit intervalUnit, int intervalCount, int? startDate, - int? number)? + int? endDate)? recurring, required TResult orElse(), }) { if (recurring != null) { return recurring( - label, amount, intervalUnit, intervalCount, startDate, number); + label, amount, intervalUnit, intervalCount, startDate, endDate); } return orElse(); } @@ -1191,7 +1191,7 @@ abstract class RecurringCartSummaryItem implements ApplePayCartSummaryItem { required final ApplePayIntervalUnit intervalUnit, required final int intervalCount, final int? startDate, - final int? number}) = _$RecurringCartSummaryItemImpl; + final int? endDate}) = _$RecurringCartSummaryItemImpl; factory RecurringCartSummaryItem.fromJson(Map json) = _$RecurringCartSummaryItemImpl.fromJson; @@ -1214,7 +1214,7 @@ abstract class RecurringCartSummaryItem implements ApplePayCartSummaryItem { /// The unix timestamp of the start date. Measured in seconds. int? get startDate; ////The unix timestamp of the end date. Measured in seconds. */ - int? get number; + int? get endDate; @override @JsonKey(ignore: true) _$$RecurringCartSummaryItemImplCopyWith<_$RecurringCartSummaryItemImpl> @@ -1499,7 +1499,7 @@ class _$ApplePayPresentParamsImpl implements _ApplePayPresentParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayPresentParamsImpl && @@ -1722,7 +1722,7 @@ class _$ApplePayErrorAddressFieldImpl implements _ApplePayErrorAddressField { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayErrorAddressFieldImpl && @@ -1954,7 +1954,7 @@ class _$ApplePayContactNameImpl implements _ApplePayContactName { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayContactNameImpl && @@ -2239,7 +2239,7 @@ class _$ApplePayPostalAddressImpl implements _ApplePayPostalAddress { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayPostalAddressImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/apple_pay.g.dart b/packages/stripe_platform_interface/lib/src/models/apple_pay.g.dart index bbd148abc..41286d110 100644 --- a/packages/stripe_platform_interface/lib/src/models/apple_pay.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/apple_pay.g.dart @@ -75,7 +75,7 @@ _$RecurringCartSummaryItemImpl _$$RecurringCartSummaryItemImplFromJson( $enumDecode(_$ApplePayIntervalUnitEnumMap, json['intervalUnit']), intervalCount: json['intervalCount'] as int, startDate: json['startDate'] as int?, - number: json['number'] as int?, + endDate: json['endDate'] as int?, $type: json['paymentType'] as String?, ); @@ -87,7 +87,7 @@ Map _$$RecurringCartSummaryItemImplToJson( 'intervalUnit': _$ApplePayIntervalUnitEnumMap[instance.intervalUnit]!, 'intervalCount': instance.intervalCount, 'startDate': instance.startDate, - 'number': instance.number, + 'endDate': instance.endDate, 'paymentType': instance.$type, }; diff --git a/packages/stripe_platform_interface/lib/src/models/aubecs_form.freezed.dart b/packages/stripe_platform_interface/lib/src/models/aubecs_form.freezed.dart index 3eb4c5271..969b08698 100644 --- a/packages/stripe_platform_interface/lib/src/models/aubecs_form.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/aubecs_form.freezed.dart @@ -12,7 +12,7 @@ part of 'aubecs_form.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); AubecsFormStyle _$AubecsFormStyleFromJson(Map json) { return _AubecsFormStyle.fromJson(json); @@ -268,7 +268,7 @@ class _$AubecsFormStyleImpl implements _AubecsFormStyle { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AubecsFormStyleImpl && @@ -531,7 +531,7 @@ class _$AubecsFormInputDetailsImpl implements _AubecsFormInputDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AubecsFormInputDetailsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/card_details.freezed.dart b/packages/stripe_platform_interface/lib/src/models/card_details.freezed.dart index 4c2f6b110..018369ee6 100644 --- a/packages/stripe_platform_interface/lib/src/models/card_details.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/card_details.freezed.dart @@ -12,7 +12,7 @@ part of 'card_details.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); CardDetails _$CardDetailsFromJson(Map json) { return _CardDetailsConstructor.fromJson(json); @@ -157,7 +157,7 @@ class _$CardDetailsConstructorImpl extends _CardDetailsConstructor { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardDetailsConstructorImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/card_field_input.freezed.dart b/packages/stripe_platform_interface/lib/src/models/card_field_input.freezed.dart index ea4e04fd3..b5c82173e 100644 --- a/packages/stripe_platform_interface/lib/src/models/card_field_input.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/card_field_input.freezed.dart @@ -12,7 +12,7 @@ part of 'card_field_input.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); CardStyle _$CardStyleFromJson(Map json) { return _CardStyleConstructor.fromJson(json); @@ -307,7 +307,7 @@ class _$CardStyleConstructorImpl extends _CardStyleConstructor { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardStyleConstructorImpl && @@ -707,7 +707,7 @@ class _$CardFormStyleConstructorImpl extends _CardFormStyleConstructor { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardFormStyleConstructorImpl && @@ -979,7 +979,7 @@ class _$CardPlaceholderConstructorImpl extends _CardPlaceholderConstructor { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardPlaceholderConstructorImpl && @@ -1359,7 +1359,7 @@ class _$CardFieldInputDetailsImpl extends _CardFieldInputDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardFieldInputDetailsImpl && @@ -1582,7 +1582,7 @@ class _$CardFieldFocusNameImpl implements _CardFieldFocusName { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardFieldFocusNameImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/create_token_data.freezed.dart b/packages/stripe_platform_interface/lib/src/models/create_token_data.freezed.dart index c202abe1d..9bde8664d 100644 --- a/packages/stripe_platform_interface/lib/src/models/create_token_data.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/create_token_data.freezed.dart @@ -12,7 +12,7 @@ part of 'create_token_data.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); CreateTokenParams _$CreateTokenParamsFromJson(Map json) { switch (json['runtimeType']) { @@ -200,7 +200,7 @@ class _$CreateTokenParamsLegacyImpl implements _CreateTokenParamsLegacy { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenParamsLegacyImpl && @@ -390,7 +390,7 @@ class _$CreateTokenParamsCardImpl implements _CreateTokenParamsCard { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenParamsCardImpl && @@ -574,7 +574,7 @@ class _$CreateTokenParamsBankAccountImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenParamsBankAccountImpl && @@ -755,7 +755,7 @@ class _$CreateTokenParamsPIIImpl implements _CreateTokenParamsPII { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenParamsPIIImpl && @@ -1040,7 +1040,7 @@ class _$CardTokenParamsImpl implements _CardTokenParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardTokenParamsImpl && @@ -1220,7 +1220,7 @@ class _$PIITokenParamsImpl implements _PIITokenParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PIITokenParamsImpl && @@ -1499,7 +1499,7 @@ class _$BankAccountTokenParamsImpl implements _BankAccountTokenParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BankAccountTokenParamsImpl && @@ -1820,7 +1820,7 @@ class _$TokenDataImpl extends _TokenData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$TokenDataImpl && @@ -2196,7 +2196,7 @@ class _$CardDataImpl implements _CardData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardDataImpl && @@ -2582,7 +2582,7 @@ class _$BankAccountImpl implements _BankAccount { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BankAccountImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/customer_sheet.dart b/packages/stripe_platform_interface/lib/src/models/customer_sheet.dart index c5869c9d4..ad0a2040c 100644 --- a/packages/stripe_platform_interface/lib/src/models/customer_sheet.dart +++ b/packages/stripe_platform_interface/lib/src/models/customer_sheet.dart @@ -32,6 +32,11 @@ class CustomerSheetInitParams with _$CustomerSheetInitParams { /// Your customer-facing business name. The default value is the name of your app. String? merchantDisplayName, + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? allowsRemovalOfLastSavedPaymentMethod, + /// Optional configuration for setting the header text of the Payment Method selection screen String? headerTextForSelectionScreen, diff --git a/packages/stripe_platform_interface/lib/src/models/customer_sheet.freezed.dart b/packages/stripe_platform_interface/lib/src/models/customer_sheet.freezed.dart index 4fcebe212..9f2779114 100644 --- a/packages/stripe_platform_interface/lib/src/models/customer_sheet.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/customer_sheet.freezed.dart @@ -12,7 +12,7 @@ part of 'customer_sheet.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); CustomerSheetInitParams _$CustomerSheetInitParamsFromJson( Map json) { @@ -42,6 +42,12 @@ mixin _$CustomerSheetInitParams { /// Your customer-facing business name. The default value is the name of your app. String? get merchantDisplayName => throw _privateConstructorUsedError; + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? get allowsRemovalOfLastSavedPaymentMethod => + throw _privateConstructorUsedError; + /// Optional configuration for setting the header text of the Payment Method selection screen String? get headerTextForSelectionScreen => throw _privateConstructorUsedError; @@ -92,6 +98,7 @@ abstract class $CustomerSheetInitParamsCopyWith<$Res> { String customerId, String customerEphemeralKeySecret, String? merchantDisplayName, + bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? @@ -129,6 +136,7 @@ class _$CustomerSheetInitParamsCopyWithImpl<$Res, Object? customerId = null, Object? customerEphemeralKeySecret = null, Object? merchantDisplayName = freezed, + Object? allowsRemovalOfLastSavedPaymentMethod = freezed, Object? headerTextForSelectionScreen = freezed, Object? defaultBillingDetails = freezed, Object? billingDetailsCollectionConfiguration = freezed, @@ -163,6 +171,11 @@ class _$CustomerSheetInitParamsCopyWithImpl<$Res, ? _value.merchantDisplayName : merchantDisplayName // ignore: cast_nullable_to_non_nullable as String?, + allowsRemovalOfLastSavedPaymentMethod: freezed == + allowsRemovalOfLastSavedPaymentMethod + ? _value.allowsRemovalOfLastSavedPaymentMethod + : allowsRemovalOfLastSavedPaymentMethod // ignore: cast_nullable_to_non_nullable + as bool?, headerTextForSelectionScreen: freezed == headerTextForSelectionScreen ? _value.headerTextForSelectionScreen : headerTextForSelectionScreen // ignore: cast_nullable_to_non_nullable @@ -257,6 +270,7 @@ abstract class _$$CustomerSheetInitParamsImplCopyWith<$Res> String customerId, String customerEphemeralKeySecret, String? merchantDisplayName, + bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? @@ -296,6 +310,7 @@ class __$$CustomerSheetInitParamsImplCopyWithImpl<$Res> Object? customerId = null, Object? customerEphemeralKeySecret = null, Object? merchantDisplayName = freezed, + Object? allowsRemovalOfLastSavedPaymentMethod = freezed, Object? headerTextForSelectionScreen = freezed, Object? defaultBillingDetails = freezed, Object? billingDetailsCollectionConfiguration = freezed, @@ -330,6 +345,11 @@ class __$$CustomerSheetInitParamsImplCopyWithImpl<$Res> ? _value.merchantDisplayName : merchantDisplayName // ignore: cast_nullable_to_non_nullable as String?, + allowsRemovalOfLastSavedPaymentMethod: freezed == + allowsRemovalOfLastSavedPaymentMethod + ? _value.allowsRemovalOfLastSavedPaymentMethod + : allowsRemovalOfLastSavedPaymentMethod // ignore: cast_nullable_to_non_nullable + as bool?, headerTextForSelectionScreen: freezed == headerTextForSelectionScreen ? _value.headerTextForSelectionScreen : headerTextForSelectionScreen // ignore: cast_nullable_to_non_nullable @@ -379,6 +399,7 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { required this.customerId, required this.customerEphemeralKeySecret, this.merchantDisplayName, + this.allowsRemovalOfLastSavedPaymentMethod, this.headerTextForSelectionScreen, this.defaultBillingDetails, this.billingDetailsCollectionConfiguration, @@ -420,6 +441,12 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { @override final String? merchantDisplayName; + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + @override + final bool? allowsRemovalOfLastSavedPaymentMethod; + /// Optional configuration for setting the header text of the Payment Method selection screen @override final String? headerTextForSelectionScreen; @@ -470,19 +497,18 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { @override String toString() { - return 'CustomerSheetInitParams(style: $style, appearance: $appearance, setupIntentClientSecret: $setupIntentClientSecret, customerId: $customerId, customerEphemeralKeySecret: $customerEphemeralKeySecret, merchantDisplayName: $merchantDisplayName, headerTextForSelectionScreen: $headerTextForSelectionScreen, defaultBillingDetails: $defaultBillingDetails, billingDetailsCollectionConfiguration: $billingDetailsCollectionConfiguration, returnURL: $returnURL, removeSavedPaymentMethodMessage: $removeSavedPaymentMethodMessage, applePayEnabled: $applePayEnabled, googlePayEnabled: $googlePayEnabled, preferredNetworks: $preferredNetworks)'; + return 'CustomerSheetInitParams(style: $style, appearance: $appearance, setupIntentClientSecret: $setupIntentClientSecret, customerId: $customerId, customerEphemeralKeySecret: $customerEphemeralKeySecret, merchantDisplayName: $merchantDisplayName, allowsRemovalOfLastSavedPaymentMethod: $allowsRemovalOfLastSavedPaymentMethod, headerTextForSelectionScreen: $headerTextForSelectionScreen, defaultBillingDetails: $defaultBillingDetails, billingDetailsCollectionConfiguration: $billingDetailsCollectionConfiguration, returnURL: $returnURL, removeSavedPaymentMethodMessage: $removeSavedPaymentMethodMessage, applePayEnabled: $applePayEnabled, googlePayEnabled: $googlePayEnabled, preferredNetworks: $preferredNetworks)'; } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CustomerSheetInitParamsImpl && (identical(other.style, style) || other.style == style) && (identical(other.appearance, appearance) || other.appearance == appearance) && - (identical( - other.setupIntentClientSecret, setupIntentClientSecret) || + (identical(other.setupIntentClientSecret, setupIntentClientSecret) || other.setupIntentClientSecret == setupIntentClientSecret) && (identical(other.customerId, customerId) || other.customerId == customerId) && @@ -491,6 +517,10 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { customerEphemeralKeySecret) && (identical(other.merchantDisplayName, merchantDisplayName) || other.merchantDisplayName == merchantDisplayName) && + (identical(other.allowsRemovalOfLastSavedPaymentMethod, + allowsRemovalOfLastSavedPaymentMethod) || + other.allowsRemovalOfLastSavedPaymentMethod == + allowsRemovalOfLastSavedPaymentMethod) && (identical(other.headerTextForSelectionScreen, headerTextForSelectionScreen) || other.headerTextForSelectionScreen == headerTextForSelectionScreen) && @@ -502,16 +532,14 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { billingDetailsCollectionConfiguration) && (identical(other.returnURL, returnURL) || other.returnURL == returnURL) && - (identical(other.removeSavedPaymentMethodMessage, - removeSavedPaymentMethodMessage) || + (identical(other.removeSavedPaymentMethodMessage, removeSavedPaymentMethodMessage) || other.removeSavedPaymentMethodMessage == removeSavedPaymentMethodMessage) && (identical(other.applePayEnabled, applePayEnabled) || other.applePayEnabled == applePayEnabled) && (identical(other.googlePayEnabled, googlePayEnabled) || other.googlePayEnabled == googlePayEnabled) && - const DeepCollectionEquality() - .equals(other._preferredNetworks, _preferredNetworks)); + const DeepCollectionEquality().equals(other._preferredNetworks, _preferredNetworks)); } @JsonKey(ignore: true) @@ -524,6 +552,7 @@ class _$CustomerSheetInitParamsImpl implements _CustomerSheetInitParams { customerId, customerEphemeralKeySecret, merchantDisplayName, + allowsRemovalOfLastSavedPaymentMethod, headerTextForSelectionScreen, defaultBillingDetails, billingDetailsCollectionConfiguration, @@ -556,6 +585,7 @@ abstract class _CustomerSheetInitParams implements CustomerSheetInitParams { required final String customerId, required final String customerEphemeralKeySecret, final String? merchantDisplayName, + final bool? allowsRemovalOfLastSavedPaymentMethod, final String? headerTextForSelectionScreen, final BillingDetails? defaultBillingDetails, final BillingDetailsCollectionConfiguration? @@ -600,6 +630,12 @@ abstract class _CustomerSheetInitParams implements CustomerSheetInitParams { String? get merchantDisplayName; @override + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? get allowsRemovalOfLastSavedPaymentMethod; + @override + /// Optional configuration for setting the header text of the Payment Method selection screen String? get headerTextForSelectionScreen; @override @@ -791,7 +827,7 @@ class _$CustomerSheetPresentParamsImpl implements _CustomerSheetPresentParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CustomerSheetPresentParamsImpl && @@ -1041,7 +1077,7 @@ class _$CustomerSheetResultImpl implements _CustomerSheetResult { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CustomerSheetResultImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/customer_sheet.g.dart b/packages/stripe_platform_interface/lib/src/models/customer_sheet.g.dart index 819878538..b656b7cc1 100644 --- a/packages/stripe_platform_interface/lib/src/models/customer_sheet.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/customer_sheet.g.dart @@ -18,6 +18,8 @@ _$CustomerSheetInitParamsImpl _$$CustomerSheetInitParamsImplFromJson( customerId: json['customerId'] as String, customerEphemeralKeySecret: json['customerEphemeralKeySecret'] as String, merchantDisplayName: json['merchantDisplayName'] as String?, + allowsRemovalOfLastSavedPaymentMethod: + json['allowsRemovalOfLastSavedPaymentMethod'] as bool?, headerTextForSelectionScreen: json['headerTextForSelectionScreen'] as String?, defaultBillingDetails: json['defaultBillingDetails'] == null @@ -49,6 +51,8 @@ Map _$$CustomerSheetInitParamsImplToJson( 'customerId': instance.customerId, 'customerEphemeralKeySecret': instance.customerEphemeralKeySecret, 'merchantDisplayName': instance.merchantDisplayName, + 'allowsRemovalOfLastSavedPaymentMethod': + instance.allowsRemovalOfLastSavedPaymentMethod, 'headerTextForSelectionScreen': instance.headerTextForSelectionScreen, 'defaultBillingDetails': instance.defaultBillingDetails?.toJson(), 'billingDetailsCollectionConfiguration': diff --git a/packages/stripe_platform_interface/lib/src/models/errors.dart b/packages/stripe_platform_interface/lib/src/models/errors.dart index 1278c5b62..ad894e0c5 100644 --- a/packages/stripe_platform_interface/lib/src/models/errors.dart +++ b/packages/stripe_platform_interface/lib/src/models/errors.dart @@ -51,8 +51,7 @@ class LocalizedErrorMessage with _$LocalizedErrorMessage { @JsonSerializable(explicitToJson: true) const factory LocalizedErrorMessage({ /// The error code for example Cancelled - @JsonKey(unknownEnumValue: FailureCode.Unknown) - required FailureCode code, + @JsonKey(unknownEnumValue: FailureCode.Unknown) required FailureCode code, /// Localized error message if any String? localizedMessage, diff --git a/packages/stripe_platform_interface/lib/src/models/errors.freezed.dart b/packages/stripe_platform_interface/lib/src/models/errors.freezed.dart index 8be8457dc..808c63523 100644 --- a/packages/stripe_platform_interface/lib/src/models/errors.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/errors.freezed.dart @@ -12,7 +12,7 @@ part of 'errors.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); StripeError _$StripeErrorFromJson(Map json) { return _StripeErrorGeneric.fromJson(json); @@ -135,7 +135,7 @@ class _$StripeErrorGenericImpl implements _StripeErrorGeneric { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$StripeErrorGenericImpl && @@ -295,7 +295,7 @@ class _$StripeExceptionImpl implements _StripeException { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$StripeExceptionImpl && @@ -547,7 +547,7 @@ class _$LocalizedErrorMessageImpl implements _LocalizedErrorMessage { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LocalizedErrorMessageImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/financial_connections.freezed.dart b/packages/stripe_platform_interface/lib/src/models/financial_connections.freezed.dart index a670d49b1..3cc802824 100644 --- a/packages/stripe_platform_interface/lib/src/models/financial_connections.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/financial_connections.freezed.dart @@ -12,7 +12,7 @@ part of 'financial_connections.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); FinancialConnectionSessionResult _$FinancialConnectionSessionResultFromJson( Map json) { @@ -134,7 +134,7 @@ class _$FinancialConnectionSessionResultImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FinancialConnectionSessionResultImpl && @@ -331,7 +331,7 @@ class _$FinancialConnectionTokenResultImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FinancialConnectionTokenResultImpl && @@ -559,7 +559,7 @@ class _$FinancialConnectionSessionImpl implements _FinancialConnectionSession { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FinancialConnectionSessionImpl && @@ -835,7 +835,7 @@ class _$FinancialConnectionBankAccountTokenImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FinancialConnectionBankAccountTokenImpl && @@ -1314,7 +1314,7 @@ class _$FinancialConnectionAccountImpl implements _FinancialConnectionAccount { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FinancialConnectionAccountImpl && @@ -1572,7 +1572,7 @@ class _$BalanceRefreshImpl implements _BalanceRefresh { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BalanceRefreshImpl && @@ -1865,7 +1865,7 @@ class _$AccountBalanceImpl implements _AccountBalance { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AccountBalanceImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/google_pay.freezed.dart b/packages/stripe_platform_interface/lib/src/models/google_pay.freezed.dart index 819b51a25..3e2996c19 100644 --- a/packages/stripe_platform_interface/lib/src/models/google_pay.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/google_pay.freezed.dart @@ -12,7 +12,7 @@ part of 'google_pay.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); PresentGooglePayParams _$PresentGooglePayParamsFromJson( Map json) { @@ -163,7 +163,7 @@ class _$PresentGooglePayParamsImpl implements _PresentGooglePayParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PresentGooglePayParamsImpl && @@ -492,7 +492,7 @@ class _$GooglePayInitParamsImpl implements _GooglePayInitParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayInitParamsImpl && @@ -740,7 +740,7 @@ class _$BillingAddressConfigImpl implements _BillingAddressConfig { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BillingAddressConfigImpl && @@ -938,7 +938,7 @@ class _$CreateGooglePayPaymentParamsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateGooglePayPaymentParamsImpl && @@ -1161,7 +1161,7 @@ class _$IsGooglePaySupportedParamsImpl implements _IsGooglePaySupportedParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IsGooglePaySupportedParamsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/intent_creation_callback_params.freezed.dart b/packages/stripe_platform_interface/lib/src/models/intent_creation_callback_params.freezed.dart index 35d65746d..6900aefca 100644 --- a/packages/stripe_platform_interface/lib/src/models/intent_creation_callback_params.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/intent_creation_callback_params.freezed.dart @@ -12,7 +12,7 @@ part of 'intent_creation_callback_params.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); IntentCreationCallbackParams _$IntentCreationCallbackParamsFromJson( Map json) { @@ -157,7 +157,7 @@ class _$IntentCreationCallbackParamsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IntentCreationCallbackParamsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/next_action.dart b/packages/stripe_platform_interface/lib/src/models/next_action.dart index f44d607fd..f3fedbb3d 100644 --- a/packages/stripe_platform_interface/lib/src/models/next_action.dart +++ b/packages/stripe_platform_interface/lib/src/models/next_action.dart @@ -58,6 +58,14 @@ class NextAction with _$NextAction { factory NextAction.fromJson(Map json) => _$NextActionFromJson(json); + + /// Contains details necessary for the customer to complete the payment. + @JsonSerializable(explicitToJson: true) + @FreezedUnionValue('multibanco') + const factory NextAction.multibanco({ + /// The URL for the hosted multibanco voucher page, which allows customers to view and print an multibanco voucher. + String? voucherURL, + }) = _NextActionMultiBanco; } /// The type of followup action the customer needs to do in order to complete diff --git a/packages/stripe_platform_interface/lib/src/models/next_action.freezed.dart b/packages/stripe_platform_interface/lib/src/models/next_action.freezed.dart index 024c6670a..9c80b3ac3 100644 --- a/packages/stripe_platform_interface/lib/src/models/next_action.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/next_action.freezed.dart @@ -12,7 +12,7 @@ part of 'next_action.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); NextAction _$NextActionFromJson(Map json) { switch (json['type']) { @@ -24,6 +24,8 @@ NextAction _$NextActionFromJson(Map json) { return _NextActionWeChatRedirect.fromJson(json); case 'verifyWithMicrodeposits': return _NextActionMicroDeposits.fromJson(json); + case 'multibanco': + return _NextActionMultiBanco.fromJson(json); default: throw CheckedFromJsonException( @@ -43,6 +45,7 @@ mixin _$NextAction { required TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType) verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -55,6 +58,7 @@ mixin _$NextAction { TResult? Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -67,6 +71,7 @@ mixin _$NextAction { TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, required TResult orElse(), }) => throw _privateConstructorUsedError; @@ -78,6 +83,7 @@ mixin _$NextAction { wechatPayRedirect, required TResult Function(_NextActionMicroDeposits value) verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -86,6 +92,7 @@ mixin _$NextAction { TResult? Function(_NextActionOxxo value)? displayOxxoDetails, TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -94,6 +101,7 @@ mixin _$NextAction { TResult Function(_NextActionOxxo value)? displayOxxoDetails, TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, required TResult orElse(), }) => throw _privateConstructorUsedError; @@ -172,7 +180,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NextActionRedirectImpl && @@ -202,6 +210,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { required TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType) verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, }) { return redirectToUrl(redirectUrl); } @@ -217,6 +226,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { TResult? Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, }) { return redirectToUrl?.call(redirectUrl); } @@ -232,6 +242,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, required TResult orElse(), }) { if (redirectToUrl != null) { @@ -249,6 +260,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { wechatPayRedirect, required TResult Function(_NextActionMicroDeposits value) verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, }) { return redirectToUrl(this); } @@ -260,6 +272,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { TResult? Function(_NextActionOxxo value)? displayOxxoDetails, TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, }) { return redirectToUrl?.call(this); } @@ -271,6 +284,7 @@ class _$NextActionRedirectImpl implements _NextActionRedirect { TResult Function(_NextActionOxxo value)? displayOxxoDetails, TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, required TResult orElse(), }) { if (redirectToUrl != null) { @@ -377,7 +391,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NextActionOxxoImpl && @@ -412,6 +426,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { required TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType) verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, }) { return displayOxxoDetails(expiration, voucherURL, voucherNumber); } @@ -427,6 +442,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { TResult? Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, }) { return displayOxxoDetails?.call(expiration, voucherURL, voucherNumber); } @@ -442,6 +458,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, required TResult orElse(), }) { if (displayOxxoDetails != null) { @@ -459,6 +476,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { wechatPayRedirect, required TResult Function(_NextActionMicroDeposits value) verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, }) { return displayOxxoDetails(this); } @@ -470,6 +488,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { TResult? Function(_NextActionOxxo value)? displayOxxoDetails, TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, }) { return displayOxxoDetails?.call(this); } @@ -481,6 +500,7 @@ class _$NextActionOxxoImpl implements _NextActionOxxo { TResult Function(_NextActionOxxo value)? displayOxxoDetails, TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, required TResult orElse(), }) { if (displayOxxoDetails != null) { @@ -575,7 +595,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NextActionWeChatRedirectImpl && @@ -605,6 +625,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { required TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType) verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, }) { return wechatPayRedirect(redirectUrl); } @@ -620,6 +641,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { TResult? Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, }) { return wechatPayRedirect?.call(redirectUrl); } @@ -635,6 +657,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, required TResult orElse(), }) { if (wechatPayRedirect != null) { @@ -652,6 +675,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { wechatPayRedirect, required TResult Function(_NextActionMicroDeposits value) verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, }) { return wechatPayRedirect(this); } @@ -663,6 +687,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { TResult? Function(_NextActionOxxo value)? displayOxxoDetails, TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, }) { return wechatPayRedirect?.call(this); } @@ -674,6 +699,7 @@ class _$NextActionWeChatRedirectImpl implements _NextActionWeChatRedirect { TResult Function(_NextActionOxxo value)? displayOxxoDetails, TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, required TResult orElse(), }) { if (wechatPayRedirect != null) { @@ -783,7 +809,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NextActionMicroDepositsImpl && @@ -818,6 +844,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { required TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType) verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, }) { return verifyWithMicroDeposits(arrivalDate, redirectUrl, microdepositType); } @@ -833,6 +860,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { TResult? Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, }) { return verifyWithMicroDeposits?.call( arrivalDate, redirectUrl, microdepositType); @@ -849,6 +877,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { TResult Function( String? arrivalDate, String? redirectUrl, String? microdepositType)? verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, required TResult orElse(), }) { if (verifyWithMicroDeposits != null) { @@ -867,6 +896,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { wechatPayRedirect, required TResult Function(_NextActionMicroDeposits value) verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, }) { return verifyWithMicroDeposits(this); } @@ -878,6 +908,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { TResult? Function(_NextActionOxxo value)? displayOxxoDetails, TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, }) { return verifyWithMicroDeposits?.call(this); } @@ -889,6 +920,7 @@ class _$NextActionMicroDepositsImpl implements _NextActionMicroDeposits { TResult Function(_NextActionOxxo value)? displayOxxoDetails, TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, required TResult orElse(), }) { if (verifyWithMicroDeposits != null) { @@ -926,3 +958,193 @@ abstract class _NextActionMicroDeposits implements NextAction { _$$NextActionMicroDepositsImplCopyWith<_$NextActionMicroDepositsImpl> get copyWith => throw _privateConstructorUsedError; } + +/// @nodoc +abstract class _$$NextActionMultiBancoImplCopyWith<$Res> { + factory _$$NextActionMultiBancoImplCopyWith(_$NextActionMultiBancoImpl value, + $Res Function(_$NextActionMultiBancoImpl) then) = + __$$NextActionMultiBancoImplCopyWithImpl<$Res>; + @useResult + $Res call({String? voucherURL}); +} + +/// @nodoc +class __$$NextActionMultiBancoImplCopyWithImpl<$Res> + extends _$NextActionCopyWithImpl<$Res, _$NextActionMultiBancoImpl> + implements _$$NextActionMultiBancoImplCopyWith<$Res> { + __$$NextActionMultiBancoImplCopyWithImpl(_$NextActionMultiBancoImpl _value, + $Res Function(_$NextActionMultiBancoImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? voucherURL = freezed, + }) { + return _then(_$NextActionMultiBancoImpl( + voucherURL: freezed == voucherURL + ? _value.voucherURL + : voucherURL // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc + +@JsonSerializable(explicitToJson: true) +class _$NextActionMultiBancoImpl implements _NextActionMultiBanco { + const _$NextActionMultiBancoImpl({this.voucherURL, final String? $type}) + : $type = $type ?? 'multibanco'; + + factory _$NextActionMultiBancoImpl.fromJson(Map json) => + _$$NextActionMultiBancoImplFromJson(json); + + /// The URL for the hosted multibanco voucher page, which allows customers to view and print an multibanco voucher. + @override + final String? voucherURL; + + @JsonKey(name: 'type') + final String $type; + + @override + String toString() { + return 'NextAction.multibanco(voucherURL: $voucherURL)'; + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$NextActionMultiBancoImpl && + (identical(other.voucherURL, voucherURL) || + other.voucherURL == voucherURL)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, voucherURL); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$NextActionMultiBancoImplCopyWith<_$NextActionMultiBancoImpl> + get copyWith => + __$$NextActionMultiBancoImplCopyWithImpl<_$NextActionMultiBancoImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String? redirectUrl) redirectToUrl, + required TResult Function( + int? expiration, String? voucherURL, String? voucherNumber) + displayOxxoDetails, + required TResult Function(String? redirectUrl) wechatPayRedirect, + required TResult Function( + String? arrivalDate, String? redirectUrl, String? microdepositType) + verifyWithMicroDeposits, + required TResult Function(String? voucherURL) multibanco, + }) { + return multibanco(voucherURL); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String? redirectUrl)? redirectToUrl, + TResult? Function( + int? expiration, String? voucherURL, String? voucherNumber)? + displayOxxoDetails, + TResult? Function(String? redirectUrl)? wechatPayRedirect, + TResult? Function( + String? arrivalDate, String? redirectUrl, String? microdepositType)? + verifyWithMicroDeposits, + TResult? Function(String? voucherURL)? multibanco, + }) { + return multibanco?.call(voucherURL); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String? redirectUrl)? redirectToUrl, + TResult Function( + int? expiration, String? voucherURL, String? voucherNumber)? + displayOxxoDetails, + TResult Function(String? redirectUrl)? wechatPayRedirect, + TResult Function( + String? arrivalDate, String? redirectUrl, String? microdepositType)? + verifyWithMicroDeposits, + TResult Function(String? voucherURL)? multibanco, + required TResult orElse(), + }) { + if (multibanco != null) { + return multibanco(voucherURL); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(_NextActionRedirect value) redirectToUrl, + required TResult Function(_NextActionOxxo value) displayOxxoDetails, + required TResult Function(_NextActionWeChatRedirect value) + wechatPayRedirect, + required TResult Function(_NextActionMicroDeposits value) + verifyWithMicroDeposits, + required TResult Function(_NextActionMultiBanco value) multibanco, + }) { + return multibanco(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(_NextActionRedirect value)? redirectToUrl, + TResult? Function(_NextActionOxxo value)? displayOxxoDetails, + TResult? Function(_NextActionWeChatRedirect value)? wechatPayRedirect, + TResult? Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult? Function(_NextActionMultiBanco value)? multibanco, + }) { + return multibanco?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(_NextActionRedirect value)? redirectToUrl, + TResult Function(_NextActionOxxo value)? displayOxxoDetails, + TResult Function(_NextActionWeChatRedirect value)? wechatPayRedirect, + TResult Function(_NextActionMicroDeposits value)? verifyWithMicroDeposits, + TResult Function(_NextActionMultiBanco value)? multibanco, + required TResult orElse(), + }) { + if (multibanco != null) { + return multibanco(this); + } + return orElse(); + } + + @override + Map toJson() { + return _$$NextActionMultiBancoImplToJson( + this, + ); + } +} + +abstract class _NextActionMultiBanco implements NextAction { + const factory _NextActionMultiBanco({final String? voucherURL}) = + _$NextActionMultiBancoImpl; + + factory _NextActionMultiBanco.fromJson(Map json) = + _$NextActionMultiBancoImpl.fromJson; + + /// The URL for the hosted multibanco voucher page, which allows customers to view and print an multibanco voucher. + String? get voucherURL; + @JsonKey(ignore: true) + _$$NextActionMultiBancoImplCopyWith<_$NextActionMultiBancoImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/packages/stripe_platform_interface/lib/src/models/next_action.g.dart b/packages/stripe_platform_interface/lib/src/models/next_action.g.dart index 8b85f1551..a9288f6c8 100644 --- a/packages/stripe_platform_interface/lib/src/models/next_action.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/next_action.g.dart @@ -68,3 +68,17 @@ Map _$$NextActionMicroDepositsImplToJson( 'microdepositType': instance.microdepositType, 'type': instance.$type, }; + +_$NextActionMultiBancoImpl _$$NextActionMultiBancoImplFromJson( + Map json) => + _$NextActionMultiBancoImpl( + voucherURL: json['voucherURL'] as String?, + $type: json['type'] as String?, + ); + +Map _$$NextActionMultiBancoImplToJson( + _$NextActionMultiBancoImpl instance) => + { + 'voucherURL': instance.voucherURL, + 'type': instance.$type, + }; diff --git a/packages/stripe_platform_interface/lib/src/models/payment_intents.freezed.dart b/packages/stripe_platform_interface/lib/src/models/payment_intents.freezed.dart index 49a747da8..bf2012278 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_intents.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_intents.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_intents.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); PaymentIntent _$PaymentIntentFromJson(Map json) { return _PaymentIntent.fromJson(json); @@ -491,7 +491,7 @@ class _$PaymentIntentImpl implements _PaymentIntent { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentImpl && @@ -861,7 +861,7 @@ class _$ShippingDetailsImpl implements _ShippingDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ShippingDetailsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/payment_methods.dart b/packages/stripe_platform_interface/lib/src/models/payment_methods.dart index 65b6d88fa..ee8584690 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_methods.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_methods.dart @@ -261,10 +261,10 @@ class UsBankAccount with _$UsBankAccount { String? last4, /// The bank account type of the holder - required BankAccountHolderType accountHolderType, + BankAccountHolderType? accountHolderType, /// The account type - required UsBankAccountType accountType, + UsBankAccountType? accountType, /// The name of the bank of the account String? bankName, @@ -275,8 +275,8 @@ class UsBankAccount with _$UsBankAccount { /// Number of linkedaccount String? linkedAccount, - /// list of preferred network names - List? preferredNetworks, + /// list of preferred network + String? preferredNetwork, /// list of preferred network names List? supportedNetworks, @@ -739,11 +739,11 @@ class PaymentMethodDataUsBank with _$PaymentMethodDataUsBank { @JsonSerializable(explicitToJson: true) const factory PaymentMethodDataUsBank({ /// The account number of the bank account. - String? accountNumber, + required String accountNumber, ///The routing number, sort code, or other country-appropriate institution ///number for the bank account. - String? routingNumber, + required String routingNumber, /// The bank account type of the holder BankAccountHolderType? accountHolderType, diff --git a/packages/stripe_platform_interface/lib/src/models/payment_methods.freezed.dart b/packages/stripe_platform_interface/lib/src/models/payment_methods.freezed.dart index 5adfb4910..31bd65c9d 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_methods.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_methods.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_methods.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); PaymentMethod _$PaymentMethodFromJson(Map json) { return _PaymentMethod.fromJson(json); @@ -507,7 +507,7 @@ class _$PaymentMethodImpl implements _PaymentMethod { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodImpl && @@ -828,7 +828,7 @@ class _$BillingDetailsImpl implements _BillingDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BillingDetailsImpl && @@ -1023,7 +1023,7 @@ class _$AuBecsDebitImpl implements _AuBecsDebit { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AuBecsDebitImpl && @@ -1212,7 +1212,7 @@ class _$BacsDebitImpl implements _BacsDebit { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BacsDebitImpl && @@ -1556,7 +1556,7 @@ class _$CardImpl implements _Card { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardImpl && @@ -1769,7 +1769,7 @@ class _$FpxImpl implements _Fpx { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FpxImpl && @@ -1930,7 +1930,7 @@ class _$IdealImpl implements _Ideal { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdealImpl && @@ -2130,7 +2130,7 @@ class _$SepaDebitImpl implements _SepaDebit { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaDebitImpl && @@ -2290,7 +2290,7 @@ class _$SofortImpl implements _Sofort { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SofortImpl && @@ -2423,7 +2423,7 @@ class _$UpiImpl implements _Upi { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpiImpl && @@ -2476,11 +2476,11 @@ mixin _$UsBankAccount { String? get last4 => throw _privateConstructorUsedError; /// The bank account type of the holder - BankAccountHolderType get accountHolderType => + BankAccountHolderType? get accountHolderType => throw _privateConstructorUsedError; /// The account type - UsBankAccountType get accountType => throw _privateConstructorUsedError; + UsBankAccountType? get accountType => throw _privateConstructorUsedError; /// The name of the bank of the account String? get bankName => throw _privateConstructorUsedError; @@ -2491,8 +2491,8 @@ mixin _$UsBankAccount { /// Number of linkedaccount String? get linkedAccount => throw _privateConstructorUsedError; - /// list of preferred network names - List? get preferredNetworks => throw _privateConstructorUsedError; + /// list of preferred network + String? get preferredNetwork => throw _privateConstructorUsedError; /// list of preferred network names List? get supportedNetworks => throw _privateConstructorUsedError; @@ -2512,12 +2512,12 @@ abstract class $UsBankAccountCopyWith<$Res> { $Res call( {String? routingNumber, String? last4, - BankAccountHolderType accountHolderType, - UsBankAccountType accountType, + BankAccountHolderType? accountHolderType, + UsBankAccountType? accountType, String? bankName, String? fingerprint, String? linkedAccount, - List? preferredNetworks, + String? preferredNetwork, List? supportedNetworks}); } @@ -2536,12 +2536,12 @@ class _$UsBankAccountCopyWithImpl<$Res, $Val extends UsBankAccount> $Res call({ Object? routingNumber = freezed, Object? last4 = freezed, - Object? accountHolderType = null, - Object? accountType = null, + Object? accountHolderType = freezed, + Object? accountType = freezed, Object? bankName = freezed, Object? fingerprint = freezed, Object? linkedAccount = freezed, - Object? preferredNetworks = freezed, + Object? preferredNetwork = freezed, Object? supportedNetworks = freezed, }) { return _then(_value.copyWith( @@ -2553,14 +2553,14 @@ class _$UsBankAccountCopyWithImpl<$Res, $Val extends UsBankAccount> ? _value.last4 : last4 // ignore: cast_nullable_to_non_nullable as String?, - accountHolderType: null == accountHolderType + accountHolderType: freezed == accountHolderType ? _value.accountHolderType : accountHolderType // ignore: cast_nullable_to_non_nullable - as BankAccountHolderType, - accountType: null == accountType + as BankAccountHolderType?, + accountType: freezed == accountType ? _value.accountType : accountType // ignore: cast_nullable_to_non_nullable - as UsBankAccountType, + as UsBankAccountType?, bankName: freezed == bankName ? _value.bankName : bankName // ignore: cast_nullable_to_non_nullable @@ -2573,10 +2573,10 @@ class _$UsBankAccountCopyWithImpl<$Res, $Val extends UsBankAccount> ? _value.linkedAccount : linkedAccount // ignore: cast_nullable_to_non_nullable as String?, - preferredNetworks: freezed == preferredNetworks - ? _value.preferredNetworks - : preferredNetworks // ignore: cast_nullable_to_non_nullable - as List?, + preferredNetwork: freezed == preferredNetwork + ? _value.preferredNetwork + : preferredNetwork // ignore: cast_nullable_to_non_nullable + as String?, supportedNetworks: freezed == supportedNetworks ? _value.supportedNetworks : supportedNetworks // ignore: cast_nullable_to_non_nullable @@ -2596,12 +2596,12 @@ abstract class _$$UsBankAccountImplCopyWith<$Res> $Res call( {String? routingNumber, String? last4, - BankAccountHolderType accountHolderType, - UsBankAccountType accountType, + BankAccountHolderType? accountHolderType, + UsBankAccountType? accountType, String? bankName, String? fingerprint, String? linkedAccount, - List? preferredNetworks, + String? preferredNetwork, List? supportedNetworks}); } @@ -2618,12 +2618,12 @@ class __$$UsBankAccountImplCopyWithImpl<$Res> $Res call({ Object? routingNumber = freezed, Object? last4 = freezed, - Object? accountHolderType = null, - Object? accountType = null, + Object? accountHolderType = freezed, + Object? accountType = freezed, Object? bankName = freezed, Object? fingerprint = freezed, Object? linkedAccount = freezed, - Object? preferredNetworks = freezed, + Object? preferredNetwork = freezed, Object? supportedNetworks = freezed, }) { return _then(_$UsBankAccountImpl( @@ -2635,14 +2635,14 @@ class __$$UsBankAccountImplCopyWithImpl<$Res> ? _value.last4 : last4 // ignore: cast_nullable_to_non_nullable as String?, - accountHolderType: null == accountHolderType + accountHolderType: freezed == accountHolderType ? _value.accountHolderType : accountHolderType // ignore: cast_nullable_to_non_nullable - as BankAccountHolderType, - accountType: null == accountType + as BankAccountHolderType?, + accountType: freezed == accountType ? _value.accountType : accountType // ignore: cast_nullable_to_non_nullable - as UsBankAccountType, + as UsBankAccountType?, bankName: freezed == bankName ? _value.bankName : bankName // ignore: cast_nullable_to_non_nullable @@ -2655,10 +2655,10 @@ class __$$UsBankAccountImplCopyWithImpl<$Res> ? _value.linkedAccount : linkedAccount // ignore: cast_nullable_to_non_nullable as String?, - preferredNetworks: freezed == preferredNetworks - ? _value._preferredNetworks - : preferredNetworks // ignore: cast_nullable_to_non_nullable - as List?, + preferredNetwork: freezed == preferredNetwork + ? _value.preferredNetwork + : preferredNetwork // ignore: cast_nullable_to_non_nullable + as String?, supportedNetworks: freezed == supportedNetworks ? _value._supportedNetworks : supportedNetworks // ignore: cast_nullable_to_non_nullable @@ -2674,15 +2674,14 @@ class _$UsBankAccountImpl implements _UsBankAccount { const _$UsBankAccountImpl( {this.routingNumber, this.last4, - required this.accountHolderType, - required this.accountType, + this.accountHolderType, + this.accountType, this.bankName, this.fingerprint, this.linkedAccount, - final List? preferredNetworks, + this.preferredNetwork, final List? supportedNetworks}) - : _preferredNetworks = preferredNetworks, - _supportedNetworks = supportedNetworks; + : _supportedNetworks = supportedNetworks; factory _$UsBankAccountImpl.fromJson(Map json) => _$$UsBankAccountImplFromJson(json); @@ -2697,11 +2696,11 @@ class _$UsBankAccountImpl implements _UsBankAccount { /// The bank account type of the holder @override - final BankAccountHolderType accountHolderType; + final BankAccountHolderType? accountHolderType; /// The account type @override - final UsBankAccountType accountType; + final UsBankAccountType? accountType; /// The name of the bank of the account @override @@ -2715,19 +2714,9 @@ class _$UsBankAccountImpl implements _UsBankAccount { @override final String? linkedAccount; - /// list of preferred network names - final List? _preferredNetworks; - - /// list of preferred network names + /// list of preferred network @override - List? get preferredNetworks { - final value = _preferredNetworks; - if (value == null) return null; - if (_preferredNetworks is EqualUnmodifiableListView) - return _preferredNetworks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + final String? preferredNetwork; /// list of preferred network names final List? _supportedNetworks; @@ -2745,11 +2734,11 @@ class _$UsBankAccountImpl implements _UsBankAccount { @override String toString() { - return 'UsBankAccount(routingNumber: $routingNumber, last4: $last4, accountHolderType: $accountHolderType, accountType: $accountType, bankName: $bankName, fingerprint: $fingerprint, linkedAccount: $linkedAccount, preferredNetworks: $preferredNetworks, supportedNetworks: $supportedNetworks)'; + return 'UsBankAccount(routingNumber: $routingNumber, last4: $last4, accountHolderType: $accountHolderType, accountType: $accountType, bankName: $bankName, fingerprint: $fingerprint, linkedAccount: $linkedAccount, preferredNetwork: $preferredNetwork, supportedNetworks: $supportedNetworks)'; } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UsBankAccountImpl && @@ -2766,8 +2755,8 @@ class _$UsBankAccountImpl implements _UsBankAccount { other.fingerprint == fingerprint) && (identical(other.linkedAccount, linkedAccount) || other.linkedAccount == linkedAccount) && - const DeepCollectionEquality() - .equals(other._preferredNetworks, _preferredNetworks) && + (identical(other.preferredNetwork, preferredNetwork) || + other.preferredNetwork == preferredNetwork) && const DeepCollectionEquality() .equals(other._supportedNetworks, _supportedNetworks)); } @@ -2783,7 +2772,7 @@ class _$UsBankAccountImpl implements _UsBankAccount { bankName, fingerprint, linkedAccount, - const DeepCollectionEquality().hash(_preferredNetworks), + preferredNetwork, const DeepCollectionEquality().hash(_supportedNetworks)); @JsonKey(ignore: true) @@ -2804,12 +2793,12 @@ abstract class _UsBankAccount implements UsBankAccount { const factory _UsBankAccount( {final String? routingNumber, final String? last4, - required final BankAccountHolderType accountHolderType, - required final UsBankAccountType accountType, + final BankAccountHolderType? accountHolderType, + final UsBankAccountType? accountType, final String? bankName, final String? fingerprint, final String? linkedAccount, - final List? preferredNetworks, + final String? preferredNetwork, final List? supportedNetworks}) = _$UsBankAccountImpl; factory _UsBankAccount.fromJson(Map json) = @@ -2826,11 +2815,11 @@ abstract class _UsBankAccount implements UsBankAccount { @override /// The bank account type of the holder - BankAccountHolderType get accountHolderType; + BankAccountHolderType? get accountHolderType; @override /// The account type - UsBankAccountType get accountType; + UsBankAccountType? get accountType; @override /// The name of the bank of the account @@ -2845,8 +2834,8 @@ abstract class _UsBankAccount implements UsBankAccount { String? get linkedAccount; @override - /// list of preferred network names - List? get preferredNetworks; + /// list of preferred network + String? get preferredNetwork; @override /// list of preferred network names @@ -3183,7 +3172,7 @@ class _$PaymentMethodParamsCardImpl implements _PaymentMethodParamsCard { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardImpl && @@ -3499,7 +3488,7 @@ class _$PaymentMethodParamsCardWithTokenImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardWithTokenImpl && @@ -3819,7 +3808,7 @@ class _$PaymentMethodParamsCardWithMethodIdImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardWithMethodIdImpl && @@ -4136,7 +4125,7 @@ class _$PaymentMethodParamsAlipayImpl implements _PaymentMethodParamsAlipay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAlipayImpl && @@ -4451,7 +4440,7 @@ class _$PaymentMethodParamsCashAppPayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCashAppPayImpl && @@ -4767,7 +4756,7 @@ class _$PaymentMethodParamsIdealImpl implements _PaymentMethodParamsIdeal { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsIdealImpl && @@ -5081,7 +5070,7 @@ class _$PaymentMethodParamsAubecsImpl implements _PaymentMethodParamsAubecs { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAubecsImpl && @@ -5396,7 +5385,7 @@ class _$PaymentMethodParamsBankContactImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsBankContactImpl && @@ -5712,7 +5701,7 @@ class _$PaymentMethodParamsGiroPayImpl implements _PaymentMethodParamsGiroPay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsGiroPayImpl && @@ -6025,7 +6014,7 @@ class _$PaymentMethodParamsEpsImpl implements _PaymentMethodParamsEps { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsEpsImpl && @@ -6338,7 +6327,7 @@ class _$PaymentMethodParamsAffirmImpl implements _PaymentMethodParamsAffirm { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAffirmImpl && @@ -6651,7 +6640,7 @@ class _$PaymentMethodParamsPayImpl implements _PaymentMethodParamsPay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsPayImpl && @@ -6964,7 +6953,7 @@ class _$PaymentMethodParamsP24Impl implements _PaymentMethodParamsP24 { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsP24Impl && @@ -7278,7 +7267,7 @@ class _$PaymentMethodParamsFpxImpl implements _PaymentMethodParamsFpx { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsFpxImpl && @@ -7594,7 +7583,7 @@ class _$PaymentMethodParamsSepaDebitImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsSepaDebitImpl && @@ -7909,7 +7898,7 @@ class _$PaymentMethodParamsSofortImpl implements _PaymentMethodParamsSofort { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsSofortImpl && @@ -8222,7 +8211,7 @@ class _$PaymentMethodParamsAfterpayClearpayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAfterpayClearpayImpl && @@ -8537,7 +8526,7 @@ class _$PaymentMethodParamsOxxoImpl implements _PaymentMethodParamsOxxo { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsOxxoImpl && @@ -8853,7 +8842,7 @@ class _$PaymentMethodParamsKlarnaImpl implements _PaymentMethodParamsKlarna { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsKlarnaImpl && @@ -9169,7 +9158,7 @@ class _$PaymentMethodParamsPayPalImpl implements _PaymentMethodParamsPayPal { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsPayPalImpl && @@ -9484,7 +9473,7 @@ class _$PaymentMethodParamsRevolutPayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsRevolutPayImpl && @@ -9802,7 +9791,7 @@ class _$PaymentMethodParamsUsBankAccountImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsUsBankAccountImpl && @@ -10239,7 +10228,7 @@ class _$PaymentMethodDataImpl implements _PaymentMethodData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataImpl && @@ -10517,7 +10506,7 @@ class _$PaymentMethodDataCardFromTokenImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataCardFromTokenImpl && @@ -10824,7 +10813,7 @@ class _$PaymentMethodDataCardFromMethodImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataCardFromMethodImpl && @@ -11134,7 +11123,7 @@ class _$PaymentMethodDataIdealImpl implements _PaymentMethodDataIdeal { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataIdealImpl && @@ -11433,7 +11422,7 @@ class _$PaymentMethodDataAubecsImpl implements _PaymentMethodDataAubecs { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataAubecsImpl && @@ -11711,7 +11700,7 @@ class _$PaymentMethodDataFpxImpl implements _PaymentMethodDataFpx { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataFpxImpl && @@ -11993,7 +11982,7 @@ class _$PaymentMethodDataSofortImpl implements _PaymentMethodDataSofort { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataSofortImpl && @@ -12272,7 +12261,7 @@ class _$PaymentMethodDataSepaImpl implements _PaymentMethodDataSepa { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataSepaImpl && @@ -12526,7 +12515,7 @@ class _$PaymentMethodDataAfterPayImpl implements _PaymentMethodDataAfterPay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataAfterPayImpl && @@ -12593,11 +12582,11 @@ PaymentMethodDataUsBank _$PaymentMethodDataUsBankFromJson( /// @nodoc mixin _$PaymentMethodDataUsBank { /// The account number of the bank account. - String? get accountNumber => throw _privateConstructorUsedError; + String get accountNumber => throw _privateConstructorUsedError; ///The routing number, sort code, or other country-appropriate institution ///number for the bank account. - String? get routingNumber => throw _privateConstructorUsedError; + String get routingNumber => throw _privateConstructorUsedError; /// The bank account type of the holder BankAccountHolderType? get accountHolderType => @@ -12628,8 +12617,8 @@ abstract class $PaymentMethodDataUsBankCopyWith<$Res> { _$PaymentMethodDataUsBankCopyWithImpl<$Res, PaymentMethodDataUsBank>; @useResult $Res call( - {String? accountNumber, - String? routingNumber, + {String accountNumber, + String routingNumber, BankAccountHolderType? accountHolderType, UsBankAccountType? accountType, BillingDetails? billingDetails, @@ -12655,8 +12644,8 @@ class _$PaymentMethodDataUsBankCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? accountNumber = freezed, - Object? routingNumber = freezed, + Object? accountNumber = null, + Object? routingNumber = null, Object? accountHolderType = freezed, Object? accountType = freezed, Object? billingDetails = freezed, @@ -12664,14 +12653,14 @@ class _$PaymentMethodDataUsBankCopyWithImpl<$Res, Object? mandateData = freezed, }) { return _then(_value.copyWith( - accountNumber: freezed == accountNumber + accountNumber: null == accountNumber ? _value.accountNumber : accountNumber // ignore: cast_nullable_to_non_nullable - as String?, - routingNumber: freezed == routingNumber + as String, + routingNumber: null == routingNumber ? _value.routingNumber : routingNumber // ignore: cast_nullable_to_non_nullable - as String?, + as String, accountHolderType: freezed == accountHolderType ? _value.accountHolderType : accountHolderType // ignore: cast_nullable_to_non_nullable @@ -12742,8 +12731,8 @@ abstract class _$$PaymentMethodDataUsBankImplCopyWith<$Res> @override @useResult $Res call( - {String? accountNumber, - String? routingNumber, + {String accountNumber, + String routingNumber, BankAccountHolderType? accountHolderType, UsBankAccountType? accountType, BillingDetails? billingDetails, @@ -12771,8 +12760,8 @@ class __$$PaymentMethodDataUsBankImplCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ - Object? accountNumber = freezed, - Object? routingNumber = freezed, + Object? accountNumber = null, + Object? routingNumber = null, Object? accountHolderType = freezed, Object? accountType = freezed, Object? billingDetails = freezed, @@ -12780,14 +12769,14 @@ class __$$PaymentMethodDataUsBankImplCopyWithImpl<$Res> Object? mandateData = freezed, }) { return _then(_$PaymentMethodDataUsBankImpl( - accountNumber: freezed == accountNumber + accountNumber: null == accountNumber ? _value.accountNumber : accountNumber // ignore: cast_nullable_to_non_nullable - as String?, - routingNumber: freezed == routingNumber + as String, + routingNumber: null == routingNumber ? _value.routingNumber : routingNumber // ignore: cast_nullable_to_non_nullable - as String?, + as String, accountHolderType: freezed == accountHolderType ? _value.accountHolderType : accountHolderType // ignore: cast_nullable_to_non_nullable @@ -12817,8 +12806,8 @@ class __$$PaymentMethodDataUsBankImplCopyWithImpl<$Res> @JsonSerializable(explicitToJson: true) class _$PaymentMethodDataUsBankImpl implements _PaymentMethodDataUsBank { const _$PaymentMethodDataUsBankImpl( - {this.accountNumber, - this.routingNumber, + {required this.accountNumber, + required this.routingNumber, this.accountHolderType, this.accountType, this.billingDetails, @@ -12830,12 +12819,12 @@ class _$PaymentMethodDataUsBankImpl implements _PaymentMethodDataUsBank { /// The account number of the bank account. @override - final String? accountNumber; + final String accountNumber; ///The routing number, sort code, or other country-appropriate institution ///number for the bank account. @override - final String? routingNumber; + final String routingNumber; /// The bank account type of the holder @override @@ -12863,7 +12852,7 @@ class _$PaymentMethodDataUsBankImpl implements _PaymentMethodDataUsBank { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataUsBankImpl && @@ -12912,8 +12901,8 @@ class _$PaymentMethodDataUsBankImpl implements _PaymentMethodDataUsBank { abstract class _PaymentMethodDataUsBank implements PaymentMethodDataUsBank { const factory _PaymentMethodDataUsBank( - {final String? accountNumber, - final String? routingNumber, + {required final String accountNumber, + required final String routingNumber, final BankAccountHolderType? accountHolderType, final UsBankAccountType? accountType, final BillingDetails? billingDetails, @@ -12926,12 +12915,12 @@ abstract class _PaymentMethodDataUsBank implements PaymentMethodDataUsBank { @override /// The account number of the bank account. - String? get accountNumber; + String get accountNumber; @override ///The routing number, sort code, or other country-appropriate institution ///number for the bank account. - String? get routingNumber; + String get routingNumber; @override /// The bank account type of the holder @@ -13060,7 +13049,7 @@ class _$PaymentMethodOptionsImpl implements _PaymentMethodOptions { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodOptionsImpl && @@ -13225,7 +13214,7 @@ class _$MandateDataImpl implements _MandateData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MandateDataImpl && @@ -13384,7 +13373,7 @@ class _$MandateDataCustomerAcceptanceImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MandateDataCustomerAcceptanceImpl && @@ -13543,7 +13532,7 @@ class _$MandateDataOnlineDataImpl implements _MandateDataOnlineData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MandateDataOnlineDataImpl && @@ -13694,7 +13683,7 @@ class _$ThreeDSecureUsageImpl implements _ThreeDSecureUsage { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureUsageImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/payment_methods.g.dart b/packages/stripe_platform_interface/lib/src/models/payment_methods.g.dart index 99bbd8e41..47c57d34a 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_methods.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_methods.g.dart @@ -180,15 +180,14 @@ _$UsBankAccountImpl _$$UsBankAccountImplFromJson(Map json) => _$UsBankAccountImpl( routingNumber: json['routingNumber'] as String?, last4: json['last4'] as String?, - accountHolderType: $enumDecode( + accountHolderType: $enumDecodeNullable( _$BankAccountHolderTypeEnumMap, json['accountHolderType']), - accountType: $enumDecode(_$UsBankAccountTypeEnumMap, json['accountType']), + accountType: + $enumDecodeNullable(_$UsBankAccountTypeEnumMap, json['accountType']), bankName: json['bankName'] as String?, fingerprint: json['fingerprint'] as String?, linkedAccount: json['linkedAccount'] as String?, - preferredNetworks: (json['preferredNetworks'] as List?) - ?.map((e) => e as String) - .toList(), + preferredNetwork: json['preferredNetwork'] as String?, supportedNetworks: (json['supportedNetworks'] as List?) ?.map((e) => e as String) .toList(), @@ -199,12 +198,12 @@ Map _$$UsBankAccountImplToJson(_$UsBankAccountImpl instance) => 'routingNumber': instance.routingNumber, 'last4': instance.last4, 'accountHolderType': - _$BankAccountHolderTypeEnumMap[instance.accountHolderType]!, - 'accountType': _$UsBankAccountTypeEnumMap[instance.accountType]!, + _$BankAccountHolderTypeEnumMap[instance.accountHolderType], + 'accountType': _$UsBankAccountTypeEnumMap[instance.accountType], 'bankName': instance.bankName, 'fingerprint': instance.fingerprint, 'linkedAccount': instance.linkedAccount, - 'preferredNetworks': instance.preferredNetworks, + 'preferredNetwork': instance.preferredNetwork, 'supportedNetworks': instance.supportedNetworks, }; @@ -792,8 +791,8 @@ Map _$$PaymentMethodDataAfterPayImplToJson( _$PaymentMethodDataUsBankImpl _$$PaymentMethodDataUsBankImplFromJson( Map json) => _$PaymentMethodDataUsBankImpl( - accountNumber: json['accountNumber'] as String?, - routingNumber: json['routingNumber'] as String?, + accountNumber: json['accountNumber'] as String, + routingNumber: json['routingNumber'] as String, accountHolderType: $enumDecodeNullable( _$BankAccountHolderTypeEnumMap, json['accountHolderType']), accountType: diff --git a/packages/stripe_platform_interface/lib/src/models/payment_sheet.dart b/packages/stripe_platform_interface/lib/src/models/payment_sheet.dart index 61c17b258..673240df1 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_sheet.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_sheet.dart @@ -81,6 +81,18 @@ class SetupPaymentSheetParameters with _$SetupPaymentSheetParameters { /// paymentIntent since the customer can change those. @JsonKey(name: 'defaultBillingDetails') BillingDetails? billingDetails, + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? allowsRemovalOfLastSavedPaymentMethod, + + /// By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. + /// You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. + /// See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. + /// Example: ["card", "external_paypal", "klarna"] + /// If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. + List? paymentMethodOrder, + /// Return URL is required for IDEAL, Klarna and few other payment methods String? returnURL, diff --git a/packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart b/packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart index fccd32862..d7e739006 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_sheet.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); SetupPaymentSheetParameters _$SetupPaymentSheetParametersFromJson( Map json) { @@ -89,6 +89,19 @@ mixin _$SetupPaymentSheetParameters { @JsonKey(name: 'defaultBillingDetails') BillingDetails? get billingDetails => throw _privateConstructorUsedError; + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? get allowsRemovalOfLastSavedPaymentMethod => + throw _privateConstructorUsedError; + + /// By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. + /// You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. + /// See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. + /// Example: ["card", "external_paypal", "klarna"] + /// If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. + List? get paymentMethodOrder => throw _privateConstructorUsedError; + /// Return URL is required for IDEAL, Klarna and few other payment methods String? get returnURL => throw _privateConstructorUsedError; @@ -135,6 +148,8 @@ abstract class $SetupPaymentSheetParametersCopyWith<$Res> { bool allowsDelayedPaymentMethods, PaymentSheetAppearance? appearance, @JsonKey(name: 'defaultBillingDetails') BillingDetails? billingDetails, + bool? allowsRemovalOfLastSavedPaymentMethod, + List? paymentMethodOrder, String? returnURL, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, @@ -179,6 +194,8 @@ class _$SetupPaymentSheetParametersCopyWithImpl<$Res, Object? allowsDelayedPaymentMethods = null, Object? appearance = freezed, Object? billingDetails = freezed, + Object? allowsRemovalOfLastSavedPaymentMethod = freezed, + Object? paymentMethodOrder = freezed, Object? returnURL = freezed, Object? billingDetailsCollectionConfiguration = freezed, Object? removeSavedPaymentMethodMessage = freezed, @@ -241,6 +258,15 @@ class _$SetupPaymentSheetParametersCopyWithImpl<$Res, ? _value.billingDetails : billingDetails // ignore: cast_nullable_to_non_nullable as BillingDetails?, + allowsRemovalOfLastSavedPaymentMethod: freezed == + allowsRemovalOfLastSavedPaymentMethod + ? _value.allowsRemovalOfLastSavedPaymentMethod + : allowsRemovalOfLastSavedPaymentMethod // ignore: cast_nullable_to_non_nullable + as bool?, + paymentMethodOrder: freezed == paymentMethodOrder + ? _value.paymentMethodOrder + : paymentMethodOrder // ignore: cast_nullable_to_non_nullable + as List?, returnURL: freezed == returnURL ? _value.returnURL : returnURL // ignore: cast_nullable_to_non_nullable @@ -362,6 +388,8 @@ abstract class _$$SetupParametersImplCopyWith<$Res> bool allowsDelayedPaymentMethods, PaymentSheetAppearance? appearance, @JsonKey(name: 'defaultBillingDetails') BillingDetails? billingDetails, + bool? allowsRemovalOfLastSavedPaymentMethod, + List? paymentMethodOrder, String? returnURL, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, @@ -409,6 +437,8 @@ class __$$SetupParametersImplCopyWithImpl<$Res> Object? allowsDelayedPaymentMethods = null, Object? appearance = freezed, Object? billingDetails = freezed, + Object? allowsRemovalOfLastSavedPaymentMethod = freezed, + Object? paymentMethodOrder = freezed, Object? returnURL = freezed, Object? billingDetailsCollectionConfiguration = freezed, Object? removeSavedPaymentMethodMessage = freezed, @@ -471,6 +501,15 @@ class __$$SetupParametersImplCopyWithImpl<$Res> ? _value.billingDetails : billingDetails // ignore: cast_nullable_to_non_nullable as BillingDetails?, + allowsRemovalOfLastSavedPaymentMethod: freezed == + allowsRemovalOfLastSavedPaymentMethod + ? _value.allowsRemovalOfLastSavedPaymentMethod + : allowsRemovalOfLastSavedPaymentMethod // ignore: cast_nullable_to_non_nullable + as bool?, + paymentMethodOrder: freezed == paymentMethodOrder + ? _value._paymentMethodOrder + : paymentMethodOrder // ignore: cast_nullable_to_non_nullable + as List?, returnURL: freezed == returnURL ? _value.returnURL : returnURL // ignore: cast_nullable_to_non_nullable @@ -512,12 +551,15 @@ class _$SetupParametersImpl implements _SetupParameters { this.allowsDelayedPaymentMethods = false, this.appearance, @JsonKey(name: 'defaultBillingDetails') this.billingDetails, + this.allowsRemovalOfLastSavedPaymentMethod, + final List? paymentMethodOrder, this.returnURL, this.billingDetailsCollectionConfiguration, this.removeSavedPaymentMethodMessage, @JsonKey(toJson: _cardBrandListToJson) final List? preferredNetworks}) - : _preferredNetworks = preferredNetworks; + : _paymentMethodOrder = paymentMethodOrder, + _preferredNetworks = preferredNetworks; factory _$SetupParametersImpl.fromJson(Map json) => _$$SetupParametersImplFromJson(json); @@ -605,6 +647,34 @@ class _$SetupParametersImpl implements _SetupParameters { @JsonKey(name: 'defaultBillingDetails') final BillingDetails? billingDetails; + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + @override + final bool? allowsRemovalOfLastSavedPaymentMethod; + + /// By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. + /// You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. + /// See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. + /// Example: ["card", "external_paypal", "klarna"] + /// If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. + final List? _paymentMethodOrder; + + /// By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. + /// You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. + /// See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. + /// Example: ["card", "external_paypal", "klarna"] + /// If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. + @override + List? get paymentMethodOrder { + final value = _paymentMethodOrder; + if (value == null) return null; + if (_paymentMethodOrder is EqualUnmodifiableListView) + return _paymentMethodOrder; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + /// Return URL is required for IDEAL, Klarna and few other payment methods @override final String? returnURL; @@ -637,11 +707,11 @@ class _$SetupParametersImpl implements _SetupParameters { @override String toString() { - return 'SetupPaymentSheetParameters(customFlow: $customFlow, customerId: $customerId, primaryButtonLabel: $primaryButtonLabel, customerEphemeralKeySecret: $customerEphemeralKeySecret, paymentIntentClientSecret: $paymentIntentClientSecret, setupIntentClientSecret: $setupIntentClientSecret, intentConfiguration: $intentConfiguration, merchantDisplayName: $merchantDisplayName, applePay: $applePay, style: $style, googlePay: $googlePay, allowsDelayedPaymentMethods: $allowsDelayedPaymentMethods, appearance: $appearance, billingDetails: $billingDetails, returnURL: $returnURL, billingDetailsCollectionConfiguration: $billingDetailsCollectionConfiguration, removeSavedPaymentMethodMessage: $removeSavedPaymentMethodMessage, preferredNetworks: $preferredNetworks)'; + return 'SetupPaymentSheetParameters(customFlow: $customFlow, customerId: $customerId, primaryButtonLabel: $primaryButtonLabel, customerEphemeralKeySecret: $customerEphemeralKeySecret, paymentIntentClientSecret: $paymentIntentClientSecret, setupIntentClientSecret: $setupIntentClientSecret, intentConfiguration: $intentConfiguration, merchantDisplayName: $merchantDisplayName, applePay: $applePay, style: $style, googlePay: $googlePay, allowsDelayedPaymentMethods: $allowsDelayedPaymentMethods, appearance: $appearance, billingDetails: $billingDetails, allowsRemovalOfLastSavedPaymentMethod: $allowsRemovalOfLastSavedPaymentMethod, paymentMethodOrder: $paymentMethodOrder, returnURL: $returnURL, billingDetailsCollectionConfiguration: $billingDetailsCollectionConfiguration, removeSavedPaymentMethodMessage: $removeSavedPaymentMethodMessage, preferredNetworks: $preferredNetworks)'; } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SetupParametersImpl && @@ -674,41 +744,47 @@ class _$SetupParametersImpl implements _SetupParameters { other.appearance == appearance) && (identical(other.billingDetails, billingDetails) || other.billingDetails == billingDetails) && + (identical(other.allowsRemovalOfLastSavedPaymentMethod, allowsRemovalOfLastSavedPaymentMethod) || + other.allowsRemovalOfLastSavedPaymentMethod == + allowsRemovalOfLastSavedPaymentMethod) && + const DeepCollectionEquality() + .equals(other._paymentMethodOrder, _paymentMethodOrder) && (identical(other.returnURL, returnURL) || other.returnURL == returnURL) && - (identical(other.billingDetailsCollectionConfiguration, - billingDetailsCollectionConfiguration) || + (identical(other.billingDetailsCollectionConfiguration, billingDetailsCollectionConfiguration) || other.billingDetailsCollectionConfiguration == billingDetailsCollectionConfiguration) && (identical(other.removeSavedPaymentMethodMessage, removeSavedPaymentMethodMessage) || other.removeSavedPaymentMethodMessage == removeSavedPaymentMethodMessage) && - const DeepCollectionEquality() - .equals(other._preferredNetworks, _preferredNetworks)); + const DeepCollectionEquality().equals(other._preferredNetworks, _preferredNetworks)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - customFlow, - customerId, - primaryButtonLabel, - customerEphemeralKeySecret, - paymentIntentClientSecret, - setupIntentClientSecret, - intentConfiguration, - merchantDisplayName, - applePay, - style, - googlePay, - allowsDelayedPaymentMethods, - appearance, - billingDetails, - returnURL, - billingDetailsCollectionConfiguration, - removeSavedPaymentMethodMessage, - const DeepCollectionEquality().hash(_preferredNetworks)); + int get hashCode => Object.hashAll([ + runtimeType, + customFlow, + customerId, + primaryButtonLabel, + customerEphemeralKeySecret, + paymentIntentClientSecret, + setupIntentClientSecret, + intentConfiguration, + merchantDisplayName, + applePay, + style, + googlePay, + allowsDelayedPaymentMethods, + appearance, + billingDetails, + allowsRemovalOfLastSavedPaymentMethod, + const DeepCollectionEquality().hash(_paymentMethodOrder), + returnURL, + billingDetailsCollectionConfiguration, + removeSavedPaymentMethodMessage, + const DeepCollectionEquality().hash(_preferredNetworks) + ]); @JsonKey(ignore: true) @override @@ -742,6 +818,8 @@ abstract class _SetupParameters implements SetupPaymentSheetParameters { final PaymentSheetAppearance? appearance, @JsonKey(name: 'defaultBillingDetails') final BillingDetails? billingDetails, + final bool? allowsRemovalOfLastSavedPaymentMethod, + final List? paymentMethodOrder, final String? returnURL, final BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, @@ -835,6 +913,20 @@ abstract class _SetupParameters implements SetupPaymentSheetParameters { BillingDetails? get billingDetails; @override + ///This is an experimental feature that may be removed at any time. + /// Defaults to true. If true, the customer can delete all saved payment methods. + /// If false, the customer can't delete if they only have one saved payment method remaining. + bool? get allowsRemovalOfLastSavedPaymentMethod; + @override + + /// By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. + /// You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. + /// See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. + /// Example: ["card", "external_paypal", "klarna"] + /// If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. + List? get paymentMethodOrder; + @override + /// Return URL is required for IDEAL, Klarna and few other payment methods String? get returnURL; @override @@ -1038,7 +1130,7 @@ class _$IntentConfigurationImpl implements _IntentConfiguration { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IntentConfigurationImpl && @@ -1258,7 +1350,7 @@ class _$IntentModeImpl implements _IntentMode { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IntentModeImpl && @@ -1544,7 +1636,7 @@ class _$PaymentSheetApplePayImpl implements _PaymentSheetApplePay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetApplePayImpl && @@ -1836,7 +1928,7 @@ class _$PaymentSheetGooglePayImpl implements _PaymentSheetGooglePay { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetGooglePayImpl && @@ -2109,7 +2201,7 @@ class _$PaymentSheetAppearanceImpl implements _PaymentSheetAppearance { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetAppearanceImpl && @@ -2539,7 +2631,7 @@ class _$PaymentSheetAppearanceColorsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetAppearanceColorsImpl && @@ -2849,7 +2941,7 @@ class _$PaymentSheetShapeImpl implements _PaymentSheetShape { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetShapeImpl && @@ -3077,7 +3169,7 @@ class _$PaymentSheetShadowParamsImpl implements _PaymentSheetShadowParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetShadowParamsImpl && @@ -3256,7 +3348,7 @@ class _$PaymentSheetShadowOffsetImpl implements _PaymentSheetShadowOffset { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetShadowOffsetImpl && @@ -3471,7 +3563,7 @@ class _$PaymentSheetPrimaryButtonAppearanceImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPrimaryButtonAppearanceImpl && @@ -3692,7 +3784,7 @@ class _$PaymentSheetPrimaryButtonShapeImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPrimaryButtonShapeImpl && @@ -3918,7 +4010,7 @@ class _$PaymentSheetPrimaryButtonThemeImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPrimaryButtonThemeImpl && @@ -4137,7 +4229,7 @@ class _$PaymentSheetPrimaryButtonThemeColorsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPrimaryButtonThemeColorsImpl && @@ -4338,7 +4430,7 @@ class _$PresentParametersImpl implements _PresentParameters { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PresentParametersImpl && @@ -4508,7 +4600,7 @@ class _$PaymentSheetPresentOptionsImpl implements _PaymentSheetPresentOptions { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPresentOptionsImpl && @@ -4677,7 +4769,7 @@ class _$PaymentSheetPaymentOptionImpl implements _PaymentSheetPaymentOption { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentSheetPaymentOptionImpl && @@ -4939,7 +5031,7 @@ class _$BillingDetailsCollectionConfigurationImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BillingDetailsCollectionConfigurationImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/payment_sheet.g.dart b/packages/stripe_platform_interface/lib/src/models/payment_sheet.g.dart index ffaadbf5c..3065a04c9 100644 --- a/packages/stripe_platform_interface/lib/src/models/payment_sheet.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/payment_sheet.g.dart @@ -39,6 +39,11 @@ _$SetupParametersImpl _$$SetupParametersImplFromJson( ? null : BillingDetails.fromJson( json['defaultBillingDetails'] as Map), + allowsRemovalOfLastSavedPaymentMethod: + json['allowsRemovalOfLastSavedPaymentMethod'] as bool?, + paymentMethodOrder: (json['paymentMethodOrder'] as List?) + ?.map((e) => e as String) + .toList(), returnURL: json['returnURL'] as String?, billingDetailsCollectionConfiguration: json['billingDetailsCollectionConfiguration'] == null @@ -70,6 +75,9 @@ Map _$$SetupParametersImplToJson( 'allowsDelayedPaymentMethods': instance.allowsDelayedPaymentMethods, 'appearance': instance.appearance?.toJson(), 'defaultBillingDetails': instance.billingDetails?.toJson(), + 'allowsRemovalOfLastSavedPaymentMethod': + instance.allowsRemovalOfLastSavedPaymentMethod, + 'paymentMethodOrder': instance.paymentMethodOrder, 'returnURL': instance.returnURL, 'billingDetailsCollectionConfiguration': instance.billingDetailsCollectionConfiguration?.toJson(), diff --git a/packages/stripe_platform_interface/lib/src/models/platform_pay.dart b/packages/stripe_platform_interface/lib/src/models/platform_pay.dart index 0bdca9b5e..05fc57699 100644 --- a/packages/stripe_platform_interface/lib/src/models/platform_pay.dart +++ b/packages/stripe_platform_interface/lib/src/models/platform_pay.dart @@ -353,10 +353,10 @@ class PaymentRequestType with _$PaymentRequestType { required String managementUrl, /// The regular billing cycle for the payment, including start end dates, interval and count. - required ImmediateCartSummaryItem billing, + required RecurringCartSummaryItem billing, /// Same as the billing property but related to trial period. - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem? trialBilling, /// A localized billing agreement that Apple displays to user before authorizing the payment String? billingAgreement, diff --git a/packages/stripe_platform_interface/lib/src/models/platform_pay.freezed.dart b/packages/stripe_platform_interface/lib/src/models/platform_pay.freezed.dart index c85de8231..fa2d81a78 100644 --- a/packages/stripe_platform_interface/lib/src/models/platform_pay.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/platform_pay.freezed.dart @@ -12,7 +12,7 @@ part of 'platform_pay.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); PlatformPayPaymentMethod _$PlatformPayPaymentMethodFromJson( Map json) { @@ -171,7 +171,7 @@ class _$PlatformPayPaymentMethodImpl implements _PlatformPayPaymentMethod { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayPaymentMethodImpl && @@ -446,7 +446,7 @@ class _$PlatformPaySheetUpdateParamsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPaySheetUpdateParamsImpl && @@ -774,7 +774,7 @@ class _$ApplePaySheetErrorInvalidShippingImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePaySheetErrorInvalidShippingImpl && @@ -974,7 +974,7 @@ class _$ApplePaySheetErrorUnserviceableShippingImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePaySheetErrorUnserviceableShippingImpl && @@ -1170,7 +1170,7 @@ class _$ApplePaySheetErrorInvalidCouponCodeImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePaySheetErrorInvalidCouponCodeImpl && @@ -1366,7 +1366,7 @@ class _$ApplePaySheetErrorExpiredCouponCodeImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePaySheetErrorExpiredCouponCodeImpl && @@ -1659,7 +1659,7 @@ class _$PlatformPayPaymentMethodParamsGooglePayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayPaymentMethodParamsGooglePayImpl && @@ -1839,7 +1839,7 @@ class _$PlatformPayPaymentMethodParamsApplePayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayPaymentMethodParamsApplePayImpl && @@ -2011,7 +2011,7 @@ class _$PlatformPayPaymentMethodParamsWebImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayPaymentMethodParamsWebImpl && @@ -2278,7 +2278,7 @@ class _$PlatformPayConfirmParamsGooglePayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayConfirmParamsGooglePayImpl && @@ -2462,7 +2462,7 @@ class _$PlatformPayConfirmParamsApplePayImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayConfirmParamsApplePayImpl && @@ -2645,7 +2645,7 @@ class _$PlatformPayConfirmParamsWebImpl implements PlatformPayConfirmParamsWeb { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayConfirmParamsWebImpl && @@ -2949,7 +2949,7 @@ class _$PlatformPayShippingContactImpl implements _PlatformPayShippingContact { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayShippingContactImpl && @@ -3466,7 +3466,7 @@ class _$ApplePayParamsImpl implements _ApplePayParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayParamsImpl && @@ -3839,7 +3839,7 @@ class _$GooglePayParamsImpl implements _GooglePayParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayParamsImpl && @@ -4141,7 +4141,7 @@ class _$GooglePayPaymentMethodParamsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayPaymentMethodParamsImpl && @@ -4377,7 +4377,7 @@ class _$GooglePayBillingAddressConfigImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayBillingAddressConfigImpl && @@ -4622,7 +4622,7 @@ class _$GooglePayShippingAddressConfigImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayShippingAddressConfigImpl && @@ -4716,8 +4716,8 @@ mixin _$PaymentRequestType { required TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL) recurring, @@ -4739,8 +4739,8 @@ mixin _$PaymentRequestType { TResult? Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -4761,8 +4761,8 @@ mixin _$PaymentRequestType { TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -4833,8 +4833,8 @@ abstract class _$$PaymentRequestTypeRecurringImplCopyWith<$Res> { $Res call( {String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL}); } @@ -4871,11 +4871,11 @@ class __$$PaymentRequestTypeRecurringImplCopyWithImpl<$Res> billing: freezed == billing ? _value.billing : billing // ignore: cast_nullable_to_non_nullable - as ImmediateCartSummaryItem, + as RecurringCartSummaryItem, trialBilling: freezed == trialBilling ? _value.trialBilling : trialBilling // ignore: cast_nullable_to_non_nullable - as ImmediateCartSummaryItem?, + as RecurringCartSummaryItem?, billingAgreement: freezed == billingAgreement ? _value.billingAgreement : billingAgreement // ignore: cast_nullable_to_non_nullable @@ -4919,11 +4919,11 @@ class _$PaymentRequestTypeRecurringImpl /// The regular billing cycle for the payment, including start end dates, interval and count. @override - final ImmediateCartSummaryItem billing; + final RecurringCartSummaryItem billing; /// Same as the billing property but related to trial period. @override - final ImmediateCartSummaryItem? trialBilling; + final RecurringCartSummaryItem? trialBilling; /// A localized billing agreement that Apple displays to user before authorizing the payment @override @@ -4944,7 +4944,7 @@ class _$PaymentRequestTypeRecurringImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentRequestTypeRecurringImpl && @@ -4985,8 +4985,8 @@ class _$PaymentRequestTypeRecurringImpl required TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL) recurring, @@ -5012,8 +5012,8 @@ class _$PaymentRequestTypeRecurringImpl TResult? Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5038,8 +5038,8 @@ class _$PaymentRequestTypeRecurringImpl TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5109,8 +5109,8 @@ abstract class _PaymentRequestTypeRecurring implements PaymentRequestType { const factory _PaymentRequestTypeRecurring( {required final String description, required final String managementUrl, - required final ImmediateCartSummaryItem billing, - final ImmediateCartSummaryItem? trialBilling, + required final RecurringCartSummaryItem billing, + final RecurringCartSummaryItem? trialBilling, final String? billingAgreement, final String? tokenNotificationURL}) = _$PaymentRequestTypeRecurringImpl; @@ -5126,10 +5126,10 @@ abstract class _PaymentRequestTypeRecurring implements PaymentRequestType { String get managementUrl; /// The regular billing cycle for the payment, including start end dates, interval and count. - ImmediateCartSummaryItem get billing; + RecurringCartSummaryItem get billing; /// Same as the billing property but related to trial period. - ImmediateCartSummaryItem? get trialBilling; + RecurringCartSummaryItem? get trialBilling; /// A localized billing agreement that Apple displays to user before authorizing the payment String? get billingAgreement; @@ -5272,7 +5272,7 @@ class _$PaymentRequestTypeReloadImpl implements _PaymentRequestTypeReload { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentRequestTypeReloadImpl && @@ -5316,8 +5316,8 @@ class _$PaymentRequestTypeReloadImpl implements _PaymentRequestTypeReload { required TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL) recurring, @@ -5343,8 +5343,8 @@ class _$PaymentRequestTypeReloadImpl implements _PaymentRequestTypeReload { TResult? Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5369,8 +5369,8 @@ class _$PaymentRequestTypeReloadImpl implements _PaymentRequestTypeReload { TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5543,7 +5543,7 @@ class _$PaymentRequestTypeMultiMerchantImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentRequestTypeMultiMerchantImpl && @@ -5570,8 +5570,8 @@ class _$PaymentRequestTypeMultiMerchantImpl required TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL) recurring, @@ -5596,8 +5596,8 @@ class _$PaymentRequestTypeMultiMerchantImpl TResult? Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5621,8 +5621,8 @@ class _$PaymentRequestTypeMultiMerchantImpl TResult Function( String description, String managementUrl, - ImmediateCartSummaryItem billing, - ImmediateCartSummaryItem? trialBilling, + RecurringCartSummaryItem billing, + RecurringCartSummaryItem? trialBilling, String? billingAgreement, String? tokenNotificationURL)? recurring, @@ -5889,7 +5889,7 @@ class _$ApplePayMultiMerchantImpl implements _ApplePayMultiMerchant { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ApplePayMultiMerchantImpl && @@ -6169,7 +6169,7 @@ class _$PlatformPayOrderDetailsImpl implements _PlatformPayOrderDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlatformPayOrderDetailsImpl && @@ -6668,7 +6668,7 @@ class _$PaymentRequestCreateOptionsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentRequestCreateOptionsImpl && @@ -6959,7 +6959,7 @@ class _$$ShippingOptionImpl implements _$ShippingOption { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$$ShippingOptionImpl && @@ -7164,7 +7164,7 @@ class _$$PaymentItemImpl implements _$PaymentItem { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$$PaymentItemImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/platform_pay.g.dart b/packages/stripe_platform_interface/lib/src/models/platform_pay.g.dart index f6f9cd1df..d3d2c5a03 100644 --- a/packages/stripe_platform_interface/lib/src/models/platform_pay.g.dart +++ b/packages/stripe_platform_interface/lib/src/models/platform_pay.g.dart @@ -412,11 +412,11 @@ _$PaymentRequestTypeRecurringImpl _$$PaymentRequestTypeRecurringImplFromJson( _$PaymentRequestTypeRecurringImpl( description: json['description'] as String, managementUrl: json['managementUrl'] as String, - billing: ImmediateCartSummaryItem.fromJson( + billing: RecurringCartSummaryItem.fromJson( json['billing'] as Map), trialBilling: json['trialBilling'] == null ? null - : ImmediateCartSummaryItem.fromJson( + : RecurringCartSummaryItem.fromJson( json['trialBilling'] as Map), billingAgreement: json['billingAgreement'] as String?, tokenNotificationURL: json['tokenNotificationURL'] as String?, diff --git a/packages/stripe_platform_interface/lib/src/models/push_provisioning.freezed.dart b/packages/stripe_platform_interface/lib/src/models/push_provisioning.freezed.dart index 54905cec3..66ead3999 100644 --- a/packages/stripe_platform_interface/lib/src/models/push_provisioning.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/push_provisioning.freezed.dart @@ -12,7 +12,7 @@ part of 'push_provisioning.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); GooglePayCardToken _$GooglePayCardTokenFromJson(Map json) { return _GooglePayCardToken.fromJson(json); @@ -257,7 +257,7 @@ class _$GooglePayCardTokenImpl implements _GooglePayCardToken { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GooglePayCardTokenImpl && @@ -476,7 +476,7 @@ class _$IsCardInWalletResultImpl implements _IsCardInWalletResult { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IsCardInWalletResultImpl && @@ -657,7 +657,7 @@ class _$CanAddCardToWalletResultImpl implements _CanAddCardToWalletResult { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CanAddCardToWalletResultImpl && @@ -831,7 +831,7 @@ class _$CanAddCardToDetailsImpl implements _CanAddCardToDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CanAddCardToDetailsImpl && @@ -1064,7 +1064,7 @@ class _$CanAddCardToWalletParamsImpl implements _CanAddCardToWalletParams { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CanAddCardToWalletParamsImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/setup_intent.freezed.dart b/packages/stripe_platform_interface/lib/src/models/setup_intent.freezed.dart index b855ca032..1af36150e 100644 --- a/packages/stripe_platform_interface/lib/src/models/setup_intent.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/setup_intent.freezed.dart @@ -12,7 +12,7 @@ part of 'setup_intent.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); SetupIntent _$SetupIntentFromJson(Map json) { return _SetupIntent.fromJson(json); @@ -400,7 +400,7 @@ class _$SetupIntentImpl implements _SetupIntent { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SetupIntentImpl && @@ -649,7 +649,7 @@ class _$LastSetupErrorImpl implements _LastSetupError { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LastSetupErrorImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/three_d_secure.freezed.dart b/packages/stripe_platform_interface/lib/src/models/three_d_secure.freezed.dart index a9bdba0e4..75b76d65d 100644 --- a/packages/stripe_platform_interface/lib/src/models/three_d_secure.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/three_d_secure.freezed.dart @@ -12,7 +12,7 @@ part of 'three_d_secure.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); ThreeDSecureConfigurationParams _$ThreeDSecureConfigurationParamsFromJson( Map json) { @@ -418,7 +418,7 @@ class _$ThreeDSecureConfigurationParamsImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureConfigurationParamsImpl && @@ -743,7 +743,7 @@ class _$ThreeDSecureNavigationBarThemeDataImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureNavigationBarThemeDataImpl && @@ -995,7 +995,7 @@ class _$ThreeDSecureLabelThemeDataImpl implements _ThreeDSecureLabelThemeData { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureLabelThemeDataImpl && @@ -1252,7 +1252,7 @@ class _$ThreeDSecureTextFieldThemeDataImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureTextFieldThemeDataImpl && @@ -1500,7 +1500,7 @@ class _$ThreeDSecureButtonThemeDataImpl } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ThreeDSecureButtonThemeDataImpl && diff --git a/packages/stripe_platform_interface/lib/src/models/wallet.freezed.dart b/packages/stripe_platform_interface/lib/src/models/wallet.freezed.dart index 09ec2f717..dfb01d2e6 100644 --- a/packages/stripe_platform_interface/lib/src/models/wallet.freezed.dart +++ b/packages/stripe_platform_interface/lib/src/models/wallet.freezed.dart @@ -12,7 +12,7 @@ part of 'wallet.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); /// @nodoc mixin _$AddToWalletResult { @@ -139,7 +139,7 @@ class _$AddToWalletResultImpl implements _AddToWalletResult { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddToWalletResultImpl && @@ -294,7 +294,7 @@ class _$AddToWalletDetailsImpl implements _AddToWalletDetails { } @override - bool operator ==(Object other) { + bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddToWalletDetailsImpl && diff --git a/packages/stripe_platform_interface/test/test_data.dart b/packages/stripe_platform_interface/test/test_data.dart index 1acd52269..32ea7798b 100644 --- a/packages/stripe_platform_interface/test/test_data.dart +++ b/packages/stripe_platform_interface/test/test_data.dart @@ -33,8 +33,8 @@ extension PaymentMethodTestInstance on PaymentMethod { 'USBankAccount': { 'routingNumber': usBankAccount.routingNumber, 'last4': usBankAccount.last4, - 'accountHolderType': usBankAccount.accountHolderType.name, - 'accountType': usBankAccount.accountType.name, + 'accountHolderType': usBankAccount.accountHolderType?.name, + 'accountType': usBankAccount.accountType?.name, 'bankName': usBankAccount.bankName, 'fingerprint': usBankAccount.fingerprint, 'linkedAccount': usBankAccount.linkedAccount,