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

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

export interface CreateCardGroupRequestCardsItems {
  /**
   * Account Id of the account of the card.
   * Optional if AccountNumber is passed, else Mandatory.
   */
  accountId?: number;
  /**
   * Account Number of the account of the card.
   * Optional if AccountId is passed, else Mandatory.
   */
  accountNumber?: string;
  /**
   * Card Id of the card.
   * Optional if PAN is passed, else Mandatory.
   */
  cardId?: number;
  /**
   * PAN of the card.
   * Optional if CardId is passed, else Mandatory.
   */
  pAN?: string;
}

export const createCardGroupRequestCardsItemsSchema: Schema<CreateCardGroupRequestCardsItems> = object(
  {
    accountId: ['AccountId', optional(number())],
    accountNumber: ['AccountNumber', optional(string())],
    cardId: ['CardId', optional(number())],
    pAN: ['PAN', optional(string())],
  }
);
