/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */

import type { CancelablePromise } from "../core/CancelablePromise";
import { OpenAPI } from "../core/OpenAPI";
import { request as __request } from "../core/request";
export class PaymentsService {
  /**
   * Cached NOWPayments currency list (~1h) for pay-currency picker.
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetNowpaymentsCurrencies(): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/nowpayments/currencies",
    });
  }

  /**
   * NOWPayments fiat currencies (JWT-backed, cached ~1h) for pay-currency picker.
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetNowpaymentsFiatCurrencies(): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/nowpayments/fiat-currencies",
    });
  }

  /**
   * @param shipping
   * @param upgrade
   * @param smartPay
   * @param gen2Migration
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetPaymentMethods(): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/methods",
    });
  }
  /**
   * @param id
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetPaymentMethod(
    id: number,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/methods/{id}",
      path: {
        id: id,
      },
    });
  }
  /**
   * @param methodId
   * @param shipping
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetPaymentMethodAssets(
    methodId: number,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/assets",
      query: {
        methodId: methodId,
      },
    });
  }
  /**
   * @param id
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetPaymentMethodAssetBalance(
    id: number,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/assets/{id}/balance",
      path: {
        id: id,
      },
    });
  }
  /**
   * @param id
   * @returns any
   * @throws ApiError
   */
  public static paymentsControllerGetPaymentMethodAsset(
    id: number,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/payments/assets/{id}",
      path: {
        id: id,
      },
    });
  }
}
