/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CreatePaymentRecordRequest } from '../models/CreatePaymentRecordRequest';
import type { CreatePaymentRecordResponse } from '../models/CreatePaymentRecordResponse';
import type { CreatePayRateRequest } from '../models/CreatePayRateRequest';
import type { CreatePayRateResponse } from '../models/CreatePayRateResponse';
import type { DeletePaymentRecordRequest } from '../models/DeletePaymentRecordRequest';
import type { DeletePaymentRecordResponse } from '../models/DeletePaymentRecordResponse';
import type { DeletePayRateRequest } from '../models/DeletePayRateRequest';
import type { DeletePayRateResponse } from '../models/DeletePayRateResponse';
import type { GetAllPayRatesResponse } from '../models/GetAllPayRatesResponse';
import type { GetAllPayrollSchemeResponse } from '../models/GetAllPayrollSchemeResponse';
import type { GetPaymentRecordsResponse } from '../models/GetPaymentRecordsResponse';
import type { UpdatePayRateRequest } from '../models/UpdatePayRateRequest';
import type { UpdatePayRateResponse } from '../models/UpdatePayRateResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class PayrollService {
    /**
     * Get All Schemas
     * @returns GetAllPayrollSchemeResponse Successful Response
     * @throws ApiError
     */
    public static getAllPayrollSchemas(): CancelablePromise<GetAllPayrollSchemeResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/payroll/scheme/get-all',
        });
    }
    /**
     * Get All Pay Rates
     * @returns GetAllPayRatesResponse Successful Response
     * @throws ApiError
     */
    public static getAllPayRates(): CancelablePromise<GetAllPayRatesResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/payroll/pay-rate/get-all',
        });
    }
    /**
     * Create Pay Rate
     * @returns CreatePayRateResponse Successful Response
     * @throws ApiError
     */
    public static createPayRate({
        requestBody,
    }: {
        requestBody: CreatePayRateRequest,
    }): CancelablePromise<CreatePayRateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/payroll/pay-rate/create',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Pay Rate
     * @returns UpdatePayRateResponse Successful Response
     * @throws ApiError
     */
    public static updatePayRate({
        requestBody,
    }: {
        requestBody: UpdatePayRateRequest,
    }): CancelablePromise<UpdatePayRateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/payroll/pay-rate/update',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Pay Rate
     * @returns DeletePayRateResponse Successful Response
     * @throws ApiError
     */
    public static deletePayRate({
        requestBody,
    }: {
        requestBody: DeletePayRateRequest,
    }): CancelablePromise<DeletePayRateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/payroll/pay-rate/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Payment Records
     * @returns GetPaymentRecordsResponse Successful Response
     * @throws ApiError
     */
    public static getPaymentRecords({
        page,
        itemsPerPage,
    }: {
        page?: (number | null),
        itemsPerPage?: (number | null),
    }): CancelablePromise<GetPaymentRecordsResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/payroll/payment-record/get',
            query: {
                'page': page,
                'items_per_page': itemsPerPage,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Payment Records
     * @returns CreatePaymentRecordResponse Successful Response
     * @throws ApiError
     */
    public static createPaymentRecord({
        requestBody,
    }: {
        requestBody: CreatePaymentRecordRequest,
    }): CancelablePromise<CreatePaymentRecordResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/payroll/payment-record/create',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Payment Record
     * @returns DeletePaymentRecordResponse Successful Response
     * @throws ApiError
     */
    public static deletePaymentRecord({
        requestBody,
    }: {
        requestBody: DeletePaymentRecordRequest,
    }): CancelablePromise<DeletePaymentRecordResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/payroll/payment-record/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
