citypay_api_client 1.1.1 → 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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -14
  3. data/citypay_api_client.gemspec +4 -3
  4. data/docs/AirlineAdvice.md +1 -1
  5. data/docs/AuthRequest.md +3 -1
  6. data/docs/AuthResponse.md +5 -1
  7. data/docs/AuthorisationAndPaymentApi.md +300 -9
  8. data/docs/BatchProcessingApi.md +15 -11
  9. data/docs/BatchTransactionResultModel.md +5 -1
  10. data/docs/Card.md +1 -1
  11. data/docs/CardHolderAccountApi.md +64 -9
  12. data/docs/ChargeRequest.md +2 -0
  13. data/docs/ContactDetails.md +11 -11
  14. data/docs/DirectPostApi.md +40 -16
  15. data/docs/DirectPostRequest.md +3 -1
  16. data/docs/OperationalFunctionsApi.md +28 -8
  17. data/docs/PaylinkApi.md +249 -73
  18. data/docs/PaylinkCustomParam.md +3 -1
  19. data/docs/PaylinkFieldGuardModel.md +1 -1
  20. data/docs/PaylinkTokenRequestModel.md +4 -0
  21. data/docs/RegisterCard.md +1 -1
  22. data/docs/ThreeDSecure.md +1 -1
  23. data/docs/TokenisationResponseModel.md +2 -2
  24. data/docs/images/3dsv1-challenge.png +0 -0
  25. data/docs/images/3dsv2-challenge.png +0 -0
  26. data/docs/images/3dsv2-frictionless.png +0 -0
  27. data/docs/images/3dsv2-method-challenge.png +0 -0
  28. data/docs/images/3dsv2-method-frictionless.png +0 -0
  29. data/docs/images/3dsv2-no3d.png +0 -0
  30. data/docs/images/citypay-logo.svg +1 -0
  31. data/docs/images/direct-post-flow.png +0 -0
  32. data/docs/images/favicon.ico +0 -0
  33. data/docs/images/header.png +0 -0
  34. data/docs/images/logo.ai +1913 -4
  35. data/docs/images/logo.png +0 -0
  36. data/docs/images/logo.svg +1 -0
  37. data/docs/images/merchant-BPS-workflow.png +0 -0
  38. data/docs/images/paylink-field-guards.png +0 -0
  39. data/lib/.DS_Store +0 -0
  40. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
  41. data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
  42. data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
  43. data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
  44. data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
  45. data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
  46. data/lib/citypay_api_client/api_client.rb +24 -22
  47. data/lib/citypay_api_client/api_error.rb +3 -2
  48. data/lib/citypay_api_client/configuration.rb +28 -9
  49. data/lib/citypay_api_client/models/account_create.rb +17 -20
  50. data/lib/citypay_api_client/models/account_status.rb +15 -20
  51. data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
  52. data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
  53. data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
  54. data/lib/citypay_api_client/models/airline_advice.rb +45 -29
  55. data/lib/citypay_api_client/models/airline_segment.rb +35 -22
  56. data/lib/citypay_api_client/models/auth_reference.rb +41 -26
  57. data/lib/citypay_api_client/models/auth_references.rb +15 -20
  58. data/lib/citypay_api_client/models/auth_request.rb +66 -29
  59. data/lib/citypay_api_client/models/auth_response.rb +45 -22
  60. data/lib/citypay_api_client/models/authen_required.rb +15 -20
  61. data/lib/citypay_api_client/models/batch.rb +24 -21
  62. data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
  63. data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
  64. data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
  65. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
  66. data/lib/citypay_api_client/models/bin.rb +15 -20
  67. data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
  68. data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
  69. data/lib/citypay_api_client/models/capture_request.rb +27 -22
  70. data/lib/citypay_api_client/models/card.rb +33 -26
  71. data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
  72. data/lib/citypay_api_client/models/card_status.rb +15 -20
  73. data/lib/citypay_api_client/models/charge_request.rb +66 -29
  74. data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
  75. data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
  76. data/lib/citypay_api_client/models/contact_details.rb +77 -42
  77. data/lib/citypay_api_client/models/decision.rb +15 -20
  78. data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
  79. data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
  80. data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
  81. data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
  82. data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
  83. data/lib/citypay_api_client/models/error.rb +27 -24
  84. data/lib/citypay_api_client/models/event_data_model.rb +15 -20
  85. data/lib/citypay_api_client/models/exists.rb +17 -20
  86. data/lib/citypay_api_client/models/external_mpi.rb +39 -24
  87. data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
  88. data/lib/citypay_api_client/models/mcc6012.rb +15 -20
  89. data/lib/citypay_api_client/models/merchant.rb +15 -20
  90. data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
  91. data/lib/citypay_api_client/models/paylink_address.rb +52 -29
  92. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
  93. data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
  94. data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
  95. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
  96. data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
  97. data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
  98. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
  99. data/lib/citypay_api_client/models/paylink_config.rb +15 -20
  100. data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
  101. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
  102. data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
  103. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
  104. data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
  105. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
  106. data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
  107. data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
  108. data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
  109. data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
  110. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
  111. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
  112. data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
  113. data/lib/citypay_api_client/models/ping.rb +21 -22
  114. data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
  115. data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
  116. data/lib/citypay_api_client/models/refund_request.rb +28 -21
  117. data/lib/citypay_api_client/models/register_card.rb +27 -22
  118. data/lib/citypay_api_client/models/request_challenged.rb +15 -20
  119. data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
  120. data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
  121. data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
  122. data/lib/citypay_api_client/models/void_request.rb +23 -22
  123. data/lib/citypay_api_client/version.rb +3 -3
  124. data/lib/citypay_api_client.rb +2 -2
  125. data/spec/.DS_Store +0 -0
  126. data/spec/it_api_sandbox_spec.rb +5 -11
  127. data/spec/models/account_create_spec.rb +1 -2
  128. data/spec/models/account_status_spec.rb +2 -2
  129. data/spec/models/airline_advice_spec.rb +0 -2
  130. data/spec/models/airline_segment_spec.rb +0 -2
  131. data/spec/models/auth_request_spec.rb +0 -2
  132. data/spec/models/auth_response_spec.rb +75 -30
  133. data/spec/models/batch_report_request_spec.rb +0 -2
  134. data/spec/models/batch_report_response_model_spec.rb +0 -2
  135. data/spec/models/batch_spec.rb +0 -2
  136. data/spec/models/batch_transaction_result_model_spec.rb +0 -2
  137. data/spec/models/batch_transaction_spec.rb +0 -2
  138. data/spec/models/bin_lookup_spec.rb +0 -2
  139. data/spec/models/capture_request_spec.rb +0 -2
  140. data/spec/models/card_holder_account_spec.rb +0 -2
  141. data/spec/models/charge_request_spec.rb +0 -2
  142. data/spec/models/direct_post_request_spec.rb +0 -2
  143. data/spec/models/domain_key_check_request_spec.rb +0 -2
  144. data/spec/models/paylink_token_request_model_spec.rb +0 -2
  145. data/spec/models/process_batch_request_spec.rb +0 -2
  146. data/spec/models/refund_request_spec.rb +0 -2
  147. data/spec/models/register_card_spec.rb +0 -2
  148. data/spec/spec_helper.rb +2 -2
  149. metadata +25 -12
  150. data/docs/OperationalApi.md +0 -214
  151. data/docs/PaymentProcessingApi.md +0 -559
