Class: Fcoin::Authorization

Inherits:
Object
  • Object
show all
Defined in:
lib/fcoin/authorization.rb

Instance Method Summary collapse

Constructor Details

#initialize(http_method:, path:, payload:, endpoint:, api_key:, secret_key:) ⇒ Authorization

Returns a new instance of Authorization.

Parameters:

  • http_method (String)
  • path (String)
  • payload (Hash)
  • endpoint (String)


14
15
16
17
18
19
20
21
# File 'lib/fcoin/authorization.rb', line 14

def initialize(http_method:, path:, payload:, endpoint:, api_key:, secret_key:)
  self.http_method = http_method
  self.path        = path
  self.payload     = payload
  self.endpoint    = endpoint
  self.api_key     = api_key
  self.secret_key  = secret_key
end

Instance Method Details

#original_headersObject

Header required for authentication



26
27
28
29
30
31
32
# File 'lib/fcoin/authorization.rb', line 26

def original_headers
  {
     'FC-ACCESS-KEY'       => api_key,
     'FC-ACCESS-SIGNATURE' => encoded_signature,
     'FC-ACCESS-TIMESTAMP' => timestamp
  }
end