Class: Walletone::Notification

Inherits:
Fields
  • Object
show all
Defined in:
lib/walletone/notification.rb

Constant Summary

Constants inherited from Fields

Fields::MULTIPLE_VALUES, Fields::W1_KEYS

Instance Method Summary collapse

Methods inherited from Fields

#[], #[]=, #as_list, #fetch

Constructor Details

#initialize(params) ⇒ Notification

Returns a new instance of Notification.



8
9
10
# File 'lib/walletone/notification.rb', line 8

def initialize params
  super( params ).freeze
end

Instance Method Details

#valid?(secret_key, hash_type = Signer::DEFAULT_HASH_TYPE) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/walletone/notification.rb', line 12

def valid?(secret_key, hash_type = Signer::DEFAULT_HASH_TYPE)
  self.WMI_SIGNATURE == signer.signature( secret_key, hash_type )
end