Packages

Reference spec for interacting with Foyer API services

Current section

Files

Jump to
foyer_api_sdk lib foyer_api api error_feedback.ex
Raw

lib/foyer_api/api/error_feedback.ex

# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule FoyerAPI.Api.ErrorFeedback do
@moduledoc """
API calls for all endpoints tagged `ErrorFeedback`.
"""
alias FoyerAPI.Connection
import FoyerAPI.RequestBuilder
@doc """
Post ErrorFeedback
Post an ErrorFeedback object
## Parameters
- connection (FoyerAPI.Connection): Connection to server
- error_feedback (ErrorFeedback):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, FoyerAPI.Model.ErrorFeedback.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec post_error_feedback(Tesla.Env.client, FoyerAPI.Model.ErrorFeedback.t, keyword()) :: {:ok, nil} | {:ok, FoyerAPI.Model.ErrorFeedback.t} | {:error, Tesla.Env.t}
def post_error_feedback(connection, error_feedback, _opts \\ []) do
%{}
|> method(:post)
|> url("/ErrorFeedback")
|> add_param(:body, :body, error_feedback)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %FoyerAPI.Model.ErrorFeedback{}},
{ 401, false}
])
end
end