Class: CityPayApiClient::AuthorisationAndPaymentApi
- Inherits:
-
Object
- Object
- CityPayApiClient::AuthorisationAndPaymentApi
- Defined in:
- lib/citypay_api_client/api/authorisation_and_payment_api__.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#authorisation_request(auth_request, opts = {}) ⇒ Decision
Authorisation Performs a request for authorisation for a card payment request.
-
#authorisation_request_with_http_info(auth_request, opts = {}) ⇒ Array<(Decision, Integer, Hash)>
Authorisation Performs a request for authorisation for a card payment request.
-
#bin_range_lookup_request(bin_lookup, opts = {}) ⇒ Bin
Bin Lookup A bin range lookup service can be used to check what a card is, as seen by the gateway.
-
#bin_range_lookup_request_with_http_info(bin_lookup, opts = {}) ⇒ Array<(Bin, Integer, Hash)>
Bin Lookup A bin range lookup service can be used to check what a card is, as seen by the gateway.
-
#c_res_request(c_res_auth_request, opts = {}) ⇒ AuthResponse
CRes The CRes request performs authorisation processing once a challenge request has been completed with an Authentication Server (ACS).
-
#c_res_request_with_http_info(c_res_auth_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
CRes The CRes request performs authorisation processing once a challenge request has been completed with an Authentication Server (ACS).
-
#capture_request(capture_request, opts = {}) ⇒ Acknowledgement
Capture _The capture process only applies to transactions which have been pre-authorised only._ The capture process will ensure that a transaction will now settle.
-
#capture_request_with_http_info(capture_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Capture _The capture process only applies to transactions which have been pre-authorised only._ The capture process will ensure that a transaction will now settle.
-
#create_payment_intent(payment_intent, opts = {}) ⇒ PaymentIntentReference
Create a Payment Intent This endpoint initiates the creation of a payment intent, which is a precursor to processing a payment.
-
#create_payment_intent_with_http_info(payment_intent, opts = {}) ⇒ Array<(PaymentIntentReference, Integer, Hash)>
Create a Payment Intent This endpoint initiates the creation of a payment intent, which is a precursor to processing a payment.
-
#initialize(api_client = ApiClient.default) ⇒ AuthorisationAndPaymentApi
constructor
A new instance of AuthorisationAndPaymentApi.
-
#pa_res_request(pa_res_auth_request, opts = {}) ⇒ AuthResponse
PaRes The Payer Authentication Response (PaRes) is an operation after the result of authentication being performed.
-
#pa_res_request_with_http_info(pa_res_auth_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
PaRes The Payer Authentication Response (PaRes) is an operation after the result of authentication being performed.
-
#refund_request(refund_request, opts = {}) ⇒ AuthResponse
Refund A refund request which allows for the refunding of a previous transaction up and to the amount of the original sale.
-
#refund_request_with_http_info(refund_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Refund A refund request which allows for the refunding of a previous transaction up and to the amount of the original sale.
-
#retrieval_request(retrieve_request, opts = {}) ⇒ AuthReferences
Retrieval A retrieval request which allows an integration to obtain the result of a transaction processed in the last 90 days.
-
#retrieval_request_with_http_info(retrieve_request, opts = {}) ⇒ Array<(AuthReferences, Integer, Hash)>
Retrieval A retrieval request which allows an integration to obtain the result of a transaction processed in the last 90 days.
-
#void_request(void_request, opts = {}) ⇒ Acknowledgement
Void _The void process generally applies to transactions which have been pre-authorised only however voids can occur on the same day if performed before batching and settlement._ The void process will ensure that a transaction will now settle.
-
#void_request_with_http_info(void_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Void _The void process generally applies to transactions which have been pre-authorised only however voids can occur on the same day if performed before batching and settlement._ The void process will ensure that a transaction will now settle.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AuthorisationAndPaymentApi
Returns a new instance of AuthorisationAndPaymentApi.
18 19 20 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 16 def api_client @api_client end |
Instance Method Details
#authorisation_request(auth_request, opts = {}) ⇒ Decision
Authorisation Performs a request for authorisation for a card payment request.
26 27 28 29 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 26 def (auth_request, opts = {}) data, _status_code, _headers = (auth_request, opts) data end |
#authorisation_request_with_http_info(auth_request, opts = {}) ⇒ Array<(Decision, Integer, Hash)>
Authorisation Performs a request for authorisation for a card payment request.
36 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 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 36 def (auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.authorisation_request ...' end # verify the required parameter 'auth_request' is set if @api_client.config.client_side_validation && auth_request.nil? fail ArgumentError, "Missing the required parameter 'auth_request' when calling AuthorisationAndPaymentApi.authorisation_request" end # resource path local_var_path = '/v6/authorise' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(auth_request) # return_type return_type = opts[:debug_return_type] || 'Decision' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.authorisation_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#authorisation_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#bin_range_lookup_request(bin_lookup, opts = {}) ⇒ Bin
Bin Lookup A bin range lookup service can be used to check what a card is, as seen by the gateway. Each card number’s leading digits help to identify who 0. the card scheme is such as Visa, MasterCard or American Express 1. the issuer of the card, such as the bank 2. it’s country of origin 3. it’s currency of origin Our gateway has 450 thousand possible bin ranges and uses a number of algorithms to determine the likelihood of the bin data. The request requires a bin value of between 6 and 12 digits. The more digits provided may ensure a more accurate result.
94 95 96 97 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 94 def bin_range_lookup_request(bin_lookup, opts = {}) data, _status_code, _headers = bin_range_lookup_request_with_http_info(bin_lookup, opts) data end |
#bin_range_lookup_request_with_http_info(bin_lookup, opts = {}) ⇒ Array<(Bin, Integer, Hash)>
Bin Lookup A bin range lookup service can be used to check what a card is, as seen by the gateway. Each card number's leading digits help to identify who 0. the card scheme is such as Visa, MasterCard or American Express 1. the issuer of the card, such as the bank 2. it's country of origin 3. it's currency of origin Our gateway has 450 thousand possible bin ranges and uses a number of algorithms to determine the likelihood of the bin data. The request requires a bin value of between 6 and 12 digits. The more digits provided may ensure a more accurate result.
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 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 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 104 def bin_range_lookup_request_with_http_info(bin_lookup, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.bin_range_lookup_request ...' end # verify the required parameter 'bin_lookup' is set if @api_client.config.client_side_validation && bin_lookup.nil? fail ArgumentError, "Missing the required parameter 'bin_lookup' when calling AuthorisationAndPaymentApi.bin_range_lookup_request" end # resource path local_var_path = '/v6/bin' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(bin_lookup) # return_type return_type = opts[:debug_return_type] || 'Bin' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.bin_range_lookup_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#bin_range_lookup_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#c_res_request(c_res_auth_request, opts = {}) ⇒ AuthResponse
CRes The CRes request performs authorisation processing once a challenge request has been completed with an Authentication Server (ACS). This challenge response contains confirmation that will allow the API systems to return an authorisation response based on the result. Our systems will know out of band via an ‘RReq` call by the ACS to notify us if the liability shift has been issued. Any call to the CRes operation will require a previous authorisation request and cannot be called on its own without a previous [request challenge](#requestchallenged) being obtained.
162 163 164 165 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 162 def c_res_request(c_res_auth_request, opts = {}) data, _status_code, _headers = c_res_request_with_http_info(c_res_auth_request, opts) data end |
#c_res_request_with_http_info(c_res_auth_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
CRes The CRes request performs authorisation processing once a challenge request has been completed with an Authentication Server (ACS). This challenge response contains confirmation that will allow the API systems to return an authorisation response based on the result. Our systems will know out of band via an `RReq` call by the ACS to notify us if the liability shift has been issued. Any call to the CRes operation will require a previous authorisation request and cannot be called on its own without a previous [request challenge](#requestchallenged) being obtained.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 172 def c_res_request_with_http_info(c_res_auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.c_res_request ...' end # verify the required parameter 'c_res_auth_request' is set if @api_client.config.client_side_validation && c_res_auth_request.nil? fail ArgumentError, "Missing the required parameter 'c_res_auth_request' when calling AuthorisationAndPaymentApi.c_res_request" end # resource path local_var_path = '/v6/cres' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(c_res_auth_request) # return_type return_type = opts[:debug_return_type] || 'AuthResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.c_res_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#c_res_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#capture_request(capture_request, opts = {}) ⇒ Acknowledgement
Capture _The capture process only applies to transactions which have been pre-authorised only._ The capture process will ensure that a transaction will now settle. It is expected that a capture call will be provided within 3 days or a maximum of 7 days. A capture request is provided to confirm that you wish the transaction to be settled. This request can contain a final amount for the transaction which is different to the original authorisation amount. This may be useful in a delayed system process such as waiting for stock to be ordered, confirmed, or services provided before the final cost is known. When a transaction is completed, a new authorisation code may be created and a new confirmation can be sent online to the acquiring bank. Once the transaction has been processed. A standard [‘Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction. On a successful completion process, the transaction will be available for the settlement and completed at the end of the day.
230 231 232 233 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 230 def capture_request(capture_request, opts = {}) data, _status_code, _headers = capture_request_with_http_info(capture_request, opts) data end |
#capture_request_with_http_info(capture_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Capture _The capture process only applies to transactions which have been pre-authorised only._ The capture process will ensure that a transaction will now settle. It is expected that a capture call will be provided within 3 days or a maximum of 7 days. A capture request is provided to confirm that you wish the transaction to be settled. This request can contain a final amount for the transaction which is different to the original authorisation amount. This may be useful in a delayed system process such as waiting for stock to be ordered, confirmed, or services provided before the final cost is known. When a transaction is completed, a new authorisation code may be created and a new confirmation can be sent online to the acquiring bank. Once the transaction has been processed. A standard [`Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction. On a successful completion process, the transaction will be available for the settlement and completed at the end of the day.
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 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 240 def capture_request_with_http_info(capture_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.capture_request ...' end # verify the required parameter 'capture_request' is set if @api_client.config.client_side_validation && capture_request.nil? fail ArgumentError, "Missing the required parameter 'capture_request' when calling AuthorisationAndPaymentApi.capture_request" end # resource path local_var_path = '/v6/capture' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(capture_request) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.capture_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#capture_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_payment_intent(payment_intent, opts = {}) ⇒ PaymentIntentReference
Create a Payment Intent This endpoint initiates the creation of a payment intent, which is a precursor to processing a payment. A payment intent captures the details of a prospective payment transaction, including the payment amount, currency, and associated billing and shipping information.
298 299 300 301 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 298 def create_payment_intent(payment_intent, opts = {}) data, _status_code, _headers = create_payment_intent_with_http_info(payment_intent, opts) data end |
#create_payment_intent_with_http_info(payment_intent, opts = {}) ⇒ Array<(PaymentIntentReference, Integer, Hash)>
Create a Payment Intent This endpoint initiates the creation of a payment intent, which is a precursor to processing a payment. A payment intent captures the details of a prospective payment transaction, including the payment amount, currency, and associated billing and shipping information.
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 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 308 def create_payment_intent_with_http_info(payment_intent, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.create_payment_intent ...' end # verify the required parameter 'payment_intent' is set if @api_client.config.client_side_validation && payment_intent.nil? fail ArgumentError, "Missing the required parameter 'payment_intent' when calling AuthorisationAndPaymentApi.create_payment_intent" end # resource path local_var_path = '/v6/intent/create' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(payment_intent) # return_type return_type = opts[:debug_return_type] || 'PaymentIntentReference' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.create_payment_intent", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#create_payment_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pa_res_request(pa_res_auth_request, opts = {}) ⇒ AuthResponse
PaRes The Payer Authentication Response (PaRes) is an operation after the result of authentication being performed. The request uses an encoded packet of authentication data to notify us of the completion of the liability shift. Once this value has been unpacked and its signature is checked, our systems will proceed to authorisation processing. Any call to the PaRes operation will require a previous authorisation request and cannot be called on its own without a previous [authentication required](#authenticationrequired) being obtained.
366 367 368 369 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 366 def pa_res_request(pa_res_auth_request, opts = {}) data, _status_code, _headers = pa_res_request_with_http_info(pa_res_auth_request, opts) data end |
#pa_res_request_with_http_info(pa_res_auth_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
PaRes The Payer Authentication Response (PaRes) is an operation after the result of authentication being performed. The request uses an encoded packet of authentication data to notify us of the completion of the liability shift. Once this value has been unpacked and its signature is checked, our systems will proceed to authorisation processing. Any call to the PaRes operation will require a previous authorisation request and cannot be called on its own without a previous [authentication required](#authenticationrequired) being obtained.
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 421 422 423 424 425 426 427 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 376 def pa_res_request_with_http_info(pa_res_auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.pa_res_request ...' end # verify the required parameter 'pa_res_auth_request' is set if @api_client.config.client_side_validation && pa_res_auth_request.nil? fail ArgumentError, "Missing the required parameter 'pa_res_auth_request' when calling AuthorisationAndPaymentApi.pa_res_request" end # resource path local_var_path = '/v6/pares' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(pa_res_auth_request) # return_type return_type = opts[:debug_return_type] || 'AuthResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.pa_res_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#pa_res_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#refund_request(refund_request, opts = {}) ⇒ AuthResponse
Refund A refund request which allows for the refunding of a previous transaction up and to the amount of the original sale. A refund will be performed against the original card used to process the transaction.
434 435 436 437 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 434 def refund_request(refund_request, opts = {}) data, _status_code, _headers = refund_request_with_http_info(refund_request, opts) data end |
#refund_request_with_http_info(refund_request, opts = {}) ⇒ Array<(AuthResponse, Integer, Hash)>
Refund A refund request which allows for the refunding of a previous transaction up and to the amount of the original sale. A refund will be performed against the original card used to process the transaction.
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 495 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 444 def refund_request_with_http_info(refund_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.refund_request ...' end # verify the required parameter 'refund_request' is set if @api_client.config.client_side_validation && refund_request.nil? fail ArgumentError, "Missing the required parameter 'refund_request' when calling AuthorisationAndPaymentApi.refund_request" end # resource path local_var_path = '/v6/refund' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(refund_request) # return_type return_type = opts[:debug_return_type] || 'AuthResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.refund_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#refund_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieval_request(retrieve_request, opts = {}) ⇒ AuthReferences
Retrieval A retrieval request which allows an integration to obtain the result of a transaction processed in the last 90 days. The request allows for retrieval based on the identifier or transaction number. The process may return multiple results in particular where a transaction was processed multiple times against the same identifier. This can happen if errors were first received. The API therefore returns up to the first 5 transactions in the latest date time order. It is not intended for this operation to be a replacement for reporting and only allows for base transaction information to be returned.
502 503 504 505 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 502 def retrieval_request(retrieve_request, opts = {}) data, _status_code, _headers = retrieval_request_with_http_info(retrieve_request, opts) data end |
#retrieval_request_with_http_info(retrieve_request, opts = {}) ⇒ Array<(AuthReferences, Integer, Hash)>
Retrieval A retrieval request which allows an integration to obtain the result of a transaction processed in the last 90 days. The request allows for retrieval based on the identifier or transaction number. The process may return multiple results in particular where a transaction was processed multiple times against the same identifier. This can happen if errors were first received. The API therefore returns up to the first 5 transactions in the latest date time order. It is not intended for this operation to be a replacement for reporting and only allows for base transaction information to be returned.
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 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 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 512 def retrieval_request_with_http_info(retrieve_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.retrieval_request ...' end # verify the required parameter 'retrieve_request' is set if @api_client.config.client_side_validation && retrieve_request.nil? fail ArgumentError, "Missing the required parameter 'retrieve_request' when calling AuthorisationAndPaymentApi.retrieval_request" end # resource path local_var_path = '/v6/retrieve' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(retrieve_request) # return_type return_type = opts[:debug_return_type] || 'AuthReferences' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.retrieval_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#retrieval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#void_request(void_request, opts = {}) ⇒ Acknowledgement
Void _The void process generally applies to transactions which have been pre-authorised only however voids can occur on the same day if performed before batching and settlement._ The void process will ensure that a transaction will now settle. It is expected that a void call will be provided on the same day before batching and settlement or within 3 days or within a maximum of 7 days. Once the transaction has been processed as a void, an [‘Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction.
570 571 572 573 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 570 def void_request(void_request, opts = {}) data, _status_code, _headers = void_request_with_http_info(void_request, opts) data end |
#void_request_with_http_info(void_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Void _The void process generally applies to transactions which have been pre-authorised only however voids can occur on the same day if performed before batching and settlement._ The void process will ensure that a transaction will now settle. It is expected that a void call will be provided on the same day before batching and settlement or within 3 days or within a maximum of 7 days. Once the transaction has been processed as a void, an [`Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction.
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 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/citypay_api_client/api/authorisation_and_payment_api__.rb', line 580 def void_request_with_http_info(void_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthorisationAndPaymentApi.void_request ...' end # verify the required parameter 'void_request' is set if @api_client.config.client_side_validation && void_request.nil? fail ArgumentError, "Missing the required parameter 'void_request' when calling AuthorisationAndPaymentApi.void_request" end # resource path local_var_path = '/v6/void' # 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', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) 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(void_request) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"AuthorisationAndPaymentApi.void_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthorisationAndPaymentApi#void_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |