citypay_api_client 1.0.3 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +111 -39
- data/citypay_api_client.gemspec +5 -5
- data/docs/AccountCreate.md +10 -9
- data/docs/AccountStatus.md +8 -7
- data/docs/Acknowledgement.md +14 -13
- data/docs/AclCheckRequest.md +18 -0
- data/docs/AclCheckResponseModel.md +24 -0
- data/docs/AirlineAdvice.md +38 -37
- data/docs/AirlineSegment.md +22 -21
- data/docs/AuthReference.md +34 -33
- data/docs/AuthReferences.md +8 -7
- data/docs/AuthRequest.md +52 -49
- data/docs/AuthResponse.md +64 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +850 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +218 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +44 -0
- data/docs/Bin.md +34 -0
- data/docs/BinLookup.md +18 -0
- data/docs/CResAuthRequest.md +8 -7
- data/docs/CaptureRequest.md +18 -17
- data/docs/Card.md +46 -41
- data/docs/CardHolderAccount.md +24 -21
- data/docs/CardHolderAccountApi.md +387 -111
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +38 -31
- data/docs/CheckBatchStatus.md +20 -0
- data/docs/CheckBatchStatusResponse.md +18 -0
- data/docs/ContactDetails.md +32 -31
- data/docs/Decision.md +12 -11
- data/docs/DirectPostApi.md +389 -0
- data/docs/DirectPostRequest.md +60 -0
- data/docs/DirectTokenAuthRequest.md +24 -0
- data/docs/DomainKeyCheckRequest.md +18 -0
- data/docs/DomainKeyRequest.md +22 -0
- data/docs/DomainKeyResponse.md +26 -0
- data/docs/Error.md +16 -13
- data/docs/EventDataModel.md +26 -0
- data/docs/Exists.md +22 -0
- data/docs/ExternalMPI.md +16 -15
- data/docs/ListMerchantsResponse.md +12 -11
- data/docs/MCC6012.md +14 -13
- data/docs/Merchant.md +16 -15
- data/docs/OperationalFunctionsApi.md +375 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +806 -0
- data/docs/PaylinkAttachmentRequest.md +26 -0
- data/docs/PaylinkAttachmentResult.md +22 -0
- data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
- data/docs/PaylinkCardHolder.md +36 -0
- data/docs/PaylinkCart.md +30 -0
- data/docs/PaylinkCartItemModel.md +32 -0
- data/docs/PaylinkConfig.md +60 -0
- data/docs/PaylinkCustomParam.md +38 -0
- data/docs/PaylinkEmailNotificationPath.md +26 -0
- data/docs/PaylinkErrorCode.md +20 -0
- data/docs/PaylinkFieldGuardModel.md +30 -0
- data/docs/PaylinkPartPayments.md +28 -0
- data/docs/PaylinkSMSNotificationPath.md +20 -0
- data/docs/PaylinkStateEvent.md +22 -0
- data/docs/PaylinkTokenCreated.md +44 -0
- data/docs/PaylinkTokenRequestModel.md +42 -0
- data/docs/PaylinkTokenStatus.md +72 -0
- data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
- data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
- data/docs/PaylinkUI.md +24 -0
- data/docs/Ping.md +8 -7
- data/docs/ProcessBatchRequest.md +24 -0
- data/docs/ProcessBatchResponse.md +20 -0
- data/docs/RefundRequest.md +26 -0
- data/docs/RegisterCard.md +16 -13
- data/docs/RequestChallenged.md +16 -15
- data/docs/RetrieveRequest.md +12 -11
- data/docs/ThreeDSecure.md +32 -15
- data/docs/TokenisationResponseModel.md +36 -0
- data/docs/VoidRequest.md +12 -13
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
- data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
- data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
- data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
- data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
- data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
- data/lib/citypay_api_client/api_client.rb +72 -70
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +74 -17
- data/lib/citypay_api_client/models/account_create.rb +33 -23
- data/lib/citypay_api_client/models/account_status.rb +31 -23
- data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
- data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
- data/lib/citypay_api_client/models/airline_advice.rb +63 -34
- data/lib/citypay_api_client/models/airline_segment.rb +51 -25
- data/lib/citypay_api_client/models/auth_reference.rb +80 -31
- data/lib/citypay_api_client/models/auth_references.rb +31 -23
- data/lib/citypay_api_client/models/auth_request.rb +137 -56
- data/lib/citypay_api_client/models/auth_response.rb +83 -123
- data/lib/citypay_api_client/models/authen_required.rb +31 -23
- data/lib/citypay_api_client/models/batch.rb +267 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
- data/lib/citypay_api_client/models/bin.rb +294 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
- data/lib/citypay_api_client/models/capture_request.rb +59 -38
- data/lib/citypay_api_client/models/card.rb +93 -29
- data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
- data/lib/citypay_api_client/models/card_status.rb +31 -23
- data/lib/citypay_api_client/models/charge_request.rb +154 -47
- data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
- data/lib/citypay_api_client/models/contact_details.rb +130 -52
- data/lib/citypay_api_client/models/decision.rb +31 -23
- data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
- data/lib/citypay_api_client/models/error.rb +57 -31
- data/lib/citypay_api_client/models/event_data_model.rb +254 -0
- data/lib/citypay_api_client/models/exists.rb +241 -0
- data/lib/citypay_api_client/models/external_mpi.rb +61 -27
- data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
- data/lib/citypay_api_client/models/mcc6012.rb +31 -23
- data/lib/citypay_api_client/models/merchant.rb +31 -23
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
- data/lib/citypay_api_client/models/paylink_address.rb +425 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
- data/lib/citypay_api_client/models/paylink_config.rb +428 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
- data/lib/citypay_api_client/models/ping.rb +37 -25
- data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
- data/lib/citypay_api_client/models/refund_request.rb +339 -0
- data/lib/citypay_api_client/models/register_card.rb +79 -27
- data/lib/citypay_api_client/models/request_challenged.rb +39 -31
- data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
- data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
- data/lib/citypay_api_client/models/void_request.rb +39 -37
- data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
- data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
- data/lib/citypay_api_client/version.rb +3 -4
- data/lib/citypay_api_client.rb +53 -6
- data/spec/.DS_Store +0 -0
- data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
- data/spec/api/batch_processing_api___spec.rb +70 -0
- data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
- data/spec/api/direct_post_api___spec.rb +98 -0
- data/spec/api/operational_functions_api___spec.rb +94 -0
- data/spec/api/paylink_api___spec.rb +131 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +5 -5
- data/spec/it_api_sandbox_spec.rb +117 -55
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/acknowledgement_spec.rb +7 -22
- data/spec/models/acl_check_request_spec.rb +33 -0
- data/spec/models/acl_check_response_model_spec.rb +51 -0
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_references_spec.rb +7 -8
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +77 -33
- data/spec/models/batch_report_request_spec.rb +37 -0
- data/spec/models/batch_report_response_model_spec.rb +61 -0
- data/spec/models/batch_spec.rb +43 -0
- data/spec/models/batch_transaction_result_model_spec.rb +85 -0
- data/spec/models/batch_transaction_spec.rb +49 -0
- data/spec/models/bin_lookup_spec.rb +31 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +8 -7
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/check_batch_status_response_spec.rb +45 -0
- data/spec/models/check_batch_status_spec.rb +39 -0
- data/spec/models/decision_spec.rb +1 -1
- data/spec/models/direct_post_request_spec.rb +151 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +31 -0
- data/spec/models/domain_key_request_spec.rb +45 -0
- data/spec/models/domain_key_response_spec.rb +57 -0
- data/spec/models/event_data_model_spec.rb +57 -0
- data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
- data/spec/models/list_merchants_response_spec.rb +2 -2
- data/spec/models/paylink_address_spec.rb +69 -0
- data/spec/models/paylink_adjustment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_result_spec.rb +45 -0
- data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
- data/spec/models/paylink_card_holder_spec.rb +87 -0
- data/spec/models/paylink_cart_item_model_spec.rb +75 -0
- data/spec/models/paylink_cart_spec.rb +69 -0
- data/spec/models/paylink_config_spec.rb +159 -0
- data/spec/models/paylink_custom_param_spec.rb +87 -0
- data/spec/models/paylink_email_notification_path_spec.rb +57 -0
- data/spec/models/paylink_error_code_spec.rb +39 -0
- data/spec/models/paylink_field_guard_model_spec.rb +45 -0
- data/spec/models/paylink_part_payments_spec.rb +63 -0
- data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
- data/spec/models/paylink_state_event_spec.rb +45 -0
- data/spec/models/paylink_token_created_spec.rb +111 -0
- data/spec/models/paylink_token_request_model_spec.rb +91 -0
- data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
- data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
- data/spec/models/paylink_token_status_spec.rb +195 -0
- data/spec/models/paylink_ui_spec.rb +51 -0
- data/spec/models/process_batch_request_spec.rb +49 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +62 -0
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/models/tokenisation_response_model_spec.rb +87 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/utils/direct_post_mac_spec.rb +13 -0
- metadata +230 -44
- data/Gemfile.lock +0 -70
- data/docs/OperationalApi.md +0 -112
- data/docs/PaymentProcessingApi.md +0 -320
- data/git_push.sh +0 -58
- data/lib/citypay_api_client/api/operational_api.rb +0 -147
- data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
- data/lib/citypay_api_client/test.rb +0 -20
- data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -0,0 +1,225 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
3
|
+
|
4
|
+
# This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
|
+
|
6
|
+
Contact: support@citypay.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'cgi'
|
13
|
+
|
14
|
+
module CityPayApiClient
|
15
|
+
class BatchProcessingApi
|
16
|
+
attr_accessor :api_client
|
17
|
+
|
18
|
+
def initialize(api_client = ApiClient.default)
|
19
|
+
@api_client = api_client
|
20
|
+
end
|
21
|
+
# Batch Process Request
|
22
|
+
# A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
|
23
|
+
# @param process_batch_request [ProcessBatchRequest]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [ProcessBatchResponse]
|
26
|
+
def batch_process_request(process_batch_request, opts = {})
|
27
|
+
data, _status_code, _headers = batch_process_request_with_http_info(process_batch_request, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Batch Process Request
|
32
|
+
# A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
|
33
|
+
# @param process_batch_request [ProcessBatchRequest]
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(ProcessBatchResponse, Integer, Hash)>] ProcessBatchResponse data, response status code and response headers
|
36
|
+
def batch_process_request_with_http_info(process_batch_request, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_process_request ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'process_batch_request' is set
|
41
|
+
if @api_client.config.client_side_validation && process_batch_request.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'process_batch_request' when calling BatchProcessingApi.batch_process_request"
|
43
|
+
end
|
44
|
+
# resource path
|
45
|
+
local_var_path = '/v6/batch/process'
|
46
|
+
|
47
|
+
# query parameters
|
48
|
+
query_params = opts[:query_params] || {}
|
49
|
+
|
50
|
+
# header parameters
|
51
|
+
header_params = opts[:header_params] || {}
|
52
|
+
# HTTP header 'Accept' (if needed)
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
54
|
+
# HTTP header 'Content-Type'
|
55
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
56
|
+
if !content_type.nil?
|
57
|
+
header_params['Content-Type'] = content_type
|
58
|
+
end
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(process_batch_request)
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:debug_return_type] || 'ProcessBatchResponse'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"BatchProcessingApi.batch_process_request",
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: BatchProcessingApi#batch_process_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# BatchReportRequest
|
90
|
+
# The report for a given batch.
|
91
|
+
# @param batch_report_request [BatchReportRequest]
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [BatchReportResponseModel]
|
94
|
+
def batch_retrieve_request(batch_report_request, opts = {})
|
95
|
+
data, _status_code, _headers = batch_retrieve_request_with_http_info(batch_report_request, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# BatchReportRequest
|
100
|
+
# The report for a given batch.
|
101
|
+
# @param batch_report_request [BatchReportRequest]
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(BatchReportResponseModel, Integer, Hash)>] BatchReportResponseModel data, response status code and response headers
|
104
|
+
def batch_retrieve_request_with_http_info(batch_report_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_retrieve_request ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'batch_report_request' is set
|
109
|
+
if @api_client.config.client_side_validation && batch_report_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'batch_report_request' when calling BatchProcessingApi.batch_retrieve_request"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/v6/batch/retrieve'
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = opts[:query_params] || {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
124
|
+
if !content_type.nil?
|
125
|
+
header_params['Content-Type'] = content_type
|
126
|
+
end
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_report_request)
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'BatchReportResponseModel'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"BatchProcessingApi.batch_retrieve_request",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: BatchProcessingApi#batch_retrieve_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# CheckBatchStatus
|
158
|
+
# The operation is used to retrieve the status of a batch process.
|
159
|
+
# @param check_batch_status [CheckBatchStatus]
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [CheckBatchStatusResponse]
|
162
|
+
def check_batch_status_request(check_batch_status, opts = {})
|
163
|
+
data, _status_code, _headers = check_batch_status_request_with_http_info(check_batch_status, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# CheckBatchStatus
|
168
|
+
# The operation is used to retrieve the status of a batch process.
|
169
|
+
# @param check_batch_status [CheckBatchStatus]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @return [Array<(CheckBatchStatusResponse, Integer, Hash)>] CheckBatchStatusResponse data, response status code and response headers
|
172
|
+
def check_batch_status_request_with_http_info(check_batch_status, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: BatchProcessingApi.check_batch_status_request ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'check_batch_status' is set
|
177
|
+
if @api_client.config.client_side_validation && check_batch_status.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'check_batch_status' when calling BatchProcessingApi.check_batch_status_request"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = '/v6/batch/status'
|
182
|
+
|
183
|
+
# query parameters
|
184
|
+
query_params = opts[:query_params] || {}
|
185
|
+
|
186
|
+
# header parameters
|
187
|
+
header_params = opts[:header_params] || {}
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
190
|
+
# HTTP header 'Content-Type'
|
191
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
192
|
+
if !content_type.nil?
|
193
|
+
header_params['Content-Type'] = content_type
|
194
|
+
end
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = opts[:form_params] || {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(check_batch_status)
|
201
|
+
|
202
|
+
# return_type
|
203
|
+
return_type = opts[:debug_return_type] || 'CheckBatchStatusResponse'
|
204
|
+
|
205
|
+
# auth_names
|
206
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
207
|
+
|
208
|
+
new_options = opts.merge(
|
209
|
+
:operation => :"BatchProcessingApi.check_batch_status_request",
|
210
|
+
:header_params => header_params,
|
211
|
+
:query_params => query_params,
|
212
|
+
:form_params => form_params,
|
213
|
+
:body => post_body,
|
214
|
+
:auth_names => auth_names,
|
215
|
+
:return_type => return_type
|
216
|
+
)
|
217
|
+
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: BatchProcessingApi#check_batch_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is
|
4
|
+
# This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -48,7 +48,7 @@ module CityPayApiClient
|
|
48
48
|
fail ArgumentError, "Missing the required parameter 'card_id' when calling CardHolderAccountApi.account_card_delete_request"
|
49
49
|
end
|
50
50
|
# resource path
|
51
|
-
local_var_path = '/account/{accountid}/card/{cardId}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
|
51
|
+
local_var_path = '/v6/account/{accountid}/card/{cardId}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
|
52
52
|
|
53
53
|
# query parameters
|
54
54
|
query_params = opts[:query_params] || {}
|
@@ -62,15 +62,16 @@ module CityPayApiClient
|
|
62
62
|
form_params = opts[:form_params] || {}
|
63
63
|
|
64
64
|
# http body (model)
|
65
|
-
post_body = opts[:
|
65
|
+
post_body = opts[:debug_body]
|
66
66
|
|
67
67
|
# return_type
|
68
|
-
return_type = opts[:
|
68
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
69
69
|
|
70
70
|
# auth_names
|
71
|
-
auth_names = opts[:
|
71
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
72
72
|
|
73
73
|
new_options = opts.merge(
|
74
|
+
:operation => :"CardHolderAccountApi.account_card_delete_request",
|
74
75
|
:header_params => header_params,
|
75
76
|
:query_params => query_params,
|
76
77
|
:form_params => form_params,
|
@@ -116,7 +117,7 @@ module CityPayApiClient
|
|
116
117
|
fail ArgumentError, "Missing the required parameter 'register_card' when calling CardHolderAccountApi.account_card_register_request"
|
117
118
|
end
|
118
119
|
# resource path
|
119
|
-
local_var_path = '/account/{accountid}/register'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
120
|
+
local_var_path = '/v6/account/{accountid}/register'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
120
121
|
|
121
122
|
# query parameters
|
122
123
|
query_params = opts[:query_params] || {}
|
@@ -126,21 +127,25 @@ module CityPayApiClient
|
|
126
127
|
# HTTP header 'Accept' (if needed)
|
127
128
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
128
129
|
# HTTP header 'Content-Type'
|
129
|
-
|
130
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
131
|
+
if !content_type.nil?
|
132
|
+
header_params['Content-Type'] = content_type
|
133
|
+
end
|
130
134
|
|
131
135
|
# form parameters
|
132
136
|
form_params = opts[:form_params] || {}
|
133
137
|
|
134
138
|
# http body (model)
|
135
|
-
post_body = opts[:
|
139
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(register_card)
|
136
140
|
|
137
141
|
# return_type
|
138
|
-
return_type = opts[:
|
142
|
+
return_type = opts[:debug_return_type] || 'CardHolderAccount'
|
139
143
|
|
140
144
|
# auth_names
|
141
|
-
auth_names = opts[:
|
145
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
142
146
|
|
143
147
|
new_options = opts.merge(
|
148
|
+
:operation => :"CardHolderAccountApi.account_card_register_request",
|
144
149
|
:header_params => header_params,
|
145
150
|
:query_params => query_params,
|
146
151
|
:form_params => form_params,
|
@@ -192,7 +197,7 @@ module CityPayApiClient
|
|
192
197
|
fail ArgumentError, "Missing the required parameter 'card_status' when calling CardHolderAccountApi.account_card_status_request"
|
193
198
|
end
|
194
199
|
# resource path
|
195
|
-
local_var_path = '/account/{accountid}/card/{cardId}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
|
200
|
+
local_var_path = '/v6/account/{accountid}/card/{cardId}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
|
196
201
|
|
197
202
|
# query parameters
|
198
203
|
query_params = opts[:query_params] || {}
|
@@ -202,21 +207,25 @@ module CityPayApiClient
|
|
202
207
|
# HTTP header 'Accept' (if needed)
|
203
208
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
204
209
|
# HTTP header 'Content-Type'
|
205
|
-
|
210
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
211
|
+
if !content_type.nil?
|
212
|
+
header_params['Content-Type'] = content_type
|
213
|
+
end
|
206
214
|
|
207
215
|
# form parameters
|
208
216
|
form_params = opts[:form_params] || {}
|
209
217
|
|
210
218
|
# http body (model)
|
211
|
-
post_body = opts[:
|
219
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(card_status)
|
212
220
|
|
213
221
|
# return_type
|
214
|
-
return_type = opts[:
|
222
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
215
223
|
|
216
224
|
# auth_names
|
217
|
-
auth_names = opts[:
|
225
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
218
226
|
|
219
227
|
new_options = opts.merge(
|
228
|
+
:operation => :"CardHolderAccountApi.account_card_status_request",
|
220
229
|
:header_params => header_params,
|
221
230
|
:query_params => query_params,
|
222
231
|
:form_params => form_params,
|
@@ -262,7 +271,7 @@ module CityPayApiClient
|
|
262
271
|
fail ArgumentError, "Missing the required parameter 'contact_details' when calling CardHolderAccountApi.account_change_contact_request"
|
263
272
|
end
|
264
273
|
# resource path
|
265
|
-
local_var_path = '/account/{accountid}/contact'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
274
|
+
local_var_path = '/v6/account/{accountid}/contact'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
266
275
|
|
267
276
|
# query parameters
|
268
277
|
query_params = opts[:query_params] || {}
|
@@ -272,21 +281,25 @@ module CityPayApiClient
|
|
272
281
|
# HTTP header 'Accept' (if needed)
|
273
282
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
274
283
|
# HTTP header 'Content-Type'
|
275
|
-
|
284
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
285
|
+
if !content_type.nil?
|
286
|
+
header_params['Content-Type'] = content_type
|
287
|
+
end
|
276
288
|
|
277
289
|
# form parameters
|
278
290
|
form_params = opts[:form_params] || {}
|
279
291
|
|
280
292
|
# http body (model)
|
281
|
-
post_body = opts[:
|
293
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_details)
|
282
294
|
|
283
295
|
# return_type
|
284
|
-
return_type = opts[:
|
296
|
+
return_type = opts[:debug_return_type] || 'CardHolderAccount'
|
285
297
|
|
286
298
|
# auth_names
|
287
|
-
auth_names = opts[:
|
299
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
288
300
|
|
289
301
|
new_options = opts.merge(
|
302
|
+
:operation => :"CardHolderAccountApi.account_change_contact_request",
|
290
303
|
:header_params => header_params,
|
291
304
|
:query_params => query_params,
|
292
305
|
:form_params => form_params,
|
@@ -326,7 +339,7 @@ module CityPayApiClient
|
|
326
339
|
fail ArgumentError, "Missing the required parameter 'account_create' when calling CardHolderAccountApi.account_create"
|
327
340
|
end
|
328
341
|
# resource path
|
329
|
-
local_var_path = '/account/create'
|
342
|
+
local_var_path = '/v6/account/create'
|
330
343
|
|
331
344
|
# query parameters
|
332
345
|
query_params = opts[:query_params] || {}
|
@@ -336,21 +349,25 @@ module CityPayApiClient
|
|
336
349
|
# HTTP header 'Accept' (if needed)
|
337
350
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
338
351
|
# HTTP header 'Content-Type'
|
339
|
-
|
352
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
353
|
+
if !content_type.nil?
|
354
|
+
header_params['Content-Type'] = content_type
|
355
|
+
end
|
340
356
|
|
341
357
|
# form parameters
|
342
358
|
form_params = opts[:form_params] || {}
|
343
359
|
|
344
360
|
# http body (model)
|
345
|
-
post_body = opts[:
|
361
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(account_create)
|
346
362
|
|
347
363
|
# return_type
|
348
|
-
return_type = opts[:
|
364
|
+
return_type = opts[:debug_return_type] || 'CardHolderAccount'
|
349
365
|
|
350
366
|
# auth_names
|
351
|
-
auth_names = opts[:
|
367
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
352
368
|
|
353
369
|
new_options = opts.merge(
|
370
|
+
:operation => :"CardHolderAccountApi.account_create",
|
354
371
|
:header_params => header_params,
|
355
372
|
:query_params => query_params,
|
356
373
|
:form_params => form_params,
|
@@ -390,7 +407,7 @@ module CityPayApiClient
|
|
390
407
|
fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_delete_request"
|
391
408
|
end
|
392
409
|
# resource path
|
393
|
-
local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
410
|
+
local_var_path = '/v6/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
394
411
|
|
395
412
|
# query parameters
|
396
413
|
query_params = opts[:query_params] || {}
|
@@ -404,15 +421,16 @@ module CityPayApiClient
|
|
404
421
|
form_params = opts[:form_params] || {}
|
405
422
|
|
406
423
|
# http body (model)
|
407
|
-
post_body = opts[:
|
424
|
+
post_body = opts[:debug_body]
|
408
425
|
|
409
426
|
# return_type
|
410
|
-
return_type = opts[:
|
427
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
411
428
|
|
412
429
|
# auth_names
|
413
|
-
auth_names = opts[:
|
430
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
414
431
|
|
415
432
|
new_options = opts.merge(
|
433
|
+
:operation => :"CardHolderAccountApi.account_delete_request",
|
416
434
|
:header_params => header_params,
|
417
435
|
:query_params => query_params,
|
418
436
|
:form_params => form_params,
|
@@ -428,6 +446,69 @@ module CityPayApiClient
|
|
428
446
|
return data, status_code, headers
|
429
447
|
end
|
430
448
|
|
449
|
+
# Account Exists
|
450
|
+
# Checks that an account exists and is active by providing the account id as a url parameter.
|
451
|
+
# @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
452
|
+
# @param [Hash] opts the optional parameters
|
453
|
+
# @return [Exists]
|
454
|
+
def account_exists_request(accountid, opts = {})
|
455
|
+
data, _status_code, _headers = account_exists_request_with_http_info(accountid, opts)
|
456
|
+
data
|
457
|
+
end
|
458
|
+
|
459
|
+
# Account Exists
|
460
|
+
# Checks that an account exists and is active by providing the account id as a url parameter.
|
461
|
+
# @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
462
|
+
# @param [Hash] opts the optional parameters
|
463
|
+
# @return [Array<(Exists, Integer, Hash)>] Exists data, response status code and response headers
|
464
|
+
def account_exists_request_with_http_info(accountid, opts = {})
|
465
|
+
if @api_client.config.debugging
|
466
|
+
@api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_exists_request ...'
|
467
|
+
end
|
468
|
+
# verify the required parameter 'accountid' is set
|
469
|
+
if @api_client.config.client_side_validation && accountid.nil?
|
470
|
+
fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_exists_request"
|
471
|
+
end
|
472
|
+
# resource path
|
473
|
+
local_var_path = '/v6/account-exists/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
474
|
+
|
475
|
+
# query parameters
|
476
|
+
query_params = opts[:query_params] || {}
|
477
|
+
|
478
|
+
# header parameters
|
479
|
+
header_params = opts[:header_params] || {}
|
480
|
+
# HTTP header 'Accept' (if needed)
|
481
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
482
|
+
|
483
|
+
# form parameters
|
484
|
+
form_params = opts[:form_params] || {}
|
485
|
+
|
486
|
+
# http body (model)
|
487
|
+
post_body = opts[:debug_body]
|
488
|
+
|
489
|
+
# return_type
|
490
|
+
return_type = opts[:debug_return_type] || 'Exists'
|
491
|
+
|
492
|
+
# auth_names
|
493
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
494
|
+
|
495
|
+
new_options = opts.merge(
|
496
|
+
:operation => :"CardHolderAccountApi.account_exists_request",
|
497
|
+
:header_params => header_params,
|
498
|
+
:query_params => query_params,
|
499
|
+
:form_params => form_params,
|
500
|
+
:body => post_body,
|
501
|
+
:auth_names => auth_names,
|
502
|
+
:return_type => return_type
|
503
|
+
)
|
504
|
+
|
505
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
506
|
+
if @api_client.config.debugging
|
507
|
+
@api_client.config.logger.debug "API called: CardHolderAccountApi#account_exists_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
508
|
+
end
|
509
|
+
return data, status_code, headers
|
510
|
+
end
|
511
|
+
|
431
512
|
# Account Retrieval
|
432
513
|
# Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist for the same `id`, the first account created with that `id` will be returned. The account can be used for tokenisation processing by listing all cards assigned to the account. The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to enable a card holder to view their wallet and make constructive choices on which card to use.
|
433
514
|
# @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
@@ -452,7 +533,7 @@ module CityPayApiClient
|
|
452
533
|
fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_retrieve_request"
|
453
534
|
end
|
454
535
|
# resource path
|
455
|
-
local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
536
|
+
local_var_path = '/v6/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
456
537
|
|
457
538
|
# query parameters
|
458
539
|
query_params = opts[:query_params] || {}
|
@@ -466,15 +547,16 @@ module CityPayApiClient
|
|
466
547
|
form_params = opts[:form_params] || {}
|
467
548
|
|
468
549
|
# http body (model)
|
469
|
-
post_body = opts[:
|
550
|
+
post_body = opts[:debug_body]
|
470
551
|
|
471
552
|
# return_type
|
472
|
-
return_type = opts[:
|
553
|
+
return_type = opts[:debug_return_type] || 'CardHolderAccount'
|
473
554
|
|
474
555
|
# auth_names
|
475
|
-
auth_names = opts[:
|
556
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
476
557
|
|
477
558
|
new_options = opts.merge(
|
559
|
+
:operation => :"CardHolderAccountApi.account_retrieve_request",
|
478
560
|
:header_params => header_params,
|
479
561
|
:query_params => query_params,
|
480
562
|
:form_params => form_params,
|
@@ -520,7 +602,7 @@ module CityPayApiClient
|
|
520
602
|
fail ArgumentError, "Missing the required parameter 'account_status' when calling CardHolderAccountApi.account_status_request"
|
521
603
|
end
|
522
604
|
# resource path
|
523
|
-
local_var_path = '/account/{accountid}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
605
|
+
local_var_path = '/v6/account/{accountid}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
|
524
606
|
|
525
607
|
# query parameters
|
526
608
|
query_params = opts[:query_params] || {}
|
@@ -530,21 +612,25 @@ module CityPayApiClient
|
|
530
612
|
# HTTP header 'Accept' (if needed)
|
531
613
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
532
614
|
# HTTP header 'Content-Type'
|
533
|
-
|
615
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
616
|
+
if !content_type.nil?
|
617
|
+
header_params['Content-Type'] = content_type
|
618
|
+
end
|
534
619
|
|
535
620
|
# form parameters
|
536
621
|
form_params = opts[:form_params] || {}
|
537
622
|
|
538
623
|
# http body (model)
|
539
|
-
post_body = opts[:
|
624
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(account_status)
|
540
625
|
|
541
626
|
# return_type
|
542
|
-
return_type = opts[:
|
627
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
543
628
|
|
544
629
|
# auth_names
|
545
|
-
auth_names = opts[:
|
630
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
546
631
|
|
547
632
|
new_options = opts.merge(
|
633
|
+
:operation => :"CardHolderAccountApi.account_status_request",
|
548
634
|
:header_params => header_params,
|
549
635
|
:query_params => query_params,
|
550
636
|
:form_params => form_params,
|
@@ -561,7 +647,7 @@ module CityPayApiClient
|
|
561
647
|
end
|
562
648
|
|
563
649
|
# Charge
|
564
|
-
# A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage.
|
650
|
+
# A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
|
565
651
|
# @param charge_request [ChargeRequest]
|
566
652
|
# @param [Hash] opts the optional parameters
|
567
653
|
# @return [Decision]
|
@@ -571,7 +657,7 @@ module CityPayApiClient
|
|
571
657
|
end
|
572
658
|
|
573
659
|
# Charge
|
574
|
-
# A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage.
|
660
|
+
# A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
|
575
661
|
# @param charge_request [ChargeRequest]
|
576
662
|
# @param [Hash] opts the optional parameters
|
577
663
|
# @return [Array<(Decision, Integer, Hash)>] Decision data, response status code and response headers
|
@@ -584,7 +670,7 @@ module CityPayApiClient
|
|
584
670
|
fail ArgumentError, "Missing the required parameter 'charge_request' when calling CardHolderAccountApi.charge_request"
|
585
671
|
end
|
586
672
|
# resource path
|
587
|
-
local_var_path = '/charge'
|
673
|
+
local_var_path = '/v6/charge'
|
588
674
|
|
589
675
|
# query parameters
|
590
676
|
query_params = opts[:query_params] || {}
|
@@ -594,21 +680,25 @@ module CityPayApiClient
|
|
594
680
|
# HTTP header 'Accept' (if needed)
|
595
681
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
596
682
|
# HTTP header 'Content-Type'
|
597
|
-
|
683
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
684
|
+
if !content_type.nil?
|
685
|
+
header_params['Content-Type'] = content_type
|
686
|
+
end
|
598
687
|
|
599
688
|
# form parameters
|
600
689
|
form_params = opts[:form_params] || {}
|
601
690
|
|
602
691
|
# http body (model)
|
603
|
-
post_body = opts[:
|
692
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(charge_request)
|
604
693
|
|
605
694
|
# return_type
|
606
|
-
return_type = opts[:
|
695
|
+
return_type = opts[:debug_return_type] || 'Decision'
|
607
696
|
|
608
697
|
# auth_names
|
609
|
-
auth_names = opts[:
|
698
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
610
699
|
|
611
700
|
new_options = opts.merge(
|
701
|
+
:operation => :"CardHolderAccountApi.charge_request",
|
612
702
|
:header_params => header_params,
|
613
703
|
:query_params => query_params,
|
614
704
|
:form_params => form_params,
|