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(params = {}) ⇒ Object
- .remove(domain_id = "") ⇒ Object
- .update(params) ⇒ Object
- .verify(domain_id = "") ⇒ Object
Class Method Details
.create(params) ⇒ Object
8 9 10 11 |
# File 'lib/resend/domains.rb', line 8 def create(params) path = "domains" Resend::Request.new(path, params, "post").perform end |
.get(domain_id = "") ⇒ Object
20 21 22 23 |
# File 'lib/resend/domains.rb', line 20 def get(domain_id = "") path = "domains/#{domain_id}" Resend::Request.new(path, {}, "get").perform end |
.list(params = {}) ⇒ Object
26 27 28 29 |
# File 'lib/resend/domains.rb', line 26 def list(params = {}) path = Resend::PaginationHelper.build_paginated_path("domains", params) Resend::Request.new(path, {}, "get").perform end |
.remove(domain_id = "") ⇒ Object
32 33 34 35 |
# File 'lib/resend/domains.rb', line 32 def remove(domain_id = "") path = "domains/#{domain_id}" Resend::Request.new(path, {}, "delete").perform end |
.update(params) ⇒ Object
14 15 16 17 |
# File 'lib/resend/domains.rb', line 14 def update(params) path = "domains/#{params[:id]}" Resend::Request.new(path, params, "patch").perform end |