Tipalti.API.Payee (tipalti v0.10.0) View Source

Obtain or update payee info.

Details are taken from: https://api.tipalti.com/v6/PayeeFunctions.asmx

Link to this section Summary

Functions

Not yet implemented

Not yet implemented

Not yet implemented

Not yet implemented

Returns extended details and custom fields of given payees.

Not yet implemented

Not yet implemented

Not yet implemented

Returns details of a given payee.

Not yet implemented

Returns all invoice reference codes that were updated since the given UTC timestamp.

Not yet implemented

Not yet implemented

Return payable status of payee.

Returns the name of the payee's selected payment method.

Not yet implemented

Not yet implemented

Not yet implemented

Updates a payee's basic info.

Not yet implemented

Link to this section Functions

Specs

cancel_invoice() :: {:error, :not_yet_implemented}

Not yet implemented

Specs

close_payee_account() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

create_payee_info_auto_idap()

View Source

Specs

create_payee_info_auto_idap() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_extended_payee_details()

View Source

Specs

get_extended_payee_details() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_extended_payee_details_list(idaps)

View Source

Specs

get_extended_payee_details_list([Tipalti.idap()]) ::
  {:ok, [Tipalti.PayeeExtended.t()]}
  | {:error, Tipalti.ClientError.t()}
  | {:error, Tipalti.RequestError.t()}

Returns extended details and custom fields of given payees.

Parameters

  • idaps: list of payee ids

Examples

  iex> get_extended_payee_details_list(["somepayee"])
  {:ok,
  [
    %Tipalti.PayeeExtended{
      custom_fields: [],
      properties: %Tipalti.PayeeExtended.Properties{
        actual_payer_entity: "Peek",
        alias: "acmepayee",
        city: nil,
        company_name: "ACME",
        country: "--",
        email: "someone@example.com",
        first_name: "Some",
        idap: "somepayee",
        last_name: "Payee",
        middle_name: nil,
        payable: false,
        payment_currency: "USD",
        payment_method: "NoPM",
        phone: nil,
        portal_user: "NotRegistered",
        preferred_payer_entity: "Peek",
        state: nil,
        status: "Active",
        street1: "123 Somewhere St.",
        street2: nil,
        tax_form_entity_name: nil,
        tax_form_entity_type: "UNKNOWN",
        tax_form_status: "NOT_SUBMITTED",
        tax_form_type: nil,
        withholding_rate: nil,
        zip: nil
      }
    }
  ]}

  iex> get_extended_payee_details_list(["badpayee"])
  {:ok, []}
Link to this function

get_extended_po_details()

View Source

Specs

get_extended_po_details() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_extended_po_details_list()

View Source

Specs

get_extended_po_details_list() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_invoices_payable_amount()

View Source

Specs

get_invoices_payable_amount() :: {:error, :not_yet_implemented}

Not yet implemented

Specs

get_payee_details(Tipalti.idap()) ::
  {:ok, Tipalti.Payee.t()}
  | {:error, Tipalti.ClientError.t()}
  | {:error, Tipalti.RequestError.t()}

Returns details of a given payee.

Parameters

  • idap: a payee id

Examples

  iex> get_payee_details("somepayee")
  {:ok,
    %Tipalti.Payee{
      address: "123 Somewhere St.",
      alias: "acmepayee",
      company_name: "ACME",
      email: "someone@example.com",
      name: "Some Payee",
      payment_method: "Check",
      payment_terms_id: nil,
      payment_terms_name: nil
    }}

  iex> get_payee_details("badpayee")
  {:error, %Tipalti.ClientError{error_code: "PayeeUnknown", error_message: "PayeeUnknown"}}
Link to this function

get_payee_invoice_list()

View Source

Specs

get_payee_invoice_list() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_payee_invoices_changed_since_timestamp(utc_time)

View Source

Specs

get_payee_invoices_changed_since_timestamp(DateTime.t()) ::
  {:ok, [String.t()]}
  | {:error, Tipalti.ClientError.t()}
  | {:error, Tipalti.RequestError.t()}

Returns all invoice reference codes that were updated since the given UTC timestamp.

Parameters

  • utc_time: a UTC DateTime struct

Examples

  iex> {:ok, utc_time, _} = DateTime.from_iso8601("2018-07-01T00:00:00Z")
  iex> get_payee_invoices_changed_since_timestamp(utc_time)
  {:ok, ["12345", "12346", "12347"]}
