Skip to content

Commit

Permalink
Fix #1681 (#1699)
Browse files Browse the repository at this point in the history
* fix #1681 changing JsonKey to JsonValue and add unknownValue

* Generated files in stripe_js
  • Loading branch information
dagyu committed Apr 1, 2024
1 parent c95d7e9 commit 8f51e14
Show file tree
Hide file tree
Showing 26 changed files with 167 additions and 147 deletions.
Expand Up @@ -12,7 +12,7 @@ part of 'card_element_change_event.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/elements/card_element_change_event.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

CardElementChangeEvent _$CardElementChangeEventFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_alipay_payment_data.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_data.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmAlipayPaymentData _$ConfirmAlipayPaymentDataFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_alipay_payment_options.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_alipay_payment_options.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmAlipayPaymentOptions _$ConfirmAlipayPaymentOptionsFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_card_payment_data.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_data.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmCardPaymentData _$ConfirmCardPaymentDataFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_card_payment_options.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_card_payment_options.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmCardPaymentOptions _$ConfirmCardPaymentOptionsFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_ideal_payment_data.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_data.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmIdealPaymentData _$ConfirmIdealPaymentDataFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_ideal_payment_options.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_ideal_payment_options.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmIdealPaymentOptions _$ConfirmIdealPaymentOptionsFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_payment_options.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_payment_options.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmPaymentOptions _$ConfirmPaymentOptionsFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'confirm_sepa_debit_payment_data.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/confirm_sepa_debit_payment_data.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

ConfirmSepaDebitPaymentData _$ConfirmSepaDebitPaymentDataFromJson(
Map<String, dynamic> json) {
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down
Expand Up @@ -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<PaymentMethodType> paymentMethodTypes,

Expand Down
Expand Up @@ -12,7 +12,7 @@ part of 'payment_intent.dart';
T _$identity<T>(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');

Check warning on line 15 in packages/stripe_js/lib/src/api/payment_intents/payment_intent.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

freezed

"freezed" is a typo. Did you mean "freezes"?

PaymentIntent _$PaymentIntentFromJson(Map<String, dynamic> json) {
return _PaymentIntent.fromJson(json);
Expand Down Expand Up @@ -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<PaymentMethodType> get paymentMethodTypes =>
throw _privateConstructorUsedError;

Expand Down Expand Up @@ -280,7 +281,9 @@ abstract class $PaymentIntentCopyWith<$Res> {
@JsonKey(name: "payment_method") String? paymentMethod,
@JsonKey(name: "payment_method_options")
Map<dynamic, dynamic> paymentMethodOptions,
@JsonKey(name: "payment_method_types")
@JsonKey(
name: "payment_method_types",
unknownEnumValue: PaymentMethodType.unknown)
List<PaymentMethodType> paymentMethodTypes,
dynamic processing,
@JsonKey(name: "receipt_email") String? receiptEmail,
Expand Down Expand Up @@ -603,7 +606,9 @@ abstract class _$$PaymentIntentImplCopyWith<$Res>
@JsonKey(name: "payment_method") String? paymentMethod,
@JsonKey(name: "payment_method_options")
Map<dynamic, dynamic> paymentMethodOptions,
@JsonKey(name: "payment_method_types")
@JsonKey(
name: "payment_method_types",
unknownEnumValue: PaymentMethodType.unknown)
List<PaymentMethodType> paymentMethodTypes,
dynamic processing,
@JsonKey(name: "receipt_email") String? receiptEmail,
Expand Down Expand Up @@ -871,7 +876,9 @@ class _$PaymentIntentImpl implements _PaymentIntent {
@JsonKey(name: "payment_method") this.paymentMethod,
@JsonKey(name: "payment_method_options")
final Map<dynamic, dynamic> paymentMethodOptions = const {},
@JsonKey(name: "payment_method_types")
@JsonKey(
name: "payment_method_types",
unknownEnumValue: PaymentMethodType.unknown)
final List<PaymentMethodType> paymentMethodTypes = const [],
this.processing,
@JsonKey(name: "receipt_email") this.receiptEmail,
Expand Down Expand Up @@ -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<PaymentMethodType> get paymentMethodTypes {
if (_paymentMethodTypes is EqualUnmodifiableListView)
return _paymentMethodTypes;
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -1338,7 +1346,9 @@ abstract class _PaymentIntent implements PaymentIntent {
@JsonKey(name: "payment_method") final String? paymentMethod,
@JsonKey(name: "payment_method_options")
final Map<dynamic, dynamic> paymentMethodOptions,
@JsonKey(name: "payment_method_types")
@JsonKey(
name: "payment_method_types",
unknownEnumValue: PaymentMethodType.unknown)
final List<PaymentMethodType> paymentMethodTypes,
final dynamic processing,
@JsonKey(name: "receipt_email") final String? receiptEmail,
Expand Down Expand Up @@ -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<PaymentMethodType> get paymentMethodTypes;
@override

Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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 &&
Expand Down

0 comments on commit 8f51e14

Please sign in to comment.