Akd v0.2.0 FreshbooksApiClient.Interface behaviour View Source
This module defines the behavior an interface
must implement in order
to be accessible through the native callers of this package.
This module is at the heart of FreshbooksApiClient and catalyzes its extendability. This abstraction/behaviour provides a set of functions which can be included in a newly introduced Freshbooks resource and quickly integrated with the rest of the API client.
See FreshbooksApiClient.Interace.Tasks
for a simple example.
See FreshbooksApiClient.Interace.Staff
for a complex example.
Callbacks:
- create(params, caller) -> Creates the resource on Freshbooks.
- update(params, caller) -> Updates an existing resource on Freshbooks.
- get(params, caller) -> Retrieves an existing resource from Freshbooks.
- delete(params, caller) -> Deletes an existing resource from Freshbooks.
- list(params, caller) -> Retrieves a list of existing resources from Freshbooks.
- translate(caller, action, response) -> Translates a response to a Schema struct.
Link to this section Summary
Types
Types that denote an unsuccessful response
Various response types that can happen upon an interface call
Types that denote a successful response
Functions
A Simple way of accessing all of Interace’s features
Link to this section Types
Types that denote an unsuccessful response
Various response types that can happen upon an interface call
Types that denote a successful response
Link to this section Functions
A Simple way of accessing all of Interace’s features
Link to this section Callbacks
translate(atom(), atom(), term()) :: Ecto.Schema.t()