Freemle REST API client
A Ruby interface to the Freemle REST API.
Usage
To create a freemle client:
freemle = Freemle.client(
app_name: "application-name-as-chosen-on-freemle.com",
api_key: "api-key-as-provided-by-freemle.com"
)
Customers
Accessing customers (freemle.customers.search('Freemle')) returns:
[{
company_name: 'Freemle',
address: {
street: "Cruquiusweg 109 F",
postal_code: "1019 AG",
city: "Amsterdam",
country_code: "NL"
}
},
company_name: 'Elmeerf',
address: {
street: "Freemleweg",
...
}
}]
Adding customers:
freemle.customers.create(
company_name: "Zilverline B.V.",
attn: "Vibiemme", # Optional
extra_information: "The best cofee maker!", # Optional
address: {
street: "Cruquiusweg 109 F",
postal_code: "1019 AG",
city: "Amsterdam",
country_code: "NL"
}
)
Invoices
Adding invoices:
freemle.invoices.create(
customer_id: "123456789", # Optional
delivery_period: "31-12-1234", # Optional
reference: "my-reference", # Optional
line_items: [
{vat: 21, amount: 1359.50, quantity: 1, description: "Scrum Training"}
]
)
Documentation
Check https://www.freemle.com/api-documentatie for more info.
Development
Running tests
bundle install and then rake spec or rspec spec.
Building the gem
rake build and then rake install to test it locally (irb followed
by require 'freemle/client' and do your stuff).
Releasing the gem
Make a fix, commit and push. Make sure the build is green. Then bump the
version (edit lib/freemle/client/version.rb). Now rake release and follow
the instructions (you need a rubygems.org account and permissions ;-)).

