Railsr.Types (Railsr v1.0.0)

Copy Markdown View Source

Shared struct definitions for all Railsr domain objects.

All resource functions deserialise API responses into these structs. Unknown keys are silently dropped — the SDK stays forward-compatible with new fields added by Railsr without breaking existing code.

Summary

Functions

Deserialises a string-keyed or atom-keyed map into the given struct module. Unknown keys are silently dropped.

Functions

from_map(struct_mod, map)

@spec from_map(module(), map()) :: struct()

Deserialises a string-keyed or atom-keyed map into the given struct module. Unknown keys are silently dropped.