Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::RefundApi
- Inherits:
-
Object
- Object
- OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::RefundApi
- Defined in:
- lib/orbipay_paymentsapi_client/api/refund_api.rb
Overview
.
############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_refund(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) ⇒ [RefundResponse, headers]
Create Refund This API is used to initiate a refund.
-
#create_refund_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) ⇒ Array<(RefundResponse, Fixnum, Hash)>
Create Refund This API is used to initiate a refund.
-
#get_refund(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) ⇒ [RefundResponse, headers]
Get Refund The API is used to retrieve the details of a refund by id.
-
#get_refund_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) ⇒ Array<(RefundResponse, Fixnum, Hash)>
Get Refund The API is used to retrieve the details of a refund by id.
-
#initialize(api_client = ApiClient.default) ⇒ RefundApi
constructor
A new instance of RefundApi.
-
#retrieve_refunds(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ [RefundsResponse, headers]
Retrieve Refunds The API is used to retrieve the refunds made to a customer against payments processed through EBPP.
-
#retrieve_refunds_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ Array<(RefundsResponse, Fixnum, Hash)>
Retrieve Refunds The API is used to retrieve the refunds made to a customer against payments processed through EBPP.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
13 14 15 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 13 def api_client @api_client end |
Instance Method Details
#create_refund(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) ⇒ [RefundResponse, headers]
Create Refund This API is used to initiate a refund. Any payment made using EBPP can be refunded. Customer cannot initiate a refund request. In other words, the Create Refund request will fail if the associated requestor_type is customer.
33 34 35 36 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 33 def create_refund(channel, client_key, product, , idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) data, _status_code, _headers = create_refund_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts) [data, _status_code, _headers] end |
#create_refund_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) ⇒ Array<(RefundResponse, Fixnum, Hash)>
Create Refund This API is used to initiate a refund. Any payment made using EBPP can be refunded. Customer cannot initiate a refund request. In other words, the Create Refund request will fail if the associated requestor_type is customer.
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 95 96 97 98 99 100 101 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 53 def create_refund_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_payment, id_customer, create_refund_request, opts = {}) # resource path local_var_path = '/customers/{ID_CUSTOMER}/payments/{ID_PAYMENT}/refunds' 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 RefundApi.create_refund" 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 RefundApi.create_refund" 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'] = 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_refund_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 => 'RefundResponse') return data, status_code, headers end |
#get_refund(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) ⇒ [RefundResponse, headers]
Get Refund The API is used to retrieve the details of a refund by id.
116 117 118 119 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 116 def get_refund(channel, client_key, product, , idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) data, _status_code, _headers = get_refund_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_refund, id_customer, opts) [data, _status_code, _headers] end |
#get_refund_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) ⇒ Array<(RefundResponse, Fixnum, Hash)>
Get Refund The API is used to retrieve the details of a refund by id.
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 178 179 180 181 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 135 def get_refund_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_refund, id_customer, opts = {}) # resource path local_var_path = '/customers/{ID_CUSTOMER}/refunds/{ID_REFUND}' if !id_refund.nil? && id_refund.to_s.strip != "" local_var_path = local_var_path.sub('{' + 'ID_REFUND' + '}', id_refund.to_s) else fail ArgumentError, "Missing the required parameter 'id_refund' when calling RefundApi.get_refund" 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 RefundApi.get_refund" 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'] = 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 => 'RefundResponse') return data, status_code, headers end |
#retrieve_refunds(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ [RefundsResponse, headers]
Retrieve Refunds The API is used to retrieve the refunds made to a customer against payments processed through EBPP. Refunds can be filtered using the customer id, confirmation number of the payment being refunded or of the refund, status of the refund and others mentioned below. Scheduled refunds that are yet to be processed and all the refunds processed in the last six months are returned if date criteria is not specified. If the requestor_type is customer then the id_customer request parameter is mandatory.
203 204 205 206 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 203 def retrieve_refunds(channel, client_key, product, , idempotent_request_key, requestor_type, opts = {}) data, _status_code, _headers = retrieve_refunds_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, opts) [data, _status_code, _headers] end |
#retrieve_refunds_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ Array<(RefundsResponse, Fixnum, Hash)>
Retrieve Refunds The API is used to retrieve the refunds made to a customer against payments processed through EBPP. Refunds can be filtered using the customer id, confirmation number of the payment being refunded or of the refund, status of the refund and others mentioned below. Scheduled refunds that are yet to be processed and all the refunds processed in the last six months are returned if date criteria is not specified. If the requestor_type is customer then the id_customer request parameter is mandatory.
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/orbipay_paymentsapi_client/api/refund_api.rb', line 229 def retrieve_refunds_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, opts = {}) # resource path local_var_path = '/refunds' # 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[:'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[:'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']) # 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'] = 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 => 'RefundsResponse') return data, status_code, headers end |