exhal v8.2.0 ExHal.Form
Represents a Dwolla style HAL
form. Generally these are
acquired from ExHal.Document.get_form/2,
ExHal.Document.fetch_form/2, etc
Link to this section Summary
Types
A form that can be completed and submitted. This type is opaque and
should only be used as an argument to functions in this, Elixir.ExHal.Form module.
Functions
Creates a new form from raw form JSON.
Returns list of the fields in this form.
Returns form with the specified fields value updated.
Submits form and returns the response.
Link to this section Types
t()
(opaque)
t()
t()
A form that can be completed and submitted. This type is opaque and
should only be used as an argument to functions in this, Elixir.ExHal.Form module.
Link to this section Functions
client_module()
from_forms_entry(a_map)
from_forms_entry(%{}) :: ExHal.Form.t()
from_forms_entry(%{}) :: ExHal.Form.t()
Creates a new form from raw form JSON.
Raises ArgumentError if a_map is not a valid form fragment.
get_fields(a_form)
get_fields(ExHal.Form.t()) :: [ExHal.FormField.t()]
get_fields(ExHal.Form.t()) :: [ExHal.FormField.t()]
Returns list of the fields in this form.
set_field_value(form, field_name, new_value)
set_field_value(ExHal.Form.t(), String.t(), ExHal.FormField.field_value()) ::
ExHal.Form.t()
set_field_value(ExHal.Form.t(), String.t(), ExHal.FormField.field_value()) :: ExHal.Form.t()
Returns form with the specified fields value updated.
Raises ArgumentError if the specified field doesn't exist.
submit(form, client)
submit(ExHal.Form.t(), Client.t()) :: Client.http_response()
submit(ExHal.Form.t(), Client.t()) :: Client.http_response()
Submits form and returns the response.