Link to this function

get_payee_pending_invoice_total()

View Source

Specs

get_payee_pending_invoice_total() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

get_payees_changed_since_timestamp()

View Source

Specs

get_payees_changed_since_timestamp() :: {:error, :not_yet_implemented}

Not yet implemented

Specs

get_po_details() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

payee_payable(idap, amount \\ 100.0)

View Source

Specs

payee_payable(Tipalti.idap(), integer() | float()) ::
  {:ok, true}
  | {:ok, false, String.t()}
  | {:error, Tipalti.ClientError.t()}
  | {:error, Tipalti.RequestError.t()}

Return payable status of payee.

If a payment request were to be issued, the payee might not get paid. Possible reasons for not being paid are - missing tax documents, payment below threshold, account locked, address missing, or other.

Parameters

  • idap: a payee id
  • amount: the amount for which you'd want to pay this payee (default: 100.0)

Examples

  iex> payee_payable("payablepayee", 100)
  {:ok, true}

  iex> payee_payable("unpayablepayee")
  {:ok, false, "Tax,No PM"}

  iex> payee_payable("badpayee", 123.45)
  {:error, %Tipalti.ClientError{error_code: "PayeeUnknown", error_message: "PayeeUnknown"}}
Link to this function

payee_payment_method(idap)

View Source

Specs

payee_payment_method(Tipalti.idap()) ::
  {:ok, String.t()}
  | {:error, Tipalti.ClientError.t()}
  | {:error, Tipalti.RequestError.t()}

Returns the name of the payee's selected payment method.

Examples

  iex> payee_payment_method("payablepayee")
  {:ok, "Check"}

  iex> payee_payment_method("unpayablepayee")
  {:ok, "No payment method"}

  iex> payee_payment_method("badpayee")
  {:error, %Tipalti.ClientError{error_code: "PayeeUnknown", error_message: "PayeeUnknown"}}
Link to this function

payee_status_update(idap, status, reason \\ nil)

View Source

Specs

payee_status_update(
  Tipalti.idap(),
  :active | :suspended | :blocked,
  String.t() | nil
) ::
  :ok | {:error, Tipalti.ClientError.t()} | {:error, Tipalti.RequestError.t()}

Update the status of payee.

Valid values for status are: :active, :suspended, or :blocked. When blocking a payee, a blocking reason may be supplied

Examples

  iex> payee_status_update("somepayee", :blocked, "Business closed")
  :ok

Specs

payee_update_address() :: {:error, :not_yet_implemented}

Not yet implemented

Specs

payee_update_email() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

payments_between_dates()

View Source

Specs

payments_between_dates() :: {:error, :not_yet_implemented}

Not yet implemented

Link to this function

update_or_create_payee_info(idap, params, opts)

View Source

Specs

update_or_create_payee_info(Tipalti.idap(), map(), keyword()) ::
  :ok | {:error, Tipalti.ClientError.t()} | {:error, Tipalti.RequestError.t()}

Updates a payee's basic info.

If the payee does not exist, it will be created. The details must match the ones in the payee bank records. State can either be null, or a valid 2 letter US state. If skip_nulls=true the parameters with null values will be ignored. If skip_nulls=false the null values will overwrite existing values. Country is a 2 letter ISO 3166 code.

Possible fields:

  • first_name - string
  • last_name - string
  • street1 - string
  • street2 - string
  • city - string
  • state - string
  • zip - string
  • country - string
  • email - string
  • company - string
  • alias - string
  • preferred_payer_entity - string
  • ap_account_number - string
  • payment_terms_id - string

Required options:

  • skip_nulls - boolean
  • override_payable_country - boolean

Examples

  iex> update_or_create_payee_info("newpayee", %{first_name: "John", last_name: "Smith"}, skip_nulls: true, override_payable_country: false)
  :ok

  iex> update_or_create_payee_info("invalidname", %{first_name: "José", last_name: "Valim"}, skip_nulls: true, override_payable_country: false)
  {:error, %Tipalti.ClientError{error_code: "ParameterError", error_message: "Invalid payee first name"}}

  iex> update_or_create_payee_info("newpayee", %{first_name: "John", last_name: "Smith"}, [])
  {:error, {:missing_required_option, :skip_nulls}}
Link to this function

update_payee_custom_fields()

View Source

Specs

update_payee_custom_fields() :: {:error, :not_yet_implemented}

Not yet implemented