Boldsign.Multipart (Boldsign v0.5.2)

Copy Markdown View Source

Converts a params map into {key, value} tuples for Req's :form_multipart option.

Follows BoldSign's official SDK conventions:

  • Files are extracted and encoded as {"Files", binary, opts}
  • Lists of complex objects → indexed keys with JSON-stringified values (signers[0] = {"name":"Jo","emailAddress":"jo@x.com"})
  • Lists of primitives → indexed keys with string values
  • Dicts → bracket keys (metaData[key] = value)
  • Booleans → "true" / "false"
  • Everything else → to_string

Summary

Functions

Splits files from params and returns {file_parts, field_parts} ready for Req.post!(client, form_multipart: file_parts ++ field_parts).

Flattens a map into form field tuples. Matches the serialization approach used by BoldSign's official Node.js and Python SDKs.

Functions

encode(params)

Splits files from params and returns {file_parts, field_parts} ready for Req.post!(client, form_multipart: file_parts ++ field_parts).

flatten(params)

Flattens a map into form field tuples. Matches the serialization approach used by BoldSign's official Node.js and Python SDKs.