Class: InfaktApiClient::Client
- Inherits:
-
Object
- Object
- InfaktApiClient::Client
- Defined in:
- lib/infakt_api_client/client.rb
Overview
Client class for interacting with the inFakt API Manages HTTP communication and authentication with the API endpoints
Constant Summary collapse
- HTTP_OK =
HTTP status constants for better readability
200- HTTP_CREATED =
201- HTTP_ACCEPTED =
202- HTTP_NO_CONTENT =
204- HTTP_BAD_REQUEST =
400- HTTP_UNAUTHORIZED =
401- HTTP_FORBIDDEN =
403- HTTP_NOT_FOUND =
404- HTTP_UNPROCESSABLE_ENTITY =
422- HTTP_TOO_MANY_REQUESTS =
429- HTTP_INTERNAL_SERVER_ERROR =
500- HTTP_SERVICE_UNAVAILABLE =
503
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
-
#user_details ⇒ User
Get user account details.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
21 22 23 24 25 |
# File 'lib/infakt_api_client/client.rb', line 21 def initialize @connection = Faraday.new(url: InfaktApiClient.configuration.api_endpoint) do |faraday| configure_connection(faraday) end end |