Skip to content

Commit

Permalink
fix #1579 parse error for customer sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Jan 1, 2024
1 parent e80a2e0 commit 625f506
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum CustomerSheetError { unknown, failed, canceled }
class StripeError<T> with _$StripeError<T>, Exception {
@JsonSerializable(explicitToJson: true)
const factory StripeError({
required String message,
@Default('Unknown error') required String message,
@JsonKey(fromJson: _dataFromJson, toJson: _dataToJson) required T code,
}) = _StripeErrorGeneric;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ class __$$StripeErrorGenericImplCopyWithImpl<T, $Res>
@JsonSerializable(explicitToJson: true)
class _$StripeErrorGenericImpl<T> implements _StripeErrorGeneric<T> {
const _$StripeErrorGenericImpl(
{required this.message,
{required this.message = 'Unknown error',
@JsonKey(fromJson: _dataFromJson, toJson: _dataToJson)
required this.code});

factory _$StripeErrorGenericImpl.fromJson(Map<String, dynamic> json) =>
_$$StripeErrorGenericImplFromJson(json);

@override
@JsonKey()
final String message;
@override
@JsonKey(fromJson: _dataFromJson, toJson: _dataToJson)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mixin _$SetupPaymentSheetParameters {
@JsonKey(name: 'defaultBillingDetails')
BillingDetails? get billingDetails => throw _privateConstructorUsedError;

/// Return URL is required for IDEAL and few other payment methods
/// Return URL is required for IDEAL, Klarna and few other payment methods

Check warning on line 92 in packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

Klarna

"Klarna" is a typo. Did you mean "Carnal"?
String? get returnURL => throw _privateConstructorUsedError;

/// Configuration for how billing details are collected during checkout.
Expand Down Expand Up @@ -583,7 +583,7 @@ class _$SetupParametersImpl implements _SetupParameters {
@JsonKey(name: 'defaultBillingDetails')
final BillingDetails? billingDetails;

/// Return URL is required for IDEAL and few other payment methods
/// Return URL is required for IDEAL, Klarna and few other payment methods

Check warning on line 586 in packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

Klarna

"Klarna" is a typo. Did you mean "Carnal"?
@override
final String? returnURL;

Expand Down Expand Up @@ -791,7 +791,7 @@ abstract class _SetupParameters implements SetupPaymentSheetParameters {
BillingDetails? get billingDetails;
@override

/// Return URL is required for IDEAL and few other payment methods
/// Return URL is required for IDEAL, Klarna and few other payment methods

Check warning on line 794 in packages/stripe_platform_interface/lib/src/models/payment_sheet.freezed.dart

View workflow job for this annotation

GitHub Actions / Typo CI

Klarna

"Klarna" is a typo. Did you mean "Carnal"?
String? get returnURL;
@override

Expand Down

0 comments on commit 625f506

Please sign in to comment.