PaymentLinksResourceAfterCompletion.fromJson constructor

PaymentLinksResourceAfterCompletion.fromJson(
  1. Object? json
)

Implementation

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