Module: Resend::Domains
- Defined in:
- lib/resend/domains.rb
Overview
domains api wrapper
Class Method Summary collapse
- .create(params) ⇒ Object
- .get(domain_id = "") ⇒ Object
- .list ⇒ Object
- .remove(domain_id = "") ⇒ Object
- .update(params) ⇒ Object
- .verify(domain_id = "") ⇒ Object
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 |
.list ⇒ Object
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 |