@@ -1,11 +1,11 @@
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 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.
4
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -65,6 +65,8 @@ module CityPayApiClient
65
65
  if (value = attributes[:'batch_id']).is_a?(Array)
66
66
  self.batch_id = value
67
67
  end
68
+ else
69
+ self.batch_id = nil
68
70
  end
69
71
 
70
72
  if attributes.key?(:'client_account_id')
@@ -75,6 +77,7 @@ module CityPayApiClient
75
77
  # Show invalid properties with the reasons. Usually used together with valid?
76
78
  # @return Array for valid properties with the reasons
77
79
  def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
81
  invalid_properties = Array.new
79
82
  if @batch_id.nil?
80
83
  invalid_properties.push('invalid value for "batch_id", batch_id cannot be nil.')
@@ -94,6 +97,7 @@ module CityPayApiClient
94
97
  # Check to see if the all the properties in the model are valid
95
98
  # @return true if the model is valid
96
99
  def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
101
  return false if @batch_id.nil?
98
102
  return false if !@client_account_id.nil? && @client_account_id.to_s.length > 20
99
103
  return false if !@client_account_id.nil? && @client_account_id.to_s.length < 3
@@ -103,11 +107,15 @@ module CityPayApiClient
103
107
  # Custom attribute writer method with validation
