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

import {
  array,
  lazy,
  number,
  object,
  optional,
  Schema,
  string,
} from '../schema.js';
import {
  UpdateMPayRegStatusRequestMPayRequestsItems,
  updateMPayRegStatusRequestMPayRequestsItemsSchema,
} from './updateMPayRegStatusRequestMPayRequestsItems.js';

export interface UpdateMPayRegStatusRequest {
  /**
   * Collecting Company Id  of the selected payer.
   * Optional if ColCoCode is passed else Mandatory.
   * Example:
   * 1-Philippines
   * 5-UK
   */
  colCoId?: number;
  /**
   * Collecting Company Code (Shell Code) of the selected payer.
   * Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided.
   * Example:
   * 86-Philippines
   * 5-UK
   */
  colCoCode?: number;
  /**
   * Payer Id  of the selected payer.
   * Optional if PayerNumber is passed else Mandatory
   */
  payerId?: number;
  /**
   * Payer Number (Ex: GB000000123) of the selected payer.
   * Optional if PayerId is passed else Mandatory
   */
  payerNumber?: string;
  /**
   * List of MPay Request to be updated for Fleet Manager approval status.
   * Mandatory
   * Maximum number of requests that can be submitted are 50
   */
  mPayRequests?: UpdateMPayRegStatusRequestMPayRequestsItems[];
}

export const updateMPayRegStatusRequestSchema: Schema<UpdateMPayRegStatusRequest> = lazy(
  () =>
    object({
      colCoId: ['ColCoId', optional(number())],
      colCoCode: ['ColCoCode', optional(number())],
      payerId: ['PayerId', optional(number())],
      payerNumber: ['PayerNumber', optional(string())],
      mPayRequests: [
        'MPayRequests',
        optional(array(updateMPayRegStatusRequestMPayRequestsItemsSchema)),
      ],
    })
);
