Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::PaymentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/orbipay_paymentsapi_client/api/payment_api.rb

Overview

.

############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PaymentApi

Returns a new instance of PaymentApi.



15
16
17
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 15

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#create_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, create_payment_request, opts = {}) ⇒ [PaymentResponse, headers]

Create Payment The API is used to make payments to service a customer account. Client systems can provide the unique identifier for the payment in their system as payment_reference.<p>Fee amount and fee type are conditional and should be provided if the details of the fee to be charged are maintained in the client system. The fee types that are supported in EBPP are add_to_principal and bill_separately. Alternatively, the fee information can be setup in EBPP, in which case, these fields are ignored. If fee information is setup in the system, the details of the fee are returned in the response.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • create_payment_request

    JSON containing all the fields required to make a payment.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([PaymentResponse, headers])


32
33
34
35
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 32

def create_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, create_payment_request, opts = {})
  data, _status_code, _headers = create_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, create_payment_request, opts)
  [data, _status_code, _headers]
end

#create_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, create_payment_request, opts = {}) ⇒ Array<(PaymentResponse, Fixnum, Hash)>

Create Payment The API is used to make payments to service a customer account. Client systems can provide the unique identifier for the payment in their system as payment_reference.&lt;p&gt;Fee amount and fee type are conditional and should be provided if the details of the fee to be charged are maintained in the client system. The fee types that are supported in EBPP are add_to_principal and bill_separately. Alternatively, the fee information can be setup in EBPP, in which case, these fields are ignored. If fee information is setup in the system, the details of the fee are returned in the response.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • create_payment_request

    JSON containing all the fields required to make a payment.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

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

    PaymentResponse data, response status code and response headers



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
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 51

def create_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, create_payment_request, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/payments'
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling PaymentApi.create_payment"
  end
  
  # 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'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(create_payment_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PaymentResponse')
  return data, status_code, headers
end

#delete_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, delete_payment_request, opts = {}) ⇒ [DeleteResponse, headers]

Delete Payment The API is used to delete or cancel a payment. Payments that are under processing or have already been processed cannot be deleted.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • delete_payment_request

    Details of payment to be deleted/cancelled

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([DeleteResponse, headers])


109
110
111
112
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 109

def delete_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, delete_payment_request, opts = {})
  data, _status_code, _headers = delete_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, delete_payment_request, opts)
  [data, _status_code, _headers]
end

#delete_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, delete_payment_request, opts = {}) ⇒ Array<(DeleteResponse, Fixnum, Hash)>

Delete Payment The API is used to delete or cancel a payment. Payments that are under processing or have already been processed cannot be deleted.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • delete_payment_request

    Details of payment to be deleted/cancelled

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

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

    DeleteResponse data, response status code and response headers



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
177
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 129

def delete_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, delete_payment_request, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/payments/{ID_PAYMENT}'
  if  !id_payment.nil? && id_payment.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_PAYMENT' + '}', id_payment.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_payment' when calling PaymentApi.delete_payment"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling PaymentApi.delete_payment"
  end
  
  # 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'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(delete_payment_request)
  auth_names = []
  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 => 'DeleteResponse')
  return data, status_code, headers
end

#get_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, opts = {}) ⇒ [PaymentResponse, headers]

Get Payment The API is used to retrieve the details of a payment by id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([PaymentResponse, headers])


192
193
194
195
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 192

def get_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, opts = {})
  data, _status_code, _headers = get_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, opts)
  [data, _status_code, _headers]
end

#get_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, opts = {}) ⇒ Array<(PaymentResponse, Fixnum, Hash)>

Get Payment The API is used to retrieve the details of a payment by id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

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

    PaymentResponse data, response status code and response headers



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
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 211

def get_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/payments/{ID_PAYMENT}'
  if  !id_payment.nil? && id_payment.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_PAYMENT' + '}', id_payment.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_payment' when calling PaymentApi.get_payment"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling PaymentApi.get_payment"
  end
  
  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PaymentResponse')
  return data, status_code, headers
end

#retrieve_fee_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_fee, id_customer, opts = {}) ⇒ [PaymentResponse, headers]

Get Fee Payment The API is used to retrieve the details of a fee payment by id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by OrbiPay to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_fee

    The unique identifier assigned by OrbiPay to the FeePayment.

  • id_customer

    The unique identifier assigned by OrbiPay to the customer.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([PaymentResponse, headers])


272
273
274
275
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 272

def retrieve_fee_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_fee, id_customer, opts = {})
  data, _status_code, _headers = retrieve_fee_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_fee, id_customer, opts)
  [data, _status_code, _headers]
end

#retrieve_fee_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_fee, id_customer, opts = {}) ⇒ Array<(PaymentResponse, Fixnum, Hash)>

