Class: Latitude::API::Resources::VPNSession
Defined Under Namespace
Classes: Region, Site
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
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
#created_at ⇒ Time
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#expires_at ⇒ Time
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#host ⇒ String
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#password ⇒ String
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#port ⇒ String
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#updated_at ⇒ Time
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
#user_name ⇒ String
22
23
24
25
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 22
class VPNSession < APIResource
class Site < APIObject
attribute :id, :string, read_only: true
attribute :name, :string, read_only: true
attribute :slug, :string, read_only: true
attribute :facility, :string, read_only: true
end
class Region < APIObject
attribute :city, :string, read_only: true
attribute :country, :string, read_only: true
attribute :site, Site, read_only: true
end
attribute :user_name, :string
attribute :password, :string
attribute :port, :string
attribute :host, :string
attribute :region, Region
attribute :expires_at, :time
attribute :created_at, :time, read_only: true
attribute :updated_at, :time, read_only: true
resource_type "vpn_sessions"
resource_path "/vpn_sessions"
id_prefix "vpn_"
extend Operations::List
extend Operations::Create
extend Operations::Delete
class << self
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
end
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
end
|
Class Method Details
.refresh_password(id, opts = {}) ⇒ Object
68
69
70
71
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 68
def refresh_password(id, opts = {})
parsed = execute_request(method: :patch, path: "#{instance_url(id)}/refresh_password", opts: opts)
construct_from(parsed, opts: opts)
end
|
Instance Method Details
#refresh_password(opts = {}) ⇒ Object
74
75
76
|
# File 'lib/latitude/api/resources/vpn_session.rb', line 74
def refresh_password(opts = {})
self.class.refresh_password(id, opts)
end
|