104
108
  # @param [Object] client_account_id Value to be assigned
105
109
  def client_account_id=(client_account_id)
106
- if !client_account_id.nil? && client_account_id.to_s.length > 20
110
+ if client_account_id.nil?
111
+ fail ArgumentError, 'client_account_id cannot be nil'
112
+ end
113
+
114
+ if client_account_id.to_s.length > 20
107
115
  fail ArgumentError, 'invalid value for "client_account_id", the character length must be smaller than or equal to 20.'
108
116
  end
109
117
 
110
- if !client_account_id.nil? && client_account_id.to_s.length < 3
118
+ if client_account_id.to_s.length < 3
111
119
  fail ArgumentError, 'invalid value for "client_account_id", the character length must be great than or equal to 3.'
112
120
  end
113
121
 
@@ -139,37 +147,30 @@ module CityPayApiClient
139
147
  # @param [Hash] attributes Model attributes in the form of hash
140
148
  # @return [Object] Returns the model itself
141
149
  def self.build_from_hash(attributes)
142
- new.build_from_hash(attributes)
143
- end
144
-
145
- # Builds the object from hash
146
- # @param [Hash] attributes Model attributes in the form of hash
147
- # @return [Object] Returns the model itself
148
- def build_from_hash(attributes)
149
150
  return nil unless attributes.is_a?(Hash)
150
151
  attributes = attributes.transform_keys(&:to_sym)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
- self.send("#{key}=", nil)
152
+ transformed_hash = {}
153
+ openapi_types.each_pair do |key, type|
154
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = nil
154
156
  elsif type =~ /\AArray<(.*)>/i
155
157
  # check to ensure the input is an array given that the attribute
156
158
  # is documented as an array but the input is not
157
- if attributes[self.class.attribute_map[key]].is_a?(Array)
158
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ if attributes[attribute_map[key]].is_a?(Array)
160
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
161
  end
160
- elsif !attributes[self.class.attribute_map[key]].nil?
161
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ elsif !attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
164
  end
163
165
  end
164
-
165
- self
166
+ new(transformed_hash)
166
167
  end
167
168
 
168
169
  # Deserializes the data based on type
169
170
  # @param string type Data type
170
171
  # @param string value Value to be deserialized
171
172
  # @return [Object] Deserialized data
172
- def _deserialize(type, value)
173
+ def self._deserialize(type, value)
173
174
  case type.to_sym
174
175
  when :Time
175
176
  Time.parse(value)
@@ -204,7 +205,7 @@ module CityPayApiClient
204
205
  else # model
205
206
  # models (e.g. Pet) or oneOf
206
207
  klass = CityPayApiClient.const_get(type)
207
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
209
  end
209
210
  end
210
211
 
@@ -1,11 +1,11 @@
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 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.
4
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -66,6 +66,7 @@ module CityPayApiClient
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module CityPayApiClient
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module CityPayApiClient
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -165,7 +160,7 @@ module CityPayApiClient
165
160
  else # model
166
161
  # models (e.g. Pet) or oneOf
167
162
  klass = CityPayApiClient.const_get(type)
168
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
164
  end
170
165
  end
171
166
 
@@ -1,11 +1,11 @@
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 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.
4
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -14,43 +14,43 @@ require 'time'
14
14
 
15
15
  module CityPayApiClient
16
16
  class ContactDetails
17
- # The first line of the address for the shipping contact.
17
+ # The first line of the address for the card holder.
18
18
  attr_accessor :address1
19
19
 
20
- # The second line of the address for the shipping contact.
20
+ # The second line of the address for the card holder.
21
21
  attr_accessor :address2
22
22
 
