Class: ShipEngine::InternalClient

Inherits:
Object
  • Object
show all
Defined in:
lib/shipengine/internal_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ InternalClient

Returns a new instance of InternalClient.

Parameters:



15
16
17
# File 'lib/shipengine/internal_client.rb', line 15

def initialize(configuration)
  @configuration = configuration
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



12
13
14
# File 'lib/shipengine/internal_client.rb', line 12

def configuration
  @configuration
end

Instance Method Details

#delete(path, options = {}, config = {}) ⇒ Object

Perform an HTTP DELETE request



35
36
37
# File 'lib/shipengine/internal_client.rb', line 35

def delete(path, options = {}, config = {})
  request(:delete, path, options, config)
end

#get(path, options = {}, config = {}) ⇒ Object

Perform an HTTP GET request



20
21
22
# File 'lib/shipengine/internal_client.rb', line 20

def get(path, options = {}, config = {})
  request(:get, path, options, config)
end

#post(path, options = {}, config = {}) ⇒ Object

Perform an HTTP POST request



25
26
27
# File 'lib/shipengine/internal_client.rb', line 25

def post(path, options = {}, config = {})
  request(:post, path, options, config)
end

#put(path, options = {}, config = {}) ⇒ Object

Perform an HTTP PUT request



30
31
32
# File 'lib/shipengine/internal_client.rb', line 30

def put(path, options = {}, config = {})
  request(:put, path, options, config)
end