citypay_api_client 1.0.0
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +176 -0
- data/Rakefile +10 -0
- data/citypay_api_client.gemspec +39 -0
- data/docs/AccountCreate.md +19 -0
- data/docs/AccountStatus.md +17 -0
- data/docs/Acknowledgement.md +23 -0
- data/docs/AirlineAdvice.md +47 -0
- data/docs/AirlineSegment.md +31 -0
- data/docs/AuthReference.md +43 -0
- data/docs/AuthReferences.md +17 -0
- data/docs/AuthRequest.md +59 -0
- data/docs/AuthResponse.md +69 -0
- data/docs/AuthenRequired.md +21 -0
- data/docs/CResAuthRequest.md +17 -0
- data/docs/CaptureRequest.md +27 -0
- data/docs/Card.md +51 -0
- data/docs/CardHolderAccount.md +31 -0
- data/docs/CardHolderAccountApi.md +515 -0
- data/docs/CardStatus.md +19 -0
- data/docs/ChargeRequest.md +41 -0
- data/docs/ContactDetails.md +41 -0
- data/docs/Decision.md +21 -0
- data/docs/Error.md +23 -0
- data/docs/ExternalMPI.md +25 -0
- data/docs/ListMerchantsResponse.md +21 -0
- data/docs/MCC6012.md +23 -0
- data/docs/Merchant.md +25 -0
- data/docs/OperationalApi.md +118 -0
- data/docs/PaResAuthRequest.md +19 -0
- data/docs/PaymentProcessingApi.md +338 -0
- data/docs/Ping.md +17 -0
- data/docs/RegisterCard.md +23 -0
- data/docs/RequestChallenged.md +25 -0
- data/docs/RetrieveRequest.md +21 -0
- data/docs/ThreeDSecure.md +25 -0
- data/docs/VoidRequest.md +23 -0
- data/git_push.sh +58 -0
- data/lib/citypay_api_client.rb +72 -0
- data/lib/citypay_api_client/api/card_holder_account_api.rb +628 -0
- data/lib/citypay_api_client/api/operational_api.rb +148 -0
- data/lib/citypay_api_client/api/payment_processing_api.rb +406 -0
- data/lib/citypay_api_client/api_client.rb +388 -0
- data/lib/citypay_api_client/api_error.rb +57 -0
- data/lib/citypay_api_client/configuration.rb +252 -0
- data/lib/citypay_api_client/models/account_create.rb +249 -0
- data/lib/citypay_api_client/models/account_status.rb +207 -0
- data/lib/citypay_api_client/models/acknowledgement.rb +285 -0
- data/lib/citypay_api_client/models/airline_advice.rb +551 -0
- data/lib/citypay_api_client/models/airline_segment.rb +408 -0
- data/lib/citypay_api_client/models/api_key.rb +53 -0
- data/lib/citypay_api_client/models/auth_reference.rb +400 -0
- data/lib/citypay_api_client/models/auth_references.rb +208 -0
- data/lib/citypay_api_client/models/auth_request.rb +631 -0
- data/lib/citypay_api_client/models/auth_response.rb +563 -0
- data/lib/citypay_api_client/models/authen_required.rb +227 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +207 -0
- data/lib/citypay_api_client/models/capture_request.rb +285 -0
- data/lib/citypay_api_client/models/card.rb +425 -0
- data/lib/citypay_api_client/models/card_holder_account.rb +315 -0
- data/lib/citypay_api_client/models/card_status.rb +217 -0
- data/lib/citypay_api_client/models/charge_request.rb +453 -0
- data/lib/citypay_api_client/models/contact_details.rb +456 -0
- data/lib/citypay_api_client/models/decision.rb +224 -0
- data/lib/citypay_api_client/models/error.rb +285 -0
- data/lib/citypay_api_client/models/external_mpi.rb +307 -0
- data/lib/citypay_api_client/models/list_merchants_response.rb +252 -0
- data/lib/citypay_api_client/models/mcc6012.rb +237 -0
- data/lib/citypay_api_client/models/merchant.rb +247 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +227 -0
- data/lib/citypay_api_client/models/ping.rb +231 -0
- data/lib/citypay_api_client/models/register_card.rb +336 -0
- data/lib/citypay_api_client/models/request_challenged.rb +247 -0
- data/lib/citypay_api_client/models/retrieve_request.rb +256 -0
- data/lib/citypay_api_client/models/three_d_secure.rb +247 -0
- data/lib/citypay_api_client/models/void_request.rb +266 -0
- data/lib/citypay_api_client/version.rb +15 -0
- data/spec/api/card_holder_account_api_spec.rb +149 -0
- data/spec/api/operational_api_spec.rb +59 -0
- data/spec/api/payment_processing_api_spec.rb +107 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_create_spec.rb +47 -0
- data/spec/models/account_status_spec.rb +41 -0
- data/spec/models/acknowledgement_spec.rb +59 -0
- data/spec/models/airline_advice_spec.rb +131 -0
- data/spec/models/airline_segment_spec.rb +83 -0
- data/spec/models/auth_reference_spec.rb +119 -0
- data/spec/models/auth_references_spec.rb +41 -0
- data/spec/models/auth_request_spec.rb +167 -0
- data/spec/models/auth_response_spec.rb +197 -0
- data/spec/models/authen_required_spec.rb +53 -0
- data/spec/models/c_res_auth_request_spec.rb +41 -0
- data/spec/models/capture_request_spec.rb +71 -0
- data/spec/models/card_holder_account_spec.rb +83 -0
- data/spec/models/card_spec.rb +143 -0
- data/spec/models/card_status_spec.rb +47 -0
- data/spec/models/charge_request_spec.rb +113 -0
- data/spec/models/contact_details_spec.rb +113 -0
- data/spec/models/decision_spec.rb +53 -0
- data/spec/models/error_spec.rb +59 -0
- data/spec/models/external_mpi_spec.rb +65 -0
- data/spec/models/list_merchants_response_spec.rb +53 -0
- data/spec/models/mcc6012_spec.rb +59 -0
- data/spec/models/merchant_spec.rb +65 -0
- data/spec/models/pa_res_auth_request_spec.rb +47 -0
- data/spec/models/ping_spec.rb +41 -0
- data/spec/models/register_card_spec.rb +59 -0
- data/spec/models/request_challenged_spec.rb +65 -0
- data/spec/models/retrieve_request_spec.rb +53 -0
- data/spec/models/three_d_secure_spec.rb +65 -0
- data/spec/models/void_request_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +252 -0
@@ -0,0 +1,266 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 <aside class=\"notice\"> Before we begin a reminder that 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 including: </aside> * 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
|
+
|
6
|
+
The version of the OpenAPI document: 6.0.0
|
7
|
+
Contact: support@citypay.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CityPayApiClient
|
16
|
+
class VoidRequest
|
17
|
+
# The identifier of the transaction to void. If an empty value is supplied then a `trans_no` value must be supplied.
|
18
|
+
attr_accessor :identifier
|
19
|
+
|
20
|
+
# Identifies the merchant account to perform the void for.
|
21
|
+
attr_accessor :merchantid
|
22
|
+
|
23
|
+
# An optional reference value for the calling client such as a version number i.e.
|
24
|
+
attr_accessor :sdk
|
25
|
+
|
26
|
+
# The transaction number of the transaction to look up and void. If an empty value is supplied then an identifier value must be supplied.
|
27
|
+
attr_accessor :transno
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'identifier' => :'identifier',
|
33
|
+
:'merchantid' => :'merchantid',
|
34
|
+
:'sdk' => :'sdk',
|
35
|
+
:'transno' => :'transno'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'identifier' => :'String',
|
43
|
+
:'merchantid' => :'Integer',
|
44
|
+
:'sdk' => :'String',
|
45
|
+
:'transno' => :'Integer'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::VoidRequest` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::VoidRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'identifier')
|
71
|
+
self.identifier = attributes[:'identifier']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'merchantid')
|
75
|
+
self.merchantid = attributes[:'merchantid']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'sdk')
|
79
|
+
self.sdk = attributes[:'sdk']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'transno')
|
83
|
+
self.transno = attributes[:'transno']
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = Array.new
|
91
|
+
if !@identifier.nil? && @identifier.to_s.length > 50
|
92
|
+
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
93
|
+
end
|
94
|
+
|
95
|
+
if !@identifier.nil? && @identifier.to_s.length < 4
|
96
|
+
invalid_properties.push('invalid value for "identifier", the character length must be great than or equal to 4.')
|
97
|
+
end
|
98
|
+
|
99
|
+
if @merchantid.nil?
|
100
|
+
invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
invalid_properties
|
104
|
+
end
|
105
|
+
|
106
|
+
# Check to see if the all the properties in the model are valid
|
107
|
+
# @return true if the model is valid
|
108
|
+
def valid?
|
109
|
+
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
110
|
+
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
111
|
+
return false if @merchantid.nil?
|
112
|
+
true
|
113
|
+
end
|
114
|
+
|
115
|
+
# Custom attribute writer method with validation
|
116
|
+
# @param [Object] identifier Value to be assigned
|
117
|
+
def identifier=(identifier)
|
118
|
+
if !identifier.nil? && identifier.to_s.length > 50
|
119
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
120
|
+
end
|
121
|
+
|
122
|
+
if !identifier.nil? && identifier.to_s.length < 4
|
123
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
124
|
+
end
|
125
|
+
|
126
|
+
@identifier = identifier
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def ==(o)
|
132
|
+
return true if self.equal?(o)
|
133
|
+
self.class == o.class &&
|
134
|
+
identifier == o.identifier &&
|
135
|
+
merchantid == o.merchantid &&
|
136
|
+
sdk == o.sdk &&
|
137
|
+
transno == o.transno
|
138
|
+
end
|
139
|
+
|
140
|
+
# @see the `==` method
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def eql?(o)
|
143
|
+
self == o
|
144
|
+
end
|
145
|
+
|
146
|
+
# Calculates hash code according to all attributes.
|
147
|
+
# @return [Integer] Hash code
|
148
|
+
def hash
|
149
|
+
[identifier, merchantid, sdk, transno].hash
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def self.build_from_hash(attributes)
|
156
|
+
new.build_from_hash(attributes)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Builds the object from hash
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
+
# @return [Object] Returns the model itself
|
162
|
+
def build_from_hash(attributes)
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
164
|
+
self.class.openapi_types.each_pair do |key, type|
|
165
|
+
if type =~ /\AArray<(.*)>/i
|
166
|
+
# check to ensure the input is an array given that the attribute
|
167
|
+
# is documented as an array but the input is not
|
168
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
169
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
170
|
+
end
|
171
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
172
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
173
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
174
|
+
end
|
175
|
+
|
176
|
+
self
|
177
|
+
end
|
178
|
+
|
179
|
+
# Deserializes the data based on type
|
180
|
+
# @param string type Data type
|
181
|
+
# @param string value Value to be deserialized
|
182
|
+
# @return [Object] Deserialized data
|
183
|
+
def _deserialize(type, value)
|
184
|
+
case type.to_sym
|
185
|
+
when :DateTime
|
186
|
+
DateTime.parse(value)
|
187
|
+
when :Date
|
188
|
+
Date.parse(value)
|
189
|
+
when :String
|
190
|
+
value.to_s
|
191
|
+
when :Integer
|
192
|
+
value.to_i
|
193
|
+
when :Float
|
194
|
+
value.to_f
|
195
|
+
when :Boolean
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
197
|
+
true
|
198
|
+
else
|
199
|
+
false
|
200
|
+
end
|
201
|
+
when :Object
|
202
|
+
# generic object (usually a Hash), return directly
|
203
|
+
value
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each do |k, v|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
else # model
|
216
|
+
CityPayApiClient.const_get(type).build_from_hash(value)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the string representation of the object
|
221
|
+
# @return [String] String presentation of the object
|
222
|
+
def to_s
|
223
|
+
to_hash.to_s
|
224
|
+
end
|
225
|
+
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_body
|
229
|
+
to_hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the object in the form of hash
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_hash
|
235
|
+
hash = {}
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
237
|
+
value = self.send(attr)
|
238
|
+
if value.nil?
|
239
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
240
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
241
|
+
end
|
242
|
+
|
243
|
+
hash[param] = _to_hash(value)
|
244
|
+
end
|
245
|
+
hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# Outputs non-array value in the form of hash
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
250
|
+
# @param [Object] value Any valid value
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
252
|
+
def _to_hash(value)
|
253
|
+
if value.is_a?(Array)
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
255
|
+
elsif value.is_a?(Hash)
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
258
|
+
end
|
259
|
+
elsif value.respond_to? :to_hash
|
260
|
+
value.to_hash
|
261
|
+
else
|
262
|
+
value
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 <aside class=\"notice\"> Before we begin a reminder that 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 including: </aside> * 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
|
+
|
6
|
+
The version of the OpenAPI document: 6.0.0
|
7
|
+
Contact: support@citypay.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module CityPayApiClient
|
14
|
+
VERSION = '1.0.0'
|
15
|
+
end
|
@@ -0,0 +1,149 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 <aside class=\"notice\"> Before we begin a reminder that 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 including: </aside> * 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
|
+
|
6
|
+
The version of the OpenAPI document: 6.0.0
|
7
|
+
Contact: support@citypay.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for CityPayApiClient::CardHolderAccountApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CardHolderAccountApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = CityPayApiClient::CardHolderAccountApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CardHolderAccountApi' do
|
30
|
+
it 'should create an instance of CardHolderAccountApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(CityPayApiClient::CardHolderAccountApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for account_card_delete_request
|
36
|
+
# Card Deletion
|
37
|
+
# Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently.
|
38
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
39
|
+
# @param card_id The id of the card that is presented by a call to retrieve a card holder account.
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [Acknowledgement]
|
42
|
+
describe 'account_card_delete_request test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for account_card_register_request
|
49
|
+
# Card Registration
|
50
|
+
# Allows for a card to be registered for the account. The card will be added for future processing and will be available as a tokenised value for future processing. The card will be validated for 0. Being a valid card number (luhn check) 0. Having a valid expiry date 0. Being a valid bin value.
|
51
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
52
|
+
# @param register_card
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [CardHolderAccount]
|
55
|
+
describe 'account_card_register_request test' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# unit tests for account_card_status_request
|
62
|
+
# Card Status
|
63
|
+
# Updates the status of a card for processing. The following values are available | Status | Description | |--------|-------------| | Active | The card is active for processing and can be used for charging against with a valid token | | Inactive | The card is inactive for processing and cannot be used for processing, it will require reactivation before being used to charge | | Expired | The card has expired either due to the expiry date no longer being valid or due to a replacement card being issued |
|
64
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
65
|
+
# @param card_id The id of the card that is presented by a call to retrieve a card holder account.
|
66
|
+
# @param card_status
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @return [Acknowledgement]
|
69
|
+
describe 'account_card_status_request test' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# unit tests for account_change_contact_request
|
76
|
+
# Contact Details Update
|
77
|
+
# Allows for the ability to change the contact details for an account.
|
78
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
79
|
+
# @param contact_details
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [CardHolderAccount]
|
82
|
+
describe 'account_change_contact_request test' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# unit tests for account_create
|
89
|
+
# Account Create
|
90
|
+
# Creates a new card holder account and initialises the account ready for adding cards.
|
91
|
+
# @param account_create
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [CardHolderAccount]
|
94
|
+
describe 'account_create test' do
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# unit tests for account_delete_request
|
101
|
+
# Account Deletion
|
102
|
+
# Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further transactions will be alowed to be processed or actioned against this account.
|
103
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Acknowledgement]
|
106
|
+
describe 'account_delete_request test' do
|
107
|
+
it 'should work' do
|
108
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# unit tests for account_retrieve_request
|
113
|
+
# Account Retrieval
|
114
|
+
# Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist for the same `id`, the first account created with that `id` will be returned. The account can be used for tokenisation processing by listing all cards assigned to the account. The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to enable a card holder to view their wallet and make constructive choices on which card to use.
|
115
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @return [CardHolderAccount]
|
118
|
+
describe 'account_retrieve_request test' do
|
119
|
+
it 'should work' do
|
120
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
# unit tests for account_status_request
|
125
|
+
# Account Status
|
126
|
+
# Updates the status of an account. An account can have the following statuses applied | Status | Description | |--------|-------------| | Active | The account is active for processing | | Disabled | The account has been disabled and cannot be used for processing. The account will require reactivation to continue procesing |
|
127
|
+
# @param accountid The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
128
|
+
# @param account_status
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @return [Acknowledgement]
|
131
|
+
describe 'account_status_request test' do
|
132
|
+
it 'should work' do
|
133
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# unit tests for charge_request
|
138
|
+
# Charge
|
139
|
+
# A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage.
|
140
|
+
# @param charge_request
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [Decision]
|
143
|
+
describe 'charge_request test' do
|
144
|
+
it 'should work' do
|
145
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 <aside class=\"notice\"> Before we begin a reminder that 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 including: </aside> * 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
|
+
|
6
|
+
The version of the OpenAPI document: 6.0.0
|
7
|
+
Contact: support@citypay.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for CityPayApiClient::OperationalApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'OperationalApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = CityPayApiClient::OperationalApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of OperationalApi' do
|
30
|
+
it 'should create an instance of OperationalApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(CityPayApiClient::OperationalApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for list_merchants_request
|
36
|
+
# List Merchants Request
|
37
|
+
# An operational request to list current merchants for a client. ### Sorting Sorting can be performed by include a query parameter i.e. `/merchants/?sort=merchantid` Fields that can be sorted are `merchantid` or `name`.
|
38
|
+
# @param clientid The client id to return merchants for, specifying \"default\" will use the value in your api key.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [ListMerchantsResponse]
|
41
|
+
describe 'list_merchants_request test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for ping_request
|
48
|
+
# Ping Request
|
49
|
+
# A ping request which performs a connection and authentication test to the CityPay API server. The request will return a standard Acknowledgement with a response code `044` to signify a successful ping. The ping call is useful to confirm that you will be able to access the API from behind any firewalls and that the permission model is granting access from your source.
|
50
|
+
# @param ping
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [Acknowledgement]
|
53
|
+
describe 'ping_request test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|