Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes february #1647

Merged
merged 9 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/stripe/lib/src/stripe.dart
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,28 @@ class Stripe {

/// check if a particular card can be provisioned with the current app
/// on this particular device.
///
/// This method is deprecated. Use [canAddCardToWallet] instead.
@Deprecated('Use [canAddCardToWallet] instead')
Future<AddToWalletResult> canAddToWallet(String last4) async {
return await _platform.canAddToWallet(last4);
}

/// check if a particular card can be provisioned with the current app
/// on this particular device.
/// Throws [StripeException] in case creating the token fails.
Future<CanAddCardToWalletResult> canAddCardToWallet(
CanAddCardToWalletParams params) async {
return await _platform.canAddCardToWallet(params);
}

/// check if a particular card can be provisioned with the current app
/// on this particular device.
/// Throws [StripeException] in case creating the token fails.
Future<IsCardInWalletResult> isCardInWallet(String cardLastFour) async {
return await _platform.isCardInWallet(cardLastFour);
}

/// Call the financial connections authentication flow in order to collect a US bank account to enhance payouts.
///
/// Needs `clientSecret` of the stripe financial connections sessions.
Expand Down
10 changes: 5 additions & 5 deletions packages/stripe_js/dart_test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
tags:
browser: {test_on: "browser"}

override_platforms:
chrome:
settings:
arguments: --user-data-dir=/tmp --disable-web-security --disable-site-isolation-trials --remote-debugging-port=9222
# override_platforms:
# chrome:
# settings:
# arguments: --user-data-dir=/tmp --disable-web-security --disable-site-isolation-trials --remote-debugging-port=9222

presets:
# Pass "-P chrome" to run only Chrome tests.
chrome:
include_tags: browser
platforms: [chrome]
# platforms: [chrome]
95 changes: 48 additions & 47 deletions packages/stripe_js/lib/src/api/core/billing_details.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ class _$BillingDetailsCopyWithImpl<$Res, $Val extends BillingDetails>
}

/// @nodoc
abstract class _$$_BillingDetailsCopyWith<$Res>
abstract class _$$BillingDetailsImplCopyWith<$Res>
implements $BillingDetailsCopyWith<$Res> {
factory _$$_BillingDetailsCopyWith(
_$_BillingDetails value, $Res Function(_$_BillingDetails) then) =
__$$_BillingDetailsCopyWithImpl<$Res>;
factory _$$BillingDetailsImplCopyWith(_$BillingDetailsImpl value,
$Res Function(_$BillingDetailsImpl) then) =
__$$BillingDetailsImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -117,11 +117,11 @@ abstract class _$$_BillingDetailsCopyWith<$Res>
}

