/**
 * 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 PayerAccess {
  /** Whether this payer is the default payer of the user. */
  isDefault?: boolean;
  /** Collecting company id. */
  colcoId?: number | null;
  /**
   * Collecting company code.
   * Example:
   * 86-Philippines
   * 5-UK
   */
  colcoCode?: number | null;
  /** The 2-character ISO Code for the customer and card owning country */
  colCoCountryCode?: string | null;
  /** Payer Group Id of the payer. */
  payerGroupId?: number | null;
  /**
   * Payer group of the payer.
   * The value of this parameter will always be null when the input parameter “IncludePayerGroup” is false.
   */
  payerGroup?: string | null;
  /**
   * Payer Id to which the user has access
   * Example: 123456
   */
  payerId?: number | null;
  /**
   * Payer Number to which the user has access
   * Example: GB000000123
   */
  payerNumber?: string | null;
  /** Name of the Payer to which the user has access */
  payerName?: string | null;
}

export const payerAccessSchema: Schema<PayerAccess> = object({
  isDefault: ['IsDefault', optional(boolean())],
  colcoId: ['ColcoId', optional(nullable(number()))],
  colcoCode: ['ColcoCode', optional(nullable(number()))],
  colCoCountryCode: ['ColCoCountryCode', optional(nullable(string()))],
  payerGroupId: ['PayerGroupId', optional(nullable(number()))],
  payerGroup: ['PayerGroup', optional(nullable(string()))],
  payerId: ['PayerId', optional(nullable(number()))],
  payerNumber: ['PayerNumber', optional(nullable(string()))],
  payerName: ['PayerName', optional(nullable(string()))],
});
