https://github.com/ed-itsolutions/kashflowapi
Kashflow API wrapper for Ruby
https://github.com/ed-itsolutions/kashflowapi
Last synced: 11 months ago
JSON representation
Kashflow API wrapper for Ruby
- Host: GitHub
- URL: https://github.com/ed-itsolutions/kashflowapi
- Owner: Ed-ITSolutions
- Created: 2011-10-18T14:31:59.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2013-09-23T14:40:04.000Z (over 12 years ago)
- Last Synced: 2024-03-25T23:25:03.356Z (about 2 years ago)
- Language: Ruby
- Homepage: http://ed-itsolutions.github.com/KashflowAPI/
- Size: 691 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# KashflowApi
[](https://travis-ci.org/Ed-ITSolutions/KashflowAPI) [](https://codeclimate.com/github/Ed-ITSolutions/KashflowAPI) [](https://coveralls.io/r/Ed-ITSolutions/KashflowAPI)
KashflowApi provides an Active Record like interface to the Kashflow API.
# Install
You can install KashflowApi by adding it yo your `Gemfile` like this:
```ruby
gem 'kashflow_api'
```
and running `bundle install`
# Usage
At the beginning of your program, or in an rails initializer call the configure block like so:
``` ruby
KashflowApi.configure do |c|
c.username = "Username"
c.password = "Password"
c.loggers = false
end
```
I recommend settings loggers to false so that you don't get all the soap exchanges echoed out.
You can now call methods on the models e.g.
``` ruby
KashflowApi::Customer.all
KashflowApi::Customer.find("Cust01")
KashflowApi::Customer.find_by_email("customer@domain.tld")
```
## Saving
All the Kashflow objects in the gem have a `.save` method which will either insert a new record or update the current one.
# More Info
For more info head over to the [wiki](https://github.com/Ed-ITSolutions/KashflowAPI/wiki)