Class: Wallee::PaymentWebAppService

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PaymentWebAppService

Returns a new instance of PaymentWebAppService.



24
25
26
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 24

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



22
23
24
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 22

def api_client
  @api_client
end

Instance Method Details

#activate_processor_for_production(space_id, external_id, opts = {}) ⇒ PaymentAppProcessor

Activate Processor for Production This operation marks the processor to be usable within the production environment.

Parameters:

  • space_id

    The space ID identifies the space in which the processor is installed in.

  • external_id

    The external ID identifies the processor. The external ID corresponds to the ID provided during inserting of the processor.

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

    the optional parameters

Returns:



34
35
36
37
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 34

def activate_processor_for_production(space_id, external_id, opts = {})
  data, _status_code, _headers = activate_processor_for_production_with_http_info(space_id, external_id, opts)
  return data
end

#activate_processor_for_production_with_http_info(space_id, external_id, opts = {}) ⇒ Array<(PaymentAppProcessor, Fixnum, Hash)>

Returns PaymentAppProcessor data, response status code and response headers.

Parameters:

  • space_id

    The space ID identifies the space in which the processor is installed in.

  • external_id

    The external ID identifies the processor. The external ID corresponds to the ID provided during inserting of the processor.

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

    the optional parameters

Returns:

  • (Array<(PaymentAppProcessor, Fixnum, Hash)>)

    PaymentAppProcessor data, response status code and response headers



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
91
92
93
94
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 46

def activate_processor_for_production_with_http_info(space_id, external_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.activate_processor_for_production ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.activate_processor_for_production" if space_id.nil?
  # verify the required parameter 'external_id' is set
  fail ArgumentError, "Missing the required parameter 'external_id' when calling PaymentWebAppService.activate_processor_for_production" if external_id.nil?
  # resource path
  local_var_path = "/payment-web-app/activate-processor-for-production".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id
  query_params[:'externalId'] = external_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['*/*']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = nil
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'PaymentAppProcessor')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#activate_processor_for_production\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_connector(space_id, external_id, opts = {}) ⇒ nil

Delete Connector This operation removes the web app payment connector from the given space.

Parameters:

  • space_id

    The space ID identifies the space in which the connector is installed in.

  • external_id

    The external ID identifies the connector. The external ID corresponds to the ID provided during inserting of the connector.

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

    the optional parameters

Returns:

  • (nil)


102
103
104
105
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 102

def delete_connector(space_id, external_id, opts = {})
  delete_connector_with_http_info(space_id, external_id, opts)
  return nil
end

#delete_connector_with_http_info(space_id, external_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • space_id

    The space ID identifies the space in which the connector is installed in.

  • external_id

    The external ID identifies the connector. The external ID corresponds to the ID provided during inserting of the connector.

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
160
161
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 114

