Class: OnlinePayments::SDK::DefaultImpl::AuthorizationType

Inherits:
Object
  • Object
show all
Defined in:
lib/onlinepayments/sdk/defaultimpl/authorization_type.rb

Overview

Contains all authentication schemes supported by the GlobabCollect platform.

Constant Summary collapse

V1HMAC =
'v1HMAC'

Class Method Summary collapse

Class Method Details

.get_authorization(authorization) ⇒ String

Returns the authorization string that belongs to the parameter authorization, or nil if not found.

Returns:

  • (String)

    the authorization string that belongs to the parameter authorization, or nil if not found.



9
10
11
12
13
14
15
16
# File 'lib/onlinepayments/sdk/defaultimpl/authorization_type.rb', line 9

def self.get_authorization(authorization)
  case authorization.downcase
  when V1HMAC.downcase
    return V1HMAC
  else
    raise ArgumentError "Unknown authorization type '#{authorization}'"
  end
end

.get_signature_stringString

Returns:

  • (String)


19
20
21
# File 'lib/onlinepayments/sdk/defaultimpl/authorization_type.rb', line 19

def self.get_signature_string
  V1HMAC
end