Skip to content

Commit

Permalink
Added fingerprint to the Card model.
Browse files Browse the repository at this point in the history
Solves issues:
- flutter-stripe#707
- flutter-stripe#688

Resolves discussion:
- flutter-stripe#691

Sync with issue: stripe/stripe-react-native#914
  • Loading branch information
Flucadetena committed May 9, 2024
1 parent 7f3f8a8 commit db7e810
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ class Card with _$Card {
/// last four digits of the card.
String? last4,

/// fingerprint of the card.
String? fingerprint,

/// The preffered card brand for payment
String? preferredNetwork,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,9 @@ mixin _$Card {
/// last four digits of the card.
String? get last4 => throw _privateConstructorUsedError;

/// fingerprint of the card.
String? get fingerprint => throw _privateConstructorUsedError;

/// The preffered card brand for payment
String? get preferredNetwork => throw _privateConstructorUsedError;

Expand Down Expand Up @@ -1319,6 +1322,7 @@ abstract class $CardCopyWith<$Res> {
int? expMonth,
String? funding,
String? last4,
String? fingerprint,
String? preferredNetwork,
List<String>? availableNetworks,
ThreeDSecureUsage? threeDSecureUsage});
Expand All @@ -1345,6 +1349,7 @@ class _$CardCopyWithImpl<$Res, $Val extends Card>
Object? expMonth = freezed,
Object? funding = freezed,
Object? last4 = freezed,
Object? fingerprint = freezed,
Object? preferredNetwork = freezed,
Object? availableNetworks = freezed,
Object? threeDSecureUsage = freezed,
Expand Down Expand Up @@ -1374,6 +1379,10 @@ class _$CardCopyWithImpl<$Res, $Val extends Card>
? _value.last4
: last4 // ignore: cast_nullable_to_non_nullable
as String?,
fingerprint: freezed == fingerprint
? _value.fingerprint
: fingerprint // ignore: cast_nullable_to_non_nullable
as String?,
preferredNetwork: freezed == preferredNetwork
? _value.preferredNetwork
: preferredNetwork // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -1416,6 +1425,7 @@ abstract class _$$CardImplCopyWith<$Res> implements $CardCopyWith<$Res> {
int? expMonth,
String? funding,
String? last4,
String? fingerprint,
String? preferredNetwork,
List<String>? availableNetworks,
ThreeDSecureUsage? threeDSecureUsage});
Expand All @@ -1440,6 +1450,7 @@ class __$$CardImplCopyWithImpl<$Res>
Object? expMonth = freezed,
Object? funding = freezed,
Object? last4 = freezed,
Object? fingerprint = freezed,
Object? preferredNetwork = freezed,
Object? availableNetworks = freezed,
Object? threeDSecureUsage = freezed,
Expand Down Expand Up @@ -1469,6 +1480,10 @@ class __$$CardImplCopyWithImpl<$Res>
? _value.last4
: last4 // ignore: cast_nullable_to_non_nullable
as String?,
fingerprint: freezed == fingerprint
? _value.fingerprint
: fingerprint // ignore: cast_nullable_to_non_nullable
as String?,
preferredNetwork: freezed == preferredNetwork
? _value.preferredNetwork
: preferredNetwork // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -1496,6 +1511,7 @@ class _$CardImpl implements _Card {
this.expMonth,
this.funding,
this.last4,
this.fingerprint,
this.preferredNetwork,
final List<String>? availableNetworks,
this.threeDSecureUsage})
Expand Down Expand Up @@ -1528,6 +1544,10 @@ class _$CardImpl implements _Card {
@override
final String? last4;

/// fingerprint of the card.
@override
final String? fingerprint;

/// The preffered card brand for payment
@override
final String? preferredNetwork;
Expand All @@ -1552,7 +1572,7 @@ class _$CardImpl implements _Card {

@override
String toString() {
return 'Card(brand: $brand, country: $country, expYear: $expYear, expMonth: $expMonth, funding: $funding, last4: $last4, preferredNetwork: $preferredNetwork, availableNetworks: $availableNetworks, threeDSecureUsage: $threeDSecureUsage)';
return 'Card(brand: $brand, country: $country, expYear: $expYear, expMonth: $expMonth, funding: $funding, last4: $last4, fingerprint: $fingerprint, preferredNetwork: $preferredNetwork, availableNetworks: $availableNetworks, threeDSecureUsage: $threeDSecureUsage)';
}

@override
Expand All @@ -1567,6 +1587,8 @@ class _$CardImpl implements _Card {
other.expMonth == expMonth) &&
(identical(other.funding, funding) || other.funding == funding) &&
(identical(other.last4, last4) || other.last4 == last4) &&
(identical(other.fingerprint, fingerprint) ||
other.fingerprint == fingerprint) &&
(identical(other.preferredNetwork, preferredNetwork) ||
other.preferredNetwork == preferredNetwork) &&
const DeepCollectionEquality()
Expand All @@ -1585,6 +1607,7 @@ class _$CardImpl implements _Card {
expMonth,
funding,
last4,
fingerprint,
preferredNetwork,
const DeepCollectionEquality().hash(_availableNetworks),
threeDSecureUsage);
Expand All @@ -1611,6 +1634,7 @@ abstract class _Card implements Card {
final int? expMonth,
final String? funding,
final String? last4,
final String? fingerprint,
final String? preferredNetwork,
final List<String>? availableNetworks,
final ThreeDSecureUsage? threeDSecureUsage}) = _$CardImpl;
Expand Down Expand Up @@ -1643,6 +1667,10 @@ abstract class _Card implements Card {
String? get last4;
@override

/// fingerprint of the card.
String? get fingerprint;
@override

/// The preffered card brand for payment
String? get preferredNetwork;
@override
Expand Down

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

0 comments on commit db7e810

Please sign in to comment.