View Source ExNylas.Scheduling.Availability (ExNylas v0.9.0)

Interface for Nylas scheduling availability.

Nylas docs

Summary

Functions

Create and validate a scheduling availability, use create/update to send to Nylas.

Create and validate a scheduling availability, use create/update to send to Nylas.

Get scheduling availability for a given time range.

Get scheduling availability for a given time range.

Functions

@spec build(map() | struct()) :: {:ok, struct()} | {:error, Ecto.Changeset.t()}

Create and validate a scheduling availability, use create/update to send to Nylas.

Examples

iex> {:ok, result} = ExNylas.Scheduling.Availability.build(payload)
@spec build!(map() | struct()) :: struct()

Create and validate a scheduling availability, use create/update to send to Nylas.

Examples

iex> result = ExNylas.Scheduling.Availability.build!(payload)
Link to this function

get(conn, start_time, end_time, params \\ [])

View Source
@spec get(ExNylas.Connection.t(), integer(), integer(), Keyword.t()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Get scheduling availability for a given time range.

Params

  • session_id needed for private scheduling configurations
  • config_id needed for public scheduling configurations
  • slug slug of the scheduling configuration, can be used instead of config_id
  • booking_id needed to check availability when rescheduling a round robin booking

Examples

iex> {:ok, availability} = ExNylas.Scheduling.Availability.get(conn, 1614556800, 1614643200, config_id: "1234-5678")
Link to this function

get!(conn, start_time, end_time, params \\ [])

View Source

Get scheduling availability for a given time range.

Params

  • session_id needed for private scheduling configurations
  • config_id needed for public scheduling configurations
  • slug slug of the scheduling configuration, can be used instead of config_id
  • booking_id needed to check availability when rescheduling a round robin booking

Examples

iex> availability = ExNylas.Scheduling.Availability.get!(conn, 1614556800, 1614643200, config_id: "1234-5678")