Chimeway.APNS.RequestIntent (chimeway v1.2.0)

Copy Markdown View Source

Safe, durable routing intent for an APNs target.

Summary

Types

t()

@type t() :: %Chimeway.APNS.RequestIntent{
  apns_id: String.t(),
  collapse_id: String.t() | nil,
  environment: :sandbox | :production,
  expires_at: DateTime.t(),
  open_ref: String.t(),
  topic: String.t()
}

Functions

expired?(request_intent, now)

@spec expired?(t(), DateTime.t()) :: boolean()

from_storage(storage)

@spec from_storage(map() | nil) :: {:ok, t()} | {:error, :invalid_apns_request_intent}

new(attrs, opts)

@spec new(map(), keyword()) :: {:ok, t()} | {:error, :invalid_apns_request_intent}

to_storage(intent)

@spec to_storage(t()) :: map()