# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule MailSlurpAPI.Api.BulkActionsController do
@moduledoc """
API calls for all endpoints tagged `BulkActionsController`.
"""
alias MailSlurpAPI.Connection
import MailSlurpAPI.RequestBuilder
@doc """
Bulk create Inboxes (email addresses)
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- count (integer()): Number of inboxes to be created in bulk
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, [%InboxDto{}, ...]} on success
{:error, info} on failure
"""
@spec bulk_create_inboxes(Tesla.Env.client, integer(), keyword()) :: {:ok, list(MailSlurpAPI.Model.InboxDto.t)} | {:error, Tesla.Env.t}
def bulk_create_inboxes(connection, count, _opts \\ []) do
%{}
|> method(:post)
|> url("/bulk/inboxes")
|> add_param(:query, :"count", count)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 201, [%MailSlurpAPI.Model.InboxDto{}]}
])
end
@doc """
Bulk Delete Inboxes
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- request_body ([String.t]):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %{}} on success
{:error, info} on failure
"""
@spec bulk_delete_inboxes(Tesla.Env.client, list(String.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
def bulk_delete_inboxes(connection, request_body, _opts \\ []) do
%{}
|> method(:delete)
|> url("/bulk/inboxes")
|> add_param(:body, :body, request_body)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 204, false}
])
end
@doc """
Bulk Send Emails
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- bulk_send_email_options (BulkSendEmailOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %{}} on success
{:error, info} on failure
"""
@spec bulk_send_emails(Tesla.Env.client, MailSlurpAPI.Model.BulkSendEmailOptions.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
def bulk_send_emails(connection, bulk_send_email_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/bulk/send")
|> add_param(:body, :body, bulk_send_email_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 201, false}
])
end
end