Class: CyberSource::PayerAuthenticationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/api/payer_authentication_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default, config) ⇒ PayerAuthenticationApi

Returns a new instance of PayerAuthenticationApi.



18
19
20
21
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 18

def initialize(api_client = ApiClient.default, config)
  @api_client = api_client
  @api_client.set_configuration(config)
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#check_payer_auth_enrollment(check_payer_auth_enrollment_request, opts = {}) ⇒ RiskV1AuthenticationsPost201Response

Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program.

Parameters:

  • check_payer_auth_enrollment_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



29
30
31
32
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 29

def check_payer_auth_enrollment(check_payer_auth_enrollment_request, opts = {})
  data, status_code, headers = check_payer_auth_enrollment_with_http_info(check_payer_auth_enrollment_request, opts)
  return data, status_code, headers
end

#check_payer_auth_enrollment_with_http_info(check_payer_auth_enrollment_request, opts = {}) ⇒ Array<(RiskV1AuthenticationsPost201Response, Fixnum, Hash)>

Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program.

Parameters:

  • check_payer_auth_enrollment_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 39

def check_payer_auth_enrollment_with_http_info(check_payer_auth_enrollment_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: PayerAuthenticationApi.check_payer_auth_enrollment ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'check_payer_auth_enrollment_request' is set
  if @api_client.config.client_side_validation && check_payer_auth_enrollment_request.nil?
    fail ArgumentError, "Missing the required parameter 'check_payer_auth_enrollment_request' when calling PayerAuthenticationApi.check_payer_auth_enrollment"
  end
  # resource path
  local_var_path = 'risk/v1/authentications'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(check_payer_auth_enrollment_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CheckPayerAuthEnrollmentRequest', @api_client.config.host)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1AuthenticationsPost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: PayerAuthenticationApi#check_payer_auth_enrollment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#payer_auth_setup(payer_auth_setup_request, opts = {}) ⇒ RiskV1AuthenticationSetupsPost201Response

Setup Payer Auth A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check.

Parameters:

  • payer_auth_setup_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



98
99
100
101
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 98

def payer_auth_setup(payer_auth_setup_request, opts = {})
  data, status_code, headers = payer_auth_setup_with_http_info(payer_auth_setup_request, opts)
  return data, status_code, headers
end

#payer_auth_setup_with_http_info(payer_auth_setup_request, opts = {}) ⇒ Array<(RiskV1AuthenticationSetupsPost201Response, Fixnum, Hash)>

Setup Payer Auth A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check.

Parameters:

  • payer_auth_setup_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 108

def payer_auth_setup_with_http_info(payer_auth_setup_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: PayerAuthenticationApi.payer_auth_setup ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'payer_auth_setup_request' is set
  if @api_client.config.client_side_validation && payer_auth_setup_request.nil?
    fail ArgumentError, "Missing the required parameter 'payer_auth_setup_request' when calling PayerAuthenticationApi.payer_auth_setup"
  end
  # resource path
  local_var_path = 'risk/v1/authentication-setups'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(payer_auth_setup_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PayerAuthSetupRequest', @api_client.config.host)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1AuthenticationSetupsPost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: PayerAuthenticationApi#payer_auth_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#validate_authentication_results(validate_request, opts = {}) ⇒ RiskV1AuthenticationResultsPost201Response

Validate Authentication Results This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment.

Parameters:

  • validate_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



167
168
169
170
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 167

def validate_authentication_results(validate_request, opts = {})
  data, status_code, headers = validate_authentication_results_with_http_info(validate_request, opts)
  return data, status_code, headers
end

#validate_authentication_results_with_http_info(validate_request, opts = {}) ⇒ Array<(RiskV1AuthenticationResultsPost201Response, Fixnum, Hash)>

Validate Authentication Results This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment.

Parameters:

  • validate_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/cybersource_rest_client/api/payer_authentication_api.rb', line 177

def validate_authentication_results_with_http_info(validate_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: PayerAuthenticationApi.validate_authentication_results ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'validate_request' is set
  if @api_client.config.client_side_validation && validate_request.nil?
    fail ArgumentError, "Missing the required parameter 'validate_request' when calling PayerAuthenticationApi.validate_authentication_results"
  end
  # resource path
  local_var_path = 'risk/v1/authentication-results'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(validate_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'ValidateRequest', @api_client.config.host)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1AuthenticationResultsPost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: PayerAuthenticationApi#validate_authentication_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end