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

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

export interface BundledDetailsProductList {
  /**
   * Purchase category Id
   * Example: 123, 124, etc.,
   */
  purchaseCategoryId?: number;
  /**
   * Purchase category name.
   * Example:
   * 0 - All Fuels (without VP) and Lubricants
   * 1 - FuelSave only
   * 2 - FuelSave and Lubricants
   * 3 - No Restrictions
   */
  purchaseCategoryCode?: string;
  /**
   * An array of 3-digit global product codes.
   * Example: [ "033", "021", "023" ]
   */
  products?: string[];
  /**
   * An array of product group ids.
   * Example: [ "670246404", "40557126" ]
   */
  productGroups?: string[];
  /** Fuel set id that is allowed to be purchased with the card */
  fuelSetId?: string;
  /** Fuel set name that is allowed to be purchased with the card */
  fuelSetName?: string;
  /** Non-Fuel set name that is allowed to be purchased with the card */
  nonFuelSets?: string;
}

export const bundledDetailsProductListSchema: Schema<BundledDetailsProductList> = object(
  {
    purchaseCategoryId: ['PurchaseCategoryId', optional(number())],
    purchaseCategoryCode: ['PurchaseCategoryCode', optional(string())],
    products: ['Products', optional(array(string()))],
    productGroups: ['ProductGroups', optional(array(string()))],
    fuelSetId: ['FuelSetId', optional(string())],
    fuelSetName: ['FuelSetName', optional(string())],
    nonFuelSets: ['NonFuelSets', optional(string())],
  }
);
