Class: Reloop::Services::Domain
- Inherits:
-
Object
- Object
- Reloop::Services::Domain
- Defined in:
- lib/reloop/services/domain.rb
Instance Method Summary collapse
- #create(params) ⇒ Object
- #delete(domain_id) ⇒ Object
- #forward_dns(domain_id, params) ⇒ Object
- #get(domain_id) ⇒ Object
- #get_nameservers(domain_id) ⇒ Object
-
#initialize(client) ⇒ Domain
constructor
A new instance of Domain.
- #list(params = {}) ⇒ Object
- #update(domain_id, params) ⇒ Object
- #verify(domain_id) ⇒ Object
Constructor Details
#initialize(client) ⇒ Domain
Returns a new instance of Domain.
6 7 8 |
# File 'lib/reloop/services/domain.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#create(params) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/reloop/services/domain.rb', line 10 def create(params) @client.fetch( :post, "/api/domain/v1/create", Support::Parameters.for_snake_request(params), ) end |
#delete(domain_id) ⇒ Object
43 44 45 |
# File 'lib/reloop/services/domain.rb', line 43 def delete(domain_id) @client.fetch(:delete, "/api/domain/v1/#{domain_id}") end |
#forward_dns(domain_id, params) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/reloop/services/domain.rb', line 51 def forward_dns(domain_id, params) @client.fetch( :post, "/api/domain/v1/verify/#{domain_id}/forward-dns", Support::Parameters.for_snake_request(params), ) end |
#get(domain_id) ⇒ Object
27 28 29 |
# File 'lib/reloop/services/domain.rb', line 27 def get(domain_id) @client.fetch(:get, "/api/domain/v1/#{domain_id}") end |
#get_nameservers(domain_id) ⇒ Object
31 32 33 |
# File 'lib/reloop/services/domain.rb', line 31 def get_nameservers(domain_id) @client.fetch(:get, "/api/domain/v1/nameservers/#{domain_id}") end |
#list(params = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/reloop/services/domain.rb', line 18 def list(params = {}) @client.fetch( :get, "/api/domain/v1/list", nil, Support::Parameters.for_query(params), ) end |
#update(domain_id, params) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/reloop/services/domain.rb', line 35 def update(domain_id, params) @client.fetch( :patch, "/api/domain/v1/#{domain_id}", Support::Parameters.for_snake_request(params), ) end |
#verify(domain_id) ⇒ Object
47 48 49 |
# File 'lib/reloop/services/domain.rb', line 47 def verify(domain_id) @client.fetch(:post, "/api/domain/v1/verify/#{domain_id}") end |