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

import { array, object, optional, Schema, string, unknown } from '../schema';

/** This object defines a customer in your system. Use it to manage customer profiles, save payment methods and contact details. */
export interface VaultResponseCustomer {
  /** The unique ID for a customer generated by PayPal. */
  id?: string;
  /** Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer. */
  merchantCustomerId?: string;
  /** DEPRECATED. This field is DEPRECATED. */
  links?: unknown[];
}

export const vaultResponseCustomerSchema: Schema<VaultResponseCustomer> = object(
  {
    id: ['id', optional(string())],
    merchantCustomerId: ['merchant_customer_id', optional(string())],
    links: ['links', optional(array(unknown()))],
  }
);
