Class: Komoju::PlatformModelApi

Inherits:
Object
  • Object
show all
Defined in:
lib/komoju-sdk/api/platform_model_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PlatformModelApi

Returns a new instance of PlatformModelApi.



19
20
21
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#balance_transfer(currency, balance_transfer_request, opts = {}) ⇒ Transfer

Balance: Transfer Transfers funds from the currently authenticated merchant’s balance to another associated merchant for the given ‘currency`.

Parameters:

Returns:



28
29
30
31
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 28

def balance_transfer(currency, balance_transfer_request, opts = {})
  data, _status_code, _headers = balance_transfer_with_http_info(currency, balance_transfer_request, opts)
  data
end

#balance_transfer_with_http_info(currency, balance_transfer_request, opts = {}) ⇒ Array<(Transfer, Integer, Hash)>

Balance: Transfer Transfers funds from the currently authenticated merchant&#39;s balance to another associated merchant for the given &#x60;currency&#x60;.

Parameters:

Returns:

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

    Transfer data, response status code and response headers



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

def balance_transfer_with_http_info(currency, balance_transfer_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.balance_transfer ...'
  end
  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.balance_transfer"
  end
  # verify the required parameter 'balance_transfer_request' is set
  if @api_client.config.client_side_validation && balance_transfer_request.nil?
    fail ArgumentError, "Missing the required parameter 'balance_transfer_request' when calling PlatformModelApi.balance_transfer"
  end
  # resource path
  local_var_path = '/balances/{currency}/transfer'.sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(balance_transfer_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Transfer'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.balance_transfer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#balance_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_file(merchant_id, create_file_request, opts = {}) ⇒ MerchantFile

File: Create Creates a new file for the current merchant.

Parameters:

  • merchant_id (String)
  • create_file_request (CreateFileRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



102
103
104
105
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 102

def create_file(merchant_id, create_file_request, opts = {})
  data, _status_code, _headers = create_file_with_http_info(merchant_id, create_file_request, opts)
  data
end

#create_file_with_http_info(merchant_id, create_file_request, opts = {}) ⇒ Array<(MerchantFile, Integer, Hash)>

File: Create Creates a new file for the current merchant.

Parameters:

  • merchant_id (String)
  • create_file_request (CreateFileRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    MerchantFile data, response status code and response headers



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 113

def create_file_with_http_info(merchant_id, create_file_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_file ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.create_file"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_file, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_file, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'create_file_request' is set
  if @api_client.config.client_side_validation && create_file_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_file_request' when calling PlatformModelApi.create_file"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/files'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_file_request)

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantFile'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.create_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#create_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_merchant(create_merchant_request, opts = {}) ⇒ SerializedSubmerchant

Merchant: Create Creates a new merchant.

Parameters:

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

    the optional parameters

Returns:



183
184
185
186
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 183

def create_merchant(create_merchant_request, opts = {})
  data, _status_code, _headers = create_merchant_with_http_info(create_merchant_request, opts)
  data
end

#create_merchant_balance_transfer(merchant_id, currency, create_merchant_balance_transfer_request, opts = {}) ⇒ BalanceTransferServiceRecord

Balance: Transfer Creates a balance transfer between associated merchants for a given ‘amount` and `currency`.

Parameters:

Returns:



253
254
255
256
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 253

def create_merchant_balance_transfer(merchant_id, currency, create_merchant_balance_transfer_request, opts = {})
  data, _status_code, _headers = create_merchant_balance_transfer_with_http_info(merchant_id, currency, create_merchant_balance_transfer_request, opts)
  data
end

#create_merchant_balance_transfer_with_http_info(merchant_id, currency, create_merchant_balance_transfer_request, opts = {}) ⇒ Array<(BalanceTransferServiceRecord, Integer, Hash)>

Balance: Transfer Creates a balance transfer between associated merchants for a given &#x60;amount&#x60; and &#x60;currency&#x60;.

Parameters:

Returns:



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
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
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 265

