Ramp.Locations (ramp v1.0.0)

Copy Markdown View Source

The Locations resource: full CRUD on physical/logical office locations.

Summary

Functions

Creates a new location with the given name.

Deletes a location.

Fetches a single location by ID.

Returns a lazily auto-paginating Stream of Ramp.Locations.Locations.

Fetches a single page of locations. See Ramp.Page.

Renames an existing location.

Types

list_opt()

@type list_opt() :: {:start, String.t()} | {:page_size, pos_integer()}

Functions

create(client, name)

@spec create(Ramp.Client.t(), String.t()) ::
  {:ok, Ramp.Locations.Location.t()} | {:error, Ramp.Error.t()}

Creates a new location with the given name.

delete(client, id)

@spec delete(Ramp.Client.t(), String.t()) :: :ok | {:error, Ramp.Error.t()}

Deletes a location.

get(client, id)

@spec get(Ramp.Client.t(), String.t()) ::
  {:ok, Ramp.Locations.Location.t()} | {:error, Ramp.Error.t()}

Fetches a single location by ID.

list(client, opts \\ [])

Returns a lazily auto-paginating Stream of Ramp.Locations.Locations.

list_page(client, opts \\ [])

@spec list_page(Ramp.Client.t(), [list_opt()]) ::
  {:ok, Ramp.Page.t(Ramp.Locations.Location.t())} | {:error, Ramp.Error.t()}

Fetches a single page of locations. See Ramp.Page.

update(client, id, name)

@spec update(Ramp.Client.t(), String.t(), String.t()) ::
  {:ok, Ramp.Locations.Location.t()} | {:error, Ramp.Error.t()}

Renames an existing location.