DocuSign.Deserializer (DocuSign v4.1.0)

Copy Markdown View Source

Helper functions for deserializing responses into models

Summary

Functions

Update the provided model with a deserialization of a nested value.

Functions

deserialize(model, field, atom, decoder)

@spec deserialize(
  struct(),
  atom(),
  :date | :datetime | :list | :map | :struct,
  module() | nil
) ::
  struct()

Update the provided model with a deserialization of a nested value.

Parameters

  • model (struct) - The model to be updated
  • field (atom) - The field to be updated
  • field_type (atom) - The type of the field to be updated
  • decoder (module) - The model module whose decode/1 builds the nested value, or nil for :date and :datetime fields

Returns

Struct