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

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

/** Customizes the buyer experience during the approval process for payment with Venmo.<blockquote><strong>Note:</strong> Partners and Marketplaces might configure <code>shipping_preference</code> during partner account setup, which overrides the request values.</blockquote> */
export interface VenmoWalletExperienceContext {
  /** The business name of the merchant. The pattern is defined by an external party and supports Unicode. */
  brandName?: string;
  /** The location from which the shipping address is derived. */
  shippingPreference?: ShippingPreference;
}

export const venmoWalletExperienceContextSchema: Schema<VenmoWalletExperienceContext> = object(
  {
    brandName: ['brand_name', optional(string())],
    shippingPreference: [
      'shipping_preference',
      optional(shippingPreferenceSchema),
    ],
  }
);
