# `DiffoExample.Access.CharacteristicChanges`
[🔗](https://github.com/diffo-dev/diffo_example/blob/v0.4.0/lib/access/characteristic_changes.ex#L5)

Shared changeset helpers for Access characteristic update actions.

Characteristics store nested value structs (units, bandwidth profiles)
as flat attributes. These helpers map the nested argument shape onto
those attributes.

# `set_bandwidth_profile`

Splits a `%{downstream: d, upstream: u, units: units}` bandwidth-profile
argument into three attributes.

Returns the changeset unchanged when the argument is nil or not a map
with all three keys.

# `set_unit`

Splits a `%{amount: a, unit: u}` argument into two attributes.

Returns the changeset unchanged when the argument is nil or not a map
with both keys.

---

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