Class: TreezorClient::PayinApi

Inherits:
Object
  • Object
show all
Defined in:
lib/treezor_client/api/payin_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PayinApi

Returns a new instance of PayinApi.



19
20
21
# File 'lib/treezor_client/api/payin_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/treezor_client/api/payin_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_payin(id, opts = {}) ⇒ InlineResponse20017

delete a pay in Deactivate a payin in the system.

Parameters:

  • id

    Payin's id.

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/treezor_client/api/payin_api.rb', line 27

def delete_payin(id, opts = {})
  data, _status_code, _headers = delete_payin_with_http_info(id, opts)
  data
end

#delete_payin_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20017, Fixnum, Hash)>

delete a pay in Deactivate a payin in the system.

Parameters:

  • id

    Payin&#39;s id.

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

    the optional parameters

Returns:

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

    InlineResponse20017 data, response status code and response headers



37
38
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
# File 'lib/treezor_client/api/payin_api.rb', line 37

def delete_payin_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayinApi.delete_payin ...'
  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 PayinApi.delete_payin"
  end
  # resource path
  local_var_path = '/payins/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

#get_payin(id, opts = {}) ⇒ InlineResponse20017

get a pay in Get a payin from the system by its id.

Parameters:

  • id

    Payin&#39;s id.

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

    the optional parameters

Returns:



81
82
83
84
# File 'lib/treezor_client/api/payin_api.rb', line 81

def get_payin(id, opts = {})
  data, _status_code, _headers = get_payin_with_http_info(id, opts)
  data
end

#get_payin_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20017, Fixnum, Hash)>

get a pay in Get a payin from the system by its id.

Parameters:

  • id

    Payin&#39;s id.

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

    the optional parameters

Returns:

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

    InlineResponse20017 data, response status code and response headers



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/treezor_client/api/payin_api.rb', line 91

def get_payin_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayinApi.get_payin ...'
  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 PayinApi.get_payin"
  end
  # resource path
  local_var_path = '/payins/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

#get_payins(opts = {}) ⇒ InlineResponse20017

search pay ins Get payins that match search criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (Integer)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :payin_id (Integer)

    Payin&#39;s id.

  • :wallet_id (Integer)

    Payin&#39;s wallet id.

  • :payin_tag (String)

    Client custom data.

  • :payin_status (String)

    Payins&#39;s status.

  • :user_id (Integer)

    User&#39;s id who performed the operation (debited).

  • :user_name (String)

    User&#39;s name who performed the operation (debited).

  • :user_email (String)

    User&#39;s email who performed the operation (debited).

  • :beneficiary_user_id (Integer)

    User&#39;s id who received the operation (credited).

  • :event_alias (String)

    Wallet eventAlias of the payin (credited wallet).

  • :wallet_type_id (Integer)

    Payin&#39;s wallet type id.

  • :payment_method_id (String)

    Payin&#39;s payment method id.

  • :created_date_from (DateTime)

    The creation date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :created_date_to (DateTime)

    The creation date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :updated_date_from (DateTime)

    The modification date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :updated_date_to (DateTime)

    The modification date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :page_number (Integer)

    Pagination page number. More info [here](agent.treezor.com/lists).

  • :page_count (Integer)

    The number of items per page. More info [here](agent.treezor.com/lists).

  • :sort_by (String)

    The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists).

  • :sort_order (String)

    The order you want to sort the list. * DESC for a descending sort * ASC for a ascending sort. Default value : DESC. More info [here](agent.treezor.com/lists).

Returns:



157
158
159
160
# File 'lib/treezor_client/api/payin_api.rb', line 157

def get_payins(opts = {})
  data, _status_code, _headers = get_payins_with_http_info(opts)
  data
end

#get_payins_with_http_info(opts = {}) ⇒ Array<(InlineResponse20017, Fixnum, Hash)>

