/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BillStatusUpdateRequest } from '../models/BillStatusUpdateRequest';
import type { CancelCardBillRequest } from '../models/CancelCardBillRequest';
import type { CancelCardBillResponse } from '../models/CancelCardBillResponse';
import type { CreateCardBillRequest } from '../models/CreateCardBillRequest';
import type { CreateCardBillResponse } from '../models/CreateCardBillResponse';
import type { GetCardBillById } from '../models/GetCardBillById';
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 CreateCardBillResponse Successful Response
     * @throws ApiError
     */
    public static createDealBill({
        requestBody,
    }: {
        requestBody: CreateCardBillRequest,
    }): CancelablePromise<CreateCardBillResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/billing/create-deal-bill',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Cancel Deal Billing
     * @returns CancelCardBillResponse Successful Response
     * @throws ApiError
     */
    public static cancelDealBill({
        requestBody,
    }: {
        requestBody: CancelCardBillRequest,
    }): CancelablePromise<CancelCardBillResponse> {
        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 GetCardBillById Successful Response
     * @throws ApiError
     */
    public static getDealBillById({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<GetCardBillById> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/billing/deal-bill-request/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