Get Fee Payment The API is used to retrieve the details of a fee payment by id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by OrbiPay to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_fee

    The unique identifier assigned by OrbiPay to the FeePayment.

  • id_customer

    The unique identifier assigned by OrbiPay to the customer.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

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

    PaymentResponse data, response status code and response headers



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
333
334
335
336
337
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 291

def retrieve_fee_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_fee, id_customer, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/fees/{ID_FEE}'
  if  !id_fee.nil? && id_fee.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_FEE' + '}', id_fee.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_fee' when calling PaymentApi.retrieve_fee_payment"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling PaymentApi.retrieve_fee_payment"
  end
  
  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PaymentResponse')
  return data, status_code, headers
end

#retrieve_payments(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ [PaymentsResponse, headers]

Retrieve Payments The API is used to retrieve the payments made by a customer. Payments can be filtered using the confirmation number, customer account, funding account, status and payment schedule type, by date range and others mentioned below. If no dates are provided for retrieval, payments in the last six months and all the payments scheduled for a future date are returned. In case a payment has failed due to ACH returns, then the payment return date and the return code will be available in the response. If the requestor type is customer then the id_customer request parameter is mandatory.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :id_customer (String)

    The unique identifier assigned by EBPP to the customer.

  • :id_funding_account (String)

    The unique identifier assigned by EBPP to the funding account

  • :id_customer_account (String)

    The unique identifier assigned by EBPP to the customer account

  • :confirmation_number (String)

    The confirmation number or reference provided to the customer for the successful payment.

  • :status (Array<String>)

    The status of the payment. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

  • :payment_schedule_type (Array<String>)

    The schedule type for the payment setup. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

  • :from_date (String)

    The date from which payments, matching the criteria specified, need to be retrieved.

  • :to_date (String)

    The date upto which payments, matching the criteria specified, need to be retrieved.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :query_id (String)

    query id of the Retrieve/Search Customers lookup.

  • :from_index (String)

    To fetch the next set of objects that start after this object

  • :to_index (String)

    To fetch the previous set of objects that end at this object

Returns:

  • ([PaymentsResponse, headers])


362
363
364
365
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 362

def retrieve_payments(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {})
  data, _status_code, _headers = retrieve_payments_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts)
  [data, _status_code, _headers]
end

#retrieve_payments_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ Array<(PaymentsResponse, Fixnum, Hash)>

Retrieve Payments The API is used to retrieve the payments made by a customer. Payments can be filtered using the confirmation number, customer account, funding account, status and payment schedule type, by date range and others mentioned below. If no dates are provided for retrieval, payments in the last six months and all the payments scheduled for a future date are returned. In case a payment has failed due to ACH returns, then the payment return date and the return code will be available in the response. If the requestor type is customer then the id_customer request parameter is mandatory.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :id_customer (String)

    The unique identifier assigned by EBPP to the customer.

  • :id_funding_account (String)

    The unique identifier assigned by EBPP to the funding account

  • :id_customer_account (String)

    The unique identifier assigned by EBPP to the customer account

  • :confirmation_number (String)

    The confirmation number or reference provided to the customer for the successful payment.

  • :status (Array<String>)

    The status of the payment. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

  • :payment_schedule_type (Array<String>)

    The schedule type for the payment setup. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

  • :from_date (String)

    The date from which payments, matching the criteria specified, need to be retrieved.

  • :to_date (String)

    The date upto which payments, matching the criteria specified, need to be retrieved.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :query_id (String)

    query id of the Retrieve/Search Customers lookup.

  • :from_index (String)

    To fetch the next set of objects that start after this object

  • :to_index (String)

    To fetch the previous set of objects that end at this object

Returns:

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

    PaymentsResponse data, response status code and response headers



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 391

