Module: EpsRapid

Defined in:
lib/eps-rapid.rb,
lib/eps-rapid/client.rb,
lib/eps-rapid/booking.rb,
lib/eps-rapid/content.rb,
lib/eps-rapid/version.rb,
lib/eps-rapid/shopping.rb,
lib/eps-rapid/geography.rb,
lib/eps-rapid/notifications.rb,
lib/eps-rapid/manage_booking.rb,
lib/eps-rapid/request_config.rb,
lib/eps-rapid/recommendations.rb,
lib/eps-rapid/errors/exceptions.rb,
lib/eps-rapid/errors/http_status_codes.rb

Defined Under Namespace

Modules: Exceptions, HttpStatusCodes, RequestConfig Classes: Booking, Client, Content, Geography, ManageBooking, Notifications, Recommendations, Shopping

Constant Summary collapse

VERSION =
'1.4.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



20
21
22
# File 'lib/eps-rapid.rb', line 20

def api_key
  @api_key
end

.base_pathObject

Returns the value of attribute base_path.



20
21
22
# File 'lib/eps-rapid.rb', line 20

def base_path
  @base_path
end

.language_resolverObject

Returns the value of attribute language_resolver.



20
21
22
# File 'lib/eps-rapid.rb', line 20

def language_resolver
  @language_resolver
end

.loggerObject

Returns the value of attribute logger.



20
21
22
# File 'lib/eps-rapid.rb', line 20

def logger
  @logger
end

.secret_keyObject

Returns the value of attribute secret_key.



20
21
22
# File 'lib/eps-rapid.rb', line 20

def secret_key
  @secret_key
end

Class Method Details

.auth_headerObject



26
27
28
29
30
31
# File 'lib/eps-rapid.rb', line 26

def auth_header
  timestamp    = Time.now.to_i
  to_be_hashed = "#{api_key}#{secret_key}#{timestamp}"
  signature    = Digest::SHA2.new(512).hexdigest(to_be_hashed)
  "EAN apikey=#{api_key},signature=#{signature},timestamp=#{timestamp}"
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (EpsRapid)

    the object that the method was called on



22
23
24
# File 'lib/eps-rapid.rb', line 22

def configure
  yield(self)
end