/* tslint:disable */
/* eslint-disable */
/**
 * DXP API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { QueryBalanceListResp } from '../models';
// @ts-ignore
import type { QueryBalanceSummaryListResp } from '../models';
/**
 * CustomerBalanceManagementApi - axios parameter creator
 * @export
 */
export const CustomerBalanceManagementApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Query the list of balance books.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance List
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {string} [acctResCode] The unique code representing the balance type.
         * @param {number} [acctResId] The identifier for the balance type.
         * @param {boolean} [includeInvalid] Indicates whether to include invalid balances.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        dxpCustomerBalanceV1BalancesListGet: async (subsId?: number, prefix?: string, serviceNumber?: string, acctNbr?: string, acctResCode?: string, acctResId?: number, includeInvalid?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/dxp/customer-balance/v1/balances/list`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (subsId !== undefined) {
                localVarQueryParameter['subsId'] = subsId;
            }

            if (prefix !== undefined) {
                localVarQueryParameter['prefix'] = prefix;
            }

            if (serviceNumber !== undefined) {
                localVarQueryParameter['serviceNumber'] = serviceNumber;
            }

            if (acctNbr !== undefined) {
                localVarQueryParameter['acctNbr'] = acctNbr;
            }

            if (acctResCode !== undefined) {
                localVarQueryParameter['acctResCode'] = acctResCode;
            }

            if (acctResId !== undefined) {
                localVarQueryParameter['acctResId'] = acctResId;
            }

            if (includeInvalid !== undefined) {
                localVarQueryParameter['includeInvalid'] = includeInvalid;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Query the summary information of balance books based on cash, data, voice, and SMS.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance Summary List
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        dxpCustomerBalanceV1BalancesSummariesGet: async (acctNbr?: string, subsId?: number, prefix?: string, serviceNumber?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/dxp/customer-balance/v1/balances/summaries`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            if (acctNbr !== undefined) {
                localVarQueryParameter['acctNbr'] = acctNbr;
            }

            if (subsId !== undefined) {
                localVarQueryParameter['subsId'] = subsId;
            }

            if (prefix !== undefined) {
                localVarQueryParameter['prefix'] = prefix;
            }

            if (serviceNumber !== undefined) {
                localVarQueryParameter['serviceNumber'] = serviceNumber;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * CustomerBalanceManagementApi - functional programming interface
 * @export
 */
export const CustomerBalanceManagementApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = CustomerBalanceManagementApiAxiosParamCreator(configuration)
    return {
        /**
         * Query the list of balance books.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance List
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {string} [acctResCode] The unique code representing the balance type.
         * @param {number} [acctResId] The identifier for the balance type.
         * @param {boolean} [includeInvalid] Indicates whether to include invalid balances.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async dxpCustomerBalanceV1BalancesListGet(subsId?: number, prefix?: string, serviceNumber?: string, acctNbr?: string, acctResCode?: string, acctResId?: number, includeInvalid?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryBalanceListResp>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.dxpCustomerBalanceV1BalancesListGet(subsId, prefix, serviceNumber, acctNbr, acctResCode, acctResId, includeInvalid, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['CustomerBalanceManagementApi.dxpCustomerBalanceV1BalancesListGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Query the summary information of balance books based on cash, data, voice, and SMS.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance Summary List
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async dxpCustomerBalanceV1BalancesSummariesGet(acctNbr?: string, subsId?: number, prefix?: string, serviceNumber?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryBalanceSummaryListResp>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.dxpCustomerBalanceV1BalancesSummariesGet(acctNbr, subsId, prefix, serviceNumber, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['CustomerBalanceManagementApi.dxpCustomerBalanceV1BalancesSummariesGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * CustomerBalanceManagementApi - factory interface
 * @export
 */
export const CustomerBalanceManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = CustomerBalanceManagementApiFp(configuration)
    return {
        /**
         * Query the list of balance books.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance List
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {string} [acctResCode] The unique code representing the balance type.
         * @param {number} [acctResId] The identifier for the balance type.
         * @param {boolean} [includeInvalid] Indicates whether to include invalid balances.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        dxpCustomerBalanceV1BalancesListGet(subsId?: number, prefix?: string, serviceNumber?: string, acctNbr?: string, acctResCode?: string, acctResId?: number, includeInvalid?: boolean, options?: any): AxiosPromise<QueryBalanceListResp> {
            return localVarFp.dxpCustomerBalanceV1BalancesListGet(subsId, prefix, serviceNumber, acctNbr, acctResCode, acctResId, includeInvalid, options).then((request) => request(axios, basePath));
        },
        /**
         * Query the summary information of balance books based on cash, data, voice, and SMS.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
         * @summary Query Balance Summary List
         * @param {string} [acctNbr] The unique number associated with the account.
         * @param {number} [subsId] The unique identifier for the subscriber.
         * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
         * @param {string} [serviceNumber] The service number associated with the subscriber.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        dxpCustomerBalanceV1BalancesSummariesGet(acctNbr?: string, subsId?: number, prefix?: string, serviceNumber?: string, options?: any): AxiosPromise<QueryBalanceSummaryListResp> {
            return localVarFp.dxpCustomerBalanceV1BalancesSummariesGet(acctNbr, subsId, prefix, serviceNumber, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * CustomerBalanceManagementApi - interface
 * @export
 * @interface CustomerBalanceManagementApi
 */
export interface CustomerBalanceManagementApiInterface {
    /**
     * Query the list of balance books.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
     * @summary Query Balance List
     * @param {number} [subsId] The unique identifier for the subscriber.
     * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
     * @param {string} [serviceNumber] The service number associated with the subscriber.
     * @param {string} [acctNbr] The unique number associated with the account.
     * @param {string} [acctResCode] The unique code representing the balance type.
     * @param {number} [acctResId] The identifier for the balance type.
     * @param {boolean} [includeInvalid] Indicates whether to include invalid balances.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomerBalanceManagementApiInterface
     */
    dxpCustomerBalanceV1BalancesListGet(subsId?: number, prefix?: string, serviceNumber?: string, acctNbr?: string, acctResCode?: string, acctResId?: number, includeInvalid?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<QueryBalanceListResp>;

    /**
     * Query the summary information of balance books based on cash, data, voice, and SMS.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
     * @summary Query Balance Summary List
     * @param {string} [acctNbr] The unique number associated with the account.
     * @param {number} [subsId] The unique identifier for the subscriber.
     * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
     * @param {string} [serviceNumber] The service number associated with the subscriber.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomerBalanceManagementApiInterface
     */
    dxpCustomerBalanceV1BalancesSummariesGet(acctNbr?: string, subsId?: number, prefix?: string, serviceNumber?: string, options?: RawAxiosRequestConfig): AxiosPromise<QueryBalanceSummaryListResp>;

}

/**
 * CustomerBalanceManagementApi - object-oriented interface
 * @export
 * @class CustomerBalanceManagementApi
 * @extends {BaseAPI}
 */
export class CustomerBalanceManagementApi extends BaseAPI implements CustomerBalanceManagementApiInterface {
    /**
     * Query the list of balance books.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
     * @summary Query Balance List
     * @param {number} [subsId] The unique identifier for the subscriber.
     * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
     * @param {string} [serviceNumber] The service number associated with the subscriber.
     * @param {string} [acctNbr] The unique number associated with the account.
     * @param {string} [acctResCode] The unique code representing the balance type.
     * @param {number} [acctResId] The identifier for the balance type.
     * @param {boolean} [includeInvalid] Indicates whether to include invalid balances.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomerBalanceManagementApi
     */
    public dxpCustomerBalanceV1BalancesListGet(subsId?: number, prefix?: string, serviceNumber?: string, acctNbr?: string, acctResCode?: string, acctResId?: number, includeInvalid?: boolean, options?: RawAxiosRequestConfig) {
        return CustomerBalanceManagementApiFp(this.configuration).dxpCustomerBalanceV1BalancesListGet(subsId, prefix, serviceNumber, acctNbr, acctResCode, acctResId, includeInvalid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Query the summary information of balance books based on cash, data, voice, and SMS.  Note: &quot;subsId&quot;, &quot;serviceNumber&quot;, &quot;acctNbr&quot; cannot all be empty.
     * @summary Query Balance Summary List
     * @param {string} [acctNbr] The unique number associated with the account.
     * @param {number} [subsId] The unique identifier for the subscriber.
     * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number.
     * @param {string} [serviceNumber] The service number associated with the subscriber.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomerBalanceManagementApi
     */
    public dxpCustomerBalanceV1BalancesSummariesGet(acctNbr?: string, subsId?: number, prefix?: string, serviceNumber?: string, options?: RawAxiosRequestConfig) {
        return CustomerBalanceManagementApiFp(this.configuration).dxpCustomerBalanceV1BalancesSummariesGet(acctNbr, subsId, prefix, serviceNumber, options).then((request) => request(this.axios, this.basePath));
    }
}

