https://github.com/espen/agaon
Ruby API wrapper for Fiken
https://github.com/espen/agaon
api-client api-wrapper gem ruby
Last synced: 5 months ago
JSON representation
Ruby API wrapper for Fiken
- Host: GitHub
- URL: https://github.com/espen/agaon
- Owner: espen
- License: mit
- Created: 2017-03-28T21:44:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-19T23:15:20.000Z (almost 9 years ago)
- Last Synced: 2025-11-29T16:24:30.849Z (7 months ago)
- Topics: api-client, api-wrapper, gem, ruby
- Language: Ruby
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Agaon
Ruby API wrapper for Fiken. See https://fiken.no/api/doc/ for information about the API.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'agaon'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install agaon
## Usage
### Authentication
```ruby
fiken = Agaon::Client.new( username, password )
```
This will allow you to only list companies connected to your user account.
To access data in each company you need to specify a company for the Agaon client.
```ruby
fiken = Agaon::Client.new( username, password, company_href )
```
### Endpoints
Who Am I?:
```ruby
fiken.who_am_i
```
Return the user based on credentials on the Agaon Client.
Current company:
```ruby
fiken.current_company
```
Returns company based on set company_href on the Agaon Client.
#### Companies
List:
```ruby
fiken.companies
```
Get:
```ruby
fiken.get_company(company_href)
```
#### Accounts, Bank Accounts, Contacts, Products, Invoices, Sales
Using examples for the contacts endpoint.
List:
```ruby
fiken.contacts
```
Get:
```ruby
fiken.get_contact(contact_href)
```
Create:
```ruby
fiken.contact(contact_attributes)
```
Update:
```ruby
fiken.contact(contact_href,contact_attributes)
```
#### Create Invoice, Document Sending Service, Create General Journal Entry Service, Search
Using example for the create invoice endpoint.
Action:
```ruby
fiken.create_invoice(invoice_attributes)
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/espen/agaon.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).