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

import { lazy, object, optional, Schema } from '../schema';
import { RefundStatus, refundStatusSchema } from './refundStatus';
import {
  RefundStatusDetails,
  refundStatusDetailsSchema,
} from './refundStatusDetails';

/** The refund status with details. */
export interface RefundStatusWithDetails {
  /** The status of the refund. */
  status?: RefundStatus;
  /** The details of the refund status. */
  statusDetails?: RefundStatusDetails;
}

export const refundStatusWithDetailsSchema: Schema<RefundStatusWithDetails> = object(
  {
    status: ['status', optional(refundStatusSchema)],
    statusDetails: [
      'status_details',
      optional(lazy(() => refundStatusDetailsSchema)),
    ],
  }
);
