Class: Worldline::Connect::SDK::V1::Merchant::Riskassessments::RiskassessmentsClient

Inherits:
ApiResource
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/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:



22
23
24
# File 'lib/worldline/connect/sdk/v1/merchant/riskassessments/riskassessments_client.rb', line 22

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

Instance Method Details

#bankaccounts(body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::RiskAssessmentResponse

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

Parameters:

Returns:

Raises:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/worldline/connect/sdk/v1/merchant/riskassessments/riskassessments_client.rb', line 40

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

#cards(body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::RiskAssessmentResponse

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

Parameters:

Returns:

Raises:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/worldline/connect/sdk/v1/merchant/riskassessments/riskassessments_client.rb', line 69

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