def delete_connector_with_http_info(space_id, external_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.delete_connector ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.delete_connector" if space_id.nil?
  # verify the required parameter 'external_id' is set
  fail ArgumentError, "Missing the required parameter 'external_id' when calling PaymentWebAppService.delete_connector" if external_id.nil?
  # resource path
  local_var_path = "/payment-web-app/delete-connector".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id
  query_params[:'externalId'] = external_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = nil
  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,
    :timeout => timeout,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#delete_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_processor(space_id, external_id, opts = {}) ⇒ nil

Delete Processor This operation removes the web app payment processor and its connectors from the given space.

Parameters:

  • space_id

    The space ID identifies the space in which the processor is installed in.

  • external_id

    The external ID identifies the processor. The external ID corresponds to the ID provided during inserting of the processor.

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

    the optional parameters

Returns:

  • (nil)


169
170
171
172
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 169

def delete_processor(space_id, external_id, opts = {})
  delete_processor_with_http_info(space_id, external_id, opts)
  return nil
end

#delete_processor_with_http_info(space_id, external_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • space_id

    The space ID identifies the space in which the processor is installed in.

  • external_id

    The external ID identifies the processor. The external ID corresponds to the ID provided during inserting of the processor.

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 181

def delete_processor_with_http_info(space_id, external_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.delete_processor ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.delete_processor" if space_id.nil?
  # verify the required parameter 'external_id' is set
  fail ArgumentError, "Missing the required parameter 'external_id' when calling PaymentWebAppService.delete_processor" if external_id.nil?
  # resource path
  local_var_path = "/payment-web-app/delete-processor".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id
  query_params[:'externalId'] = external_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = nil
  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,
    :timeout => timeout,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#delete_processor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_or_update_connector(space_id, request, opts = {}) ⇒ PaymentAppConnector

Insert or Update Connector This operation inserts or updates a web app payment connector.

Parameters:

  • space_id

    The space ID identifies the space into which the connector should be inserted into.

  • request

    The connector object contains all the details required to create or update a web app connector.

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

    the optional parameters

Returns:



236
237
238
239
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 236

def insert_or_update_connector(space_id, request, opts = {})
  data, _status_code, _headers = insert_or_update_connector_with_http_info(space_id, request, opts)
  return data
end

#insert_or_update_connector_with_http_info(space_id, request, opts = {}) ⇒ Array<(PaymentAppConnector, Fixnum, Hash)>

Returns PaymentAppConnector data, response status code and response headers.

Parameters:

  • space_id

    The space ID identifies the space into which the connector should be inserted into.

  • request

    The connector object contains all the details required to create or update a web app connector.

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

    the optional parameters

Returns:

  • (Array<(PaymentAppConnector, Fixnum, Hash)>)

    PaymentAppConnector data, response status code and response headers



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 248

def insert_or_update_connector_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.insert_or_update_connector ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.insert_or_update_connector" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.insert_or_update_connector" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/insert-or-update-connector".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'PaymentAppConnector')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#insert_or_update_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_or_update_processor(space_id, request, opts = {}) ⇒ PaymentAppProcessor

Insert or Update Processor This operation inserts or updates a web app payment processor.

Parameters:

  • space_id

    The space ID identifies the space into which the processor should be inserted into.

  • request

    The processor object contains all the details required to create or update a web app processor.

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

    the optional parameters

Returns:



303
304
305
306
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 303

def insert_or_update_processor(space_id, request, opts = {})
  data, _status_code, _headers = insert_or_update_processor_with_http_info(space_id, request, opts)
  return data
end

#insert_or_update_processor_with_http_info(space_id, request, opts = {}) ⇒ Array<(PaymentAppProcessor, Fixnum, Hash)>

Returns PaymentAppProcessor data, response status code and response headers.

Parameters:

  • space_id

    The space ID identifies the space into which the processor should be inserted into.

  • request

    The processor object contains all the details required to create or update a web app processor.

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

    the optional parameters

Returns:

  • (Array<(PaymentAppProcessor, Fixnum, Hash)>)

    PaymentAppProcessor data, response status code and response headers



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 315

def insert_or_update_processor_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.insert_or_update_processor ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.insert_or_update_processor" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.insert_or_update_processor" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/insert-or-update-processor".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'PaymentAppProcessor')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#insert_or_update_processor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_charge_attempt(space_id, request, opts = {}) ⇒ ChargeAttempt

Update Charge Attempt This operation updates the state of the charge attempt. This method can be invoked for transactions originally created with a processor associated with the web app that invokes this operation. The returned charge attempt corresponds to the charge attempt indicated in the request.

Parameters:

  • space_id

    This is the ID of the space in which the charge attempt is located in.

  • request

    The charge attempt update request allows to update the state of a charge attempt.

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

    the optional parameters

Returns:



370
371
372
373
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 370

def update_charge_attempt(space_id, request, opts = {})
  data, _status_code, _headers = update_charge_attempt_with_http_info(space_id, request, opts)
  return data
end

#update_charge_attempt_with_http_info(space_id, request, opts = {}) ⇒ Array<(ChargeAttempt, Fixnum, Hash)>

Returns ChargeAttempt data, response status code and response headers.

Parameters:

  • space_id

    This is the ID of the space in which the charge attempt is located in.

  • request

    The charge attempt update request allows to update the state of a charge attempt.

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

    the optional parameters

Returns:

  • (Array<(ChargeAttempt, Fixnum, Hash)>)

    ChargeAttempt data, response status code and response headers



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 382

def update_charge_attempt_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.update_charge_attempt ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.update_charge_attempt" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.update_charge_attempt" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/update-charge-attempt".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'ChargeAttempt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#update_charge_attempt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_completion(space_id, request, opts = {}) ⇒ TransactionCompletion

Update Completion This operation updates the state of the transaction completion. This method can be invoked for transactions originally created with a processor associated with the web app that invokes this operation. The returned completion corresponds to the completion indicated in the request.

Parameters:

  • space_id

    This is the ID of the space in which the completion is located in.

  • request

    The completion update request allows to update the state of a completion.

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

    the optional parameters

Returns:



437
438
439
440
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 437

def update_completion(space_id, request, opts = {})
  data, _status_code, _headers = update_completion_with_http_info(space_id, request, opts)
  return data
end

#update_completion_with_http_info(space_id, request, opts = {}) ⇒ Array<(TransactionCompletion, Fixnum, Hash)>

Returns TransactionCompletion data, response status code and response headers.

Parameters:

  • space_id

    This is the ID of the space in which the completion is located in.

  • request

    The completion update request allows to update the state of a completion.

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

    the optional parameters

Returns:

  • (Array<(TransactionCompletion, Fixnum, Hash)>)

    TransactionCompletion data, response status code and response headers



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 449

def update_completion_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.update_completion ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.update_completion" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.update_completion" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/update-completion".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'TransactionCompletion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#update_completion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_refund(space_id, request, opts = {}) ⇒ Refund

Update Refund This operation updates the state of the refund. This method can be invoked for transactions originally created with a processor associated with the web app that invokes this operation. The returned refund corresponds to the refund indicated in the request.

Parameters:

  • space_id

    This is the ID of the space in which the refund is located in.

  • request

    The refund update request allows to update the state of a refund.

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

    the optional parameters

Returns:



504
505
506
507
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 504

def update_refund(space_id, request, opts = {})
  data, _status_code, _headers = update_refund_with_http_info(space_id, request, opts)
  return data
end

#update_refund_with_http_info(space_id, request, opts = {}) ⇒ Array<(Refund, Fixnum, Hash)>

Returns Refund data, response status code and response headers.

Parameters:

  • space_id

    This is the ID of the space in which the refund is located in.

  • request

    The refund update request allows to update the state of a refund.

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

    the optional parameters

Returns:

  • (Array<(Refund, Fixnum, Hash)>)

    Refund data, response status code and response headers



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 516

def update_refund_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.update_refund ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.update_refund" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.update_refund" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/update-refund".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'Refund')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#update_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_void(space_id, request, opts = {}) ⇒ TransactionVoid

Update Void This operation updates the state of the transaction void. This method can be invoked for transactions originally created with a processor associated with the web app that invokes this operation. The returned void corresponds to the void indicated in the request.

Parameters:

  • space_id

    This is the ID of the space in which the void is located in.

  • request

    The void update request allows to update the state of a void.

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

    the optional parameters

Returns:



571
572
573
574
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 571

def update_void(space_id, request, opts = {})
  data, _status_code, _headers = update_void_with_http_info(space_id, request, opts)
  return data
end

#update_void_with_http_info(space_id, request, opts = {}) ⇒ Array<(TransactionVoid, Fixnum, Hash)>

Returns TransactionVoid data, response status code and response headers.

Parameters:

  • space_id

    This is the ID of the space in which the void is located in.

  • request

    The void update request allows to update the state of a void.

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

    the optional parameters

Returns:

  • (Array<(TransactionVoid, Fixnum, Hash)>)

    TransactionVoid data, response status code and response headers



583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
# File 'lib/wallee-ruby-sdk/api/payment_web_app_service_api.rb', line 583

def update_void_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PaymentWebAppService.update_void ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentWebAppService.update_void" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling PaymentWebAppService.update_void" if request.nil?
  # resource path
  local_var_path = "/payment-web-app/update-void".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  
  # connection timeout
  timeout = @api_client.get_connection_timeout()

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :timeout => timeout,
    :auth_names => auth_names,
    :return_type => 'TransactionVoid')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentWebAppService#update_void\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end