Class: Latitude::API::Resources::APIKey
Constant Summary
Constants inherited
from APIResource
APIResource::READ_ONLY_ATTRIBUTES
Instance Attribute Summary collapse
Attributes inherited from APIResource
#id, #meta, #path_params, #raw_data, #type
Class Method Summary
collapse
Instance Method Summary
collapse
all, list
create
update
delete
Methods inherited from APIResource
#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute
#attribute, #attribute_specs
#attribute_spec, #read_attribute, #wrap_attribute
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Latitude::API::APIResource
Instance Attribute Details
#allowed_ips ⇒ String
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#api_version ⇒ String
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#created_at ⇒ Time
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#last_used_at ⇒ Time
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#name ⇒ String
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#read_only ⇒ Boolean
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#token ⇒ String
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#token_last_slice ⇒ String
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
#updated_at ⇒ Time
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/latitude/api/resources/api_key.rb', line 26
class APIKey < APIResource
attribute :name, :string
attribute :token, :string
attribute :token_last_slice, :string
attribute :api_version, :string
attribute :read_only, :boolean
attribute :allowed_ips, :string
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
attribute :last_used_at, :time
attribute :user, Objects::User
resource_type "api_keys"
resource_path "/auth/api_keys"
id_prefix "tok_"
extend Operations::List
extend Operations::Create
extend Operations::Update
extend Operations::Delete
class << self
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
end
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
end
|
Class Method Details
.rotate(id, params = {}, opts = {}) ⇒ Object
48
49
50
51
52
|
# File 'lib/latitude/api/resources/api_key.rb', line 48
def rotate(id, params = {}, opts = {})
body = JSONAPI.encode(type: resource_type, id: id, attributes: params)
parsed = execute_request(method: :put, path: instance_url(id), body: body, opts: opts)
construct_from(parsed, opts: opts)
end
|
Instance Method Details
#rotate(params = {}, opts = {}) ⇒ Object
55
56
57
|
# File 'lib/latitude/api/resources/api_key.rb', line 55
def rotate(params = {}, opts = {})
self.class.rotate(id, params, opts)
end
|