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

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

export interface AccountRestrictionResponse {
  /**
   * Account Id on which restriction is applied.
   * Example: 123456
   */
  accountId?: number;
  /**
   * Account Number on which restriction is applied.
   * Example: GB000000123
   */
  accountNumber?: string;
  /** Status of the card usage restriction submitted to Gateway. Based on the response from Gateway value will be set as either “Success” or “Failed”. */
  usageRestrictionStatus?: string;
  /** Response for the usage restriction in case of an error. This field will have a value only when “UsageRestrictionStatus” is “Failed”. */
  usageRestrictionDescription?: string;
}

export const accountRestrictionResponseSchema: Schema<AccountRestrictionResponse> = object(
  {
    accountId: ['AccountId', optional(number())],
    accountNumber: ['AccountNumber', optional(string())],
    usageRestrictionStatus: ['UsageRestrictionStatus', optional(string())],
    usageRestrictionDescription: [
      'UsageRestrictionDescription',
      optional(string()),
    ],
  }
);
