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) ⇒ SearchCriteria

Create new search criteria for searching cards by application bundle.

Parameters:

  • bundle (String)

    Application bundle.

Returns:



61
62
63
# File 'lib/virgil/sdk/client/search_criteria.rb', line 61

def self.by_app_bundle(bundle)
  return new([bundle], 'application', Card::GLOBAL)
end

.by_identities(identities) ⇒ SearchCriteria

Create new search criteria for searching cards by identities.

Parameters:

  • identities (Array<String>)

    Identities value.

Returns:



54
55
56
# File 'lib/virgil/sdk/client/search_criteria.rb', line 54

def self.by_identities(identities)
  return new(identities, nil, Card::APPLICATION)
end

.by_identity(identity) ⇒ SearchCriteria

Create new search criteria for searching cards by identity.

Parameters:

  • identity (String)

    VirgilIdentity value.

Returns:



47
48
49
# File 'lib/virgil/sdk/client/search_criteria.rb', line 47

def self.by_identity(identity)
  return self.by_identities([identity])
end