search pay ins Get payins that match search criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (Integer)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :payin_id (Integer)

    Payin&#39;s id.

  • :wallet_id (Integer)

    Payin&#39;s wallet id.

  • :payin_tag (String)

    Client custom data.

  • :payin_status (String)

    Payins&#39;s status.

  • :user_id (Integer)

    User&#39;s id who performed the operation (debited).

  • :user_name (String)

    User&#39;s name who performed the operation (debited).

  • :user_email (String)

    User&#39;s email who performed the operation (debited).

  • :beneficiary_user_id (Integer)

    User&#39;s id who received the operation (credited).

  • :event_alias (String)

    Wallet eventAlias of the payin (credited wallet).

  • :wallet_type_id (Integer)

    Payin&#39;s wallet type id.

  • :payment_method_id (String)

    Payin&#39;s payment method id.

  • :created_date_from (DateTime)

    The creation date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :created_date_to (DateTime)

    The creation date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :updated_date_from (DateTime)

    The modification date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :updated_date_to (DateTime)

    The modification date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists)

  • :page_number (Integer)

    Pagination page number. More info [here](agent.treezor.com/lists).

  • :page_count (Integer)

    The number of items per page. More info [here](agent.treezor.com/lists).

  • :sort_by (String)

    The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists).

  • :sort_order (String)

    The order you want to sort the list. * DESC for a descending sort * ASC for a ascending sort. Default value : DESC. More info [here](agent.treezor.com/lists).

Returns:

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

    InlineResponse20017 data, response status code and response headers



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/treezor_client/api/payin_api.rb', line 189

def get_payins_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayinApi.get_payins ...'
  end
  # resource path
  local_var_path = '/payins'

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIP'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
  query_params[:'payinId'] = opts[:'payin_id'] if !opts[:'payin_id'].nil?
  query_params[:'walletId'] = opts[:'wallet_id'] if !opts[:'wallet_id'].nil?
  query_params[:'payinTag'] = opts[:'payin_tag'] if !opts[:'payin_tag'].nil?
  query_params[:'payinStatus'] = opts[:'payin_status'] if !opts[:'payin_status'].nil?
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'userName'] = opts[:'user_name'] if !opts[:'user_name'].nil?
  query_params[:'userEmail'] = opts[:'user_email'] if !opts[:'user_email'].nil?
  query_params[:'beneficiaryUserId'] = opts[:'beneficiary_user_id'] if !opts[:'beneficiary_user_id'].nil?
  query_params[:'eventAlias'] = opts[:'event_alias'] if !opts[:'event_alias'].nil?
  query_params[:'walletTypeId'] = opts[:'wallet_type_id'] if !opts[:'wallet_type_id'].nil?
  query_params[:'paymentMethodId'] = opts[:'payment_method_id'] if !opts[:'payment_method_id'].nil?
  query_params[:'createdDateFrom'] = opts[:'created_date_from'] if !opts[:'created_date_from'].nil?
  query_params[:'createdDateTo'] = opts[:'created_date_to'] if !opts[:'created_date_to'].nil?
  query_params[:'updatedDateFrom'] = opts[:'updated_date_from'] if !opts[:'updated_date_from'].nil?
  query_params[:'updatedDateTo'] = opts[:'updated_date_to'] if !opts[:'updated_date_to'].nil?
  query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?

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

  # form parameters
  form_params = {}

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

#post_payin(wallet_id, payment_method_id, amount, currency, opts = {}) ⇒ InlineResponse20017

create a pay in Create a new pay in in the system.

