Codat.BillPay.Companies (codat v1.0.0)

Copy Markdown View Source

Manage companies specifically for the Bill Pay solution.

Extends core company management with Bill Pay-specific operations, such as fetching mapping options for payment accounts.

Summary

Functions

Returns the mapping options for a company — available bank accounts and payment methods that can be used to pay bills.

Functions

get_mapping_options(client_or_company_id, id_or_opts \\ [])

@spec get_mapping_options(Codat.Client.t() | String.t(), String.t() | keyword()) ::
  {:ok, map()} | {:error, Codat.Error.t()}

Returns the mapping options for a company — available bank accounts and payment methods that can be used to pay bills.

Example

{:ok, options} = Codat.BillPay.Companies.get_mapping_options(client, company_id)
options["expenseProvider"]  # => %{"bankAccounts" => [...]}