/**
 * 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 {
  /** This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer. */
  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))],
});
