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

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

export interface PurchaseCategories {
  /** Purchase category Id */
  id?: number;
  /**
   * Purchase category code
   * Example: 0,1, 2 etc.
   * Full list below:
   * 0 - All Fuels (without VP) and Lubricants
   * 1 - Fuel Save only
   * 2 - Fuel Save and Lubricants
   * 3 - No Restrictions
   * 4 - VP and Fuel Save
   * 5 - Diesel ONLY
   * 6 - Diesel and Lubricants
   * 7 - VP and Lubricants
   * 8 - VP and Fuel Save and Lubricants
   */
  code?: string;
  /**
   * Purchase category name
   * Example: Fuel Save Only
   * Full list below:
   * 0 - All Fuels (without VP) and Lubricants
   * 1 - Fuel Save only
   * 2 - Fuel Save and Lubricants
   * 3 - No Restrictions
   * 4 - VP and Fuel Save
   * 5 - Diesel ONLY
   * 6 - Diesel and Lubricants
   * 7 - VP and Lubricants
   * 8 - VP and Fuel Save and Lubricants
   */
  name?: string;
  /**
   * If True then PurchaseCategory can be used while submitting new order cards requests.
   * If false this PurchaseCategory will not be used for Ordering Cards.
   */
  isVisible?: boolean;
  /** List of Default product groups */
  productGroups?: string;
}

export const purchaseCategoriesSchema: Schema<PurchaseCategories> = object({
  id: ['Id', optional(number())],
  code: ['Code', optional(string())],
  name: ['Name', optional(string())],
  isVisible: ['IsVisible', optional(boolean())],
  productGroups: ['ProductGroups', optional(string())],
});