def create_merchant_balance_transfer_with_http_info(merchant_id, currency, create_merchant_balance_transfer_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_merchant_balance_transfer ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.create_merchant_balance_transfer"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_merchant_balance_transfer, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_merchant_balance_transfer, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.create_merchant_balance_transfer"
  end
  # verify the required parameter 'create_merchant_balance_transfer_request' is set
  if @api_client.config.client_side_validation && create_merchant_balance_transfer_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_merchant_balance_transfer_request' when calling PlatformModelApi.create_merchant_balance_transfer"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}/transfer'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_merchant_balance_transfer_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BalanceTransferServiceRecord'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.create_merchant_balance_transfer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#create_merchant_balance_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_merchant_with_http_info(create_merchant_request, opts = {}) ⇒ Array<(SerializedSubmerchant, Integer, Hash)>

Merchant: Create Creates a new merchant.

Parameters:

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

    the optional parameters

Returns:

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

    SerializedSubmerchant data, response status code and response headers



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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 193

def create_merchant_with_http_info(create_merchant_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_merchant ...'
  end
  # verify the required parameter 'create_merchant_request' is set
  if @api_client.config.client_side_validation && create_merchant_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_merchant_request' when calling PlatformModelApi.create_merchant"
  end
  # resource path
  local_var_path = '/merchants'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_merchant_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SerializedSubmerchant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.create_merchant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#create_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_merchant_balance_settings(merchant_id, currency, edit_merchant_balance_settings_request, opts = {}) ⇒ MerchantBalance

Balances: Edit Settings Given a currency, edit the payout settings of the currently authenticated merchant or one of its sub-merchants.

Parameters:

Returns:



341
342
343
344
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 341

def edit_merchant_balance_settings(merchant_id, currency, edit_merchant_balance_settings_request, opts = {})
  data, _status_code, _headers = edit_merchant_balance_settings_with_http_info(merchant_id, currency, edit_merchant_balance_settings_request, opts)
  data
end

#edit_merchant_balance_settings_with_http_info(merchant_id, currency, edit_merchant_balance_settings_request, opts = {}) ⇒ Array<(MerchantBalance, Integer, Hash)>

Balances: Edit Settings Given a currency, edit the payout settings of the currently authenticated merchant or one of its sub-merchants.

Parameters:

Returns:

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

    MerchantBalance data, response status code and response headers



353
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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 353

def edit_merchant_balance_settings_with_http_info(merchant_id, currency, edit_merchant_balance_settings_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.edit_merchant_balance_settings ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.edit_merchant_balance_settings"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.edit_merchant_balance_settings, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.edit_merchant_balance_settings, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.edit_merchant_balance_settings"
  end
  # verify the required parameter 'edit_merchant_balance_settings_request' is set
  if @api_client.config.client_side_validation && edit_merchant_balance_settings_request.nil?
    fail ArgumentError, "Missing the required parameter 'edit_merchant_balance_settings_request' when calling PlatformModelApi.edit_merchant_balance_settings"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}/settings'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_merchant_balance_settings_request)

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantBalance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.edit_merchant_balance_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#edit_merchant_balance_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_live_application_payment_methods(merchant_id, opts = {}) ⇒ PaymentMethodsList

Live Application: Payment Methods List submitted/unsubmitted payment methods

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



428
429
430
431
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 428

def list_live_application_payment_methods(merchant_id, opts = {})
  data, _status_code, _headers = list_live_application_payment_methods_with_http_info(merchant_id, opts)
  data
end

#list_live_application_payment_methods_with_http_info(merchant_id, opts = {}) ⇒ Array<(PaymentMethodsList, Integer, Hash)>

Live Application: Payment Methods List submitted/unsubmitted payment methods

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PaymentMethodsList data, response status code and response headers



439
440
441
442
443
444
445
446
447
448
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
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 439

def list_live_application_payment_methods_with_http_info(merchant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_live_application_payment_methods ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_live_application_payment_methods"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_live_application_payment_methods, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_live_application_payment_methods, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/live_application/{merchant_id}/payment_methods'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PaymentMethodsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.list_live_application_payment_methods",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#list_live_application_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_merchants(opts = {}) ⇒ SubmerchantsList

Merchant: List Retrieves a paginated list of sub-merchants. Results can be filtered by ‘live` status, `platform_role`, account `status`, and whether payments or payouts are enabled.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :live (Boolean)
  • :platform_role (MerchantRole)
  • :status (String)
  • :payments_enabled (Boolean)
  • :payouts_enabled (Boolean)

Returns:



509
510
511
512
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 509

def list_merchants(opts = {})
  data, _status_code, _headers = list_merchants_with_http_info(opts)
  data
end

#list_merchants_with_http_info(opts = {}) ⇒ Array<(SubmerchantsList, Integer, Hash)>

Merchant: List Retrieves a paginated list of sub-merchants. Results can be filtered by &#x60;live&#x60; status, &#x60;platform_role&#x60;, account &#x60;status&#x60;, and whether payments or payouts are enabled.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :live (Boolean)
  • :platform_role (MerchantRole)
  • :status (String)
  • :payments_enabled (Boolean)
  • :payouts_enabled (Boolean)

Returns:

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

    SubmerchantsList data, response status code and response headers



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
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 527

def list_merchants_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_merchants ...'
  end
  # resource path
  local_var_path = '/merchants'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
  query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'live'] = opts[:'live'] if !opts[:'live'].nil?
  query_params[:'platform_role'] = opts[:'platform_role'] if !opts[:'platform_role'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'payments_enabled'] = opts[:'payments_enabled'] if !opts[:'payments_enabled'].nil?
  query_params[:'payouts_enabled'] = opts[:'payouts_enabled'] if !opts[:'payouts_enabled'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SubmerchantsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.list_merchants",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#list_merchants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_submerchant_payments(merchant_id, opts = {}) ⇒ PlatformMerchantPaymentList

Payment: List for Merchant Retrieves a paginated list of payments. Pagination can be configured with ‘page` and `per_page` parameters. Payments can be filtered by `currency`, `external_order_num`, and `status`. A time range can be specified with `start_time`, and `end_time`.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :currency (Currency)
  • :external_order_num (String)
  • :status (PaymentStatus)

Returns:



592
593
594
595
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 592

def list_submerchant_payments(merchant_id, opts = {})
  data, _status_code, _headers = list_submerchant_payments_with_http_info(merchant_id, opts)
  data
end

#list_submerchant_payments_with_http_info(merchant_id, opts = {}) ⇒ Array<(PlatformMerchantPaymentList, Integer, Hash)>

Payment: List for Merchant Retrieves a paginated list of payments. Pagination can be configured with &#x60;page&#x60; and &#x60;per_page&#x60; parameters. Payments can be filtered by &#x60;currency&#x60;, &#x60;external_order_num&#x60;, and &#x60;status&#x60;. A time range can be specified with &#x60;start_time&#x60;, and &#x60;end_time&#x60;.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :currency (Currency)
  • :external_order_num (String)
  • :status (PaymentStatus)

Returns:

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

    PlatformMerchantPaymentList data, response status code and response headers



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
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 609

def list_submerchant_payments_with_http_info(merchant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_submerchant_payments ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_submerchant_payments"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_payments, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_payments, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/merchants/{merchant_id}/payments'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
  query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
  query_params[:'external_order_num'] = opts[:'external_order_num'] if !opts[:'external_order_num'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PlatformMerchantPaymentList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.list_submerchant_payments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#list_submerchant_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_submerchant_settlements(merchant_id, opts = {}) ⇒ SettlementList

Settlement: List Lists out past settlements from most-recent to least-recent.

Parameters:

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

    the optional parameters

Returns:



677
678
679
680
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 677

def list_submerchant_settlements(merchant_id, opts = {})
  data, _status_code, _headers = list_submerchant_settlements_with_http_info(merchant_id, opts)
  data
end

#list_submerchant_settlements_with_http_info(merchant_id, opts = {}) ⇒ Array<(SettlementList, Integer, Hash)>

Settlement: List Lists out past settlements from most-recent to least-recent.

Parameters:

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

    the optional parameters

Returns:

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

    SettlementList data, response status code and response headers



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
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 687

def list_submerchant_settlements_with_http_info(merchant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_submerchant_settlements ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_submerchant_settlements"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_settlements, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_settlements, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/merchants/{merchant_id}/settlements'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SettlementList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.list_submerchant_settlements",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#list_submerchant_settlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#merchant_balance_transactions(merchant_id, currency, opts = {}) ⇒ BalanceTransactionList

Balance: Transactions Given a currency, view the ledger transactions of the currently authenticated merchant or one of its sub-merchants. Will split ledger transactions into line items when appropriate.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :type (String)

Returns:



754
755
756
757
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 754

def merchant_balance_transactions(merchant_id, currency, opts = {})
  data, _status_code, _headers = merchant_balance_transactions_with_http_info(merchant_id, currency, opts)
  data
end

#merchant_balance_transactions_with_http_info(merchant_id, currency, opts = {}) ⇒ Array<(BalanceTransactionList, Integer, Hash)>

Balance: Transactions Given a currency, view the ledger transactions of the currently authenticated merchant or one of its sub-merchants. Will split ledger transactions into line items when appropriate.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_time (Time)

    Query for records created after this time.

  • :end_time (Time)

    Query for records created before this time.

  • :per_page (Integer)

    How many objects per page.

  • :page (Integer)

    Page number to query for.

  • :type (String)

Returns:

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

    BalanceTransactionList data, response status code and response headers



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
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
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 770

def merchant_balance_transactions_with_http_info(merchant_id, currency, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.merchant_balance_transactions ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.merchant_balance_transactions"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.merchant_balance_transactions, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.merchant_balance_transactions, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.merchant_balance_transactions"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}/transactions'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
  query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BalanceTransactionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.merchant_balance_transactions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#merchant_balance_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_file(merchant_id, id, opts = {}) ⇒ MerchantFile

File: Show Retrieves an existing file of the current merchant.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



841
842
843
844
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 841

def show_file(merchant_id, id, opts = {})
  data, _status_code, _headers = show_file_with_http_info(merchant_id, id, opts)
  data
end

#show_file_with_http_info(merchant_id, id, opts = {}) ⇒ Array<(MerchantFile, Integer, Hash)>

File: Show Retrieves an existing file of the current merchant.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    MerchantFile data, response status code and response headers



852
853
854
855
856
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
902
903
904
905
906
907
908
909
910
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 852

def show_file_with_http_info(merchant_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_file ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_file"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_file, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_file, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_file"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/files/{id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantFile'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_live_application(merchant_id, opts = {}) ⇒ LiveApplicationWithSubmittedFields

Live Application: Show Shows the live application status of the applicant merchant

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



918
919
920
921
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 918

def show_live_application(merchant_id, opts = {})
  data, _status_code, _headers = show_live_application_with_http_info(merchant_id, opts)
  data
end

#show_live_application_payment_method(merchant_id, payment_method, opts = {}) ⇒ LiveApplicationWithSubmittedFields

Live Application: Show Payment Method Shows the payment method status of the applicant merchant

Parameters:

  • merchant_id (String)
  • payment_method (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



993
994
995
996
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 993

def show_live_application_payment_method(merchant_id, payment_method, opts = {})
  data, _status_code, _headers = show_live_application_payment_method_with_http_info(merchant_id, payment_method, opts)
  data
end

#show_live_application_payment_method_with_http_info(merchant_id, payment_method, opts = {}) ⇒ Array<(LiveApplicationWithSubmittedFields, Integer, Hash)>

Live Application: Show Payment Method Shows the payment method status of the applicant merchant

Parameters:

  • merchant_id (String)
  • payment_method (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1005

def show_live_application_payment_method_with_http_info(merchant_id, payment_method, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_live_application_payment_method ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_live_application_payment_method"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application_payment_method, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application_payment_method, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'payment_method' is set
  if @api_client.config.client_side_validation && payment_method.nil?
    fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.show_live_application_payment_method"
  end
  # resource path
  local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LiveApplicationWithSubmittedFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_live_application_payment_method",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_live_application_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_live_application_with_http_info(merchant_id, opts = {}) ⇒ Array<(LiveApplicationWithSubmittedFields, Integer, Hash)>

Live Application: Show Shows the live application status of the applicant merchant

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 929

def show_live_application_with_http_info(merchant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_live_application ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_live_application"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/live_application/{merchant_id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LiveApplicationWithSubmittedFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_live_application",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_live_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_merchant(id, opts = {}) ⇒ SerializedSubmerchant

Merchant: Show Retrieves the details of a sub-merchant by its ‘id`, including account settings, payout configuration, and live status.

Parameters:

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

    the optional parameters

Returns:



1071
1072
1073
1074
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1071

def show_merchant(id, opts = {})
  data, _status_code, _headers = show_merchant_with_http_info(id, opts)
  data
end

#show_merchant_balance(merchant_id, currency, opts = {}) ⇒ BalanceShow

Balance: Show Given a currency, view the unsettled balance of the currently authenticated merchant or one of its sub-merchants.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1143
1144
1145
1146
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1143

def show_merchant_balance(merchant_id, currency, opts = {})
  data, _status_code, _headers = show_merchant_balance_with_http_info(merchant_id, currency, opts)
  data
end

#show_merchant_balance_settings(merchant_id, currency, opts = {}) ⇒ BalanceSettings

Balance: Show Settings Given a currency, view the payout settings of the currently authenticated merchant or one of its sub-merchants.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1220
1221
1222
1223
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1220

def show_merchant_balance_settings(merchant_id, currency, opts = {})
  data, _status_code, _headers = show_merchant_balance_settings_with_http_info(merchant_id, currency, opts)
  data
end

#show_merchant_balance_settings_with_http_info(merchant_id, currency, opts = {}) ⇒ Array<(BalanceSettings, Integer, Hash)>

Balance: Show Settings Given a currency, view the payout settings of the currently authenticated merchant or one of its sub-merchants.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BalanceSettings data, response status code and response headers



1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1231

def show_merchant_balance_settings_with_http_info(merchant_id, currency, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance_settings ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance_settings"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_settings, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_settings, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance_settings"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}/settings'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BalanceSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_merchant_balance_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_merchant_balance_transaction(merchant_id, currency, transaction_uuid, opts = {}) ⇒ Array<Transaction>

Balance: Transaction Given a currency and a transaction UUID, view the corresponding ledger transaction of the currently authenticated merchant or one of its sub-merchants. Will return one entry per line item of the transaction.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • transaction_uuid (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1298
1299
1300
1301
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1298

def show_merchant_balance_transaction(merchant_id, currency, transaction_uuid, opts = {})
  data, _status_code, _headers = show_merchant_balance_transaction_with_http_info(merchant_id, currency, transaction_uuid, opts)
  data
end

#show_merchant_balance_transaction_with_http_info(merchant_id, currency, transaction_uuid, opts = {}) ⇒ Array<(Array<Transaction>, Integer, Hash)>

Balance: Transaction Given a currency and a transaction UUID, view the corresponding ledger transaction of the currently authenticated merchant or one of its sub-merchants. Will return one entry per line item of the transaction.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • transaction_uuid (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

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



1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1310

def show_merchant_balance_transaction_with_http_info(merchant_id, currency, transaction_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance_transaction ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance_transaction"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance_transaction"
  end
  # verify the required parameter 'transaction_uuid' is set
  if @api_client.config.client_side_validation && transaction_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_uuid' when calling PlatformModelApi.show_merchant_balance_transaction"
  end
  if @api_client.config.client_side_validation && transaction_uuid.to_s.length > 25
    fail ArgumentError, 'invalid value for "transaction_uuid" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && transaction_uuid.to_s.length < 25
    fail ArgumentError, 'invalid value for "transaction_uuid" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}/transactions/{transaction_uuid}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s)).sub('{' + 'transaction_uuid' + '}', CGI.escape(transaction_uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Transaction>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_merchant_balance_transaction",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_merchant_balance_with_http_info(merchant_id, currency, opts = {}) ⇒ Array<(BalanceShow, Integer, Hash)>

Balance: Show Given a currency, view the unsettled balance of the currently authenticated merchant or one of its sub-merchants.

Parameters:

  • merchant_id (String)
  • currency (Currency)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BalanceShow data, response status code and response headers



1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1154

def show_merchant_balance_with_http_info(merchant_id, currency, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'currency' is set
  if @api_client.config.client_side_validation && currency.nil?
    fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/balances/{currency}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BalanceShow'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_merchant_balance",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_merchant_with_http_info(id, opts = {}) ⇒ Array<(SerializedSubmerchant, Integer, Hash)>

Merchant: Show Retrieves the details of a sub-merchant by its &#x60;id&#x60;, including account settings, payout configuration, and live status.

Parameters:

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

    the optional parameters

Returns:

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

    SerializedSubmerchant data, response status code and response headers



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
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
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1081

def show_merchant_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_merchant"
  end
  if @api_client.config.client_side_validation && id.to_s.length > 25
    fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.show_merchant, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && id.to_s.length < 25
    fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.show_merchant, the character length must be great than or equal to 25.'
  end

  # resource path
  local_var_path = '/merchants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SerializedSubmerchant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_merchant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_submerchant_settlement(merchant_id, id, opts = {}) ⇒ SettlementShow

Settlement: Show View a settlement given an ‘id`.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1388
1389
1390
1391
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1388

def show_submerchant_settlement(merchant_id, id, opts = {})
  data, _status_code, _headers = show_submerchant_settlement_with_http_info(merchant_id, id, opts)
  data
end

#show_submerchant_settlement_with_http_info(merchant_id, id, opts = {}) ⇒ Array<(SettlementShow, Integer, Hash)>

Settlement: Show View a settlement given an &#x60;id&#x60;.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    SettlementShow data, response status code and response headers



1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1399

def show_submerchant_settlement_with_http_info(merchant_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_submerchant_settlement ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_submerchant_settlement"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_submerchant_settlement, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_submerchant_settlement, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_submerchant_settlement"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/settlements/{id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SettlementShow'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.show_submerchant_settlement",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#show_submerchant_settlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#simulate_live_application_payment_method_status(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {}) ⇒ PaymentMethodStatus

Live Application: Simulate Payment Method Status Simulate status change on payment method for test merchants

Parameters:

Returns:



1466
1467
1468
1469
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1466

def simulate_live_application_payment_method_status(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {})
  data, _status_code, _headers = simulate_live_application_payment_method_status_with_http_info(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts)
  data
end

#simulate_live_application_payment_method_status_with_http_info(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {}) ⇒ Array<(PaymentMethodStatus, Integer, Hash)>

Live Application: Simulate Payment Method Status Simulate status change on payment method for test merchants

Parameters:

Returns:

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

    PaymentMethodStatus data, response status code and response headers



1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1478

def simulate_live_application_payment_method_status_with_http_info(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.simulate_live_application_payment_method_status ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.simulate_live_application_payment_method_status"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_payment_method_status, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_payment_method_status, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'payment_method' is set
  if @api_client.config.client_side_validation && payment_method.nil?
    fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.simulate_live_application_payment_method_status"
  end
  # verify the required parameter 'simulate_live_application_payment_method_status_request' is set
  if @api_client.config.client_side_validation && simulate_live_application_payment_method_status_request.nil?
    fail ArgumentError, "Missing the required parameter 'simulate_live_application_payment_method_status_request' when calling PlatformModelApi.simulate_live_application_payment_method_status"
  end
  # resource path
  local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}/simulate_status'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(simulate_live_application_payment_method_status_request)

  # return_type
  return_type = opts[:debug_return_type] || 'PaymentMethodStatus'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.simulate_live_application_payment_method_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#simulate_live_application_payment_method_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#simulate_live_application_status(merchant_id, simulate_live_application_payment_method_status_request, opts = {}) ⇒ MerchantSubmissionStatus

Live Application: Simulate Status Simulate status change on applications for test merchants. In order for status to be changed to "accepted," at least one payment method must be approved.

Parameters:

Returns:



1553
1554
1555
1556
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1553

def simulate_live_application_status(merchant_id, simulate_live_application_payment_method_status_request, opts = {})
  data, _status_code, _headers = simulate_live_application_status_with_http_info(merchant_id, simulate_live_application_payment_method_status_request, opts)
  data
end

#simulate_live_application_status_with_http_info(merchant_id, simulate_live_application_payment_method_status_request, opts = {}) ⇒ Array<(MerchantSubmissionStatus, Integer, Hash)>

Live Application: Simulate Status Simulate status change on applications for test merchants. In order for status to be changed to &quot;accepted,&quot; at least one payment method must be approved.

Parameters:

Returns:

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

    MerchantSubmissionStatus data, response status code and response headers



1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1564

def simulate_live_application_status_with_http_info(merchant_id, simulate_live_application_payment_method_status_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.simulate_live_application_status ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.simulate_live_application_status"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_status, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_status, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'simulate_live_application_payment_method_status_request' is set
  if @api_client.config.client_side_validation && simulate_live_application_payment_method_status_request.nil?
    fail ArgumentError, "Missing the required parameter 'simulate_live_application_payment_method_status_request' when calling PlatformModelApi.simulate_live_application_status"
  end
  # resource path
  local_var_path = '/live_application/{merchant_id}/simulate_status'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(simulate_live_application_payment_method_status_request)

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantSubmissionStatus'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.simulate_live_application_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#simulate_live_application_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submerchant_settlement_csv(merchant_id, id, opts = {}) ⇒ nil

Settlement: CSV View a settlement in CSV format given an ‘id`.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1635
1636
1637
1638
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1635

def submerchant_settlement_csv(merchant_id, id, opts = {})
  submerchant_settlement_csv_with_http_info(merchant_id, id, opts)
  nil
end

#submerchant_settlement_csv_with_http_info(merchant_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Settlement: CSV View a settlement in CSV format given an &#x60;id&#x60;.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1646

def submerchant_settlement_csv_with_http_info(merchant_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_csv ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_csv"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_csv, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_csv, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_csv"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/settlements/{id}/csv'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.submerchant_settlement_csv",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submerchant_settlement_pdf(merchant_id, id, opts = {}) ⇒ nil

Settlement: PDF View a settlement in PDF format given an ‘id`.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1710
1711
1712
1713
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1710

def submerchant_settlement_pdf(merchant_id, id, opts = {})
  submerchant_settlement_pdf_with_http_info(merchant_id, id, opts)
  nil
end

#submerchant_settlement_pdf_with_http_info(merchant_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Settlement: PDF View a settlement in PDF format given an &#x60;id&#x60;.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1721

def submerchant_settlement_pdf_with_http_info(merchant_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_pdf ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_pdf"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_pdf, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_pdf, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_pdf"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/settlements/{id}/pdf'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.submerchant_settlement_pdf",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submerchant_settlement_xls(merchant_id, id, opts = {}) ⇒ nil

Settlement: XLS View a settlement in XLS format given an ‘id`.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1785
1786
1787
1788
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1785

def submerchant_settlement_xls(merchant_id, id, opts = {})
  submerchant_settlement_xls_with_http_info(merchant_id, id, opts)
  nil
end

#submerchant_settlement_xls_with_http_info(merchant_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Settlement: XLS View a settlement in XLS format given an &#x60;id&#x60;.

Parameters:

  • merchant_id (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1796

def submerchant_settlement_xls_with_http_info(merchant_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_xls ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_xls"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_xls, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_xls, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_xls"
  end
  # resource path
  local_var_path = '/merchants/{merchant_id}/settlements/{id}/xls'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.submerchant_settlement_xls",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_live_application(merchant_id, live_application_request, opts = {}) ⇒ LiveApplication

Live Application: Update Updates the live application for the applicant merchant

Parameters:

  • merchant_id (String)
  • live_application_request (LiveApplicationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1860
1861
1862
1863
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1860

def update_live_application(merchant_id, live_application_request, opts = {})
  data, _status_code, _headers = update_live_application_with_http_info(merchant_id, live_application_request, opts)
  data
end

#update_live_application_payment_method(merchant_id, payment_method, update_payment_method_request, opts = {}) ⇒ LiveApplication

Live Application: Update Payment Method Update the payment method application of the applicant merchant

Parameters:

  • merchant_id (String)
  • payment_method (String)
  • update_payment_method_request (UpdatePaymentMethodRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1943
1944
1945
1946
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1943

def update_live_application_payment_method(merchant_id, payment_method, update_payment_method_request, opts = {})
  data, _status_code, _headers = update_live_application_payment_method_with_http_info(merchant_id, payment_method, update_payment_method_request, opts)
  data
end

#update_live_application_payment_method_with_http_info(merchant_id, payment_method, update_payment_method_request, opts = {}) ⇒ Array<(LiveApplication, Integer, Hash)>

Live Application: Update Payment Method Update the payment method application of the applicant merchant

Parameters:

  • merchant_id (String)
  • payment_method (String)
  • update_payment_method_request (UpdatePaymentMethodRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LiveApplication data, response status code and response headers



1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1955

def update_live_application_payment_method_with_http_info(merchant_id, payment_method, update_payment_method_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_live_application_payment_method ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.update_live_application_payment_method"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application_payment_method, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application_payment_method, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'payment_method' is set
  if @api_client.config.client_side_validation && payment_method.nil?
    fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.update_live_application_payment_method"
  end
  # verify the required parameter 'update_payment_method_request' is set
  if @api_client.config.client_side_validation && update_payment_method_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_payment_method_request' when calling PlatformModelApi.update_live_application_payment_method"
  end
  # resource path
  local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_payment_method_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LiveApplication'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.update_live_application_payment_method",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#update_live_application_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_live_application_with_http_info(merchant_id, live_application_request, opts = {}) ⇒ Array<(LiveApplication, Integer, Hash)>

Live Application: Update Updates the live application for the applicant merchant

Parameters:

  • merchant_id (String)
  • live_application_request (LiveApplicationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LiveApplication data, response status code and response headers



1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 1871

def update_live_application_with_http_info(merchant_id, live_application_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_live_application ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.update_live_application"
  end
  if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
    fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'live_application_request' is set
  if @api_client.config.client_side_validation && live_application_request.nil?
    fail ArgumentError, "Missing the required parameter 'live_application_request' when calling PlatformModelApi.update_live_application"
  end
  # resource path
  local_var_path = '/live_application/{merchant_id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(live_application_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LiveApplication'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.update_live_application",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#update_live_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_merchant(id, update_merchant_request, opts = {}) ⇒ SerializedSubmerchant

Merchant: Update Updates a sub-merchant’s settings, including payment and payout toggles, email notification preferences, and payment method expiry settings.

Parameters:

  • id (String)
  • update_merchant_request (UpdateMerchantRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2030
2031
2032
2033
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 2030

def update_merchant(id, update_merchant_request, opts = {})
  data, _status_code, _headers = update_merchant_with_http_info(id, update_merchant_request, opts)
  data
end

#update_merchant_with_http_info(id, update_merchant_request, opts = {}) ⇒ Array<(SerializedSubmerchant, Integer, Hash)>

Merchant: Update Updates a sub-merchant&#39;s settings, including payment and payout toggles, email notification preferences, and payment method expiry settings.

Parameters:

  • id (String)
  • update_merchant_request (UpdateMerchantRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    SerializedSubmerchant data, response status code and response headers



2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
# File 'lib/komoju-sdk/api/platform_model_api.rb', line 2041

def update_merchant_with_http_info(id, update_merchant_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_merchant ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.update_merchant"
  end
  if @api_client.config.client_side_validation && id.to_s.length > 25
    fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.update_merchant, the character length must be smaller than or equal to 25.'
  end

  if @api_client.config.client_side_validation && id.to_s.length < 25
    fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.update_merchant, the character length must be great than or equal to 25.'
  end

  # verify the required parameter 'update_merchant_request' is set
  if @api_client.config.client_side_validation && update_merchant_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_merchant_request' when calling PlatformModelApi.update_merchant"
  end
  # resource path
  local_var_path = '/merchants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_merchant_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SerializedSubmerchant'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"PlatformModelApi.update_merchant",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlatformModelApi#update_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end