MPP.Intent behaviour (mpp v0.15.0)

Copy Markdown View Source

Shared contract implemented by payment-intent schemas.

Intent modules validate construction and translate between their Elixir structs and the method-neutral request maps embedded in challenges.

Summary

Callbacks

from_request(term)

@callback from_request(term()) :: {:ok, struct()} | {:error, atom()}

new(keyword)

@callback new(keyword()) :: {:ok, struct()} | {:error, atom()}

to_request(struct)

@callback to_request(struct()) :: map()