Class: Ingenico::Direct::SDK::Connection

Inherits:
Object
  • Object
show all
Includes:
Logging::LoggingCapable
Defined in:
lib/ingenico/direct/sdk/connection.rb

Overview

Class used to communicate using the HTTP (or HTTPS) protocol. Performs GET, DELETE, POST and PUT requests given a target uri and request headers.

Direct Known Subclasses

PooledConnection

Instance Method Summary collapse

Methods included from Logging::LoggingCapable

#disable_logging, #enable_logging

Instance Method Details

#delete(uri, request_headers) {|Integer, Array<Ingenico::Direct::SDK::ResponseHeader>, IO| ... } ⇒ Object

Performs a DELETE request to uri using request_headers, and yields the response as the status code, headers and body.

Yields:

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/ingenico/direct/sdk/connection.rb', line 21

def delete(uri, request_headers)
  raise NotImplementedError
end

#get(uri, request_headers) {|Integer, Array<Ingenico::Direct::SDK::ResponseHeader>, IO| ... } ⇒ Object

Performs a GET request to uri using request_headers, and yields the response as the status code, headers and body.

Yields:

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ingenico/direct/sdk/connection.rb', line 13

def get(uri, request_headers)
  raise NotImplementedError
end

#post(uri, request_headers, body) {|Integer, Array<Ingenico::Direct::SDK::ResponseHeader>, IO| ... } ⇒ Object

Performs a POST request to uri using request_headers and body, and yields the response as the status code, headers and body.

Yields:

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/ingenico/direct/sdk/connection.rb', line 29

def post(uri, request_headers, body)
  raise NotImplementedError
end

#put(uri, request_headers, body) {|Integer, Array<Ingenico::Direct::SDK::ResponseHeader>, IO| ... } ⇒ Object

Performs a PUT request to uri using request_headers and body, and yields the response as the status code, headers and body.

Yields:

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/ingenico/direct/sdk/connection.rb', line 37

def put(uri, request_headers, body)
  raise NotImplementedError
end