Tipalti.SOAP.Client (tipalti_client v1.0.0)

Copy Markdown View Source

Generic engine behind Tipalti.SOAP.Payee and Tipalti.SOAP.Payer.

Builds a signed SOAP 1.1 envelope for a given operation/params, posts it to the right service (PayeeFunctions.asmx or PayerFunctions.asmx), parses the XML response with the OTP-bundled :xmerl (no external XML library dependency), and either returns the parsed body fields as a map or raises/returns a Tipalti.SOAPFaultError if the response was a <soap:Fault>.

You generally won't call this directly — see Tipalti.SOAP.Payee and Tipalti.SOAP.Payer for the typed operation wrappers built on top of it.

Summary

Types

service()

@type service() :: :payee | :payer

Functions

call(config, service, operation, params \\ %{}, opts \\ [])

@spec call(Tipalti.Config.t(), service(), String.t(), map() | keyword(), keyword()) ::
  {:ok, map()} | {:error, Exception.t()}

Calls a SOAP operation.

  • service:payee or :payer.
  • operation — the operation name, e.g. "ProcessPayments".
  • params — a map/keyword list of %{ParamName => value} fields to render as child elements inside the operation's request element, in the order given.
  • opts:
    • :idap — payee ID, included in the signature (and, if not already in params, added as an idap element) for payee-function calls.
    • :eat — this operation's EAT (Encryption Additional Terms) value, folded into the signature per Tipalti's signing scheme.