Tipalti.IFrame.SetupProcess (tipalti v0.10.0) 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.
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
Specs
flaggable_fields() :: :country | :first | :middle | :last | :company | :street1 | :street2 | :city | :zip | :state | :email
Specs
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.
Specs
option() :: {:force, [forcable_fields()]} | {:read_only, [read_onlyable_fields()]}
Specs
options() :: [option()]
Specs
read_onlyable_fields() :: flaggable_fields()
These fields you can mark as "read-only"; they will appear in the setup form, but not be changable.
Specs
t() :: %Tipalti.IFrame.SetupProcess{ alias: String.t() | nil, city: String.t() | nil, company: String.t() | nil, country: String.t() | nil, email: String.t() | nil, first: String.t() | nil, idap: Tipalti.idap(), last: String.t() | nil, middle: String.t() | nil, preferred_payer_entity: String.t() | nil, state: String.t() | nil, street1: String.t() | nil, street2: String.t() | nil, uiculture: String.t() | nil, zip: String.t() | nil }
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
Specs
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"