tipalti v0.5.0 Tipalti.IFrame.SetupProcess View Source

Generate URLs for the Tipalti Setup Process iFrame.

Link to this section Summary

Types

These are the fields that are “forcable”, meaning that a value supplied for them will override any value that may already exist for the account

These fields you can mark as “read-only”; they will appear in the setup form, but not be changable

t()

Struct used to represent params to the Tipalti Setup Process iFrame

Functions

Generates a Setup Process iFrame URL for the given struct of parameters

Link to this section Types

Link to this type flaggable_fields() View Source
flaggable_fields() ::
  :country
  | :first
  | :middle
  | :last
  | :company
  | :street1
  | :street2
  | :city
  | :zip
  | :state
  | :email
Link to this type forcable_fields() View Source
forcable_fields() :: flaggable_fields()

These are the fields that are “forcable”, meaning that a value supplied for them will override any value that may already exist for the account.

Link to this type option() View Source
option() ::
  {:force, [forcable_fields()]} | {:read_only, [read_onlyable_fields()]}
Link to this type options() View Source
options() :: [option()]
Link to this type read_onlyable_fields() View Source
read_onlyable_fields() :: flaggable_fields()

These fields you can mark as “read-only”; they will appear in the setup form, but not be changable.

Link to this type t() View Source
t() :: %Tipalti.IFrame.SetupProcess{
  alias: String.t(),
  city: String.t(),
  company: String.t(),
  country: String.t(),
  email: String.t(),
  first: String.t(),
  idap: Tipalti.idap(),
  last: String.t(),
  middle: String.t(),
  preferred_payer_entity: String.t(),
  state: String.t(),
  street1: String.t(),
  street2: String.t(),
  uiculture: String.t(),
  zip: String.t()
}

Struct used to represent params to the Tipalti Setup Process iFrame.

Fields:

  • :idap - Payee ID
  • :country - ISO 3166 2-letter country code
  • :first - Name of payee
  • :middle - Name of payee
  • :last - Name of payee
  • :company - Company name
  • :uiculture - Language code; one of (ar, zh-CHS, en, fr, de, it, ja, ko, nl, pt-BR, ru, es, vi)
  • :street1 - The payee contact address details
  • :street2 - The payee contact address details
  • :city - The payee contact address details
  • :zip - The payee contact address details
  • :state - The payee contact address details
  • :alias - An alternate name for the payee, if applicable
  • :email - The payee email address
  • :force - A list of fields you’d like to force (override the value even if a value already exists for the account)
  • :read_only - A list of fields you’d like to make read-only

Link to this section Functions

Link to this function url(struct, opts \\ []) View Source
url(t(), options()) :: URI.t()

Generates a Setup Process iFrame URL for the given struct of parameters.

Examples

iex> params = %Tipalti.IFrame.SetupProcess{idap: "mypayee", preferred_payer_entity: "Foo"}
...> url(params)
%URI{
  authority: "ui2.sandbox.tipalti.com",
  fragment: nil,
  host: "ui2.sandbox.tipalti.com",
  path: "/PayeeDashboard/Home",
  port: 443,
  query: "idap=mypayee&payer=MyPayer&preferredPayerEntity=Foo&ts=1521234048&hashkey=899314ff57da786a9cda58f3296b844cd4fbeac75dbfaec13cf8a04aca3d99db",
  scheme: "https",
  userinfo: nil
}

iex> params = %Tipalti.IFrame.SetupProcess{idap: "mypayee", company: "My Company", first: "Joe"}
...> url(params, force: [:company], read_only: [:first]) |> URI.to_string()
"https://ui2.sandbox.tipalti.com/PayeeDashboard/Home?first=Joe&firstSetReadOnly=TRUE&forceCompany=My+Company&idap=mypayee&payer=MyPayer&ts=1521234048&hashkey=78f5d8126f299fd2f80024cc00bccf2b43bae28987eb0a3b44d5d8d4bece7f14"