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

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

export interface NetworkRestriction {
  /**
   * ISO 3166-1 Numeric-3 code of the country where the network restriction is applied.
   * Example: 826 for United Kingdom.
   */
  country?: string;
  /**
   * A list of Gateway network codes, typically 7 or 10 digits.
   * Example: 0002003250
   */
  networks?: string[];
  /**
   * Flag indicates whether the profile is inclusive or exclusive.
   * Example: False - (inclusive), i.e. the “Networks” property lists the networks in which the transaction will be allowed.
   * True - (exclusive), i.e. the “Networks” property lists the networks in which the transactions will be declined.
   */
  exclusive?: boolean;
}

export const networkRestrictionSchema: Schema<NetworkRestriction> = object({
  country: ['Country', optional(string())],
  networks: ['Networks', optional(array(string()))],
  exclusive: ['Exclusive', optional(boolean())],
});
