Class: Worldline::Acquiring::SDK::Client

Inherits:
ApiResource show all
Includes:
Logging::LoggingCapable, Logging::Obfuscation::ObfuscationCapable
Defined in:
lib/worldline/acquiring/sdk/client.rb

Overview

Worldline Acquiring platform client.

Thread safe.

Instance Attribute Summary

Attributes inherited from ApiResource

#communicator

Instance Method Summary collapse

Constructor Details

#initialize(communicator) ⇒ Client

Returns a new instance of Client.

Parameters:



20
21
22
# File 'lib/worldline/acquiring/sdk/client.rb', line 20

def initialize(communicator)
  super(communicator: communicator)
end

Instance Method Details

#closeObject

Releases any system resources associated with this object.



58
59
60
# File 'lib/worldline/acquiring/sdk/client.rb', line 58

def close
  @communicator.close
end

#close_expired_connectionsObject

Utility method that delegates the call to this client’s communicator.



30
31
32
# File 'lib/worldline/acquiring/sdk/client.rb', line 30

def close_expired_connections
  @communicator.close_expired_connections
end

#close_idle_connections(idle_time) ⇒ Object

Utility method that delegates the call to this client’s communicator.



25
26
27
# File 'lib/worldline/acquiring/sdk/client.rb', line 25

def close_idle_connections(idle_time)
  @communicator.close_idle_connections(idle_time)
end

#disable_loggingObject

Turns off logging.



53
54
55
# File 'lib/worldline/acquiring/sdk/client.rb', line 53

def disable_logging
  @communicator.disable_logging
end

#enable_logging(communicator_logger) ⇒ Object

Turns on logging using the given communicator logger.

Parameters:



48
49
50
# File 'lib/worldline/acquiring/sdk/client.rb', line 48

def enable_logging(communicator_logger)
  @communicator.enable_logging(communicator_logger)
end

#set_body_obfuscator(body_obfuscator) ⇒ Object

Sets the current body obfuscator to use.



36
37
38
# File 'lib/worldline/acquiring/sdk/client.rb', line 36

def set_body_obfuscator(body_obfuscator)
  @communicator.set_body_obfuscator(body_obfuscator)
end

#set_header_obfuscator(header_obfuscator) ⇒ Object

Sets the current header obfuscator to use.



42
43
44
# File 'lib/worldline/acquiring/sdk/client.rb', line 42

def set_header_obfuscator(header_obfuscator)
  @communicator.set_header_obfuscator(header_obfuscator)
end

#v1Worldline::Acquiring::SDK::V1::V1Client



63
64
65
# File 'lib/worldline/acquiring/sdk/client.rb', line 63

def v1
  Worldline::Acquiring::SDK::V1::V1Client.new(self, nil)
end