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

import { lazy, object, optional, Schema, string } from '../schema';
import { Name, nameSchema } from './name';

/** This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer. */
export interface VaultCustomer {
  /** The unique ID for a customer generated by PayPal. */
  id?: string;
  /** The name of the party. */
  name?: Name;
}

export const vaultCustomerSchema: Schema<VaultCustomer> = object({
  id: ['id', optional(string())],
  name: ['name', optional(lazy(() => nameSchema))],
});
