/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, object, optional, Schema, string } from '../schema.js'; import { PayerName, payerNameSchema } from './payerName.js'; import { Phone, phoneSchema } from './phone.js'; import { SimplePostalAddressCoarseGrained, simplePostalAddressCoarseGrainedSchema, } from './simplePostalAddressCoarseGrained.js'; /** The payer information. */ export interface PayerInformation { /** The PayPal` customer account ID. */ accountId?: string; /** The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists. */ emailAddress?: string; /** The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). */ phoneNumber?: Phone; /** The address status of the payer. Value is either: Y. Verified. N. Not verified. */ addressStatus?: string; /** The status of the payer. Value is `Y` or `N`. */ payerStatus?: string; /** The name of the party. */ payerName?: PayerName; /** The [two-character ISO 3166-1 code](/docs/integration/direct/rest/country-codes/) that identifies the country or region. Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions. */ countryCode?: string; /** A simple postal address with coarse-grained fields. Do not use for an international address. Use for backward compatibility only. Does not contain phone. */ address?: SimplePostalAddressCoarseGrained; } export const payerInformationSchema: Schema = lazy(() => object({ accountId: ['account_id', optional(string())], emailAddress: ['email_address', optional(string())], phoneNumber: ['phone_number', optional(phoneSchema)], addressStatus: ['address_status', optional(string())], payerStatus: ['payer_status', optional(string())], payerName: ['payer_name', optional(payerNameSchema)], countryCode: ['country_code', optional(string())], address: ['address', optional(simplePostalAddressCoarseGrainedSchema)], }) );