Class: Virgil::SDK::Client::SearchCriteria
- Inherits:
-
Struct
- Object
- Struct
- Virgil::SDK::Client::SearchCriteria
- Defined in:
- lib/virgil/sdk/client/search_criteria.rb
Overview
Class holds criteria for searching Cards.
Instance Attribute Summary collapse
-
#identities ⇒ Object
Returns the value of attribute identities.
-
#identity_type ⇒ Object
Returns the value of attribute identity_type.
-
#scope ⇒ Object
Returns the value of attribute scope.
Class Method Summary collapse
-
.by_app_bundle(bundle) ⇒ Object
Create new search criteria for searching cards by application bundle.
-
.by_identities(identities) ⇒ Object
Create new search criteria for searching cards by identities.
-
.by_identity(identity) ⇒ Object
Create new search criteria for searching cards by identity.
Instance Method Summary collapse
-
#initialize(identities, identity_type = nil, scope = nil) ⇒ SearchCriteria
constructor
A new instance of SearchCriteria.
Constructor Details
#initialize(identities, identity_type = nil, scope = nil) ⇒ SearchCriteria
Returns a new instance of SearchCriteria.
40 41 42 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 40 def initialize(identities, identity_type=nil, scope=nil) super end |
Instance Attribute Details
#identities ⇒ Object
Returns the value of attribute identities
39 40 41 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 39 def identities @identities end |
#identity_type ⇒ Object
Returns the value of attribute identity_type
39 40 41 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 39 def identity_type @identity_type end |
#scope ⇒ Object
Returns the value of attribute scope
39 40 41 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 39 def scope @scope end |
Class Method Details
.by_app_bundle(bundle) ⇒ Object
Create new search criteria for searching cards by application bundle.
Args:
bundle: Application bundle.
Returns:
Search criteria for searching by bundle.
73 74 75 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 73 def self.by_app_bundle(bundle) return new([bundle], 'application', Card::GLOBAL) end |
.by_identities(identities) ⇒ Object
Create new search criteria for searching cards by identities.
Args:
identities: Identities value.
Returns:
Search criteria with provided identities.
62 63 64 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 62 def self.by_identities(identities) return new(identities, nil, Card::APPLICATION) end |
.by_identity(identity) ⇒ Object
Create new search criteria for searching cards by identity.
Args:
identity: VirgilIdentity value.
Returns:
Search criteria with provided identity.
51 52 53 |
# File 'lib/virgil/sdk/client/search_criteria.rb', line 51 def self.by_identity(identity) return self.by_identities([identity]) end |