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,356 @@
|
|
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 OperationalFunctionsApi
|
16
|
+
attr_accessor :api_client
|
17
|
+
|
18
|
+
def initialize(api_client = ApiClient.default)
|
19
|
+
@api_client = api_client
|
20
|
+
end
|
21
|
+
# ACL Check Request
|
22
|
+
# Allows the checking of IP addresses against configured ACLs. Requests can perform a lookup of addresses in subnets and services such as AWS or Azure to check that those addresses are listed in the ACLs.
|
23
|
+
# @param acl_check_request [AclCheckRequest]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [AclCheckResponseModel]
|
26
|
+
def acl_check_request(acl_check_request, opts = {})
|
27
|
+
data, _status_code, _headers = acl_check_request_with_http_info(acl_check_request, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# ACL Check Request
|
32
|
+
# Allows the checking of IP addresses against configured ACLs. Requests can perform a lookup of addresses in subnets and services such as AWS or Azure to check that those addresses are listed in the ACLs.
|
33
|
+
# @param acl_check_request [AclCheckRequest]
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(AclCheckResponseModel, Integer, Hash)>] AclCheckResponseModel data, response status code and response headers
|
36
|
+
def acl_check_request_with_http_info(acl_check_request, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: OperationalFunctionsApi.acl_check_request ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'acl_check_request' is set
|
41
|
+
if @api_client.config.client_side_validation && acl_check_request.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'acl_check_request' when calling OperationalFunctionsApi.acl_check_request"
|
43
|
+
end
|
44
|
+
# resource path
|
45
|
+
local_var_path = '/v6/acl/check'
|
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(acl_check_request)
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:debug_return_type] || 'AclCheckResponseModel'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"OperationalFunctionsApi.acl_check_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: OperationalFunctionsApi#acl_check_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Domain Key Check Request
|
90
|
+
# Checks the contents of a `domain key`. Can be used for operational processes to ensure that the properties of a domain key meet their expectations.
|
91
|
+
# @param domain_key_check_request [DomainKeyCheckRequest]
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [DomainKeyResponse]
|
94
|
+
def domain_key_check_request(domain_key_check_request, opts = {})
|
95
|
+
data, _status_code, _headers = domain_key_check_request_with_http_info(domain_key_check_request, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Domain Key Check Request
|
100
|
+
# Checks the contents of a `domain key`. Can be used for operational processes to ensure that the properties of a domain key meet their expectations.
|
101
|
+
# @param domain_key_check_request [DomainKeyCheckRequest]
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(DomainKeyResponse, Integer, Hash)>] DomainKeyResponse data, response status code and response headers
|
104
|
+
def domain_key_check_request_with_http_info(domain_key_check_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: OperationalFunctionsApi.domain_key_check_request ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'domain_key_check_request' is set
|
109
|
+
if @api_client.config.client_side_validation && domain_key_check_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'domain_key_check_request' when calling OperationalFunctionsApi.domain_key_check_request"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/dk/check'
|
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(domain_key_check_request)
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'DomainKeyResponse'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"OperationalFunctionsApi.domain_key_check_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: OperationalFunctionsApi#domain_key_check_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Domain Key Generation Request
|
158
|
+
# Generates a domain key based on the permissions of the calling `api-key`. Domain keys can be used in _Direct Post_ and `XHR` calls to the API services.
|
159
|
+
# @param domain_key_request [DomainKeyRequest]
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [DomainKeyResponse]
|
162
|
+
def domain_key_gen_request(domain_key_request, opts = {})
|
163
|
+
data, _status_code, _headers = domain_key_gen_request_with_http_info(domain_key_request, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# Domain Key Generation Request
|
168
|
+
# Generates a domain key based on the permissions of the calling `api-key`. Domain keys can be used in _Direct Post_ and `XHR` calls to the API services.
|
169
|
+
# @param domain_key_request [DomainKeyRequest]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @return [Array<(DomainKeyResponse, Integer, Hash)>] DomainKeyResponse data, response status code and response headers
|
172
|
+
def domain_key_gen_request_with_http_info(domain_key_request, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: OperationalFunctionsApi.domain_key_gen_request ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'domain_key_request' is set
|
177
|
+
if @api_client.config.client_side_validation && domain_key_request.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'domain_key_request' when calling OperationalFunctionsApi.domain_key_gen_request"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = '/dk/gen'
|
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(domain_key_request)
|
201
|
+
|
202
|
+
# return_type
|
203
|
+
return_type = opts[:debug_return_type] || 'DomainKeyResponse'
|
204
|
+
|
205
|
+
# auth_names
|
206
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
207
|
+
|
208
|
+
new_options = opts.merge(
|
209
|
+
:operation => :"OperationalFunctionsApi.domain_key_gen_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: OperationalFunctionsApi#domain_key_gen_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
225
|
+
# List Merchants Request
|
226
|
+
# An operational request to list current merchants for a client. ### Sorting Sorting can be performed by include a query parameter i.e. `/merchants/?sort=merchantid` Fields that can be sorted are `merchantid` or `name`.
|
227
|
+
# @param clientid [String] The client id to return merchants for, specifying \"default\" will use the value in your api key.
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [ListMerchantsResponse]
|
230
|
+
def list_merchants_request(clientid, opts = {})
|
231
|
+
data, _status_code, _headers = list_merchants_request_with_http_info(clientid, opts)
|
232
|
+
data
|
233
|
+
end
|
234
|
+
|
235
|
+
# List Merchants Request
|
236
|
+
# An operational request to list current merchants for a client. ### Sorting Sorting can be performed by include a query parameter i.e. `/merchants/?sort=merchantid` Fields that can be sorted are `merchantid` or `name`.
|
237
|
+
# @param clientid [String] The client id to return merchants for, specifying \"default\" will use the value in your api key.
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(ListMerchantsResponse, Integer, Hash)>] ListMerchantsResponse data, response status code and response headers
|
240
|
+
def list_merchants_request_with_http_info(clientid, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: OperationalFunctionsApi.list_merchants_request ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'clientid' is set
|
245
|
+
if @api_client.config.client_side_validation && clientid.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'clientid' when calling OperationalFunctionsApi.list_merchants_request"
|
247
|
+
end
|
248
|
+
# resource path
|
249
|
+
local_var_path = '/v6/merchants/{clientid}'.sub('{' + 'clientid' + '}', CGI.escape(clientid.to_s))
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = opts[:query_params] || {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = opts[:header_params] || {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
258
|
+
|
259
|
+
# form parameters
|
260
|
+
form_params = opts[:form_params] || {}
|
261
|
+
|
262
|
+
# http body (model)
|
263
|
+
post_body = opts[:debug_body]
|
264
|
+
|
265
|
+
# return_type
|
266
|
+
return_type = opts[:debug_return_type] || 'ListMerchantsResponse'
|
267
|
+
|
268
|
+
# auth_names
|
269
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
270
|
+
|
271
|
+
new_options = opts.merge(
|
272
|
+
:operation => :"OperationalFunctionsApi.list_merchants_request",
|
273
|
+
:header_params => header_params,
|
274
|
+
:query_params => query_params,
|
275
|
+
:form_params => form_params,
|
276
|
+
:body => post_body,
|
277
|
+
:auth_names => auth_names,
|
278
|
+
:return_type => return_type
|
279
|
+
)
|
280
|
+
|
281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug "API called: OperationalFunctionsApi#list_merchants_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
284
|
+
end
|
285
|
+
return data, status_code, headers
|
286
|
+
end
|
287
|
+
|
288
|
+
# Ping Request
|
289
|
+
# A ping request which performs a connection and authentication test to the CityPay API server. The request will return a standard Acknowledgement with a response code `044` to signify a successful ping. The ping call is useful to confirm that you will be able to access the API from behind any firewalls and that the permission model is granting access from your source.
|
290
|
+
# @param ping [Ping]
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [Acknowledgement]
|
293
|
+
def ping_request(ping, opts = {})
|
294
|
+
data, _status_code, _headers = ping_request_with_http_info(ping, opts)
|
295
|
+
data
|
296
|
+
end
|
297
|
+
|
298
|
+
# Ping Request
|
299
|
+
# A ping request which performs a connection and authentication test to the CityPay API server. The request will return a standard Acknowledgement with a response code `044` to signify a successful ping. The ping call is useful to confirm that you will be able to access the API from behind any firewalls and that the permission model is granting access from your source.
|
300
|
+
# @param ping [Ping]
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
303
|
+
def ping_request_with_http_info(ping, opts = {})
|
304
|
+
if @api_client.config.debugging
|
305
|
+
@api_client.config.logger.debug 'Calling API: OperationalFunctionsApi.ping_request ...'
|
306
|
+
end
|
307
|
+
# verify the required parameter 'ping' is set
|
308
|
+
if @api_client.config.client_side_validation && ping.nil?
|
309
|
+
fail ArgumentError, "Missing the required parameter 'ping' when calling OperationalFunctionsApi.ping_request"
|
310
|
+
end
|
311
|
+
# resource path
|
312
|
+
local_var_path = '/v6/ping'
|
313
|
+
|
314
|
+
# query parameters
|
315
|
+
query_params = opts[:query_params] || {}
|
316
|
+
|
317
|
+
# header parameters
|
318
|
+
header_params = opts[:header_params] || {}
|
319
|
+
# HTTP header 'Accept' (if needed)
|
320
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/x-www-form-urlencoded', 'application/json', 'text/xml'])
|
321
|
+
# HTTP header 'Content-Type'
|
322
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'text/xml'])
|
323
|
+
if !content_type.nil?
|
324
|
+
header_params['Content-Type'] = content_type
|
325
|
+
end
|
326
|
+
|
327
|
+
# form parameters
|
328
|
+
form_params = opts[:form_params] || {}
|
329
|
+
|
330
|
+
# http body (model)
|
331
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(ping)
|
332
|
+
|
333
|
+
# return_type
|
334
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
335
|
+
|
336
|
+
# auth_names
|
337
|
+
auth_names = opts[:debug_auth_names] || ['cp-domain-key', 'cp-api-key']
|
338
|
+
|
339
|
+
new_options = opts.merge(
|
340
|
+
:operation => :"OperationalFunctionsApi.ping_request",
|
341
|
+
:header_params => header_params,
|
342
|
+
:query_params => query_params,
|
343
|
+
:form_params => form_params,
|
344
|
+
:body => post_body,
|
345
|
+
:auth_names => auth_names,
|
346
|
+
:return_type => return_type
|
347
|
+
)
|
348
|
+
|
349
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
350
|
+
if @api_client.config.debugging
|
351
|
+
@api_client.config.logger.debug "API called: OperationalFunctionsApi#ping_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
352
|
+
end
|
353
|
+
return data, status_code, headers
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|