citypay_api_client 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +73 -0
  3. data/README.md +59 -32
  4. data/citypay_api_client.gemspec +1 -1
  5. data/docs/Acknowledgement.md +2 -2
  6. data/docs/AclCheckResponseModel.md +3 -3
  7. data/docs/AuthRequest.md +7 -7
  8. data/docs/AuthResponse.md +4 -4
  9. data/docs/AuthorisationAndPaymentApi.md +75 -231
  10. data/docs/Batch.md +1 -1
  11. data/docs/BatchProcessingApi.md +11 -11
  12. data/docs/BatchReportResponseModel.md +2 -2
  13. data/docs/BatchTransaction.md +1 -1
  14. data/docs/BatchTransactionReportRequest.md +22 -0
  15. data/docs/BatchTransactionReportResponse.md +24 -0
  16. data/docs/BatchTransactionResultModel.md +1 -1
  17. data/docs/Bin.md +2 -2
  18. data/docs/CaptureRequest.md +1 -1
  19. data/docs/Card.md +2 -2
  20. data/docs/CardHolderAccountApi.md +9 -5
  21. data/docs/ChargeRequest.md +7 -7
  22. data/docs/Decision.md +0 -2
  23. data/docs/DirectPostApi.md +2 -16
  24. data/docs/DirectPostRequest.md +7 -7
  25. data/docs/EventDataModel.md +2 -2
  26. data/docs/MerchantBatchReportRequest.md +28 -0
  27. data/docs/MerchantBatchReportResponse.md +24 -0
  28. data/docs/MerchantBatchResponse.md +30 -0
  29. data/docs/NetSummaryResponse.md +32 -0
  30. data/docs/PaylinkAdjustmentRequest.md +1 -1
  31. data/docs/PaylinkApi.md +141 -1
  32. data/docs/PaylinkBillPaymentTokenRequest.md +1 -1
  33. data/docs/PaylinkErrorCode.md +2 -2
  34. data/docs/PaylinkResendNotificationRequest.md +20 -0
  35. data/docs/PaylinkStateEvent.md +4 -4
  36. data/docs/PaylinkTokenCreated.md +11 -11
  37. data/docs/PaylinkTokenStatus.md +7 -7
  38. data/docs/PaylinkTokenStatusChangeRequest.md +7 -7
  39. data/docs/PaylinkTokenStatusChangeResponse.md +6 -2
  40. data/docs/PaymentIntent.md +42 -0
  41. data/docs/PaymentIntentReference.md +18 -0
  42. data/docs/RefundRequest.md +1 -1
  43. data/docs/RemittanceData.md +28 -0
  44. data/docs/RemittanceReportRequest.md +28 -0
  45. data/docs/RemittanceReportResponse.md +24 -0
  46. data/docs/RemittedClientData.md +44 -0
  47. data/docs/ReportingApi.md +378 -0
  48. data/docs/TokenisationResponseModel.md +1 -1
  49. data/lib/.DS_Store +0 -0
  50. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +71 -3
  51. data/lib/citypay_api_client/api/batch_processing_api__.rb +7 -7
  52. data/lib/citypay_api_client/api/card_holder_account_api__.rb +4 -1
  53. data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
  54. data/lib/citypay_api_client/api/operational_functions_api__.rb +1 -1
  55. data/lib/citypay_api_client/api/paylink_api__.rb +138 -1
  56. data/lib/citypay_api_client/api/reporting_api__.rb +381 -0
  57. data/lib/citypay_api_client/api_client.rb +1 -1
  58. data/lib/citypay_api_client/api_error.rb +1 -1
  59. data/lib/citypay_api_client/configuration.rb +1 -1
  60. data/lib/citypay_api_client/models/account_create.rb +1 -1
  61. data/lib/citypay_api_client/models/account_status.rb +1 -1
  62. data/lib/citypay_api_client/models/acknowledgement.rb +1 -29
  63. data/lib/citypay_api_client/models/acl_check_request.rb +1 -1
  64. data/lib/citypay_api_client/models/acl_check_response_model.rb +2 -2
  65. data/lib/citypay_api_client/models/airline_advice.rb +1 -1
  66. data/lib/citypay_api_client/models/airline_segment.rb +1 -1
  67. data/lib/citypay_api_client/models/auth_reference.rb +1 -1
  68. data/lib/citypay_api_client/models/auth_references.rb +1 -1
  69. data/lib/citypay_api_client/models/auth_request.rb +10 -9
  70. data/lib/citypay_api_client/models/auth_response.rb +2 -2
  71. data/lib/citypay_api_client/models/batch.rb +2 -2
  72. data/lib/citypay_api_client/models/batch_report_request.rb +1 -1
  73. data/lib/citypay_api_client/models/batch_report_response_model.rb +2 -2
  74. data/lib/citypay_api_client/models/batch_transaction.rb +1 -1
  75. data/lib/citypay_api_client/models/batch_transaction_report_request.rb +234 -0
  76. data/lib/citypay_api_client/models/batch_transaction_report_response.rb +252 -0
  77. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +1 -1
  78. data/lib/citypay_api_client/models/bin.rb +1 -1
  79. data/lib/citypay_api_client/models/bin_lookup.rb +1 -1
  80. data/lib/citypay_api_client/models/c_res_auth_request.rb +1 -1
  81. data/lib/citypay_api_client/models/capture_request.rb +1 -1
  82. data/lib/citypay_api_client/models/card.rb +1 -1
  83. data/lib/citypay_api_client/models/card_holder_account.rb +1 -1
  84. data/lib/citypay_api_client/models/card_status.rb +1 -1
  85. data/lib/citypay_api_client/models/charge_request.rb +10 -9
  86. data/lib/citypay_api_client/models/check_batch_status.rb +1 -1
  87. data/lib/citypay_api_client/models/check_batch_status_response.rb +1 -1
  88. data/lib/citypay_api_client/models/contact_details.rb +1 -1
  89. data/lib/citypay_api_client/models/decision.rb +2 -11
  90. data/lib/citypay_api_client/models/direct_post_request.rb +10 -9
  91. data/lib/citypay_api_client/models/direct_token_auth_request.rb +1 -1
  92. data/lib/citypay_api_client/models/domain_key_check_request.rb +1 -1
  93. data/lib/citypay_api_client/models/domain_key_request.rb +1 -1
  94. data/lib/citypay_api_client/models/domain_key_response.rb +1 -1
  95. data/lib/citypay_api_client/models/error.rb +1 -1
  96. data/lib/citypay_api_client/models/event_data_model.rb +1 -1
  97. data/lib/citypay_api_client/models/exists.rb +1 -1
  98. data/lib/citypay_api_client/models/external_mpi.rb +1 -1
  99. data/lib/citypay_api_client/models/list_merchants_response.rb +1 -1
  100. data/lib/citypay_api_client/models/mcc6012.rb +1 -1
  101. data/lib/citypay_api_client/models/merchant.rb +1 -1
  102. data/lib/citypay_api_client/models/merchant_batch_report_request.rb +265 -0
  103. data/lib/citypay_api_client/models/merchant_batch_report_response.rb +252 -0
  104. data/lib/citypay_api_client/models/merchant_batch_response.rb +301 -0
  105. data/lib/citypay_api_client/models/net_summary_response.rb +472 -0
  106. data/lib/citypay_api_client/models/pa_res_auth_request.rb +1 -1
  107. data/lib/citypay_api_client/models/paylink_address.rb +1 -1
  108. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +1 -1
  109. data/lib/citypay_api_client/models/paylink_attachment_request.rb +1 -1
  110. data/lib/citypay_api_client/models/paylink_attachment_result.rb +1 -1
  111. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +1 -1
  112. data/lib/citypay_api_client/models/paylink_card_holder.rb +1 -1
  113. data/lib/citypay_api_client/models/paylink_cart.rb +1 -1
  114. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +1 -1
  115. data/lib/citypay_api_client/models/paylink_config.rb +1 -1
  116. data/lib/citypay_api_client/models/paylink_custom_param.rb +1 -1
  117. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +1 -1
  118. data/lib/citypay_api_client/models/paylink_error_code.rb +1 -1
  119. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +1 -1
  120. data/lib/citypay_api_client/models/paylink_part_payments.rb +1 -1
  121. data/lib/citypay_api_client/models/paylink_resend_notification_request.rb +224 -0
  122. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +1 -1
  123. data/lib/citypay_api_client/models/paylink_state_event.rb +2 -2
  124. data/lib/citypay_api_client/models/paylink_token_created.rb +36 -8
  125. data/lib/citypay_api_client/models/paylink_token_request_model.rb +1 -1
  126. data/lib/citypay_api_client/models/paylink_token_status.rb +30 -2
  127. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +6 -7
  128. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +23 -3
  129. data/lib/citypay_api_client/models/paylink_ui.rb +1 -1
  130. data/lib/citypay_api_client/models/payment_intent.rb +479 -0
  131. data/lib/citypay_api_client/models/payment_intent_reference.rb +221 -0
  132. data/lib/citypay_api_client/models/ping.rb +1 -1
  133. data/lib/citypay_api_client/models/process_batch_request.rb +1 -1
  134. data/lib/citypay_api_client/models/process_batch_response.rb +1 -1
  135. data/lib/citypay_api_client/models/refund_request.rb +1 -1
  136. data/lib/citypay_api_client/models/register_card.rb +1 -1
  137. data/lib/citypay_api_client/models/remittance_data.rb +404 -0
  138. data/lib/citypay_api_client/models/remittance_report_request.rb +265 -0
  139. data/lib/citypay_api_client/models/remittance_report_response.rb +252 -0
  140. data/lib/citypay_api_client/models/remitted_client_data.rb +612 -0
  141. data/lib/citypay_api_client/models/request_challenged.rb +1 -1
  142. data/lib/citypay_api_client/models/retrieve_request.rb +1 -1
  143. data/lib/citypay_api_client/models/three_d_secure.rb +1 -1
  144. data/lib/citypay_api_client/models/tokenisation_response_model.rb +1 -1
  145. data/lib/citypay_api_client/models/void_request.rb +1 -1
  146. data/lib/citypay_api_client/version.rb +2 -2
  147. data/lib/citypay_api_client.rb +15 -2
  148. data/spec/.DS_Store +0 -0
  149. data/spec/api/reporting_api___spec.rb +99 -0
  150. data/spec/it_api_sandbox_spec.rb +0 -3
  151. data/spec/models/batch_transaction_report_request_spec.rb +47 -0
  152. data/spec/models/batch_transaction_report_response_spec.rb +53 -0
  153. data/spec/models/decision_spec.rb +0 -26
  154. data/spec/models/merchant_batch_report_request_spec.rb +65 -0
  155. data/spec/models/merchant_batch_report_response_spec.rb +53 -0
  156. data/spec/models/merchant_batch_response_spec.rb +71 -0
  157. data/spec/models/net_summary_response_spec.rb +77 -0
  158. data/spec/models/paylink_resend_notification_request_spec.rb +41 -0
  159. data/spec/models/payment_intent_reference_spec.rb +35 -0
  160. data/spec/models/payment_intent_spec.rb +107 -0
  161. data/spec/models/remittance_data_spec.rb +65 -0
  162. data/spec/models/remittance_report_request_spec.rb +65 -0
  163. data/spec/models/remittance_report_response_spec.rb +53 -0
  164. data/spec/models/remitted_client_data_spec.rb +113 -0
  165. data/spec/spec_helper.rb +1 -1
  166. metadata +124 -69
  167. data/spec/models/authen_required_spec.rb +0 -52
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #CityPay Payment API
3
+
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
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 'date'
13
+ require 'time'
14
+
15
+ module CityPayApiClient
16
+ class RemittanceReportResponse
17
+ # The count of items returned in this page.
18
+ attr_accessor :count
19
+
20
+ attr_accessor :data
21
+
22
+ # The max results requested in this page.
23
+ attr_accessor :max_results
24
+
25
+ # A token that identifies the starting point of the page of results to be returned. An empty value indicates the start of the dataset. When supplied, it is validated and used to fetch the subsequent page of results. This token is typically obtained from the response of a previous pagination request.
26
+ attr_accessor :next_token
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'count' => :'count',
32
+ :'data' => :'data',
33
+ :'max_results' => :'maxResults',
34
+ :'next_token' => :'nextToken'
35
+ }
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'count' => :'Integer',
47
+ :'data' => :'Array<RemittedClientData>',
48
+ :'max_results' => :'Integer',
49
+ :'next_token' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::RemittanceReportResponse` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::RemittanceReportResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'count')
75
+ self.count = attributes[:'count']
76
+ end
77
+
78
+ if attributes.key?(:'data')
79
+ if (value = attributes[:'data']).is_a?(Array)
80
+ self.data = value
81
+ end
82
+ else
83
+ self.data = nil
84
+ end
85
+
86
+ if attributes.key?(:'max_results')
87
+ self.max_results = attributes[:'max_results']
88
+ end
89
+
90
+ if attributes.key?(:'next_token')
91
+ self.next_token = attributes[:'next_token']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @data.nil?
101
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @data.nil?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ count == o.count &&
121
+ data == o.data &&
122
+ max_results == o.max_results &&
123
+ next_token == o.next_token
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [count, data, max_results, next_token].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def self._deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = CityPayApiClient.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end