Class: Tomba::Keys

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

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Tomba::Service

Instance Method Details

#create_keyObject



29
30
31
32
33
34
35
36
37
# File 'lib/tomba/services/keys.rb', line 29

def create_key()
    path = '/keys/{id}'

    params = {}

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

#delete_key(id:) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/tomba/services/keys.rb', line 14

def delete_key(id:)
    if id.nil?
        raise Tomba::Exception.new('Missing required parameter: "id"')
    end

    path = '/keys/{id}'
        .gsub('{id}', id)

    params = {}

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

#get_keysObject



4
5
6
7
8
9
10
11
12
# File 'lib/tomba/services/keys.rb', line 4

def get_keys()
    path = '/keys/{id}'

    params = {}

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

#reset_key(id:) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/tomba/services/keys.rb', line 39

def reset_key(id:)
    if id.nil?
        raise Tomba::Exception.new('Missing required parameter: "id"')
    end

    path = '/keys/{id}'
        .gsub('{id}', id)

    params = {}

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