Class: Courrier::Subscriber::Loops

Inherits:
Base
  • Object
show all
Defined in:
lib/courrier/subscriber/loops.rb

Constant Summary collapse

ENDPOINT_URL =
"https://app.loops.so/api/v1/contacts"

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Courrier::Subscriber::Base

Instance Method Details

#create(email) ⇒ Object



10
11
12
13
14
# File 'lib/courrier/subscriber/loops.rb', line 10

def create(email)
  request(:post, "#{ENDPOINT_URL}/create", {
    "email" => email
  })
end

#destroy(email) ⇒ Object



16
17
18
19
20
# File 'lib/courrier/subscriber/loops.rb', line 16

def destroy(email)
  request(:post, "#{ENDPOINT_URL}/delete", {
    "email" => email
  })
end