class Ingenico::Direct::SDK::Merchant::Services::ServicesClient

Services client. Thread-safe.

Public Class Methods

new(parent, path_context = nil) click to toggle source

@param parent [Ingenico::Direct::SDK::ApiResource] @param path_context [Hash, nil]

Calls superclass method Ingenico::Direct::SDK::ApiResource::new
# File lib/ingenico/direct/sdk/merchant/services/services_client.rb, line 21
def initialize(parent, path_context = nil)
  super(parent, path_context)
end

Public Instance Methods

get_iin_details(body, context = nil) click to toggle source

Resource /v2/!{merchantId}/services/getIINdetails - {support.direct.ingenico.com/documentation/api/reference#operation/GetIINDetailsApi Get IIN details} @param body [Ingenico::Direct::SDK::Domain::GetIINDetailsRequest] @param context [Ingenico::Direct::SDK::CallContext] @return [Ingenico::Direct::SDK::Domain::GetIINDetailsResponse] @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/direct/sdk/merchant/services/services_client.rb, line 65
def get_iin_details(body, context = nil)
  uri = instantiate_uri('/v2/{merchantId}/services/getIINdetails')
  @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Direct::SDK::Domain::GetIINDetailsResponse,
    context
  )
rescue ResponseException => e
  error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
test_connection(context = nil) click to toggle source

Resource /v2/!{merchantId}/services/testconnection - {support.direct.ingenico.com/documentation/api/reference#operation/TestConnectionApi Test connection} @param context [Ingenico::Direct::SDK::CallContext] @return [Ingenico::Direct::SDK::Domain::TestConnection] @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/direct/sdk/merchant/services/services_client.rb, line 37
def test_connection(context = nil)
  uri = instantiate_uri('/v2/{merchantId}/services/testconnection')
  @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Direct::SDK::Domain::TestConnection,
    context
  )
rescue ResponseException => e
  error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end