Akd v0.1.1 FreshbooksApiClient View Source
A Wrapper around Freshbooks API
This package is an extendable wrapper, so it will only let you see resources that correspond to permissions associated with the API token
This package can be configured with default token and subdomain.
This package can also be configured with a default caller. It should be used
mainly for testing purposes.
Example Configuration (dev.exs)(Optional):
config :freshbooks_api_client, FreshbooksApiClient,
caller: FreshbooksApiClient.Caller.HttpXml,
token: "YOUR_FRESHBOOKS_API_TOKEN",
subdomain: "sample"
Example Configuration (test.exs)(Optional):
config :freshbooks_api_client, FreshbooksApiClient,
caller: FreshbooksApiClient.InMemory,
token: "thuum",
subdomain: "skyrim"
Link to this section Summary
Functions
:caller can be set as a runtime config
in the config.exs file
Gets configuration assocaited with the freshbooks_api_client app
Gets configuration set for a key, assocaited with the freshbooks_api_client app
:subdomain can be set as a runtime config
in the config.exs file
:token can be set as a runtime config
in the config.exs file
Link to this section Functions
:caller can be set as a runtime config
in the config.exs file
Examples
when no caller config is set, if returns FreshbooksApiClient.Caller
iex> FreshbooksApiClient.caller
FreshbooksApiClient.InMemory
Gets configuration assocaited with the freshbooks_api_client app.
Examples
when no config is set, if returns []
iex> FreshbooksApiClient.config
[caller: FreshbooksApiClient.InMemory, token: "thuum", subdomain: "skyrim"]
Gets configuration set for a key, assocaited with the freshbooks_api_client app.
Examples
when no config is set for key, if returns default
iex> FreshbooksApiClient.config(:random, "default")
"default"
:subdomain can be set as a runtime config
in the config.exs file
Examples
when no subdomain config is set, if returns nil
iex> FreshbooksApiClient.subdomain
"skyrim"