/**
 * Shell Card Management APIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

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

export interface Address {
  /** Address Id in cards platform. */
  addressId?: number | null;
  /** Address line1 */
  addressLine1?: string | null;
  /** Address line2 */
  addressLine2?: string | null;
  /** AddressLine3 */
  addressLine3?: string | null;
  /** ZipCode */
  zipCode?: string | null;
  /** City */
  city?: string | null;
  /** Region Id of the address. */
  regionId?: number | null;
  /** Country ISO code of the address */
  countryISOCode?: string | null;
  /** Country for the address */
  country?: string | null;
  /** Telephone number of the address contact */
  telephone?: string | null;
  /** Email address of the address contact */
  emailAddress?: string | null;
  /** Fax number of the address contact */
  fax?: string | null;
}

export const addressSchema: Schema<Address> = object({
  addressId: ['AddressId', optional(nullable(number()))],
  addressLine1: ['AddressLine1', optional(nullable(string()))],
  addressLine2: ['AddressLine2', optional(nullable(string()))],
  addressLine3: ['AddressLine3', optional(nullable(string()))],
  zipCode: ['ZipCode', optional(nullable(string()))],
  city: ['City', optional(nullable(string()))],
  regionId: ['RegionId', optional(nullable(number()))],
  countryISOCode: ['CountryISOCode', optional(nullable(string()))],
  country: ['Country', optional(nullable(string()))],
  telephone: ['Telephone', optional(nullable(string()))],
  emailAddress: ['EmailAddress', optional(nullable(string()))],
  fax: ['Fax', optional(nullable(string()))],
});
