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

import { object, optional, Schema } from '../schema';
import {
  RefundIncompleteReason,
  refundIncompleteReasonSchema,
} from './refundIncompleteReason';

/** The details of the refund status. */
export interface RefundStatusDetails {
  /** The reason why the refund has the `PENDING` or `FAILED` status. */
  reason?: RefundIncompleteReason;
}

export const refundStatusDetailsSchema: Schema<RefundStatusDetails> = object({
  reason: ['reason', optional(refundIncompleteReasonSchema)],
});
