Class: SendLayer::SendLayer

Inherits:
Object
  • Object
show all
Defined in:
lib/sendlayer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, options = {}) ⇒ SendLayer

Initialize the SDK.

Parameters:

  • api_key (String)

    Your SendLayer API key.

  • options (Hash) (defaults to: {})

    Optional settings forwarded to the underlying client: :timeout (seconds, default 30), :attachment_url_timeout (milliseconds), :headers (extra request headers) and :base_url.



20
21
22
23
24
25
# File 'lib/sendlayer.rb', line 20

def initialize(api_key, options = {})
  @client = Client.new(api_key, options)
  @emails = Emails.new(@client)
  @webhooks = Webhooks.new(@client)
  @events = Events.new(@client)
end

Instance Attribute Details

#emailsObject (readonly)

Returns the value of attribute emails.



12
13
14
# File 'lib/sendlayer.rb', line 12

def emails
  @emails
end

#eventsObject (readonly)

Returns the value of attribute events.



12
13
14
# File 'lib/sendlayer.rb', line 12

def events
  @events
end

#webhooksObject (readonly)

Returns the value of attribute webhooks.



12
13
14
# File 'lib/sendlayer.rb', line 12

def webhooks
  @webhooks
end