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

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

export interface CardTypeRequest {
  /**
   * Collecting Company Id of the selected payer.
   * Optional if ColCoCode is passed else Mandatory.
   */
  colCoId?: number | null;
  /**
   * 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.
   */
  colCoCode?: number | null;
  /** Payer Id of the selected payer. */
  payerId?: number | null;
  /** Payer Number of the selected payer. */
  payerNumber?: string | null;
  /**
   * Account Id of the customer.
   * Optional if AccountNumber is passed else Mandatory.
   */
  accountId?: number | null;
  /**
   * Account Number of the customer.
   * Optional if AccountId is passed else Mandatory
   * Example: GB000000124
   */
  accountNumber?: string | null;
  /**
   * Include usage restrictions in the response.
   * Optional field– default value is False.
   * Possible values: True/False
   */
  includeUsageRestrictions?: boolean;
  /**
   * Include purchase categories in the response.
   * Optional field– default value is False.
   * Possible values: True/False
   */
  includePurchaseCategories?: boolean;
}

export const cardTypeRequestSchema: Schema<CardTypeRequest> = object({
  colCoId: ['ColCoId', optional(nullable(number()))],
  colCoCode: ['ColCoCode', optional(nullable(number()))],
  payerId: ['PayerId', optional(nullable(number()))],
  payerNumber: ['PayerNumber', optional(nullable(string()))],
  accountId: ['AccountId', optional(nullable(number()))],
  accountNumber: ['AccountNumber', optional(nullable(string()))],
  includeUsageRestrictions: ['IncludeUsageRestrictions', optional(boolean())],
  includePurchaseCategories: ['IncludePurchaseCategories', optional(boolean())],
});
