Class: Tomba::Domain

Inherits:
Service show all
Defined in:
lib/tomba/services/domain.rb

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Tomba::Service

Instance Method Details

#domain_search(domain:, page: nil, limit: nil, department: nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/tomba/services/domain.rb', line 4

def domain_search(domain:, page: nil, limit: nil, department: nil)
    if domain.nil?
        raise Tomba::Exception.new('Missing required parameter: "domain"')
    end

    path = '/domain-search/'

    params = {}

    if !domain.nil?
        params[:domain] = domain
    end

    if !page.nil?
        params[:page] = page
    end

    if !limit.nil?
        params[:limit] = limit
    end

    if !department.nil?
        params[:department] = department
    end

    return @client.call('get', path, {
        'content-type' => 'application/json',
    }, params);
end