Class: Ingenico::Direct::SDK::CommunicatorConfiguration
- Inherits:
-
EndpointConfiguration
- Object
- EndpointConfiguration
- Ingenico::Direct::SDK::CommunicatorConfiguration
- Defined in:
- lib/ingenico/direct/sdk/communicator_configuration.rb
Overview
A CommunicatorConfiguration stores all data used to initialize an Communicator.
Constant Summary
Constants inherited from EndpointConfiguration
EndpointConfiguration::DEFAULT_CONNECT_TIMEOUT, EndpointConfiguration::DEFAULT_MAX_CONNECTIONS, EndpointConfiguration::DEFAULT_SOCKET_TIMEOUT
Instance Attribute Summary collapse
-
#api_endpoint ⇒ String
Base URL to the Ingenico ePayments platform.
-
#api_key_id ⇒ String
Identifier of the secret_api_key used in authentication.
-
#authorization_type ⇒ String
String representing the authentication algorithm used.
-
#secret_api_key ⇒ String
Secret key used in authentication.
Attributes inherited from EndpointConfiguration
#connect_timeout, #integrator, #max_connections, #proxy_configuration, #shopping_cart_extension, #socket_timeout
Instance Method Summary collapse
-
#initialize(properties: nil, api_endpoint: nil, api_key_id: nil, secret_api_key: nil, authorization_type: nil, connect_timeout: nil, socket_timeout: nil, max_connections: nil, proxy_configuration: nil, integrator: nil, shopping_cart_extension: nil) ⇒ CommunicatorConfiguration
constructor
Creates a new CommunicatorConfiguration instance.
Methods inherited from EndpointConfiguration
default_connect_timeout, default_max_connections, default_socket_timeout
Constructor Details
#initialize(properties: nil, api_endpoint: nil, api_key_id: nil, secret_api_key: nil, authorization_type: nil, connect_timeout: nil, socket_timeout: nil, max_connections: nil, proxy_configuration: nil, integrator: nil, shopping_cart_extension: nil) ⇒ CommunicatorConfiguration
Creates a new CommunicatorConfiguration instance.
If a properties object is given, it will be parsed like a hash in order to read these attributes. If a value is given in both the properties hash and as a separate parameter, the separate parameter will take precedence over the value in the properties.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/ingenico/direct/sdk/communicator_configuration.rb', line 31 def initialize(properties: nil, api_endpoint: nil, api_key_id: nil, secret_api_key: nil, authorization_type: nil, connect_timeout: nil, socket_timeout: nil, max_connections: nil, proxy_configuration: nil, integrator: nil, shopping_cart_extension: nil) if properties super(properties, 'direct.api') @authorization_type = properties['direct.api.authorizationType'] ? DefaultImpl::AuthorizationType.(properties['direct.api.authorizationType']) : DefaultImpl::AuthorizationType::V1HMAC end @api_endpoint = api_endpoint if api_endpoint @api_key_id = api_key_id if api_key_id @secret_api_key = secret_api_key if secret_api_key @authorization_type = DefaultImpl::AuthorizationType.() if @connect_timeout = connect_timeout if connect_timeout @socket_timeout = socket_timeout if socket_timeout @max_connections = max_connections if max_connections @proxy_configuration = proxy_configuration if proxy_configuration @integrator = integrator if integrator @shopping_cart_extension = shopping_cart_extension if shopping_cart_extension end |
Instance Attribute Details
#api_endpoint ⇒ String
Base URL to the Ingenico ePayments platform
9 10 11 |
# File 'lib/ingenico/direct/sdk/communicator_configuration.rb', line 9 def api_endpoint @api_endpoint end |
#api_key_id ⇒ String
Identifier of the secret_api_key used in authentication.
9 10 11 |
# File 'lib/ingenico/direct/sdk/communicator_configuration.rb', line 9 def api_key_id @api_key_id end |
#authorization_type ⇒ String
String representing the authentication algorithm used
9 10 11 |
# File 'lib/ingenico/direct/sdk/communicator_configuration.rb', line 9 def @authorization_type end |
#secret_api_key ⇒ String
Secret key used in authentication
9 10 11 |
# File 'lib/ingenico/direct/sdk/communicator_configuration.rb', line 9 def secret_api_key @secret_api_key end |