Class: Virgil::SDK::Client::SearchCriteria

Inherits:
Struct
  • Object
show all
Defined in:
lib/virgil/sdk/client/search_criteria.rb

Overview

Class holds criteria for searching Cards.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#identitiesObject

Returns the value of attribute identities

Returns:

  • (Object)

    the current value of identities



39
40
41
# File 'lib/virgil/sdk/client/search_criteria.rb', line 39

def identities
  @identities
end

#identity_typeObject

Returns the value of attribute identity_type

Returns:

  • (Object)

    the current value of identity_type



39
40
41
# File 'lib/virgil/sdk/client/search_criteria.rb', line 39

def identity_type
  @identity_type
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of 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