Class: Seam::Clients::AccessCodesUnmanaged

Inherits:
BaseClient
  • Object
show all
Defined in:
lib/seam/clients/access_codes_unmanaged.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#client

Instance Method Summary collapse

Methods inherited from BaseClient

#initialize, #request_seam, #request_seam_object

Constructor Details

This class inherits a constructor from Seam::Clients::BaseClient

Instance Method Details

#convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil, sync: nil) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/seam/clients/access_codes_unmanaged.rb', line 6

def convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil, sync: nil)
  request_seam(
    :post,
    "/access_codes/unmanaged/convert_to_managed",
    body: {access_code_id: access_code_id, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed, sync: sync}.compact
  )

  nil
end

#delete(access_code_id:, sync: nil) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/seam/clients/access_codes_unmanaged.rb', line 16

def delete(access_code_id:, sync: nil)
  request_seam(
    :post,
    "/access_codes/unmanaged/delete",
    body: {access_code_id: access_code_id, sync: sync}.compact
  )

  nil
end

#get(access_code_id: nil, code: nil, device_id: nil) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/seam/clients/access_codes_unmanaged.rb', line 26

def get(access_code_id: nil, code: nil, device_id: nil)
  request_seam_object(
    :post,
    "/access_codes/unmanaged/get",
    Seam::UnmanagedAccessCode,
    "access_code",
    body: {access_code_id: access_code_id, code: code, device_id: device_id}.compact
  )
end

#list(device_id:, user_identifier_key: nil) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/seam/clients/access_codes_unmanaged.rb', line 36

def list(device_id:, user_identifier_key: nil)
  request_seam_object(
    :post,
    "/access_codes/unmanaged/list",
    Seam::UnmanagedAccessCode,
    "access_codes",
    body: {device_id: device_id, user_identifier_key: user_identifier_key}.compact
  )
end

#update(access_code_id:, is_managed:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil) ⇒ Object



46
47
48
49
50
51
52
53
54
# File 'lib/seam/clients/access_codes_unmanaged.rb', line 46

def update(access_code_id:, is_managed:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil)
  request_seam(
    :post,
    "/access_codes/unmanaged/update",
    body: {access_code_id: access_code_id, is_managed: is_managed, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed}.compact
  )

  nil
end