Class: KrakenClient::Requests::Content::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/kraken_client/requests/content/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, endpoint_name, options, url) ⇒ Header

Returns a new instance of Header.



8
9
10
11
12
13
14
15
# File 'lib/kraken_client/requests/content/header.rb', line 8

def initialize(config, endpoint_name, options, url)
  @config          = config
  @endpoint_name   = endpoint_name
  @url             = url

  @options         = options
  @options[:nonce] = nonce
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



6
7
8
# File 'lib/kraken_client/requests/content/header.rb', line 6

def config
  @config
end

#endpoint_nameObject

Returns the value of attribute endpoint_name.



6
7
8
# File 'lib/kraken_client/requests/content/header.rb', line 6

def endpoint_name
  @endpoint_name
end

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/kraken_client/requests/content/header.rb', line 6

def options
  @options
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/kraken_client/requests/content/header.rb', line 6

def url
  @url
end

Instance Method Details

#callObject



17
18
19
20
21
22
# File 'lib/kraken_client/requests/content/header.rb', line 17

def call
  {
    'API-Key' => config.api_key,
    'API-Sign' => generate_signature,
  }
end