Inttegro.Chimes (inttegro v0.2.0)

Copy Markdown View Source

Sends and schedules transactional messages.

Chimes deliver email or SMS content to inline recipients, saved customers, or template-defined recipients. A returned chime records rendering, safety, and transmission results; delivery may continue asynchronously after the API call succeeds.

Summary

Functions

Start an asynchronous SMS or email broadcast to one or more recipients.

Retrieve a sent Chime and its current transmission state.

Retrieve Chimes, optionally filtered by customer or recipient address.

Schedule one or more SMS or email notifications for future delivery.

Send one SMS or email notification immediately.

Functions

broadcast(client, request, options \\ [])

Start an asynchronous SMS or email broadcast to one or more recipients.

Parameters

Returns

Returns {:ok, Inttegro.Chimes.BroadcastCreationDetail.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Chimes.BroadcastRequest.new!(request_attributes)

case Inttegro.Chimes.broadcast(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end

lookup(client, request, options \\ [])

Retrieve a sent Chime and its current transmission state.

Parameters

Returns

Returns {:ok, Inttegro.Chimes.Chime.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Chimes.LookupRequest.new!(request_attributes)

case Inttegro.Chimes.lookup(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end

page(client, request, options \\ [])

Retrieve Chimes, optionally filtered by customer or recipient address.

Parameters

Returns

Returns {:ok, Inttegro.Chimes.Page.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Chimes.PageRequest.new!(request_attributes)

case Inttegro.Chimes.page(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end

schedule(client, request, options \\ [])

Schedule one or more SMS or email notifications for future delivery.

Parameters

Returns

Returns {:ok, Inttegro.Chimes.ScheduleCreationDetail.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Chimes.ScheduleRequest.new!(request_attributes)

case Inttegro.Chimes.schedule(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end

send(client, request, options \\ [])

Send one SMS or email notification immediately.

Parameters

Returns

Returns {:ok, Inttegro.Chimes.Chime.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Chimes.SendRequest.new!(request_attributes)

case Inttegro.Chimes.send(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end