/**
 * Paypal Server SDKLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { object, optional, Schema } from '../schema';
import { EnrollmentStatus, enrollmentStatusSchema } from './enrollmentStatus';
import { PAResStatus, pAResStatusSchema } from './pAResStatus';

/** Results of 3D Secure Authentication. */
export interface ThreeDSecureAuthenticationResponse {
  /** Transactions status result identifier. The outcome of the issuer's authentication. */
  authenticationStatus?: PAResStatus;
  /** Status of Authentication eligibility. */
  enrollmentStatus?: EnrollmentStatus;
}

export const threeDSecureAuthenticationResponseSchema: Schema<ThreeDSecureAuthenticationResponse> = object(
  {
    authenticationStatus: [
      'authentication_status',
      optional(pAResStatusSchema),
    ],
    enrollmentStatus: ['enrollment_status', optional(enrollmentStatusSchema)],
  }
);
