From 7deb7088f4e5e7b22401f0b7f7da71b4cc51b674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mon?= Date: Mon, 10 Jun 2024 17:20:00 +0100 Subject: [PATCH] Stripe web element integration (#1790) * feat: implement default values and new layout porperties web element * feat: add apple pay recurring payment options * feat: add apple pay deferred payment to web element * feat add auto reload paymentoptions --------- Co-authored-by: Remon --- example/pubspec.yaml | 2 +- .../src/api/core/billing_details.freezed.dart | 6 +- .../lib/src/api/core/error.freezed.dart | 4 +- .../api/core/shipping_details.freezed.dart | 6 +- .../card_element_options.freezed.dart | 6 +- .../elements/element_appearance.freezed.dart | 4 +- .../payment_element_change_event.freezed.dart | 6 +- .../api/elements/payment_element_options.dart | 281 +- .../payment_element_options.freezed.dart | 4847 ++++++++++++++--- .../elements/payment_element_options.g.dart | 413 +- ...t_intent_shipping_information.freezed.dart | 4 +- ...nfirm_acss_debit_payment_data.freezed.dart | 4 +- ...rm_acss_debit_payment_options.freezed.dart | 4 +- .../api/payment_intents/payment_intent.g.dart | 14 +- .../api/payment_methods/payment_method.g.dart | 6 +- .../confirm_card_setup_options.freezed.dart | 4 +- ...confirm_sepa_debit_setup_data.freezed.dart | 4 +- .../src/api/setup_intents/setup_intent.g.dart | 2 +- .../create_token_card_data.freezed.dart | 4 +- .../tokens/create_token_pii_data.freezed.dart | 4 +- .../lib/src/api/tokens/token.freezed.dart | 8 +- .../stripe_js/lib/src/api/tokens/token.g.dart | 6 +- .../confirm_payment_options.freezed.dart | 52 +- .../src/models/confirm_payment_options.g.dart | 10 +- .../lib/src/widgets/card_field.dart | 23 - 25 files changed, 4791 insertions(+), 933 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 72f224d99..7367d849c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: http: ^1.1.0 font_awesome_flutter: ^10.6.0 platform: ^3.0.0 - + web: ^0.5.1 dev_dependencies: integration_test: diff --git a/packages/stripe_js/lib/src/api/core/billing_details.freezed.dart b/packages/stripe_js/lib/src/api/core/billing_details.freezed.dart index 0c1a52c6c..ca25e3bac 100644 --- a/packages/stripe_js/lib/src/api/core/billing_details.freezed.dart +++ b/packages/stripe_js/lib/src/api/core/billing_details.freezed.dart @@ -12,7 +12,7 @@ part of 'billing_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#custom-getters-and-methods'); + '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'); BillingDetails _$BillingDetailsFromJson(Map json) { return _BillingDetails.fromJson(json); @@ -183,7 +183,7 @@ class _$BillingDetailsImpl implements _BillingDetails { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BillingDetailsImpl && @@ -453,7 +453,7 @@ class _$PaymentElementBillingDetailsAddressImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementBillingDetailsAddressImpl && diff --git a/packages/stripe_js/lib/src/api/core/error.freezed.dart b/packages/stripe_js/lib/src/api/core/error.freezed.dart index 794c150d7..6029a7071 100644 --- a/packages/stripe_js/lib/src/api/core/error.freezed.dart +++ b/packages/stripe_js/lib/src/api/core/error.freezed.dart @@ -12,7 +12,7 @@ part of 'error.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#custom-getters-and-methods'); + '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'); StripeError _$StripeErrorFromJson(Map json) { return _PaymentElementChangeEvent.fromJson(json); @@ -206,7 +206,7 @@ class _$PaymentElementChangeEventImpl implements _PaymentElementChangeEvent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementChangeEventImpl && diff --git a/packages/stripe_js/lib/src/api/core/shipping_details.freezed.dart b/packages/stripe_js/lib/src/api/core/shipping_details.freezed.dart index 30c3ba084..5b176ca0c 100644 --- a/packages/stripe_js/lib/src/api/core/shipping_details.freezed.dart +++ b/packages/stripe_js/lib/src/api/core/shipping_details.freezed.dart @@ -12,7 +12,7 @@ part of 'shipping_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#custom-getters-and-methods'); + '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'); ShippingDetails _$ShippingDetailsFromJson(Map json) { return _PaymentElementChangeEvent.fromJson(json); @@ -220,7 +220,7 @@ class _$PaymentElementChangeEventImpl implements _PaymentElementChangeEvent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementChangeEventImpl && @@ -505,7 +505,7 @@ class _$PaymentElementBillingDetailsAddressImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementBillingDetailsAddressImpl && diff --git a/packages/stripe_js/lib/src/api/elements/card_element_options.freezed.dart b/packages/stripe_js/lib/src/api/elements/card_element_options.freezed.dart index b3c0afbcf..c0505529c 100644 --- a/packages/stripe_js/lib/src/api/elements/card_element_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/card_element_options.freezed.dart @@ -12,7 +12,7 @@ part of 'card_element_options.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#custom-getters-and-methods'); + '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'); CardElementOptions _$CardElementOptionsFromJson(Map json) { return _CardElementOptions.fromJson(json); @@ -231,7 +231,7 @@ class _$CardElementOptionsImpl implements _CardElementOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardElementOptionsImpl && @@ -525,7 +525,7 @@ class _$CardElementClassesImpl implements _CardElementClasses { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardElementClassesImpl && diff --git a/packages/stripe_js/lib/src/api/elements/element_appearance.freezed.dart b/packages/stripe_js/lib/src/api/elements/element_appearance.freezed.dart index 8e0b70b25..b490ac041 100644 --- a/packages/stripe_js/lib/src/api/elements/element_appearance.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/element_appearance.freezed.dart @@ -12,7 +12,7 @@ part of 'element_appearance.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#custom-getters-and-methods'); + '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'); ElementAppearance _$ElementAppearanceFromJson(Map json) { return _ElementAppearance.fromJson(json); @@ -183,7 +183,7 @@ class _$ElementAppearanceImpl implements _ElementAppearance { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ElementAppearanceImpl && diff --git a/packages/stripe_js/lib/src/api/elements/payment_element_change_event.freezed.dart b/packages/stripe_js/lib/src/api/elements/payment_element_change_event.freezed.dart index 250624c7c..4fe7eed19 100644 --- a/packages/stripe_js/lib/src/api/elements/payment_element_change_event.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/payment_element_change_event.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_element_change_event.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#custom-getters-and-methods'); + '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'); PaymentElementChangeEvent _$PaymentElementChangeEventFromJson( Map json) { @@ -202,7 +202,7 @@ class _$PaymentElementChangeEventImpl implements _PaymentElementChangeEvent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementChangeEventImpl && @@ -370,7 +370,7 @@ class _$PaymentElementChangeEventValueImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementChangeEventValueImpl && diff --git a/packages/stripe_js/lib/src/api/elements/payment_element_options.dart b/packages/stripe_js/lib/src/api/elements/payment_element_options.dart index 7ac747467..cc766611d 100644 --- a/packages/stripe_js/lib/src/api/elements/payment_element_options.dart +++ b/packages/stripe_js/lib/src/api/elements/payment_element_options.dart @@ -37,9 +37,10 @@ class PaymentElementOptions with _$PaymentElementOptions { /// be rejected. PaymentElementFields? fields, - dynamic readOnly, - dynamic terms, - dynamic wallets, + bool? readOnly, + PaymentElementOptionsTerms? terms, + PaymentElementWalletOptions? wallets, + PaymentElementApplePayOptions? applePay, }) = _PaymentElementOptions; factory PaymentElementOptions.fromJson(Map json) => @@ -78,6 +79,12 @@ class PaymentElementLayout with _$PaymentElementLayout { /// with space in between them. /// This property is only applicable to the accordion layout. bool? spacedAccordionItems, + + /// Sets the max number of Payment Methods visible before using the "More" + /// button to hide additional Payment Methods. Set this value to 0 to + /// disable the "More" button and render all available Payment Methods. + /// Default is 5. This property is only applicable to the accordion layout. + int? visibleAccordionItemsCount, }) = _PaymentElementLayout; static const tabs = PaymentElementLayout(type: PaymentElementLayoutType.tabs); static const accordion = @@ -96,12 +103,78 @@ class PaymentElementDefaultValues with _$PaymentElementDefaultValues { /// Pre-filling as much information as possible streamlines /// the checkout process. PaymentElementBillingDetails? billingDetails, + + /// Specify customer's default information for different payment methods. + /// Pre-filling as much information as possible streamlines the checkout process. + PaymentElementPaymentMethodDefaults? paymentMethods, }) = _PaymentElementDefaultValues; factory PaymentElementDefaultValues.fromJson(Map json) => _$PaymentElementDefaultValuesFromJson(json); } +@freezed +class PaymentElementPaymentMethodDefaults + with _$PaymentElementPaymentMethodDefaults { + const factory PaymentElementPaymentMethodDefaults({ + /// Defaults for ideal + PaymentElementIdealDefaults? ideal, + + /// Defaults for card payment method + PaymentElementCardDefaults? card, + }) = _PaymentElementPaymentMethodDefaults; + + factory PaymentElementPaymentMethodDefaults.fromJson( + Map json) => + _$PaymentElementPaymentMethodDefaultsFromJson(json); +} + +@freezed + +/// By default, the Payment Element will display all the payment methods that the underlying Payment Intent was created with. +/// However, wallets like Apple Pay and Google Pay are not payment methods per the Payment Intent API. They will show when the Payment Intent has the card payment method and the customer is using a supported platform and have an active card in their account. +/// This is the auto behavior, and it is the default for choice for all wallets. +/// If you do not want to show a given wallet as a payment option, you can set its property in wallets to never. +class PaymentElementWalletOptions with _$PaymentElementWalletOptions { + const factory PaymentElementWalletOptions({ + /// Apple pay required options + PaymentElementFieldRequired? applePay, + + /// Google pay required options + PaymentElementFieldRequired? googlePay, + }) = _PaymentElementWalletOptions; + + factory PaymentElementWalletOptions.fromJson(Map json) => + _$PaymentElementWalletOptionsFromJson(json); +} + +@freezed +class PaymentElementIdealDefaults with _$PaymentElementIdealDefaults { + const factory PaymentElementIdealDefaults({ + /// The customer’s bank name. + /// + /// See https://docs.stripe.com/payments/ideal/accept-a-payment?ui=element#bank-reference + /// for all options. + String? bank, + }) = _PaymentElementIdealDefaults; + + factory PaymentElementIdealDefaults.fromJson(Map json) => + _$PaymentElementIdealDefaultsFromJson(json); +} + +@freezed +class PaymentElementCardDefaults with _$PaymentElementCardDefaults { + const factory PaymentElementCardDefaults({ + /// The specified network prferences for card brand choice. The first network in the array + /// that matches a network on the enetered cobranded card will be selected by default + /// in the card brand choice. + List? network, + }) = _PaymentElementCardDefaults; + + factory PaymentElementCardDefaults.fromJson(Map json) => + _$PaymentElementCardDefaultsFromJson(json); +} + @freezed class PaymentElementBillingDetails with _$PaymentElementBillingDetails { const factory PaymentElementBillingDetails({ @@ -155,6 +228,8 @@ class PaymentElementBusiness with _$PaymentElementBusiness { enum PaymentElementFieldRequired { never, auto } +enum PaymentElementShowTerms { never, auto, always } + @freezed class PaymentElementFields with _$PaymentElementFields { const factory PaymentElementFields({ @@ -210,3 +285,203 @@ class PaymentElementAddressFields with _$PaymentElementAddressFields { factory PaymentElementAddressFields.fromJson(Map json) => _$PaymentElementAddressFieldsFromJson(json); } + +@freezed + +///Control how mandates or other legal agreements are displayed in the Payment Element. +/// The default setting is auto, which causes legal agreements to only be shown when necessary. +class PaymentElementOptionsTerms with _$PaymentElementOptionsTerms { + const factory PaymentElementOptionsTerms({ + /// Terms for apple pay + PaymentElementShowTerms? applePay, + + /// Terms for aubecs debit + PaymentElementShowTerms? auBecsDebit, + + /// Terms for bancontact + PaymentElementShowTerms? bancontact, + + /// Terms for card + PaymentElementShowTerms? card, + + /// Terms for cashapp + PaymentElementShowTerms? cashApp, + + /// Terms for googlePay + PaymentElementShowTerms? googlePay, + + /// Terms for ideal + PaymentElementShowTerms? ideal, + + /// Terms for paypal + PaymentElementShowTerms? payPal, + + /// Terms for sepa debit + PaymentElementShowTerms? sepaDebit, + + /// Terms for sofort + PaymentElementShowTerms? sofort, + + /// Terms for usBankAccount + PaymentElementShowTerms? usBankAccount, + }) = _PaymentElementOptionsTerms; + + factory PaymentElementOptionsTerms.fromJson(Map json) => + _$PaymentElementOptionsTermsFromJson(json); +} + +@freezed +class PaymentElementApplePayOptions with _$PaymentElementApplePayOptions { + const factory PaymentElementApplePayOptions({ + /// Information about a recurring payment with ApplePay + PaymentElementAppleRecurringRequest? recurringPaymentRequest, + + /// Information about a deferred payment with ApplePay + PaymentElementApplePayDeferredPaymentRequest? deferredPaymentRequest, + + /// Information about an auto reload payment with ApplePay + PaymentElementApplePayAutoReloadPaymentRequest? + automaticReloadPaymentRequest, + }) = _PaymentElementApplePayOptions; + + factory PaymentElementApplePayOptions.fromJson(Map json) => + _$PaymentElementApplePayOptionsFromJson(json); +} + +@freezed +class PaymentElementAppleRecurringRequest + with _$PaymentElementAppleRecurringRequest { + const factory PaymentElementAppleRecurringRequest({ + /// The description of the payment + required String paymentDescription, + + /// Management url + required String managementUrl, + + /// Information in case of a trial billing + PaymentElementRecurringPaymentProperties? trialBilling, + + /// Information in case of a regular billing + PaymentElementRecurringPaymentProperties? regularBilling, + }) = _PaymentElementAppleRecurringRequest; + + factory PaymentElementAppleRecurringRequest.fromJson( + Map json) => + _$PaymentElementAppleRecurringRequestFromJson(json); +} + +@freezed +class PaymentElementRecurringPaymentProperties + with _$PaymentElementRecurringPaymentProperties { + const factory PaymentElementRecurringPaymentProperties({ + /// The amount of the payment + required double amount, + + /// Description label + required String label, + + /// The startdate of the recurring payment + DateTime? recurringPaymentStartDate, + + /// The enddate of the recurring payment + DateTime? recurringPaymentEndDate, + + /// The interval of payment + ApplePayRecurringPaymentTimeInterVal? recurringPaymentIntervalUnit, + + /// The amount of intervals + int? recurringPaymentIntervalCount, + }) = _PaymentElementRecurringPaymentProperties; + + factory PaymentElementRecurringPaymentProperties.fromJson( + Map json) => + _$PaymentElementRecurringPaymentPropertiesFromJson(json); +} + +@freezed +class PaymentElementApplePayDeferredPaymentRequest + with _$PaymentElementApplePayDeferredPaymentRequest { + const factory PaymentElementApplePayDeferredPaymentRequest({ + /// The description of the payment + required String paymentDescription, + + /// Management url + required String managementUrl, + + /// Billing agreement label + String? billingAgreement, + + /// The date when you can cancel for free + DateTime? freeCancellationDate, + + /// The timezone of the free cancellation date + String? freeCancellationTimezone, + + /// Billing information of the deffered payment + required PaymentElementApplePayDeferredPaymentProperties deferredBilling, + }) = _PaymentElementApplePayDeferredPaymentRequest; + + factory PaymentElementApplePayDeferredPaymentRequest.fromJson( + Map json) => + _$PaymentElementApplePayDeferredPaymentRequestFromJson(json); +} + +@freezed +class PaymentElementApplePayDeferredPaymentProperties + with _$PaymentElementApplePayDeferredPaymentProperties { + const factory PaymentElementApplePayDeferredPaymentProperties({ + /// The amount of the payment + required double amount, + + /// Description label + required String label, + + /// The date when the payment will be processed + required DateTime deferredPaymentDate, + }) = _PaymentElementApplePayDeferredPaymentProperties; + + factory PaymentElementApplePayDeferredPaymentProperties.fromJson( + Map json) => + _$PaymentElementApplePayDeferredPaymentPropertiesFromJson(json); +} + +@freezed +class PaymentElementApplePayAutoReloadPaymentRequest + with _$PaymentElementApplePayAutoReloadPaymentRequest { + const factory PaymentElementApplePayAutoReloadPaymentRequest({ + /// The description of the payment + required String paymentDescription, + + /// Management url + required String managementUrl, + + /// Billing information of the deffered payment + required PaymentElementApplePayReloadPaymentProperties + automaticReloadBilling, + }) = _PaymentElementApplePayAutoReloadPaymentRequest; + + factory PaymentElementApplePayAutoReloadPaymentRequest.fromJson( + Map json) => + _$PaymentElementApplePayAutoReloadPaymentRequestFromJson(json); +} + +@freezed +class PaymentElementApplePayReloadPaymentProperties + with _$PaymentElementApplePayReloadPaymentProperties { + const factory PaymentElementApplePayReloadPaymentProperties({ + /// The amount of the payment + required double amount, + + /// Description label + required String label, + + /// The date when the threshold amount will be reached + required DateTime automaticReloadPaymentThresholdAmount, + }) = _PaymentElementApplePayReloadPaymentProperties; + + factory PaymentElementApplePayReloadPaymentProperties.fromJson( + Map json) => + _$PaymentElementApplePayReloadPaymentPropertiesFromJson(json); +} + +enum ApplePayRecurringPaymentTimeInterVal { year, month, day, hour, minute } diff --git a/packages/stripe_js/lib/src/api/elements/payment_element_options.freezed.dart b/packages/stripe_js/lib/src/api/elements/payment_element_options.freezed.dart index 375fdaf79..990cd0394 100644 --- a/packages/stripe_js/lib/src/api/elements/payment_element_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/payment_element_options.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_element_options.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#custom-getters-and-methods'); + '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'); PaymentElementOptions _$PaymentElementOptionsFromJson( Map json) { @@ -50,9 +50,12 @@ mixin _$PaymentElementOptions { /// you must pass that same data to stripe.confirmPayment or the payment will /// be rejected. PaymentElementFields? get fields => throw _privateConstructorUsedError; - dynamic get readOnly => throw _privateConstructorUsedError; - dynamic get terms => throw _privateConstructorUsedError; - dynamic get wallets => throw _privateConstructorUsedError; + bool? get readOnly => throw _privateConstructorUsedError; + PaymentElementOptionsTerms? get terms => throw _privateConstructorUsedError; + PaymentElementWalletOptions? get wallets => + throw _privateConstructorUsedError; + PaymentElementApplePayOptions? get applePay => + throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -72,14 +75,18 @@ abstract class $PaymentElementOptionsCopyWith<$Res> { PaymentElementBusiness? business, dynamic paymentMethodOrder, PaymentElementFields? fields, - dynamic readOnly, - dynamic terms, - dynamic wallets}); + bool? readOnly, + PaymentElementOptionsTerms? terms, + PaymentElementWalletOptions? wallets, + PaymentElementApplePayOptions? applePay}); $PaymentElementLayoutCopyWith<$Res>? get layout; $PaymentElementDefaultValuesCopyWith<$Res>? get defaultValues; $PaymentElementBusinessCopyWith<$Res>? get business; $PaymentElementFieldsCopyWith<$Res>? get fields; + $PaymentElementOptionsTermsCopyWith<$Res>? get terms; + $PaymentElementWalletOptionsCopyWith<$Res>? get wallets; + $PaymentElementApplePayOptionsCopyWith<$Res>? get applePay; } /// @nodoc @@ -104,6 +111,7 @@ class _$PaymentElementOptionsCopyWithImpl<$Res, Object? readOnly = freezed, Object? terms = freezed, Object? wallets = freezed, + Object? applePay = freezed, }) { return _then(_value.copyWith( layout: freezed == layout @@ -129,15 +137,19 @@ class _$PaymentElementOptionsCopyWithImpl<$Res, readOnly: freezed == readOnly ? _value.readOnly : readOnly // ignore: cast_nullable_to_non_nullable - as dynamic, + as bool?, terms: freezed == terms ? _value.terms : terms // ignore: cast_nullable_to_non_nullable - as dynamic, + as PaymentElementOptionsTerms?, wallets: freezed == wallets ? _value.wallets : wallets // ignore: cast_nullable_to_non_nullable - as dynamic, + as PaymentElementWalletOptions?, + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayOptions?, ) as $Val); } @@ -189,6 +201,43 @@ class _$PaymentElementOptionsCopyWithImpl<$Res, return _then(_value.copyWith(fields: value) as $Val); }); } + + @override + @pragma('vm:prefer-inline') + $PaymentElementOptionsTermsCopyWith<$Res>? get terms { + if (_value.terms == null) { + return null; + } + + return $PaymentElementOptionsTermsCopyWith<$Res>(_value.terms!, (value) { + return _then(_value.copyWith(terms: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementWalletOptionsCopyWith<$Res>? get wallets { + if (_value.wallets == null) { + return null; + } + + return $PaymentElementWalletOptionsCopyWith<$Res>(_value.wallets!, (value) { + return _then(_value.copyWith(wallets: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementApplePayOptionsCopyWith<$Res>? get applePay { + if (_value.applePay == null) { + return null; + } + + return $PaymentElementApplePayOptionsCopyWith<$Res>(_value.applePay!, + (value) { + return _then(_value.copyWith(applePay: value) as $Val); + }); + } } /// @nodoc @@ -206,9 +255,10 @@ abstract class _$$PaymentElementOptionsImplCopyWith<$Res> PaymentElementBusiness? business, dynamic paymentMethodOrder, PaymentElementFields? fields, - dynamic readOnly, - dynamic terms, - dynamic wallets}); + bool? readOnly, + PaymentElementOptionsTerms? terms, + PaymentElementWalletOptions? wallets, + PaymentElementApplePayOptions? applePay}); @override $PaymentElementLayoutCopyWith<$Res>? get layout; @@ -218,6 +268,12 @@ abstract class _$$PaymentElementOptionsImplCopyWith<$Res> $PaymentElementBusinessCopyWith<$Res>? get business; @override $PaymentElementFieldsCopyWith<$Res>? get fields; + @override + $PaymentElementOptionsTermsCopyWith<$Res>? get terms; + @override + $PaymentElementWalletOptionsCopyWith<$Res>? get wallets; + @override + $PaymentElementApplePayOptionsCopyWith<$Res>? get applePay; } /// @nodoc @@ -240,6 +296,7 @@ class __$$PaymentElementOptionsImplCopyWithImpl<$Res> Object? readOnly = freezed, Object? terms = freezed, Object? wallets = freezed, + Object? applePay = freezed, }) { return _then(_$PaymentElementOptionsImpl( layout: freezed == layout @@ -265,15 +322,19 @@ class __$$PaymentElementOptionsImplCopyWithImpl<$Res> readOnly: freezed == readOnly ? _value.readOnly : readOnly // ignore: cast_nullable_to_non_nullable - as dynamic, + as bool?, terms: freezed == terms ? _value.terms : terms // ignore: cast_nullable_to_non_nullable - as dynamic, + as PaymentElementOptionsTerms?, wallets: freezed == wallets ? _value.wallets : wallets // ignore: cast_nullable_to_non_nullable - as dynamic, + as PaymentElementWalletOptions?, + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayOptions?, )); } } @@ -289,7 +350,8 @@ class _$PaymentElementOptionsImpl implements _PaymentElementOptions { this.fields, this.readOnly, this.terms, - this.wallets}); + this.wallets, + this.applePay}); factory _$PaymentElementOptionsImpl.fromJson(Map json) => _$$PaymentElementOptionsImplFromJson(json); @@ -328,19 +390,21 @@ class _$PaymentElementOptionsImpl implements _PaymentElementOptions { @override final PaymentElementFields? fields; @override - final dynamic readOnly; + final bool? readOnly; @override - final dynamic terms; + final PaymentElementOptionsTerms? terms; @override - final dynamic wallets; + final PaymentElementWalletOptions? wallets; + @override + final PaymentElementApplePayOptions? applePay; @override String toString() { - return 'PaymentElementOptions(layout: $layout, defaultValues: $defaultValues, business: $business, paymentMethodOrder: $paymentMethodOrder, fields: $fields, readOnly: $readOnly, terms: $terms, wallets: $wallets)'; + return 'PaymentElementOptions(layout: $layout, defaultValues: $defaultValues, business: $business, paymentMethodOrder: $paymentMethodOrder, fields: $fields, readOnly: $readOnly, terms: $terms, wallets: $wallets, applePay: $applePay)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementOptionsImpl && @@ -352,9 +416,12 @@ class _$PaymentElementOptionsImpl implements _PaymentElementOptions { const DeepCollectionEquality() .equals(other.paymentMethodOrder, paymentMethodOrder) && (identical(other.fields, fields) || other.fields == fields) && - const DeepCollectionEquality().equals(other.readOnly, readOnly) && - const DeepCollectionEquality().equals(other.terms, terms) && - const DeepCollectionEquality().equals(other.wallets, wallets)); + (identical(other.readOnly, readOnly) || + other.readOnly == readOnly) && + (identical(other.terms, terms) || other.terms == terms) && + (identical(other.wallets, wallets) || other.wallets == wallets) && + (identical(other.applePay, applePay) || + other.applePay == applePay)); } @JsonKey(ignore: true) @@ -366,9 +433,10 @@ class _$PaymentElementOptionsImpl implements _PaymentElementOptions { business, const DeepCollectionEquality().hash(paymentMethodOrder), fields, - const DeepCollectionEquality().hash(readOnly), - const DeepCollectionEquality().hash(terms), - const DeepCollectionEquality().hash(wallets)); + readOnly, + terms, + wallets, + applePay); @JsonKey(ignore: true) @override @@ -387,14 +455,16 @@ class _$PaymentElementOptionsImpl implements _PaymentElementOptions { abstract class _PaymentElementOptions implements PaymentElementOptions { const factory _PaymentElementOptions( - {final PaymentElementLayout? layout, - final PaymentElementDefaultValues? defaultValues, - final PaymentElementBusiness? business, - final dynamic paymentMethodOrder, - final PaymentElementFields? fields, - final dynamic readOnly, - final dynamic terms, - final dynamic wallets}) = _$PaymentElementOptionsImpl; + {final PaymentElementLayout? layout, + final PaymentElementDefaultValues? defaultValues, + final PaymentElementBusiness? business, + final dynamic paymentMethodOrder, + final PaymentElementFields? fields, + final bool? readOnly, + final PaymentElementOptionsTerms? terms, + final PaymentElementWalletOptions? wallets, + final PaymentElementApplePayOptions? applePay}) = + _$PaymentElementOptionsImpl; factory _PaymentElementOptions.fromJson(Map json) = _$PaymentElementOptionsImpl.fromJson; @@ -433,11 +503,13 @@ abstract class _PaymentElementOptions implements PaymentElementOptions { /// be rejected. PaymentElementFields? get fields; @override - dynamic get readOnly; + bool? get readOnly; + @override + PaymentElementOptionsTerms? get terms; @override - dynamic get terms; + PaymentElementWalletOptions? get wallets; @override - dynamic get wallets; + PaymentElementApplePayOptions? get applePay; @override @JsonKey(ignore: true) _$$PaymentElementOptionsImplCopyWith<_$PaymentElementOptionsImpl> @@ -472,6 +544,12 @@ mixin _$PaymentElementLayout { /// This property is only applicable to the accordion layout. bool? get spacedAccordionItems => throw _privateConstructorUsedError; + /// Sets the max number of Payment Methods visible before using the "More" + /// button to hide additional Payment Methods. Set this value to 0 to + /// disable the "More" button and render all available Payment Methods. + /// Default is 5. This property is only applicable to the accordion layout. + int? get visibleAccordionItemsCount => throw _privateConstructorUsedError; + Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) $PaymentElementLayoutCopyWith get copyWith => @@ -488,7 +566,8 @@ abstract class $PaymentElementLayoutCopyWith<$Res> { {PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, - bool? spacedAccordionItems}); + bool? spacedAccordionItems, + int? visibleAccordionItemsCount}); } /// @nodoc @@ -509,6 +588,7 @@ class _$PaymentElementLayoutCopyWithImpl<$Res, Object? defaultCollapsed = freezed, Object? radios = freezed, Object? spacedAccordionItems = freezed, + Object? visibleAccordionItemsCount = freezed, }) { return _then(_value.copyWith( type: null == type @@ -527,6 +607,10 @@ class _$PaymentElementLayoutCopyWithImpl<$Res, ? _value.spacedAccordionItems : spacedAccordionItems // ignore: cast_nullable_to_non_nullable as bool?, + visibleAccordionItemsCount: freezed == visibleAccordionItemsCount + ? _value.visibleAccordionItemsCount + : visibleAccordionItemsCount // ignore: cast_nullable_to_non_nullable + as int?, ) as $Val); } } @@ -543,7 +627,8 @@ abstract class _$$PaymentElementLayoutImplCopyWith<$Res> {PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, - bool? spacedAccordionItems}); + bool? spacedAccordionItems, + int? visibleAccordionItemsCount}); } /// @nodoc @@ -561,6 +646,7 @@ class __$$PaymentElementLayoutImplCopyWithImpl<$Res> Object? defaultCollapsed = freezed, Object? radios = freezed, Object? spacedAccordionItems = freezed, + Object? visibleAccordionItemsCount = freezed, }) { return _then(_$PaymentElementLayoutImpl( type: null == type @@ -579,6 +665,10 @@ class __$$PaymentElementLayoutImplCopyWithImpl<$Res> ? _value.spacedAccordionItems : spacedAccordionItems // ignore: cast_nullable_to_non_nullable as bool?, + visibleAccordionItemsCount: freezed == visibleAccordionItemsCount + ? _value.visibleAccordionItemsCount + : visibleAccordionItemsCount // ignore: cast_nullable_to_non_nullable + as int?, )); } } @@ -590,7 +680,8 @@ class _$PaymentElementLayoutImpl implements _PaymentElementLayout { {required this.type, this.defaultCollapsed, this.radios, - this.spacedAccordionItems}); + this.spacedAccordionItems, + this.visibleAccordionItemsCount}); factory _$PaymentElementLayoutImpl.fromJson(Map json) => _$$PaymentElementLayoutImplFromJson(json); @@ -621,13 +712,20 @@ class _$PaymentElementLayoutImpl implements _PaymentElementLayout { @override final bool? spacedAccordionItems; + /// Sets the max number of Payment Methods visible before using the "More" + /// button to hide additional Payment Methods. Set this value to 0 to + /// disable the "More" button and render all available Payment Methods. + /// Default is 5. This property is only applicable to the accordion layout. + @override + final int? visibleAccordionItemsCount; + @override String toString() { - return 'PaymentElementLayout(type: $type, defaultCollapsed: $defaultCollapsed, radios: $radios, spacedAccordionItems: $spacedAccordionItems)'; + return 'PaymentElementLayout(type: $type, defaultCollapsed: $defaultCollapsed, radios: $radios, spacedAccordionItems: $spacedAccordionItems, visibleAccordionItemsCount: $visibleAccordionItemsCount)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementLayoutImpl && @@ -636,13 +734,17 @@ class _$PaymentElementLayoutImpl implements _PaymentElementLayout { other.defaultCollapsed == defaultCollapsed) && (identical(other.radios, radios) || other.radios == radios) && (identical(other.spacedAccordionItems, spacedAccordionItems) || - other.spacedAccordionItems == spacedAccordionItems)); + other.spacedAccordionItems == spacedAccordionItems) && + (identical(other.visibleAccordionItemsCount, + visibleAccordionItemsCount) || + other.visibleAccordionItemsCount == + visibleAccordionItemsCount)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, type, defaultCollapsed, radios, spacedAccordionItems); + int get hashCode => Object.hash(runtimeType, type, defaultCollapsed, radios, + spacedAccordionItems, visibleAccordionItemsCount); @JsonKey(ignore: true) @override @@ -665,7 +767,8 @@ abstract class _PaymentElementLayout implements PaymentElementLayout { {required final PaymentElementLayoutType type, final bool? defaultCollapsed, final bool? radios, - final bool? spacedAccordionItems}) = _$PaymentElementLayoutImpl; + final bool? spacedAccordionItems, + final int? visibleAccordionItemsCount}) = _$PaymentElementLayoutImpl; factory _PaymentElementLayout.fromJson(Map json) = _$PaymentElementLayoutImpl.fromJson; @@ -697,6 +800,13 @@ abstract class _PaymentElementLayout implements PaymentElementLayout { /// This property is only applicable to the accordion layout. bool? get spacedAccordionItems; @override + + /// Sets the max number of Payment Methods visible before using the "More" + /// button to hide additional Payment Methods. Set this value to 0 to + /// disable the "More" button and render all available Payment Methods. + /// Default is 5. This property is only applicable to the accordion layout. + int? get visibleAccordionItemsCount; + @override @JsonKey(ignore: true) _$$PaymentElementLayoutImplCopyWith<_$PaymentElementLayoutImpl> get copyWith => throw _privateConstructorUsedError; @@ -717,6 +827,11 @@ mixin _$PaymentElementDefaultValues { PaymentElementBillingDetails? get billingDetails => throw _privateConstructorUsedError; + /// Specify customer's default information for different payment methods. + /// Pre-filling as much information as possible streamlines the checkout process. + PaymentElementPaymentMethodDefaults? get paymentMethods => + throw _privateConstructorUsedError; + Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) $PaymentElementDefaultValuesCopyWith @@ -731,9 +846,12 @@ abstract class $PaymentElementDefaultValuesCopyWith<$Res> { _$PaymentElementDefaultValuesCopyWithImpl<$Res, PaymentElementDefaultValues>; @useResult - $Res call({PaymentElementBillingDetails? billingDetails}); + $Res call( + {PaymentElementBillingDetails? billingDetails, + PaymentElementPaymentMethodDefaults? paymentMethods}); $PaymentElementBillingDetailsCopyWith<$Res>? get billingDetails; + $PaymentElementPaymentMethodDefaultsCopyWith<$Res>? get paymentMethods; } /// @nodoc @@ -751,12 +869,17 @@ class _$PaymentElementDefaultValuesCopyWithImpl<$Res, @override $Res call({ Object? billingDetails = freezed, + Object? paymentMethods = freezed, }) { return _then(_value.copyWith( billingDetails: freezed == billingDetails ? _value.billingDetails : billingDetails // ignore: cast_nullable_to_non_nullable as PaymentElementBillingDetails?, + paymentMethods: freezed == paymentMethods + ? _value.paymentMethods + : paymentMethods // ignore: cast_nullable_to_non_nullable + as PaymentElementPaymentMethodDefaults?, ) as $Val); } @@ -772,6 +895,19 @@ class _$PaymentElementDefaultValuesCopyWithImpl<$Res, return _then(_value.copyWith(billingDetails: value) as $Val); }); } + + @override + @pragma('vm:prefer-inline') + $PaymentElementPaymentMethodDefaultsCopyWith<$Res>? get paymentMethods { + if (_value.paymentMethods == null) { + return null; + } + + return $PaymentElementPaymentMethodDefaultsCopyWith<$Res>( + _value.paymentMethods!, (value) { + return _then(_value.copyWith(paymentMethods: value) as $Val); + }); + } } /// @nodoc @@ -783,10 +919,14 @@ abstract class _$$PaymentElementDefaultValuesImplCopyWith<$Res> __$$PaymentElementDefaultValuesImplCopyWithImpl<$Res>; @override @useResult - $Res call({PaymentElementBillingDetails? billingDetails}); + $Res call( + {PaymentElementBillingDetails? billingDetails, + PaymentElementPaymentMethodDefaults? paymentMethods}); @override $PaymentElementBillingDetailsCopyWith<$Res>? get billingDetails; + @override + $PaymentElementPaymentMethodDefaultsCopyWith<$Res>? get paymentMethods; } /// @nodoc @@ -803,12 +943,17 @@ class __$$PaymentElementDefaultValuesImplCopyWithImpl<$Res> @override $Res call({ Object? billingDetails = freezed, + Object? paymentMethods = freezed, }) { return _then(_$PaymentElementDefaultValuesImpl( billingDetails: freezed == billingDetails ? _value.billingDetails : billingDetails // ignore: cast_nullable_to_non_nullable as PaymentElementBillingDetails?, + paymentMethods: freezed == paymentMethods + ? _value.paymentMethods + : paymentMethods // ignore: cast_nullable_to_non_nullable + as PaymentElementPaymentMethodDefaults?, )); } } @@ -817,7 +962,8 @@ class __$$PaymentElementDefaultValuesImplCopyWithImpl<$Res> @JsonSerializable() class _$PaymentElementDefaultValuesImpl implements _PaymentElementDefaultValues { - const _$PaymentElementDefaultValuesImpl({this.billingDetails}); + const _$PaymentElementDefaultValuesImpl( + {this.billingDetails, this.paymentMethods}); factory _$PaymentElementDefaultValuesImpl.fromJson( Map json) => @@ -831,23 +977,30 @@ class _$PaymentElementDefaultValuesImpl @override final PaymentElementBillingDetails? billingDetails; + /// Specify customer's default information for different payment methods. + /// Pre-filling as much information as possible streamlines the checkout process. + @override + final PaymentElementPaymentMethodDefaults? paymentMethods; + @override String toString() { - return 'PaymentElementDefaultValues(billingDetails: $billingDetails)'; + return 'PaymentElementDefaultValues(billingDetails: $billingDetails, paymentMethods: $paymentMethods)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementDefaultValuesImpl && (identical(other.billingDetails, billingDetails) || - other.billingDetails == billingDetails)); + other.billingDetails == billingDetails) && + (identical(other.paymentMethods, paymentMethods) || + other.paymentMethods == paymentMethods)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, billingDetails); + int get hashCode => Object.hash(runtimeType, billingDetails, paymentMethods); @JsonKey(ignore: true) @override @@ -867,7 +1020,8 @@ class _$PaymentElementDefaultValuesImpl abstract class _PaymentElementDefaultValues implements PaymentElementDefaultValues { const factory _PaymentElementDefaultValues( - {final PaymentElementBillingDetails? billingDetails}) = + {final PaymentElementBillingDetails? billingDetails, + final PaymentElementPaymentMethodDefaults? paymentMethods}) = _$PaymentElementDefaultValuesImpl; factory _PaymentElementDefaultValues.fromJson(Map json) = @@ -882,52 +1036,56 @@ abstract class _PaymentElementDefaultValues /// the checkout process. PaymentElementBillingDetails? get billingDetails; @override + + /// Specify customer's default information for different payment methods. + /// Pre-filling as much information as possible streamlines the checkout process. + PaymentElementPaymentMethodDefaults? get paymentMethods; + @override @JsonKey(ignore: true) _$$PaymentElementDefaultValuesImplCopyWith<_$PaymentElementDefaultValuesImpl> get copyWith => throw _privateConstructorUsedError; } -PaymentElementBillingDetails _$PaymentElementBillingDetailsFromJson( - Map json) { - return _PaymentElementBillingDetails.fromJson(json); +PaymentElementPaymentMethodDefaults + _$PaymentElementPaymentMethodDefaultsFromJson(Map json) { + return _PaymentElementPaymentMethodDefaults.fromJson(json); } /// @nodoc -mixin _$PaymentElementBillingDetails { - String? get name => throw _privateConstructorUsedError; - String? get email => throw _privateConstructorUsedError; - String? get phone => throw _privateConstructorUsedError; - PaymentElementBillingDetailsAddress? get address => - throw _privateConstructorUsedError; +mixin _$PaymentElementPaymentMethodDefaults { + /// Defaults for ideal + PaymentElementIdealDefaults? get ideal => throw _privateConstructorUsedError; + + /// Defaults for card payment method + PaymentElementCardDefaults? get card => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PaymentElementBillingDetailsCopyWith + $PaymentElementPaymentMethodDefaultsCopyWith< + PaymentElementPaymentMethodDefaults> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PaymentElementBillingDetailsCopyWith<$Res> { - factory $PaymentElementBillingDetailsCopyWith( - PaymentElementBillingDetails value, - $Res Function(PaymentElementBillingDetails) then) = - _$PaymentElementBillingDetailsCopyWithImpl<$Res, - PaymentElementBillingDetails>; +abstract class $PaymentElementPaymentMethodDefaultsCopyWith<$Res> { + factory $PaymentElementPaymentMethodDefaultsCopyWith( + PaymentElementPaymentMethodDefaults value, + $Res Function(PaymentElementPaymentMethodDefaults) then) = + _$PaymentElementPaymentMethodDefaultsCopyWithImpl<$Res, + PaymentElementPaymentMethodDefaults>; @useResult $Res call( - {String? name, - String? email, - String? phone, - PaymentElementBillingDetailsAddress? address}); + {PaymentElementIdealDefaults? ideal, PaymentElementCardDefaults? card}); - $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address; + $PaymentElementIdealDefaultsCopyWith<$Res>? get ideal; + $PaymentElementCardDefaultsCopyWith<$Res>? get card; } /// @nodoc -class _$PaymentElementBillingDetailsCopyWithImpl<$Res, - $Val extends PaymentElementBillingDetails> - implements $PaymentElementBillingDetailsCopyWith<$Res> { - _$PaymentElementBillingDetailsCopyWithImpl(this._value, this._then); +class _$PaymentElementPaymentMethodDefaultsCopyWithImpl<$Res, + $Val extends PaymentElementPaymentMethodDefaults> + implements $PaymentElementPaymentMethodDefaultsCopyWith<$Res> { + _$PaymentElementPaymentMethodDefaultsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -937,241 +1095,210 @@ class _$PaymentElementBillingDetailsCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, - Object? email = freezed, - Object? phone = freezed, - Object? address = freezed, + Object? ideal = freezed, + Object? card = freezed, }) { return _then(_value.copyWith( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - phone: freezed == phone - ? _value.phone - : phone // ignore: cast_nullable_to_non_nullable - as String?, - address: freezed == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as PaymentElementBillingDetailsAddress?, + ideal: freezed == ideal + ? _value.ideal + : ideal // ignore: cast_nullable_to_non_nullable + as PaymentElementIdealDefaults?, + card: freezed == card + ? _value.card + : card // ignore: cast_nullable_to_non_nullable + as PaymentElementCardDefaults?, ) as $Val); } @override @pragma('vm:prefer-inline') - $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address { - if (_value.address == null) { + $PaymentElementIdealDefaultsCopyWith<$Res>? get ideal { + if (_value.ideal == null) { return null; } - return $PaymentElementBillingDetailsAddressCopyWith<$Res>(_value.address!, - (value) { - return _then(_value.copyWith(address: value) as $Val); + return $PaymentElementIdealDefaultsCopyWith<$Res>(_value.ideal!, (value) { + return _then(_value.copyWith(ideal: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementCardDefaultsCopyWith<$Res>? get card { + if (_value.card == null) { + return null; + } + + return $PaymentElementCardDefaultsCopyWith<$Res>(_value.card!, (value) { + return _then(_value.copyWith(card: value) as $Val); }); } } /// @nodoc -abstract class _$$PaymentElementBillingDetailsImplCopyWith<$Res> - implements $PaymentElementBillingDetailsCopyWith<$Res> { - factory _$$PaymentElementBillingDetailsImplCopyWith( - _$PaymentElementBillingDetailsImpl value, - $Res Function(_$PaymentElementBillingDetailsImpl) then) = - __$$PaymentElementBillingDetailsImplCopyWithImpl<$Res>; +abstract class _$$PaymentElementPaymentMethodDefaultsImplCopyWith<$Res> + implements $PaymentElementPaymentMethodDefaultsCopyWith<$Res> { + factory _$$PaymentElementPaymentMethodDefaultsImplCopyWith( + _$PaymentElementPaymentMethodDefaultsImpl value, + $Res Function(_$PaymentElementPaymentMethodDefaultsImpl) then) = + __$$PaymentElementPaymentMethodDefaultsImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String? name, - String? email, - String? phone, - PaymentElementBillingDetailsAddress? address}); + {PaymentElementIdealDefaults? ideal, PaymentElementCardDefaults? card}); @override - $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address; + $PaymentElementIdealDefaultsCopyWith<$Res>? get ideal; + @override + $PaymentElementCardDefaultsCopyWith<$Res>? get card; } /// @nodoc -class __$$PaymentElementBillingDetailsImplCopyWithImpl<$Res> - extends _$PaymentElementBillingDetailsCopyWithImpl<$Res, - _$PaymentElementBillingDetailsImpl> - implements _$$PaymentElementBillingDetailsImplCopyWith<$Res> { - __$$PaymentElementBillingDetailsImplCopyWithImpl( - _$PaymentElementBillingDetailsImpl _value, - $Res Function(_$PaymentElementBillingDetailsImpl) _then) +class __$$PaymentElementPaymentMethodDefaultsImplCopyWithImpl<$Res> + extends _$PaymentElementPaymentMethodDefaultsCopyWithImpl<$Res, + _$PaymentElementPaymentMethodDefaultsImpl> + implements _$$PaymentElementPaymentMethodDefaultsImplCopyWith<$Res> { + __$$PaymentElementPaymentMethodDefaultsImplCopyWithImpl( + _$PaymentElementPaymentMethodDefaultsImpl _value, + $Res Function(_$PaymentElementPaymentMethodDefaultsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, - Object? email = freezed, - Object? phone = freezed, - Object? address = freezed, + Object? ideal = freezed, + Object? card = freezed, }) { - return _then(_$PaymentElementBillingDetailsImpl( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - phone: freezed == phone - ? _value.phone - : phone // ignore: cast_nullable_to_non_nullable - as String?, - address: freezed == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as PaymentElementBillingDetailsAddress?, + return _then(_$PaymentElementPaymentMethodDefaultsImpl( + ideal: freezed == ideal + ? _value.ideal + : ideal // ignore: cast_nullable_to_non_nullable + as PaymentElementIdealDefaults?, + card: freezed == card + ? _value.card + : card // ignore: cast_nullable_to_non_nullable + as PaymentElementCardDefaults?, )); } } /// @nodoc @JsonSerializable() -class _$PaymentElementBillingDetailsImpl - implements _PaymentElementBillingDetails { - const _$PaymentElementBillingDetailsImpl( - {this.name, this.email, this.phone, this.address}); +class _$PaymentElementPaymentMethodDefaultsImpl + implements _PaymentElementPaymentMethodDefaults { + const _$PaymentElementPaymentMethodDefaultsImpl({this.ideal, this.card}); - factory _$PaymentElementBillingDetailsImpl.fromJson( + factory _$PaymentElementPaymentMethodDefaultsImpl.fromJson( Map json) => - _$$PaymentElementBillingDetailsImplFromJson(json); + _$$PaymentElementPaymentMethodDefaultsImplFromJson(json); + /// Defaults for ideal @override - final String? name; - @override - final String? email; - @override - final String? phone; + final PaymentElementIdealDefaults? ideal; + + /// Defaults for card payment method @override - final PaymentElementBillingDetailsAddress? address; + final PaymentElementCardDefaults? card; @override String toString() { - return 'PaymentElementBillingDetails(name: $name, email: $email, phone: $phone, address: $address)'; + return 'PaymentElementPaymentMethodDefaults(ideal: $ideal, card: $card)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PaymentElementBillingDetailsImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.email, email) || other.email == email) && - (identical(other.phone, phone) || other.phone == phone) && - (identical(other.address, address) || other.address == address)); + other is _$PaymentElementPaymentMethodDefaultsImpl && + (identical(other.ideal, ideal) || other.ideal == ideal) && + (identical(other.card, card) || other.card == card)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, name, email, phone, address); + int get hashCode => Object.hash(runtimeType, ideal, card); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentElementBillingDetailsImplCopyWith< - _$PaymentElementBillingDetailsImpl> - get copyWith => __$$PaymentElementBillingDetailsImplCopyWithImpl< - _$PaymentElementBillingDetailsImpl>(this, _$identity); + _$$PaymentElementPaymentMethodDefaultsImplCopyWith< + _$PaymentElementPaymentMethodDefaultsImpl> + get copyWith => __$$PaymentElementPaymentMethodDefaultsImplCopyWithImpl< + _$PaymentElementPaymentMethodDefaultsImpl>(this, _$identity); @override Map toJson() { - return _$$PaymentElementBillingDetailsImplToJson( + return _$$PaymentElementPaymentMethodDefaultsImplToJson( this, ); } } -abstract class _PaymentElementBillingDetails - implements PaymentElementBillingDetails { - const factory _PaymentElementBillingDetails( - {final String? name, - final String? email, - final String? phone, - final PaymentElementBillingDetailsAddress? address}) = - _$PaymentElementBillingDetailsImpl; +abstract class _PaymentElementPaymentMethodDefaults + implements PaymentElementPaymentMethodDefaults { + const factory _PaymentElementPaymentMethodDefaults( + {final PaymentElementIdealDefaults? ideal, + final PaymentElementCardDefaults? card}) = + _$PaymentElementPaymentMethodDefaultsImpl; - factory _PaymentElementBillingDetails.fromJson(Map json) = - _$PaymentElementBillingDetailsImpl.fromJson; + factory _PaymentElementPaymentMethodDefaults.fromJson( + Map json) = + _$PaymentElementPaymentMethodDefaultsImpl.fromJson; @override - String? get name; - @override - String? get email; - @override - String? get phone; + + /// Defaults for ideal + PaymentElementIdealDefaults? get ideal; @override - PaymentElementBillingDetailsAddress? get address; + + /// Defaults for card payment method + PaymentElementCardDefaults? get card; @override @JsonKey(ignore: true) - _$$PaymentElementBillingDetailsImplCopyWith< - _$PaymentElementBillingDetailsImpl> + _$$PaymentElementPaymentMethodDefaultsImplCopyWith< + _$PaymentElementPaymentMethodDefaultsImpl> get copyWith => throw _privateConstructorUsedError; } -PaymentElementBillingDetailsAddress - _$PaymentElementBillingDetailsAddressFromJson(Map json) { - return _PaymentElementBillingDetailsAddress.fromJson(json); +PaymentElementWalletOptions _$PaymentElementWalletOptionsFromJson( + Map json) { + return _PaymentElementWalletOptions.fromJson(json); } /// @nodoc -mixin _$PaymentElementBillingDetailsAddress { - /// Address line 1 (e.g., street, PO Box, or company name). - String? get line1 => throw _privateConstructorUsedError; - - /// Address line 2 (e.g., apartment, suite, unit, or building). - String? get line2 => throw _privateConstructorUsedError; - - /// City, district, suburb, town, or village. - String? get city => throw _privateConstructorUsedError; - - /// State, county, province, or region. - String? get state => throw _privateConstructorUsedError; - - /// Two-letter country code (ISO 3166-1 alpha-2). - String? get country => throw _privateConstructorUsedError; +mixin _$PaymentElementWalletOptions { + /// Apple pay required options + PaymentElementFieldRequired? get applePay => + throw _privateConstructorUsedError; - /// ZIP or postal code. - @JsonKey(name: 'postal_code') - String? get postalCode => throw _privateConstructorUsedError; + /// Google pay required options + PaymentElementFieldRequired? get googlePay => + throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PaymentElementBillingDetailsAddressCopyWith< - PaymentElementBillingDetailsAddress> + $PaymentElementWalletOptionsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PaymentElementBillingDetailsAddressCopyWith<$Res> { - factory $PaymentElementBillingDetailsAddressCopyWith( - PaymentElementBillingDetailsAddress value, - $Res Function(PaymentElementBillingDetailsAddress) then) = - _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, - PaymentElementBillingDetailsAddress>; +abstract class $PaymentElementWalletOptionsCopyWith<$Res> { + factory $PaymentElementWalletOptionsCopyWith( + PaymentElementWalletOptions value, + $Res Function(PaymentElementWalletOptions) then) = + _$PaymentElementWalletOptionsCopyWithImpl<$Res, + PaymentElementWalletOptions>; @useResult $Res call( - {String? line1, - String? line2, - String? city, - String? state, - String? country, - @JsonKey(name: 'postal_code') String? postalCode}); + {PaymentElementFieldRequired? applePay, + PaymentElementFieldRequired? googlePay}); } /// @nodoc -class _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, - $Val extends PaymentElementBillingDetailsAddress> - implements $PaymentElementBillingDetailsAddressCopyWith<$Res> { - _$PaymentElementBillingDetailsAddressCopyWithImpl(this._value, this._then); +class _$PaymentElementWalletOptionsCopyWithImpl<$Res, + $Val extends PaymentElementWalletOptions> + implements $PaymentElementWalletOptionsCopyWith<$Res> { + _$PaymentElementWalletOptionsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -1181,266 +1308,177 @@ class _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? line1 = freezed, - Object? line2 = freezed, - Object? city = freezed, - Object? state = freezed, - Object? country = freezed, - Object? postalCode = freezed, + Object? applePay = freezed, + Object? googlePay = freezed, }) { return _then(_value.copyWith( - line1: freezed == line1 - ? _value.line1 - : line1 // ignore: cast_nullable_to_non_nullable - as String?, - line2: freezed == line2 - ? _value.line2 - : line2 // ignore: cast_nullable_to_non_nullable - as String?, - city: freezed == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - country: freezed == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as String?, - postalCode: freezed == postalCode - ? _value.postalCode - : postalCode // ignore: cast_nullable_to_non_nullable - as String?, + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired?, + googlePay: freezed == googlePay + ? _value.googlePay + : googlePay // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired?, ) as $Val); } } /// @nodoc -abstract class _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res> - implements $PaymentElementBillingDetailsAddressCopyWith<$Res> { - factory _$$PaymentElementBillingDetailsAddressImplCopyWith( - _$PaymentElementBillingDetailsAddressImpl value, - $Res Function(_$PaymentElementBillingDetailsAddressImpl) then) = - __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res>; +abstract class _$$PaymentElementWalletOptionsImplCopyWith<$Res> + implements $PaymentElementWalletOptionsCopyWith<$Res> { + factory _$$PaymentElementWalletOptionsImplCopyWith( + _$PaymentElementWalletOptionsImpl value, + $Res Function(_$PaymentElementWalletOptionsImpl) then) = + __$$PaymentElementWalletOptionsImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String? line1, - String? line2, - String? city, - String? state, - String? country, - @JsonKey(name: 'postal_code') String? postalCode}); + {PaymentElementFieldRequired? applePay, + PaymentElementFieldRequired? googlePay}); } /// @nodoc -class __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res> - extends _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, - _$PaymentElementBillingDetailsAddressImpl> - implements _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res> { - __$$PaymentElementBillingDetailsAddressImplCopyWithImpl( - _$PaymentElementBillingDetailsAddressImpl _value, - $Res Function(_$PaymentElementBillingDetailsAddressImpl) _then) +class __$$PaymentElementWalletOptionsImplCopyWithImpl<$Res> + extends _$PaymentElementWalletOptionsCopyWithImpl<$Res, + _$PaymentElementWalletOptionsImpl> + implements _$$PaymentElementWalletOptionsImplCopyWith<$Res> { + __$$PaymentElementWalletOptionsImplCopyWithImpl( + _$PaymentElementWalletOptionsImpl _value, + $Res Function(_$PaymentElementWalletOptionsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? line1 = freezed, - Object? line2 = freezed, - Object? city = freezed, - Object? state = freezed, - Object? country = freezed, - Object? postalCode = freezed, + Object? applePay = freezed, + Object? googlePay = freezed, }) { - return _then(_$PaymentElementBillingDetailsAddressImpl( - line1: freezed == line1 - ? _value.line1 - : line1 // ignore: cast_nullable_to_non_nullable - as String?, - line2: freezed == line2 - ? _value.line2 - : line2 // ignore: cast_nullable_to_non_nullable - as String?, - city: freezed == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - country: freezed == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as String?, - postalCode: freezed == postalCode - ? _value.postalCode - : postalCode // ignore: cast_nullable_to_non_nullable - as String?, + return _then(_$PaymentElementWalletOptionsImpl( + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired?, + googlePay: freezed == googlePay + ? _value.googlePay + : googlePay // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired?, )); } } /// @nodoc @JsonSerializable() -class _$PaymentElementBillingDetailsAddressImpl - implements _PaymentElementBillingDetailsAddress { - const _$PaymentElementBillingDetailsAddressImpl( - {this.line1, - this.line2, - this.city, - this.state, - this.country, - @JsonKey(name: 'postal_code') this.postalCode}); +class _$PaymentElementWalletOptionsImpl + implements _PaymentElementWalletOptions { + const _$PaymentElementWalletOptionsImpl({this.applePay, this.googlePay}); - factory _$PaymentElementBillingDetailsAddressImpl.fromJson( + factory _$PaymentElementWalletOptionsImpl.fromJson( Map json) => - _$$PaymentElementBillingDetailsAddressImplFromJson(json); - - /// Address line 1 (e.g., street, PO Box, or company name). - @override - final String? line1; - - /// Address line 2 (e.g., apartment, suite, unit, or building). - @override - final String? line2; - - /// City, district, suburb, town, or village. - @override - final String? city; - - /// State, county, province, or region. - @override - final String? state; + _$$PaymentElementWalletOptionsImplFromJson(json); - /// Two-letter country code (ISO 3166-1 alpha-2). + /// Apple pay required options @override - final String? country; + final PaymentElementFieldRequired? applePay; - /// ZIP or postal code. + /// Google pay required options @override - @JsonKey(name: 'postal_code') - final String? postalCode; + final PaymentElementFieldRequired? googlePay; @override String toString() { - return 'PaymentElementBillingDetailsAddress(line1: $line1, line2: $line2, city: $city, state: $state, country: $country, postalCode: $postalCode)'; + return 'PaymentElementWalletOptions(applePay: $applePay, googlePay: $googlePay)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PaymentElementBillingDetailsAddressImpl && - (identical(other.line1, line1) || other.line1 == line1) && - (identical(other.line2, line2) || other.line2 == line2) && - (identical(other.city, city) || other.city == city) && - (identical(other.state, state) || other.state == state) && - (identical(other.country, country) || other.country == country) && - (identical(other.postalCode, postalCode) || - other.postalCode == postalCode)); + other is _$PaymentElementWalletOptionsImpl && + (identical(other.applePay, applePay) || + other.applePay == applePay) && + (identical(other.googlePay, googlePay) || + other.googlePay == googlePay)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, line1, line2, city, state, country, postalCode); + int get hashCode => Object.hash(runtimeType, applePay, googlePay); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentElementBillingDetailsAddressImplCopyWith< - _$PaymentElementBillingDetailsAddressImpl> - get copyWith => __$$PaymentElementBillingDetailsAddressImplCopyWithImpl< - _$PaymentElementBillingDetailsAddressImpl>(this, _$identity); + _$$PaymentElementWalletOptionsImplCopyWith<_$PaymentElementWalletOptionsImpl> + get copyWith => __$$PaymentElementWalletOptionsImplCopyWithImpl< + _$PaymentElementWalletOptionsImpl>(this, _$identity); @override Map toJson() { - return _$$PaymentElementBillingDetailsAddressImplToJson( + return _$$PaymentElementWalletOptionsImplToJson( this, ); } } -abstract class _PaymentElementBillingDetailsAddress - implements PaymentElementBillingDetailsAddress { - const factory _PaymentElementBillingDetailsAddress( - {final String? line1, - final String? line2, - final String? city, - final String? state, - final String? country, - @JsonKey(name: 'postal_code') final String? postalCode}) = - _$PaymentElementBillingDetailsAddressImpl; - - factory _PaymentElementBillingDetailsAddress.fromJson( - Map json) = - _$PaymentElementBillingDetailsAddressImpl.fromJson; - - @override - - /// Address line 1 (e.g., street, PO Box, or company name). - String? get line1; - @override - - /// Address line 2 (e.g., apartment, suite, unit, or building). - String? get line2; - @override +abstract class _PaymentElementWalletOptions + implements PaymentElementWalletOptions { + const factory _PaymentElementWalletOptions( + {final PaymentElementFieldRequired? applePay, + final PaymentElementFieldRequired? googlePay}) = + _$PaymentElementWalletOptionsImpl; - /// City, district, suburb, town, or village. - String? get city; - @override + factory _PaymentElementWalletOptions.fromJson(Map json) = + _$PaymentElementWalletOptionsImpl.fromJson; - /// State, county, province, or region. - String? get state; @override - /// Two-letter country code (ISO 3166-1 alpha-2). - String? get country; + /// Apple pay required options + PaymentElementFieldRequired? get applePay; @override - /// ZIP or postal code. - @JsonKey(name: 'postal_code') - String? get postalCode; + /// Google pay required options + PaymentElementFieldRequired? get googlePay; @override @JsonKey(ignore: true) - _$$PaymentElementBillingDetailsAddressImplCopyWith< - _$PaymentElementBillingDetailsAddressImpl> + _$$PaymentElementWalletOptionsImplCopyWith<_$PaymentElementWalletOptionsImpl> get copyWith => throw _privateConstructorUsedError; } -PaymentElementBusiness _$PaymentElementBusinessFromJson( +PaymentElementIdealDefaults _$PaymentElementIdealDefaultsFromJson( Map json) { - return _PaymentElementBusiness.fromJson(json); + return _PaymentElementIdealDefaults.fromJson(json); } /// @nodoc -mixin _$PaymentElementBusiness { - String? get name => throw _privateConstructorUsedError; +mixin _$PaymentElementIdealDefaults { + /// The customer’s bank name. + /// + /// See https://docs.stripe.com/payments/ideal/accept-a-payment?ui=element#bank-reference + /// for all options. + String? get bank => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PaymentElementBusinessCopyWith get copyWith => - throw _privateConstructorUsedError; + $PaymentElementIdealDefaultsCopyWith + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PaymentElementBusinessCopyWith<$Res> { - factory $PaymentElementBusinessCopyWith(PaymentElementBusiness value, - $Res Function(PaymentElementBusiness) then) = - _$PaymentElementBusinessCopyWithImpl<$Res, PaymentElementBusiness>; +abstract class $PaymentElementIdealDefaultsCopyWith<$Res> { + factory $PaymentElementIdealDefaultsCopyWith( + PaymentElementIdealDefaults value, + $Res Function(PaymentElementIdealDefaults) then) = + _$PaymentElementIdealDefaultsCopyWithImpl<$Res, + PaymentElementIdealDefaults>; @useResult - $Res call({String? name}); + $Res call({String? bank}); } /// @nodoc -class _$PaymentElementBusinessCopyWithImpl<$Res, - $Val extends PaymentElementBusiness> - implements $PaymentElementBusinessCopyWith<$Res> { - _$PaymentElementBusinessCopyWithImpl(this._value, this._then); +class _$PaymentElementIdealDefaultsCopyWithImpl<$Res, + $Val extends PaymentElementIdealDefaults> + implements $PaymentElementIdealDefaultsCopyWith<$Res> { + _$PaymentElementIdealDefaultsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -1450,48 +1488,48 @@ class _$PaymentElementBusinessCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, + Object? bank = freezed, }) { return _then(_value.copyWith( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable + bank: freezed == bank + ? _value.bank + : bank // ignore: cast_nullable_to_non_nullable as String?, ) as $Val); } } /// @nodoc -abstract class _$$PaymentElementBusinessImplCopyWith<$Res> - implements $PaymentElementBusinessCopyWith<$Res> { - factory _$$PaymentElementBusinessImplCopyWith( - _$PaymentElementBusinessImpl value, - $Res Function(_$PaymentElementBusinessImpl) then) = - __$$PaymentElementBusinessImplCopyWithImpl<$Res>; +abstract class _$$PaymentElementIdealDefaultsImplCopyWith<$Res> + implements $PaymentElementIdealDefaultsCopyWith<$Res> { + factory _$$PaymentElementIdealDefaultsImplCopyWith( + _$PaymentElementIdealDefaultsImpl value, + $Res Function(_$PaymentElementIdealDefaultsImpl) then) = + __$$PaymentElementIdealDefaultsImplCopyWithImpl<$Res>; @override @useResult - $Res call({String? name}); + $Res call({String? bank}); } /// @nodoc -class __$$PaymentElementBusinessImplCopyWithImpl<$Res> - extends _$PaymentElementBusinessCopyWithImpl<$Res, - _$PaymentElementBusinessImpl> - implements _$$PaymentElementBusinessImplCopyWith<$Res> { - __$$PaymentElementBusinessImplCopyWithImpl( - _$PaymentElementBusinessImpl _value, - $Res Function(_$PaymentElementBusinessImpl) _then) +class __$$PaymentElementIdealDefaultsImplCopyWithImpl<$Res> + extends _$PaymentElementIdealDefaultsCopyWithImpl<$Res, + _$PaymentElementIdealDefaultsImpl> + implements _$$PaymentElementIdealDefaultsImplCopyWith<$Res> { + __$$PaymentElementIdealDefaultsImplCopyWithImpl( + _$PaymentElementIdealDefaultsImpl _value, + $Res Function(_$PaymentElementIdealDefaultsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = freezed, + Object? bank = freezed, }) { - return _then(_$PaymentElementBusinessImpl( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable + return _then(_$PaymentElementIdealDefaultsImpl( + bank: freezed == bank + ? _value.bank + : bank // ignore: cast_nullable_to_non_nullable as String?, )); } @@ -1499,98 +1537,107 @@ class __$$PaymentElementBusinessImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$PaymentElementBusinessImpl implements _PaymentElementBusiness { - const _$PaymentElementBusinessImpl({this.name}); +class _$PaymentElementIdealDefaultsImpl + implements _PaymentElementIdealDefaults { + const _$PaymentElementIdealDefaultsImpl({this.bank}); - factory _$PaymentElementBusinessImpl.fromJson(Map json) => - _$$PaymentElementBusinessImplFromJson(json); + factory _$PaymentElementIdealDefaultsImpl.fromJson( + Map json) => + _$$PaymentElementIdealDefaultsImplFromJson(json); + /// The customer’s bank name. + /// + /// See https://docs.stripe.com/payments/ideal/accept-a-payment?ui=element#bank-reference + /// for all options. @override - final String? name; + final String? bank; @override String toString() { - return 'PaymentElementBusiness(name: $name)'; + return 'PaymentElementIdealDefaults(bank: $bank)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PaymentElementBusinessImpl && - (identical(other.name, name) || other.name == name)); + other is _$PaymentElementIdealDefaultsImpl && + (identical(other.bank, bank) || other.bank == bank)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, name); + int get hashCode => Object.hash(runtimeType, bank); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentElementBusinessImplCopyWith<_$PaymentElementBusinessImpl> - get copyWith => __$$PaymentElementBusinessImplCopyWithImpl< - _$PaymentElementBusinessImpl>(this, _$identity); + _$$PaymentElementIdealDefaultsImplCopyWith<_$PaymentElementIdealDefaultsImpl> + get copyWith => __$$PaymentElementIdealDefaultsImplCopyWithImpl< + _$PaymentElementIdealDefaultsImpl>(this, _$identity); @override Map toJson() { - return _$$PaymentElementBusinessImplToJson( + return _$$PaymentElementIdealDefaultsImplToJson( this, ); } } -abstract class _PaymentElementBusiness implements PaymentElementBusiness { - const factory _PaymentElementBusiness({final String? name}) = - _$PaymentElementBusinessImpl; +abstract class _PaymentElementIdealDefaults + implements PaymentElementIdealDefaults { + const factory _PaymentElementIdealDefaults({final String? bank}) = + _$PaymentElementIdealDefaultsImpl; - factory _PaymentElementBusiness.fromJson(Map json) = - _$PaymentElementBusinessImpl.fromJson; + factory _PaymentElementIdealDefaults.fromJson(Map json) = + _$PaymentElementIdealDefaultsImpl.fromJson; @override - String? get name; + + /// The customer’s bank name. + /// + /// See https://docs.stripe.com/payments/ideal/accept-a-payment?ui=element#bank-reference + /// for all options. + String? get bank; @override @JsonKey(ignore: true) - _$$PaymentElementBusinessImplCopyWith<_$PaymentElementBusinessImpl> + _$$PaymentElementIdealDefaultsImplCopyWith<_$PaymentElementIdealDefaultsImpl> get copyWith => throw _privateConstructorUsedError; } -PaymentElementFields _$PaymentElementFieldsFromJson(Map json) { - return _PaymentElementFields.fromJson(json); +PaymentElementCardDefaults _$PaymentElementCardDefaultsFromJson( + Map json) { + return _PaymentElementCardDefaults.fromJson(json); } /// @nodoc -mixin _$PaymentElementFields { - /// Specify never to avoid collecting all billing details in the - /// Payment Element. - /// If you would like to disable only certain billing details, - /// pass an BillingDetailsFields specifying which fields you would like - /// to disable collection for. - /// The default setting for each field is auto. - BillingDetailsFields get billingDetails => throw _privateConstructorUsedError; +mixin _$PaymentElementCardDefaults { + /// The specified network prferences for card brand choice. The first network in the array + /// that matches a network on the enetered cobranded card will be selected by default + /// in the card brand choice. + List? get network => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PaymentElementFieldsCopyWith get copyWith => - throw _privateConstructorUsedError; + $PaymentElementCardDefaultsCopyWith + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PaymentElementFieldsCopyWith<$Res> { - factory $PaymentElementFieldsCopyWith(PaymentElementFields value, - $Res Function(PaymentElementFields) then) = - _$PaymentElementFieldsCopyWithImpl<$Res, PaymentElementFields>; +abstract class $PaymentElementCardDefaultsCopyWith<$Res> { + factory $PaymentElementCardDefaultsCopyWith(PaymentElementCardDefaults value, + $Res Function(PaymentElementCardDefaults) then) = + _$PaymentElementCardDefaultsCopyWithImpl<$Res, + PaymentElementCardDefaults>; @useResult - $Res call({BillingDetailsFields billingDetails}); - - $BillingDetailsFieldsCopyWith<$Res> get billingDetails; + $Res call({List? network}); } /// @nodoc -class _$PaymentElementFieldsCopyWithImpl<$Res, - $Val extends PaymentElementFields> - implements $PaymentElementFieldsCopyWith<$Res> { - _$PaymentElementFieldsCopyWithImpl(this._value, this._then); +class _$PaymentElementCardDefaultsCopyWithImpl<$Res, + $Val extends PaymentElementCardDefaults> + implements $PaymentElementCardDefaultsCopyWith<$Res> { + _$PaymentElementCardDefaultsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -1600,173 +1647,174 @@ class _$PaymentElementFieldsCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? billingDetails = null, + Object? network = freezed, }) { return _then(_value.copyWith( - billingDetails: null == billingDetails - ? _value.billingDetails - : billingDetails // ignore: cast_nullable_to_non_nullable - as BillingDetailsFields, + network: freezed == network + ? _value.network + : network // ignore: cast_nullable_to_non_nullable + as List?, ) as $Val); } +} - @override - @pragma('vm:prefer-inline') - $BillingDetailsFieldsCopyWith<$Res> get billingDetails { - return $BillingDetailsFieldsCopyWith<$Res>(_value.billingDetails, (value) { - return _then(_value.copyWith(billingDetails: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$PaymentElementFieldsImplCopyWith<$Res> - implements $PaymentElementFieldsCopyWith<$Res> { - factory _$$PaymentElementFieldsImplCopyWith(_$PaymentElementFieldsImpl value, - $Res Function(_$PaymentElementFieldsImpl) then) = - __$$PaymentElementFieldsImplCopyWithImpl<$Res>; +/// @nodoc +abstract class _$$PaymentElementCardDefaultsImplCopyWith<$Res> + implements $PaymentElementCardDefaultsCopyWith<$Res> { + factory _$$PaymentElementCardDefaultsImplCopyWith( + _$PaymentElementCardDefaultsImpl value, + $Res Function(_$PaymentElementCardDefaultsImpl) then) = + __$$PaymentElementCardDefaultsImplCopyWithImpl<$Res>; @override @useResult - $Res call({BillingDetailsFields billingDetails}); - - @override - $BillingDetailsFieldsCopyWith<$Res> get billingDetails; + $Res call({List? network}); } /// @nodoc -class __$$PaymentElementFieldsImplCopyWithImpl<$Res> - extends _$PaymentElementFieldsCopyWithImpl<$Res, _$PaymentElementFieldsImpl> - implements _$$PaymentElementFieldsImplCopyWith<$Res> { - __$$PaymentElementFieldsImplCopyWithImpl(_$PaymentElementFieldsImpl _value, - $Res Function(_$PaymentElementFieldsImpl) _then) +class __$$PaymentElementCardDefaultsImplCopyWithImpl<$Res> + extends _$PaymentElementCardDefaultsCopyWithImpl<$Res, + _$PaymentElementCardDefaultsImpl> + implements _$$PaymentElementCardDefaultsImplCopyWith<$Res> { + __$$PaymentElementCardDefaultsImplCopyWithImpl( + _$PaymentElementCardDefaultsImpl _value, + $Res Function(_$PaymentElementCardDefaultsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? billingDetails = null, + Object? network = freezed, }) { - return _then(_$PaymentElementFieldsImpl( - billingDetails: null == billingDetails - ? _value.billingDetails - : billingDetails // ignore: cast_nullable_to_non_nullable - as BillingDetailsFields, + return _then(_$PaymentElementCardDefaultsImpl( + network: freezed == network + ? _value._network + : network // ignore: cast_nullable_to_non_nullable + as List?, )); } } /// @nodoc @JsonSerializable() -class _$PaymentElementFieldsImpl implements _PaymentElementFields { - const _$PaymentElementFieldsImpl( - {this.billingDetails = BillingDetailsFields.auto}); - - factory _$PaymentElementFieldsImpl.fromJson(Map json) => - _$$PaymentElementFieldsImplFromJson(json); +class _$PaymentElementCardDefaultsImpl implements _PaymentElementCardDefaults { + const _$PaymentElementCardDefaultsImpl({final List? network}) + : _network = network; - /// Specify never to avoid collecting all billing details in the - /// Payment Element. - /// If you would like to disable only certain billing details, - /// pass an BillingDetailsFields specifying which fields you would like - /// to disable collection for. - /// The default setting for each field is auto. - @override - @JsonKey() - final BillingDetailsFields billingDetails; + factory _$PaymentElementCardDefaultsImpl.fromJson( + Map json) => + _$$PaymentElementCardDefaultsImplFromJson(json); + + /// The specified network prferences for card brand choice. The first network in the array + /// that matches a network on the enetered cobranded card will be selected by default + /// in the card brand choice. + final List? _network; + + /// The specified network prferences for card brand choice. The first network in the array + /// that matches a network on the enetered cobranded card will be selected by default + /// in the card brand choice. + @override + List? get network { + final value = _network; + if (value == null) return null; + if (_network is EqualUnmodifiableListView) return _network; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } @override String toString() { - return 'PaymentElementFields(billingDetails: $billingDetails)'; + return 'PaymentElementCardDefaults(network: $network)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PaymentElementFieldsImpl && - (identical(other.billingDetails, billingDetails) || - other.billingDetails == billingDetails)); + other is _$PaymentElementCardDefaultsImpl && + const DeepCollectionEquality().equals(other._network, _network)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, billingDetails); + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(_network)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentElementFieldsImplCopyWith<_$PaymentElementFieldsImpl> - get copyWith => - __$$PaymentElementFieldsImplCopyWithImpl<_$PaymentElementFieldsImpl>( - this, _$identity); + _$$PaymentElementCardDefaultsImplCopyWith<_$PaymentElementCardDefaultsImpl> + get copyWith => __$$PaymentElementCardDefaultsImplCopyWithImpl< + _$PaymentElementCardDefaultsImpl>(this, _$identity); @override Map toJson() { - return _$$PaymentElementFieldsImplToJson( + return _$$PaymentElementCardDefaultsImplToJson( this, ); } } -abstract class _PaymentElementFields implements PaymentElementFields { - const factory _PaymentElementFields( - {final BillingDetailsFields billingDetails}) = _$PaymentElementFieldsImpl; +abstract class _PaymentElementCardDefaults + implements PaymentElementCardDefaults { + const factory _PaymentElementCardDefaults({final List? network}) = + _$PaymentElementCardDefaultsImpl; - factory _PaymentElementFields.fromJson(Map json) = - _$PaymentElementFieldsImpl.fromJson; + factory _PaymentElementCardDefaults.fromJson(Map json) = + _$PaymentElementCardDefaultsImpl.fromJson; @override - /// Specify never to avoid collecting all billing details in the - /// Payment Element. - /// If you would like to disable only certain billing details, - /// pass an BillingDetailsFields specifying which fields you would like - /// to disable collection for. - /// The default setting for each field is auto. - BillingDetailsFields get billingDetails; + /// The specified network prferences for card brand choice. The first network in the array + /// that matches a network on the enetered cobranded card will be selected by default + /// in the card brand choice. + List? get network; @override @JsonKey(ignore: true) - _$$PaymentElementFieldsImplCopyWith<_$PaymentElementFieldsImpl> + _$$PaymentElementCardDefaultsImplCopyWith<_$PaymentElementCardDefaultsImpl> get copyWith => throw _privateConstructorUsedError; } -BillingDetailsFields _$BillingDetailsFieldsFromJson(Map json) { - return _BillingDetailsFields.fromJson(json); +PaymentElementBillingDetails _$PaymentElementBillingDetailsFromJson( + Map json) { + return _PaymentElementBillingDetails.fromJson(json); } /// @nodoc -mixin _$BillingDetailsFields { - PaymentElementFieldRequired get name => throw _privateConstructorUsedError; - PaymentElementFieldRequired get email => throw _privateConstructorUsedError; - PaymentElementFieldRequired get phone => throw _privateConstructorUsedError; - PaymentElementAddressFields get address => throw _privateConstructorUsedError; +mixin _$PaymentElementBillingDetails { + String? get name => throw _privateConstructorUsedError; + String? get email => throw _privateConstructorUsedError; + String? get phone => throw _privateConstructorUsedError; + PaymentElementBillingDetailsAddress? get address => + throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $BillingDetailsFieldsCopyWith get copyWith => - throw _privateConstructorUsedError; + $PaymentElementBillingDetailsCopyWith + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $BillingDetailsFieldsCopyWith<$Res> { - factory $BillingDetailsFieldsCopyWith(BillingDetailsFields value, - $Res Function(BillingDetailsFields) then) = - _$BillingDetailsFieldsCopyWithImpl<$Res, BillingDetailsFields>; +abstract class $PaymentElementBillingDetailsCopyWith<$Res> { + factory $PaymentElementBillingDetailsCopyWith( + PaymentElementBillingDetails value, + $Res Function(PaymentElementBillingDetails) then) = + _$PaymentElementBillingDetailsCopyWithImpl<$Res, + PaymentElementBillingDetails>; @useResult $Res call( - {PaymentElementFieldRequired name, - PaymentElementFieldRequired email, - PaymentElementFieldRequired phone, - PaymentElementAddressFields address}); + {String? name, + String? email, + String? phone, + PaymentElementBillingDetailsAddress? address}); - $PaymentElementAddressFieldsCopyWith<$Res> get address; + $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address; } /// @nodoc -class _$BillingDetailsFieldsCopyWithImpl<$Res, - $Val extends BillingDetailsFields> - implements $BillingDetailsFieldsCopyWith<$Res> { - _$BillingDetailsFieldsCopyWithImpl(this._value, this._then); +class _$PaymentElementBillingDetailsCopyWithImpl<$Res, + $Val extends PaymentElementBillingDetails> + implements $PaymentElementBillingDetailsCopyWith<$Res> { + _$PaymentElementBillingDetailsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -1776,130 +1824,133 @@ class _$BillingDetailsFieldsCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? email = null, - Object? phone = null, - Object? address = null, + Object? name = freezed, + Object? email = freezed, + Object? phone = freezed, + Object? address = freezed, }) { return _then(_value.copyWith( - name: null == name + name: freezed == name ? _value.name : name // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - email: null == email + as String?, + email: freezed == email ? _value.email : email // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - phone: null == phone + as String?, + phone: freezed == phone ? _value.phone : phone // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - address: null == address + as String?, + address: freezed == address ? _value.address : address // ignore: cast_nullable_to_non_nullable - as PaymentElementAddressFields, + as PaymentElementBillingDetailsAddress?, ) as $Val); } @override @pragma('vm:prefer-inline') - $PaymentElementAddressFieldsCopyWith<$Res> get address { - return $PaymentElementAddressFieldsCopyWith<$Res>(_value.address, (value) { + $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address { + if (_value.address == null) { + return null; + } + + return $PaymentElementBillingDetailsAddressCopyWith<$Res>(_value.address!, + (value) { return _then(_value.copyWith(address: value) as $Val); }); } } /// @nodoc -abstract class _$$BillingDetailsFieldsImplCopyWith<$Res> - implements $BillingDetailsFieldsCopyWith<$Res> { - factory _$$BillingDetailsFieldsImplCopyWith(_$BillingDetailsFieldsImpl value, - $Res Function(_$BillingDetailsFieldsImpl) then) = - __$$BillingDetailsFieldsImplCopyWithImpl<$Res>; +abstract class _$$PaymentElementBillingDetailsImplCopyWith<$Res> + implements $PaymentElementBillingDetailsCopyWith<$Res> { + factory _$$PaymentElementBillingDetailsImplCopyWith( + _$PaymentElementBillingDetailsImpl value, + $Res Function(_$PaymentElementBillingDetailsImpl) then) = + __$$PaymentElementBillingDetailsImplCopyWithImpl<$Res>; @override @useResult $Res call( - {PaymentElementFieldRequired name, - PaymentElementFieldRequired email, - PaymentElementFieldRequired phone, - PaymentElementAddressFields address}); + {String? name, + String? email, + String? phone, + PaymentElementBillingDetailsAddress? address}); @override - $PaymentElementAddressFieldsCopyWith<$Res> get address; + $PaymentElementBillingDetailsAddressCopyWith<$Res>? get address; } /// @nodoc -class __$$BillingDetailsFieldsImplCopyWithImpl<$Res> - extends _$BillingDetailsFieldsCopyWithImpl<$Res, _$BillingDetailsFieldsImpl> - implements _$$BillingDetailsFieldsImplCopyWith<$Res> { - __$$BillingDetailsFieldsImplCopyWithImpl(_$BillingDetailsFieldsImpl _value, - $Res Function(_$BillingDetailsFieldsImpl) _then) +class __$$PaymentElementBillingDetailsImplCopyWithImpl<$Res> + extends _$PaymentElementBillingDetailsCopyWithImpl<$Res, + _$PaymentElementBillingDetailsImpl> + implements _$$PaymentElementBillingDetailsImplCopyWith<$Res> { + __$$PaymentElementBillingDetailsImplCopyWithImpl( + _$PaymentElementBillingDetailsImpl _value, + $Res Function(_$PaymentElementBillingDetailsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? email = null, - Object? phone = null, - Object? address = null, + Object? name = freezed, + Object? email = freezed, + Object? phone = freezed, + Object? address = freezed, }) { - return _then(_$BillingDetailsFieldsImpl( - name: null == name + return _then(_$PaymentElementBillingDetailsImpl( + name: freezed == name ? _value.name : name // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - email: null == email + as String?, + email: freezed == email ? _value.email : email // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - phone: null == phone + as String?, + phone: freezed == phone ? _value.phone : phone // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - address: null == address + as String?, + address: freezed == address ? _value.address : address // ignore: cast_nullable_to_non_nullable - as PaymentElementAddressFields, + as PaymentElementBillingDetailsAddress?, )); } } /// @nodoc @JsonSerializable() -class _$BillingDetailsFieldsImpl implements _BillingDetailsFields { - const _$BillingDetailsFieldsImpl( - {this.name = PaymentElementFieldRequired.auto, - this.email = PaymentElementFieldRequired.auto, - this.phone = PaymentElementFieldRequired.auto, - this.address = PaymentElementAddressFields.auto}); +class _$PaymentElementBillingDetailsImpl + implements _PaymentElementBillingDetails { + const _$PaymentElementBillingDetailsImpl( + {this.name, this.email, this.phone, this.address}); - factory _$BillingDetailsFieldsImpl.fromJson(Map json) => - _$$BillingDetailsFieldsImplFromJson(json); + factory _$PaymentElementBillingDetailsImpl.fromJson( + Map json) => + _$$PaymentElementBillingDetailsImplFromJson(json); @override - @JsonKey() - final PaymentElementFieldRequired name; + final String? name; @override - @JsonKey() - final PaymentElementFieldRequired email; + final String? email; @override - @JsonKey() - final PaymentElementFieldRequired phone; + final String? phone; @override - @JsonKey() - final PaymentElementAddressFields address; + final PaymentElementBillingDetailsAddress? address; @override String toString() { - return 'BillingDetailsFields(name: $name, email: $email, phone: $phone, address: $address)'; + return 'PaymentElementBillingDetails(name: $name, email: $email, phone: $phone, address: $address)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BillingDetailsFieldsImpl && + other is _$PaymentElementBillingDetailsImpl && (identical(other.name, name) || other.name == name) && (identical(other.email, email) || other.email == email) && (identical(other.phone, phone) || other.phone == phone) && @@ -1913,86 +1964,3281 @@ class _$BillingDetailsFieldsImpl implements _BillingDetailsFields { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BillingDetailsFieldsImplCopyWith<_$BillingDetailsFieldsImpl> - get copyWith => - __$$BillingDetailsFieldsImplCopyWithImpl<_$BillingDetailsFieldsImpl>( - this, _$identity); + _$$PaymentElementBillingDetailsImplCopyWith< + _$PaymentElementBillingDetailsImpl> + get copyWith => __$$PaymentElementBillingDetailsImplCopyWithImpl< + _$PaymentElementBillingDetailsImpl>(this, _$identity); @override Map toJson() { - return _$$BillingDetailsFieldsImplToJson( + return _$$PaymentElementBillingDetailsImplToJson( this, ); } } -abstract class _BillingDetailsFields implements BillingDetailsFields { - const factory _BillingDetailsFields( - {final PaymentElementFieldRequired name, - final PaymentElementFieldRequired email, +abstract class _PaymentElementBillingDetails + implements PaymentElementBillingDetails { + const factory _PaymentElementBillingDetails( + {final String? name, + final String? email, + final String? phone, + final PaymentElementBillingDetailsAddress? address}) = + _$PaymentElementBillingDetailsImpl; + + factory _PaymentElementBillingDetails.fromJson(Map json) = + _$PaymentElementBillingDetailsImpl.fromJson; + + @override + String? get name; + @override + String? get email; + @override + String? get phone; + @override + PaymentElementBillingDetailsAddress? get address; + @override + @JsonKey(ignore: true) + _$$PaymentElementBillingDetailsImplCopyWith< + _$PaymentElementBillingDetailsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementBillingDetailsAddress + _$PaymentElementBillingDetailsAddressFromJson(Map json) { + return _PaymentElementBillingDetailsAddress.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementBillingDetailsAddress { + /// Address line 1 (e.g., street, PO Box, or company name). + String? get line1 => throw _privateConstructorUsedError; + + /// Address line 2 (e.g., apartment, suite, unit, or building). + String? get line2 => throw _privateConstructorUsedError; + + /// City, district, suburb, town, or village. + String? get city => throw _privateConstructorUsedError; + + /// State, county, province, or region. + String? get state => throw _privateConstructorUsedError; + + /// Two-letter country code (ISO 3166-1 alpha-2). + String? get country => throw _privateConstructorUsedError; + + /// ZIP or postal code. + @JsonKey(name: 'postal_code') + String? get postalCode => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementBillingDetailsAddressCopyWith< + PaymentElementBillingDetailsAddress> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementBillingDetailsAddressCopyWith<$Res> { + factory $PaymentElementBillingDetailsAddressCopyWith( + PaymentElementBillingDetailsAddress value, + $Res Function(PaymentElementBillingDetailsAddress) then) = + _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, + PaymentElementBillingDetailsAddress>; + @useResult + $Res call( + {String? line1, + String? line2, + String? city, + String? state, + String? country, + @JsonKey(name: 'postal_code') String? postalCode}); +} + +/// @nodoc +class _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, + $Val extends PaymentElementBillingDetailsAddress> + implements $PaymentElementBillingDetailsAddressCopyWith<$Res> { + _$PaymentElementBillingDetailsAddressCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? line1 = freezed, + Object? line2 = freezed, + Object? city = freezed, + Object? state = freezed, + Object? country = freezed, + Object? postalCode = freezed, + }) { + return _then(_value.copyWith( + line1: freezed == line1 + ? _value.line1 + : line1 // ignore: cast_nullable_to_non_nullable + as String?, + line2: freezed == line2 + ? _value.line2 + : line2 // ignore: cast_nullable_to_non_nullable + as String?, + city: freezed == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String?, + state: freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + country: freezed == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as String?, + postalCode: freezed == postalCode + ? _value.postalCode + : postalCode // ignore: cast_nullable_to_non_nullable + as String?, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res> + implements $PaymentElementBillingDetailsAddressCopyWith<$Res> { + factory _$$PaymentElementBillingDetailsAddressImplCopyWith( + _$PaymentElementBillingDetailsAddressImpl value, + $Res Function(_$PaymentElementBillingDetailsAddressImpl) then) = + __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String? line1, + String? line2, + String? city, + String? state, + String? country, + @JsonKey(name: 'postal_code') String? postalCode}); +} + +/// @nodoc +class __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res> + extends _$PaymentElementBillingDetailsAddressCopyWithImpl<$Res, + _$PaymentElementBillingDetailsAddressImpl> + implements _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res> { + __$$PaymentElementBillingDetailsAddressImplCopyWithImpl( + _$PaymentElementBillingDetailsAddressImpl _value, + $Res Function(_$PaymentElementBillingDetailsAddressImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? line1 = freezed, + Object? line2 = freezed, + Object? city = freezed, + Object? state = freezed, + Object? country = freezed, + Object? postalCode = freezed, + }) { + return _then(_$PaymentElementBillingDetailsAddressImpl( + line1: freezed == line1 + ? _value.line1 + : line1 // ignore: cast_nullable_to_non_nullable + as String?, + line2: freezed == line2 + ? _value.line2 + : line2 // ignore: cast_nullable_to_non_nullable + as String?, + city: freezed == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String?, + state: freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + country: freezed == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as String?, + postalCode: freezed == postalCode + ? _value.postalCode + : postalCode // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementBillingDetailsAddressImpl + implements _PaymentElementBillingDetailsAddress { + const _$PaymentElementBillingDetailsAddressImpl( + {this.line1, + this.line2, + this.city, + this.state, + this.country, + @JsonKey(name: 'postal_code') this.postalCode}); + + factory _$PaymentElementBillingDetailsAddressImpl.fromJson( + Map json) => + _$$PaymentElementBillingDetailsAddressImplFromJson(json); + + /// Address line 1 (e.g., street, PO Box, or company name). + @override + final String? line1; + + /// Address line 2 (e.g., apartment, suite, unit, or building). + @override + final String? line2; + + /// City, district, suburb, town, or village. + @override + final String? city; + + /// State, county, province, or region. + @override + final String? state; + + /// Two-letter country code (ISO 3166-1 alpha-2). + @override + final String? country; + + /// ZIP or postal code. + @override + @JsonKey(name: 'postal_code') + final String? postalCode; + + @override + String toString() { + return 'PaymentElementBillingDetailsAddress(line1: $line1, line2: $line2, city: $city, state: $state, country: $country, postalCode: $postalCode)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementBillingDetailsAddressImpl && + (identical(other.line1, line1) || other.line1 == line1) && + (identical(other.line2, line2) || other.line2 == line2) && + (identical(other.city, city) || other.city == city) && + (identical(other.state, state) || other.state == state) && + (identical(other.country, country) || other.country == country) && + (identical(other.postalCode, postalCode) || + other.postalCode == postalCode)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => + Object.hash(runtimeType, line1, line2, city, state, country, postalCode); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementBillingDetailsAddressImplCopyWith< + _$PaymentElementBillingDetailsAddressImpl> + get copyWith => __$$PaymentElementBillingDetailsAddressImplCopyWithImpl< + _$PaymentElementBillingDetailsAddressImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementBillingDetailsAddressImplToJson( + this, + ); + } +} + +abstract class _PaymentElementBillingDetailsAddress + implements PaymentElementBillingDetailsAddress { + const factory _PaymentElementBillingDetailsAddress( + {final String? line1, + final String? line2, + final String? city, + final String? state, + final String? country, + @JsonKey(name: 'postal_code') final String? postalCode}) = + _$PaymentElementBillingDetailsAddressImpl; + + factory _PaymentElementBillingDetailsAddress.fromJson( + Map json) = + _$PaymentElementBillingDetailsAddressImpl.fromJson; + + @override + + /// Address line 1 (e.g., street, PO Box, or company name). + String? get line1; + @override + + /// Address line 2 (e.g., apartment, suite, unit, or building). + String? get line2; + @override + + /// City, district, suburb, town, or village. + String? get city; + @override + + /// State, county, province, or region. + String? get state; + @override + + /// Two-letter country code (ISO 3166-1 alpha-2). + String? get country; + @override + + /// ZIP or postal code. + @JsonKey(name: 'postal_code') + String? get postalCode; + @override + @JsonKey(ignore: true) + _$$PaymentElementBillingDetailsAddressImplCopyWith< + _$PaymentElementBillingDetailsAddressImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementBusiness _$PaymentElementBusinessFromJson( + Map json) { + return _PaymentElementBusiness.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementBusiness { + String? get name => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementBusinessCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementBusinessCopyWith<$Res> { + factory $PaymentElementBusinessCopyWith(PaymentElementBusiness value, + $Res Function(PaymentElementBusiness) then) = + _$PaymentElementBusinessCopyWithImpl<$Res, PaymentElementBusiness>; + @useResult + $Res call({String? name}); +} + +/// @nodoc +class _$PaymentElementBusinessCopyWithImpl<$Res, + $Val extends PaymentElementBusiness> + implements $PaymentElementBusinessCopyWith<$Res> { + _$PaymentElementBusinessCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = freezed, + }) { + return _then(_value.copyWith( + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementBusinessImplCopyWith<$Res> + implements $PaymentElementBusinessCopyWith<$Res> { + factory _$$PaymentElementBusinessImplCopyWith( + _$PaymentElementBusinessImpl value, + $Res Function(_$PaymentElementBusinessImpl) then) = + __$$PaymentElementBusinessImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String? name}); +} + +/// @nodoc +class __$$PaymentElementBusinessImplCopyWithImpl<$Res> + extends _$PaymentElementBusinessCopyWithImpl<$Res, + _$PaymentElementBusinessImpl> + implements _$$PaymentElementBusinessImplCopyWith<$Res> { + __$$PaymentElementBusinessImplCopyWithImpl( + _$PaymentElementBusinessImpl _value, + $Res Function(_$PaymentElementBusinessImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = freezed, + }) { + return _then(_$PaymentElementBusinessImpl( + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementBusinessImpl implements _PaymentElementBusiness { + const _$PaymentElementBusinessImpl({this.name}); + + factory _$PaymentElementBusinessImpl.fromJson(Map json) => + _$$PaymentElementBusinessImplFromJson(json); + + @override + final String? name; + + @override + String toString() { + return 'PaymentElementBusiness(name: $name)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementBusinessImpl && + (identical(other.name, name) || other.name == name)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, name); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementBusinessImplCopyWith<_$PaymentElementBusinessImpl> + get copyWith => __$$PaymentElementBusinessImplCopyWithImpl< + _$PaymentElementBusinessImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementBusinessImplToJson( + this, + ); + } +} + +abstract class _PaymentElementBusiness implements PaymentElementBusiness { + const factory _PaymentElementBusiness({final String? name}) = + _$PaymentElementBusinessImpl; + + factory _PaymentElementBusiness.fromJson(Map json) = + _$PaymentElementBusinessImpl.fromJson; + + @override + String? get name; + @override + @JsonKey(ignore: true) + _$$PaymentElementBusinessImplCopyWith<_$PaymentElementBusinessImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementFields _$PaymentElementFieldsFromJson(Map json) { + return _PaymentElementFields.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementFields { + /// Specify never to avoid collecting all billing details in the + /// Payment Element. + /// If you would like to disable only certain billing details, + /// pass an BillingDetailsFields specifying which fields you would like + /// to disable collection for. + /// The default setting for each field is auto. + BillingDetailsFields get billingDetails => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementFieldsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementFieldsCopyWith<$Res> { + factory $PaymentElementFieldsCopyWith(PaymentElementFields value, + $Res Function(PaymentElementFields) then) = + _$PaymentElementFieldsCopyWithImpl<$Res, PaymentElementFields>; + @useResult + $Res call({BillingDetailsFields billingDetails}); + + $BillingDetailsFieldsCopyWith<$Res> get billingDetails; +} + +/// @nodoc +class _$PaymentElementFieldsCopyWithImpl<$Res, + $Val extends PaymentElementFields> + implements $PaymentElementFieldsCopyWith<$Res> { + _$PaymentElementFieldsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? billingDetails = null, + }) { + return _then(_value.copyWith( + billingDetails: null == billingDetails + ? _value.billingDetails + : billingDetails // ignore: cast_nullable_to_non_nullable + as BillingDetailsFields, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $BillingDetailsFieldsCopyWith<$Res> get billingDetails { + return $BillingDetailsFieldsCopyWith<$Res>(_value.billingDetails, (value) { + return _then(_value.copyWith(billingDetails: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PaymentElementFieldsImplCopyWith<$Res> + implements $PaymentElementFieldsCopyWith<$Res> { + factory _$$PaymentElementFieldsImplCopyWith(_$PaymentElementFieldsImpl value, + $Res Function(_$PaymentElementFieldsImpl) then) = + __$$PaymentElementFieldsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({BillingDetailsFields billingDetails}); + + @override + $BillingDetailsFieldsCopyWith<$Res> get billingDetails; +} + +/// @nodoc +class __$$PaymentElementFieldsImplCopyWithImpl<$Res> + extends _$PaymentElementFieldsCopyWithImpl<$Res, _$PaymentElementFieldsImpl> + implements _$$PaymentElementFieldsImplCopyWith<$Res> { + __$$PaymentElementFieldsImplCopyWithImpl(_$PaymentElementFieldsImpl _value, + $Res Function(_$PaymentElementFieldsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? billingDetails = null, + }) { + return _then(_$PaymentElementFieldsImpl( + billingDetails: null == billingDetails + ? _value.billingDetails + : billingDetails // ignore: cast_nullable_to_non_nullable + as BillingDetailsFields, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementFieldsImpl implements _PaymentElementFields { + const _$PaymentElementFieldsImpl( + {this.billingDetails = BillingDetailsFields.auto}); + + factory _$PaymentElementFieldsImpl.fromJson(Map json) => + _$$PaymentElementFieldsImplFromJson(json); + + /// Specify never to avoid collecting all billing details in the + /// Payment Element. + /// If you would like to disable only certain billing details, + /// pass an BillingDetailsFields specifying which fields you would like + /// to disable collection for. + /// The default setting for each field is auto. + @override + @JsonKey() + final BillingDetailsFields billingDetails; + + @override + String toString() { + return 'PaymentElementFields(billingDetails: $billingDetails)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementFieldsImpl && + (identical(other.billingDetails, billingDetails) || + other.billingDetails == billingDetails)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, billingDetails); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementFieldsImplCopyWith<_$PaymentElementFieldsImpl> + get copyWith => + __$$PaymentElementFieldsImplCopyWithImpl<_$PaymentElementFieldsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementFieldsImplToJson( + this, + ); + } +} + +abstract class _PaymentElementFields implements PaymentElementFields { + const factory _PaymentElementFields( + {final BillingDetailsFields billingDetails}) = _$PaymentElementFieldsImpl; + + factory _PaymentElementFields.fromJson(Map json) = + _$PaymentElementFieldsImpl.fromJson; + + @override + + /// Specify never to avoid collecting all billing details in the + /// Payment Element. + /// If you would like to disable only certain billing details, + /// pass an BillingDetailsFields specifying which fields you would like + /// to disable collection for. + /// The default setting for each field is auto. + BillingDetailsFields get billingDetails; + @override + @JsonKey(ignore: true) + _$$PaymentElementFieldsImplCopyWith<_$PaymentElementFieldsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +BillingDetailsFields _$BillingDetailsFieldsFromJson(Map json) { + return _BillingDetailsFields.fromJson(json); +} + +/// @nodoc +mixin _$BillingDetailsFields { + PaymentElementFieldRequired get name => throw _privateConstructorUsedError; + PaymentElementFieldRequired get email => throw _privateConstructorUsedError; + PaymentElementFieldRequired get phone => throw _privateConstructorUsedError; + PaymentElementAddressFields get address => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $BillingDetailsFieldsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $BillingDetailsFieldsCopyWith<$Res> { + factory $BillingDetailsFieldsCopyWith(BillingDetailsFields value, + $Res Function(BillingDetailsFields) then) = + _$BillingDetailsFieldsCopyWithImpl<$Res, BillingDetailsFields>; + @useResult + $Res call( + {PaymentElementFieldRequired name, + PaymentElementFieldRequired email, + PaymentElementFieldRequired phone, + PaymentElementAddressFields address}); + + $PaymentElementAddressFieldsCopyWith<$Res> get address; +} + +/// @nodoc +class _$BillingDetailsFieldsCopyWithImpl<$Res, + $Val extends BillingDetailsFields> + implements $BillingDetailsFieldsCopyWith<$Res> { + _$BillingDetailsFieldsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? email = null, + Object? phone = null, + Object? address = null, + }) { + return _then(_value.copyWith( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + email: null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + phone: null == phone + ? _value.phone + : phone // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + address: null == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as PaymentElementAddressFields, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementAddressFieldsCopyWith<$Res> get address { + return $PaymentElementAddressFieldsCopyWith<$Res>(_value.address, (value) { + return _then(_value.copyWith(address: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$BillingDetailsFieldsImplCopyWith<$Res> + implements $BillingDetailsFieldsCopyWith<$Res> { + factory _$$BillingDetailsFieldsImplCopyWith(_$BillingDetailsFieldsImpl value, + $Res Function(_$BillingDetailsFieldsImpl) then) = + __$$BillingDetailsFieldsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {PaymentElementFieldRequired name, + PaymentElementFieldRequired email, + PaymentElementFieldRequired phone, + PaymentElementAddressFields address}); + + @override + $PaymentElementAddressFieldsCopyWith<$Res> get address; +} + +/// @nodoc +class __$$BillingDetailsFieldsImplCopyWithImpl<$Res> + extends _$BillingDetailsFieldsCopyWithImpl<$Res, _$BillingDetailsFieldsImpl> + implements _$$BillingDetailsFieldsImplCopyWith<$Res> { + __$$BillingDetailsFieldsImplCopyWithImpl(_$BillingDetailsFieldsImpl _value, + $Res Function(_$BillingDetailsFieldsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? email = null, + Object? phone = null, + Object? address = null, + }) { + return _then(_$BillingDetailsFieldsImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + email: null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + phone: null == phone + ? _value.phone + : phone // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + address: null == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as PaymentElementAddressFields, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$BillingDetailsFieldsImpl implements _BillingDetailsFields { + const _$BillingDetailsFieldsImpl( + {this.name = PaymentElementFieldRequired.auto, + this.email = PaymentElementFieldRequired.auto, + this.phone = PaymentElementFieldRequired.auto, + this.address = PaymentElementAddressFields.auto}); + + factory _$BillingDetailsFieldsImpl.fromJson(Map json) => + _$$BillingDetailsFieldsImplFromJson(json); + + @override + @JsonKey() + final PaymentElementFieldRequired name; + @override + @JsonKey() + final PaymentElementFieldRequired email; + @override + @JsonKey() + final PaymentElementFieldRequired phone; + @override + @JsonKey() + final PaymentElementAddressFields address; + + @override + String toString() { + return 'BillingDetailsFields(name: $name, email: $email, phone: $phone, address: $address)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BillingDetailsFieldsImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.email, email) || other.email == email) && + (identical(other.phone, phone) || other.phone == phone) && + (identical(other.address, address) || other.address == address)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, name, email, phone, address); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BillingDetailsFieldsImplCopyWith<_$BillingDetailsFieldsImpl> + get copyWith => + __$$BillingDetailsFieldsImplCopyWithImpl<_$BillingDetailsFieldsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$BillingDetailsFieldsImplToJson( + this, + ); + } +} + +abstract class _BillingDetailsFields implements BillingDetailsFields { + const factory _BillingDetailsFields( + {final PaymentElementFieldRequired name, + final PaymentElementFieldRequired email, final PaymentElementFieldRequired phone, final PaymentElementAddressFields address}) = _$BillingDetailsFieldsImpl; - factory _BillingDetailsFields.fromJson(Map json) = - _$BillingDetailsFieldsImpl.fromJson; + factory _BillingDetailsFields.fromJson(Map json) = + _$BillingDetailsFieldsImpl.fromJson; + + @override + PaymentElementFieldRequired get name; + @override + PaymentElementFieldRequired get email; + @override + PaymentElementFieldRequired get phone; + @override + PaymentElementAddressFields get address; + @override + @JsonKey(ignore: true) + _$$BillingDetailsFieldsImplCopyWith<_$BillingDetailsFieldsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementAddressFields _$PaymentElementAddressFieldsFromJson( + Map json) { + return _PaymentElementAddressFields.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementAddressFields { + PaymentElementFieldRequired get line1 => throw _privateConstructorUsedError; + PaymentElementFieldRequired get line2 => throw _privateConstructorUsedError; + PaymentElementFieldRequired get city => throw _privateConstructorUsedError; + PaymentElementFieldRequired get state => throw _privateConstructorUsedError; + PaymentElementFieldRequired get country => throw _privateConstructorUsedError; + PaymentElementFieldRequired get postalCode => + throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementAddressFieldsCopyWith + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementAddressFieldsCopyWith<$Res> { + factory $PaymentElementAddressFieldsCopyWith( + PaymentElementAddressFields value, + $Res Function(PaymentElementAddressFields) then) = + _$PaymentElementAddressFieldsCopyWithImpl<$Res, + PaymentElementAddressFields>; + @useResult + $Res call( + {PaymentElementFieldRequired line1, + PaymentElementFieldRequired line2, + PaymentElementFieldRequired city, + PaymentElementFieldRequired state, + PaymentElementFieldRequired country, + PaymentElementFieldRequired postalCode}); +} + +/// @nodoc +class _$PaymentElementAddressFieldsCopyWithImpl<$Res, + $Val extends PaymentElementAddressFields> + implements $PaymentElementAddressFieldsCopyWith<$Res> { + _$PaymentElementAddressFieldsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? line1 = null, + Object? line2 = null, + Object? city = null, + Object? state = null, + Object? country = null, + Object? postalCode = null, + }) { + return _then(_value.copyWith( + line1: null == line1 + ? _value.line1 + : line1 // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + line2: null == line2 + ? _value.line2 + : line2 // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + city: null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + state: null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + country: null == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + postalCode: null == postalCode + ? _value.postalCode + : postalCode // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementAddressFieldsImplCopyWith<$Res> + implements $PaymentElementAddressFieldsCopyWith<$Res> { + factory _$$PaymentElementAddressFieldsImplCopyWith( + _$PaymentElementAddressFieldsImpl value, + $Res Function(_$PaymentElementAddressFieldsImpl) then) = + __$$PaymentElementAddressFieldsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {PaymentElementFieldRequired line1, + PaymentElementFieldRequired line2, + PaymentElementFieldRequired city, + PaymentElementFieldRequired state, + PaymentElementFieldRequired country, + PaymentElementFieldRequired postalCode}); +} + +/// @nodoc +class __$$PaymentElementAddressFieldsImplCopyWithImpl<$Res> + extends _$PaymentElementAddressFieldsCopyWithImpl<$Res, + _$PaymentElementAddressFieldsImpl> + implements _$$PaymentElementAddressFieldsImplCopyWith<$Res> { + __$$PaymentElementAddressFieldsImplCopyWithImpl( + _$PaymentElementAddressFieldsImpl _value, + $Res Function(_$PaymentElementAddressFieldsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? line1 = null, + Object? line2 = null, + Object? city = null, + Object? state = null, + Object? country = null, + Object? postalCode = null, + }) { + return _then(_$PaymentElementAddressFieldsImpl( + line1: null == line1 + ? _value.line1 + : line1 // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + line2: null == line2 + ? _value.line2 + : line2 // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + city: null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + state: null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + country: null == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + postalCode: null == postalCode + ? _value.postalCode + : postalCode // ignore: cast_nullable_to_non_nullable + as PaymentElementFieldRequired, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementAddressFieldsImpl + implements _PaymentElementAddressFields { + const _$PaymentElementAddressFieldsImpl( + {this.line1 = PaymentElementFieldRequired.auto, + this.line2 = PaymentElementFieldRequired.auto, + this.city = PaymentElementFieldRequired.auto, + this.state = PaymentElementFieldRequired.auto, + this.country = PaymentElementFieldRequired.auto, + this.postalCode = PaymentElementFieldRequired.auto}); + + factory _$PaymentElementAddressFieldsImpl.fromJson( + Map json) => + _$$PaymentElementAddressFieldsImplFromJson(json); + + @override + @JsonKey() + final PaymentElementFieldRequired line1; + @override + @JsonKey() + final PaymentElementFieldRequired line2; + @override + @JsonKey() + final PaymentElementFieldRequired city; + @override + @JsonKey() + final PaymentElementFieldRequired state; + @override + @JsonKey() + final PaymentElementFieldRequired country; + @override + @JsonKey() + final PaymentElementFieldRequired postalCode; + + @override + String toString() { + return 'PaymentElementAddressFields(line1: $line1, line2: $line2, city: $city, state: $state, country: $country, postalCode: $postalCode)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementAddressFieldsImpl && + (identical(other.line1, line1) || other.line1 == line1) && + (identical(other.line2, line2) || other.line2 == line2) && + (identical(other.city, city) || other.city == city) && + (identical(other.state, state) || other.state == state) && + (identical(other.country, country) || other.country == country) && + (identical(other.postalCode, postalCode) || + other.postalCode == postalCode)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => + Object.hash(runtimeType, line1, line2, city, state, country, postalCode); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementAddressFieldsImplCopyWith<_$PaymentElementAddressFieldsImpl> + get copyWith => __$$PaymentElementAddressFieldsImplCopyWithImpl< + _$PaymentElementAddressFieldsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementAddressFieldsImplToJson( + this, + ); + } +} + +abstract class _PaymentElementAddressFields + implements PaymentElementAddressFields { + const factory _PaymentElementAddressFields( + {final PaymentElementFieldRequired line1, + final PaymentElementFieldRequired line2, + final PaymentElementFieldRequired city, + final PaymentElementFieldRequired state, + final PaymentElementFieldRequired country, + final PaymentElementFieldRequired postalCode}) = + _$PaymentElementAddressFieldsImpl; + + factory _PaymentElementAddressFields.fromJson(Map json) = + _$PaymentElementAddressFieldsImpl.fromJson; + + @override + PaymentElementFieldRequired get line1; + @override + PaymentElementFieldRequired get line2; + @override + PaymentElementFieldRequired get city; + @override + PaymentElementFieldRequired get state; + @override + PaymentElementFieldRequired get country; + @override + PaymentElementFieldRequired get postalCode; + @override + @JsonKey(ignore: true) + _$$PaymentElementAddressFieldsImplCopyWith<_$PaymentElementAddressFieldsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementOptionsTerms _$PaymentElementOptionsTermsFromJson( + Map json) { + return _PaymentElementOptionsTerms.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementOptionsTerms { + /// Terms for apple pay + PaymentElementShowTerms? get applePay => throw _privateConstructorUsedError; + + /// Terms for aubecs debit + PaymentElementShowTerms? get auBecsDebit => + throw _privateConstructorUsedError; + + /// Terms for bancontact + PaymentElementShowTerms? get bancontact => throw _privateConstructorUsedError; + + /// Terms for card + PaymentElementShowTerms? get card => throw _privateConstructorUsedError; + + /// Terms for cashapp + PaymentElementShowTerms? get cashApp => throw _privateConstructorUsedError; + + /// Terms for googlePay + PaymentElementShowTerms? get googlePay => throw _privateConstructorUsedError; + + /// Terms for ideal + PaymentElementShowTerms? get ideal => throw _privateConstructorUsedError; + + /// Terms for paypal + PaymentElementShowTerms? get payPal => throw _privateConstructorUsedError; + + /// Terms for sepa debit + PaymentElementShowTerms? get sepaDebit => throw _privateConstructorUsedError; + + /// Terms for sofort + PaymentElementShowTerms? get sofort => throw _privateConstructorUsedError; + + /// Terms for usBankAccount + PaymentElementShowTerms? get usBankAccount => + throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementOptionsTermsCopyWith + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementOptionsTermsCopyWith<$Res> { + factory $PaymentElementOptionsTermsCopyWith(PaymentElementOptionsTerms value, + $Res Function(PaymentElementOptionsTerms) then) = + _$PaymentElementOptionsTermsCopyWithImpl<$Res, + PaymentElementOptionsTerms>; + @useResult + $Res call( + {PaymentElementShowTerms? applePay, + PaymentElementShowTerms? auBecsDebit, + PaymentElementShowTerms? bancontact, + PaymentElementShowTerms? card, + PaymentElementShowTerms? cashApp, + PaymentElementShowTerms? googlePay, + PaymentElementShowTerms? ideal, + PaymentElementShowTerms? payPal, + PaymentElementShowTerms? sepaDebit, + PaymentElementShowTerms? sofort, + PaymentElementShowTerms? usBankAccount}); +} + +/// @nodoc +class _$PaymentElementOptionsTermsCopyWithImpl<$Res, + $Val extends PaymentElementOptionsTerms> + implements $PaymentElementOptionsTermsCopyWith<$Res> { + _$PaymentElementOptionsTermsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? applePay = freezed, + Object? auBecsDebit = freezed, + Object? bancontact = freezed, + Object? card = freezed, + Object? cashApp = freezed, + Object? googlePay = freezed, + Object? ideal = freezed, + Object? payPal = freezed, + Object? sepaDebit = freezed, + Object? sofort = freezed, + Object? usBankAccount = freezed, + }) { + return _then(_value.copyWith( + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + auBecsDebit: freezed == auBecsDebit + ? _value.auBecsDebit + : auBecsDebit // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + bancontact: freezed == bancontact + ? _value.bancontact + : bancontact // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + card: freezed == card + ? _value.card + : card // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + cashApp: freezed == cashApp + ? _value.cashApp + : cashApp // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + googlePay: freezed == googlePay + ? _value.googlePay + : googlePay // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + ideal: freezed == ideal + ? _value.ideal + : ideal // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + payPal: freezed == payPal + ? _value.payPal + : payPal // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + sepaDebit: freezed == sepaDebit + ? _value.sepaDebit + : sepaDebit // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + sofort: freezed == sofort + ? _value.sofort + : sofort // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + usBankAccount: freezed == usBankAccount + ? _value.usBankAccount + : usBankAccount // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementOptionsTermsImplCopyWith<$Res> + implements $PaymentElementOptionsTermsCopyWith<$Res> { + factory _$$PaymentElementOptionsTermsImplCopyWith( + _$PaymentElementOptionsTermsImpl value, + $Res Function(_$PaymentElementOptionsTermsImpl) then) = + __$$PaymentElementOptionsTermsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {PaymentElementShowTerms? applePay, + PaymentElementShowTerms? auBecsDebit, + PaymentElementShowTerms? bancontact, + PaymentElementShowTerms? card, + PaymentElementShowTerms? cashApp, + PaymentElementShowTerms? googlePay, + PaymentElementShowTerms? ideal, + PaymentElementShowTerms? payPal, + PaymentElementShowTerms? sepaDebit, + PaymentElementShowTerms? sofort, + PaymentElementShowTerms? usBankAccount}); +} + +/// @nodoc +class __$$PaymentElementOptionsTermsImplCopyWithImpl<$Res> + extends _$PaymentElementOptionsTermsCopyWithImpl<$Res, + _$PaymentElementOptionsTermsImpl> + implements _$$PaymentElementOptionsTermsImplCopyWith<$Res> { + __$$PaymentElementOptionsTermsImplCopyWithImpl( + _$PaymentElementOptionsTermsImpl _value, + $Res Function(_$PaymentElementOptionsTermsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? applePay = freezed, + Object? auBecsDebit = freezed, + Object? bancontact = freezed, + Object? card = freezed, + Object? cashApp = freezed, + Object? googlePay = freezed, + Object? ideal = freezed, + Object? payPal = freezed, + Object? sepaDebit = freezed, + Object? sofort = freezed, + Object? usBankAccount = freezed, + }) { + return _then(_$PaymentElementOptionsTermsImpl( + applePay: freezed == applePay + ? _value.applePay + : applePay // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + auBecsDebit: freezed == auBecsDebit + ? _value.auBecsDebit + : auBecsDebit // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + bancontact: freezed == bancontact + ? _value.bancontact + : bancontact // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + card: freezed == card + ? _value.card + : card // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + cashApp: freezed == cashApp + ? _value.cashApp + : cashApp // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + googlePay: freezed == googlePay + ? _value.googlePay + : googlePay // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + ideal: freezed == ideal + ? _value.ideal + : ideal // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + payPal: freezed == payPal + ? _value.payPal + : payPal // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + sepaDebit: freezed == sepaDebit + ? _value.sepaDebit + : sepaDebit // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + sofort: freezed == sofort + ? _value.sofort + : sofort // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + usBankAccount: freezed == usBankAccount + ? _value.usBankAccount + : usBankAccount // ignore: cast_nullable_to_non_nullable + as PaymentElementShowTerms?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementOptionsTermsImpl implements _PaymentElementOptionsTerms { + const _$PaymentElementOptionsTermsImpl( + {this.applePay, + this.auBecsDebit, + this.bancontact, + this.card, + this.cashApp, + this.googlePay, + this.ideal, + this.payPal, + this.sepaDebit, + this.sofort, + this.usBankAccount}); + + factory _$PaymentElementOptionsTermsImpl.fromJson( + Map json) => + _$$PaymentElementOptionsTermsImplFromJson(json); + + /// Terms for apple pay + @override + final PaymentElementShowTerms? applePay; + + /// Terms for aubecs debit + @override + final PaymentElementShowTerms? auBecsDebit; + + /// Terms for bancontact + @override + final PaymentElementShowTerms? bancontact; + + /// Terms for card + @override + final PaymentElementShowTerms? card; + + /// Terms for cashapp + @override + final PaymentElementShowTerms? cashApp; + + /// Terms for googlePay + @override + final PaymentElementShowTerms? googlePay; + + /// Terms for ideal + @override + final PaymentElementShowTerms? ideal; + + /// Terms for paypal + @override + final PaymentElementShowTerms? payPal; + + /// Terms for sepa debit + @override + final PaymentElementShowTerms? sepaDebit; + + /// Terms for sofort + @override + final PaymentElementShowTerms? sofort; + + /// Terms for usBankAccount + @override + final PaymentElementShowTerms? usBankAccount; + + @override + String toString() { + return 'PaymentElementOptionsTerms(applePay: $applePay, auBecsDebit: $auBecsDebit, bancontact: $bancontact, card: $card, cashApp: $cashApp, googlePay: $googlePay, ideal: $ideal, payPal: $payPal, sepaDebit: $sepaDebit, sofort: $sofort, usBankAccount: $usBankAccount)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementOptionsTermsImpl && + (identical(other.applePay, applePay) || + other.applePay == applePay) && + (identical(other.auBecsDebit, auBecsDebit) || + other.auBecsDebit == auBecsDebit) && + (identical(other.bancontact, bancontact) || + other.bancontact == bancontact) && + (identical(other.card, card) || other.card == card) && + (identical(other.cashApp, cashApp) || other.cashApp == cashApp) && + (identical(other.googlePay, googlePay) || + other.googlePay == googlePay) && + (identical(other.ideal, ideal) || other.ideal == ideal) && + (identical(other.payPal, payPal) || other.payPal == payPal) && + (identical(other.sepaDebit, sepaDebit) || + other.sepaDebit == sepaDebit) && + (identical(other.sofort, sofort) || other.sofort == sofort) && + (identical(other.usBankAccount, usBankAccount) || + other.usBankAccount == usBankAccount)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash( + runtimeType, + applePay, + auBecsDebit, + bancontact, + card, + cashApp, + googlePay, + ideal, + payPal, + sepaDebit, + sofort, + usBankAccount); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementOptionsTermsImplCopyWith<_$PaymentElementOptionsTermsImpl> + get copyWith => __$$PaymentElementOptionsTermsImplCopyWithImpl< + _$PaymentElementOptionsTermsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementOptionsTermsImplToJson( + this, + ); + } +} + +abstract class _PaymentElementOptionsTerms + implements PaymentElementOptionsTerms { + const factory _PaymentElementOptionsTerms( + {final PaymentElementShowTerms? applePay, + final PaymentElementShowTerms? auBecsDebit, + final PaymentElementShowTerms? bancontact, + final PaymentElementShowTerms? card, + final PaymentElementShowTerms? cashApp, + final PaymentElementShowTerms? googlePay, + final PaymentElementShowTerms? ideal, + final PaymentElementShowTerms? payPal, + final PaymentElementShowTerms? sepaDebit, + final PaymentElementShowTerms? sofort, + final PaymentElementShowTerms? usBankAccount}) = + _$PaymentElementOptionsTermsImpl; + + factory _PaymentElementOptionsTerms.fromJson(Map json) = + _$PaymentElementOptionsTermsImpl.fromJson; + + @override + + /// Terms for apple pay + PaymentElementShowTerms? get applePay; + @override + + /// Terms for aubecs debit + PaymentElementShowTerms? get auBecsDebit; + @override + + /// Terms for bancontact + PaymentElementShowTerms? get bancontact; + @override + + /// Terms for card + PaymentElementShowTerms? get card; + @override + + /// Terms for cashapp + PaymentElementShowTerms? get cashApp; + @override + + /// Terms for googlePay + PaymentElementShowTerms? get googlePay; + @override + + /// Terms for ideal + PaymentElementShowTerms? get ideal; + @override + + /// Terms for paypal + PaymentElementShowTerms? get payPal; + @override + + /// Terms for sepa debit + PaymentElementShowTerms? get sepaDebit; + @override + + /// Terms for sofort + PaymentElementShowTerms? get sofort; + @override + + /// Terms for usBankAccount + PaymentElementShowTerms? get usBankAccount; + @override + @JsonKey(ignore: true) + _$$PaymentElementOptionsTermsImplCopyWith<_$PaymentElementOptionsTermsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementApplePayOptions _$PaymentElementApplePayOptionsFromJson( + Map json) { + return _PaymentElementApplePayOptions.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementApplePayOptions { + /// Information about a recurring payment with ApplePay + PaymentElementAppleRecurringRequest? get recurringPaymentRequest => + throw _privateConstructorUsedError; + + /// Information about a deferred payment with ApplePay + PaymentElementApplePayDeferredPaymentRequest? get deferredPaymentRequest => + throw _privateConstructorUsedError; + + /// Information about an auto reload payment with ApplePay + PaymentElementApplePayAutoReloadPaymentRequest? + get automaticReloadPaymentRequest => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementApplePayOptionsCopyWith + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementApplePayOptionsCopyWith<$Res> { + factory $PaymentElementApplePayOptionsCopyWith( + PaymentElementApplePayOptions value, + $Res Function(PaymentElementApplePayOptions) then) = + _$PaymentElementApplePayOptionsCopyWithImpl<$Res, + PaymentElementApplePayOptions>; + @useResult + $Res call( + {PaymentElementAppleRecurringRequest? recurringPaymentRequest, + PaymentElementApplePayDeferredPaymentRequest? deferredPaymentRequest, + PaymentElementApplePayAutoReloadPaymentRequest? + automaticReloadPaymentRequest}); + + $PaymentElementAppleRecurringRequestCopyWith<$Res>? + get recurringPaymentRequest; + $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res>? + get deferredPaymentRequest; + $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res>? + get automaticReloadPaymentRequest; +} + +/// @nodoc +class _$PaymentElementApplePayOptionsCopyWithImpl<$Res, + $Val extends PaymentElementApplePayOptions> + implements $PaymentElementApplePayOptionsCopyWith<$Res> { + _$PaymentElementApplePayOptionsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? recurringPaymentRequest = freezed, + Object? deferredPaymentRequest = freezed, + Object? automaticReloadPaymentRequest = freezed, + }) { + return _then(_value.copyWith( + recurringPaymentRequest: freezed == recurringPaymentRequest + ? _value.recurringPaymentRequest + : recurringPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementAppleRecurringRequest?, + deferredPaymentRequest: freezed == deferredPaymentRequest + ? _value.deferredPaymentRequest + : deferredPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayDeferredPaymentRequest?, + automaticReloadPaymentRequest: freezed == automaticReloadPaymentRequest + ? _value.automaticReloadPaymentRequest + : automaticReloadPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayAutoReloadPaymentRequest?, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementAppleRecurringRequestCopyWith<$Res>? + get recurringPaymentRequest { + if (_value.recurringPaymentRequest == null) { + return null; + } + + return $PaymentElementAppleRecurringRequestCopyWith<$Res>( + _value.recurringPaymentRequest!, (value) { + return _then(_value.copyWith(recurringPaymentRequest: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res>? + get deferredPaymentRequest { + if (_value.deferredPaymentRequest == null) { + return null; + } + + return $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res>( + _value.deferredPaymentRequest!, (value) { + return _then(_value.copyWith(deferredPaymentRequest: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res>? + get automaticReloadPaymentRequest { + if (_value.automaticReloadPaymentRequest == null) { + return null; + } + + return $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res>( + _value.automaticReloadPaymentRequest!, (value) { + return _then( + _value.copyWith(automaticReloadPaymentRequest: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PaymentElementApplePayOptionsImplCopyWith<$Res> + implements $PaymentElementApplePayOptionsCopyWith<$Res> { + factory _$$PaymentElementApplePayOptionsImplCopyWith( + _$PaymentElementApplePayOptionsImpl value, + $Res Function(_$PaymentElementApplePayOptionsImpl) then) = + __$$PaymentElementApplePayOptionsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {PaymentElementAppleRecurringRequest? recurringPaymentRequest, + PaymentElementApplePayDeferredPaymentRequest? deferredPaymentRequest, + PaymentElementApplePayAutoReloadPaymentRequest? + automaticReloadPaymentRequest}); + + @override + $PaymentElementAppleRecurringRequestCopyWith<$Res>? + get recurringPaymentRequest; + @override + $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res>? + get deferredPaymentRequest; + @override + $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res>? + get automaticReloadPaymentRequest; +} + +/// @nodoc +class __$$PaymentElementApplePayOptionsImplCopyWithImpl<$Res> + extends _$PaymentElementApplePayOptionsCopyWithImpl<$Res, + _$PaymentElementApplePayOptionsImpl> + implements _$$PaymentElementApplePayOptionsImplCopyWith<$Res> { + __$$PaymentElementApplePayOptionsImplCopyWithImpl( + _$PaymentElementApplePayOptionsImpl _value, + $Res Function(_$PaymentElementApplePayOptionsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? recurringPaymentRequest = freezed, + Object? deferredPaymentRequest = freezed, + Object? automaticReloadPaymentRequest = freezed, + }) { + return _then(_$PaymentElementApplePayOptionsImpl( + recurringPaymentRequest: freezed == recurringPaymentRequest + ? _value.recurringPaymentRequest + : recurringPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementAppleRecurringRequest?, + deferredPaymentRequest: freezed == deferredPaymentRequest + ? _value.deferredPaymentRequest + : deferredPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayDeferredPaymentRequest?, + automaticReloadPaymentRequest: freezed == automaticReloadPaymentRequest + ? _value.automaticReloadPaymentRequest + : automaticReloadPaymentRequest // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayAutoReloadPaymentRequest?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementApplePayOptionsImpl + implements _PaymentElementApplePayOptions { + const _$PaymentElementApplePayOptionsImpl( + {this.recurringPaymentRequest, + this.deferredPaymentRequest, + this.automaticReloadPaymentRequest}); + + factory _$PaymentElementApplePayOptionsImpl.fromJson( + Map json) => + _$$PaymentElementApplePayOptionsImplFromJson(json); + + /// Information about a recurring payment with ApplePay + @override + final PaymentElementAppleRecurringRequest? recurringPaymentRequest; + + /// Information about a deferred payment with ApplePay + @override + final PaymentElementApplePayDeferredPaymentRequest? deferredPaymentRequest; + + /// Information about an auto reload payment with ApplePay + @override + final PaymentElementApplePayAutoReloadPaymentRequest? + automaticReloadPaymentRequest; + + @override + String toString() { + return 'PaymentElementApplePayOptions(recurringPaymentRequest: $recurringPaymentRequest, deferredPaymentRequest: $deferredPaymentRequest, automaticReloadPaymentRequest: $automaticReloadPaymentRequest)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementApplePayOptionsImpl && + (identical( + other.recurringPaymentRequest, recurringPaymentRequest) || + other.recurringPaymentRequest == recurringPaymentRequest) && + (identical(other.deferredPaymentRequest, deferredPaymentRequest) || + other.deferredPaymentRequest == deferredPaymentRequest) && + (identical(other.automaticReloadPaymentRequest, + automaticReloadPaymentRequest) || + other.automaticReloadPaymentRequest == + automaticReloadPaymentRequest)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, recurringPaymentRequest, + deferredPaymentRequest, automaticReloadPaymentRequest); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementApplePayOptionsImplCopyWith< + _$PaymentElementApplePayOptionsImpl> + get copyWith => __$$PaymentElementApplePayOptionsImplCopyWithImpl< + _$PaymentElementApplePayOptionsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementApplePayOptionsImplToJson( + this, + ); + } +} + +abstract class _PaymentElementApplePayOptions + implements PaymentElementApplePayOptions { + const factory _PaymentElementApplePayOptions( + {final PaymentElementAppleRecurringRequest? recurringPaymentRequest, + final PaymentElementApplePayDeferredPaymentRequest? + deferredPaymentRequest, + final PaymentElementApplePayAutoReloadPaymentRequest? + automaticReloadPaymentRequest}) = _$PaymentElementApplePayOptionsImpl; + + factory _PaymentElementApplePayOptions.fromJson(Map json) = + _$PaymentElementApplePayOptionsImpl.fromJson; + + @override + + /// Information about a recurring payment with ApplePay + PaymentElementAppleRecurringRequest? get recurringPaymentRequest; + @override + + /// Information about a deferred payment with ApplePay + PaymentElementApplePayDeferredPaymentRequest? get deferredPaymentRequest; + @override + + /// Information about an auto reload payment with ApplePay + PaymentElementApplePayAutoReloadPaymentRequest? + get automaticReloadPaymentRequest; + @override + @JsonKey(ignore: true) + _$$PaymentElementApplePayOptionsImplCopyWith< + _$PaymentElementApplePayOptionsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementAppleRecurringRequest + _$PaymentElementAppleRecurringRequestFromJson(Map json) { + return _PaymentElementAppleRecurringRequest.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementAppleRecurringRequest { + /// The description of the payment + String get paymentDescription => throw _privateConstructorUsedError; + + /// Management url + String get managementUrl => throw _privateConstructorUsedError; + + /// Information in case of a trial billing + PaymentElementRecurringPaymentProperties? get trialBilling => + throw _privateConstructorUsedError; + + /// Information in case of a regular billing + PaymentElementRecurringPaymentProperties? get regularBilling => + throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementAppleRecurringRequestCopyWith< + PaymentElementAppleRecurringRequest> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementAppleRecurringRequestCopyWith<$Res> { + factory $PaymentElementAppleRecurringRequestCopyWith( + PaymentElementAppleRecurringRequest value, + $Res Function(PaymentElementAppleRecurringRequest) then) = + _$PaymentElementAppleRecurringRequestCopyWithImpl<$Res, + PaymentElementAppleRecurringRequest>; + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + PaymentElementRecurringPaymentProperties? trialBilling, + PaymentElementRecurringPaymentProperties? regularBilling}); + + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get trialBilling; + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get regularBilling; +} + +/// @nodoc +class _$PaymentElementAppleRecurringRequestCopyWithImpl<$Res, + $Val extends PaymentElementAppleRecurringRequest> + implements $PaymentElementAppleRecurringRequestCopyWith<$Res> { + _$PaymentElementAppleRecurringRequestCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? trialBilling = freezed, + Object? regularBilling = freezed, + }) { + return _then(_value.copyWith( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + trialBilling: freezed == trialBilling + ? _value.trialBilling + : trialBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementRecurringPaymentProperties?, + regularBilling: freezed == regularBilling + ? _value.regularBilling + : regularBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementRecurringPaymentProperties?, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get trialBilling { + if (_value.trialBilling == null) { + return null; + } + + return $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>( + _value.trialBilling!, (value) { + return _then(_value.copyWith(trialBilling: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get regularBilling { + if (_value.regularBilling == null) { + return null; + } + + return $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>( + _value.regularBilling!, (value) { + return _then(_value.copyWith(regularBilling: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PaymentElementAppleRecurringRequestImplCopyWith<$Res> + implements $PaymentElementAppleRecurringRequestCopyWith<$Res> { + factory _$$PaymentElementAppleRecurringRequestImplCopyWith( + _$PaymentElementAppleRecurringRequestImpl value, + $Res Function(_$PaymentElementAppleRecurringRequestImpl) then) = + __$$PaymentElementAppleRecurringRequestImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + PaymentElementRecurringPaymentProperties? trialBilling, + PaymentElementRecurringPaymentProperties? regularBilling}); + + @override + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get trialBilling; + @override + $PaymentElementRecurringPaymentPropertiesCopyWith<$Res>? get regularBilling; +} + +/// @nodoc +class __$$PaymentElementAppleRecurringRequestImplCopyWithImpl<$Res> + extends _$PaymentElementAppleRecurringRequestCopyWithImpl<$Res, + _$PaymentElementAppleRecurringRequestImpl> + implements _$$PaymentElementAppleRecurringRequestImplCopyWith<$Res> { + __$$PaymentElementAppleRecurringRequestImplCopyWithImpl( + _$PaymentElementAppleRecurringRequestImpl _value, + $Res Function(_$PaymentElementAppleRecurringRequestImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? trialBilling = freezed, + Object? regularBilling = freezed, + }) { + return _then(_$PaymentElementAppleRecurringRequestImpl( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + trialBilling: freezed == trialBilling + ? _value.trialBilling + : trialBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementRecurringPaymentProperties?, + regularBilling: freezed == regularBilling + ? _value.regularBilling + : regularBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementRecurringPaymentProperties?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementAppleRecurringRequestImpl + implements _PaymentElementAppleRecurringRequest { + const _$PaymentElementAppleRecurringRequestImpl( + {required this.paymentDescription, + required this.managementUrl, + this.trialBilling, + this.regularBilling}); + + factory _$PaymentElementAppleRecurringRequestImpl.fromJson( + Map json) => + _$$PaymentElementAppleRecurringRequestImplFromJson(json); + + /// The description of the payment + @override + final String paymentDescription; + + /// Management url + @override + final String managementUrl; + + /// Information in case of a trial billing + @override + final PaymentElementRecurringPaymentProperties? trialBilling; + + /// Information in case of a regular billing + @override + final PaymentElementRecurringPaymentProperties? regularBilling; + + @override + String toString() { + return 'PaymentElementAppleRecurringRequest(paymentDescription: $paymentDescription, managementUrl: $managementUrl, trialBilling: $trialBilling, regularBilling: $regularBilling)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementAppleRecurringRequestImpl && + (identical(other.paymentDescription, paymentDescription) || + other.paymentDescription == paymentDescription) && + (identical(other.managementUrl, managementUrl) || + other.managementUrl == managementUrl) && + (identical(other.trialBilling, trialBilling) || + other.trialBilling == trialBilling) && + (identical(other.regularBilling, regularBilling) || + other.regularBilling == regularBilling)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, paymentDescription, + managementUrl, trialBilling, regularBilling); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementAppleRecurringRequestImplCopyWith< + _$PaymentElementAppleRecurringRequestImpl> + get copyWith => __$$PaymentElementAppleRecurringRequestImplCopyWithImpl< + _$PaymentElementAppleRecurringRequestImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementAppleRecurringRequestImplToJson( + this, + ); + } +} + +abstract class _PaymentElementAppleRecurringRequest + implements PaymentElementAppleRecurringRequest { + const factory _PaymentElementAppleRecurringRequest( + {required final String paymentDescription, + required final String managementUrl, + final PaymentElementRecurringPaymentProperties? trialBilling, + final PaymentElementRecurringPaymentProperties? regularBilling}) = + _$PaymentElementAppleRecurringRequestImpl; + + factory _PaymentElementAppleRecurringRequest.fromJson( + Map json) = + _$PaymentElementAppleRecurringRequestImpl.fromJson; + + @override + + /// The description of the payment + String get paymentDescription; + @override + + /// Management url + String get managementUrl; + @override + + /// Information in case of a trial billing + PaymentElementRecurringPaymentProperties? get trialBilling; + @override + + /// Information in case of a regular billing + PaymentElementRecurringPaymentProperties? get regularBilling; + @override + @JsonKey(ignore: true) + _$$PaymentElementAppleRecurringRequestImplCopyWith< + _$PaymentElementAppleRecurringRequestImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementRecurringPaymentProperties + _$PaymentElementRecurringPaymentPropertiesFromJson( + Map json) { + return _PaymentElementRecurringPaymentProperties.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementRecurringPaymentProperties { + /// The amount of the payment + double get amount => throw _privateConstructorUsedError; + + /// Description label + String get label => throw _privateConstructorUsedError; + + /// The startdate of the recurring payment + DateTime? get recurringPaymentStartDate => throw _privateConstructorUsedError; + + /// The enddate of the recurring payment + DateTime? get recurringPaymentEndDate => throw _privateConstructorUsedError; + + /// The interval of payment + ApplePayRecurringPaymentTimeInterVal? get recurringPaymentIntervalUnit => + throw _privateConstructorUsedError; + + /// The amount of intervals + int? get recurringPaymentIntervalCount => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementRecurringPaymentPropertiesCopyWith< + PaymentElementRecurringPaymentProperties> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementRecurringPaymentPropertiesCopyWith<$Res> { + factory $PaymentElementRecurringPaymentPropertiesCopyWith( + PaymentElementRecurringPaymentProperties value, + $Res Function(PaymentElementRecurringPaymentProperties) then) = + _$PaymentElementRecurringPaymentPropertiesCopyWithImpl<$Res, + PaymentElementRecurringPaymentProperties>; + @useResult + $Res call( + {double amount, + String label, + DateTime? recurringPaymentStartDate, + DateTime? recurringPaymentEndDate, + ApplePayRecurringPaymentTimeInterVal? recurringPaymentIntervalUnit, + int? recurringPaymentIntervalCount}); +} + +/// @nodoc +class _$PaymentElementRecurringPaymentPropertiesCopyWithImpl<$Res, + $Val extends PaymentElementRecurringPaymentProperties> + implements $PaymentElementRecurringPaymentPropertiesCopyWith<$Res> { + _$PaymentElementRecurringPaymentPropertiesCopyWithImpl( + this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? amount = null, + Object? label = null, + Object? recurringPaymentStartDate = freezed, + Object? recurringPaymentEndDate = freezed, + Object? recurringPaymentIntervalUnit = freezed, + Object? recurringPaymentIntervalCount = freezed, + }) { + return _then(_value.copyWith( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + recurringPaymentStartDate: freezed == recurringPaymentStartDate + ? _value.recurringPaymentStartDate + : recurringPaymentStartDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + recurringPaymentEndDate: freezed == recurringPaymentEndDate + ? _value.recurringPaymentEndDate + : recurringPaymentEndDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + recurringPaymentIntervalUnit: freezed == recurringPaymentIntervalUnit + ? _value.recurringPaymentIntervalUnit + : recurringPaymentIntervalUnit // ignore: cast_nullable_to_non_nullable + as ApplePayRecurringPaymentTimeInterVal?, + recurringPaymentIntervalCount: freezed == recurringPaymentIntervalCount + ? _value.recurringPaymentIntervalCount + : recurringPaymentIntervalCount // ignore: cast_nullable_to_non_nullable + as int?, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementRecurringPaymentPropertiesImplCopyWith<$Res> + implements $PaymentElementRecurringPaymentPropertiesCopyWith<$Res> { + factory _$$PaymentElementRecurringPaymentPropertiesImplCopyWith( + _$PaymentElementRecurringPaymentPropertiesImpl value, + $Res Function(_$PaymentElementRecurringPaymentPropertiesImpl) then) = + __$$PaymentElementRecurringPaymentPropertiesImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {double amount, + String label, + DateTime? recurringPaymentStartDate, + DateTime? recurringPaymentEndDate, + ApplePayRecurringPaymentTimeInterVal? recurringPaymentIntervalUnit, + int? recurringPaymentIntervalCount}); +} + +/// @nodoc +class __$$PaymentElementRecurringPaymentPropertiesImplCopyWithImpl<$Res> + extends _$PaymentElementRecurringPaymentPropertiesCopyWithImpl<$Res, + _$PaymentElementRecurringPaymentPropertiesImpl> + implements _$$PaymentElementRecurringPaymentPropertiesImplCopyWith<$Res> { + __$$PaymentElementRecurringPaymentPropertiesImplCopyWithImpl( + _$PaymentElementRecurringPaymentPropertiesImpl _value, + $Res Function(_$PaymentElementRecurringPaymentPropertiesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? amount = null, + Object? label = null, + Object? recurringPaymentStartDate = freezed, + Object? recurringPaymentEndDate = freezed, + Object? recurringPaymentIntervalUnit = freezed, + Object? recurringPaymentIntervalCount = freezed, + }) { + return _then(_$PaymentElementRecurringPaymentPropertiesImpl( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + recurringPaymentStartDate: freezed == recurringPaymentStartDate + ? _value.recurringPaymentStartDate + : recurringPaymentStartDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + recurringPaymentEndDate: freezed == recurringPaymentEndDate + ? _value.recurringPaymentEndDate + : recurringPaymentEndDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + recurringPaymentIntervalUnit: freezed == recurringPaymentIntervalUnit + ? _value.recurringPaymentIntervalUnit + : recurringPaymentIntervalUnit // ignore: cast_nullable_to_non_nullable + as ApplePayRecurringPaymentTimeInterVal?, + recurringPaymentIntervalCount: freezed == recurringPaymentIntervalCount + ? _value.recurringPaymentIntervalCount + : recurringPaymentIntervalCount // ignore: cast_nullable_to_non_nullable + as int?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementRecurringPaymentPropertiesImpl + implements _PaymentElementRecurringPaymentProperties { + const _$PaymentElementRecurringPaymentPropertiesImpl( + {required this.amount, + required this.label, + this.recurringPaymentStartDate, + this.recurringPaymentEndDate, + this.recurringPaymentIntervalUnit, + this.recurringPaymentIntervalCount}); + + factory _$PaymentElementRecurringPaymentPropertiesImpl.fromJson( + Map json) => + _$$PaymentElementRecurringPaymentPropertiesImplFromJson(json); + + /// The amount of the payment + @override + final double amount; + + /// Description label + @override + final String label; + + /// The startdate of the recurring payment + @override + final DateTime? recurringPaymentStartDate; + + /// The enddate of the recurring payment + @override + final DateTime? recurringPaymentEndDate; + + /// The interval of payment + @override + final ApplePayRecurringPaymentTimeInterVal? recurringPaymentIntervalUnit; + + /// The amount of intervals + @override + final int? recurringPaymentIntervalCount; + + @override + String toString() { + return 'PaymentElementRecurringPaymentProperties(amount: $amount, label: $label, recurringPaymentStartDate: $recurringPaymentStartDate, recurringPaymentEndDate: $recurringPaymentEndDate, recurringPaymentIntervalUnit: $recurringPaymentIntervalUnit, recurringPaymentIntervalCount: $recurringPaymentIntervalCount)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementRecurringPaymentPropertiesImpl && + (identical(other.amount, amount) || other.amount == amount) && + (identical(other.label, label) || other.label == label) && + (identical(other.recurringPaymentStartDate, + recurringPaymentStartDate) || + other.recurringPaymentStartDate == recurringPaymentStartDate) && + (identical( + other.recurringPaymentEndDate, recurringPaymentEndDate) || + other.recurringPaymentEndDate == recurringPaymentEndDate) && + (identical(other.recurringPaymentIntervalUnit, + recurringPaymentIntervalUnit) || + other.recurringPaymentIntervalUnit == + recurringPaymentIntervalUnit) && + (identical(other.recurringPaymentIntervalCount, + recurringPaymentIntervalCount) || + other.recurringPaymentIntervalCount == + recurringPaymentIntervalCount)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash( + runtimeType, + amount, + label, + recurringPaymentStartDate, + recurringPaymentEndDate, + recurringPaymentIntervalUnit, + recurringPaymentIntervalCount); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementRecurringPaymentPropertiesImplCopyWith< + _$PaymentElementRecurringPaymentPropertiesImpl> + get copyWith => + __$$PaymentElementRecurringPaymentPropertiesImplCopyWithImpl< + _$PaymentElementRecurringPaymentPropertiesImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementRecurringPaymentPropertiesImplToJson( + this, + ); + } +} + +abstract class _PaymentElementRecurringPaymentProperties + implements PaymentElementRecurringPaymentProperties { + const factory _PaymentElementRecurringPaymentProperties( + {required final double amount, + required final String label, + final DateTime? recurringPaymentStartDate, + final DateTime? recurringPaymentEndDate, + final ApplePayRecurringPaymentTimeInterVal? recurringPaymentIntervalUnit, + final int? recurringPaymentIntervalCount}) = + _$PaymentElementRecurringPaymentPropertiesImpl; + + factory _PaymentElementRecurringPaymentProperties.fromJson( + Map json) = + _$PaymentElementRecurringPaymentPropertiesImpl.fromJson; + + @override + + /// The amount of the payment + double get amount; + @override + + /// Description label + String get label; + @override + + /// The startdate of the recurring payment + DateTime? get recurringPaymentStartDate; + @override + + /// The enddate of the recurring payment + DateTime? get recurringPaymentEndDate; + @override + + /// The interval of payment + ApplePayRecurringPaymentTimeInterVal? get recurringPaymentIntervalUnit; + @override + + /// The amount of intervals + int? get recurringPaymentIntervalCount; + @override + @JsonKey(ignore: true) + _$$PaymentElementRecurringPaymentPropertiesImplCopyWith< + _$PaymentElementRecurringPaymentPropertiesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementApplePayDeferredPaymentRequest + _$PaymentElementApplePayDeferredPaymentRequestFromJson( + Map json) { + return _PaymentElementApplePayDeferredPaymentRequest.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementApplePayDeferredPaymentRequest { + /// The description of the payment + String get paymentDescription => throw _privateConstructorUsedError; + + /// Management url + String get managementUrl => throw _privateConstructorUsedError; + + /// Billing agreement label + String? get billingAgreement => throw _privateConstructorUsedError; + + /// The date when you can cancel for free + DateTime? get freeCancellationDate => throw _privateConstructorUsedError; + + /// The timezone of the free cancellation date + String? get freeCancellationTimezone => throw _privateConstructorUsedError; + + /// Billing information of the deffered payment + PaymentElementApplePayDeferredPaymentProperties get deferredBilling => + throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementApplePayDeferredPaymentRequestCopyWith< + PaymentElementApplePayDeferredPaymentRequest> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res> { + factory $PaymentElementApplePayDeferredPaymentRequestCopyWith( + PaymentElementApplePayDeferredPaymentRequest value, + $Res Function(PaymentElementApplePayDeferredPaymentRequest) then) = + _$PaymentElementApplePayDeferredPaymentRequestCopyWithImpl<$Res, + PaymentElementApplePayDeferredPaymentRequest>; + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + String? billingAgreement, + DateTime? freeCancellationDate, + String? freeCancellationTimezone, + PaymentElementApplePayDeferredPaymentProperties deferredBilling}); + + $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> + get deferredBilling; +} + +/// @nodoc +class _$PaymentElementApplePayDeferredPaymentRequestCopyWithImpl<$Res, + $Val extends PaymentElementApplePayDeferredPaymentRequest> + implements $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res> { + _$PaymentElementApplePayDeferredPaymentRequestCopyWithImpl( + this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? billingAgreement = freezed, + Object? freeCancellationDate = freezed, + Object? freeCancellationTimezone = freezed, + Object? deferredBilling = null, + }) { + return _then(_value.copyWith( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + billingAgreement: freezed == billingAgreement + ? _value.billingAgreement + : billingAgreement // ignore: cast_nullable_to_non_nullable + as String?, + freeCancellationDate: freezed == freeCancellationDate + ? _value.freeCancellationDate + : freeCancellationDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + freeCancellationTimezone: freezed == freeCancellationTimezone + ? _value.freeCancellationTimezone + : freeCancellationTimezone // ignore: cast_nullable_to_non_nullable + as String?, + deferredBilling: null == deferredBilling + ? _value.deferredBilling + : deferredBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayDeferredPaymentProperties, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> + get deferredBilling { + return $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res>( + _value.deferredBilling, (value) { + return _then(_value.copyWith(deferredBilling: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PaymentElementApplePayDeferredPaymentRequestImplCopyWith<$Res> + implements $PaymentElementApplePayDeferredPaymentRequestCopyWith<$Res> { + factory _$$PaymentElementApplePayDeferredPaymentRequestImplCopyWith( + _$PaymentElementApplePayDeferredPaymentRequestImpl value, + $Res Function(_$PaymentElementApplePayDeferredPaymentRequestImpl) + then) = + __$$PaymentElementApplePayDeferredPaymentRequestImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + String? billingAgreement, + DateTime? freeCancellationDate, + String? freeCancellationTimezone, + PaymentElementApplePayDeferredPaymentProperties deferredBilling}); + + @override + $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> + get deferredBilling; +} + +/// @nodoc +class __$$PaymentElementApplePayDeferredPaymentRequestImplCopyWithImpl<$Res> + extends _$PaymentElementApplePayDeferredPaymentRequestCopyWithImpl<$Res, + _$PaymentElementApplePayDeferredPaymentRequestImpl> + implements + _$$PaymentElementApplePayDeferredPaymentRequestImplCopyWith<$Res> { + __$$PaymentElementApplePayDeferredPaymentRequestImplCopyWithImpl( + _$PaymentElementApplePayDeferredPaymentRequestImpl _value, + $Res Function(_$PaymentElementApplePayDeferredPaymentRequestImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? billingAgreement = freezed, + Object? freeCancellationDate = freezed, + Object? freeCancellationTimezone = freezed, + Object? deferredBilling = null, + }) { + return _then(_$PaymentElementApplePayDeferredPaymentRequestImpl( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + billingAgreement: freezed == billingAgreement + ? _value.billingAgreement + : billingAgreement // ignore: cast_nullable_to_non_nullable + as String?, + freeCancellationDate: freezed == freeCancellationDate + ? _value.freeCancellationDate + : freeCancellationDate // ignore: cast_nullable_to_non_nullable + as DateTime?, + freeCancellationTimezone: freezed == freeCancellationTimezone + ? _value.freeCancellationTimezone + : freeCancellationTimezone // ignore: cast_nullable_to_non_nullable + as String?, + deferredBilling: null == deferredBilling + ? _value.deferredBilling + : deferredBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayDeferredPaymentProperties, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementApplePayDeferredPaymentRequestImpl + implements _PaymentElementApplePayDeferredPaymentRequest { + const _$PaymentElementApplePayDeferredPaymentRequestImpl( + {required this.paymentDescription, + required this.managementUrl, + this.billingAgreement, + this.freeCancellationDate, + this.freeCancellationTimezone, + required this.deferredBilling}); + + factory _$PaymentElementApplePayDeferredPaymentRequestImpl.fromJson( + Map json) => + _$$PaymentElementApplePayDeferredPaymentRequestImplFromJson(json); + + /// The description of the payment + @override + final String paymentDescription; + + /// Management url + @override + final String managementUrl; + + /// Billing agreement label + @override + final String? billingAgreement; + + /// The date when you can cancel for free + @override + final DateTime? freeCancellationDate; + + /// The timezone of the free cancellation date + @override + final String? freeCancellationTimezone; + + /// Billing information of the deffered payment + @override + final PaymentElementApplePayDeferredPaymentProperties deferredBilling; + + @override + String toString() { + return 'PaymentElementApplePayDeferredPaymentRequest(paymentDescription: $paymentDescription, managementUrl: $managementUrl, billingAgreement: $billingAgreement, freeCancellationDate: $freeCancellationDate, freeCancellationTimezone: $freeCancellationTimezone, deferredBilling: $deferredBilling)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementApplePayDeferredPaymentRequestImpl && + (identical(other.paymentDescription, paymentDescription) || + other.paymentDescription == paymentDescription) && + (identical(other.managementUrl, managementUrl) || + other.managementUrl == managementUrl) && + (identical(other.billingAgreement, billingAgreement) || + other.billingAgreement == billingAgreement) && + (identical(other.freeCancellationDate, freeCancellationDate) || + other.freeCancellationDate == freeCancellationDate) && + (identical( + other.freeCancellationTimezone, freeCancellationTimezone) || + other.freeCancellationTimezone == freeCancellationTimezone) && + (identical(other.deferredBilling, deferredBilling) || + other.deferredBilling == deferredBilling)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash( + runtimeType, + paymentDescription, + managementUrl, + billingAgreement, + freeCancellationDate, + freeCancellationTimezone, + deferredBilling); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementApplePayDeferredPaymentRequestImplCopyWith< + _$PaymentElementApplePayDeferredPaymentRequestImpl> + get copyWith => + __$$PaymentElementApplePayDeferredPaymentRequestImplCopyWithImpl< + _$PaymentElementApplePayDeferredPaymentRequestImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementApplePayDeferredPaymentRequestImplToJson( + this, + ); + } +} + +abstract class _PaymentElementApplePayDeferredPaymentRequest + implements PaymentElementApplePayDeferredPaymentRequest { + const factory _PaymentElementApplePayDeferredPaymentRequest( + {required final String paymentDescription, + required final String managementUrl, + final String? billingAgreement, + final DateTime? freeCancellationDate, + final String? freeCancellationTimezone, + required final PaymentElementApplePayDeferredPaymentProperties + deferredBilling}) = + _$PaymentElementApplePayDeferredPaymentRequestImpl; + + factory _PaymentElementApplePayDeferredPaymentRequest.fromJson( + Map json) = + _$PaymentElementApplePayDeferredPaymentRequestImpl.fromJson; + + @override + + /// The description of the payment + String get paymentDescription; + @override + + /// Management url + String get managementUrl; + @override + + /// Billing agreement label + String? get billingAgreement; + @override + + /// The date when you can cancel for free + DateTime? get freeCancellationDate; + @override + + /// The timezone of the free cancellation date + String? get freeCancellationTimezone; + @override + + /// Billing information of the deffered payment + PaymentElementApplePayDeferredPaymentProperties get deferredBilling; + @override + @JsonKey(ignore: true) + _$$PaymentElementApplePayDeferredPaymentRequestImplCopyWith< + _$PaymentElementApplePayDeferredPaymentRequestImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementApplePayDeferredPaymentProperties + _$PaymentElementApplePayDeferredPaymentPropertiesFromJson( + Map json) { + return _PaymentElementApplePayDeferredPaymentProperties.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementApplePayDeferredPaymentProperties { + /// The amount of the payment + double get amount => throw _privateConstructorUsedError; + + /// Description label + String get label => throw _privateConstructorUsedError; + + /// The date when the payment will be processed + DateTime get deferredPaymentDate => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementApplePayDeferredPaymentPropertiesCopyWith< + PaymentElementApplePayDeferredPaymentProperties> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> { + factory $PaymentElementApplePayDeferredPaymentPropertiesCopyWith( + PaymentElementApplePayDeferredPaymentProperties value, + $Res Function(PaymentElementApplePayDeferredPaymentProperties) then) = + _$PaymentElementApplePayDeferredPaymentPropertiesCopyWithImpl<$Res, + PaymentElementApplePayDeferredPaymentProperties>; + @useResult + $Res call({double amount, String label, DateTime deferredPaymentDate}); +} + +/// @nodoc +class _$PaymentElementApplePayDeferredPaymentPropertiesCopyWithImpl<$Res, + $Val extends PaymentElementApplePayDeferredPaymentProperties> + implements $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> { + _$PaymentElementApplePayDeferredPaymentPropertiesCopyWithImpl( + this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? amount = null, + Object? label = null, + Object? deferredPaymentDate = null, + }) { + return _then(_value.copyWith( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + deferredPaymentDate: null == deferredPaymentDate + ? _value.deferredPaymentDate + : deferredPaymentDate // ignore: cast_nullable_to_non_nullable + as DateTime, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWith< + $Res> + implements $PaymentElementApplePayDeferredPaymentPropertiesCopyWith<$Res> { + factory _$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWith( + _$PaymentElementApplePayDeferredPaymentPropertiesImpl value, + $Res Function(_$PaymentElementApplePayDeferredPaymentPropertiesImpl) + then) = + __$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({double amount, String label, DateTime deferredPaymentDate}); +} + +/// @nodoc +class __$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWithImpl<$Res> + extends _$PaymentElementApplePayDeferredPaymentPropertiesCopyWithImpl<$Res, + _$PaymentElementApplePayDeferredPaymentPropertiesImpl> + implements + _$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWith<$Res> { + __$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWithImpl( + _$PaymentElementApplePayDeferredPaymentPropertiesImpl _value, + $Res Function(_$PaymentElementApplePayDeferredPaymentPropertiesImpl) + _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? amount = null, + Object? label = null, + Object? deferredPaymentDate = null, + }) { + return _then(_$PaymentElementApplePayDeferredPaymentPropertiesImpl( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + deferredPaymentDate: null == deferredPaymentDate + ? _value.deferredPaymentDate + : deferredPaymentDate // ignore: cast_nullable_to_non_nullable + as DateTime, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementApplePayDeferredPaymentPropertiesImpl + implements _PaymentElementApplePayDeferredPaymentProperties { + const _$PaymentElementApplePayDeferredPaymentPropertiesImpl( + {required this.amount, + required this.label, + required this.deferredPaymentDate}); + + factory _$PaymentElementApplePayDeferredPaymentPropertiesImpl.fromJson( + Map json) => + _$$PaymentElementApplePayDeferredPaymentPropertiesImplFromJson(json); + + /// The amount of the payment + @override + final double amount; + + /// Description label + @override + final String label; + + /// The date when the payment will be processed + @override + final DateTime deferredPaymentDate; + + @override + String toString() { + return 'PaymentElementApplePayDeferredPaymentProperties(amount: $amount, label: $label, deferredPaymentDate: $deferredPaymentDate)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementApplePayDeferredPaymentPropertiesImpl && + (identical(other.amount, amount) || other.amount == amount) && + (identical(other.label, label) || other.label == label) && + (identical(other.deferredPaymentDate, deferredPaymentDate) || + other.deferredPaymentDate == deferredPaymentDate)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => + Object.hash(runtimeType, amount, label, deferredPaymentDate); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWith< + _$PaymentElementApplePayDeferredPaymentPropertiesImpl> + get copyWith => + __$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWithImpl< + _$PaymentElementApplePayDeferredPaymentPropertiesImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementApplePayDeferredPaymentPropertiesImplToJson( + this, + ); + } +} + +abstract class _PaymentElementApplePayDeferredPaymentProperties + implements PaymentElementApplePayDeferredPaymentProperties { + const factory _PaymentElementApplePayDeferredPaymentProperties( + {required final double amount, + required final String label, + required final DateTime deferredPaymentDate}) = + _$PaymentElementApplePayDeferredPaymentPropertiesImpl; + + factory _PaymentElementApplePayDeferredPaymentProperties.fromJson( + Map json) = + _$PaymentElementApplePayDeferredPaymentPropertiesImpl.fromJson; + + @override + + /// The amount of the payment + double get amount; + @override + + /// Description label + String get label; + @override + + /// The date when the payment will be processed + DateTime get deferredPaymentDate; + @override + @JsonKey(ignore: true) + _$$PaymentElementApplePayDeferredPaymentPropertiesImplCopyWith< + _$PaymentElementApplePayDeferredPaymentPropertiesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +PaymentElementApplePayAutoReloadPaymentRequest + _$PaymentElementApplePayAutoReloadPaymentRequestFromJson( + Map json) { + return _PaymentElementApplePayAutoReloadPaymentRequest.fromJson(json); +} + +/// @nodoc +mixin _$PaymentElementApplePayAutoReloadPaymentRequest { + /// The description of the payment + String get paymentDescription => throw _privateConstructorUsedError; + + /// Management url + String get managementUrl => throw _privateConstructorUsedError; + + /// Billing information of the deffered payment + PaymentElementApplePayReloadPaymentProperties get automaticReloadBilling => + throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $PaymentElementApplePayAutoReloadPaymentRequestCopyWith< + PaymentElementApplePayAutoReloadPaymentRequest> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res> { + factory $PaymentElementApplePayAutoReloadPaymentRequestCopyWith( + PaymentElementApplePayAutoReloadPaymentRequest value, + $Res Function(PaymentElementApplePayAutoReloadPaymentRequest) then) = + _$PaymentElementApplePayAutoReloadPaymentRequestCopyWithImpl<$Res, + PaymentElementApplePayAutoReloadPaymentRequest>; + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + PaymentElementApplePayReloadPaymentProperties automaticReloadBilling}); + + $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> + get automaticReloadBilling; +} + +/// @nodoc +class _$PaymentElementApplePayAutoReloadPaymentRequestCopyWithImpl<$Res, + $Val extends PaymentElementApplePayAutoReloadPaymentRequest> + implements $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res> { + _$PaymentElementApplePayAutoReloadPaymentRequestCopyWithImpl( + this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? automaticReloadBilling = null, + }) { + return _then(_value.copyWith( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + automaticReloadBilling: null == automaticReloadBilling + ? _value.automaticReloadBilling + : automaticReloadBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayReloadPaymentProperties, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> + get automaticReloadBilling { + return $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res>( + _value.automaticReloadBilling, (value) { + return _then(_value.copyWith(automaticReloadBilling: value) as $Val); + }); + } +} +/// @nodoc +abstract class _$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWith< + $Res> + implements $PaymentElementApplePayAutoReloadPaymentRequestCopyWith<$Res> { + factory _$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWith( + _$PaymentElementApplePayAutoReloadPaymentRequestImpl value, + $Res Function(_$PaymentElementApplePayAutoReloadPaymentRequestImpl) + then) = + __$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWithImpl<$Res>; @override - PaymentElementFieldRequired get name; + @useResult + $Res call( + {String paymentDescription, + String managementUrl, + PaymentElementApplePayReloadPaymentProperties automaticReloadBilling}); + @override - PaymentElementFieldRequired get email; + $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> + get automaticReloadBilling; +} + +/// @nodoc +class __$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWithImpl<$Res> + extends _$PaymentElementApplePayAutoReloadPaymentRequestCopyWithImpl<$Res, + _$PaymentElementApplePayAutoReloadPaymentRequestImpl> + implements + _$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWith<$Res> { + __$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWithImpl( + _$PaymentElementApplePayAutoReloadPaymentRequestImpl _value, + $Res Function(_$PaymentElementApplePayAutoReloadPaymentRequestImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') @override - PaymentElementFieldRequired get phone; + $Res call({ + Object? paymentDescription = null, + Object? managementUrl = null, + Object? automaticReloadBilling = null, + }) { + return _then(_$PaymentElementApplePayAutoReloadPaymentRequestImpl( + paymentDescription: null == paymentDescription + ? _value.paymentDescription + : paymentDescription // ignore: cast_nullable_to_non_nullable + as String, + managementUrl: null == managementUrl + ? _value.managementUrl + : managementUrl // ignore: cast_nullable_to_non_nullable + as String, + automaticReloadBilling: null == automaticReloadBilling + ? _value.automaticReloadBilling + : automaticReloadBilling // ignore: cast_nullable_to_non_nullable + as PaymentElementApplePayReloadPaymentProperties, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PaymentElementApplePayAutoReloadPaymentRequestImpl + implements _PaymentElementApplePayAutoReloadPaymentRequest { + const _$PaymentElementApplePayAutoReloadPaymentRequestImpl( + {required this.paymentDescription, + required this.managementUrl, + required this.automaticReloadBilling}); + + factory _$PaymentElementApplePayAutoReloadPaymentRequestImpl.fromJson( + Map json) => + _$$PaymentElementApplePayAutoReloadPaymentRequestImplFromJson(json); + + /// The description of the payment @override - PaymentElementAddressFields get address; + final String paymentDescription; + + /// Management url + @override + final String managementUrl; + + /// Billing information of the deffered payment + @override + final PaymentElementApplePayReloadPaymentProperties automaticReloadBilling; + + @override + String toString() { + return 'PaymentElementApplePayAutoReloadPaymentRequest(paymentDescription: $paymentDescription, managementUrl: $managementUrl, automaticReloadBilling: $automaticReloadBilling)'; + } + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentElementApplePayAutoReloadPaymentRequestImpl && + (identical(other.paymentDescription, paymentDescription) || + other.paymentDescription == paymentDescription) && + (identical(other.managementUrl, managementUrl) || + other.managementUrl == managementUrl) && + (identical(other.automaticReloadBilling, automaticReloadBilling) || + other.automaticReloadBilling == automaticReloadBilling)); + } + @JsonKey(ignore: true) - _$$BillingDetailsFieldsImplCopyWith<_$BillingDetailsFieldsImpl> + @override + int get hashCode => Object.hash( + runtimeType, paymentDescription, managementUrl, automaticReloadBilling); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWith< + _$PaymentElementApplePayAutoReloadPaymentRequestImpl> + get copyWith => + __$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWithImpl< + _$PaymentElementApplePayAutoReloadPaymentRequestImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$PaymentElementApplePayAutoReloadPaymentRequestImplToJson( + this, + ); + } +} + +abstract class _PaymentElementApplePayAutoReloadPaymentRequest + implements PaymentElementApplePayAutoReloadPaymentRequest { + const factory _PaymentElementApplePayAutoReloadPaymentRequest( + {required final String paymentDescription, + required final String managementUrl, + required final PaymentElementApplePayReloadPaymentProperties + automaticReloadBilling}) = + _$PaymentElementApplePayAutoReloadPaymentRequestImpl; + + factory _PaymentElementApplePayAutoReloadPaymentRequest.fromJson( + Map json) = + _$PaymentElementApplePayAutoReloadPaymentRequestImpl.fromJson; + + @override + + /// The description of the payment + String get paymentDescription; + @override + + /// Management url + String get managementUrl; + @override + + /// Billing information of the deffered payment + PaymentElementApplePayReloadPaymentProperties get automaticReloadBilling; + @override + @JsonKey(ignore: true) + _$$PaymentElementApplePayAutoReloadPaymentRequestImplCopyWith< + _$PaymentElementApplePayAutoReloadPaymentRequestImpl> get copyWith => throw _privateConstructorUsedError; } -PaymentElementAddressFields _$PaymentElementAddressFieldsFromJson( - Map json) { - return _PaymentElementAddressFields.fromJson(json); +PaymentElementApplePayReloadPaymentProperties + _$PaymentElementApplePayReloadPaymentPropertiesFromJson( + Map json) { + return _PaymentElementApplePayReloadPaymentProperties.fromJson(json); } /// @nodoc -mixin _$PaymentElementAddressFields { - PaymentElementFieldRequired get line1 => throw _privateConstructorUsedError; - PaymentElementFieldRequired get line2 => throw _privateConstructorUsedError; - PaymentElementFieldRequired get city => throw _privateConstructorUsedError; - PaymentElementFieldRequired get state => throw _privateConstructorUsedError; - PaymentElementFieldRequired get country => throw _privateConstructorUsedError; - PaymentElementFieldRequired get postalCode => +mixin _$PaymentElementApplePayReloadPaymentProperties { + /// The amount of the payment + double get amount => throw _privateConstructorUsedError; + + /// Description label + String get label => throw _privateConstructorUsedError; + + /// The date when the threshold amount will be reached + DateTime get automaticReloadPaymentThresholdAmount => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PaymentElementAddressFieldsCopyWith + $PaymentElementApplePayReloadPaymentPropertiesCopyWith< + PaymentElementApplePayReloadPaymentProperties> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $PaymentElementAddressFieldsCopyWith<$Res> { - factory $PaymentElementAddressFieldsCopyWith( - PaymentElementAddressFields value, - $Res Function(PaymentElementAddressFields) then) = - _$PaymentElementAddressFieldsCopyWithImpl<$Res, - PaymentElementAddressFields>; +abstract class $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> { + factory $PaymentElementApplePayReloadPaymentPropertiesCopyWith( + PaymentElementApplePayReloadPaymentProperties value, + $Res Function(PaymentElementApplePayReloadPaymentProperties) then) = + _$PaymentElementApplePayReloadPaymentPropertiesCopyWithImpl<$Res, + PaymentElementApplePayReloadPaymentProperties>; @useResult $Res call( - {PaymentElementFieldRequired line1, - PaymentElementFieldRequired line2, - PaymentElementFieldRequired city, - PaymentElementFieldRequired state, - PaymentElementFieldRequired country, - PaymentElementFieldRequired postalCode}); + {double amount, + String label, + DateTime automaticReloadPaymentThresholdAmount}); } /// @nodoc -class _$PaymentElementAddressFieldsCopyWithImpl<$Res, - $Val extends PaymentElementAddressFields> - implements $PaymentElementAddressFieldsCopyWith<$Res> { - _$PaymentElementAddressFieldsCopyWithImpl(this._value, this._then); +class _$PaymentElementApplePayReloadPaymentPropertiesCopyWithImpl<$Res, + $Val extends PaymentElementApplePayReloadPaymentProperties> + implements $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> { + _$PaymentElementApplePayReloadPaymentPropertiesCopyWithImpl( + this._value, this._then); // ignore: unused_field final $Val _value; @@ -2002,211 +5248,174 @@ class _$PaymentElementAddressFieldsCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? line1 = null, - Object? line2 = null, - Object? city = null, - Object? state = null, - Object? country = null, - Object? postalCode = null, + Object? amount = null, + Object? label = null, + Object? automaticReloadPaymentThresholdAmount = null, }) { return _then(_value.copyWith( - line1: null == line1 - ? _value.line1 - : line1 // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - line2: null == line2 - ? _value.line2 - : line2 // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - country: null == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - postalCode: null == postalCode - ? _value.postalCode - : postalCode // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + automaticReloadPaymentThresholdAmount: null == + automaticReloadPaymentThresholdAmount + ? _value.automaticReloadPaymentThresholdAmount + : automaticReloadPaymentThresholdAmount // ignore: cast_nullable_to_non_nullable + as DateTime, ) as $Val); } } /// @nodoc -abstract class _$$PaymentElementAddressFieldsImplCopyWith<$Res> - implements $PaymentElementAddressFieldsCopyWith<$Res> { - factory _$$PaymentElementAddressFieldsImplCopyWith( - _$PaymentElementAddressFieldsImpl value, - $Res Function(_$PaymentElementAddressFieldsImpl) then) = - __$$PaymentElementAddressFieldsImplCopyWithImpl<$Res>; +abstract class _$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWith< + $Res> + implements $PaymentElementApplePayReloadPaymentPropertiesCopyWith<$Res> { + factory _$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWith( + _$PaymentElementApplePayReloadPaymentPropertiesImpl value, + $Res Function(_$PaymentElementApplePayReloadPaymentPropertiesImpl) + then) = + __$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWithImpl<$Res>; @override @useResult $Res call( - {PaymentElementFieldRequired line1, - PaymentElementFieldRequired line2, - PaymentElementFieldRequired city, - PaymentElementFieldRequired state, - PaymentElementFieldRequired country, - PaymentElementFieldRequired postalCode}); + {double amount, + String label, + DateTime automaticReloadPaymentThresholdAmount}); } /// @nodoc -class __$$PaymentElementAddressFieldsImplCopyWithImpl<$Res> - extends _$PaymentElementAddressFieldsCopyWithImpl<$Res, - _$PaymentElementAddressFieldsImpl> - implements _$$PaymentElementAddressFieldsImplCopyWith<$Res> { - __$$PaymentElementAddressFieldsImplCopyWithImpl( - _$PaymentElementAddressFieldsImpl _value, - $Res Function(_$PaymentElementAddressFieldsImpl) _then) +class __$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWithImpl<$Res> + extends _$PaymentElementApplePayReloadPaymentPropertiesCopyWithImpl<$Res, + _$PaymentElementApplePayReloadPaymentPropertiesImpl> + implements + _$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWith<$Res> { + __$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWithImpl( + _$PaymentElementApplePayReloadPaymentPropertiesImpl _value, + $Res Function(_$PaymentElementApplePayReloadPaymentPropertiesImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? line1 = null, - Object? line2 = null, - Object? city = null, - Object? state = null, - Object? country = null, - Object? postalCode = null, + Object? amount = null, + Object? label = null, + Object? automaticReloadPaymentThresholdAmount = null, }) { - return _then(_$PaymentElementAddressFieldsImpl( - line1: null == line1 - ? _value.line1 - : line1 // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - line2: null == line2 - ? _value.line2 - : line2 // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - country: null == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, - postalCode: null == postalCode - ? _value.postalCode - : postalCode // ignore: cast_nullable_to_non_nullable - as PaymentElementFieldRequired, + return _then(_$PaymentElementApplePayReloadPaymentPropertiesImpl( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as double, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + automaticReloadPaymentThresholdAmount: null == + automaticReloadPaymentThresholdAmount + ? _value.automaticReloadPaymentThresholdAmount + : automaticReloadPaymentThresholdAmount // ignore: cast_nullable_to_non_nullable + as DateTime, )); } } /// @nodoc @JsonSerializable() -class _$PaymentElementAddressFieldsImpl - implements _PaymentElementAddressFields { - const _$PaymentElementAddressFieldsImpl( - {this.line1 = PaymentElementFieldRequired.auto, - this.line2 = PaymentElementFieldRequired.auto, - this.city = PaymentElementFieldRequired.auto, - this.state = PaymentElementFieldRequired.auto, - this.country = PaymentElementFieldRequired.auto, - this.postalCode = PaymentElementFieldRequired.auto}); - - factory _$PaymentElementAddressFieldsImpl.fromJson( +class _$PaymentElementApplePayReloadPaymentPropertiesImpl + implements _PaymentElementApplePayReloadPaymentProperties { + const _$PaymentElementApplePayReloadPaymentPropertiesImpl( + {required this.amount, + required this.label, + required this.automaticReloadPaymentThresholdAmount}); + + factory _$PaymentElementApplePayReloadPaymentPropertiesImpl.fromJson( Map json) => - _$$PaymentElementAddressFieldsImplFromJson(json); + _$$PaymentElementApplePayReloadPaymentPropertiesImplFromJson(json); + /// The amount of the payment @override - @JsonKey() - final PaymentElementFieldRequired line1; - @override - @JsonKey() - final PaymentElementFieldRequired line2; - @override - @JsonKey() - final PaymentElementFieldRequired city; - @override - @JsonKey() - final PaymentElementFieldRequired state; + final double amount; + + /// Description label @override - @JsonKey() - final PaymentElementFieldRequired country; + final String label; + + /// The date when the threshold amount will be reached @override - @JsonKey() - final PaymentElementFieldRequired postalCode; + final DateTime automaticReloadPaymentThresholdAmount; @override String toString() { - return 'PaymentElementAddressFields(line1: $line1, line2: $line2, city: $city, state: $state, country: $country, postalCode: $postalCode)'; + return 'PaymentElementApplePayReloadPaymentProperties(amount: $amount, label: $label, automaticReloadPaymentThresholdAmount: $automaticReloadPaymentThresholdAmount)'; } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PaymentElementAddressFieldsImpl && - (identical(other.line1, line1) || other.line1 == line1) && - (identical(other.line2, line2) || other.line2 == line2) && - (identical(other.city, city) || other.city == city) && - (identical(other.state, state) || other.state == state) && - (identical(other.country, country) || other.country == country) && - (identical(other.postalCode, postalCode) || - other.postalCode == postalCode)); + other is _$PaymentElementApplePayReloadPaymentPropertiesImpl && + (identical(other.amount, amount) || other.amount == amount) && + (identical(other.label, label) || other.label == label) && + (identical(other.automaticReloadPaymentThresholdAmount, + automaticReloadPaymentThresholdAmount) || + other.automaticReloadPaymentThresholdAmount == + automaticReloadPaymentThresholdAmount)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, line1, line2, city, state, country, postalCode); + int get hashCode => Object.hash( + runtimeType, amount, label, automaticReloadPaymentThresholdAmount); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentElementAddressFieldsImplCopyWith<_$PaymentElementAddressFieldsImpl> - get copyWith => __$$PaymentElementAddressFieldsImplCopyWithImpl< - _$PaymentElementAddressFieldsImpl>(this, _$identity); + _$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWith< + _$PaymentElementApplePayReloadPaymentPropertiesImpl> + get copyWith => + __$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWithImpl< + _$PaymentElementApplePayReloadPaymentPropertiesImpl>( + this, _$identity); @override Map toJson() { - return _$$PaymentElementAddressFieldsImplToJson( + return _$$PaymentElementApplePayReloadPaymentPropertiesImplToJson( this, ); } } -abstract class _PaymentElementAddressFields - implements PaymentElementAddressFields { - const factory _PaymentElementAddressFields( - {final PaymentElementFieldRequired line1, - final PaymentElementFieldRequired line2, - final PaymentElementFieldRequired city, - final PaymentElementFieldRequired state, - final PaymentElementFieldRequired country, - final PaymentElementFieldRequired postalCode}) = - _$PaymentElementAddressFieldsImpl; +abstract class _PaymentElementApplePayReloadPaymentProperties + implements PaymentElementApplePayReloadPaymentProperties { + const factory _PaymentElementApplePayReloadPaymentProperties( + {required final double amount, + required final String label, + required final DateTime automaticReloadPaymentThresholdAmount}) = + _$PaymentElementApplePayReloadPaymentPropertiesImpl; - factory _PaymentElementAddressFields.fromJson(Map json) = - _$PaymentElementAddressFieldsImpl.fromJson; + factory _PaymentElementApplePayReloadPaymentProperties.fromJson( + Map json) = + _$PaymentElementApplePayReloadPaymentPropertiesImpl.fromJson; @override - PaymentElementFieldRequired get line1; - @override - PaymentElementFieldRequired get line2; - @override - PaymentElementFieldRequired get city; - @override - PaymentElementFieldRequired get state; + + /// The amount of the payment + double get amount; @override - PaymentElementFieldRequired get country; + + /// Description label + String get label; @override - PaymentElementFieldRequired get postalCode; + + /// The date when the threshold amount will be reached + DateTime get automaticReloadPaymentThresholdAmount; @override @JsonKey(ignore: true) - _$$PaymentElementAddressFieldsImplCopyWith<_$PaymentElementAddressFieldsImpl> + _$$PaymentElementApplePayReloadPaymentPropertiesImplCopyWith< + _$PaymentElementApplePayReloadPaymentPropertiesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/stripe_js/lib/src/api/elements/payment_element_options.g.dart b/packages/stripe_js/lib/src/api/elements/payment_element_options.g.dart index 4bf4f4d66..2b5f79878 100644 --- a/packages/stripe_js/lib/src/api/elements/payment_element_options.g.dart +++ b/packages/stripe_js/lib/src/api/elements/payment_element_options.g.dart @@ -25,9 +25,19 @@ _$PaymentElementOptionsImpl _$$PaymentElementOptionsImplFromJson(Map json) => ? null : PaymentElementFields.fromJson( Map.from(json['fields'] as Map)), - readOnly: json['readOnly'], - terms: json['terms'], - wallets: json['wallets'], + readOnly: json['readOnly'] as bool?, + terms: json['terms'] == null + ? null + : PaymentElementOptionsTerms.fromJson( + Map.from(json['terms'] as Map)), + wallets: json['wallets'] == null + ? null + : PaymentElementWalletOptions.fromJson( + Map.from(json['wallets'] as Map)), + applePay: json['applePay'] == null + ? null + : PaymentElementApplePayOptions.fromJson( + Map.from(json['applePay'] as Map)), ); Map _$$PaymentElementOptionsImplToJson( @@ -46,8 +56,9 @@ Map _$$PaymentElementOptionsImplToJson( writeNotNull('paymentMethodOrder', instance.paymentMethodOrder); writeNotNull('fields', instance.fields?.toJson()); writeNotNull('readOnly', instance.readOnly); - writeNotNull('terms', instance.terms); - writeNotNull('wallets', instance.wallets); + writeNotNull('terms', instance.terms?.toJson()); + writeNotNull('wallets', instance.wallets?.toJson()); + writeNotNull('applePay', instance.applePay?.toJson()); return val; } @@ -57,6 +68,8 @@ _$PaymentElementLayoutImpl _$$PaymentElementLayoutImplFromJson(Map json) => defaultCollapsed: json['defaultCollapsed'] as bool?, radios: json['radios'] as bool?, spacedAccordionItems: json['spacedAccordionItems'] as bool?, + visibleAccordionItemsCount: + (json['visibleAccordionItemsCount'] as num?)?.toInt(), ); Map _$$PaymentElementLayoutImplToJson( @@ -74,6 +87,8 @@ Map _$$PaymentElementLayoutImplToJson( writeNotNull('defaultCollapsed', instance.defaultCollapsed); writeNotNull('radios', instance.radios); writeNotNull('spacedAccordionItems', instance.spacedAccordionItems); + writeNotNull( + 'visibleAccordionItemsCount', instance.visibleAccordionItemsCount); return val; } @@ -89,6 +104,10 @@ _$PaymentElementDefaultValuesImpl _$$PaymentElementDefaultValuesImplFromJson( ? null : PaymentElementBillingDetails.fromJson( Map.from(json['billingDetails'] as Map)), + paymentMethods: json['paymentMethods'] == null + ? null + : PaymentElementPaymentMethodDefaults.fromJson( + Map.from(json['paymentMethods'] as Map)), ); Map _$$PaymentElementDefaultValuesImplToJson( @@ -102,6 +121,107 @@ Map _$$PaymentElementDefaultValuesImplToJson( } writeNotNull('billingDetails', instance.billingDetails?.toJson()); + writeNotNull('paymentMethods', instance.paymentMethods?.toJson()); + return val; +} + +_$PaymentElementPaymentMethodDefaultsImpl + _$$PaymentElementPaymentMethodDefaultsImplFromJson(Map json) => + _$PaymentElementPaymentMethodDefaultsImpl( + ideal: json['ideal'] == null + ? null + : PaymentElementIdealDefaults.fromJson( + Map.from(json['ideal'] as Map)), + card: json['card'] == null + ? null + : PaymentElementCardDefaults.fromJson( + Map.from(json['card'] as Map)), + ); + +Map _$$PaymentElementPaymentMethodDefaultsImplToJson( + _$PaymentElementPaymentMethodDefaultsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('ideal', instance.ideal?.toJson()); + writeNotNull('card', instance.card?.toJson()); + return val; +} + +_$PaymentElementWalletOptionsImpl _$$PaymentElementWalletOptionsImplFromJson( + Map json) => + _$PaymentElementWalletOptionsImpl( + applePay: $enumDecodeNullable( + _$PaymentElementFieldRequiredEnumMap, json['applePay']), + googlePay: $enumDecodeNullable( + _$PaymentElementFieldRequiredEnumMap, json['googlePay']), + ); + +Map _$$PaymentElementWalletOptionsImplToJson( + _$PaymentElementWalletOptionsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull( + 'applePay', _$PaymentElementFieldRequiredEnumMap[instance.applePay]); + writeNotNull( + 'googlePay', _$PaymentElementFieldRequiredEnumMap[instance.googlePay]); + return val; +} + +const _$PaymentElementFieldRequiredEnumMap = { + PaymentElementFieldRequired.never: 'never', + PaymentElementFieldRequired.auto: 'auto', +}; + +_$PaymentElementIdealDefaultsImpl _$$PaymentElementIdealDefaultsImplFromJson( + Map json) => + _$PaymentElementIdealDefaultsImpl( + bank: json['bank'] as String?, + ); + +Map _$$PaymentElementIdealDefaultsImplToJson( + _$PaymentElementIdealDefaultsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('bank', instance.bank); + return val; +} + +_$PaymentElementCardDefaultsImpl _$$PaymentElementCardDefaultsImplFromJson( + Map json) => + _$PaymentElementCardDefaultsImpl( + network: + (json['network'] as List?)?.map((e) => e as String).toList(), + ); + +Map _$$PaymentElementCardDefaultsImplToJson( + _$PaymentElementCardDefaultsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('network', instance.network); return val; } @@ -223,11 +343,6 @@ Map _$$BillingDetailsFieldsImplToJson( 'address': instance.address.toJson(), }; -const _$PaymentElementFieldRequiredEnumMap = { - PaymentElementFieldRequired.never: 'never', - PaymentElementFieldRequired.auto: 'auto', -}; - _$PaymentElementAddressFieldsImpl _$$PaymentElementAddressFieldsImplFromJson( Map json) => _$PaymentElementAddressFieldsImpl( @@ -261,3 +376,281 @@ Map _$$PaymentElementAddressFieldsImplToJson( 'country': _$PaymentElementFieldRequiredEnumMap[instance.country]!, 'postalCode': _$PaymentElementFieldRequiredEnumMap[instance.postalCode]!, }; + +_$PaymentElementOptionsTermsImpl _$$PaymentElementOptionsTermsImplFromJson( + Map json) => + _$PaymentElementOptionsTermsImpl( + applePay: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['applePay']), + auBecsDebit: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['auBecsDebit']), + bancontact: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['bancontact']), + card: $enumDecodeNullable(_$PaymentElementShowTermsEnumMap, json['card']), + cashApp: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['cashApp']), + googlePay: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['googlePay']), + ideal: + $enumDecodeNullable(_$PaymentElementShowTermsEnumMap, json['ideal']), + payPal: + $enumDecodeNullable(_$PaymentElementShowTermsEnumMap, json['payPal']), + sepaDebit: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['sepaDebit']), + sofort: + $enumDecodeNullable(_$PaymentElementShowTermsEnumMap, json['sofort']), + usBankAccount: $enumDecodeNullable( + _$PaymentElementShowTermsEnumMap, json['usBankAccount']), + ); + +Map _$$PaymentElementOptionsTermsImplToJson( + _$PaymentElementOptionsTermsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('applePay', _$PaymentElementShowTermsEnumMap[instance.applePay]); + writeNotNull( + 'auBecsDebit', _$PaymentElementShowTermsEnumMap[instance.auBecsDebit]); + writeNotNull( + 'bancontact', _$PaymentElementShowTermsEnumMap[instance.bancontact]); + writeNotNull('card', _$PaymentElementShowTermsEnumMap[instance.card]); + writeNotNull('cashApp', _$PaymentElementShowTermsEnumMap[instance.cashApp]); + writeNotNull( + 'googlePay', _$PaymentElementShowTermsEnumMap[instance.googlePay]); + writeNotNull('ideal', _$PaymentElementShowTermsEnumMap[instance.ideal]); + writeNotNull('payPal', _$PaymentElementShowTermsEnumMap[instance.payPal]); + writeNotNull( + 'sepaDebit', _$PaymentElementShowTermsEnumMap[instance.sepaDebit]); + writeNotNull('sofort', _$PaymentElementShowTermsEnumMap[instance.sofort]); + writeNotNull('usBankAccount', + _$PaymentElementShowTermsEnumMap[instance.usBankAccount]); + return val; +} + +const _$PaymentElementShowTermsEnumMap = { + PaymentElementShowTerms.never: 'never', + PaymentElementShowTerms.auto: 'auto', + PaymentElementShowTerms.always: 'always', +}; + +_$PaymentElementApplePayOptionsImpl + _$$PaymentElementApplePayOptionsImplFromJson(Map json) => + _$PaymentElementApplePayOptionsImpl( + recurringPaymentRequest: json['recurringPaymentRequest'] == null + ? null + : PaymentElementAppleRecurringRequest.fromJson( + Map.from( + json['recurringPaymentRequest'] as Map)), + deferredPaymentRequest: json['deferredPaymentRequest'] == null + ? null + : PaymentElementApplePayDeferredPaymentRequest.fromJson( + Map.from( + json['deferredPaymentRequest'] as Map)), + automaticReloadPaymentRequest: + json['automaticReloadPaymentRequest'] == null + ? null + : PaymentElementApplePayAutoReloadPaymentRequest.fromJson( + Map.from( + json['automaticReloadPaymentRequest'] as Map)), + ); + +Map _$$PaymentElementApplePayOptionsImplToJson( + _$PaymentElementApplePayOptionsImpl instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull( + 'recurringPaymentRequest', instance.recurringPaymentRequest?.toJson()); + writeNotNull( + 'deferredPaymentRequest', instance.deferredPaymentRequest?.toJson()); + writeNotNull('automaticReloadPaymentRequest', + instance.automaticReloadPaymentRequest?.toJson()); + return val; +} + +_$PaymentElementAppleRecurringRequestImpl + _$$PaymentElementAppleRecurringRequestImplFromJson(Map json) => + _$PaymentElementAppleRecurringRequestImpl( + paymentDescription: json['paymentDescription'] as String, + managementUrl: json['managementUrl'] as String, + trialBilling: json['trialBilling'] == null + ? null + : PaymentElementRecurringPaymentProperties.fromJson( + Map.from(json['trialBilling'] as Map)), + regularBilling: json['regularBilling'] == null + ? null + : PaymentElementRecurringPaymentProperties.fromJson( + Map.from(json['regularBilling'] as Map)), + ); + +Map _$$PaymentElementAppleRecurringRequestImplToJson( + _$PaymentElementAppleRecurringRequestImpl instance) { + final val = { + 'paymentDescription': instance.paymentDescription, + 'managementUrl': instance.managementUrl, + }; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('trialBilling', instance.trialBilling?.toJson()); + writeNotNull('regularBilling', instance.regularBilling?.toJson()); + return val; +} + +_$PaymentElementRecurringPaymentPropertiesImpl + _$$PaymentElementRecurringPaymentPropertiesImplFromJson(Map json) => + _$PaymentElementRecurringPaymentPropertiesImpl( + amount: (json['amount'] as num).toDouble(), + label: json['label'] as String, + recurringPaymentStartDate: json['recurringPaymentStartDate'] == null + ? null + : DateTime.parse(json['recurringPaymentStartDate'] as String), + recurringPaymentEndDate: json['recurringPaymentEndDate'] == null + ? null + : DateTime.parse(json['recurringPaymentEndDate'] as String), + recurringPaymentIntervalUnit: $enumDecodeNullable( + _$ApplePayRecurringPaymentTimeInterValEnumMap, + json['recurringPaymentIntervalUnit']), + recurringPaymentIntervalCount: + (json['recurringPaymentIntervalCount'] as num?)?.toInt(), + ); + +Map _$$PaymentElementRecurringPaymentPropertiesImplToJson( + _$PaymentElementRecurringPaymentPropertiesImpl instance) { + final val = { + 'amount': instance.amount, + 'label': instance.label, + }; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('recurringPaymentStartDate', + instance.recurringPaymentStartDate?.toIso8601String()); + writeNotNull('recurringPaymentEndDate', + instance.recurringPaymentEndDate?.toIso8601String()); + writeNotNull( + 'recurringPaymentIntervalUnit', + _$ApplePayRecurringPaymentTimeInterValEnumMap[ + instance.recurringPaymentIntervalUnit]); + writeNotNull( + 'recurringPaymentIntervalCount', instance.recurringPaymentIntervalCount); + return val; +} + +const _$ApplePayRecurringPaymentTimeInterValEnumMap = { + ApplePayRecurringPaymentTimeInterVal.year: 'year', + ApplePayRecurringPaymentTimeInterVal.month: 'month', + ApplePayRecurringPaymentTimeInterVal.day: 'day', + ApplePayRecurringPaymentTimeInterVal.hour: 'hour', + ApplePayRecurringPaymentTimeInterVal.minute: 'minute', +}; + +_$PaymentElementApplePayDeferredPaymentRequestImpl + _$$PaymentElementApplePayDeferredPaymentRequestImplFromJson(Map json) => + _$PaymentElementApplePayDeferredPaymentRequestImpl( + paymentDescription: json['paymentDescription'] as String, + managementUrl: json['managementUrl'] as String, + billingAgreement: json['billingAgreement'] as String?, + freeCancellationDate: json['freeCancellationDate'] == null + ? null + : DateTime.parse(json['freeCancellationDate'] as String), + freeCancellationTimezone: json['freeCancellationTimezone'] as String?, + deferredBilling: + PaymentElementApplePayDeferredPaymentProperties.fromJson( + Map.from(json['deferredBilling'] as Map)), + ); + +Map _$$PaymentElementApplePayDeferredPaymentRequestImplToJson( + _$PaymentElementApplePayDeferredPaymentRequestImpl instance) { + final val = { + 'paymentDescription': instance.paymentDescription, + 'managementUrl': instance.managementUrl, + }; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('billingAgreement', instance.billingAgreement); + writeNotNull( + 'freeCancellationDate', instance.freeCancellationDate?.toIso8601String()); + writeNotNull('freeCancellationTimezone', instance.freeCancellationTimezone); + val['deferredBilling'] = instance.deferredBilling.toJson(); + return val; +} + +_$PaymentElementApplePayDeferredPaymentPropertiesImpl + _$$PaymentElementApplePayDeferredPaymentPropertiesImplFromJson(Map json) => + _$PaymentElementApplePayDeferredPaymentPropertiesImpl( + amount: (json['amount'] as num).toDouble(), + label: json['label'] as String, + deferredPaymentDate: + DateTime.parse(json['deferredPaymentDate'] as String), + ); + +Map + _$$PaymentElementApplePayDeferredPaymentPropertiesImplToJson( + _$PaymentElementApplePayDeferredPaymentPropertiesImpl instance) => + { + 'amount': instance.amount, + 'label': instance.label, + 'deferredPaymentDate': instance.deferredPaymentDate.toIso8601String(), + }; + +_$PaymentElementApplePayAutoReloadPaymentRequestImpl + _$$PaymentElementApplePayAutoReloadPaymentRequestImplFromJson(Map json) => + _$PaymentElementApplePayAutoReloadPaymentRequestImpl( + paymentDescription: json['paymentDescription'] as String, + managementUrl: json['managementUrl'] as String, + automaticReloadBilling: + PaymentElementApplePayReloadPaymentProperties.fromJson( + Map.from( + json['automaticReloadBilling'] as Map)), + ); + +Map + _$$PaymentElementApplePayAutoReloadPaymentRequestImplToJson( + _$PaymentElementApplePayAutoReloadPaymentRequestImpl instance) => + { + 'paymentDescription': instance.paymentDescription, + 'managementUrl': instance.managementUrl, + 'automaticReloadBilling': instance.automaticReloadBilling.toJson(), + }; + +_$PaymentElementApplePayReloadPaymentPropertiesImpl + _$$PaymentElementApplePayReloadPaymentPropertiesImplFromJson(Map json) => + _$PaymentElementApplePayReloadPaymentPropertiesImpl( + amount: (json['amount'] as num).toDouble(), + label: json['label'] as String, + automaticReloadPaymentThresholdAmount: DateTime.parse( + json['automaticReloadPaymentThresholdAmount'] as String), + ); + +Map _$$PaymentElementApplePayReloadPaymentPropertiesImplToJson( + _$PaymentElementApplePayReloadPaymentPropertiesImpl instance) => + { + 'amount': instance.amount, + 'label': instance.label, + 'automaticReloadPaymentThresholdAmount': + instance.automaticReloadPaymentThresholdAmount.toIso8601String(), + }; diff --git a/packages/stripe_js/lib/src/api/elements/payment_intent_shipping_information.freezed.dart b/packages/stripe_js/lib/src/api/elements/payment_intent_shipping_information.freezed.dart index 01d89cb4f..3ff69eaf5 100644 --- a/packages/stripe_js/lib/src/api/elements/payment_intent_shipping_information.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/payment_intent_shipping_information.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_intent_shipping_information.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#custom-getters-and-methods'); + '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'); PaymentElementShippingDetails _$PaymentElementShippingDetailsFromJson( Map json) { @@ -128,7 +128,7 @@ class _$PaymentElementShippingDetailsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentElementShippingDetailsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_data.freezed.dart index 89a1739f4..37d6223df 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_acss_debit_payment_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#custom-getters-and-methods'); + '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'); ConfirmAcssDebitPaymentData _$ConfirmAcssDebitPaymentDataFromJson( Map json) { @@ -129,7 +129,7 @@ class _$ConfirmAcssDebitPaymentDataImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmAcssDebitPaymentDataImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_options.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_options.freezed.dart index b9b8a6e30..183599fdb 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_acss_debit_payment_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_acss_debit_payment_options.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#custom-getters-and-methods'); + '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'); ConfirmAcssDebitPaymentOptions _$ConfirmAcssDebitPaymentOptionsFromJson( Map json) { @@ -123,7 +123,7 @@ class _$ConfirmAcssDebitPaymentOptionsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmAcssDebitPaymentOptionsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.g.dart b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.g.dart index 2c53088bc..bb566f45c 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.g.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.g.dart @@ -10,21 +10,21 @@ _$PaymentIntentImpl _$$PaymentIntentImplFromJson(Map json) => _$PaymentIntentImpl( id: json['id'] as String, object: json['object'] as String? ?? "payment_intent", - amount: json['amount'] as int, - amountCapturable: json['amount_capturable'] as int?, + amount: (json['amount'] as num).toInt(), + amountCapturable: (json['amount_capturable'] as num?)?.toInt(), amountDetails: json['amount_details'] == null ? const PaymentIntentAmountDetails() : PaymentIntentAmountDetails.fromJson( Map.from(json['amount_details'] as Map)), - amountReceived: json['amount_received'] as int?, + amountReceived: (json['amount_received'] as num?)?.toInt(), application: json['application'] as String?, - applicationFeeAmount: json['application_fee_amount'] as int?, + applicationFeeAmount: (json['application_fee_amount'] as num?)?.toInt(), automaticPaymentMethods: json['automatic_payment_methods'] == null ? null : PaymentIntentAutomaticPaymentMethods.fromJson( Map.from( json['automatic_payment_methods'] as Map)), - canceledAt: json['canceled_at'] as int?, + canceledAt: (json['canceled_at'] as num?)?.toInt(), cancellationReason: $enumDecodeNullable( _$PaymentIntentCancellationReasonEnumMap, json['cancellation_reason']), @@ -36,7 +36,7 @@ _$PaymentIntentImpl _$$PaymentIntentImplFromJson(Map json) => _$PaymentIntentConfirmationMethodEnumMap, json['confirmation_method']) ?? PaymentIntentConfirmationMethod.automatic, - created: json['created'] as int?, + created: (json['created'] as num?)?.toInt(), currency: json['currency'] as String, customer: json['customer'] as String?, description: json['description'] as String?, @@ -231,7 +231,7 @@ Map _$$PaymentIntentAmountDetailsImplToJson( _$PaymentIntentTipImpl _$$PaymentIntentTipImplFromJson(Map json) => _$PaymentIntentTipImpl( - amount: json['amount'] as int?, + amount: (json['amount'] as num?)?.toInt(), ); Map _$$PaymentIntentTipImplToJson( diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_method.g.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_method.g.dart index 29a49eaa9..1658020c6 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_method.g.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_method.g.dart @@ -20,7 +20,7 @@ _$PaymentMethodImpl _$$PaymentMethodImplFromJson(Map json) => ) ?? const {}, livemode: json['livemode'] as bool? ?? true, - created: json['created'] as int?, + created: (json['created'] as num?)?.toInt(), card: json['card'] == null ? null : CardPaymentMethod.fromJson( @@ -167,8 +167,8 @@ _$CardPaymentMethodImpl _$$CardPaymentMethodImplFromJson(Map json) => _$CardPaymentMethodImpl( brand: json['brand'] as String?, country: json['country'] as String?, - expYear: json['expYear'] as int?, - expMonth: json['expMonth'] as int?, + expYear: (json['expYear'] as num?)?.toInt(), + expMonth: (json['expMonth'] as num?)?.toInt(), funding: json['funding'] as String?, last4: json['last4'] as String?, preferredNetwork: json['preferredNetwork'] as String?, diff --git a/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_options.freezed.dart b/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_options.freezed.dart index d67665be3..111173984 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_card_setup_options.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#custom-getters-and-methods'); + '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'); ConfirmCardSetupOptions _$ConfirmCardSetupOptionsFromJson( Map json) { @@ -123,7 +123,7 @@ class _$ConfirmCardSetupOptionsImpl implements _ConfirmCardSetupOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmCardSetupOptionsImpl && diff --git a/packages/stripe_js/lib/src/api/setup_intents/confirm_sepa_debit_setup_data.freezed.dart b/packages/stripe_js/lib/src/api/setup_intents/confirm_sepa_debit_setup_data.freezed.dart index baf91f391..9cad1262f 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/confirm_sepa_debit_setup_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/confirm_sepa_debit_setup_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_sepa_debit_setup_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#custom-getters-and-methods'); + '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'); ConfirmSepaDebitSetupData _$ConfirmSepaDebitSetupDataFromJson( Map json) { @@ -119,7 +119,7 @@ class _$ConfirmCardSetupDataImpl implements _ConfirmCardSetupData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmCardSetupDataImpl && diff --git a/packages/stripe_js/lib/src/api/setup_intents/setup_intent.g.dart b/packages/stripe_js/lib/src/api/setup_intents/setup_intent.g.dart index 297f94623..35a5752cd 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/setup_intent.g.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/setup_intent.g.dart @@ -14,7 +14,7 @@ _$SetupIntentImpl _$$SetupIntentImplFromJson(Map json) => _$SetupIntentImpl( cancellationReason: $enumDecodeNullable( _$SetupIntentCancellationReasonEnumMap, json['cancellation_reason']), clientSecret: json['client_secret'] as String, - created: json['created'] as int?, + created: (json['created'] as num?)?.toInt(), customer: json['customer'] as String?, description: json['description'] as String?, flowDirections: (json['flow_directions'] as List?) diff --git a/packages/stripe_js/lib/src/api/tokens/create_token_card_data.freezed.dart b/packages/stripe_js/lib/src/api/tokens/create_token_card_data.freezed.dart index f984ec2b8..db8c6dd8e 100644 --- a/packages/stripe_js/lib/src/api/tokens/create_token_card_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/tokens/create_token_card_data.freezed.dart @@ -12,7 +12,7 @@ part of 'create_token_card_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#custom-getters-and-methods'); + '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'); CreateTokenCardData _$CreateTokenCardDataFromJson(Map json) { return _CreateTokenCardData.fromJson(json); @@ -278,7 +278,7 @@ class _$CreateTokenCardDataImpl implements _CreateTokenCardData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenCardDataImpl && diff --git a/packages/stripe_js/lib/src/api/tokens/create_token_pii_data.freezed.dart b/packages/stripe_js/lib/src/api/tokens/create_token_pii_data.freezed.dart index 6e2165533..3162f1e5f 100644 --- a/packages/stripe_js/lib/src/api/tokens/create_token_pii_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/tokens/create_token_pii_data.freezed.dart @@ -12,7 +12,7 @@ part of 'create_token_pii_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#custom-getters-and-methods'); + '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'); CreateTokenPIIData _$CreateTokenPIIDataFromJson(Map json) { return _CreateTokenPIIData.fromJson(json); @@ -114,7 +114,7 @@ class _$CreateTokenPIIDataImpl implements _CreateTokenPIIData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenPIIDataImpl && diff --git a/packages/stripe_js/lib/src/api/tokens/token.freezed.dart b/packages/stripe_js/lib/src/api/tokens/token.freezed.dart index 50c635d7c..21b06bc8b 100644 --- a/packages/stripe_js/lib/src/api/tokens/token.freezed.dart +++ b/packages/stripe_js/lib/src/api/tokens/token.freezed.dart @@ -12,7 +12,7 @@ part of 'token.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#custom-getters-and-methods'); + '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'); Token _$TokenFromJson(Map json) { return _Token.fromJson(json); @@ -320,7 +320,7 @@ class _$TokenImpl implements _Token { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$TokenImpl && @@ -809,7 +809,7 @@ class _$BankAccountTokenImpl implements _BankAccountToken { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BankAccountTokenImpl && @@ -1613,7 +1613,7 @@ class _$CardTokenImpl implements _CardToken { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardTokenImpl && diff --git a/packages/stripe_js/lib/src/api/tokens/token.g.dart b/packages/stripe_js/lib/src/api/tokens/token.g.dart index 0b9d15656..696e6d82c 100644 --- a/packages/stripe_js/lib/src/api/tokens/token.g.dart +++ b/packages/stripe_js/lib/src/api/tokens/token.g.dart @@ -17,7 +17,7 @@ _$TokenImpl _$$TokenImplFromJson(Map json) => _$TokenImpl( ? null : CardToken.fromJson(Map.from(json['card'] as Map)), clientIP: json['client_ip'] as String?, - created: json['created'] as int?, + created: (json['created'] as num?)?.toInt(), livemode: json['livemode'] as bool? ?? true, type: $enumDecode(_$TokenTypeEnumMap, json['type']), used: json['used'] as bool? ?? false, @@ -129,8 +129,8 @@ _$CardTokenImpl _$$CardTokenImplFromJson(Map json) => _$CardTokenImpl( cvcCheck: $enumDecodeNullable(_$VerificationCheckEnumMap, json['cvc_check']), dynamicLast4: json['dynamic_last4'] as String?, - expMonth: json['exp_month'] as int?, - expYear: json['exp_year'] as int?, + expMonth: (json['exp_month'] as num?)?.toInt(), + expYear: (json['exp_year'] as num?)?.toInt(), fingerprint: json['fingerprint'] as String?, funding: $enumDecodeNullable(_$CardFundingTypeEnumMap, json['funding']), last4: json['last4'] as String?, diff --git a/packages/stripe_web/lib/src/models/confirm_payment_options.freezed.dart b/packages/stripe_web/lib/src/models/confirm_payment_options.freezed.dart index 96b267ee4..8f3cca8be 100644 --- a/packages/stripe_web/lib/src/models/confirm_payment_options.freezed.dart +++ b/packages/stripe_web/lib/src/models/confirm_payment_options.freezed.dart @@ -98,12 +98,12 @@ class _$ConfirmPaymentElementOptionsCopyWithImpl<$Res, } /// @nodoc -abstract class _$$_ConfirmPaymentElementOptionsCopyWith<$Res> +abstract class _$$ConfirmPaymentElementOptionsImplCopyWith<$Res> implements $ConfirmPaymentElementOptionsCopyWith<$Res> { - factory _$$_ConfirmPaymentElementOptionsCopyWith( - _$_ConfirmPaymentElementOptions value, - $Res Function(_$_ConfirmPaymentElementOptions) then) = - __$$_ConfirmPaymentElementOptionsCopyWithImpl<$Res>; + factory _$$ConfirmPaymentElementOptionsImplCopyWith( + _$ConfirmPaymentElementOptionsImpl value, + $Res Function(_$ConfirmPaymentElementOptionsImpl) then) = + __$$ConfirmPaymentElementOptionsImplCopyWithImpl<$Res>; @override @useResult $Res call( @@ -115,13 +115,13 @@ abstract class _$$_ConfirmPaymentElementOptionsCopyWith<$Res> } /// @nodoc -class __$$_ConfirmPaymentElementOptionsCopyWithImpl<$Res> +class __$$ConfirmPaymentElementOptionsImplCopyWithImpl<$Res> extends _$ConfirmPaymentElementOptionsCopyWithImpl<$Res, - _$_ConfirmPaymentElementOptions> - implements _$$_ConfirmPaymentElementOptionsCopyWith<$Res> { - __$$_ConfirmPaymentElementOptionsCopyWithImpl( - _$_ConfirmPaymentElementOptions _value, - $Res Function(_$_ConfirmPaymentElementOptions) _then) + _$ConfirmPaymentElementOptionsImpl> + implements _$$ConfirmPaymentElementOptionsImplCopyWith<$Res> { + __$$ConfirmPaymentElementOptionsImplCopyWithImpl( + _$ConfirmPaymentElementOptionsImpl _value, + $Res Function(_$ConfirmPaymentElementOptionsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -130,7 +130,7 @@ class __$$_ConfirmPaymentElementOptionsCopyWithImpl<$Res> Object? confirmParams = null, Object? redirect = freezed, }) { - return _then(_$_ConfirmPaymentElementOptions( + return _then(_$ConfirmPaymentElementOptionsImpl( confirmParams: null == confirmParams ? _value.confirmParams : confirmParams // ignore: cast_nullable_to_non_nullable @@ -145,12 +145,14 @@ class __$$_ConfirmPaymentElementOptionsCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$_ConfirmPaymentElementOptions implements _ConfirmPaymentElementOptions { - const _$_ConfirmPaymentElementOptions( +class _$ConfirmPaymentElementOptionsImpl + implements _ConfirmPaymentElementOptions { + const _$ConfirmPaymentElementOptionsImpl( {required this.confirmParams, this.redirect}); - factory _$_ConfirmPaymentElementOptions.fromJson(Map json) => - _$$_ConfirmPaymentElementOptionsFromJson(json); + factory _$ConfirmPaymentElementOptionsImpl.fromJson( + Map json) => + _$$ConfirmPaymentElementOptionsImplFromJson(json); /// Parameters that will be passed on to the Stripe API. /// Refer to the Payment Intents API for a full list of parameters. @@ -179,7 +181,7 @@ class _$_ConfirmPaymentElementOptions implements _ConfirmPaymentElementOptions { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_ConfirmPaymentElementOptions && + other is _$ConfirmPaymentElementOptionsImpl && (identical(other.confirmParams, confirmParams) || other.confirmParams == confirmParams) && (identical(other.redirect, redirect) || @@ -193,13 +195,14 @@ class _$_ConfirmPaymentElementOptions implements _ConfirmPaymentElementOptions { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_ConfirmPaymentElementOptionsCopyWith<_$_ConfirmPaymentElementOptions> - get copyWith => __$$_ConfirmPaymentElementOptionsCopyWithImpl< - _$_ConfirmPaymentElementOptions>(this, _$identity); + _$$ConfirmPaymentElementOptionsImplCopyWith< + _$ConfirmPaymentElementOptionsImpl> + get copyWith => __$$ConfirmPaymentElementOptionsImplCopyWithImpl< + _$ConfirmPaymentElementOptionsImpl>(this, _$identity); @override Map toJson() { - return _$$_ConfirmPaymentElementOptionsToJson( + return _$$ConfirmPaymentElementOptionsImplToJson( this, ); } @@ -210,10 +213,10 @@ abstract class _ConfirmPaymentElementOptions const factory _ConfirmPaymentElementOptions( {required final ConfirmPaymentParams confirmParams, final PaymentConfirmationRedirect? redirect}) = - _$_ConfirmPaymentElementOptions; + _$ConfirmPaymentElementOptionsImpl; factory _ConfirmPaymentElementOptions.fromJson(Map json) = - _$_ConfirmPaymentElementOptions.fromJson; + _$ConfirmPaymentElementOptionsImpl.fromJson; @override @@ -235,6 +238,7 @@ abstract class _ConfirmPaymentElementOptions PaymentConfirmationRedirect? get redirect; @override @JsonKey(ignore: true) - _$$_ConfirmPaymentElementOptionsCopyWith<_$_ConfirmPaymentElementOptions> + _$$ConfirmPaymentElementOptionsImplCopyWith< + _$ConfirmPaymentElementOptionsImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/stripe_web/lib/src/models/confirm_payment_options.g.dart b/packages/stripe_web/lib/src/models/confirm_payment_options.g.dart index 03f120f05..c2d2df858 100644 --- a/packages/stripe_web/lib/src/models/confirm_payment_options.g.dart +++ b/packages/stripe_web/lib/src/models/confirm_payment_options.g.dart @@ -6,17 +6,17 @@ part of 'confirm_payment_options.dart'; // JsonSerializableGenerator // ************************************************************************** -_$_ConfirmPaymentElementOptions _$$_ConfirmPaymentElementOptionsFromJson( +_$ConfirmPaymentElementOptionsImpl _$$ConfirmPaymentElementOptionsImplFromJson( Map json) => - _$_ConfirmPaymentElementOptions( + _$ConfirmPaymentElementOptionsImpl( confirmParams: ConfirmPaymentParams.fromJson( Map.from(json['confirmParams'] as Map)), redirect: $enumDecodeNullable( _$PaymentConfirmationRedirectEnumMap, json['redirect']), ); -Map _$$_ConfirmPaymentElementOptionsToJson( - _$_ConfirmPaymentElementOptions instance) { +Map _$$ConfirmPaymentElementOptionsImplToJson( + _$ConfirmPaymentElementOptionsImpl instance) { final val = { 'confirmParams': instance.confirmParams.toJson(), }; @@ -34,5 +34,5 @@ Map _$$_ConfirmPaymentElementOptionsToJson( const _$PaymentConfirmationRedirectEnumMap = { PaymentConfirmationRedirect.always: 'always', - PaymentConfirmationRedirect.ifRequired: 'ifRequired', + PaymentConfirmationRedirect.ifRequired: 'if_required', }; diff --git a/packages/stripe_web/lib/src/widgets/card_field.dart b/packages/stripe_web/lib/src/widgets/card_field.dart index a512f9dcf..6aa90cdbd 100644 --- a/packages/stripe_web/lib/src/widgets/card_field.dart +++ b/packages/stripe_web/lib/src/widgets/card_field.dart @@ -53,9 +53,6 @@ class WebCardField extends StatefulWidget { class WebStripeCardState extends State with CardFieldContext { CardEditController get controller => widget.controller; - late MutationObserver mutationObserver; - - @override void initState() { // ignore: undefined_prefixed_name ui.platformViewRegistry.registerViewFactory( @@ -64,24 +61,6 @@ class WebStripeCardState extends State with CardFieldContext { ..id = 'card-element' ..style.border = 'none', ); - mutationObserver = MutationObserver((entries, observer) { - if (document.getElementById('card-element') != null) { - mutationObserver.disconnect(); - - updateCardDetails( - const CardFieldInputDetails(complete: false), - controller, - ); - element = WebStripe.js - .elements(createElementOptions()) - .createCard(createOptions()) - ..mount('#card-element') - ..onBlur(requestBlur) - ..onFocus(requestFocus) - ..onChange(onCardChanged); - } - }); - mutationObserver.observe(document, childList: true, subtree: true); initStripe(); super.initState(); } @@ -100,7 +79,6 @@ class WebStripeCardState extends State with CardFieldContext { dev.log('WARNING! Initial card data value has been ignored. \n' '$kDebugPCIMessage'); } - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { updateCardDetails( const CardFieldInputDetails(complete: false), @@ -209,7 +187,6 @@ class WebStripeCardState extends State with CardFieldContext { void dispose() { detachController(controller); element?.unmount(); - mutationObserver.disconnect(); super.dispose(); }