/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CreatePalletResponse } from '../models/CreatePalletResponse';
import type { DeleteBoxResponse } from '../models/DeleteBoxResponse';
import type { DeletePalletResponse } from '../models/DeletePalletResponse';
import type { DeleteShippingProductResponse } from '../models/DeleteShippingProductResponse';
import type { UpdateBoxRequest } from '../models/UpdateBoxRequest';
import type { UpdateBoxResponse } from '../models/UpdateBoxResponse';
import type { UpdateShippingProductRequest } from '../models/UpdateShippingProductRequest';
import type { UpdateShippingProductResponse } from '../models/UpdateShippingProductResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ShippingService {
    /**
     * Create Pallet
     * @returns CreatePalletResponse Successful Response
     * @throws ApiError
     */
    public static createPallet({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<CreatePalletResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/shipping/pallet/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Pallet
     * @returns DeletePalletResponse Successful Response
     * @throws ApiError
     */
    public static deletePallet({
        palletId,
    }: {
        palletId: number,
    }): CancelablePromise<DeletePalletResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/shipping/pallet/{pallet_id}',
            path: {
                'pallet_id': palletId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Shipping Product
     * @returns UpdateShippingProductResponse Successful Response
     * @throws ApiError
     */
    public static updateShippingProduct({
        requestBody,
    }: {
        requestBody: UpdateShippingProductRequest,
    }): CancelablePromise<UpdateShippingProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/shipping/product',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Shipping Product
     * @returns DeleteShippingProductResponse Successful Response
     * @throws ApiError
     */
    public static deleteShippingProduct({
        shippingProductId,
    }: {
        shippingProductId: number,
    }): CancelablePromise<DeleteShippingProductResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/shipping/product/{shipping_product_id}',
            path: {
                'shipping_product_id': shippingProductId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Box
     * @returns UpdateBoxResponse Successful Response
     * @throws ApiError
     */
    public static updateBox({
        requestBody,
    }: {
        requestBody: UpdateBoxRequest,
    }): CancelablePromise<UpdateBoxResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/shipping/box',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Box
     * @returns DeleteBoxResponse Successful Response
     * @throws ApiError
     */
    public static deleteBox({
        boxId,
    }: {
        boxId: number,
    }): CancelablePromise<DeleteBoxResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/shipping/box/{box_id}',
            path: {
                'box_id': boxId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Generate Deal Qr Code Pdf
     * @returns any Successful Response
     * @throws ApiError
     */
    public static getDealQrCodePdf({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/shipping/pdf/deal/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Generate Pallets Pdf
     * @returns any Successful Response
     * @throws ApiError
     */
    public static getPalletsPdf({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/shipping/pdf/pallets/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Generate Boxes Pdf
     * @returns any Successful Response
     * @throws ApiError
     */
    public static getBoxesPdf({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/shipping/pdf/boxes/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
