README.markdown in visma_eaccounting-0.0.2 vs README.markdown in visma_eaccounting-0.0.3
- old
+ new
@@ -8,14 +8,16 @@
## Installation
$ gem install visma_eaccounting
-## Requirements
+## Authentication
-A Visma eAccounting account and oAuth client id.
+The Visma eAccounting API authenticates using a token which you can retrieve when authorizating using OAuth with your Visma eAccounting account.
+To retrieve an access token you can use [omniauth-visma](https://github.com/espen/omniauth-visma). Do note that this token expires in one hour so you need to fetch a new access token using the refresh token when required.
+
## Usage
First, create a *one-time use instance* of `VismaEaccounting::Request`:
```ruby
@@ -112,11 +114,11 @@
```ruby
visma_eaccounting.customers.retrieve(params: {"pagesize": "100"})
```
-And to retrieve the next 50 members:
+And to retrieve the next 50 customers:
```ruby
visma_eaccounting.customers.retrieve(params: {"pagesize": "100", "page": "2"})
```
@@ -153,10 +155,10 @@
`VismaEaccounting::VismaEaccountingError` has the following attributes: `title`, `detail`, `body`, `raw_body`, `status_code`. Some or all of these may not be
available depending on the nature of the error. For example:
```ruby
begin
- visma_eaccounting.customers(customer_id).members.create(body: body)
+ visma_eaccounting.customers.create(body: body)
rescue VismaEaccounting::VismaEaccountingError => e
puts "Houston, we have a problem: #{e.message} - #{e.raw_body}"
end
```
\ No newline at end of file