Boldsign.Multipart (Boldsign v0.5.3)

Copy Markdown View Source

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

BoldSign's multipart API uses bracket notation for nested objects:

  • signers[0][name] = "Neil"
  • textTagDefinitions[0][type] = "Signature"

Files are extracted as {"Files", {binary, opts}} tuples.

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.