postfinancecheckout-ruby-sdk 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/postfinancecheckout-ruby-sdk/api/analytics_query_service_api.rb +381 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_query.rb +272 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_query_execution.rb +293 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_query_execution_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_query_result_batch.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_schema_column.rb +263 -0
- data/lib/postfinancecheckout-ruby-sdk/models/analytics_schema_table.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_document.rb +17 -5
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt.rb +17 -5
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_transaction_summary.rb +17 -5
- data/lib/postfinancecheckout-ruby-sdk/version.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk.rb +7 -0
- data/vendor/bundle/ruby/2.4.0/cache/addressable-2.8.1.gem +0 -0
- data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.15.5/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-2.6.2/mkmf.log +1 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/CHANGELOG.md +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/Gemfile +4 -2
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/LICENSE.txt +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/README.md +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/Rakefile +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/data/unicode.data +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/idna/native.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/idna/pure.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/idna.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/template.rb +3 -4
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/uri.rb +57 -53
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable/version.rb +1 -2
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/lib/addressable.rb +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/addressable/idna_spec.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/addressable/net_http_compat_spec.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/addressable/security_spec.rb +0 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/addressable/template_spec.rb +9 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/addressable/uri_spec.rb +81 -1
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/spec/spec_helper.rb +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/clobber.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/gem.rake +5 -2
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/git.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/metrics.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/profile.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/rspec.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/{addressable-2.8.0 → addressable-2.8.1}/tasks/yard.rake +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +3 -3
- data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/Makefile +2 -2
- data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/generator/Makefile +2 -2
- data/vendor/bundle/ruby/2.4.0/gems/json-2.6.2/ext/json/ext/parser/Makefile +2 -2
- data/vendor/bundle/ruby/2.4.0/specifications/{addressable-2.8.0.gemspec → addressable-2.8.1.gemspec} +8 -7
- metadata +37 -31
- data/vendor/bundle/ruby/2.4.0/cache/addressable-2.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.8.0/addressable.gemspec +0 -37
@@ -0,0 +1,263 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
# Meta information about a column within a table.
|
22
|
+
class AnalyticsSchemaColumn
|
23
|
+
# The name of the alias defined for the column in the query or null if none is defined.
|
24
|
+
attr_accessor :alias_name
|
25
|
+
|
26
|
+
# The name of the column in the table or null if this is a synthetic column which is the result of some SQL expression.
|
27
|
+
attr_accessor :column_name
|
28
|
+
|
29
|
+
# A human readable description of the property contained in this column or null if this is a synthetic column which is the result of some SQL expression.
|
30
|
+
attr_accessor :description
|
31
|
+
|
32
|
+
# The precision (maximal number of digits) for decimal data types, otherwise 0.
|
33
|
+
attr_accessor :precision
|
34
|
+
|
35
|
+
# The name of the referenced table if this column represents a foreign-key relation to the IDs of another table, otherwise null.
|
36
|
+
attr_accessor :referenced_table
|
37
|
+
|
38
|
+
# The scale (maximal number number of digits in the fractional part) in case of a decimal data type, otherwise 0.
|
39
|
+
attr_accessor :scale
|
40
|
+
|
41
|
+
# The name of the table which defines this column.
|
42
|
+
attr_accessor :table_name
|
43
|
+
|
44
|
+
# The ORC data type of the column value.
|
45
|
+
attr_accessor :type
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'alias_name' => :'aliasName',
|
51
|
+
:'column_name' => :'columnName',
|
52
|
+
:'description' => :'description',
|
53
|
+
:'precision' => :'precision',
|
54
|
+
:'referenced_table' => :'referencedTable',
|
55
|
+
:'scale' => :'scale',
|
56
|
+
:'table_name' => :'tableName',
|
57
|
+
:'type' => :'type'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.swagger_types
|
63
|
+
{
|
64
|
+
:'alias_name' => :'String',
|
65
|
+
:'column_name' => :'String',
|
66
|
+
:'description' => :'Hash<String, String>',
|
67
|
+
:'precision' => :'Integer',
|
68
|
+
:'referenced_table' => :'String',
|
69
|
+
:'scale' => :'Integer',
|
70
|
+
:'table_name' => :'String',
|
71
|
+
:'type' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
if attributes.has_key?(:'aliasName')
|
84
|
+
self.alias_name = attributes[:'aliasName']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'columnName')
|
88
|
+
self.column_name = attributes[:'columnName']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'description')
|
92
|
+
if (value = attributes[:'description']).is_a?(Hash)
|
93
|
+
self.description = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'precision')
|
98
|
+
self.precision = attributes[:'precision']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'referencedTable')
|
102
|
+
self.referenced_table = attributes[:'referencedTable']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'scale')
|
106
|
+
self.scale = attributes[:'scale']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'tableName')
|
110
|
+
self.table_name = attributes[:'tableName']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'type')
|
114
|
+
self.type = attributes[:'type']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
119
|
+
# @return Array for valid properties with the reasons
|
120
|
+
def list_invalid_properties
|
121
|
+
invalid_properties = Array.new
|
122
|
+
invalid_properties
|
123
|
+
end
|
124
|
+
|
125
|
+
# Check to see if the all the properties in the model are valid
|
126
|
+
# @return true if the model is valid
|
127
|
+
def valid?
|
128
|
+
true
|
129
|
+
end
|
130
|
+
|
131
|
+
# Checks equality by comparing each attribute.
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def ==(o)
|
134
|
+
return true if self.equal?(o)
|
135
|
+
self.class == o.class &&
|
136
|
+
alias_name == o.alias_name &&
|
137
|
+
column_name == o.column_name &&
|
138
|
+
description == o.description &&
|
139
|
+
precision == o.precision &&
|
140
|
+
referenced_table == o.referenced_table &&
|
141
|
+
scale == o.scale &&
|
142
|
+
table_name == o.table_name &&
|
143
|
+
type == o.type
|
144
|
+
end
|
145
|
+
|
146
|
+
# @see the `==` method
|
147
|
+
# @param [Object] Object to be compared
|
148
|
+
def eql?(o)
|
149
|
+
self == o
|
150
|
+
end
|
151
|
+
|
152
|
+
# Calculates hash code according to all attributes.
|
153
|
+
# @return [Fixnum] Hash code
|
154
|
+
def hash
|
155
|
+
[alias_name, column_name, description, precision, referenced_table, scale, table_name, type].hash
|
156
|
+
end
|
157
|
+
|
158
|
+
# Builds the object from hash
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
# @return [Object] Returns the model itself
|
161
|
+
def build_from_hash(attributes)
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
163
|
+
self.class.swagger_types.each_pair do |key, type|
|
164
|
+
if type =~ /\AArray<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
169
|
+
end
|
170
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
171
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
172
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
+
end
|
174
|
+
|
175
|
+
self
|
176
|
+
end
|
177
|
+
|
178
|
+
# Deserializes the data based on type
|
179
|
+
# @param string type Data type
|
180
|
+
# @param string value Value to be deserialized
|
181
|
+
# @return [Object] Deserialized data
|
182
|
+
def _deserialize(type, value)
|
183
|
+
case type.to_sym
|
184
|
+
when :DateTime
|
185
|
+
DateTime.parse(value)
|
186
|
+
when :Date
|
187
|
+
Date.parse(value)
|
188
|
+
when :String
|
189
|
+
value.to_s
|
190
|
+
when :Integer
|
191
|
+
value.to_i
|
192
|
+
when :Float
|
193
|
+
value.to_f
|
194
|
+
when :BOOLEAN
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
196
|
+
true
|
197
|
+
else
|
198
|
+
false
|
199
|
+
end
|
200
|
+
when :Object
|
201
|
+
# generic object (usually a Hash), return directly
|
202
|
+
value
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each do |k, v|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
else # model
|
215
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
216
|
+
temp_model.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
|
+
next if value.nil?
|
239
|
+
hash[param] = _to_hash(value)
|
240
|
+
end
|
241
|
+
hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Outputs non-array value in the form of hash
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
246
|
+
# @param [Object] value Any valid value
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
248
|
+
def _to_hash(value)
|
249
|
+
if value.is_a?(Array)
|
250
|
+
value.compact.map{ |v| _to_hash(v) }
|
251
|
+
elsif value.is_a?(Hash)
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
254
|
+
end
|
255
|
+
elsif value.respond_to? :to_hash
|
256
|
+
value.to_hash
|
257
|
+
else
|
258
|
+
value
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|
263
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
# The schema of a single table in Analytics.
|
22
|
+
class AnalyticsSchemaTable
|
23
|
+
# The schemas of all columns of this table.
|
24
|
+
attr_accessor :columns
|
25
|
+
|
26
|
+
# A human readable description of the entity type contained in this table.
|
27
|
+
attr_accessor :description
|
28
|
+
|
29
|
+
# The name of this table.
|
30
|
+
attr_accessor :table_name
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'columns' => :'columns',
|
36
|
+
:'description' => :'description',
|
37
|
+
:'table_name' => :'tableName'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.swagger_types
|
43
|
+
{
|
44
|
+
:'columns' => :'Array<AnalyticsSchemaColumn>',
|
45
|
+
:'description' => :'Hash<String, String>',
|
46
|
+
:'table_name' => :'String'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'columns')
|
59
|
+
if (value = attributes[:'columns']).is_a?(Array)
|
60
|
+
self.columns = value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'description')
|
65
|
+
if (value = attributes[:'description']).is_a?(Hash)
|
66
|
+
self.description = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'tableName')
|
71
|
+
self.table_name = attributes[:'tableName']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
columns == o.columns &&
|
94
|
+
description == o.description &&
|
95
|
+
table_name == o.table_name
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculates hash code according to all attributes.
|
105
|
+
# @return [Fixnum] Hash code
|
106
|
+
def hash
|
107
|
+
[columns, description, table_name].hash
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.swagger_types.each_pair do |key, type|
|
116
|
+
if type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :DateTime
|
137
|
+
DateTime.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :BOOLEAN
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
168
|
+
temp_model.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map{ |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
215
|
+
end
|
@@ -20,7 +20,6 @@ require 'date'
|
|
20
20
|
module PostFinanceCheckout
|
21
21
|
#
|
22
22
|
class RenderedDocument
|
23
|
-
#
|
24
23
|
attr_accessor :data
|
25
24
|
|
26
25
|
#
|
@@ -45,7 +44,7 @@ module PostFinanceCheckout
|
|
45
44
|
# Attribute type mapping.
|
46
45
|
def self.swagger_types
|
47
46
|
{
|
48
|
-
:'data' => :'
|
47
|
+
:'data' => :'String',
|
49
48
|
:'document_template_type' => :'Integer',
|
50
49
|
:'mime_type' => :'String',
|
51
50
|
:'title' => :'String'
|
@@ -61,9 +60,7 @@ module PostFinanceCheckout
|
|
61
60
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
61
|
|
63
62
|
if attributes.has_key?(:'data')
|
64
|
-
|
65
|
-
self.data = value
|
66
|
-
end
|
63
|
+
self.data = attributes[:'data']
|
67
64
|
end
|
68
65
|
|
69
66
|
if attributes.has_key?(:'documentTemplateType')
|
@@ -83,15 +80,30 @@ module PostFinanceCheckout
|
|
83
80
|
# @return Array for valid properties with the reasons
|
84
81
|
def list_invalid_properties
|
85
82
|
invalid_properties = Array.new
|
83
|
+
if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
84
|
+
invalid_properties.push('invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
|
85
|
+
end
|
86
|
+
|
86
87
|
invalid_properties
|
87
88
|
end
|
88
89
|
|
89
90
|
# Check to see if the all the properties in the model are valid
|
90
91
|
# @return true if the model is valid
|
91
92
|
def valid?
|
93
|
+
return false if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
92
94
|
true
|
93
95
|
end
|
94
96
|
|
97
|
+
# Custom attribute writer method with validation
|
98
|
+
# @param [Object] data Value to be assigned
|
99
|
+
def data=(data)
|
100
|
+
if !data.nil? && data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
101
|
+
fail ArgumentError, 'invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
|
102
|
+
end
|
103
|
+
|
104
|
+
@data = data
|
105
|
+
end
|
106
|
+
|
95
107
|
# Checks equality by comparing each attribute.
|
96
108
|
# @param [Object] Object to be compared
|
97
109
|
def ==(o)
|
@@ -20,7 +20,6 @@ require 'date'
|
|
20
20
|
module PostFinanceCheckout
|
21
21
|
#
|
22
22
|
class RenderedTerminalReceipt
|
23
|
-
# The data property contains the binary data of the receipt document encoded as base 64 encoded string.
|
24
23
|
attr_accessor :data
|
25
24
|
|
26
25
|
# The mime type indicates the format of the receipt document. The mime type depends on the requested receipt format.
|
@@ -45,7 +44,7 @@ module PostFinanceCheckout
|
|
45
44
|
# Attribute type mapping.
|
46
45
|
def self.swagger_types
|
47
46
|
{
|
48
|
-
:'data' => :'
|
47
|
+
:'data' => :'String',
|
49
48
|
:'mime_type' => :'String',
|
50
49
|
:'printed' => :'BOOLEAN',
|
51
50
|
:'receipt_type' => :'PaymentTerminalReceiptType'
|
@@ -61,9 +60,7 @@ module PostFinanceCheckout
|
|
61
60
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
61
|
|
63
62
|
if attributes.has_key?(:'data')
|
64
|
-
|
65
|
-
self.data = value
|
66
|
-
end
|
63
|
+
self.data = attributes[:'data']
|
67
64
|
end
|
68
65
|
|
69
66
|
if attributes.has_key?(:'mimeType')
|
@@ -83,15 +80,30 @@ module PostFinanceCheckout
|
|
83
80
|
# @return Array for valid properties with the reasons
|
84
81
|
def list_invalid_properties
|
85
82
|
invalid_properties = Array.new
|
83
|
+
if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
84
|
+
invalid_properties.push('invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
|
85
|
+
end
|
86
|
+
|
86
87
|
invalid_properties
|
87
88
|
end
|
88
89
|
|
89
90
|
# Check to see if the all the properties in the model are valid
|
90
91
|
# @return true if the model is valid
|
91
92
|
def valid?
|
93
|
+
return false if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
92
94
|
true
|
93
95
|
end
|
94
96
|
|
97
|
+
# Custom attribute writer method with validation
|
98
|
+
# @param [Object] data Value to be assigned
|
99
|
+
def data=(data)
|
100
|
+
if !data.nil? && data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
101
|
+
fail ArgumentError, 'invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
|
102
|
+
end
|
103
|
+
|
104
|
+
@data = data
|
105
|
+
end
|
106
|
+
|
95
107
|
# Checks equality by comparing each attribute.
|
96
108
|
# @param [Object] Object to be compared
|
97
109
|
def ==(o)
|
@@ -20,7 +20,6 @@ require 'date'
|
|
20
20
|
module PostFinanceCheckout
|
21
21
|
#
|
22
22
|
class RenderedTerminalTransactionSummary
|
23
|
-
# The data property contains the binary data of the receipt document encoded as base 64 encoded string.
|
24
23
|
attr_accessor :data
|
25
24
|
|
26
25
|
# The mime type indicates the format of the receipt document. The mime type depends on the requested receipt format.
|
@@ -37,7 +36,7 @@ module PostFinanceCheckout
|
|
37
36
|
# Attribute type mapping.
|
38
37
|
def self.swagger_types
|
39
38
|
{
|
40
|
-
:'data' => :'
|
39
|
+
:'data' => :'String',
|
41
40
|
:'mime_type' => :'String'
|
42
41
|
}
|
43
42
|
end
|
@@ -51,9 +50,7 @@ module PostFinanceCheckout
|
|
51
50
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
51
|
|
53
52
|
if attributes.has_key?(:'data')
|
54
|
-
|
55
|
-
self.data = value
|
56
|
-
end
|
53
|
+
self.data = attributes[:'data']
|
57
54
|
end
|
58
55
|
|
59
56
|
if attributes.has_key?(:'mimeType')
|
@@ -65,15 +62,30 @@ module PostFinanceCheckout
|
|
65
62
|
# @return Array for valid properties with the reasons
|
66
63
|
def list_invalid_properties
|
67
64
|
invalid_properties = Array.new
|
65
|
+
if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
66
|
+
invalid_properties.push('invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
|
67
|
+
end
|
68
|
+
|
68
69
|
invalid_properties
|
69
70
|
end
|
70
71
|
|
71
72
|
# Check to see if the all the properties in the model are valid
|
72
73
|
# @return true if the model is valid
|
73
74
|
def valid?
|
75
|
+
return false if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
74
76
|
true
|
75
77
|
end
|
76
78
|
|
79
|
+
# Custom attribute writer method with validation
|
80
|
+
# @param [Object] data Value to be assigned
|
81
|
+
def data=(data)
|
82
|
+
if !data.nil? && data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
83
|
+
fail ArgumentError, 'invalid value for "data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
|
84
|
+
end
|
85
|
+
|
86
|
+
@data = data
|
87
|
+
end
|
88
|
+
|
77
89
|
# Checks equality by comparing each attribute.
|
78
90
|
# @param [Object] Object to be compared
|
79
91
|
def ==(o)
|
@@ -43,6 +43,12 @@ require 'postfinancecheckout-ruby-sdk/models/account_state'
|
|
43
43
|
require 'postfinancecheckout-ruby-sdk/models/account_type'
|
44
44
|
require 'postfinancecheckout-ruby-sdk/models/address'
|
45
45
|
require 'postfinancecheckout-ruby-sdk/models/address_create'
|
46
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_query'
|
47
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_query_execution'
|
48
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_query_execution_state'
|
49
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_query_result_batch'
|
50
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_schema_column'
|
51
|
+
require 'postfinancecheckout-ruby-sdk/models/analytics_schema_table'
|
46
52
|
require 'postfinancecheckout-ruby-sdk/models/bank_account'
|
47
53
|
require 'postfinancecheckout-ruby-sdk/models/bank_account_environment'
|
48
54
|
require 'postfinancecheckout-ruby-sdk/models/bank_account_state'
|
@@ -320,6 +326,7 @@ require 'postfinancecheckout-ruby-sdk/models/application_user_create_with_mac_ke
|
|
320
326
|
|
321
327
|
# APIs
|
322
328
|
require 'postfinancecheckout-ruby-sdk/api/account_service_api'
|
329
|
+
require 'postfinancecheckout-ruby-sdk/api/analytics_query_service_api'
|
323
330
|
require 'postfinancecheckout-ruby-sdk/api/application_user_service_api'
|
324
331
|
require 'postfinancecheckout-ruby-sdk/api/bank_account_service_api'
|
325
332
|
require 'postfinancecheckout-ruby-sdk/api/bank_transaction_service_api'
|
Binary file
|