Module: Ebay::NotificationApi::Verifier

Defined in:
lib/ebay/notification_api/verifier.rb,
lib/ebay/notification_api/verifier/version.rb,
lib/ebay/notification_api/verifier/message_validator.rb

Defined Under Namespace

Classes: MessageValidator, WrongAlgorithm

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.application_tokenObject

Raises:

  • (ArgumentError)


24
25
26
27
28
# File 'lib/ebay/notification_api/verifier.rb', line 24

def application_token
  raise ArgumentError, "application_token_proc is not configured" unless @application_token_proc

  @application_token_proc.call
end

.application_token_proc=(value) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/ebay/notification_api/verifier.rb', line 16

def application_token_proc=(value)
  unless value.respond_to?(:call)
    raise ArgumentError, "application_token_proc is not a callable object"
  end

  @application_token_proc = value
end

.valid_message?(*args) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ebay/notification_api/verifier.rb', line 12

def valid_message?(*args)
  MessageValidator.new(*args).valid_message?
end