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

Fix PayPal payments #1341

Merged
merged 6 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all 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

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 @@ -310,6 +310,7 @@ enum PaymentMethodType {
Eps,
Bancontact,
Oxxo,
PayPal,
Sofort,
Upi,
USBankAccount,
Expand Down Expand Up @@ -783,14 +784,37 @@ class MandateData with _$MandateData {

///Information about the online mandate
class MandateDataCustomerAcceptance with _$MandateDataCustomerAcceptance {
@JsonSerializable(explicitToJson: true)
const factory MandateDataCustomerAcceptance({
/// Online data regarding the mandate.
MandateDataOnlineData? ipAddress,
}) = _MandateDataCustomerAcceptance;

factory MandateDataCustomerAcceptance.fromJson(Map<String, dynamic> json) =>
_$MandateDataCustomerAcceptanceFromJson(json);
const MandateDataCustomerAcceptance._();

factory MandateDataCustomerAcceptance.fromJson(Map<String, dynamic> json) {
final type = json['type'] as String?;
if (type != 'online') {
throw ArgumentError.value(
type,
'type',
'Only customer acceptance of type online is supported.',
);
}

return _MandateDataCustomerAcceptance(
ipAddress: json['online'] == null
? null
: MandateDataOnlineData.fromJson(
json['online'] as Map<String, dynamic>,
),
);
}

Map<String, dynamic> toJson() {
return {
'type': 'online',
'online': ipAddress?.toJson(),
};
}
}

@freezed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12735,17 +12735,11 @@ abstract class _MandateData implements MandateData {
throw _privateConstructorUsedError;
}

MandateDataCustomerAcceptance _$MandateDataCustomerAcceptanceFromJson(
Map<String, dynamic> json) {
return _MandateDataCustomerAcceptance.fromJson(json);
}

/// @nodoc
mixin _$MandateDataCustomerAcceptance {
/// Online data regarding the mandate.
MandateDataOnlineData? get ipAddress => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$MandateDataCustomerAcceptanceCopyWith<MandateDataCustomerAcceptance>
get copyWith => throw _privateConstructorUsedError;
Expand Down Expand Up @@ -12842,14 +12836,8 @@ class __$$_MandateDataCustomerAcceptanceCopyWithImpl<$Res>

/// @nodoc

@JsonSerializable(explicitToJson: true)
class _$_MandateDataCustomerAcceptance
implements _MandateDataCustomerAcceptance {
const _$_MandateDataCustomerAcceptance({this.ipAddress});

factory _$_MandateDataCustomerAcceptance.fromJson(
Map<String, dynamic> json) =>
_$$_MandateDataCustomerAcceptanceFromJson(json);
class _$_MandateDataCustomerAcceptance extends _MandateDataCustomerAcceptance {
const _$_MandateDataCustomerAcceptance({this.ipAddress}) : super._();

/// Online data regarding the mandate.
@override
Expand All @@ -12869,7 +12857,6 @@ class _$_MandateDataCustomerAcceptance
other.ipAddress == ipAddress));
}

@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, ipAddress);

Expand All @@ -12879,23 +12866,14 @@ class _$_MandateDataCustomerAcceptance
_$$_MandateDataCustomerAcceptanceCopyWith<_$_MandateDataCustomerAcceptance>
get copyWith => __$$_MandateDataCustomerAcceptanceCopyWithImpl<
_$_MandateDataCustomerAcceptance>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_MandateDataCustomerAcceptanceToJson(
this,
);
}
}

abstract class _MandateDataCustomerAcceptance
implements MandateDataCustomerAcceptance {
extends MandateDataCustomerAcceptance {
const factory _MandateDataCustomerAcceptance(
{final MandateDataOnlineData? ipAddress}) =
_$_MandateDataCustomerAcceptance;

factory _MandateDataCustomerAcceptance.fromJson(Map<String, dynamic> json) =
_$_MandateDataCustomerAcceptance.fromJson;
const _MandateDataCustomerAcceptance._() : super._();

@override

Expand Down

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

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

Loading