/**
 * 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)],
  }
);
