Class: Worldline::Acquiring::SDK::Communication::Connection

Inherits:
Object
  • Object
show all
Includes:
Logging::LoggingCapable, Logging::Obfuscation::ObfuscationCapable
Defined in:
lib/worldline/acquiring/sdk/communication/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.

See Also:

Direct Known Subclasses

PooledConnection

Instance Method Summary collapse

Methods included from Logging::Obfuscation::ObfuscationCapable

#set_body_obfuscator, #set_header_obfuscator

Methods included from Logging::LoggingCapable

#disable_logging, #enable_logging

Instance Method Details

#delete(uri, request_headers) {|Integer, Array<Worldline::Acquiring::SDK::Communication::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)


27
28
29
# File 'lib/worldline/acquiring/sdk/communication/connection.rb', line 27

def delete(uri, request_headers)
  raise NotImplementedError
end

#get(uri, request_headers) {|Integer, Array<Worldline::Acquiring::SDK::Communication::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)


19
20
21
# File 'lib/worldline/acquiring/sdk/communication/connection.rb', line 19

def get(uri, request_headers)
  raise NotImplementedError
end

#post(uri, request_headers, body) {|Integer, Array<Worldline::Acquiring::SDK::Communication::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)


35
36
37
# File 'lib/worldline/acquiring/sdk/communication/connection.rb', line 35

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

#put(uri, request_headers, body) {|Integer, Array<Worldline::Acquiring::SDK::Communication::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)


43
44
45
# File 'lib/worldline/acquiring/sdk/communication/connection.rb', line 43

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