Class: Ledger::Sdk::Client
- Inherits:
-
Object
- Object
- Ledger::Sdk::Client
- Extended by:
- Forwardable
- Includes:
- Singleton
- Defined in:
- lib/ledger/sdk/client.rb
Overview
Singleton HTTP entry point for the Ledger API.
Delegates every request to Fluence::Gateway::Client with
service: Ledger::Sdk.config.service (default :ledger) so paths
are prefixed with /backend/ledger/ and routed through the Fluence
API gateway, with OAuth2 authentication handled by the gateway
client (see fluence-gateway-client).
HTTP methods (+get+, post, put, patch, delete) are accessible
on both the instance and the class.
Instance Method Summary collapse
-
#delete(path) ⇒ Hash
Performs a DELETE request on the API.
-
#get(path) ⇒ Hash, Array
Performs a GET request on the API.
-
#patch(path, body:) ⇒ Hash
Performs a PATCH request on the API.
-
#post(path, body:) ⇒ Hash
Performs a POST request on the API.
-
#put(path, body:) ⇒ Hash
Performs a PUT request on the API.
Instance Method Details
#delete(path) ⇒ Hash
Performs a DELETE request on the API.
#get(path) ⇒ Hash, Array
Performs a GET request on the API.
#patch(path, body:) ⇒ Hash
Performs a PATCH request on the API.
#post(path, body:) ⇒ Hash
Performs a POST request on the API.
#put(path, body:) ⇒ Hash
Performs a PUT request on the API.