Class: Mpp::Methods::Tempo::Schemas::HashCredentialPayload

Inherits:
Data
  • Object
show all
Defined in:
lib/mpp/methods/tempo/schemas.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, hash:) ⇒ HashCredentialPayload

Returns a new instance of HashCredentialPayload.

Raises:

  • (ArgumentError)


51
52
53
54
55
56
# File 'lib/mpp/methods/tempo/schemas.rb', line 51

def initialize(type:, hash:)
  raise ArgumentError, "type must be 'hash'" unless type == "hash"
  raise ArgumentError, "hash must be a hex string" unless hash.match?(HEX_PATTERN)

  super
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash

Returns:

  • (Object)

    the current value of hash



50
51
52
# File 'lib/mpp/methods/tempo/schemas.rb', line 50

def hash
  @hash
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



50
51
52
# File 'lib/mpp/methods/tempo/schemas.rb', line 50

def type
  @type
end