def retrieve_payments_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {})

  # resource path
  local_var_path = '/payments'
  # query parameters
  query_params = {}
  if !opts[:'id_customer'].nil? && opts[:'id_customer'].to_s.strip != "" 
      query_params[:'id_customer'] = opts[:'id_customer']
  end
  if !opts[:'id_funding_account'].nil? && opts[:'id_funding_account'].to_s.strip != "" 
      query_params[:'id_funding_account'] = opts[:'id_funding_account']
  end
  if !opts[:'id_customer_account'].nil? && opts[:'id_customer_account'].to_s.strip != "" 
      query_params[:'id_customer_account'] = opts[:'id_customer_account']
  end
  if !opts[:'confirmation_number'].nil? && opts[:'confirmation_number'].to_s.strip != "" 
      query_params[:'confirmation_number'] = opts[:'confirmation_number']
  end
  if !opts[:'status'].nil? && opts[:'status'].to_s.strip != "" 
      query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi)
  end
  if !opts[:'payment_schedule_type'].nil? && opts[:'payment_schedule_type'].to_s.strip != "" 
      query_params[:'payment_schedule_type'] = @api_client.build_collection_param(opts[:'payment_schedule_type'], :multi)
  end
  if !opts[:'from_date'].nil? && opts[:'from_date'].to_s.strip != "" 
      query_params[:'from_date'] = opts[:'from_date']
  end
  if !opts[:'to_date'].nil? && opts[:'to_date'].to_s.strip != "" 
      query_params[:'to_date'] = opts[:'to_date']
  end
  if !opts[:'page_size'].nil? && opts[:'page_size'].to_s.strip != "" 
      query_params[:'page_size'] = opts[:'page_size']
  end
  if !opts[:'query_id'].nil? && opts[:'query_id'].to_s.strip != "" 
      query_params[:'query_id'] = opts[:'query_id']
  end
  if !opts[:'from_index'].nil? && opts[:'from_index'].to_s.strip != "" 
      query_params[:'from_index'] = opts[:'from_index']
  end
  if !opts[:'to_index'].nil? && opts[:'to_index'].to_s.strip != "" 
      query_params[:'to_index'] = opts[:'to_index']
  end

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PaymentsResponse')
  return data, status_code, headers
end

#simple_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, simple_payment_request, opts = {}) ⇒ [SimplePaymentResponse, headers]

Simple Payment The API is used to make payments to service a customer account. Client systems can provide the unique identifier for the payment in their system as payment_reference. Fee amount and fee type are conditional and should be provided if the details of the fee to be charged are maintained in the client system. The fee types that are supported in EBPP are add_to_principal and bill_separately. Alternatively, the fee information can be setup in EBPP, in which case, these fields are ignored. If fee information is setup in the system, the details of the fee are returned in the response. This API updates the details of the customer, customer account and the funding account if those exist in EBPP or creates them otherwise.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • simple_payment_request

    JSON containing all the fields required to make a payment.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :save_funding_account (String)

    query param

Returns:

  • ([SimplePaymentResponse, headers])


476
477
478
479
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 476

def simple_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, simple_payment_request, opts = {})
  data, _status_code, _headers = simple_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, simple_payment_request, opts)
  [data, _status_code, _headers]
end

#simple_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, simple_payment_request, opts = {}) ⇒ Array<(SimplePaymentResponse, Fixnum, Hash)>

Simple Payment The API is used to make payments to service a customer account. Client systems can provide the unique identifier for the payment in their system as payment_reference. Fee amount and fee type are conditional and should be provided if the details of the fee to be charged are maintained in the client system. The fee types that are supported in EBPP are add_to_principal and bill_separately. Alternatively, the fee information can be setup in EBPP, in which case, these fields are ignored. If fee information is setup in the system, the details of the fee are returned in the response. This API updates the details of the customer, customer account and the funding account if those exist in EBPP or creates them otherwise.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • simple_payment_request

    JSON containing all the fields required to make a payment.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :save_funding_account (String)

    query param

Returns:

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

    SimplePaymentResponse data, response status code and response headers



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 495

def simple_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, simple_payment_request, opts = {})

  # resource path
  local_var_path = '/payments'
  # query parameters
  query_params = {}
  if !opts[:'save_funding_account'].nil? && opts[:'save_funding_account'].to_s.strip != "" 
      query_params[:'save_funding_account'] = opts[:'save_funding_account']
  end

  # 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'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(simple_payment_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SimplePaymentResponse')
  return data, status_code, headers
end

#update_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, update_payment_request, opts = {}) ⇒ [PaymentResponse, headers]

Update Payment The API is used to edit a payment. Only payments in scheduled status can be edited.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • update_payment_request

    Details of the Payment to be updated.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([PaymentResponse, headers])


550
551
552
553
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 550

def update_payment(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, update_payment_request, opts = {})
  data, _status_code, _headers = update_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, update_payment_request, opts)
  [data, _status_code, _headers]
end

#update_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, update_payment_request, opts = {}) ⇒ Array<(PaymentResponse, Fixnum, Hash)>

Update Payment The API is used to edit a payment. Only payments in scheduled status can be edited.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_payment

    The unique identifier assigned by EBPP to the payment.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • update_payment_request

    Details of the Payment to be updated.

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

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

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

    PaymentResponse data, response status code and response headers



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/orbipay_paymentsapi_client/api/payment_api.rb', line 570

def update_payment_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, update_payment_request, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/payments/{ID_PAYMENT}'
  if  !id_payment.nil? && id_payment.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_PAYMENT' + '}', id_payment.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_payment' when calling PaymentApi.update_payment"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling PaymentApi.update_payment"
  end
  
  # 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'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(update_payment_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PaymentResponse')
  return data, status_code, headers
end