Class: ShipEngine::InternalClient
- Inherits:
-
Object
- Object
- ShipEngine::InternalClient
- Defined in:
- lib/shipengine/internal_client.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
-
#delete(path, options = {}, config = {}) ⇒ Object
Perform an HTTP DELETE request.
-
#get(path, options = {}, config = {}) ⇒ Object
Perform an HTTP GET request.
-
#initialize(configuration) ⇒ InternalClient
constructor
A new instance of InternalClient.
-
#post(path, options = {}, config = {}) ⇒ Object
Perform an HTTP POST request.
-
#put(path, options = {}, config = {}) ⇒ Object
Perform an HTTP PUT request.
Constructor Details
#initialize(configuration) ⇒ InternalClient
Returns a new instance of InternalClient.
15 16 17 |
# File 'lib/shipengine/internal_client.rb', line 15 def initialize(configuration) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (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, = {}, config = {}) request(:delete, path, , 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, = {}, config = {}) request(:get, path, , 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, = {}, config = {}) request(:post, path, , 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, = {}, config = {}) request(:put, path, , config) end |