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

import {
  lazy,
  nullable,
  number,
  object,
  optional,
  Schema,
  string,
} from '../schema';
import { CardBundle, cardBundleSchema } from './cardBundle';
import { ErrorStatus, errorStatusSchema } from './errorStatus';

export interface SummaryofbundleResponse {
  /** Request Id of the API call */
  requestId?: string | null;
  /**
   * Payer Id of the bundles and cards.
   * Example: 123456
   */
  payerId?: number;
  /**
   * Payer Number of the bundles and cards.
   * Example: GB000000123
   */
  payerNumber?: string;
  accountId?: number;
  /**
   * Account Number of the bundle.
   * Example: GB000000123
   */
  accountNumber?: string;
  /** Count of cards that are not part of the bundle in a given account. */
  countOfCardsNotInBundle?: number;
  cardBundles?: CardBundle;
  error?: ErrorStatus;
}

export const summaryofbundleResponseSchema: Schema<SummaryofbundleResponse> = object(
  {
    requestId: ['RequestId', optional(nullable(string()))],
    payerId: ['PayerId', optional(number())],
    payerNumber: ['PayerNumber', optional(string())],
    accountId: ['AccountId', optional(number())],
    accountNumber: ['AccountNumber', optional(string())],
    countOfCardsNotInBundle: ['CountOfCardsNotInBundle', optional(number())],
    cardBundles: ['CardBundles', optional(lazy(() => cardBundleSchema))],
    error: ['Error', optional(lazy(() => errorStatusSchema))],
  }
);
