/*
 * The version of the OpenAPI document: v1
 * Contact: developer-experience@adyen.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit this class manually.
 */


import getJsonResponse from "../../helpers/getJsonResponse";
import Service from "../../service";
/* tslint:disable:no-unused-locals */
import { ListTerminalsResponse } from '../../typings/management/models';
import { IRequest } from "../../typings/requestOptions";
import ManagementResource from "../resource/management/managementResource";
import { ObjectSerializer } from "../../typings/management/models";


export default class TerminalsTerminalLevelApi extends Service {
    /**
     * @summary Get a list of terminals
     * @param searchQuery Returns terminals with an ID that contains the specified string. If present, other query parameters are ignored.
     * @param countries Returns terminals located in the countries specified by their [two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
     * @param merchantIds Returns terminals that belong to the merchant accounts specified by their unique merchant account ID.
     * @param storeIds Returns terminals that are assigned to the [stores](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores) specified by their unique store ID.
     * @param brandModels Returns terminals of the [models](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) specified in the format *brand.model*.
     * @param pageNumber The number of the page to fetch.
     * @param pageSize The number of items to have on a page, maximum 100. The default is 20 items on a page.
     */
    public async listTerminals(requestOptions?: IRequest.Options): Promise<ListTerminalsResponse> {
        const localVarPath = "/terminals";
        const resource = new ManagementResource(this, localVarPath);
        const response = await getJsonResponse<string, ListTerminalsResponse>(
            resource,
            "",
            { ...requestOptions, method: "GET" }
        );
        return ObjectSerializer.deserialize(response, "ListTerminalsResponse");
    }
}
