Class: WhiteLabelMachineName::TransactionService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TransactionService

Returns a new instance of TransactionService.



24
25
26
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_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/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 22

def api_client
  @api_client
end

Instance Method Details

#confirm(space_id, transaction_model, opts = {}) ⇒ Transaction

Confirm The confirm operation marks the transaction as confirmed. Once the transaction is confirmed no more changes can be applied.

Parameters:

  • space_id
  • transaction_model

    The transaction JSON object to update and confirm.

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

    the optional parameters

Returns:



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

def confirm(space_id, transaction_model, opts = {})
  data, _status_code, _headers = confirm_with_http_info(space_id, transaction_model, opts)
  return data
end

#confirm_with_http_info(space_id, transaction_model, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Confirm The confirm operation marks the transaction as confirmed. Once the transaction is confirmed no more changes can be applied.

Parameters:

  • space_id
  • transaction_model

    The transaction JSON object to update and confirm.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



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
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 45

def confirm_with_http_info(space_id, transaction_model, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.confirm ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.confirm" if space_id.nil?
  # verify the required parameter 'transaction_model' is set
  fail ArgumentError, "Missing the required parameter 'transaction_model' when calling TransactionService.confirm" if transaction_model.nil?
  # resource path
  local_var_path = "/transaction/confirm".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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

#count(space_id, opts = {}) ⇒ Integer

Count Counts the number of items in the database as restricted by the given filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (EntityQueryFilter)

    The filter which restricts the entities which are used to calculate the count.

Returns:

  • (Integer)


96
97
98
99
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 96

def count(space_id, opts = {})
  data, _status_code, _headers = count_with_http_info(space_id, opts)
  return data
end

#count_with_http_info(space_id, opts = {}) ⇒ Array<(Integer, Fixnum, Hash)>

Count Counts the number of items in the database as restricted by the given filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (EntityQueryFilter)

    The filter which restricts the entities which are used to calculate the count.

Returns:

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

    Integer data, response status code and response headers



107
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
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 107

def count_with_http_info(space_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.count ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.count" if space_id.nil?
  # resource path
  local_var_path = "/transaction/count".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'filter'])
  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 => 'Integer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create(space_id, transaction, opts = {}) ⇒ Transaction

Create Creates the entity with the given properties.

Parameters:

  • space_id
  • transaction

    The transaction object which should be created.

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

    the optional parameters

Returns:



156
157
158
159
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 156

def create(space_id, transaction, opts = {})
  data, _status_code, _headers = create_with_http_info(space_id, transaction, opts)
  return data
end

#create_transaction_credentials(space_id, id, opts = {}) ⇒ String

Create Transaction Credentials This operation allows to create transaction credentials to delegate temporarily the access to the web service API for this particular transaction.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

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

    the optional parameters

Returns:

  • (String)


218
219
220
221
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 218

def create_transaction_credentials(space_id, id, opts = {})
  data, _status_code, _headers = create_transaction_credentials_with_http_info(space_id, id, opts)
  return data
end

#create_transaction_credentials_with_http_info(space_id, id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Create Transaction Credentials This operation allows to create transaction credentials to delegate temporarily the access to the web service API for this particular transaction.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
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
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 229

def create_transaction_credentials_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.create_transaction_credentials ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.create_transaction_credentials" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.create_transaction_credentials" if id.nil?
  # resource path
  local_var_path = "/transaction/createTransactionCredentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id
  query_params[:'id'] = 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 = {}

  # 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,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#create_transaction_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_with_http_info(space_id, transaction, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Create Creates the entity with the given properties.

Parameters:

  • space_id
  • transaction

    The transaction object which should be created.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



167
168
169
170
171
172
173
174
175
176
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
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 167

