/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import { rateSetRating } from "../funcs/rateSetRating.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as operations from "./models/operations/index.js";
import { unwrapAsync } from "./types/fp.js";

export class Rate extends ClientSDK {
  /**
   * Rate an item
   *
   * @remarks
   * Set the rating on an item.
   * This API does respond to the GET verb but applications should use PUT
   */
  async setRating(
    request: operations.SetRatingRequest,
    options?: RequestOptions,
  ): Promise<operations.SetRatingResponse> {
    return unwrapAsync(rateSetRating(
      this,
      request,
      options,
    ));
  }
}
