/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BillStatusUpdateRequest } from '../models/BillStatusUpdateRequest';
import type { CancelDealBillRequest } from '../models/CancelDealBillRequest';
import type { CancelDealBillResponse } from '../models/CancelDealBillResponse';
import type { CreateDealBillRequest } from '../models/CreateDealBillRequest';
import type { CreateDealBillResponse } from '../models/CreateDealBillResponse';
import type { GetDealBillById } from '../models/GetDealBillById';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class BillingService {
    /**
     * Webhook
     * @returns any Successful Response
     * @throws ApiError
     */
    public static webhookBillingWebhookPost({
        requestBody,
    }: {
        requestBody: BillStatusUpdateRequest,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/billing/webhook',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Deal Bill
     * @returns CreateDealBillResponse Successful Response
     * @throws ApiError
     */
    public static createDealBill({
        requestBody,
    }: {
        requestBody: CreateDealBillRequest,
    }): CancelablePromise<CreateDealBillResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/billing/create-deal-bill',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Deal Bill
     * @returns CancelDealBillResponse Successful Response
     * @throws ApiError
     */
    public static cancelDealBill({
        requestBody,
    }: {
        requestBody: CancelDealBillRequest,
    }): CancelablePromise<CancelDealBillResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/billing/cancel-deal-bill',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Deal Bill By Id
     * @returns GetDealBillById Successful Response
     * @throws ApiError
     */
    public static getDealBillById({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<GetDealBillById> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/billing/deal-bill-request/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
