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,614 @@
|
|
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 PaylinkApi
|
16
|
+
attr_accessor :api_client
|
17
|
+
|
18
|
+
def initialize(api_client = ApiClient.default)
|
19
|
+
@api_client = api_client
|
20
|
+
end
|
21
|
+
# Paylink Token Adjustment
|
22
|
+
# Adjusts a TokenRequest's amount value when for instance 1. a Token is created and the shopping cart is updated 2. an invoice is adjusted either due to part payment or due to increased incurred costs.
|
23
|
+
# @param token [String] The token returned by the create token process.
|
24
|
+
# @param paylink_adjustment_request [PaylinkAdjustmentRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Acknowledgement]
|
27
|
+
def token_adjustment_request(token, paylink_adjustment_request, opts = {})
|
28
|
+
data, _status_code, _headers = token_adjustment_request_with_http_info(token, paylink_adjustment_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Paylink Token Adjustment
|
33
|
+
# Adjusts a TokenRequest's amount value when for instance 1. a Token is created and the shopping cart is updated 2. an invoice is adjusted either due to part payment or due to increased incurred costs.
|
34
|
+
# @param token [String] The token returned by the create token process.
|
35
|
+
# @param paylink_adjustment_request [PaylinkAdjustmentRequest]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
38
|
+
def token_adjustment_request_with_http_info(token, paylink_adjustment_request, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_adjustment_request ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'token' is set
|
43
|
+
if @api_client.config.client_side_validation && token.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_adjustment_request"
|
45
|
+
end
|
46
|
+
# verify the required parameter 'paylink_adjustment_request' is set
|
47
|
+
if @api_client.config.client_side_validation && paylink_adjustment_request.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'paylink_adjustment_request' when calling PaylinkApi.token_adjustment_request"
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/paylink/{token}/adjustment'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = opts[:query_params] || {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = opts[:header_params] || {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
60
|
+
# HTTP header 'Content-Type'
|
61
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
62
|
+
if !content_type.nil?
|
63
|
+
header_params['Content-Type'] = content_type
|
64
|
+
end
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(paylink_adjustment_request)
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
74
|
+
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
77
|
+
|
78
|
+
new_options = opts.merge(
|
79
|
+
:operation => :"PaylinkApi.token_adjustment_request",
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_adjustment_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Paylink Token Audit
|
96
|
+
# Allows for the changes to a pre-existing token.
|
97
|
+
# @param paylink_token_status_change_request [PaylinkTokenStatusChangeRequest]
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [PaylinkTokenStatusChangeResponse]
|
100
|
+
def token_changes_request(paylink_token_status_change_request, opts = {})
|
101
|
+
data, _status_code, _headers = token_changes_request_with_http_info(paylink_token_status_change_request, opts)
|
102
|
+
data
|
103
|
+
end
|
104
|
+
|
105
|
+
# Paylink Token Audit
|
106
|
+
# Allows for the changes to a pre-existing token.
|
107
|
+
# @param paylink_token_status_change_request [PaylinkTokenStatusChangeRequest]
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [Array<(PaylinkTokenStatusChangeResponse, Integer, Hash)>] PaylinkTokenStatusChangeResponse data, response status code and response headers
|
110
|
+
def token_changes_request_with_http_info(paylink_token_status_change_request, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_changes_request ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'paylink_token_status_change_request' is set
|
115
|
+
if @api_client.config.client_side_validation && paylink_token_status_change_request.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'paylink_token_status_change_request' when calling PaylinkApi.token_changes_request"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '/paylink/token/changes'
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = opts[:header_params] || {}
|
126
|
+
# HTTP header 'Accept' (if needed)
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
128
|
+
# HTTP header 'Content-Type'
|
129
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
130
|
+
if !content_type.nil?
|
131
|
+
header_params['Content-Type'] = content_type
|
132
|
+
end
|
133
|
+
|
134
|
+
# form parameters
|
135
|
+
form_params = opts[:form_params] || {}
|
136
|
+
|
137
|
+
# http body (model)
|
138
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(paylink_token_status_change_request)
|
139
|
+
|
140
|
+
# return_type
|
141
|
+
return_type = opts[:debug_return_type] || 'PaylinkTokenStatusChangeResponse'
|
142
|
+
|
143
|
+
# auth_names
|
144
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
145
|
+
|
146
|
+
new_options = opts.merge(
|
147
|
+
:operation => :"PaylinkApi.token_changes_request",
|
148
|
+
:header_params => header_params,
|
149
|
+
:query_params => query_params,
|
150
|
+
:form_params => form_params,
|
151
|
+
:body => post_body,
|
152
|
+
:auth_names => auth_names,
|
153
|
+
:return_type => return_type
|
154
|
+
)
|
155
|
+
|
156
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
157
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_changes_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
159
|
+
end
|
160
|
+
return data, status_code, headers
|
161
|
+
end
|
162
|
+
|
163
|
+
# Close Paylink Token
|
164
|
+
# Marks a Paylink Token as closed. This closes the Token for any future action and the Token will not appear in any status request calls.
|
165
|
+
# @param token [String] The token returned by the create token process.
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @return [Acknowledgement]
|
168
|
+
def token_close_request(token, opts = {})
|
169
|
+
data, _status_code, _headers = token_close_request_with_http_info(token, opts)
|
170
|
+
data
|
171
|
+
end
|
172
|
+
|
173
|
+
# Close Paylink Token
|
174
|
+
# Marks a Paylink Token as closed. This closes the Token for any future action and the Token will not appear in any status request calls.
|
175
|
+
# @param token [String] The token returned by the create token process.
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
178
|
+
def token_close_request_with_http_info(token, opts = {})
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_close_request ...'
|
181
|
+
end
|
182
|
+
# verify the required parameter 'token' is set
|
183
|
+
if @api_client.config.client_side_validation && token.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_close_request"
|
185
|
+
end
|
186
|
+
# resource path
|
187
|
+
local_var_path = '/paylink/{token}/close'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = opts[:query_params] || {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
196
|
+
|
197
|
+
# form parameters
|
198
|
+
form_params = opts[:form_params] || {}
|
199
|
+
|
200
|
+
# http body (model)
|
201
|
+
post_body = opts[:debug_body]
|
202
|
+
|
203
|
+
# return_type
|
204
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
205
|
+
|
206
|
+
# auth_names
|
207
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
208
|
+
|
209
|
+
new_options = opts.merge(
|
210
|
+
:operation => :"PaylinkApi.token_close_request",
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => return_type
|
217
|
+
)
|
218
|
+
|
219
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_close_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
222
|
+
end
|
223
|
+
return data, status_code, headers
|
224
|
+
end
|
225
|
+
|
226
|
+
# Create Bill Payment Paylink Token
|
227
|
+
# CityPay Paylink supports invoice and bill payment services by allowing merchants to raise an invoice in their systems and associate the invoice with a Paylink checkout token. CityPay will co-ordinate the checkout flow in relationship with your customer. Our bill payment solution may be used to streamline the payment flow with cardholders to allow your invoice to be paid promptly and via multiple payment channels such as Card Payment, Apple Pay or Google Pay. The bill payment service allows 1. setting up notification paths to an end customer, such as SMS or Email 2. enabling attachments to be included with Paylink tokens 3. produce chaser notifications for unpaid invoices 4. provide callbacks for notification of the payment of an invoice 5. support part payments against an invoice 6. support of field guards to protect the payment screen 7. support of status reporting on tokens 8. URL short codes for SMS notifications <img src=\"images/merchant-BPS-workflow.png\" alt=\"Paylink BPSv2 Overview\" width=\"50%\"/> ### Notification Paths Notification paths can be provided which identify the channels for communication of the invoice availability. Up to 3 notification paths may be provided per request. Each notification uses a template to generate the body of the message. This allows for variable text to be sent out and customised for each call. SMS messages use URL Short Codes (USC) as a payment link to the invoice payment page. This allows for a standard payment URL to be shortened for optimised usage in SMS. For instance a URL of `https://checkout.citypay.com/PL1234/s348yb8yna4a48n2f8nq2f3msgyng-psn348ynaw8ynaw/en` becomes `citypay.com/Za48na3x`. Each USC is unique however it is a requirement that each USC generated is protected with Field Guards to ensure that sensitive data (such as customer contact details and GDPR) is protected. To send a notification path, append a `notification-path` property to the request. ```json { \"sms_notification_path\": { \"to\": \"+441534884000\" }, \"email_notification_path\": { \"to\": [\"help-desk@citypay.com\"], \"cc\": [\"third-party@citypay.com\"], \"reply\": [\"help@my-company.com\"] } } ``` Notification paths trigger a number of events which are stored as part of the timeline of events of a Paylink token - `BillPaymentSmsNotificationQueued` - identifies when an SMS notification has been queued for delivery - `BillPaymentSmsNotificationSent` - identifies when an SMS notification has been sent to the upstream network - `BillPaymentSmsNotificationDelivered` - identifies when an SMS notification has been delivered as notified by the upstream network - `BillPaymentSmsNotificationUndelivered` - identifies when an SMS notification has undelivered notification is provided by the upstream network - `BillPaymentSmsNotificationFailure` - identifies when an SMS notification has failed - `BillPaymentEmailNotificationQueued` - identifies when an email notification has been queued for delivery - `BillPaymentEmailNotificationSent` - identifies when an email notification has been accepted by our SMS forwarder - `BillPaymentEmailNotificationFailure` - identifies when an email notification has failed delivery #### SMS Notification Path SMS originated from a CityPay pool of numbers and by default only sends to country codes where the service is registered. SMSs may contain a From field which is configured as part of you onboarding and have a name associated to identify the service origin. For example if your business is titled `Health Surgery Ltd` the SMS may be sent to originate from `Health Surgery`. SMS is also configured for a \"polite mode\". This mode ensures that SMSs aren't sent in the middle of the night when backend services ordinarily run. SMSs will be queued until the time range is deemed as polite. Normally this is between 8am and 9pm. | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string | Reserved | The phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format to send the message to. | #### Email Notification Paths | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string[] | Required | An array of email addresses to be used for delivery. A maximum of 5 addresses can be added. | | cc | string[] | Required | An array of email addresses to be used for cc delivery. A maximum of 5 addresses can be added. | | bcc | string[] | Required | An array of email addresses to be used for bcc delivery. A maximum of 5 addresses can be added. | | reply_to | string[] | Required | An array of email addresses to be used for the Reply-To header of an email. | ### Field Guards To ensure that invoices are paid by the intended recipient, Paylink supports the addition of Field Guards. A Field Guard is an intended field which is to be used as a form of guarded authentication. More than 1 field can be requested. <img src=\"images/paylink-field-guards.png\" alt=\"Paylink Field Guards\" width=\"50%\"/> To determine the source value of the field, each field name is searched in the order of - identifier - cardholder data such as name - custom parameters - pass through data If no field values are found, the token request returns a D041 validation error. #### Authentication and Validation When values are entered by the user, resultant comparisons are performed by 1. Transliteration of both the source value and entered value. For example, names with accents (e.g. é will become e) 2. Only Alphanumeric values are retained any whitespace or special characters are ignored 3. Case is ignored Should all values match, the user is authenticated and can continue to the payment form rendered by the Paylink server. On successful login, an event will be added to include that the access guard validated access. #### Access-Key To ensure that a user does not need to re-enter these values multiple times, a cookie is pushed to the user’s browser with an access-key digest value. This value will be presented to the server on each refresh therefore allowing the guard to accept the call. Each value is uniquely stored per merchant account and cannot be shared cross merchant. The lifetime of the cookie is set to 24 hours. #### Brute Force Prevention To prevent multiple calls hitting the server, attempting a brute force attack, the login process 1. is fronted by a contemporary web application firewall 2. creates an event for each token when access was denied 3. should the number of failed events breach more than 5 in 30 minutes, the token is locked for an hour 4. should the number of events breach more than 20 the token is fully locked ### Attachments Attachments can be included in the request in 2 ways 1. Via a data element direct in the request 2. Via a URL upload to a provided pre-signed URL The decision of which option is dependent on the size of the attachments. Should the attachment size be greater than 32kb a URL upload is required. Small attachments can be included in the JSON request. This is to prevent our web firewall from blocking your request and to also ensure efficiency of larger file uploads. There is a maximum of 3 attachments that can be added to a request. ```json [{ \"filename\": \"invoice1.pdf\", \"mime-type\": \"application/pdf\" },{ \"filename\": \"invoice2.pdf\", \"data\": \"b4sE64Enc0dEd...=\", \"mime-type\": \"application/pdf\" }] ``` | Field | Type | Usage | Description | |-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------| | filename | string | Required | The name of the attachment normally taken from the filename. You should not include the filename path as appropriate | | data | string | Optional | base64 encoding of the file if less than 32kb in size | | mime-type | string | Required | The mime type of the attachment as defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html). Currently only `application/pdf` is supported | #### Attachment Result A result of an attachment specifies whether the attachment was successfully added or whether a further upload is requried | Field | Type | Usage | Description | |--------|--------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------| | result | string | Required | `OK` should the file have uploaded or `UPLOAD` if the file is required to be uploaded. | | name | string | Required | The filename that was specified in the upload process | | url | string | Optional | Should an upload be required, this URL is available for an upload to be issued. The URL is only available for uploads for 24 hours from creation. |
|
228
|
+
# @param paylink_bill_payment_token_request [PaylinkBillPaymentTokenRequest]
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [PaylinkTokenCreated]
|
231
|
+
def token_create_bill_payment_request(paylink_bill_payment_token_request, opts = {})
|
232
|
+
data, _status_code, _headers = token_create_bill_payment_request_with_http_info(paylink_bill_payment_token_request, opts)
|
233
|
+
data
|
234
|
+
end
|
235
|
+
|
236
|
+
# Create Bill Payment Paylink Token
|
237
|
+
# CityPay Paylink supports invoice and bill payment services by allowing merchants to raise an invoice in their systems and associate the invoice with a Paylink checkout token. CityPay will co-ordinate the checkout flow in relationship with your customer. Our bill payment solution may be used to streamline the payment flow with cardholders to allow your invoice to be paid promptly and via multiple payment channels such as Card Payment, Apple Pay or Google Pay. The bill payment service allows 1. setting up notification paths to an end customer, such as SMS or Email 2. enabling attachments to be included with Paylink tokens 3. produce chaser notifications for unpaid invoices 4. provide callbacks for notification of the payment of an invoice 5. support part payments against an invoice 6. support of field guards to protect the payment screen 7. support of status reporting on tokens 8. URL short codes for SMS notifications <img src=\"images/merchant-BPS-workflow.png\" alt=\"Paylink BPSv2 Overview\" width=\"50%\"/> ### Notification Paths Notification paths can be provided which identify the channels for communication of the invoice availability. Up to 3 notification paths may be provided per request. Each notification uses a template to generate the body of the message. This allows for variable text to be sent out and customised for each call. SMS messages use URL Short Codes (USC) as a payment link to the invoice payment page. This allows for a standard payment URL to be shortened for optimised usage in SMS. For instance a URL of `https://checkout.citypay.com/PL1234/s348yb8yna4a48n2f8nq2f3msgyng-psn348ynaw8ynaw/en` becomes `citypay.com/Za48na3x`. Each USC is unique however it is a requirement that each USC generated is protected with Field Guards to ensure that sensitive data (such as customer contact details and GDPR) is protected. To send a notification path, append a `notification-path` property to the request. ```json { \"sms_notification_path\": { \"to\": \"+441534884000\" }, \"email_notification_path\": { \"to\": [\"help-desk@citypay.com\"], \"cc\": [\"third-party@citypay.com\"], \"reply\": [\"help@my-company.com\"] } } ``` Notification paths trigger a number of events which are stored as part of the timeline of events of a Paylink token - `BillPaymentSmsNotificationQueued` - identifies when an SMS notification has been queued for delivery - `BillPaymentSmsNotificationSent` - identifies when an SMS notification has been sent to the upstream network - `BillPaymentSmsNotificationDelivered` - identifies when an SMS notification has been delivered as notified by the upstream network - `BillPaymentSmsNotificationUndelivered` - identifies when an SMS notification has undelivered notification is provided by the upstream network - `BillPaymentSmsNotificationFailure` - identifies when an SMS notification has failed - `BillPaymentEmailNotificationQueued` - identifies when an email notification has been queued for delivery - `BillPaymentEmailNotificationSent` - identifies when an email notification has been accepted by our SMS forwarder - `BillPaymentEmailNotificationFailure` - identifies when an email notification has failed delivery #### SMS Notification Path SMS originated from a CityPay pool of numbers and by default only sends to country codes where the service is registered. SMSs may contain a From field which is configured as part of you onboarding and have a name associated to identify the service origin. For example if your business is titled `Health Surgery Ltd` the SMS may be sent to originate from `Health Surgery`. SMS is also configured for a \"polite mode\". This mode ensures that SMSs aren't sent in the middle of the night when backend services ordinarily run. SMSs will be queued until the time range is deemed as polite. Normally this is between 8am and 9pm. | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string | Reserved | The phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format to send the message to. | #### Email Notification Paths | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string[] | Required | An array of email addresses to be used for delivery. A maximum of 5 addresses can be added. | | cc | string[] | Required | An array of email addresses to be used for cc delivery. A maximum of 5 addresses can be added. | | bcc | string[] | Required | An array of email addresses to be used for bcc delivery. A maximum of 5 addresses can be added. | | reply_to | string[] | Required | An array of email addresses to be used for the Reply-To header of an email. | ### Field Guards To ensure that invoices are paid by the intended recipient, Paylink supports the addition of Field Guards. A Field Guard is an intended field which is to be used as a form of guarded authentication. More than 1 field can be requested. <img src=\"images/paylink-field-guards.png\" alt=\"Paylink Field Guards\" width=\"50%\"/> To determine the source value of the field, each field name is searched in the order of - identifier - cardholder data such as name - custom parameters - pass through data If no field values are found, the token request returns a D041 validation error. #### Authentication and Validation When values are entered by the user, resultant comparisons are performed by 1. Transliteration of both the source value and entered value. For example, names with accents (e.g. é will become e) 2. Only Alphanumeric values are retained any whitespace or special characters are ignored 3. Case is ignored Should all values match, the user is authenticated and can continue to the payment form rendered by the Paylink server. On successful login, an event will be added to include that the access guard validated access. #### Access-Key To ensure that a user does not need to re-enter these values multiple times, a cookie is pushed to the user’s browser with an access-key digest value. This value will be presented to the server on each refresh therefore allowing the guard to accept the call. Each value is uniquely stored per merchant account and cannot be shared cross merchant. The lifetime of the cookie is set to 24 hours. #### Brute Force Prevention To prevent multiple calls hitting the server, attempting a brute force attack, the login process 1. is fronted by a contemporary web application firewall 2. creates an event for each token when access was denied 3. should the number of failed events breach more than 5 in 30 minutes, the token is locked for an hour 4. should the number of events breach more than 20 the token is fully locked ### Attachments Attachments can be included in the request in 2 ways 1. Via a data element direct in the request 2. Via a URL upload to a provided pre-signed URL The decision of which option is dependent on the size of the attachments. Should the attachment size be greater than 32kb a URL upload is required. Small attachments can be included in the JSON request. This is to prevent our web firewall from blocking your request and to also ensure efficiency of larger file uploads. There is a maximum of 3 attachments that can be added to a request. ```json [{ \"filename\": \"invoice1.pdf\", \"mime-type\": \"application/pdf\" },{ \"filename\": \"invoice2.pdf\", \"data\": \"b4sE64Enc0dEd...=\", \"mime-type\": \"application/pdf\" }] ``` | Field | Type | Usage | Description | |-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------| | filename | string | Required | The name of the attachment normally taken from the filename. You should not include the filename path as appropriate | | data | string | Optional | base64 encoding of the file if less than 32kb in size | | mime-type | string | Required | The mime type of the attachment as defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html). Currently only `application/pdf` is supported | #### Attachment Result A result of an attachment specifies whether the attachment was successfully added or whether a further upload is requried | Field | Type | Usage | Description | |--------|--------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------| | result | string | Required | `OK` should the file have uploaded or `UPLOAD` if the file is required to be uploaded. | | name | string | Required | The filename that was specified in the upload process | | url | string | Optional | Should an upload be required, this URL is available for an upload to be issued. The URL is only available for uploads for 24 hours from creation. |
|
238
|
+
# @param paylink_bill_payment_token_request [PaylinkBillPaymentTokenRequest]
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @return [Array<(PaylinkTokenCreated, Integer, Hash)>] PaylinkTokenCreated data, response status code and response headers
|
241
|
+
def token_create_bill_payment_request_with_http_info(paylink_bill_payment_token_request, opts = {})
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_create_bill_payment_request ...'
|
244
|
+
end
|
245
|
+
# verify the required parameter 'paylink_bill_payment_token_request' is set
|
246
|
+
if @api_client.config.client_side_validation && paylink_bill_payment_token_request.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'paylink_bill_payment_token_request' when calling PaylinkApi.token_create_bill_payment_request"
|
248
|
+
end
|
249
|
+
# resource path
|
250
|
+
local_var_path = '/paylink/bill-payment'
|
251
|
+
|
252
|
+
# query parameters
|
253
|
+
query_params = opts[:query_params] || {}
|
254
|
+
|
255
|
+
# header parameters
|
256
|
+
header_params = opts[:header_params] || {}
|
257
|
+
# HTTP header 'Accept' (if needed)
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
259
|
+
# HTTP header 'Content-Type'
|
260
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
261
|
+
if !content_type.nil?
|
262
|
+
header_params['Content-Type'] = content_type
|
263
|
+
end
|
264
|
+
|
265
|
+
# form parameters
|
266
|
+
form_params = opts[:form_params] || {}
|
267
|
+
|
268
|
+
# http body (model)
|
269
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(paylink_bill_payment_token_request)
|
270
|
+
|
271
|
+
# return_type
|
272
|
+
return_type = opts[:debug_return_type] || 'PaylinkTokenCreated'
|
273
|
+
|
274
|
+
# auth_names
|
275
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
276
|
+
|
277
|
+
new_options = opts.merge(
|
278
|
+
:operation => :"PaylinkApi.token_create_bill_payment_request",
|
279
|
+
:header_params => header_params,
|
280
|
+
:query_params => query_params,
|
281
|
+
:form_params => form_params,
|
282
|
+
:body => post_body,
|
283
|
+
:auth_names => auth_names,
|
284
|
+
:return_type => return_type
|
285
|
+
)
|
286
|
+
|
287
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
288
|
+
if @api_client.config.debugging
|
289
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_create_bill_payment_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
290
|
+
end
|
291
|
+
return data, status_code, headers
|
292
|
+
end
|
293
|
+
|
294
|
+
# Create Paylink Token
|
295
|
+
# Creates a Paylink token from the CityPay API.
|
296
|
+
# @param paylink_token_request_model [PaylinkTokenRequestModel]
|
297
|
+
# @param [Hash] opts the optional parameters
|
298
|
+
# @return [PaylinkTokenCreated]
|
299
|
+
def token_create_request(paylink_token_request_model, opts = {})
|
300
|
+
data, _status_code, _headers = token_create_request_with_http_info(paylink_token_request_model, opts)
|
301
|
+
data
|
302
|
+
end
|
303
|
+
|
304
|
+
# Create Paylink Token
|
305
|
+
# Creates a Paylink token from the CityPay API.
|
306
|
+
# @param paylink_token_request_model [PaylinkTokenRequestModel]
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @return [Array<(PaylinkTokenCreated, Integer, Hash)>] PaylinkTokenCreated data, response status code and response headers
|
309
|
+
def token_create_request_with_http_info(paylink_token_request_model, opts = {})
|
310
|
+
if @api_client.config.debugging
|
311
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_create_request ...'
|
312
|
+
end
|
313
|
+
# verify the required parameter 'paylink_token_request_model' is set
|
314
|
+
if @api_client.config.client_side_validation && paylink_token_request_model.nil?
|
315
|
+
fail ArgumentError, "Missing the required parameter 'paylink_token_request_model' when calling PaylinkApi.token_create_request"
|
316
|
+
end
|
317
|
+
# resource path
|
318
|
+
local_var_path = '/paylink/create'
|
319
|
+
|
320
|
+
# query parameters
|
321
|
+
query_params = opts[:query_params] || {}
|
322
|
+
|
323
|
+
# header parameters
|
324
|
+
header_params = opts[:header_params] || {}
|
325
|
+
# HTTP header 'Accept' (if needed)
|
326
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
327
|
+
# HTTP header 'Content-Type'
|
328
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
|
329
|
+
if !content_type.nil?
|
330
|
+
header_params['Content-Type'] = content_type
|
331
|
+
end
|
332
|
+
|
333
|
+
# form parameters
|
334
|
+
form_params = opts[:form_params] || {}
|
335
|
+
|
336
|
+
# http body (model)
|
337
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(paylink_token_request_model)
|
338
|
+
|
339
|
+
# return_type
|
340
|
+
return_type = opts[:debug_return_type] || 'PaylinkTokenCreated'
|
341
|
+
|
342
|
+
# auth_names
|
343
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
344
|
+
|
345
|
+
new_options = opts.merge(
|
346
|
+
:operation => :"PaylinkApi.token_create_request",
|
347
|
+
:header_params => header_params,
|
348
|
+
:query_params => query_params,
|
349
|
+
:form_params => form_params,
|
350
|
+
:body => post_body,
|
351
|
+
:auth_names => auth_names,
|
352
|
+
:return_type => return_type
|
353
|
+
)
|
354
|
+
|
355
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
356
|
+
if @api_client.config.debugging
|
357
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_create_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
358
|
+
end
|
359
|
+
return data, status_code, headers
|
360
|
+
end
|
361
|
+
|
362
|
+
# Purges any attachments for a Paylink Token
|
363
|
+
# Purges any attachments for a token for GDPR or DP reasons.
|
364
|
+
# @param token [String] The token returned by the create token process.
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @return [Acknowledgement]
|
367
|
+
def token_purge_attachments_request(token, opts = {})
|
368
|
+
data, _status_code, _headers = token_purge_attachments_request_with_http_info(token, opts)
|
369
|
+
data
|
370
|
+
end
|
371
|
+
|
372
|
+
# Purges any attachments for a Paylink Token
|
373
|
+
# Purges any attachments for a token for GDPR or DP reasons.
|
374
|
+
# @param token [String] The token returned by the create token process.
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
377
|
+
def token_purge_attachments_request_with_http_info(token, opts = {})
|
378
|
+
if @api_client.config.debugging
|
379
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_purge_attachments_request ...'
|
380
|
+
end
|
381
|
+
# verify the required parameter 'token' is set
|
382
|
+
if @api_client.config.client_side_validation && token.nil?
|
383
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_purge_attachments_request"
|
384
|
+
end
|
385
|
+
# resource path
|
386
|
+
local_var_path = '/paylink/{token}/purge-attachments'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
387
|
+
|
388
|
+
# query parameters
|
389
|
+
query_params = opts[:query_params] || {}
|
390
|
+
|
391
|
+
# header parameters
|
392
|
+
header_params = opts[:header_params] || {}
|
393
|
+
# HTTP header 'Accept' (if needed)
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
395
|
+
|
396
|
+
# form parameters
|
397
|
+
form_params = opts[:form_params] || {}
|
398
|
+
|
399
|
+
# http body (model)
|
400
|
+
post_body = opts[:debug_body]
|
401
|
+
|
402
|
+
# return_type
|
403
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
404
|
+
|
405
|
+
# auth_names
|
406
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
407
|
+
|
408
|
+
new_options = opts.merge(
|
409
|
+
:operation => :"PaylinkApi.token_purge_attachments_request",
|
410
|
+
:header_params => header_params,
|
411
|
+
:query_params => query_params,
|
412
|
+
:form_params => form_params,
|
413
|
+
:body => post_body,
|
414
|
+
:auth_names => auth_names,
|
415
|
+
:return_type => return_type
|
416
|
+
)
|
417
|
+
|
418
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
419
|
+
if @api_client.config.debugging
|
420
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_purge_attachments_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
421
|
+
end
|
422
|
+
return data, status_code, headers
|
423
|
+
end
|
424
|
+
|
425
|
+
# Reconcile Paylink Token
|
426
|
+
# Marks a Paylink Token as reconciled when reconciliation is performed on the merchant's side.
|
427
|
+
# @param token [String] The token returned by the create token process.
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @return [Acknowledgement]
|
430
|
+
def token_reconciled_request(token, opts = {})
|
431
|
+
data, _status_code, _headers = token_reconciled_request_with_http_info(token, opts)
|
432
|
+
data
|
433
|
+
end
|
434
|
+
|
435
|
+
# Reconcile Paylink Token
|
436
|
+
# Marks a Paylink Token as reconciled when reconciliation is performed on the merchant's side.
|
437
|
+
# @param token [String] The token returned by the create token process.
|
438
|
+
# @param [Hash] opts the optional parameters
|
439
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
440
|
+
def token_reconciled_request_with_http_info(token, opts = {})
|
441
|
+
if @api_client.config.debugging
|
442
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_reconciled_request ...'
|
443
|
+
end
|
444
|
+
# verify the required parameter 'token' is set
|
445
|
+
if @api_client.config.client_side_validation && token.nil?
|
446
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_reconciled_request"
|
447
|
+
end
|
448
|
+
# resource path
|
449
|
+
local_var_path = '/paylink/{token}/reconciled'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
450
|
+
|
451
|
+
# query parameters
|
452
|
+
query_params = opts[:query_params] || {}
|
453
|
+
|
454
|
+
# header parameters
|
455
|
+
header_params = opts[:header_params] || {}
|
456
|
+
# HTTP header 'Accept' (if needed)
|
457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
458
|
+
|
459
|
+
# form parameters
|
460
|
+
form_params = opts[:form_params] || {}
|
461
|
+
|
462
|
+
# http body (model)
|
463
|
+
post_body = opts[:debug_body]
|
464
|
+
|
465
|
+
# return_type
|
466
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
467
|
+
|
468
|
+
# auth_names
|
469
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
470
|
+
|
471
|
+
new_options = opts.merge(
|
472
|
+
:operation => :"PaylinkApi.token_reconciled_request",
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => return_type
|
479
|
+
)
|
480
|
+
|
481
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_reconciled_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
484
|
+
end
|
485
|
+
return data, status_code, headers
|
486
|
+
end
|
487
|
+
|
488
|
+
# Reopen Paylink Token
|
489
|
+
# Allows for a Paylink Token to be reopened if a Token has been previously closed and payment has not yet been made.
|
490
|
+
# @param token [String] The token returned by the create token process.
|
491
|
+
# @param [Hash] opts the optional parameters
|
492
|
+
# @return [Acknowledgement]
|
493
|
+
def token_reopen_request(token, opts = {})
|
494
|
+
data, _status_code, _headers = token_reopen_request_with_http_info(token, opts)
|
495
|
+
data
|
496
|
+
end
|
497
|
+
|
498
|
+
# Reopen Paylink Token
|
499
|
+
# Allows for a Paylink Token to be reopened if a Token has been previously closed and payment has not yet been made.
|
500
|
+
# @param token [String] The token returned by the create token process.
|
501
|
+
# @param [Hash] opts the optional parameters
|
502
|
+
# @return [Array<(Acknowledgement, Integer, Hash)>] Acknowledgement data, response status code and response headers
|
503
|
+
def token_reopen_request_with_http_info(token, opts = {})
|
504
|
+
if @api_client.config.debugging
|
505
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_reopen_request ...'
|
506
|
+
end
|
507
|
+
# verify the required parameter 'token' is set
|
508
|
+
if @api_client.config.client_side_validation && token.nil?
|
509
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_reopen_request"
|
510
|
+
end
|
511
|
+
# resource path
|
512
|
+
local_var_path = '/paylink/{token}/reopen'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
513
|
+
|
514
|
+
# query parameters
|
515
|
+
query_params = opts[:query_params] || {}
|
516
|
+
|
517
|
+
# header parameters
|
518
|
+
header_params = opts[:header_params] || {}
|
519
|
+
# HTTP header 'Accept' (if needed)
|
520
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
521
|
+
|
522
|
+
# form parameters
|
523
|
+
form_params = opts[:form_params] || {}
|
524
|
+
|
525
|
+
# http body (model)
|
526
|
+
post_body = opts[:debug_body]
|
527
|
+
|
528
|
+
# return_type
|
529
|
+
return_type = opts[:debug_return_type] || 'Acknowledgement'
|
530
|
+
|
531
|
+
# auth_names
|
532
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
533
|
+
|
534
|
+
new_options = opts.merge(
|
535
|
+
:operation => :"PaylinkApi.token_reopen_request",
|
536
|
+
:header_params => header_params,
|
537
|
+
:query_params => query_params,
|
538
|
+
:form_params => form_params,
|
539
|
+
:body => post_body,
|
540
|
+
:auth_names => auth_names,
|
541
|
+
:return_type => return_type
|
542
|
+
)
|
543
|
+
|
544
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
545
|
+
if @api_client.config.debugging
|
546
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_reopen_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
547
|
+
end
|
548
|
+
return data, status_code, headers
|
549
|
+
end
|
550
|
+
|
551
|
+
# Paylink Token Status
|
552
|
+
# Obtains the full status of a given Paylink Token.
|
553
|
+
# @param token [String] The token returned by the create token process.
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @return [PaylinkTokenStatus]
|
556
|
+
def token_status_request(token, opts = {})
|
557
|
+
data, _status_code, _headers = token_status_request_with_http_info(token, opts)
|
558
|
+
data
|
559
|
+
end
|
560
|
+
|
561
|
+
# Paylink Token Status
|
562
|
+
# Obtains the full status of a given Paylink Token.
|
563
|
+
# @param token [String] The token returned by the create token process.
|
564
|
+
# @param [Hash] opts the optional parameters
|
565
|
+
# @return [Array<(PaylinkTokenStatus, Integer, Hash)>] PaylinkTokenStatus data, response status code and response headers
|
566
|
+
def token_status_request_with_http_info(token, opts = {})
|
567
|
+
if @api_client.config.debugging
|
568
|
+
@api_client.config.logger.debug 'Calling API: PaylinkApi.token_status_request ...'
|
569
|
+
end
|
570
|
+
# verify the required parameter 'token' is set
|
571
|
+
if @api_client.config.client_side_validation && token.nil?
|
572
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling PaylinkApi.token_status_request"
|
573
|
+
end
|
574
|
+
# resource path
|
575
|
+
local_var_path = '/paylink/{token}/status'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
576
|
+
|
577
|
+
# query parameters
|
578
|
+
query_params = opts[:query_params] || {}
|
579
|
+
|
580
|
+
# header parameters
|
581
|
+
header_params = opts[:header_params] || {}
|
582
|
+
# HTTP header 'Accept' (if needed)
|
583
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
|
584
|
+
|
585
|
+
# form parameters
|
586
|
+
form_params = opts[:form_params] || {}
|
587
|
+
|
588
|
+
# http body (model)
|
589
|
+
post_body = opts[:debug_body]
|
590
|
+
|
591
|
+
# return_type
|
592
|
+
return_type = opts[:debug_return_type] || 'PaylinkTokenStatus'
|
593
|
+
|
594
|
+
# auth_names
|
595
|
+
auth_names = opts[:debug_auth_names] || ['cp-api-key']
|
596
|
+
|
597
|
+
new_options = opts.merge(
|
598
|
+
:operation => :"PaylinkApi.token_status_request",
|
599
|
+
:header_params => header_params,
|
600
|
+
:query_params => query_params,
|
601
|
+
:form_params => form_params,
|
602
|
+
:body => post_body,
|
603
|
+
:auth_names => auth_names,
|
604
|
+
:return_type => return_type
|
605
|
+
)
|
606
|
+
|
607
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
608
|
+
if @api_client.config.debugging
|
609
|
+
@api_client.config.logger.debug "API called: PaylinkApi#token_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
610
|
+
end
|
611
|
+
return data, status_code, headers
|
612
|
+
end
|
613
|
+
end
|
614
|
+
end
|