feratel-check-api-client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +159 -0
- data/Rakefile +10 -0
- data/docs/AgeGroup.md +22 -0
- data/docs/AgeGroupTranslation.md +20 -0
- data/docs/CheckPoint.md +38 -0
- data/docs/CheckPointGroup.md +20 -0
- data/docs/CheckPointItem.md +26 -0
- data/docs/CheckResourcesApi.md +545 -0
- data/docs/CheckResult.md +26 -0
- data/docs/CheckState.md +20 -0
- data/docs/CheckStateEnum.md +15 -0
- data/docs/CheckStateTranslation.md +20 -0
- data/docs/CheckpointError.md +22 -0
- data/docs/Customer.md +24 -0
- data/docs/History.md +18 -0
- data/docs/HistoryItem.md +24 -0
- data/docs/HistoryItemState.md +26 -0
- data/docs/Identification.md +36 -0
- data/docs/IdentificationStatus.md +15 -0
- data/docs/IdentificationType.md +26 -0
- data/docs/IdentificationUsage.md +26 -0
- data/docs/IdentificationUsageType.md +15 -0
- data/docs/Identifier.md +20 -0
- data/docs/IdentifierType.md +15 -0
- data/docs/ServiceProvider.md +24 -0
- data/docs/ServiceType.md +28 -0
- data/docs/ServiceTypeAssignment.md +22 -0
- data/docs/ServiceTypeTranslation.md +20 -0
- data/docs/ServiceUsage.md +36 -0
- data/docs/ServiceUsageType.md +15 -0
- data/docs/SystemResourcesApi.md +147 -0
- data/docs/TransactError.md +22 -0
- data/docs/TransactResult.md +34 -0
- data/docs/TransactState.md +20 -0
- data/docs/TransactStateEnum.md +15 -0
- data/docs/TransactStateTranslation.md +20 -0
- data/docs/ValidTransactionInfo.md +20 -0
- data/docs/Week.md +30 -0
- data/feratel-check-api-client.gemspec +39 -0
- data/git_push.sh +57 -0
- data/lib/feratel-check-api-client/api/check_resources_api.rb +586 -0
- data/lib/feratel-check-api-client/api/system_resources_api.rb +148 -0
- data/lib/feratel-check-api-client/api_client.rb +394 -0
- data/lib/feratel-check-api-client/api_error.rb +58 -0
- data/lib/feratel-check-api-client/configuration.rb +308 -0
- data/lib/feratel-check-api-client/models/age_group.rb +255 -0
- data/lib/feratel-check-api-client/models/age_group_translation.rb +223 -0
- data/lib/feratel-check-api-client/models/check_point.rb +327 -0
- data/lib/feratel-check-api-client/models/check_point_group.rb +244 -0
- data/lib/feratel-check-api-client/models/check_point_item.rb +271 -0
- data/lib/feratel-check-api-client/models/check_result.rb +250 -0
- data/lib/feratel-check-api-client/models/check_state.rb +247 -0
- data/lib/feratel-check-api-client/models/check_state_enum.rb +82 -0
- data/lib/feratel-check-api-client/models/check_state_translation.rb +223 -0
- data/lib/feratel-check-api-client/models/checkpoint_error.rb +256 -0
- data/lib/feratel-check-api-client/models/customer.rb +262 -0
- data/lib/feratel-check-api-client/models/history.rb +216 -0
- data/lib/feratel-check-api-client/models/history_item.rb +262 -0
- data/lib/feratel-check-api-client/models/history_item_state.rb +250 -0
- data/lib/feratel-check-api-client/models/identification.rb +338 -0
- data/lib/feratel-check-api-client/models/identification_status.rb +43 -0
- data/lib/feratel-check-api-client/models/identification_type.rb +271 -0
- data/lib/feratel-check-api-client/models/identification_usage.rb +314 -0
- data/lib/feratel-check-api-client/models/identification_usage_type.rb +42 -0
- data/lib/feratel-check-api-client/models/identifier.rb +245 -0
- data/lib/feratel-check-api-client/models/identifier_type.rb +44 -0
- data/lib/feratel-check-api-client/models/service_provider.rb +262 -0
- data/lib/feratel-check-api-client/models/service_type.rb +282 -0
- data/lib/feratel-check-api-client/models/service_type_assignment.rb +253 -0
- data/lib/feratel-check-api-client/models/service_type_translation.rb +223 -0
- data/lib/feratel-check-api-client/models/service_usage.rb +380 -0
- data/lib/feratel-check-api-client/models/service_usage_type.rb +50 -0
- data/lib/feratel-check-api-client/models/transact_error.rb +256 -0
- data/lib/feratel-check-api-client/models/transact_result.rb +349 -0
- data/lib/feratel-check-api-client/models/transact_state.rb +247 -0
- data/lib/feratel-check-api-client/models/transact_state_enum.rb +54 -0
- data/lib/feratel-check-api-client/models/transact_state_translation.rb +223 -0
- data/lib/feratel-check-api-client/models/valid_transaction_info.rb +223 -0
- data/lib/feratel-check-api-client/models/week.rb +268 -0
- data/lib/feratel-check-api-client/version.rb +15 -0
- data/lib/feratel-check-api-client.rb +75 -0
- data/spec/api/check_resources_api_spec.rb +137 -0
- data/spec/api/system_resources_api_spec.rb +59 -0
- data/spec/models/age_group_spec.rb +48 -0
- data/spec/models/age_group_translation_spec.rb +42 -0
- data/spec/models/check_point_group_spec.rb +42 -0
- data/spec/models/check_point_item_spec.rb +60 -0
- data/spec/models/check_point_spec.rb +96 -0
- data/spec/models/check_result_spec.rb +60 -0
- data/spec/models/check_state_enum_spec.rb +30 -0
- data/spec/models/check_state_spec.rb +42 -0
- data/spec/models/check_state_translation_spec.rb +42 -0
- data/spec/models/checkpoint_error_spec.rb +48 -0
- data/spec/models/customer_spec.rb +54 -0
- data/spec/models/history_item_spec.rb +54 -0
- data/spec/models/history_item_state_spec.rb +60 -0
- data/spec/models/history_spec.rb +36 -0
- data/spec/models/identification_spec.rb +90 -0
- data/spec/models/identification_status_spec.rb +30 -0
- data/spec/models/identification_type_spec.rb +60 -0
- data/spec/models/identification_usage_spec.rb +60 -0
- data/spec/models/identification_usage_type_spec.rb +30 -0
- data/spec/models/identifier_spec.rb +42 -0
- data/spec/models/identifier_type_spec.rb +30 -0
- data/spec/models/service_provider_spec.rb +54 -0
- data/spec/models/service_type_assignment_spec.rb +48 -0
- data/spec/models/service_type_spec.rb +66 -0
- data/spec/models/service_type_translation_spec.rb +42 -0
- data/spec/models/service_usage_spec.rb +90 -0
- data/spec/models/service_usage_type_spec.rb +30 -0
- data/spec/models/transact_error_spec.rb +48 -0
- data/spec/models/transact_result_spec.rb +84 -0
- data/spec/models/transact_state_enum_spec.rb +30 -0
- data/spec/models/transact_state_spec.rb +42 -0
- data/spec/models/transact_state_translation_spec.rb +42 -0
- data/spec/models/valid_transaction_info_spec.rb +42 -0
- data/spec/models/week_spec.rb +72 -0
- data/spec/spec_helper.rb +111 -0
- metadata +255 -0
@@ -0,0 +1,250 @@
|
|
1
|
+
=begin
|
2
|
+
#CheckAPI Standard
|
3
|
+
|
4
|
+
#This documentation describes your available CheckAPI REST services: Get your checkpoints and their details, check the permission of a customer's ID, take a look at your checkpoint's history - everything a checkpoint needs can be found here in one place. Please look at the descriptions in each service below. <div id=\"authorize-information-wrap\"><h1>Authorize</h1><p>You can use this automated authentication to try out your activated methods - just click „Authorize“, enter CardAPI credentials and have a try! You received the CardAPI username and password via e-mail – credentials are different from your developer-portal credentials. Authentication is based on OAUTH2 (implicit grant flow) and needs to be implemented and called prior to using any API method. <b>CLIENT_ID</b><br>The client ID is pre-filled automatically according to the chosen application. You can find your available client IDs in the \"Applications\" - Area. <b>GRANT_TYPE</b><br>With grant_type=password you get an access-token and a refresh-token for your request. The received access token can be used for 10 minutes, there are two ways to renew it. Either you can send the same request again or you can use the grant_type=refresh_token. The refresh token needs to be used every 30 minutes and can provide new access tokens for 10 hours without using your credentials.</p></div>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.17.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FeratelCheckApiClient
|
17
|
+
class CheckResult
|
18
|
+
attr_accessor :check_point
|
19
|
+
|
20
|
+
attr_accessor :check_state
|
21
|
+
|
22
|
+
attr_accessor :identification
|
23
|
+
|
24
|
+
attr_accessor :valid_transaction_info
|
25
|
+
|
26
|
+
attr_accessor :valid
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'check_point' => :'checkPoint',
|
32
|
+
:'check_state' => :'checkState',
|
33
|
+
:'identification' => :'identification',
|
34
|
+
:'valid_transaction_info' => :'validTransactionInfo',
|
35
|
+
:'valid' => :'valid'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'check_point' => :'CheckPoint',
|
48
|
+
:'check_state' => :'CheckState',
|
49
|
+
:'identification' => :'Identification',
|
50
|
+
:'valid_transaction_info' => :'ValidTransactionInfo',
|
51
|
+
:'valid' => :'Boolean'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FeratelCheckApiClient::CheckResult` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FeratelCheckApiClient::CheckResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'check_point')
|
77
|
+
self.check_point = attributes[:'check_point']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'check_state')
|
81
|
+
self.check_state = attributes[:'check_state']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'identification')
|
85
|
+
self.identification = attributes[:'identification']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'valid_transaction_info')
|
89
|
+
self.valid_transaction_info = attributes[:'valid_transaction_info']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'valid')
|
93
|
+
self.valid = attributes[:'valid']
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
98
|
+
# @return Array for valid properties with the reasons
|
99
|
+
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
|
+
true
|
110
|
+
end
|
111
|
+
|
112
|
+
# Checks equality by comparing each attribute.
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
check_point == o.check_point &&
|
118
|
+
check_state == o.check_state &&
|
119
|
+
identification == o.identification &&
|
120
|
+
valid_transaction_info == o.valid_transaction_info &&
|
121
|
+
valid == o.valid
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see the `==` method
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def eql?(o)
|
127
|
+
self == o
|
128
|
+
end
|
129
|
+
|
130
|
+
# Calculates hash code according to all attributes.
|
131
|
+
# @return [Integer] Hash code
|
132
|
+
def hash
|
133
|
+
[check_point, check_state, identification, valid_transaction_info, valid].hash
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def self.build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
142
|
+
transformed_hash = {}
|
143
|
+
openapi_types.each_pair do |key, type|
|
144
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
145
|
+
transformed_hash["#{key}"] = nil
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
|
+
# check to ensure the input is an array given that the attribute
|
148
|
+
# is documented as an array but the input is not
|
149
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
150
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
|
+
end
|
152
|
+
elsif !attributes[attribute_map[key]].nil?
|
153
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
154
|
+
end
|
155
|
+
end
|
156
|
+
new(transformed_hash)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def self._deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = FeratelCheckApiClient.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
if value.nil?
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
223
|
+
end
|
224
|
+
|
225
|
+
hash[param] = _to_hash(value)
|
226
|
+
end
|
227
|
+
hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Outputs non-array value in the form of hash
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
232
|
+
# @param [Object] value Any valid value
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
234
|
+
def _to_hash(value)
|
235
|
+
if value.is_a?(Array)
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
237
|
+
elsif value.is_a?(Hash)
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
240
|
+
end
|
241
|
+
elsif value.respond_to? :to_hash
|
242
|
+
value.to_hash
|
243
|
+
else
|
244
|
+
value
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
@@ -0,0 +1,247 @@
|
|
1
|
+
=begin
|
2
|
+
#CheckAPI Standard
|
3
|
+
|
4
|
+
#This documentation describes your available CheckAPI REST services: Get your checkpoints and their details, check the permission of a customer's ID, take a look at your checkpoint's history - everything a checkpoint needs can be found here in one place. Please look at the descriptions in each service below. <div id=\"authorize-information-wrap\"><h1>Authorize</h1><p>You can use this automated authentication to try out your activated methods - just click „Authorize“, enter CardAPI credentials and have a try! You received the CardAPI username and password via e-mail – credentials are different from your developer-portal credentials. Authentication is based on OAUTH2 (implicit grant flow) and needs to be implemented and called prior to using any API method. <b>CLIENT_ID</b><br>The client ID is pre-filled automatically according to the chosen application. You can find your available client IDs in the \"Applications\" - Area. <b>GRANT_TYPE</b><br>With grant_type=password you get an access-token and a refresh-token for your request. The received access token can be used for 10 minutes, there are two ways to renew it. Either you can send the same request again or you can use the grant_type=refresh_token. The refresh token needs to be used every 30 minutes and can provide new access tokens for 10 hours without using your credentials.</p></div>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.17.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FeratelCheckApiClient
|
17
|
+
class CheckState
|
18
|
+
attr_accessor :state
|
19
|
+
|
20
|
+
attr_accessor :translations
|
21
|
+
|
22
|
+
class EnumAttributeValidator
|
23
|
+
attr_reader :datatype
|
24
|
+
attr_reader :allowable_values
|
25
|
+
|
26
|
+
def initialize(datatype, allowable_values)
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
28
|
+
case datatype.to_s
|
29
|
+
when /Integer/i
|
30
|
+
value.to_i
|
31
|
+
when /Float/i
|
32
|
+
value.to_f
|
33
|
+
else
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def valid?(value)
|
40
|
+
!value || allowable_values.include?(value)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'state' => :'state',
|
48
|
+
:'translations' => :'translations'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'state' => :'CheckStateEnum',
|
61
|
+
:'translations' => :'Array<CheckStateTranslation>'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FeratelCheckApiClient::CheckState` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FeratelCheckApiClient::CheckState`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'state')
|
87
|
+
self.state = attributes[:'state']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'translations')
|
91
|
+
if (value = attributes[:'translations']).is_a?(Array)
|
92
|
+
self.translations = value
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
98
|
+
# @return Array for valid properties with the reasons
|
99
|
+
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
|
+
true
|
110
|
+
end
|
111
|
+
|
112
|
+
# Checks equality by comparing each attribute.
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
state == o.state &&
|
118
|
+
translations == o.translations
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Integer] Hash code
|
129
|
+
def hash
|
130
|
+
[state, translations].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def self.build_from_hash(attributes)
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
138
|
+
attributes = attributes.transform_keys(&:to_sym)
|
139
|
+
transformed_hash = {}
|
140
|
+
openapi_types.each_pair do |key, type|
|
141
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
142
|
+
transformed_hash["#{key}"] = nil
|
143
|
+
elsif type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
147
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
148
|
+
end
|
149
|
+
elsif !attributes[attribute_map[key]].nil?
|
150
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
151
|
+
end
|
152
|
+
end
|
153
|
+
new(transformed_hash)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Deserializes the data based on type
|
157
|
+
# @param string type Data type
|
158
|
+
# @param string value Value to be deserialized
|
159
|
+
# @return [Object] Deserialized data
|
160
|
+
def self._deserialize(type, value)
|
161
|
+
case type.to_sym
|
162
|
+
when :Time
|
163
|
+
Time.parse(value)
|
164
|
+
when :Date
|
165
|
+
Date.parse(value)
|
166
|
+
when :String
|
167
|
+
value.to_s
|
168
|
+
when :Integer
|
169
|
+
value.to_i
|
170
|
+
when :Float
|
171
|
+
value.to_f
|
172
|
+
when :Boolean
|
173
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
174
|
+
true
|
175
|
+
else
|
176
|
+
false
|
177
|
+
end
|
178
|
+
when :Object
|
179
|
+
# generic object (usually a Hash), return directly
|
180
|
+
value
|
181
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
182
|
+
inner_type = Regexp.last_match[:inner_type]
|
183
|
+
value.map { |v| _deserialize(inner_type, v) }
|
184
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
185
|
+
k_type = Regexp.last_match[:k_type]
|
186
|
+
v_type = Regexp.last_match[:v_type]
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each do |k, v|
|
189
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
else # model
|
193
|
+
# models (e.g. Pet) or oneOf
|
194
|
+
klass = FeratelCheckApiClient.const_get(type)
|
195
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the string representation of the object
|
200
|
+
# @return [String] String presentation of the object
|
201
|
+
def to_s
|
202
|
+
to_hash.to_s
|
203
|
+
end
|
204
|
+
|
205
|
+
# to_body is an alias to to_hash (backward compatibility)
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_body
|
208
|
+
to_hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the object in the form of hash
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_hash
|
214
|
+
hash = {}
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
216
|
+
value = self.send(attr)
|
217
|
+
if value.nil?
|
218
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
219
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
220
|
+
end
|
221
|
+
|
222
|
+
hash[param] = _to_hash(value)
|
223
|
+
end
|
224
|
+
hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Outputs non-array value in the form of hash
|
228
|
+
# For object, use to_hash. Otherwise, just return the value
|
229
|
+
# @param [Object] value Any valid value
|
230
|
+
# @return [Hash] Returns the value in the form of hash
|
231
|
+
def _to_hash(value)
|
232
|
+
if value.is_a?(Array)
|
233
|
+
value.compact.map { |v| _to_hash(v) }
|
234
|
+
elsif value.is_a?(Hash)
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
237
|
+
end
|
238
|
+
elsif value.respond_to? :to_hash
|
239
|
+
value.to_hash
|
240
|
+
else
|
241
|
+
value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
=begin
|
2
|
+
#CheckAPI Standard
|
3
|
+
|
4
|
+
#This documentation describes your available CheckAPI REST services: Get your checkpoints and their details, check the permission of a customer's ID, take a look at your checkpoint's history - everything a checkpoint needs can be found here in one place. Please look at the descriptions in each service below. <div id=\"authorize-information-wrap\"><h1>Authorize</h1><p>You can use this automated authentication to try out your activated methods - just click „Authorize“, enter CardAPI credentials and have a try! You received the CardAPI username and password via e-mail – credentials are different from your developer-portal credentials. Authentication is based on OAUTH2 (implicit grant flow) and needs to be implemented and called prior to using any API method. <b>CLIENT_ID</b><br>The client ID is pre-filled automatically according to the chosen application. You can find your available client IDs in the \"Applications\" - Area. <b>GRANT_TYPE</b><br>With grant_type=password you get an access-token and a refresh-token for your request. The received access token can be used for 10 minutes, there are two ways to renew it. Either you can send the same request again or you can use the grant_type=refresh_token. The refresh token needs to be used every 30 minutes and can provide new access tokens for 10 hours without using your credentials.</p></div>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.17.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FeratelCheckApiClient
|
17
|
+
class CheckStateEnum
|
18
|
+
UNDEFINED = "UNDEFINED".freeze
|
19
|
+
NO_CHECKPOINT_NOT_FOUND = "NO_CHECKPOINT_NOT_FOUND".freeze
|
20
|
+
NO_CHECKPOINT_NOT_ACTIVE = "NO_CHECKPOINT_NOT_ACTIVE".freeze
|
21
|
+
NO_CHECKPOINT_NOT_FOR_ENTRY_EXIT = "NO_CHECKPOINT_NOT_FOR_ENTRY_EXIT".freeze
|
22
|
+
NO_IDENTIFICATION_NOT_VALID = "NO_IDENTIFICATION_NOT_VALID".freeze
|
23
|
+
NO_IDENTIFICATION_NOT_VALID_SLAVE = "NO_IDENTIFICATION_NOT_VALID_SLAVE".freeze
|
24
|
+
NO_IDENTIFICATION_NOT_VALID_PERS = "NO_IDENTIFICATION_NOT_VALID_PERS".freeze
|
25
|
+
NO_IDENTIFICATION_NOT_VALID_ASSIGN = "NO_IDENTIFICATION_NOT_VALID_ASSIGN".freeze
|
26
|
+
NO_IDENTIFICATION_NOT_VALID_DAYBLOCK = "NO_IDENTIFICATION_NOT_VALID_DAYBLOCK".freeze
|
27
|
+
NO_SERVICE_INCL_OR_BOOK = "NO_SERVICE_INCL_OR_BOOK".freeze
|
28
|
+
NO_SERVICE_INCL_OR_BOOK_SLAVE = "NO_SERVICE_INCL_OR_BOOK_SLAVE".freeze
|
29
|
+
NO_SERVICE_INCL_DOUBLE_USE_TIME_WINDOW = "NO_SERVICE_INCL_DOUBLE_USE_TIME_WINDOW".freeze
|
30
|
+
NO_SERVICE_INCL_DOUBLE_USE_TIME_SERVICE = "NO_SERVICE_INCL_DOUBLE_USE_TIME_SERVICE".freeze
|
31
|
+
NO_SERVICE_INCL_DOUBLE_USE_TIME_CHECKPOINT_GROUP = "NO_SERVICE_INCL_DOUBLE_USE_TIME_CHECKPOINT_GROUP".freeze
|
32
|
+
NO_SERVICE_INCL_DOUBLE_USE_COUNT = "NO_SERVICE_INCL_DOUBLE_USE_COUNT".freeze
|
33
|
+
NO_SERVICE_INCL_DOUBLE_USE_COUNT_SLAVE = "NO_SERVICE_INCL_DOUBLE_USE_COUNT_SLAVE".freeze
|
34
|
+
NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY = "NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY".freeze
|
35
|
+
NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY_SLAVE = "NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY_SLAVE".freeze
|
36
|
+
NO_SERVICE_INCL_EXIT_DOUBLE_USE = "NO_SERVICE_INCL_EXIT_DOUBLE_USE".freeze
|
37
|
+
OK_SERVICE_INCL_COUNT = "OK_SERVICE_INCL_COUNT".freeze
|
38
|
+
OK_SERVICE_INCL_COUNT_FIRST_USE_CORRECTION = "OK_SERVICE_INCL_COUNT_FIRST_USE_CORRECTION".freeze
|
39
|
+
OK_SERVICE_INCL = "OK_SERVICE_INCL".freeze
|
40
|
+
OK_SERVICE_INCL_SLAVE = "OK_SERVICE_INCL_SLAVE".freeze
|
41
|
+
OK_SERVICE_INCL_FIRST_USE_CORRECTION = "OK_SERVICE_INCL_FIRST_USE_CORRECTION".freeze
|
42
|
+
OK_SERVICE_INCL_ALWAYS_OPEN = "OK_SERVICE_INCL_ALWAYS_OPEN".freeze
|
43
|
+
OK_SERVICE_INCL_EXIT = "OK_SERVICE_INCL_EXIT".freeze
|
44
|
+
OK_SERVICE_INCL_MASTER = "OK_SERVICE_INCL_MASTER".freeze
|
45
|
+
OK_SERVICE_INCL_MASTER_EXIT = "OK_SERVICE_INCL_MASTER_EXIT".freeze
|
46
|
+
NO_SERVICE_BOOK_DOUBLE_USE_TIME_WINDOW = "NO_SERVICE_BOOK_DOUBLE_USE_TIME_WINDOW".freeze
|
47
|
+
NO_SERVICE_BOOK_DOUBLE_USE_TIME_SERVICE = "NO_SERVICE_BOOK_DOUBLE_USE_TIME_SERVICE".freeze
|
48
|
+
NO_SERVICE_BOOK_DOUBLE_USE_TIME_CHECKPOINT_GROUP = "NO_SERVICE_BOOK_DOUBLE_USE_TIME_CHECKPOINT_GROUP".freeze
|
49
|
+
NO_SERVICE_BOOK_DOUBLE_USE_COUNT = "NO_SERVICE_BOOK_DOUBLE_USE_COUNT".freeze
|
50
|
+
NO_SERVICE_BOOK_DOUBLE_USE_COUNT_SLAVE = "NO_SERVICE_BOOK_DOUBLE_USE_COUNT_SLAVE".freeze
|
51
|
+
NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY = "NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY".freeze
|
52
|
+
NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY_SLAVE = "NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY_SLAVE".freeze
|
53
|
+
NO_SERVICE_BOOK_EXIT_DOUBLE_USE = "NO_SERVICE_BOOK_EXIT_DOUBLE_USE".freeze
|
54
|
+
OK_SERVICE_BOOK_COUNT = "OK_SERVICE_BOOK_COUNT".freeze
|
55
|
+
OK_SERVICE_BOOK_COUNT_FIRST_USE_CORRECTION = "OK_SERVICE_BOOK_COUNT_FIRST_USE_CORRECTION".freeze
|
56
|
+
OK_SERVICE_BOOK = "OK_SERVICE_BOOK".freeze
|
57
|
+
OK_SERVICE_BOOK_FIRST_USE_CORRECTION = "OK_SERVICE_BOOK_FIRST_USE_CORRECTION".freeze
|
58
|
+
OK_SERVICE_BOOK_ALWAYS_OPEN = "OK_SERVICE_BOOK_ALWAYS_OPEN".freeze
|
59
|
+
OK_SERVICE_BOOK_EXIT = "OK_SERVICE_BOOK_EXIT".freeze
|
60
|
+
OK_SERVICE_BOOK_MASTER = "OK_SERVICE_BOOK_MASTER".freeze
|
61
|
+
OK_SERVICE_BOOK_MASTER_EXIT = "OK_SERVICE_BOOK_MASTER_EXIT".freeze
|
62
|
+
|
63
|
+
def self.all_vars
|
64
|
+
@all_vars ||= [UNDEFINED, NO_CHECKPOINT_NOT_FOUND, NO_CHECKPOINT_NOT_ACTIVE, NO_CHECKPOINT_NOT_FOR_ENTRY_EXIT, NO_IDENTIFICATION_NOT_VALID, NO_IDENTIFICATION_NOT_VALID_SLAVE, NO_IDENTIFICATION_NOT_VALID_PERS, NO_IDENTIFICATION_NOT_VALID_ASSIGN, NO_IDENTIFICATION_NOT_VALID_DAYBLOCK, NO_SERVICE_INCL_OR_BOOK, NO_SERVICE_INCL_OR_BOOK_SLAVE, NO_SERVICE_INCL_DOUBLE_USE_TIME_WINDOW, NO_SERVICE_INCL_DOUBLE_USE_TIME_SERVICE, NO_SERVICE_INCL_DOUBLE_USE_TIME_CHECKPOINT_GROUP, NO_SERVICE_INCL_DOUBLE_USE_COUNT, NO_SERVICE_INCL_DOUBLE_USE_COUNT_SLAVE, NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY, NO_SERVICE_INCL_EXIT_BUT_NO_ENTRY_SLAVE, NO_SERVICE_INCL_EXIT_DOUBLE_USE, OK_SERVICE_INCL_COUNT, OK_SERVICE_INCL_COUNT_FIRST_USE_CORRECTION, OK_SERVICE_INCL, OK_SERVICE_INCL_SLAVE, OK_SERVICE_INCL_FIRST_USE_CORRECTION, OK_SERVICE_INCL_ALWAYS_OPEN, OK_SERVICE_INCL_EXIT, OK_SERVICE_INCL_MASTER, OK_SERVICE_INCL_MASTER_EXIT, NO_SERVICE_BOOK_DOUBLE_USE_TIME_WINDOW, NO_SERVICE_BOOK_DOUBLE_USE_TIME_SERVICE, NO_SERVICE_BOOK_DOUBLE_USE_TIME_CHECKPOINT_GROUP, NO_SERVICE_BOOK_DOUBLE_USE_COUNT, NO_SERVICE_BOOK_DOUBLE_USE_COUNT_SLAVE, NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY, NO_SERVICE_BOOK_EXIT_BUT_NO_ENTRY_SLAVE, NO_SERVICE_BOOK_EXIT_DOUBLE_USE, OK_SERVICE_BOOK_COUNT, OK_SERVICE_BOOK_COUNT_FIRST_USE_CORRECTION, OK_SERVICE_BOOK, OK_SERVICE_BOOK_FIRST_USE_CORRECTION, OK_SERVICE_BOOK_ALWAYS_OPEN, OK_SERVICE_BOOK_EXIT, OK_SERVICE_BOOK_MASTER, OK_SERVICE_BOOK_MASTER_EXIT].freeze
|
65
|
+
end
|
66
|
+
|
67
|
+
# Builds the enum from string
|
68
|
+
# @param [String] The enum value in the form of the string
|
69
|
+
# @return [String] The enum value
|
70
|
+
def self.build_from_hash(value)
|
71
|
+
new.build_from_hash(value)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Builds the enum from string
|
75
|
+
# @param [String] The enum value in the form of the string
|
76
|
+
# @return [String] The enum value
|
77
|
+
def build_from_hash(value)
|
78
|
+
return value if CheckStateEnum.all_vars.include?(value)
|
79
|
+
raise "Invalid ENUM value #{value} for class #CheckStateEnum"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|