module DhlEcommerce::Client::Connection

Public Instance Methods

get(path, options = {}) click to toggle source
# File lib/dhl_ecommerce/connection.rb, line 6
def get(path, options = {})
  request :get, path, options
end
post(path, options = {}) click to toggle source
# File lib/dhl_ecommerce/connection.rb, line 10
def post(path, options = {})
  request :post, path, options
end

Private Instance Methods

request(http_method, path, options) click to toggle source
# File lib/dhl_ecommerce/connection.rb, line 16
def request(http_method, path, options)
  response = self.class.send(http_method, path, body: options.to_json)
  response.parsed_response
end