/// @nodoc
class __$$_BillingDetailsCopyWithImpl<$Res>
extends _$BillingDetailsCopyWithImpl<$Res, _$_BillingDetails>
implements _$$_BillingDetailsCopyWith<$Res> {
__$$_BillingDetailsCopyWithImpl(
_$_BillingDetails _value, $Res Function(_$_BillingDetails) _then)
class __$$BillingDetailsImplCopyWithImpl<$Res>
extends _$BillingDetailsCopyWithImpl<$Res, _$BillingDetailsImpl>
implements _$$BillingDetailsImplCopyWith<$Res> {
__$$BillingDetailsImplCopyWithImpl(
_$BillingDetailsImpl _value, $Res Function(_$BillingDetailsImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -132,7 +132,7 @@ class __$$_BillingDetailsCopyWithImpl<$Res>
Object? phone = freezed,
Object? name = freezed,
}) {
return _then(_$_BillingDetails(
return _then(_$BillingDetailsImpl(
email: freezed == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
Expand All @@ -155,11 +155,11 @@ class __$$_BillingDetailsCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$_BillingDetails implements _BillingDetails {
const _$_BillingDetails({this.email, this.address, this.phone, this.name});
class _$BillingDetailsImpl implements _BillingDetails {
const _$BillingDetailsImpl({this.email, this.address, this.phone, this.name});

factory _$_BillingDetails.fromJson(Map<String, dynamic> json) =>
_$$_BillingDetailsFromJson(json);
factory _$BillingDetailsImpl.fromJson(Map<String, dynamic> json) =>
_$$BillingDetailsImplFromJson(json);

/// Email address.
@override
Expand All @@ -186,7 +186,7 @@ class _$_BillingDetails implements _BillingDetails {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_BillingDetails &&
other is _$BillingDetailsImpl &&
(identical(other.email, email) || other.email == email) &&
(identical(other.address, address) || other.address == address) &&
(identical(other.phone, phone) || other.phone == phone) &&
Expand All @@ -200,12 +200,13 @@ class _$_BillingDetails implements _BillingDetails {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_BillingDetailsCopyWith<_$_BillingDetails> get copyWith =>
__$$_BillingDetailsCopyWithImpl<_$_BillingDetails>(this, _$identity);
_$$BillingDetailsImplCopyWith<_$BillingDetailsImpl> get copyWith =>
__$$BillingDetailsImplCopyWithImpl<_$BillingDetailsImpl>(
this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_BillingDetailsToJson(
return _$$BillingDetailsImplToJson(
this,
);
}
Expand All @@ -216,10 +217,10 @@ abstract class _BillingDetails implements BillingDetails {
{final String? email,
final BillingAddress? address,
final String? phone,
final String? name}) = _$_BillingDetails;
final String? name}) = _$BillingDetailsImpl;

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

@override

Expand All @@ -239,7 +240,7 @@ abstract class _BillingDetails implements BillingDetails {
String? get name;
@override
@JsonKey(ignore: true)
_$$_BillingDetailsCopyWith<_$_BillingDetails> get copyWith =>
_$$BillingDetailsImplCopyWith<_$BillingDetailsImpl> get copyWith =>
throw _privateConstructorUsedError;
}

Expand Down Expand Up @@ -339,12 +340,12 @@ class _$BillingAddressCopyWithImpl<$Res, $Val extends BillingAddress>
}

/// @nodoc
abstract class _$$_PaymentElementBillingDetailsAddressCopyWith<$Res>
abstract class _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res>
implements $BillingAddressCopyWith<$Res> {
factory _$$_PaymentElementBillingDetailsAddressCopyWith(
_$_PaymentElementBillingDetailsAddress value,
$Res Function(_$_PaymentElementBillingDetailsAddress) then) =
__$$_PaymentElementBillingDetailsAddressCopyWithImpl<$Res>;
factory _$$PaymentElementBillingDetailsAddressImplCopyWith(
_$PaymentElementBillingDetailsAddressImpl value,
$Res Function(_$PaymentElementBillingDetailsAddressImpl) then) =
__$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -357,13 +358,13 @@ abstract class _$$_PaymentElementBillingDetailsAddressCopyWith<$Res>
}

/// @nodoc
class __$$_PaymentElementBillingDetailsAddressCopyWithImpl<$Res>
class __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<$Res>
extends _$BillingAddressCopyWithImpl<$Res,
_$_PaymentElementBillingDetailsAddress>
implements _$$_PaymentElementBillingDetailsAddressCopyWith<$Res> {
__$$_PaymentElementBillingDetailsAddressCopyWithImpl(
_$_PaymentElementBillingDetailsAddress _value,
$Res Function(_$_PaymentElementBillingDetailsAddress) _then)
_$PaymentElementBillingDetailsAddressImpl>
implements _$$PaymentElementBillingDetailsAddressImplCopyWith<$Res> {
__$$PaymentElementBillingDetailsAddressImplCopyWithImpl(
_$PaymentElementBillingDetailsAddressImpl _value,
$Res Function(_$PaymentElementBillingDetailsAddressImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -376,7 +377,7 @@ class __$$_PaymentElementBillingDetailsAddressCopyWithImpl<$Res>
Object? country = freezed,
Object? postalCode = freezed,
}) {
return _then(_$_PaymentElementBillingDetailsAddress(
return _then(_$PaymentElementBillingDetailsAddressImpl(
line1: freezed == line1
? _value.line1
: line1 // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -407,19 +408,19 @@ class __$$_PaymentElementBillingDetailsAddressCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$_PaymentElementBillingDetailsAddress
class _$PaymentElementBillingDetailsAddressImpl
implements _PaymentElementBillingDetailsAddress {
const _$_PaymentElementBillingDetailsAddress(
const _$PaymentElementBillingDetailsAddressImpl(
{this.line1,
this.line2,
this.city,
this.state,
this.country,
@JsonKey(name: 'postal_code') this.postalCode});

factory _$_PaymentElementBillingDetailsAddress.fromJson(
factory _$PaymentElementBillingDetailsAddressImpl.fromJson(
Map<String, dynamic> json) =>
_$$_PaymentElementBillingDetailsAddressFromJson(json);
_$$PaymentElementBillingDetailsAddressImplFromJson(json);

/// Address line 1 (e.g., street, PO Box, or company name).
@override
Expand Down Expand Up @@ -455,7 +456,7 @@ class _$_PaymentElementBillingDetailsAddress
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_PaymentElementBillingDetailsAddress &&
other is _$PaymentElementBillingDetailsAddressImpl &&
(identical(other.line1, line1) || other.line1 == line1) &&
(identical(other.line2, line2) || other.line2 == line2) &&
(identical(other.city, city) || other.city == city) &&
Expand All @@ -473,14 +474,14 @@ class _$_PaymentElementBillingDetailsAddress
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_PaymentElementBillingDetailsAddressCopyWith<
_$_PaymentElementBillingDetailsAddress>
get copyWith => __$$_PaymentElementBillingDetailsAddressCopyWithImpl<
_$_PaymentElementBillingDetailsAddress>(this, _$identity);
_$$PaymentElementBillingDetailsAddressImplCopyWith<
_$PaymentElementBillingDetailsAddressImpl>
get copyWith => __$$PaymentElementBillingDetailsAddressImplCopyWithImpl<
_$PaymentElementBillingDetailsAddressImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_PaymentElementBillingDetailsAddressToJson(
return _$$PaymentElementBillingDetailsAddressImplToJson(
this,
);
}
Expand All @@ -494,11 +495,11 @@ abstract class _PaymentElementBillingDetailsAddress implements BillingAddress {
final String? state,
final String? country,
@JsonKey(name: 'postal_code') final String? postalCode}) =
_$_PaymentElementBillingDetailsAddress;
_$PaymentElementBillingDetailsAddressImpl;

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

@override

Expand Down Expand Up @@ -527,7 +528,7 @@ abstract class _PaymentElementBillingDetailsAddress implements BillingAddress {
String? get postalCode;
@override
@JsonKey(ignore: true)
_$$_PaymentElementBillingDetailsAddressCopyWith<
_$_PaymentElementBillingDetailsAddress>
_$$PaymentElementBillingDetailsAddressImplCopyWith<
_$PaymentElementBillingDetailsAddressImpl>
get copyWith => throw _privateConstructorUsedError;
}
16 changes: 9 additions & 7 deletions packages/stripe_js/lib/src/api/core/billing_details.g.dart

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

Loading
Loading