# `Ltix.LaunchClaims.MembershipsEndpoint`
[🔗](https://github.com/DecoyLex/ltix/blob/main/lib/ltix/launch_claims/memberships_endpoint.ex#L1)

Memberships service endpoint claim.

Provides a URL for retrieving context membership. All fields are optional
when parsed from launch claims; the `context_memberships_url` is required
when constructing an endpoint manually via `new/1`.

## Examples

    iex> Ltix.LaunchClaims.MembershipsEndpoint.from_json(%{"context_memberships_url" => "https://example.com/members"})
    {:ok, %Ltix.LaunchClaims.MembershipsEndpoint{context_memberships_url: "https://example.com/members", service_versions: nil}}

# `t`

```elixir
@type t() :: %Ltix.LaunchClaims.MembershipsEndpoint{
  context_memberships_url: binary(),
  service_versions: [binary()]
}
```

# `from_json`

```elixir
@spec from_json(map()) :: {:ok, t()} | {:error, Exception.t()}
```

Parse a memberships endpoint claim from a JSON map.

## Examples

    iex> Ltix.LaunchClaims.MembershipsEndpoint.from_json(%{})
    {:ok, %Ltix.LaunchClaims.MembershipsEndpoint{context_memberships_url: nil, service_versions: nil}}

# `new`

```elixir
@spec new(String.t()) :: t()
```

Create a memberships endpoint from a URL string.

## Examples

    iex> Ltix.LaunchClaims.MembershipsEndpoint.new("https://lms.example.com/memberships")
    %Ltix.LaunchClaims.MembershipsEndpoint{context_memberships_url: "https://lms.example.com/memberships", service_versions: nil}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
