Class: Certynix::Resources::Verify
- Inherits:
-
Object
- Object
- Certynix::Resources::Verify
- Defined in:
- lib/certynix/resources/verify.rb
Instance Method Summary collapse
-
#by_asset_id(id) ⇒ Object
Verificação pública por asset ID — sem autenticação.
-
#by_hash(hash) ⇒ Object
Verificação pública por hash SHA-256 — sem autenticação.
-
#by_hash_post(hash) ⇒ Object
Verificação pública por hash via POST — sem autenticação.
-
#initialize(http) ⇒ Verify
constructor
A new instance of Verify.
Constructor Details
#initialize(http) ⇒ Verify
Returns a new instance of Verify.
6 7 8 |
# File 'lib/certynix/resources/verify.rb', line 6 def initialize(http) @http = http end |
Instance Method Details
#by_asset_id(id) ⇒ Object
Verificação pública por asset ID — sem autenticação.
16 17 18 |
# File 'lib/certynix/resources/verify.rb', line 16 def by_asset_id(id) @http.get_public("/v1/public/verify/#{URI.encode_www_form_component(id)}") end |
#by_hash(hash) ⇒ Object
Verificação pública por hash SHA-256 — sem autenticação.
11 12 13 |
# File 'lib/certynix/resources/verify.rb', line 11 def by_hash(hash) @http.get_public("/v1/public/verify/#{URI.encode_www_form_component(hash)}") end |
#by_hash_post(hash) ⇒ Object
Verificação pública por hash via POST — sem autenticação.
21 22 23 |
# File 'lib/certynix/resources/verify.rb', line 21 def by_hash_post(hash) @http.post_public('/v1/verify', { hash_sha256: hash }) end |