Module: Resend::Audiences

Defined in:
lib/resend/audiences.rb

Overview

Audiences api wrapper

Class Method Summary collapse

Class Method Details

.create(params) ⇒ Object



8
9
10
11
# File 'lib/resend/audiences.rb', line 8

def create(params)
  path = "audiences"
  Resend::Request.new(path, params, "post").perform
end

.get(audience_id = "") ⇒ Object



14
15
16
17
# File 'lib/resend/audiences.rb', line 14

def get(audience_id = "")
  path = "audiences/#{audience_id}"
  Resend::Request.new(path, {}, "get").perform
end

.listObject



20
21
22
23
# File 'lib/resend/audiences.rb', line 20

def list
  path = "audiences"
  Resend::Request.new(path, {}, "get").perform
end

.remove(audience_id = "") ⇒ Object



26
27
28
29
# File 'lib/resend/audiences.rb', line 26

def remove(audience_id = "")
  path = "audiences/#{audience_id}"
  Resend::Request.new(path, {}, "delete").perform
end