def create_with_http_info(space_id, transaction, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.create ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.create" if space_id.nil?
  # verify the required parameter 'transaction' is set
  fail ArgumentError, "Missing the required parameter 'transaction' when calling TransactionService.create" if transaction.nil?
  # resource path
  local_var_path = "/transaction/create".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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

#delete_one_click_token_with_credentials(credentials, token_id, opts = {}) ⇒ nil

Delete One-Click Token with Credentials This operation removes the given token.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • token_id

    The token ID will be used to find the token which should be removed.

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

    the optional parameters

Returns:

  • (nil)


281
282
283
284
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 281

def delete_one_click_token_with_credentials(credentials, token_id, opts = {})
  delete_one_click_token_with_credentials_with_http_info(credentials, token_id, opts)
  return nil
end

#delete_one_click_token_with_credentials_with_http_info(credentials, token_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete One-Click Token with Credentials This operation removes the given token.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • token_id

    The token ID will be used to find the token which should be removed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 292

def delete_one_click_token_with_credentials_with_http_info(credentials, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.delete_one_click_token_with_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  fail ArgumentError, "Missing the required parameter 'credentials' when calling TransactionService.delete_one_click_token_with_credentials" if credentials.nil?
  # verify the required parameter 'token_id' is set
  fail ArgumentError, "Missing the required parameter 'token_id' when calling TransactionService.delete_one_click_token_with_credentials" if token_id.nil?
  # resource path
  local_var_path = "/transaction/deleteOneClickTokenWithCredentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'credentials'] = credentials
  query_params[:'tokenId'] = token_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 = {}

  # 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,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#delete_one_click_token_with_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export(space_id, request, opts = {}) ⇒ String

Export Exports the transactions into a CSV file. The file will contain the properties defined in the request.

Parameters:

  • space_id
  • request

    The request controls the entries which are exported.

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

    the optional parameters

Returns:

  • (String)


343
344
345
346
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 343

def export(space_id, request, opts = {})
  data, _status_code, _headers = export_with_http_info(space_id, request, opts)
  return data
end

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

Export Exports the transactions into a CSV file. The file will contain the properties defined in the request.

Parameters:

  • space_id
  • request

    The request controls the entries which are exported.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 354

def export_with_http_info(space_id, request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.export ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.export" if space_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling TransactionService.export" if request.nil?
  # resource path
  local_var_path = "/transaction/export".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8', 'text/csv']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # 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,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#fetch_one_click_tokens_with_credentials(credentials, opts = {}) ⇒ Array<TokenVersion>

Fetch One Click Tokens with Credentials This operation returns the token version objects which references the tokens usable as one-click payment tokens for the provided transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

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

    the optional parameters

Returns:



404
405
406
407
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 404

def fetch_one_click_tokens_with_credentials(credentials, opts = {})
  data, _status_code, _headers = fetch_one_click_tokens_with_credentials_with_http_info(credentials, opts)
  return data
end

#fetch_one_click_tokens_with_credentials_with_http_info(credentials, opts = {}) ⇒ Array<(Array<TokenVersion>, Fixnum, Hash)>

Fetch One Click Tokens with Credentials This operation returns the token version objects which references the tokens usable as one-click payment tokens for the provided transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

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

    the optional parameters

Returns:

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

    Array<TokenVersion> data, response status code and response headers



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 414

def fetch_one_click_tokens_with_credentials_with_http_info(credentials, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.fetch_one_click_tokens_with_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  fail ArgumentError, "Missing the required parameter 'credentials' when calling TransactionService.fetch_one_click_tokens_with_credentials" if credentials.nil?
  # resource path
  local_var_path = "/transaction/fetchOneClickTokensWithCredentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'credentials'] = credentials

  # 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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<TokenVersion>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#fetch_one_click_tokens_with_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#fetch_payment_methods(space_id, id, integration_mode, opts = {}) ⇒ Array<PaymentMethodConfiguration>

Fetch Possible Payment Methods This operation allows to get the payment method configurations which can be used with the provided transaction.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

  • integration_mode

    The integration mode defines the type of integration that is applied on the transaction.

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

    the optional parameters

Returns:



464
465
466
467
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 464

def fetch_payment_methods(space_id, id, integration_mode, opts = {})
  data, _status_code, _headers = fetch_payment_methods_with_http_info(space_id, id, integration_mode, opts)
  return data
end

#fetch_payment_methods_with_credentials(credentials, integration_mode, opts = {}) ⇒ Array<PaymentMethodConfiguration>

Fetch Possible Payment Methods with Credentials This operation allows to get the payment method configurations which can be used with the provided transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • integration_mode

    The integration mode defines the type of integration that is applied on the transaction.

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

    the optional parameters

Returns:



531
532
533
534
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 531

def fetch_payment_methods_with_credentials(credentials, integration_mode, opts = {})
  data, _status_code, _headers = fetch_payment_methods_with_credentials_with_http_info(credentials, integration_mode, opts)
  return data
end

#fetch_payment_methods_with_credentials_with_http_info(credentials, integration_mode, opts = {}) ⇒ Array<(Array<PaymentMethodConfiguration>, Fixnum, Hash)>

Fetch Possible Payment Methods with Credentials This operation allows to get the payment method configurations which can be used with the provided transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • integration_mode

    The integration mode defines the type of integration that is applied on the transaction.

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

    the optional parameters

Returns:

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

    Array<PaymentMethodConfiguration> data, response status code and response headers



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 542

def fetch_payment_methods_with_credentials_with_http_info(credentials, integration_mode, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.fetch_payment_methods_with_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  fail ArgumentError, "Missing the required parameter 'credentials' when calling TransactionService.fetch_payment_methods_with_credentials" if credentials.nil?
  # verify the required parameter 'integration_mode' is set
  fail ArgumentError, "Missing the required parameter 'integration_mode' when calling TransactionService.fetch_payment_methods_with_credentials" if integration_mode.nil?
  # resource path
  local_var_path = "/transaction/fetch-payment-methods-with-credentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'credentials'] = credentials
  query_params[:'integrationMode'] = integration_mode

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<PaymentMethodConfiguration>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#fetch_payment_methods_with_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#fetch_payment_methods_with_http_info(space_id, id, integration_mode, opts = {}) ⇒ Array<(Array<PaymentMethodConfiguration>, Fixnum, Hash)>

Fetch Possible Payment Methods This operation allows to get the payment method configurations which can be used with the provided transaction.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

  • integration_mode

    The integration mode defines the type of integration that is applied on the transaction.

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

    the optional parameters

Returns:

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

    Array<PaymentMethodConfiguration> data, response status code and response headers



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 476

def fetch_payment_methods_with_http_info(space_id, id, integration_mode, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.fetch_payment_methods ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.fetch_payment_methods" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.fetch_payment_methods" if id.nil?
  # verify the required parameter 'integration_mode' is set
  fail ArgumentError, "Missing the required parameter 'integration_mode' when calling TransactionService.fetch_payment_methods" if integration_mode.nil?
  # resource path
  local_var_path = "/transaction/fetch-payment-methods".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<PaymentMethodConfiguration>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#fetch_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_invoice_document(space_id, id, opts = {}) ⇒ RenderedDocument

getInvoiceDocument Returns the PDF document for the transaction invoice with given id.

Parameters:

  • space_id
  • id

    The id of the transaction to get the invoice document for.

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

    the optional parameters

Returns:



594
595
596
597
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 594

def get_invoice_document(space_id, id, opts = {})
  data, _status_code, _headers = get_invoice_document_with_http_info(space_id, id, opts)
  return data
end

#get_invoice_document_with_http_info(space_id, id, opts = {}) ⇒ Array<(RenderedDocument, Fixnum, Hash)>

getInvoiceDocument Returns the PDF document for the transaction invoice with given id.

Parameters:

  • space_id
  • id

    The id of the transaction to get the invoice document for.

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

    the optional parameters

Returns:

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

    RenderedDocument data, response status code and response headers



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
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 605

def get_invoice_document_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.get_invoice_document ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.get_invoice_document" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.get_invoice_document" if id.nil?
  # resource path
  local_var_path = "/transaction/getInvoiceDocument".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RenderedDocument')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#get_invoice_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_latest_transaction_line_item_version(space_id, id, opts = {}) ⇒ TransactionLineItemVersion

getLatestSuccessfulTransactionLineItemVersion

Parameters:

  • space_id
  • id

    The id of the transaction to get the latest line item version for.

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

    the optional parameters

Returns:



657
658
659
660
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 657

def get_latest_transaction_line_item_version(space_id, id, opts = {})
  data, _status_code, _headers = get_latest_transaction_line_item_version_with_http_info(space_id, id, opts)
  return data
end

#get_latest_transaction_line_item_version_with_http_info(space_id, id, opts = {}) ⇒ Array<(TransactionLineItemVersion, Fixnum, Hash)>

getLatestSuccessfulTransactionLineItemVersion

Parameters:

  • space_id
  • id

    The id of the transaction to get the latest line item version for.

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

    the optional parameters

Returns:

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

    TransactionLineItemVersion data, response status code and response headers



668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 668

def get_latest_transaction_line_item_version_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.get_latest_transaction_line_item_version ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.get_latest_transaction_line_item_version" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.get_latest_transaction_line_item_version" if id.nil?
  # resource path
  local_var_path = "/transaction/getLatestTransactionLineItemVersion".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TransactionLineItemVersion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#get_latest_transaction_line_item_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_packing_slip(space_id, id, opts = {}) ⇒ RenderedDocument

getPackingSlip Returns the packing slip for the transaction with given id.

Parameters:

  • space_id
  • id

    The id of the transaction to get the packing slip for.

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

    the optional parameters

Returns:



720
721
722
723
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 720

def get_packing_slip(space_id, id, opts = {})
  data, _status_code, _headers = get_packing_slip_with_http_info(space_id, id, opts)
  return data
end

#get_packing_slip_with_http_info(space_id, id, opts = {}) ⇒ Array<(RenderedDocument, Fixnum, Hash)>

getPackingSlip Returns the packing slip for the transaction with given id.

Parameters:

  • space_id
  • id

    The id of the transaction to get the packing slip for.

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

    the optional parameters

Returns:

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

    RenderedDocument data, response status code and response headers



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 731

def get_packing_slip_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.get_packing_slip ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.get_packing_slip" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.get_packing_slip" if id.nil?
  # resource path
  local_var_path = "/transaction/getPackingSlip".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RenderedDocument')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#get_packing_slip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#process_one_click_token_and_redirect_with_credentials(credentials, token_id, opts = {}) ⇒ String

Process One-Click Token with Credentials This operation assigns the given token to the transaction and process it. This method will return an URL where the customer has to be redirect to complete the transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • token_id

    The token ID is used to load the corresponding token and to process the transaction with it.

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

    the optional parameters

Returns:

  • (String)


783
784
785
786
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 783

def process_one_click_token_and_redirect_with_credentials(credentials, token_id, opts = {})
  data, _status_code, _headers = process_one_click_token_and_redirect_with_credentials_with_http_info(credentials, token_id, opts)
  return data
end

#process_one_click_token_and_redirect_with_credentials_with_http_info(credentials, token_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Process One-Click Token with Credentials This operation assigns the given token to the transaction and process it. This method will return an URL where the customer has to be redirect to complete the transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

  • token_id

    The token ID is used to load the corresponding token and to process the transaction with it.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 794

def process_one_click_token_and_redirect_with_credentials_with_http_info(credentials, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.process_one_click_token_and_redirect_with_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  fail ArgumentError, "Missing the required parameter 'credentials' when calling TransactionService.process_one_click_token_and_redirect_with_credentials" if credentials.nil?
  # verify the required parameter 'token_id' is set
  fail ArgumentError, "Missing the required parameter 'token_id' when calling TransactionService.process_one_click_token_and_redirect_with_credentials" if token_id.nil?
  # resource path
  local_var_path = "/transaction/processOneClickTokenAndRedirectWithCredentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'credentials'] = credentials
  query_params[:'tokenId'] = token_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 = {}

  # 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,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#process_one_click_token_and_redirect_with_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#process_without_user_interaction(space_id, id, opts = {}) ⇒ Transaction

Process Without User Interaction This operation processes the transaction without requiring that the customer is present. Means this operation applies strategies to process the transaction without a direct interaction with the buyer. This operation is suitable for recurring transactions.

Parameters:

  • space_id
  • id

    The id of the transaction which should be processed.

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

    the optional parameters

Returns:



846
847
848
849
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 846

def process_without_user_interaction(space_id, id, opts = {})
  data, _status_code, _headers = process_without_user_interaction_with_http_info(space_id, id, opts)
  return data
end

#process_without_user_interaction_with_http_info(space_id, id, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Process Without User Interaction This operation processes the transaction without requiring that the customer is present. Means this operation applies strategies to process the transaction without a direct interaction with the buyer. This operation is suitable for recurring transactions.

Parameters:

  • space_id
  • id

    The id of the transaction which should be processed.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 857

def process_without_user_interaction_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.process_without_user_interaction ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.process_without_user_interaction" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.process_without_user_interaction" if id.nil?
  # resource path
  local_var_path = "/transaction/processWithoutUserInteraction".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id
  query_params[:'id'] = 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 = {}

  # 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,
    :auth_names => auth_names,
    :return_type => 'Transaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#process_without_user_interaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read(space_id, id, opts = {}) ⇒ Transaction

Read Reads the entity with the given ‘id’ and returns it.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

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

    the optional parameters

Returns:



909
910
911
912
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 909

def read(space_id, id, opts = {})
  data, _status_code, _headers = read_with_http_info(space_id, id, opts)
  return data
end

#read_with_credentials(credentials, opts = {}) ⇒ Transaction

Read With Credentials Reads the transaction with the given ‘id’ and returns it. This method uses the credentials to authenticate and identify the transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

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

    the optional parameters

Returns:



971
972
973
974
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 971

def read_with_credentials(credentials, opts = {})
  data, _status_code, _headers = read_with_credentials_with_http_info(credentials, opts)
  return data
end

#read_with_credentials_with_http_info(credentials, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Read With Credentials Reads the transaction with the given &#39;id&#39; and returns it. This method uses the credentials to authenticate and identify the transaction.

Parameters:

  • credentials

    The credentials identifies the transaction and contains the security details which grants the access this operation.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 981

def read_with_credentials_with_http_info(credentials, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.read_with_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  fail ArgumentError, "Missing the required parameter 'credentials' when calling TransactionService.read_with_credentials" if credentials.nil?
  # resource path
  local_var_path = "/transaction/readWithCredentials".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'credentials'] = credentials

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Transaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#read_with_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_with_http_info(space_id, id, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Read Reads the entity with the given &#39;id&#39; and returns it.

Parameters:

  • space_id
  • id

    The id of the transaction which should be returned.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 920

def read_with_http_info(space_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.read ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.read" if space_id.nil?
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling TransactionService.read" if id.nil?
  # resource path
  local_var_path = "/transaction/read".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Transaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search(space_id, query, opts = {}) ⇒ Array<Transaction>

Search Searches for the entities as specified by the given query.

Parameters:

  • space_id
  • query

    The query restricts the transactions which are returned by the search.

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

    the optional parameters

Returns:



1030
1031
1032
1033
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 1030

def search(space_id, query, opts = {})
  data, _status_code, _headers = search_with_http_info(space_id, query, opts)
  return data
end

#search_with_http_info(space_id, query, opts = {}) ⇒ Array<(Array<Transaction>, Fixnum, Hash)>

Search Searches for the entities as specified by the given query.

Parameters:

  • space_id
  • query

    The query restricts the transactions which are returned by the search.

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

    the optional parameters

Returns:

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

    Array<Transaction> data, response status code and response headers



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 1041

def search_with_http_info(space_id, query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.search ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.search" if space_id.nil?
  # verify the required parameter 'query' is set
  fail ArgumentError, "Missing the required parameter 'query' when calling TransactionService.search" if query.nil?
  # resource path
  local_var_path = "/transaction/search".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(query)
  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 => 'Array<Transaction>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionService#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update(space_id, entity, opts = {}) ⇒ Transaction

Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The ‘id’ and ‘version’ are required to identify the entity.

Parameters:

  • space_id
  • entity

    The transaction object with the properties which should be updated.

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

    the optional parameters

Returns:



1092
1093
1094
1095
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 1092

def update(space_id, entity, opts = {})
  data, _status_code, _headers = update_with_http_info(space_id, entity, opts)
  return data
end

#update_with_http_info(space_id, entity, opts = {}) ⇒ Array<(Transaction, Fixnum, Hash)>

Update This updates the entity with the given properties. Only those properties which should be updated can be provided. The &#39;id&#39; and &#39;version&#39; are required to identify the entity.

Parameters:

  • space_id
  • entity

    The transaction object with the properties which should be updated.

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

    the optional parameters

Returns:

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

    Transaction data, response status code and response headers



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
# File 'lib/whitelabelmachinename-ruby-sdk/api/transaction_service_api.rb', line 1103

def update_with_http_info(space_id, entity, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TransactionService.update ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionService.update" if space_id.nil?
  # verify the required parameter 'entity' is set
  fail ArgumentError, "Missing the required parameter 'entity' when calling TransactionService.update" if entity.nil?
  # resource path
  local_var_path = "/transaction/update".sub('{format}','json')

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

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  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 = ['application/json;charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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