From 7d300ce10d24f552a5a2cbc9e23162fbe20a62d2 Mon Sep 17 00:00:00 2001 From: dagyu Date: Thu, 28 Mar 2024 13:03:21 +0100 Subject: [PATCH 1/2] fix #1681 changing JsonKey to JsonValue and add unknownValue --- .../api/payment_intents/payment_intent.dart | 5 +++- .../src/api/payment_methods/payment_type.dart | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.dart b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.dart index eedef7784..563d8a38e 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.dart @@ -210,7 +210,10 @@ class PaymentIntent with _$PaymentIntent { /// The list of payment method types (e.g. card) that this PaymentIntent /// is allowed to use. - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", + unknownEnumValue: PaymentMethodType.unknown, + ) @Default([]) List paymentMethodTypes, diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_type.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_type.dart index 5571e6a81..bca99ec48 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_type.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_type.dart @@ -6,25 +6,25 @@ import 'package:freezed_annotation/freezed_annotation.dart'; /// type. enum PaymentMethodType { /// Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (ACSS). - @JsonKey(name: "acss_debit") + @JsonValue("acss_debit") acssDebit, /// Affirm is a buy now, pay later payment method in the US. affirm, /// Afterpay / Clearpay is a buy now, pay later payment method used in Australia, Canada, France, New Zealand, Spain, the UK, and the US. - @JsonKey(name: "afterpay_clearpay") + @JsonValue("afterpay_clearpay") afterpayClearpay, /// Alipay is a digital wallet payment method used in China. alipay, /// BECS Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (BECS). - @JsonKey(name: "au_becs_debit") + @JsonValue("au_becs_debit") auBecsDebit, /// Bacs Direct Debit is used to debit UK bank accounts. - @JsonKey(name: "bacs_debit") + @JsonValue("bacs_debit") bacsDebit, /// Bancontact is a bank redirect payment method used in Belgium. @@ -43,11 +43,11 @@ enum PaymentMethodType { cashapp, /// Stripe Terminal is used to collect in-person card payments. - @JsonKey(name: "bacs_debit") + @JsonValue("bacs_debit") cardPresent, /// Uses a customer’s cash balance for the payment. - @JsonKey(name: "customer_balance") + @JsonValue("customer_balance") customerBalance, /// EPS is an Austria-based bank redirect payment method. @@ -66,7 +66,7 @@ enum PaymentMethodType { ideal, /// Stripe Terminal accepts Interac debit cards for in-person payments in Canada. - @JsonKey(name: "interac_present") + @JsonValue("interac_present") interacPresent, /// Klarna is a global buy now, pay later payment method. @@ -94,17 +94,19 @@ enum PaymentMethodType { promptpay, /// SEPA Direct Debit is used to debit bank accounts within the Single Euro Payments Area (SEPA) region. - @JsonKey(name: "sepa_debit") + @JsonValue("sepa_debit") sepaDebit, /// Sofort is a bank redirect payment method used in Europe. sofort, /// ACH Direct Debit is used to debit US bank accounts through the Automated Clearing House (ACH) payments system. - @JsonKey(name: "us_bank_account") + @JsonValue("us_bank_account") usBankAccount, /// WeChat Pay is a digital wallet payment method based in China. - @JsonKey(name: "wechat_pay") - wechatPay + @JsonValue("wechat_pay") + wechatPay, + + unknown } From acfe67f7ed33de28c8d1e61ad2552dc0f1704e94 Mon Sep 17 00:00:00 2001 From: dagyu Date: Thu, 28 Mar 2024 14:59:43 +0100 Subject: [PATCH 2/2] Generated files in stripe_js --- .../card_element_change_event.freezed.dart | 6 +- .../confirm_alipay_payment_data.freezed.dart | 4 +- ...onfirm_alipay_payment_options.freezed.dart | 4 +- .../confirm_card_payment_data.freezed.dart | 4 +- .../confirm_card_payment_options.freezed.dart | 4 +- .../confirm_ideal_payment_data.freezed.dart | 4 +- ...confirm_ideal_payment_options.freezed.dart | 4 +- .../confirm_payment_options.freezed.dart | 6 +- ...nfirm_sepa_debit_payment_data.freezed.dart | 14 ++--- .../payment_intent.freezed.dart | 35 +++++++---- .../api/payment_intents/payment_intent.g.dart | 24 +++---- .../payment_intent_response.freezed.dart | 4 +- .../create_payment_method_data.freezed.dart | 4 +- .../payment_method.freezed.dart | 22 +++---- .../api/payment_methods/payment_method.g.dart | 21 ++++--- .../payment_method_details.freezed.dart | 18 +++--- .../payment_method_params.freezed.dart | 62 +++++++++---------- .../payment_method_response.freezed.dart | 4 +- .../confirm_card_setup_data.freezed.dart | 4 +- .../setup_intents/setup_intent.freezed.dart | 4 +- .../src/api/setup_intents/setup_intent.g.dart | 21 ++++--- .../setup_intent_response.freezed.dart | 4 +- ...reate_token_bank_account_data.freezed.dart | 4 +- .../api/tokens/token_response.freezed.dart | 4 +- 24 files changed, 150 insertions(+), 135 deletions(-) diff --git a/packages/stripe_js/lib/src/api/elements/card_element_change_event.freezed.dart b/packages/stripe_js/lib/src/api/elements/card_element_change_event.freezed.dart index 00ca4f680..2ee50e417 100644 --- a/packages/stripe_js/lib/src/api/elements/card_element_change_event.freezed.dart +++ b/packages/stripe_js/lib/src/api/elements/card_element_change_event.freezed.dart @@ -12,7 +12,7 @@ part of 'card_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'); CardElementChangeEvent _$CardElementChangeEventFromJson( Map json) { @@ -231,7 +231,7 @@ class _$CardElementChangeEventImpl implements _CardElementChangeEvent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardElementChangeEventImpl && @@ -401,7 +401,7 @@ class _$CardElementChangeEventValueImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardElementChangeEventValueImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_data.freezed.dart index 30fc07777..70fa2f314 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_alipay_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'); ConfirmAlipayPaymentData _$ConfirmAlipayPaymentDataFromJson( Map json) { @@ -149,7 +149,7 @@ class _$ConfirmAlipayPaymentDataImpl implements _ConfirmAlipayPaymentData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmAlipayPaymentDataImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_options.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_options.freezed.dart index 2ec05406f..b29b5daa4 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_alipay_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'); ConfirmAlipayPaymentOptions _$ConfirmAlipayPaymentOptionsFromJson( Map json) { @@ -125,7 +125,7 @@ class _$ConfirmAlipayPaymentOptionsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmAlipayPaymentOptionsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_data.freezed.dart index b9c746b2d..f1c2d2a2c 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_card_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'); ConfirmCardPaymentData _$ConfirmCardPaymentDataFromJson( Map json) { @@ -304,7 +304,7 @@ class _$ConfirmCardPaymentDataImpl implements _ConfirmCardPaymentData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmCardPaymentDataImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_options.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_options.freezed.dart index ffe838752..50cbe01c8 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_card_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'); ConfirmCardPaymentOptions _$ConfirmCardPaymentOptionsFromJson( Map json) { @@ -123,7 +123,7 @@ class _$ConfirmCardPaymentOptionsImpl implements _ConfirmCardPaymentOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmCardPaymentOptionsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_data.freezed.dart index 5e149f778..6e19d6cd8 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_ideal_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'); ConfirmIdealPaymentData _$ConfirmIdealPaymentDataFromJson( Map json) { @@ -201,7 +201,7 @@ class _$ConfirmIdealPaymentDataImpl implements _ConfirmIdealPaymentData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmIdealPaymentDataImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_options.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_options.freezed.dart index 964dd47b7..e38df77b8 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_ideal_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'); ConfirmIdealPaymentOptions _$ConfirmIdealPaymentOptionsFromJson( Map json) { @@ -123,7 +123,7 @@ class _$ConfirmIdealPaymentOptionsImpl implements _ConfirmIdealPaymentOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmIdealPaymentOptionsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_payment_options.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_payment_options.freezed.dart index 6f11f938b..a9b355b56 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_payment_options.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_payment_options.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_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'); ConfirmPaymentOptions _$ConfirmPaymentOptionsFromJson( Map json) { @@ -196,7 +196,7 @@ class _$ConfirmPaymentOptionsImpl implements _ConfirmPaymentOptions { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmPaymentOptionsImpl && @@ -367,7 +367,7 @@ class _$ConfirmPaymentParamsImpl implements _ConfirmPaymentParams { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmPaymentParamsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/confirm_sepa_debit_payment_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/confirm_sepa_debit_payment_data.freezed.dart index d80d048f4..021895e37 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/confirm_sepa_debit_payment_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/confirm_sepa_debit_payment_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_sepa_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'); ConfirmSepaDebitPaymentData _$ConfirmSepaDebitPaymentDataFromJson( Map json) { @@ -183,7 +183,7 @@ class _$ConfirmSepaDebitPaymentDataImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConfirmSepaDebitPaymentDataImpl && @@ -417,7 +417,7 @@ class _$IdSepaDebitPaymentMethodDetailsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdSepaDebitPaymentMethodDetailsImpl && @@ -641,7 +641,7 @@ class _$SepaDebitPaymentMethodDetailsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaDebitPaymentMethodDetailsImpl && @@ -888,7 +888,7 @@ class _$SepaDebitPaymentMethodDetailsWithIbanImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaDebitPaymentMethodDetailsWithIbanImpl && @@ -1135,7 +1135,7 @@ class _$SepaDebitIbanDataImpl implements _SepaDebitIbanData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaDebitIbanDataImpl && @@ -1348,7 +1348,7 @@ class _$SepaBillingDetailsImpl implements _SepaBillingDetails { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaBillingDetailsImpl && diff --git a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.freezed.dart index caca49e43..b69f97233 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/payment_intent.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/payment_intent.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_intent.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#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'); PaymentIntent _$PaymentIntentFromJson(Map json) { return _PaymentIntent.fromJson(json); @@ -171,7 +171,8 @@ mixin _$PaymentIntent { /// The list of payment method types (e.g. card) that this PaymentIntent /// is allowed to use. - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", unknownEnumValue: PaymentMethodType.unknown) List get paymentMethodTypes => throw _privateConstructorUsedError; @@ -280,7 +281,9 @@ abstract class $PaymentIntentCopyWith<$Res> { @JsonKey(name: "payment_method") String? paymentMethod, @JsonKey(name: "payment_method_options") Map paymentMethodOptions, - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", + unknownEnumValue: PaymentMethodType.unknown) List paymentMethodTypes, dynamic processing, @JsonKey(name: "receipt_email") String? receiptEmail, @@ -603,7 +606,9 @@ abstract class _$$PaymentIntentImplCopyWith<$Res> @JsonKey(name: "payment_method") String? paymentMethod, @JsonKey(name: "payment_method_options") Map paymentMethodOptions, - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", + unknownEnumValue: PaymentMethodType.unknown) List paymentMethodTypes, dynamic processing, @JsonKey(name: "receipt_email") String? receiptEmail, @@ -871,7 +876,9 @@ class _$PaymentIntentImpl implements _PaymentIntent { @JsonKey(name: "payment_method") this.paymentMethod, @JsonKey(name: "payment_method_options") final Map paymentMethodOptions = const {}, - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", + unknownEnumValue: PaymentMethodType.unknown) final List paymentMethodTypes = const [], this.processing, @JsonKey(name: "receipt_email") this.receiptEmail, @@ -1087,7 +1094,8 @@ class _$PaymentIntentImpl implements _PaymentIntent { /// The list of payment method types (e.g. card) that this PaymentIntent /// is allowed to use. @override - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", unknownEnumValue: PaymentMethodType.unknown) List get paymentMethodTypes { if (_paymentMethodTypes is EqualUnmodifiableListView) return _paymentMethodTypes; @@ -1170,7 +1178,7 @@ class _$PaymentIntentImpl implements _PaymentIntent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentImpl && @@ -1338,7 +1346,9 @@ abstract class _PaymentIntent implements PaymentIntent { @JsonKey(name: "payment_method") final String? paymentMethod, @JsonKey(name: "payment_method_options") final Map paymentMethodOptions, - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", + unknownEnumValue: PaymentMethodType.unknown) final List paymentMethodTypes, final dynamic processing, @JsonKey(name: "receipt_email") final String? receiptEmail, @@ -1531,7 +1541,8 @@ abstract class _PaymentIntent implements PaymentIntent { /// The list of payment method types (e.g. card) that this PaymentIntent /// is allowed to use. - @JsonKey(name: "payment_method_types") + @JsonKey( + name: "payment_method_types", unknownEnumValue: PaymentMethodType.unknown) List get paymentMethodTypes; @override @@ -1731,7 +1742,7 @@ class _$PaymentIntentAmountDetailsImpl implements _PaymentIntentAmountDetails { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentAmountDetailsImpl && @@ -1874,7 +1885,7 @@ class _$PaymentIntentTipImpl implements _PaymentIntentTip { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentTipImpl && @@ -2025,7 +2036,7 @@ class _$PaymentIntentAutomaticPaymentMethodsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentAutomaticPaymentMethodsImpl && 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 a0ea47a06..91f9bbe0a 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 @@ -56,7 +56,8 @@ _$PaymentIntentImpl _$$PaymentIntentImplFromJson(Map json) => paymentMethod: json['payment_method'] as String?, paymentMethodOptions: json['payment_method_options'] as Map? ?? const {}, paymentMethodTypes: (json['payment_method_types'] as List?) - ?.map((e) => $enumDecode(_$PaymentMethodTypeEnumMap, e)) + ?.map((e) => $enumDecode(_$PaymentMethodTypeEnumMap, e, + unknownValue: PaymentMethodType.unknown)) .toList() ?? const [], processing: json['processing'], @@ -155,25 +156,25 @@ const _$PaymentIntentConfirmationMethodEnumMap = { }; const _$PaymentMethodTypeEnumMap = { - PaymentMethodType.acssDebit: 'acssDebit', + PaymentMethodType.acssDebit: 'acss_debit', PaymentMethodType.affirm: 'affirm', - PaymentMethodType.afterpayClearpay: 'afterpayClearpay', + PaymentMethodType.afterpayClearpay: 'afterpay_clearpay', PaymentMethodType.alipay: 'alipay', - PaymentMethodType.auBecsDebit: 'auBecsDebit', - PaymentMethodType.bacsDebit: 'bacsDebit', + PaymentMethodType.auBecsDebit: 'au_becs_debit', + PaymentMethodType.bacsDebit: 'bacs_debit', PaymentMethodType.bancontact: 'bancontact', PaymentMethodType.blik: 'blik', PaymentMethodType.boleto: 'boleto', PaymentMethodType.card: 'card', PaymentMethodType.cashapp: 'cashapp', - PaymentMethodType.cardPresent: 'cardPresent', - PaymentMethodType.customerBalance: 'customerBalance', + PaymentMethodType.cardPresent: 'bacs_debit', + PaymentMethodType.customerBalance: 'customer_balance', PaymentMethodType.eps: 'eps', PaymentMethodType.fpx: 'fpx', PaymentMethodType.giropay: 'giropay', PaymentMethodType.grabpay: 'grabpay', PaymentMethodType.ideal: 'ideal', - PaymentMethodType.interacPresent: 'interacPresent', + PaymentMethodType.interacPresent: 'interac_present', PaymentMethodType.klarna: 'klarna', PaymentMethodType.konbini: 'konbini', PaymentMethodType.link: 'link', @@ -182,10 +183,11 @@ const _$PaymentMethodTypeEnumMap = { PaymentMethodType.paynow: 'paynow', PaymentMethodType.pix: 'pix', PaymentMethodType.promptpay: 'promptpay', - PaymentMethodType.sepaDebit: 'sepaDebit', + PaymentMethodType.sepaDebit: 'sepa_debit', PaymentMethodType.sofort: 'sofort', - PaymentMethodType.usBankAccount: 'usBankAccount', - PaymentMethodType.wechatPay: 'wechatPay', + PaymentMethodType.usBankAccount: 'us_bank_account', + PaymentMethodType.wechatPay: 'wechat_pay', + PaymentMethodType.unknown: 'unknown', }; const _$PaymentIntentSetupFutureUsageEnumMap = { diff --git a/packages/stripe_js/lib/src/api/payment_intents/payment_intent_response.freezed.dart b/packages/stripe_js/lib/src/api/payment_intents/payment_intent_response.freezed.dart index fede51fbd..494bd87f7 100644 --- a/packages/stripe_js/lib/src/api/payment_intents/payment_intent_response.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_intents/payment_intent_response.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_intent_response.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'); PaymentIntentResponse _$PaymentIntentResponseFromJson( Map json) { @@ -166,7 +166,7 @@ class _$PaymentIntentResponseImpl implements _PaymentIntentResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentIntentResponseImpl && diff --git a/packages/stripe_js/lib/src/api/payment_methods/create_payment_method_data.freezed.dart b/packages/stripe_js/lib/src/api/payment_methods/create_payment_method_data.freezed.dart index 4da139562..e99969754 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/create_payment_method_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/create_payment_method_data.freezed.dart @@ -12,7 +12,7 @@ part of 'create_payment_method_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'); CreatePaymentMethodData _$CreatePaymentMethodDataFromJson( Map json) { @@ -384,7 +384,7 @@ class _$CreatePaymentMethodDataImpl implements _CreatePaymentMethodData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreatePaymentMethodDataImpl && diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_method.freezed.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_method.freezed.dart index e56d101bd..566d4b61e 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_method.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_method.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_method.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'); PaymentMethod _$PaymentMethodFromJson(Map json) { return _PaymentMethod.fromJson(json); @@ -620,7 +620,7 @@ class _$PaymentMethodImpl implements _PaymentMethod { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodImpl && @@ -926,7 +926,7 @@ class _$AuBecsDebitImpl implements _AuBecsDebit { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AuBecsDebitImpl && @@ -1115,7 +1115,7 @@ class _$BacsDebitImpl implements _BacsDebit { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BacsDebitImpl && @@ -1425,7 +1425,7 @@ class _$CardPaymentMethodImpl implements _CardPaymentMethod { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardPaymentMethodImpl && @@ -1632,7 +1632,7 @@ class _$FpxImpl implements _Fpx { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FpxImpl && @@ -1793,7 +1793,7 @@ class _$IdealImpl implements _Ideal { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdealImpl && @@ -1993,7 +1993,7 @@ class _$SepaDebitImpl implements _SepaDebit { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SepaDebitImpl && @@ -2153,7 +2153,7 @@ class _$SofortImpl implements _Sofort { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SofortImpl && @@ -2286,7 +2286,7 @@ class _$UpiImpl implements _Upi { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpiImpl && @@ -2612,7 +2612,7 @@ class _$UsBankAccountImpl implements _UsBankAccount { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UsBankAccountImpl && 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 c1c4471f0..29a49eaa9 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 @@ -87,25 +87,25 @@ Map _$$PaymentMethodImplToJson(_$PaymentMethodImpl instance) { } const _$PaymentMethodTypeEnumMap = { - PaymentMethodType.acssDebit: 'acssDebit', + PaymentMethodType.acssDebit: 'acss_debit', PaymentMethodType.affirm: 'affirm', - PaymentMethodType.afterpayClearpay: 'afterpayClearpay', + PaymentMethodType.afterpayClearpay: 'afterpay_clearpay', PaymentMethodType.alipay: 'alipay', - PaymentMethodType.auBecsDebit: 'auBecsDebit', - PaymentMethodType.bacsDebit: 'bacsDebit', + PaymentMethodType.auBecsDebit: 'au_becs_debit', + PaymentMethodType.bacsDebit: 'bacs_debit', PaymentMethodType.bancontact: 'bancontact', PaymentMethodType.blik: 'blik', PaymentMethodType.boleto: 'boleto', PaymentMethodType.card: 'card', PaymentMethodType.cashapp: 'cashapp', - PaymentMethodType.cardPresent: 'cardPresent', - PaymentMethodType.customerBalance: 'customerBalance', + PaymentMethodType.cardPresent: 'bacs_debit', + PaymentMethodType.customerBalance: 'customer_balance', PaymentMethodType.eps: 'eps', PaymentMethodType.fpx: 'fpx', PaymentMethodType.giropay: 'giropay', PaymentMethodType.grabpay: 'grabpay', PaymentMethodType.ideal: 'ideal', - PaymentMethodType.interacPresent: 'interacPresent', + PaymentMethodType.interacPresent: 'interac_present', PaymentMethodType.klarna: 'klarna', PaymentMethodType.konbini: 'konbini', PaymentMethodType.link: 'link', @@ -114,10 +114,11 @@ const _$PaymentMethodTypeEnumMap = { PaymentMethodType.paynow: 'paynow', PaymentMethodType.pix: 'pix', PaymentMethodType.promptpay: 'promptpay', - PaymentMethodType.sepaDebit: 'sepaDebit', + PaymentMethodType.sepaDebit: 'sepa_debit', PaymentMethodType.sofort: 'sofort', - PaymentMethodType.usBankAccount: 'usBankAccount', - PaymentMethodType.wechatPay: 'wechatPay', + PaymentMethodType.usBankAccount: 'us_bank_account', + PaymentMethodType.wechatPay: 'wechat_pay', + PaymentMethodType.unknown: 'unknown', }; _$AuBecsDebitImpl _$$AuBecsDebitImplFromJson(Map json) => _$AuBecsDebitImpl( diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_method_details.freezed.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_method_details.freezed.dart index 48b286d24..54f88f823 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_method_details.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_method_details.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_method_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'); CardPaymentMethodDetails _$CardPaymentMethodDetailsFromJson( Map json) { @@ -163,7 +163,7 @@ class _$CardPaymentMethodRefImpl implements _CardPaymentMethodRef { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardPaymentMethodRefImpl && @@ -370,7 +370,7 @@ class _$CardPaymentMethodDefaultImpl implements _CardPaymentMethodDefault { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardPaymentMethodDefaultImpl && @@ -595,7 +595,7 @@ class _$CardPaymentMethodDetailsTokenImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardPaymentMethodDetailsTokenImpl && @@ -881,7 +881,7 @@ class _$IdIdealPaymentMethodDetailsImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdIdealPaymentMethodDetailsImpl && @@ -1088,7 +1088,7 @@ class _$IdealPaymentMethodDetailsImpl implements _IdealPaymentMethodDetails { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdealPaymentMethodDetailsImpl && @@ -1314,7 +1314,7 @@ class _$IdealPaymentMethodDetailsSelfCollectImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdealPaymentMethodDetailsSelfCollectImpl && @@ -1547,7 +1547,7 @@ class _$IdealBankDataImpl implements _IdealBankData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$IdealBankDataImpl && @@ -1691,7 +1691,7 @@ class _$CardTokenPaymentMethodImpl implements _CardTokenPaymentMethod { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardTokenPaymentMethodImpl && diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_method_params.freezed.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_method_params.freezed.dart index 353507f6e..21df25de0 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_method_params.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_method_params.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_method_params.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#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'); PaymentMethodParams _$PaymentMethodParamsFromJson(Map json) { switch (json['paymentMethodType']) { @@ -324,7 +324,7 @@ class _$PaymentMethodParamsCardImpl implements _PaymentMethodParamsCard { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardImpl && @@ -628,7 +628,7 @@ class _$PaymentMethodParamsCardWithTokenImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardWithTokenImpl && @@ -936,7 +936,7 @@ class _$PaymentMethodParamsCardWithMethodIdImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsCardWithMethodIdImpl && @@ -1241,7 +1241,7 @@ class _$PaymentMethodParamsAlipayImpl implements _PaymentMethodParamsAlipay { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAlipayImpl && @@ -1543,7 +1543,7 @@ class _$PaymentMethodParamsIdealImpl implements _PaymentMethodParamsIdeal { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsIdealImpl && @@ -1845,7 +1845,7 @@ class _$PaymentMethodParamsAubecsImpl implements _PaymentMethodParamsAubecs { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAubecsImpl && @@ -2148,7 +2148,7 @@ class _$PaymentMethodParamsBankContactImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsBankContactImpl && @@ -2452,7 +2452,7 @@ class _$PaymentMethodParamsGiroPayImpl implements _PaymentMethodParamsGiroPay { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsGiroPayImpl && @@ -2753,7 +2753,7 @@ class _$PaymentMethodParamsEpsImpl implements _PaymentMethodParamsEps { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsEpsImpl && @@ -3054,7 +3054,7 @@ class _$PaymentMethodParamsAffirmImpl implements _PaymentMethodParamsAffirm { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAffirmImpl && @@ -3355,7 +3355,7 @@ class _$PaymentMethodParamsPayImpl implements _PaymentMethodParamsPay { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsPayImpl && @@ -3656,7 +3656,7 @@ class _$PaymentMethodParamsP24Impl implements _PaymentMethodParamsP24 { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsP24Impl && @@ -3958,7 +3958,7 @@ class _$PaymentMethodParamsFpxImpl implements _PaymentMethodParamsFpx { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsFpxImpl && @@ -4262,7 +4262,7 @@ class _$PaymentMethodParamsSepaDebitImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsSepaDebitImpl && @@ -4565,7 +4565,7 @@ class _$PaymentMethodParamsSofortImpl implements _PaymentMethodParamsSofort { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsSofortImpl && @@ -4866,7 +4866,7 @@ class _$PaymentMethodParamsAfterpayClearpayImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsAfterpayClearpayImpl && @@ -5169,7 +5169,7 @@ class _$PaymentMethodParamsOxxoImpl implements _PaymentMethodParamsOxxo { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsOxxoImpl && @@ -5473,7 +5473,7 @@ class _$PaymentMethodParamsKlarnaImpl implements _PaymentMethodParamsKlarna { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsKlarnaImpl && @@ -5780,7 +5780,7 @@ class _$PaymentMethodParamsPayPalImpl implements _PaymentMethodParamsPayPal { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsPayPalImpl && @@ -6087,7 +6087,7 @@ class _$PaymentMethodParamsUsBankAccountImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodParamsUsBankAccountImpl && @@ -6473,7 +6473,7 @@ class _$PaymentMethodDataImpl implements _PaymentMethodData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataImpl && @@ -6706,7 +6706,7 @@ class _$PaymentMethodDataCardFromTokenImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataCardFromTokenImpl && @@ -6972,7 +6972,7 @@ class _$PaymentMethodDataCardFromMethodImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataCardFromMethodImpl && @@ -7219,7 +7219,7 @@ class _$PaymentMethodDataIdealImpl implements _PaymentMethodDataIdeal { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataIdealImpl && @@ -7456,7 +7456,7 @@ class _$PaymentMethodDataAubecsImpl implements _PaymentMethodDataAubecs { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataAubecsImpl && @@ -7695,7 +7695,7 @@ class _$PaymentMethodDataFpxImpl implements _PaymentMethodDataFpx { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataFpxImpl && @@ -7933,7 +7933,7 @@ class _$PaymentMethodDataSofortImpl implements _PaymentMethodDataSofort { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataSofortImpl && @@ -8168,7 +8168,7 @@ class _$PaymentMethodDataSepaImpl implements _PaymentMethodDataSepa { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataSepaImpl && @@ -8377,7 +8377,7 @@ class _$PaymentMethodDataAfterPayImpl implements _PaymentMethodDataAfterPay { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataAfterPayImpl && @@ -8672,7 +8672,7 @@ class _$PaymentMethodDataUsBankImpl implements _PaymentMethodDataUsBank { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodDataUsBankImpl && diff --git a/packages/stripe_js/lib/src/api/payment_methods/payment_method_response.freezed.dart b/packages/stripe_js/lib/src/api/payment_methods/payment_method_response.freezed.dart index 25940ffb5..144e158f3 100644 --- a/packages/stripe_js/lib/src/api/payment_methods/payment_method_response.freezed.dart +++ b/packages/stripe_js/lib/src/api/payment_methods/payment_method_response.freezed.dart @@ -12,7 +12,7 @@ part of 'payment_method_response.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'); PaymentMethodResponse _$PaymentMethodResponseFromJson( Map json) { @@ -166,7 +166,7 @@ class _$PaymentMethodResponseImpl implements _PaymentMethodResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentMethodResponseImpl && diff --git a/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_data.freezed.dart b/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_data.freezed.dart index 4d171462c..b37843950 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/confirm_card_setup_data.freezed.dart @@ -12,7 +12,7 @@ part of 'confirm_card_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'); ConfirmCardSetupData _$ConfirmCardSetupDataFromJson(Map json) { return _ConfirmCardSetupData.fromJson(json); @@ -168,7 +168,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.freezed.dart b/packages/stripe_js/lib/src/api/setup_intents/setup_intent.freezed.dart index e9aee4ea2..b21653141 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/setup_intent.freezed.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/setup_intent.freezed.dart @@ -12,7 +12,7 @@ part of 'setup_intent.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#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'); SetupIntent _$SetupIntentFromJson(Map json) { return _SetupIntent.fromJson(json); @@ -702,7 +702,7 @@ class _$SetupIntentImpl implements _SetupIntent { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SetupIntentImpl && 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 2d66e220d..297f94623 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 @@ -97,25 +97,25 @@ const _$SetupIntentFlowDirectionsEnumMap = { }; const _$PaymentMethodTypeEnumMap = { - PaymentMethodType.acssDebit: 'acssDebit', + PaymentMethodType.acssDebit: 'acss_debit', PaymentMethodType.affirm: 'affirm', - PaymentMethodType.afterpayClearpay: 'afterpayClearpay', + PaymentMethodType.afterpayClearpay: 'afterpay_clearpay', PaymentMethodType.alipay: 'alipay', - PaymentMethodType.auBecsDebit: 'auBecsDebit', - PaymentMethodType.bacsDebit: 'bacsDebit', + PaymentMethodType.auBecsDebit: 'au_becs_debit', + PaymentMethodType.bacsDebit: 'bacs_debit', PaymentMethodType.bancontact: 'bancontact', PaymentMethodType.blik: 'blik', PaymentMethodType.boleto: 'boleto', PaymentMethodType.card: 'card', PaymentMethodType.cashapp: 'cashapp', - PaymentMethodType.cardPresent: 'cardPresent', - PaymentMethodType.customerBalance: 'customerBalance', + PaymentMethodType.cardPresent: 'bacs_debit', + PaymentMethodType.customerBalance: 'customer_balance', PaymentMethodType.eps: 'eps', PaymentMethodType.fpx: 'fpx', PaymentMethodType.giropay: 'giropay', PaymentMethodType.grabpay: 'grabpay', PaymentMethodType.ideal: 'ideal', - PaymentMethodType.interacPresent: 'interacPresent', + PaymentMethodType.interacPresent: 'interac_present', PaymentMethodType.klarna: 'klarna', PaymentMethodType.konbini: 'konbini', PaymentMethodType.link: 'link', @@ -124,10 +124,11 @@ const _$PaymentMethodTypeEnumMap = { PaymentMethodType.paynow: 'paynow', PaymentMethodType.pix: 'pix', PaymentMethodType.promptpay: 'promptpay', - PaymentMethodType.sepaDebit: 'sepaDebit', + PaymentMethodType.sepaDebit: 'sepa_debit', PaymentMethodType.sofort: 'sofort', - PaymentMethodType.usBankAccount: 'usBankAccount', - PaymentMethodType.wechatPay: 'wechatPay', + PaymentMethodType.usBankAccount: 'us_bank_account', + PaymentMethodType.wechatPay: 'wechat_pay', + PaymentMethodType.unknown: 'unknown', }; const _$SetupIntentsStatusEnumMap = { diff --git a/packages/stripe_js/lib/src/api/setup_intents/setup_intent_response.freezed.dart b/packages/stripe_js/lib/src/api/setup_intents/setup_intent_response.freezed.dart index 18dcc9ca5..a2772cbbe 100644 --- a/packages/stripe_js/lib/src/api/setup_intents/setup_intent_response.freezed.dart +++ b/packages/stripe_js/lib/src/api/setup_intents/setup_intent_response.freezed.dart @@ -12,7 +12,7 @@ part of 'setup_intent_response.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'); SetupIntentResponse _$SetupIntentResponseFromJson(Map json) { return _SetupIntentResponse.fromJson(json); @@ -162,7 +162,7 @@ class _$SetupIntentResponseImpl implements _SetupIntentResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SetupIntentResponseImpl && diff --git a/packages/stripe_js/lib/src/api/tokens/create_token_bank_account_data.freezed.dart b/packages/stripe_js/lib/src/api/tokens/create_token_bank_account_data.freezed.dart index 140330703..7aeb311b5 100644 --- a/packages/stripe_js/lib/src/api/tokens/create_token_bank_account_data.freezed.dart +++ b/packages/stripe_js/lib/src/api/tokens/create_token_bank_account_data.freezed.dart @@ -12,7 +12,7 @@ part of 'create_token_bank_account_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'); CreateTokenBankAccountData _$CreateTokenBankAccountDataFromJson( Map json) { @@ -234,7 +234,7 @@ class _$CreateTokenBankAccountDataImpl implements _CreateTokenBankAccountData { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateTokenBankAccountDataImpl && diff --git a/packages/stripe_js/lib/src/api/tokens/token_response.freezed.dart b/packages/stripe_js/lib/src/api/tokens/token_response.freezed.dart index c609f8738..38e858945 100644 --- a/packages/stripe_js/lib/src/api/tokens/token_response.freezed.dart +++ b/packages/stripe_js/lib/src/api/tokens/token_response.freezed.dart @@ -12,7 +12,7 @@ part of 'token_response.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'); TokenResponse _$TokenResponseFromJson(Map json) { return _TokenResponse.fromJson(json); @@ -164,7 +164,7 @@ class _$TokenResponseImpl implements _TokenResponse { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$TokenResponseImpl &&