LocoBill


An interface for interacting with Bill.com’s API.

Requires Nokogiri.

Create an initializer (or what have you) to set the following:

LocoBill::Configuration.environment = :production # or :sandbox
LocoBill::Configuration.application_key = "aaa"
LocoBill::Configuration.org_id = "bbb"
LocoBill::Configuration.username = "xxx"
LocoBill::Configuration.password = "yyy"

Use like so:

vendor = LocoBill.create_vendor :vendor => {:name => 'Test'} # will auto-login for you and store the session ID, if you're not already logged in
vendor.result.inspect => #<LocoBill::RequestResult transactionId="Transaction1", status="OK", id="xxy">

LocoBill.create_bill :bill => {
  :billLineItems => [
    {:billLineItem => {:amount => 11}},
    {:billLineItem => {:amount => 32}}
  ]
}