Module: Resend::Domains

Defined in:
lib/resend/domains.rb

Overview

domains api wrapper

Class Method Summary collapse

Class Method Details

.create(params) ⇒ Object



11
12
13
14
# File 'lib/resend/domains.rb', line 11

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

.get(domain_id = "") ⇒ Object



23
24
25
26
# File 'lib/resend/domains.rb', line 23

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

.listObject



29
30
31
32
# File 'lib/resend/domains.rb', line 29

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

.remove(domain_id = "") ⇒ Object



35
36
37
38
# File 'lib/resend/domains.rb', line 35

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

.update(params) ⇒ Object



17
18
19
20
# File 'lib/resend/domains.rb', line 17

def update(params)
  path = "domains/#{params[:id]}"
  Resend::Request.new(path, params, "patch").perform
end

.verify(domain_id = "") ⇒ Object



41
42
43
44
# File 'lib/resend/domains.rb', line 41

def verify(domain_id = "")
  path = "domains/#{domain_id}/verify"
  Resend::Request.new(path, {}, "post").perform
end