/**
 * Account information PNZ-API-CentreLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { lazy, object, Schema, string } from '../schema';
import { DeliveryAddress, deliveryAddressSchema } from './deliveryAddress';
import { GeoLocation, geoLocationSchema } from './geoLocation';

export interface Risk {
  endUserAppName: string;
  endUserAppVersion: string;
  paymentContextCode: string;
  merchantName: string;
  merchantNZBN: string;
  merchantCategoryCode: string;
  merchantCustomerIdentification: string;
  geoLocation: GeoLocation;
  deliveryAddress: DeliveryAddress;
}

export const riskSchema: Schema<Risk> = object({
  endUserAppName: ['EndUserAppName', string()],
  endUserAppVersion: ['EndUserAppVersion', string()],
  paymentContextCode: ['PaymentContextCode', string()],
  merchantName: ['MerchantName', string()],
  merchantNZBN: ['MerchantNZBN', string()],
  merchantCategoryCode: ['MerchantCategoryCode', string()],
  merchantCustomerIdentification: ['MerchantCustomerIdentification', string()],
  geoLocation: ['GeoLocation', lazy(() => geoLocationSchema)],
  deliveryAddress: ['DeliveryAddress', lazy(() => deliveryAddressSchema)],
});