Parameters:

  • wallet_id

    Credited wallet&#39;s ID

  • payment_method_id

    | Id | Payment by | | —| — | | 3 | Check | | 11 | Card | | 14 | Oneclick card (without payment form) | | 21 | Sepa Direct Debit Core | | 23 | Full Hosted HTML Payment Form. Please note that if you use this paymentMethodId the flieds paymentAcceptedUrl, paymentRefusedUrl, paymentWaitingUrl, paymentCanceledUrl and paymentExceptionUrl are mandatory. CSS of the payment page can be customized | | 24 | IFrame Payment Form. Please note that if you use this paymentMethodId the flieds paymentAcceptedUrl, paymentRefusedUrl, paymentWaitingUrl, paymentCanceledUrl and paymentExceptionUrl are mandatory. CSS of the payment page can be customized| | 25 | Payment made through an SDK - You cannot directly create a payin directly with this method id. The payin will be automatically created by the system. |

  • amount

    Pay in amount.

  • currency

    Payin currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). Must be the same as the wallet&#39;s.

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (String)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :payin_tag (String)

    Client custom data.

  • :user_id (Integer)

    User&#39;s id who makes the pay in. Required unless paymentMethodId &#x3D; 21. NB : this parameter should should not be transmitted in the case of payin of method Sepa Direct Debit Core (21). It will be set automatically by the system.

  • :oneclickcard_id (Integer)

    Oneclick card&#39;s id. Mandatory if payment method is 14. Useless otherwise.

  • :payment_accepted_url (String)

    Url where cardholder is redirected if payment is successful. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_waiting_url (String)

    Url where cardholder is redirected to wait payment processing. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_refused_url (String)

    Url where cardholder is redirected if payment is refused. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_canceled_url (String)

    Url where cardholder is redirected if payment is canceled. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_exception_url (String)

    Url where cardholder is redirected if the payment process raised an exception. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :distributor_fee (Float)

    Distributor fee

  • :message_to_user (String)

    Message to send to wallet&#39;s user. In the case of a Sepa Direct Debit Core payment method this parameter will be the reconciliation information transmitted to the Debtor (ie. Invoice number …). In this case it cannot be more than 140 characters.

  • :language (String)

    Language for the third party interface.

  • :created_ip (String)

    User&#39;s IP address

  • :payin_date (String)

    The date at which the SDD should be presented. This parameter is mandatory when performing a payin of method SDD Core. Format is YYYY-MM-DD The date should follow some requirements (Traget 2 working day) : - Be a weekday (Monday to Friday) - January 1st is excluded - May 1st is excluded - December 25 is excluded - December 26th is excluded - Easter day is excluded - Easter Monday is excluded - Good Friday is excluded

  • :mandate_id (Integer)

    The id of the mandate. This parameter is mandatory when performing a payin with method SDD Core.

Returns:



273
274
275
276
# File 'lib/treezor_client/api/payin_api.rb', line 273

def post_payin(wallet_id, payment_method_id, amount, currency, opts = {})
  data, _status_code, _headers = post_payin_with_http_info(wallet_id, payment_method_id, amount, currency, opts)
  data
end

#post_payin_with_http_info(wallet_id, payment_method_id, amount, currency, opts = {}) ⇒ Array<(InlineResponse20017, Fixnum, Hash)>

create a pay in Create a new pay in in the system.

Parameters:

  • wallet_id

    Credited wallet&#39;s ID

  • payment_method_id

    | Id | Payment by | | —| — | | 3 | Check | | 11 | Card | | 14 | Oneclick card (without payment form) | | 21 | Sepa Direct Debit Core | | 23 | Full Hosted HTML Payment Form. Please note that if you use this paymentMethodId the flieds paymentAcceptedUrl, paymentRefusedUrl, paymentWaitingUrl, paymentCanceledUrl and paymentExceptionUrl are mandatory. CSS of the payment page can be customized | | 24 | IFrame Payment Form. Please note that if you use this paymentMethodId the flieds paymentAcceptedUrl, paymentRefusedUrl, paymentWaitingUrl, paymentCanceledUrl and paymentExceptionUrl are mandatory. CSS of the payment page can be customized| | 25 | Payment made through an SDK - You cannot directly create a payin directly with this method id. The payin will be automatically created by the system. |

  • amount

    Pay in amount.

  • currency

    Payin currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). Must be the same as the wallet&#39;s.

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (String)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :payin_tag (String)

    Client custom data.

  • :user_id (Integer)

    User&#39;s id who makes the pay in. Required unless paymentMethodId &#x3D; 21. NB : this parameter should should not be transmitted in the case of payin of method Sepa Direct Debit Core (21). It will be set automatically by the system.

  • :oneclickcard_id (Integer)

    Oneclick card&#39;s id. Mandatory if payment method is 14. Useless otherwise.

  • :payment_accepted_url (String)

    Url where cardholder is redirected if payment is successful. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_waiting_url (String)

    Url where cardholder is redirected to wait payment processing. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_refused_url (String)

    Url where cardholder is redirected if payment is refused. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_canceled_url (String)

    Url where cardholder is redirected if payment is canceled. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :payment_exception_url (String)

    Url where cardholder is redirected if the payment process raised an exception. When using paymentMethodId 23 and 24 an HTTPS URL is mandatory.

  • :distributor_fee (Float)

    Distributor fee

  • :message_to_user (String)

    Message to send to wallet&#39;s user. In the case of a Sepa Direct Debit Core payment method this parameter will be the reconciliation information transmitted to the Debtor (ie. Invoice number …). In this case it cannot be more than 140 characters.

  • :language (String)

    Language for the third party interface.

  • :created_ip (String)

    User&#39;s IP address

  • :payin_date (String)

    The date at which the SDD should be presented. This parameter is mandatory when performing a payin of method SDD Core. Format is YYYY-MM-DD The date should follow some requirements (Traget 2 working day) : - Be a weekday (Monday to Friday) - January 1st is excluded - May 1st is excluded - December 25 is excluded - December 26th is excluded - Easter day is excluded - Easter Monday is excluded - Good Friday is excluded

  • :mandate_id (Integer)

    The id of the mandate. This parameter is mandatory when performing a payin with method SDD Core.

