PaymentLinkAfterCompletion.fromJson constructor

PaymentLinkAfterCompletion.fromJson(
  1. Object? json
)

Implementation

factory PaymentLinkAfterCompletion.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentLinkAfterCompletion(
    hostedConfirmation: map['hosted_confirmation'] == null
        ? null
        : SessionHostedConfirmation.fromJson(map['hosted_confirmation']),
    redirect: map['redirect'] == null
        ? null
        : PaymentLinksResourceCompletionBehaviorRedirect.fromJson(
            map['redirect']),
    type: PaymentLinksResourceAfterCompletionType.fromJson(map['type']),
  );
}