23
- # The third line of the address for the shipping contact.
23
+ # The third line of the address for the card holder.
24
24
  attr_accessor :address3
25
25
 
26
- # The area such as city, department, parish for the shipping contact.
26
+ # The area such as city, department, parish for the card holder.
27
27
  attr_accessor :area
28
28
 
29
- # The company name for the shipping contact if the contact is a corporate contact.
29
+ # The company name for the card holder if the contact is a corporate contact.
30
30
  attr_accessor :company
31
31
 
32
32
  # The country code in ISO 3166 format. The country value may be used for fraud analysis and for acceptance of the transaction.
33
33
  attr_accessor :country
34
34
 
35
- # An email address for the shipping contact which may be used for correspondence.
35
+ # An email address for the card holder which may be used for correspondence.
36
36
  attr_accessor :email
37
37
 
38
- # The first name of the shipping contact.
38
+ # The first name of the card holder.
39
39
  attr_accessor :firstname
40
40
 
41
- # The last name or surname of the shipping contact.
41
+ # The last name or surname of the card holder.
42
42
  attr_accessor :lastname
43
43
 
44
- # A mobile number for the shipping contact the mobile number is often required by delivery companies to ensure they are able to be in contact when required.
44
+ # A mobile number for the card holder the mobile number is often required by delivery companies to ensure they are able to be in contact when required.
45
45
  attr_accessor :mobile_no
46
46
 
47
47
  # The postcode or zip code of the address which may be used for fraud analysis.
48
48
  attr_accessor :postcode
49
49
 
50
- # A telephone number for the shipping contact.
50
+ # A telephone number for the card holder.
51
51
  attr_accessor :telephone_no
52
52
 
53
- # A title for the shipping contact such as Mr, Mrs, Ms, M. Mme. etc.
53
+ # A title for the card holder such as Mr, Mrs, Ms, M. Mme. etc.
54
54
  attr_accessor :title
55
55
 
56
56
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -173,6 +173,7 @@ module CityPayApiClient
173
173
  # Show invalid properties with the reasons. Usually used together with valid?
174
174
  # @return Array for valid properties with the reasons
175
175
  def list_invalid_properties
176
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
176
177
  invalid_properties = Array.new
177
178
  if !@address1.nil? && @address1.to_s.length > 50
178
179
  invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.')
@@ -224,6 +225,7 @@ module CityPayApiClient
224
225
  # Check to see if the all the properties in the model are valid
225
226
  # @return true if the model is valid
226
227
  def valid?
228
+ warn '[DEPRECATED] the `valid?` method is obsolete'
227
229
  return false if !@address1.nil? && @address1.to_s.length > 50
228
230
  return false if !@address2.nil? && @address2.to_s.length > 50
229
231
  return false if !@address3.nil? && @address3.to_s.length > 50
@@ -241,7 +243,11 @@ module CityPayApiClient
241
243
  # Custom attribute writer method with validation
242
244
  # @param [Object] address1 Value to be assigned
243
245
  def address1=(address1)
244
- if !address1.nil? && address1.to_s.length > 50
246
+ if address1.nil?
247
+ fail ArgumentError, 'address1 cannot be nil'
248
+ end
249
+
250
+ if address1.to_s.length > 50
245
251
  fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.'
246
252
  end
247
253
 
@@ -251,7 +257,11 @@ module CityPayApiClient
251
257
  # Custom attribute writer method with validation
252
258
  # @param [Object] address2 Value to be assigned
253
259
  def address2=(address2)
254
- if !address2.nil? && address2.to_s.length > 50
260
+ if address2.nil?
261
+ fail ArgumentError, 'address2 cannot be nil'
262
+ end
263
+
264
+ if address2.to_s.length > 50
255
265
  fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 50.'
256
266
  end
257
267
 
@@ -261,7 +271,11 @@ module CityPayApiClient
261
271
  # Custom attribute writer method with validation
262
272
  # @param [Object] address3 Value to be assigned
263
273
  def address3=(address3)
264
- if !address3.nil? && address3.to_s.length > 50
274
+ if address3.nil?
275
+ fail ArgumentError, 'address3 cannot be nil'
276
+ end
277
+
278
+ if address3.to_s.length > 50
265
279
  fail ArgumentError, 'invalid value for "address3", the character length must be smaller than or equal to 50.'
