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

import { lazy, object, optional, Schema } from '../schema';
import {
  CustomerInformation,
  customerInformationSchema,
} from './customerInformation';
import { VaultInstruction, vaultInstructionSchema } from './vaultInstruction';

/** Additional attributes associated with apple pay. */
export interface ApplePayAttributes {
  /** The details about a customer in PayPal's system of record. */
  customer?: CustomerInformation;
  /** Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting. */
  vault?: VaultInstruction;
}

export const applePayAttributesSchema: Schema<ApplePayAttributes> = object({
  customer: ['customer', optional(lazy(() => customerInformationSchema))],
  vault: ['vault', optional(lazy(() => vaultInstructionSchema))],
});
