Skip to content

Commit be80b6b

Browse files
committed
revert changes on setupintent
1 parent 9416b0a commit be80b6b

File tree

3 files changed

+500
-113
lines changed

3 files changed

+500
-113
lines changed

stripe_platform_interface/lib/src/models/setup_intent.dart

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,34 @@ part 'setup_intent.g.dart';
1010
class SetupIntent with _$SetupIntent {
1111
@JsonSerializable(explicitToJson: true)
1212
const factory SetupIntent({
13-
required PaymentMethodParams paymentMethodCreateParams,
13+
required String id,
14+
required String status,
15+
required String description,
16+
required bool livemode,
1417
required String clientSecret,
15-
String? returnUrl,
16-
String? mandateId,
17-
String? mandateData,
18+
required String paymentMethodId,
19+
required String usage,
20+
required List<PaymentMethodType> paymentMethodTypes,
21+
int? created,
22+
LastSetupError? lastSetupError,
1823
}) = _SetupIntent;
1924

2025
factory SetupIntent.fromJson(Map<String, dynamic> json) =>
2126
_$SetupIntentFromJson(json);
2227
}
2328

29+
@freezed
30+
class LastSetupError with _$LastSetupError {
31+
@JsonSerializable(explicitToJson: true)
32+
const factory LastSetupError({
33+
required String code,
34+
required String message,
35+
}) = _LastSetupError;
36+
37+
factory LastSetupError.fromJson(Map<String, dynamic> json) =>
38+
_$LastSetupErrorFromJson(json);
39+
}
40+
2441
enum FutureUsage { unknown, none, onSession, offSession, oneTime }
2542

2643
enum SetupStatus {

0 commit comments

Comments
 (0)