266
280
  end
267
281
 
@@ -271,7 +285,11 @@ module CityPayApiClient
271
285
  # Custom attribute writer method with validation
272
286
  # @param [Object] area Value to be assigned
273
287
  def area=(area)
274
- if !area.nil? && area.to_s.length > 50
288
+ if area.nil?
289
+ fail ArgumentError, 'area cannot be nil'
290
+ end
291
+
292
+ if area.to_s.length > 50
275
293
  fail ArgumentError, 'invalid value for "area", the character length must be smaller than or equal to 50.'
276
294
  end
277
295
 
@@ -281,7 +299,11 @@ module CityPayApiClient
281
299
  # Custom attribute writer method with validation
282
300
  # @param [Object] company Value to be assigned
283
301
  def company=(company)
284
- if !company.nil? && company.to_s.length > 50
302
+ if company.nil?
303
+ fail ArgumentError, 'company cannot be nil'
304
+ end
305
+
306
+ if company.to_s.length > 50
285
307
  fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 50.'
286
308
  end
287
309
 
@@ -291,11 +313,15 @@ module CityPayApiClient
291
313
  # Custom attribute writer method with validation
292
314
  # @param [Object] country Value to be assigned
293
315
  def country=(country)
294
- if !country.nil? && country.to_s.length > 2
316
+ if country.nil?
317
+ fail ArgumentError, 'country cannot be nil'
318
+ end
319
+
320
+ if country.to_s.length > 2
295
321
  fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
296
322
  end
297
323
 
298
- if !country.nil? && country.to_s.length < 2
324
+ if country.to_s.length < 2
299
325
  fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.'
300
326
  end
301
327
 
@@ -305,7 +331,11 @@ module CityPayApiClient
305
331
  # Custom attribute writer method with validation
306
332
  # @param [Object] email Value to be assigned
307
333
  def email=(email)
308
- if !email.nil? && email.to_s.length > 254
334
+ if email.nil?
335
+ fail ArgumentError, 'email cannot be nil'
336
+ end
337
+
338
+ if email.to_s.length > 254
309
339
  fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
310
340
  end
311
341
 
@@ -315,7 +345,11 @@ module CityPayApiClient
315
345
  # Custom attribute writer method with validation
316
346
  # @param [Object] mobile_no Value to be assigned
317
347
  def mobile_no=(mobile_no)
318
- if !mobile_no.nil? && mobile_no.to_s.length > 20
348
+ if mobile_no.nil?
349
+ fail ArgumentError, 'mobile_no cannot be nil'
350
+ end
351
+
352
+ if mobile_no.to_s.length > 20
319
353
  fail ArgumentError, 'invalid value for "mobile_no", the character length must be smaller than or equal to 20.'
320
354
  end
321
355
 
@@ -325,7 +359,11 @@ module CityPayApiClient
325
359
  # Custom attribute writer method with validation
326
360
  # @param [Object] postcode Value to be assigned
327
361
  def postcode=(postcode)
328
- if !postcode.nil? && postcode.to_s.length > 16
362
+ if postcode.nil?
363
+ fail ArgumentError, 'postcode cannot be nil'
364
+ end
365
+
366
+ if postcode.to_s.length > 16
329
367
  fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 16.'
330
368
  end
331
369
 
@@ -335,7 +373,11 @@ module CityPayApiClient
335
373
  # Custom attribute writer method with validation
336
374
  # @param [Object] telephone_no Value to be assigned
337
375
  def telephone_no=(telephone_no)
338
- if !telephone_no.nil? && telephone_no.to_s.length > 20
376
+ if telephone_no.nil?
377
+ fail ArgumentError, 'telephone_no cannot be nil'
378
+ end
379
+
380
+ if telephone_no.to_s.length > 20
339
381
  fail ArgumentError, 'invalid value for "telephone_no", the character length must be smaller than or equal to 20.'
340
382
  end
341
383
 
@@ -378,37 +420,30 @@ module CityPayApiClient
378
420
  # @param [Hash] attributes Model attributes in the form of hash
