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

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

/** The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. */
export interface PayeeBase {
  /** The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote> */
  emailAddress?: string;
  /** The account identifier for a PayPal account. */
  merchantId?: string;
}

export const payeeBaseSchema: Schema<PayeeBase> = object({
  emailAddress: ['email_address', optional(string())],
  merchantId: ['merchant_id', optional(string())],
});
