Class: DHLAPI::BaseClient

Inherits:
Object
  • Object
show all
Defined in:
lib/dhl_api/clients/base_client.rb

Direct Known Subclasses

RetoureClient, TrackingClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#http_client=(value) ⇒ Object (writeonly)

Sets the attribute http_client



5
6
7
# File 'lib/dhl_api/clients/base_client.rb', line 5

def http_client=(value)
  @http_client = value
end

#responseObject

Returns the value of attribute response.



6
7
8
# File 'lib/dhl_api/clients/base_client.rb', line 6

def response
  @response
end

Instance Method Details

#connectionObject



8
9
10
# File 'lib/dhl_api/clients/base_client.rb', line 8

def connection
  @connection ||= HTTP.headers(content_type: 'application/json', dhl_api_key: DHLAPI.config.api_key)
end