Class: Preverus::Client
- Inherits:
-
Object
- Object
- Preverus::Client
- Defined in:
- lib/preverus/client.rb
Instance Attribute Summary collapse
-
#decisions ⇒ Object
readonly
Returns the value of attribute decisions.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#visitors ⇒ Object
readonly
Returns the value of attribute visitors.
-
#webhooks ⇒ Object
readonly
Returns the value of attribute webhooks.
Instance Method Summary collapse
-
#initialize(server_key:, endpoint: "https://api.preverus.com", timeout: 1.5, retries: 2, retry_delay: 0.15, max_retry_delay: 1.0) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(server_key:, endpoint: "https://api.preverus.com", timeout: 1.5, retries: 2, retry_delay: 0.15, max_retry_delay: 1.0) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/preverus/client.rb', line 8 def initialize(server_key:, endpoint: "https://api.preverus.com", timeout: 1.5, retries: 2, retry_delay: 0.15, max_retry_delay: 1.0) http = HttpClient.new( server_key: server_key, endpoint: endpoint, timeout: timeout, retries: retries, retry_delay: retry_delay, max_retry_delay: max_retry_delay ) @decisions = Decisions.new(http) @events = Events.new(http) @visitors = Visitors.new(http) @metadata = Metadata.new(http) @webhooks = Webhooks.new end |
Instance Attribute Details
#decisions ⇒ Object (readonly)
Returns the value of attribute decisions.
6 7 8 |
# File 'lib/preverus/client.rb', line 6 def decisions @decisions end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
6 7 8 |
# File 'lib/preverus/client.rb', line 6 def events @events end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/preverus/client.rb', line 6 def @metadata end |
#visitors ⇒ Object (readonly)
Returns the value of attribute visitors.
6 7 8 |
# File 'lib/preverus/client.rb', line 6 def visitors @visitors end |
#webhooks ⇒ Object (readonly)
Returns the value of attribute webhooks.
6 7 8 |
# File 'lib/preverus/client.rb', line 6 def webhooks @webhooks end |