379
421
  # @return [Object] Returns the model itself
380
422
  def self.build_from_hash(attributes)
381
- new.build_from_hash(attributes)
382
- end
383
-
384
- # Builds the object from hash
385
- # @param [Hash] attributes Model attributes in the form of hash
386
- # @return [Object] Returns the model itself
387
- def build_from_hash(attributes)
388
423
  return nil unless attributes.is_a?(Hash)
389
424
  attributes = attributes.transform_keys(&:to_sym)
390
- self.class.openapi_types.each_pair do |key, type|
391
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
392
- self.send("#{key}=", nil)
425
+ transformed_hash = {}
426
+ openapi_types.each_pair do |key, type|
427
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
428
+ transformed_hash["#{key}"] = nil
393
429
  elsif type =~ /\AArray<(.*)>/i
394
430
  # check to ensure the input is an array given that the attribute
395
431
  # is documented as an array but the input is not
396
- if attributes[self.class.attribute_map[key]].is_a?(Array)
397
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
432
+ if attributes[attribute_map[key]].is_a?(Array)
433
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
398
434
  end
399
- elsif !attributes[self.class.attribute_map[key]].nil?
400
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
435
+ elsif !attributes[attribute_map[key]].nil?
436
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
401
437
  end
402
438
  end
403
-
404
- self
439
+ new(transformed_hash)
405
440
  end
406
441
 
407
442
  # Deserializes the data based on type
408
443
  # @param string type Data type
409
444
  # @param string value Value to be deserialized
410
445
  # @return [Object] Deserialized data
411
- def _deserialize(type, value)
446
+ def self._deserialize(type, value)
412
447
  case type.to_sym
413
448
  when :Time
414
449
  Time.parse(value)
@@ -443,7 +478,7 @@ module CityPayApiClient
443
478
  else # model
444
479
  # models (e.g. Pet) or oneOf
445
480
  klass = CityPayApiClient.const_get(type)
446
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
481
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
447
482
  end
448
483
  end
449
484
 
@@ -1,11 +1,11 @@
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 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.
4
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -80,6 +80,7 @@ module CityPayApiClient
80
80
  # Show invalid properties with the reasons. Usually used together with valid?
81
81
  # @return Array for valid properties with the reasons
82
82
  def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
84
  invalid_properties = Array.new
84
85
  invalid_properties
85
86
  end
@@ -87,6 +88,7 @@ module CityPayApiClient
87
88
  # Check to see if the all the properties in the model are valid
88
89
  # @return true if the model is valid
89
90
  def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
92
  true
91
93
  end
92
94
 
@@ -116,37 +118,30 @@ module CityPayApiClient
116
118
  # @param [Hash] attributes Model attributes in the form of hash
117
119
  # @return [Object] Returns the model itself
118
120
  def self.build_from_hash(attributes)
119
- new.build_from_hash(attributes)
120
- end
121
-
122
- # Builds the object from hash
123
- # @param [Hash] attributes Model attributes in the form of hash
124
- # @return [Object] Returns the model itself
125
- def build_from_hash(attributes)
126
121
  return nil unless attributes.is_a?(Hash)
127
122
  attributes = attributes.transform_keys(&:to_sym)
128
- self.class.openapi_types.each_pair do |key, type|
129
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
130
- self.send("#{key}=", nil)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
131
127
  elsif type =~ /\AArray<(.*)>/i
132
128
  # check to ensure the input is an array given that the attribute
133
129
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
132
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
135
  end
140
136
  end
141
-
142
- self
137
+ new(transformed_hash)
143
138
  end
144
139
 
145
140
  # Deserializes the data based on type
146
141
  # @param string type Data type
147
142
  # @param string value Value to be deserialized
148
143
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
144
+ def self._deserialize(type, value)
150
145
  case type.to_sym
151
146
  when :Time
152
147
  Time.parse(value)
@@ -181,7 +176,7 @@ module CityPayApiClient
181
176
  else # model
182
177
  # models (e.g. Pet) or oneOf
183
178
  klass = CityPayApiClient.const_get(type)
184
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
180
  end
186
181
  end
187
182