README.markdown in visma_eaccounting-0.0.3 vs README.markdown in visma_eaccounting-0.0.4

- old
+ new

@@ -1,6 +1,6 @@ -# visma_eaccounting +# Visma eAccounting Ruby API Wrapper VismaEaccounting is an API wrapper for the Visma eAccounting [API](https://developer.vismaonline.com/). ## Important Notes @@ -34,24 +34,25 @@ ``` You can read about `timeout` and `open_timeout` in the [Net::HTTP](https://ruby-doc.org/stdlib-2.3.3/libdoc/net/http/rdoc/Net/HTTP.html) doc. Now you can make requests using the resources defined in [the Visma eAccounting's docs](https://developer.vismaonline.com/#APIReference). Resource IDs -are specified inline and a `CRUD` (`create`, `retrieve`, `update`, `upsert`, or `delete`) verb initiates the request. `upsert` lets you update a record, if it exists, or insert it otherwise where supported by Visma's API. +are specified inline and a `CRUD` (`create`, `retrieve`, `update`, or `delete`) verb initiates the request. You can specify `headers`, `params`, and `body` when calling a `CRUD` method. For example: ```ruby visma_eaccounting.customers.retrieve(headers: {"SomeHeader": "SomeHeaderValue"}, params: {"query_param": "query_param_value"}) ``` Of course, `body` is only supported on `create` and `update` calls. Those map to HTTP `POST` and `PUT` verbs respectively. -You can set `token`, `timeout`, `open_timeout`, `faraday_adapter`, `proxy`, `symbolize_keys`, `logger`, and `debug` globally: +You can set `token`, `api_environment`, `api_endpoint`, `timeout`, `open_timeout`, `faraday_adapter`, `proxy`, `symbolize_keys`, `logger`, and `debug` globally: ```ruby VismaEaccounting::Request.token = "your_token" +VismaEaccounting::Request.api_environment = :sandbox VismaEaccounting::Request.timeout = 15 VismaEaccounting::Request.open_timeout = 15 VismaEaccounting::Request.symbolize_keys = true VismaEaccounting::Request.debug = false ``` @@ -74,10 +75,10 @@ Visma's [API documentation](https://developer.vismaonline.com/#APIReference) is a list of available endpoints. ## Environments -The default environment is ```:production```. To use the sandbox environment you can set ```:sandbox``` in constructor or globally. This will set the default ```api_endpoint``` URL. +The default environment is ```:production```. To use the sandbox environment you can set ```:sandbox``` in constructor or globally using the ```api_environment``` option. This will set the default ```api_endpoint``` URL. ## Debug Logging Pass `debug: true` to enable debug logging to STDOUT. \ No newline at end of file