citypay_api_client 1.0.3 → 1.1.1
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 +105 -34
- data/citypay_api_client.gemspec +4 -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 +50 -49
- data/docs/AuthResponse.md +60 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +559 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +214 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +40 -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 +326 -105
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +36 -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 +365 -0
- data/docs/DirectPostRequest.md +58 -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/OperationalApi.md +124 -22
- data/docs/OperationalFunctionsApi.md +355 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +630 -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 +36 -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 +38 -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/PaymentProcessingApi.md +307 -68
- 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/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 +59 -59
- data/lib/citypay_api_client/api_error.rb +2 -2
- data/lib/citypay_api_client/configuration.rb +53 -15
- data/lib/citypay_api_client/models/account_create.rb +21 -8
- data/lib/citypay_api_client/models/account_status.rb +21 -8
- data/lib/citypay_api_client/models/acknowledgement.rb +21 -8
- data/lib/citypay_api_client/models/acl_check_request.rb +224 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +249 -0
- data/lib/citypay_api_client/models/airline_advice.rb +23 -10
- data/lib/citypay_api_client/models/airline_segment.rb +21 -8
- data/lib/citypay_api_client/models/auth_reference.rb +45 -11
- data/lib/citypay_api_client/models/auth_references.rb +21 -8
- data/lib/citypay_api_client/models/auth_request.rb +79 -35
- data/lib/citypay_api_client/models/auth_response.rb +43 -106
- data/lib/citypay_api_client/models/authen_required.rb +21 -8
- data/lib/citypay_api_client/models/batch.rb +264 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +277 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +357 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +321 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +421 -0
- data/lib/citypay_api_client/models/bin.rb +299 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +234 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +21 -8
- data/lib/citypay_api_client/models/capture_request.rb +38 -22
- data/lib/citypay_api_client/models/card.rb +67 -10
- data/lib/citypay_api_client/models/card_holder_account.rb +35 -12
- data/lib/citypay_api_client/models/card_status.rb +21 -8
- data/lib/citypay_api_client/models/charge_request.rb +96 -26
- data/lib/citypay_api_client/models/check_batch_status.rb +259 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +220 -0
- data/lib/citypay_api_client/models/contact_details.rb +87 -44
- data/lib/citypay_api_client/models/decision.rb +21 -8
- data/lib/citypay_api_client/models/direct_post_request.rb +670 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +252 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +250 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +294 -0
- data/lib/citypay_api_client/models/error.rb +35 -12
- data/lib/citypay_api_client/models/event_data_model.rb +259 -0
- data/lib/citypay_api_client/models/exists.rb +244 -0
- data/lib/citypay_api_client/models/external_mpi.rb +27 -8
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -8
- data/lib/citypay_api_client/models/mcc6012.rb +21 -8
- data/lib/citypay_api_client/models/merchant.rb +21 -8
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +22 -9
- data/lib/citypay_api_client/models/paylink_address.rb +402 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +249 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +292 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +353 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +280 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +289 -0
- data/lib/citypay_api_client/models/paylink_config.rb +433 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +314 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +268 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +239 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +279 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +269 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +234 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +239 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +364 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +374 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +490 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +270 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +235 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +249 -0
- data/lib/citypay_api_client/models/ping.rb +21 -8
- data/lib/citypay_api_client/models/process_batch_request.rb +308 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +234 -0
- data/lib/citypay_api_client/models/refund_request.rb +332 -0
- data/lib/citypay_api_client/models/register_card.rb +59 -12
- data/lib/citypay_api_client/models/request_challenged.rb +29 -16
- data/lib/citypay_api_client/models/retrieve_request.rb +21 -8
- data/lib/citypay_api_client/models/three_d_secure.rb +106 -13
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +333 -0
- data/lib/citypay_api_client/models/void_request.rb +22 -21
- 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 +126 -58
- 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/auth_references_spec.rb +7 -8
- data/spec/models/auth_response_spec.rb +29 -30
- data/spec/models/batch_report_request_spec.rb +39 -0
- data/spec/models/batch_report_response_model_spec.rb +63 -0
- data/spec/models/batch_spec.rb +45 -0
- data/spec/models/batch_transaction_result_model_spec.rb +87 -0
- data/spec/models/batch_transaction_spec.rb +51 -0
- data/spec/models/bin_lookup_spec.rb +33 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/card_holder_account_spec.rb +8 -5
- 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 +153 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +33 -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 +93 -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 +51 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +64 -0
- 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 +210 -37
- data/Gemfile.lock +0 -70
- 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
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a 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 tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a 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 tokinsed payments using Card Holder 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](#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 card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class AirlineSegment
|
@@ -51,6 +52,11 @@ module CityPayApiClient
|
|
51
52
|
}
|
52
53
|
end
|
53
54
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
54
60
|
# Attribute type mapping.
|
55
61
|
def self.openapi_types
|
56
62
|
{
|
@@ -302,8 +308,11 @@ module CityPayApiClient
|
|
302
308
|
# @return [Object] Returns the model itself
|
303
309
|
def build_from_hash(attributes)
|
304
310
|
return nil unless attributes.is_a?(Hash)
|
311
|
+
attributes = attributes.transform_keys(&:to_sym)
|
305
312
|
self.class.openapi_types.each_pair do |key, type|
|
306
|
-
if
|
313
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
314
|
+
self.send("#{key}=", nil)
|
315
|
+
elsif type =~ /\AArray<(.*)>/i
|
307
316
|
# check to ensure the input is an array given that the attribute
|
308
317
|
# is documented as an array but the input is not
|
309
318
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -311,7 +320,7 @@ module CityPayApiClient
|
|
311
320
|
end
|
312
321
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
313
322
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
314
|
-
end
|
323
|
+
end
|
315
324
|
end
|
316
325
|
|
317
326
|
self
|
@@ -323,8 +332,8 @@ module CityPayApiClient
|
|
323
332
|
# @return [Object] Deserialized data
|
324
333
|
def _deserialize(type, value)
|
325
334
|
case type.to_sym
|
326
|
-
when :
|
327
|
-
|
335
|
+
when :Time
|
336
|
+
Time.parse(value)
|
328
337
|
when :Date
|
329
338
|
Date.parse(value)
|
330
339
|
when :String
|
@@ -354,7 +363,9 @@ module CityPayApiClient
|
|
354
363
|
end
|
355
364
|
end
|
356
365
|
else # model
|
357
|
-
|
366
|
+
# models (e.g. Pet) or oneOf
|
367
|
+
klass = CityPayApiClient.const_get(type)
|
368
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
358
369
|
end
|
359
370
|
end
|
360
371
|
|
@@ -380,7 +391,7 @@ module CityPayApiClient
|
|
380
391
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
381
392
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
382
393
|
end
|
383
|
-
|
394
|
+
|
384
395
|
hash[param] = _to_hash(value)
|
385
396
|
end
|
386
397
|
hash
|
@@ -403,5 +414,7 @@ module CityPayApiClient
|
|
403
414
|
value
|
404
415
|
end
|
405
416
|
end
|
417
|
+
|
406
418
|
end
|
419
|
+
|
407
420
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a 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 tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a 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 tokinsed payments using Card Holder 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](#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 card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class AuthReference
|
@@ -75,16 +76,21 @@ module CityPayApiClient
|
|
75
76
|
}
|
76
77
|
end
|
77
78
|
|
79
|
+
# Returns all the JSON keys this model knows about
|
80
|
+
def self.acceptable_attributes
|
81
|
+
attribute_map.values
|
82
|
+
end
|
83
|
+
|
78
84
|
# Attribute type mapping.
|
79
85
|
def self.openapi_types
|
80
86
|
{
|
81
|
-
:'amount' => :'
|
82
|
-
:'amount_value' => :'
|
87
|
+
:'amount' => :'String',
|
88
|
+
:'amount_value' => :'Integer',
|
83
89
|
:'atrn' => :'String',
|
84
90
|
:'authcode' => :'String',
|
85
91
|
:'batchno' => :'String',
|
86
92
|
:'currency' => :'String',
|
87
|
-
:'datetime' => :'
|
93
|
+
:'datetime' => :'Time',
|
88
94
|
:'identifier' => :'String',
|
89
95
|
:'maskedpan' => :'String',
|
90
96
|
:'merchantid' => :'Integer',
|
@@ -177,6 +183,10 @@ module CityPayApiClient
|
|
177
183
|
# @return Array for valid properties with the reasons
|
178
184
|
def list_invalid_properties
|
179
185
|
invalid_properties = Array.new
|
186
|
+
if !@amount.nil? && @amount.to_s.length > 10
|
187
|
+
invalid_properties.push('invalid value for "amount", the character length must be smaller than or equal to 10.')
|
188
|
+
end
|
189
|
+
|
180
190
|
if !@currency.nil? && @currency.to_s.length > 3
|
181
191
|
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
182
192
|
end
|
@@ -203,6 +213,7 @@ module CityPayApiClient
|
|
203
213
|
# Check to see if the all the properties in the model are valid
|
204
214
|
# @return true if the model is valid
|
205
215
|
def valid?
|
216
|
+
return false if !@amount.nil? && @amount.to_s.length > 10
|
206
217
|
return false if !@currency.nil? && @currency.to_s.length > 3
|
207
218
|
return false if !@currency.nil? && @currency.to_s.length < 3
|
208
219
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
@@ -211,6 +222,22 @@ module CityPayApiClient
|
|
211
222
|
true
|
212
223
|
end
|
213
224
|
|
225
|
+
# Custom attribute writer method with validation
|
226
|
+
# @param [Object] amount Value to be assigned
|
227
|
+
def amount=(amount)
|
228
|
+
if !amount.nil? && amount.to_s.length > 10
|
229
|
+
fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 10.'
|
230
|
+
end
|
231
|
+
|
232
|
+
@amount = amount
|
233
|
+
end
|
234
|
+
|
235
|
+
# Custom attribute writer method with validation
|
236
|
+
# @param [Object] amount_value Value to be assigned
|
237
|
+
def amount_value=(amount_value)
|
238
|
+
@amount_value = amount_value
|
239
|
+
end
|
240
|
+
|
214
241
|
# Custom attribute writer method with validation
|
215
242
|
# @param [Object] currency Value to be assigned
|
216
243
|
def currency=(currency)
|
@@ -294,8 +321,11 @@ module CityPayApiClient
|
|
294
321
|
# @return [Object] Returns the model itself
|
295
322
|
def build_from_hash(attributes)
|
296
323
|
return nil unless attributes.is_a?(Hash)
|
324
|
+
attributes = attributes.transform_keys(&:to_sym)
|
297
325
|
self.class.openapi_types.each_pair do |key, type|
|
298
|
-
if
|
326
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
327
|
+
self.send("#{key}=", nil)
|
328
|
+
elsif type =~ /\AArray<(.*)>/i
|
299
329
|
# check to ensure the input is an array given that the attribute
|
300
330
|
# is documented as an array but the input is not
|
301
331
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -303,7 +333,7 @@ module CityPayApiClient
|
|
303
333
|
end
|
304
334
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
305
335
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
306
|
-
end
|
336
|
+
end
|
307
337
|
end
|
308
338
|
|
309
339
|
self
|
@@ -315,8 +345,8 @@ module CityPayApiClient
|
|
315
345
|
# @return [Object] Deserialized data
|
316
346
|
def _deserialize(type, value)
|
317
347
|
case type.to_sym
|
318
|
-
when :
|
319
|
-
|
348
|
+
when :Time
|
349
|
+
Time.parse(value)
|
320
350
|
when :Date
|
321
351
|
Date.parse(value)
|
322
352
|
when :String
|
@@ -346,7 +376,9 @@ module CityPayApiClient
|
|
346
376
|
end
|
347
377
|
end
|
348
378
|
else # model
|
349
|
-
|
379
|
+
# models (e.g. Pet) or oneOf
|
380
|
+
klass = CityPayApiClient.const_get(type)
|
381
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
350
382
|
end
|
351
383
|
end
|
352
384
|
|
@@ -372,7 +404,7 @@ module CityPayApiClient
|
|
372
404
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
373
405
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
374
406
|
end
|
375
|
-
|
407
|
+
|
376
408
|
hash[param] = _to_hash(value)
|
377
409
|
end
|
378
410
|
hash
|
@@ -395,5 +427,7 @@ module CityPayApiClient
|
|
395
427
|
value
|
396
428
|
end
|
397
429
|
end
|
430
|
+
|
398
431
|
end
|
432
|
+
|
399
433
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a 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 tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a 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 tokinsed payments using Card Holder 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](#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 card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class AuthReferences
|
@@ -22,6 +23,11 @@ module CityPayApiClient
|
|
22
23
|
}
|
23
24
|
end
|
24
25
|
|
26
|
+
# Returns all the JSON keys this model knows about
|
27
|
+
def self.acceptable_attributes
|
28
|
+
attribute_map.values
|
29
|
+
end
|
30
|
+
|
25
31
|
# Attribute type mapping.
|
26
32
|
def self.openapi_types
|
27
33
|
{
|
@@ -102,8 +108,11 @@ module CityPayApiClient
|
|
102
108
|
# @return [Object] Returns the model itself
|
103
109
|
def build_from_hash(attributes)
|
104
110
|
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
105
112
|
self.class.openapi_types.each_pair do |key, type|
|
106
|
-
if
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
107
116
|
# check to ensure the input is an array given that the attribute
|
108
117
|
# is documented as an array but the input is not
|
109
118
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -111,7 +120,7 @@ module CityPayApiClient
|
|
111
120
|
end
|
112
121
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
122
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
-
end
|
123
|
+
end
|
115
124
|
end
|
116
125
|
|
117
126
|
self
|
@@ -123,8 +132,8 @@ module CityPayApiClient
|
|
123
132
|
# @return [Object] Deserialized data
|
124
133
|
def _deserialize(type, value)
|
125
134
|
case type.to_sym
|
126
|
-
when :
|
127
|
-
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
128
137
|
when :Date
|
129
138
|
Date.parse(value)
|
130
139
|
when :String
|
@@ -154,7 +163,9 @@ module CityPayApiClient
|
|
154
163
|
end
|
155
164
|
end
|
156
165
|
else # model
|
157
|
-
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = CityPayApiClient.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
158
169
|
end
|
159
170
|
end
|
160
171
|
|
@@ -180,7 +191,7 @@ module CityPayApiClient
|
|
180
191
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
192
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
193
|
end
|
183
|
-
|
194
|
+
|
184
195
|
hash[param] = _to_hash(value)
|
185
196
|
end
|
186
197
|
hash
|
@@ -203,5 +214,7 @@ module CityPayApiClient
|
|
203
214
|
value
|
204
215
|
end
|
205
216
|
end
|
217
|
+
|
206
218
|
end
|
219
|
+
|
207
220
|
end
|