Class: Ingenico::Connect::SDK::Merchant::Riskassessments::RiskassessmentsClient

Inherits:
ApiResource
  • Object
show all
Defined in:
lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb

Overview

Riskassessments client. Thread-safe.

Instance Attribute Summary

Attributes inherited from ApiResource

#client_meta_info, #communicator

Instance Method Summary collapse

Constructor Details

#initialize(parent, path_context) ⇒ RiskassessmentsClient

Returns a new instance of RiskassessmentsClient.

Parameters:



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb', line 20

def initialize(parent, path_context)
  super(parent, path_context)
end

Instance Method Details

#bankaccounts(body, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessmentResponse

Resource /{merchantId}/riskassessments/bankaccounts - Risk-assess bankaccount

Parameters:

Returns:

Raises:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb', line 37

def bankaccounts(body, context = nil)
  uri = instantiate_uri('/v1/{merchantId}/riskassessments/bankaccounts', nil)
  @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessmentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end

#cards(body, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessmentResponse

Resource /{merchantId}/riskassessments/cards - Risk-assess card

Parameters:

Returns:

Raises:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb', line 65

def cards(body, context = nil)
  uri = instantiate_uri('/v1/{merchantId}/riskassessments/cards', nil)
  @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessmentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end