Billcom v0.1.1 Billcom View Source
Simple api library to connect to bill.com api
Config your bill.com connection:
config :billcom, :api,
%{
devKey: "T3WMJHVXXYZUSUKQE9CDPEKN",
orgId: "Y8RGTBK2PXFGBUQMSCNM",
password: "AJXR5CZJBPJD",
userName: "sarah.connor@example.com"
prod: true // optionnal
}
Where devKey
, orgId
, password
, userName
are provided by Bill.com and are mandatory. prod
let you choose between bill.com in sandbox mode or production. By default the api try to connect to sandbox.
Note that most of the api return are with a form of a 2 values tuple:
{status, data}
Where status can be either :ok
or :error
dans val the corresponding data, and take a parameter a connection struture as a parameters, return of Billcom.login!/0
conn = Billcom.login
Billcom.list_orgs(conn)
Link to this section Summary
Functions
Approve for bill.com api
Cancel accounts payable payment for bill.com api
Cancel invite for bill.com api
Charge customer for bill.com api
Cle accounts receivable approvers for bill.com api
Connect large biller as vendor for bill.com api
Deny for bill.com api
Disconnect customer from network for bill.com api
Disconnect vendor from network for bill.com api
Get accounts payable summary for bill.com api
get_api_url get object value api_url
Get accounts receivable summary for bill.com api
Get bank balance for bill.com api
Get check image data for bill.com api
Return the colection data from the result collection
get_dev_key get object value dev_key
Get disbursement data for bill.com api
Get document pages for bill.com api
Get entity metadata for bill.com api
Get large biller payment address for bill.com api
Get network status for bill.com api
Get object url for bill.com api
get_org_id get object value org_id
get_password get object value password
Get profile permissions for bill.com api
get_session_id get object value session_id
get_user_name get object value user_name
Return the value of a key in the result collections
Check for the presence of a key in the result collections
Large biller search for bill.com api
List approvers for bill.com api
List message for bill.com api
Return the list of organisation associated with your account
List payments for bill.com api
List user approvals for bill.com api
Login to bill.com api
logout from Bill.com api
Mail invoice for bill.com api
Multi factor authentication authenticate for bill.com api
Multi factor authentication challenge for bill.com api
Multi factor authentication status for bill.com api
Network search for bill.com api
Record accounts payable payment for bill.com api
Record accounts receivable payment for bill.com api
Search entity for bill.com api
Send invite for bill.com api
Send invoice for bill.com api
Send message for bill.com api
Send vendor invite for bill.com api
set_api_url set object "api_url" value
Set approvers for bill.com api
Set bank balance for bill.com api
Set customer authorization for bill.com api
set_dev_key set object "dev_key" value
set_org_id set object "org_id" value
set_password set object "password" value
set_session_id set object "session_id" value
set_user_name set object "user_name" value
Upload attachment for bill.com api
Void accounts payable payment for bill.com api
Link to this section Types
Specs
Link to this section Functions
Specs
Approve for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Cancel accounts payable payment for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Cancel invite for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Charge customer for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Cle accounts receivable approvers for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Connect large biller as vendor for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Deny for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Disconnect customer from network for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Disconnect vendor from network for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get accounts payable summary for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
get_api_url get object value api_url
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
api_url value
Specs
Get accounts receivable summary for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get bank balance for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get check image data for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Return the colection data from the result collection
Parameters:
Result collection of a api call. It can be the tuple of the api call or a map which is usually the second element of the return of any api cal
return:
- success: value
- failure: unkown behavior
Specs
get_dev_key get object value dev_key
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
dev_key value
Specs
Get disbursement data for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get document pages for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get entity metadata for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get large biller payment address for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get network status for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Get object url for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
get_org_id get object value org_id
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
org_id value
Specs
get_password get object value password
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
password value
Specs
Get profile permissions for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
get_session_id get object value session_id
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
session_id value
Specs
get_user_name get object value user_name
Parameters:
Actual connexion structure (see billcom.login!/0
)
return:
user_name value
Specs
Return the value of a key in the result collections
Parameters:
- result: collection of data from another api call.
- key: the key you are looking for
return:
- success: value
- failure: unkown behavior see
has_key?/2
Specs
Check for the presence of a key in the result collections
Parameters:
- result: collection of data from another api call
- key: the key you are looking for
return:
- success: true
- failure: false
Specs
Large biller search for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
List approvers for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
List message for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Return the list of organisation associated with your account
Parameters:
conn - see Billcom.login!/0
Return
Success
{:ok, val}
from where you can fetch organisation list (example: val |> Map.fetch!("response_data"))
Failure
{:error, val}
where date are failure reasons
Specs
List payments for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
List user approvals for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
login!() :: conn()
Login to bill.com api
Parameters:
none - the module load a configuration from config file
Configuration file:
config :billcom, :api,
%{
devKey: "T3WMJHVXXYZUSUKQE9CDPEKN",
orgId: "Y8RGTBK2PXFGBUQMSCNM",
password: "AJXR5CZJBPJD",
userName: "sarah.connor@example.com"
}
Return:
success:
{:ok, conn}
A bill.com connexiton structure
failure: raise error
Specs
logout from Bill.com api
Parameters:
conn - see Billcom.login!/0
Return:
Success:
{:ok, val}
where data are logout data
Failure:
{:error, val}
where date are failure reasons
Specs
Mail invoice for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Multi factor authentication authenticate for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Multi factor authentication challenge for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Multi factor authentication status for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Network search for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Record accounts payable payment for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Record accounts receivable payment for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Search entity for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Send invite for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Send invoice for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Send message for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Send vendor invite for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
set_api_url set object "api_url" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with api_url set to val
Specs
Set approvers for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Set bank balance for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Set customer authorization for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
set_dev_key set object "dev_key" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with dev_key set to val
Specs
set_org_id set object "org_id" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with org_id set to val
Specs
set_password set object "password" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with password set to val
Specs
set_session_id set object "session_id" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with session_id set to val
Specs
set_user_name set object "user_name" value
Parameters:
- conn: actual connexion structure
- val: value of the object
return:
new conn strucutre with user_name set to val
Specs
Upload attachment for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}
Specs
Void accounts payable payment for bill.com api
Parameters:
- conn: a connection structure (see
Billcom.login!/0
) - data: data object to send for the object
return:
success:
{:ok, val}
fail:
{:error, val}