Module: Cordial::Client

Included in:
AutomationTemplates, Contactactivities, Contacts, Orders, Products
Defined in:
lib/cordial/client.rb

Overview

Encapsulates the configuration of each client before JIT before requests are made. This allows us to use our configuration which won’t have been available until runtime, not load time.

Instance Method Summary collapse

Instance Method Details

#clientObject



6
7
8
9
10
11
# File 'lib/cordial/client.rb', line 6

def client
  base_uri 'https://api.cordial.io/v1'
  basic_auth(Cordial.config.api_key, '')
  headers 'Content-Type' => 'application/json'
  self
end