Class: Mpp::Methods::Tempo::Schemas::TransactionCredentialPayload

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:, signature:) ⇒ TransactionCredentialPayload

Returns a new instance of TransactionCredentialPayload.

Raises:

  • (ArgumentError)


60
61
62
63
64
65
# File 'lib/mpp/methods/tempo/schemas.rb', line 60

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

  super
end

Instance Attribute Details

#signatureObject (readonly)

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



59
60
61
# File 'lib/mpp/methods/tempo/schemas.rb', line 59

def signature
  @signature
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



59
60
61
# File 'lib/mpp/methods/tempo/schemas.rb', line 59

def type
  @type
end