Returns:

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

    InlineResponse20017 data, response status code and response headers



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/treezor_client/api/payin_api.rb', line 304

def post_payin_with_http_info(wallet_id, payment_method_id, amount, currency, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayinApi.post_payin ...'
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling PayinApi.post_payin"
  end
  # verify the required parameter 'payment_method_id' is set
  if @api_client.config.client_side_validation && payment_method_id.nil?
    fail ArgumentError, "Missing the required parameter 'payment_method_id' when calling PayinApi.post_payin"
  end
  # verify the required parameter 'amount' is set
  if @api_client.config.client_side_validation && amount.nil?
    fail ArgumentError, "Missing the required parameter 'amount' when calling PayinApi.post_payin"
  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 PayinApi.post_payin"
  end
  if @api_client.config.client_side_validation && opts[:'language'] && !['FRA', 'GBR', 'ESP', 'ITA', 'PRT'].include?(opts[:'language'])
    fail ArgumentError, 'invalid value for "language", must be one of FRA, GBR, ESP, ITA, PRT'
  end
  # resource path
  local_var_path = '/payins'

  # query parameters
  query_params = {}
  query_params[:'walletId'] = wallet_id
  query_params[:'paymentMethodId'] = payment_method_id
  query_params[:'amount'] = amount
  query_params[:'currency'] = currency
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
  query_params[:'payinTag'] = opts[:'payin_tag'] if !opts[:'payin_tag'].nil?
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'oneclickcardId'] = opts[:'oneclickcard_id'] if !opts[:'oneclickcard_id'].nil?
  query_params[:'paymentAcceptedUrl'] = opts[:'payment_accepted_url'] if !opts[:'payment_accepted_url'].nil?
  query_params[:'paymentWaitingUrl'] = opts[:'payment_waiting_url'] if !opts[:'payment_waiting_url'].nil?
  query_params[:'paymentRefusedUrl'] = opts[:'payment_refused_url'] if !opts[:'payment_refused_url'].nil?
  query_params[:'paymentCanceledUrl'] = opts[:'payment_canceled_url'] if !opts[:'payment_canceled_url'].nil?
  query_params[:'paymentExceptionUrl'] = opts[:'payment_exception_url'] if !opts[:'payment_exception_url'].nil?
  query_params[:'distributorFee'] = opts[:'distributor_fee'] if !opts[:'distributor_fee'].nil?
  query_params[:'messageToUser'] = opts[:'message_to_user'] if !opts[:'message_to_user'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'createdIp'] = opts[:'created_ip'] if !opts[:'created_ip'].nil?
  query_params[:'payinDate'] = opts[:'payin_date'] if !opts[:'payin_date'].nil?
  query_params[:'mandateId'] = opts[:'mandate_id'] if !opts[:'mandate_id'].nil?

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

  # form parameters
  form_params = {}

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