Class: Sendeez::Domains
- Inherits:
-
Object
- Object
- Sendeez::Domains
- Defined in:
- lib/sendeez/domains.rb
Instance Method Summary collapse
- #create(name, timeout: nil) ⇒ Object
-
#initialize(client) ⇒ Domains
constructor
A new instance of Domains.
- #list(timeout: nil) ⇒ Object
- #remove(id, timeout: nil) ⇒ Object
- #retrieve(id, timeout: nil) ⇒ Object
- #verify(id, timeout: nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ Domains
Returns a new instance of Domains.
5 6 7 |
# File 'lib/sendeez/domains.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#create(name, timeout: nil) ⇒ Object
9 10 11 |
# File 'lib/sendeez/domains.rb', line 9 def create(name, timeout: nil) @client.request("POST", "/v1/domains", body: { "name" => name }, timeout: timeout) end |
#list(timeout: nil) ⇒ Object
13 14 15 |
# File 'lib/sendeez/domains.rb', line 13 def list(timeout: nil) @client.request("GET", "/v1/domains", timeout: timeout) end |
#remove(id, timeout: nil) ⇒ Object
25 26 27 |
# File 'lib/sendeez/domains.rb', line 25 def remove(id, timeout: nil) @client.request("DELETE", "/v1/domains/#{URI.encode_www_form_component(id)}", timeout: timeout) end |
#retrieve(id, timeout: nil) ⇒ Object
17 18 19 |
# File 'lib/sendeez/domains.rb', line 17 def retrieve(id, timeout: nil) @client.request("GET", "/v1/domains/#{URI.encode_www_form_component(id)}", timeout: timeout) end |
#verify(id, timeout: nil) ⇒ Object
21 22 23 |
# File 'lib/sendeez/domains.rb', line 21 def verify(id, timeout: nil) @client.request("POST", "/v1/domains/#{URI.encode_www_form_component(id)}/verify", timeout: timeout) end |