Class: License
Instance Method Summary
collapse
-
#archive(license_id:) ⇒ Object
-
#create(options:) ⇒ Object
-
#create_billing_event(license_id:, options:) ⇒ Object
-
#download_license(license_id:) ⇒ Object
Warning: this returns an RLI in Base64.
-
#get(license_id:) ⇒ Object
-
#get_license_fields(license_id:) ⇒ Object
-
#get_license_instance(license_id:, instance_id:) ⇒ Object
-
#list_tracked_license_instances(license_id:) ⇒ Object
-
#list_untracked_license_instances(license_id:) ⇒ Object
-
#revoke_license(license_id:) ⇒ Object
-
#set_license_field(license_id:, options:) ⇒ Object
-
#unarchive_license(license_id:) ⇒ Object
-
#update(license_id:, options:) ⇒ Object
-
#update_airgap(license_id:) ⇒ Object
-
#update_billing(license_id:, options:) ⇒ Object
-
#update_billing_event(license_id:, billing_event_id:, options:) ⇒ Object
-
#update_channel(license_id:, options:) ⇒ Object
-
#update_expiration(license_id:, options:) ⇒ Object
-
#update_license_fields(license_id:, options:) ⇒ Object
Methods inherited from ApiModule
#initialize
Constructor Details
This class inherits a constructor from ApiModule
Instance Method Details
#archive(license_id:) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/api/license/license.rb', line 23
def archive(license_id:)
method = "DELETE"
endpoint = "license/" << license_id
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri)
end
|
#create(options:) ⇒ Object
2
3
4
5
6
7
|
# File 'lib/api/license/license.rb', line 2
def create(options:)
method = "POST"
endpoint = "license"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#create_billing_event(license_id:, options:) ⇒ Object
44
45
46
47
48
49
|
# File 'lib/api/license/license.rb', line 44
def create_billing_event(license_id:, options:)
method = "POST"
endpoint = "license/" << license_id << "/billling_event"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#download_license(license_id:) ⇒ Object
Warning: this returns an RLI in Base64
130
131
132
133
134
135
|
# File 'lib/api/license/license.rb', line 130
def download_license(license_id:)
method = "GET"
endpoint = "licensekey/" << license_id
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#get(license_id:) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/api/license/license.rb', line 9
def get(license_id:)
method = "GET"
endpoint = "license/" << license_id
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri)
end
|
#get_license_fields(license_id:) ⇒ Object
80
81
82
83
84
85
|
# File 'lib/api/license/license.rb', line 80
def get_license_fields(license_id:)
method = "GET"
endpoint = "license/" << license_id << "/fields"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#get_license_instance(license_id:, instance_id:) ⇒ Object
94
95
96
97
98
99
|
# File 'lib/api/license/license.rb', line 94
def get_license_instance(license_id:, instance_id:)
method = "GET"
endpoint = "license/" << license_id << "/instance/" << instance_id
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#list_tracked_license_instances(license_id:) ⇒ Object
101
102
103
104
105
106
|
# File 'lib/api/license/license.rb', line 101
def list_tracked_license_instances(license_id:)
method = "GET"
endpoint = "license/" << license_id << "/instances"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#list_untracked_license_instances(license_id:) ⇒ Object
108
109
110
111
112
113
|
# File 'lib/api/license/license.rb', line 108
def list_untracked_license_instances(license_id:)
method = "GET"
endpoint = "license/" << license_id << "/instances/untracked"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#revoke_license(license_id:) ⇒ Object
115
116
117
118
119
120
|
# File 'lib/api/license/license.rb', line 115
def revoke_license(license_id:)
method = "PUT"
endpoint = "license/" << license_id << "/revoke"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#set_license_field(license_id:, options:) ⇒ Object
73
74
75
76
77
78
|
# File 'lib/api/license/license.rb', line 73
def set_license_field(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/field"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri, options)
end
|
#unarchive_license(license_id:) ⇒ Object
122
123
124
125
126
127
|
# File 'lib/api/license/license.rb', line 122
def unarchive_license(license_id:)
method = "PUT"
endpoint = "license/" << license_id << "/unarchive"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri)
end
|
#update(license_id:, options:) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/api/license/license.rb', line 16
def update(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#update_airgap(license_id:) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/api/license/license.rb', line 30
def update_airgap(license_id:)
method = "POST"
endpoint = "license/" << license_id << "/airgap/password"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri)
end
|
#update_billing(license_id:, options:) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/api/license/license.rb', line 37
def update_billing(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/billing"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri)
end
|
#update_billing_event(license_id:, billing_event_id:, options:) ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/api/license/license.rb', line 51
def update_billing_event(license_id:, billing_event_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/billing_event/" <<
billing_event_id
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#update_channel(license_id:, options:) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/api/license/license.rb', line 59
def update_channel(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/channel"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#update_expiration(license_id:, options:) ⇒ Object
66
67
68
69
70
71
|
# File 'lib/api/license/license.rb', line 66
def update_expiration(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/expire"
uri = ApiUri.build_uri(endpoint)
return @client.request_json(method, uri, options)
end
|
#update_license_fields(license_id:, options:) ⇒ Object
87
88
89
90
91
92
|
# File 'lib/api/license/license.rb', line 87
def update_license_fields(license_id:, options:)
method = "PUT"
endpoint = "license/" << license_id << "/field"
uri = ApiUri.build_uri(endpoint)
return self.client.request(method, uri, options)
end
|