biz_api 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +155 -0
  4. data/Rakefile +10 -0
  5. data/biz_api.gemspec +39 -0
  6. data/docs/AppInfo.md +22 -0
  7. data/docs/AuthRequest.md +26 -0
  8. data/docs/BizEvent.md +50 -0
  9. data/docs/BizEventsHelpdeskApi.md +157 -0
  10. data/docs/CartItem.md +28 -0
  11. data/docs/Creditor.md +26 -0
  12. data/docs/CtReceiptModelResponse.md +72 -0
  13. data/docs/Debtor.md +36 -0
  14. data/docs/DebtorPosition.md +24 -0
  15. data/docs/Details.md +22 -0
  16. data/docs/HomeApi.md +81 -0
  17. data/docs/IOTransactionsRESTAPIsApi.md +328 -0
  18. data/docs/Info.md +34 -0
  19. data/docs/InfoNotice.md +38 -0
  20. data/docs/InfoTransaction.md +26 -0
  21. data/docs/InfoTransactionView.md +38 -0
  22. data/docs/MBD.md +26 -0
  23. data/docs/MapEntry.md +20 -0
  24. data/docs/NoticeDetailResponse.md +20 -0
  25. data/docs/NoticeListItem.md +32 -0
  26. data/docs/NoticeListWrapResponse.md +18 -0
  27. data/docs/PageInfo.md +24 -0
  28. data/docs/PaidNoticeRESTAPIsApi.md +322 -0
  29. data/docs/Payer.md +36 -0
  30. data/docs/PaymentAuthorizationRequest.md +28 -0
  31. data/docs/PaymentInfo.md +50 -0
  32. data/docs/PaymentReceiptsRESTAPIsApi.md +161 -0
  33. data/docs/ProblemJson.md +22 -0
  34. data/docs/Psp.md +30 -0
  35. data/docs/Transaction.md +44 -0
  36. data/docs/TransactionDetailResponse.md +20 -0
  37. data/docs/TransactionDetails.md +28 -0
  38. data/docs/TransactionListItem.md +32 -0
  39. data/docs/TransactionListWrapResponse.md +20 -0
  40. data/docs/TransactionPsp.md +22 -0
  41. data/docs/Transfer.md +34 -0
  42. data/docs/TransferPA.md +32 -0
  43. data/docs/User.md +30 -0
  44. data/docs/UserDetail.md +20 -0
  45. data/docs/WalletInfo.md +24 -0
  46. data/docs/WalletItem.md +34 -0
  47. data/git_push.sh +57 -0
  48. data/lib/biz_api/api/biz_events_helpdesk_api.rb +156 -0
  49. data/lib/biz_api/api/home_api.rb +82 -0
  50. data/lib/biz_api/api/io_transactions_restapis_api.rb +334 -0
  51. data/lib/biz_api/api/paid_notice_restapis_api.rb +328 -0
  52. data/lib/biz_api/api/payment_receipts_restapis_api.rb +168 -0
  53. data/lib/biz_api/api_client.rb +394 -0
  54. data/lib/biz_api/api_error.rb +58 -0
  55. data/lib/biz_api/configuration.rb +333 -0
  56. data/lib/biz_api/models/app_info.rb +232 -0
  57. data/lib/biz_api/models/auth_request.rb +250 -0
  58. data/lib/biz_api/models/biz_event.rb +396 -0
  59. data/lib/biz_api/models/cart_item.rb +287 -0
  60. data/lib/biz_api/models/creditor.rb +250 -0
  61. data/lib/biz_api/models/ct_receipt_model_response.rb +552 -0
  62. data/lib/biz_api/models/debtor.rb +295 -0
  63. data/lib/biz_api/models/debtor_position.rb +241 -0
  64. data/lib/biz_api/models/details.rb +232 -0
  65. data/lib/biz_api/models/info.rb +286 -0
  66. data/lib/biz_api/models/info_notice.rb +392 -0
  67. data/lib/biz_api/models/info_transaction.rb +250 -0
  68. data/lib/biz_api/models/info_transaction_view.rb +350 -0
  69. data/lib/biz_api/models/map_entry.rb +223 -0
  70. data/lib/biz_api/models/mbd.rb +250 -0
  71. data/lib/biz_api/models/notice_detail_response.rb +225 -0
  72. data/lib/biz_api/models/notice_list_item.rb +326 -0
  73. data/lib/biz_api/models/notice_list_wrap_response.rb +223 -0
  74. data/lib/biz_api/models/page_info.rb +273 -0
  75. data/lib/biz_api/models/payer.rb +295 -0
  76. data/lib/biz_api/models/payment_authorization_request.rb +259 -0
  77. data/lib/biz_api/models/payment_info.rb +360 -0
  78. data/lib/biz_api/models/problem_json.rb +259 -0
  79. data/lib/biz_api/models/psp.rb +268 -0
  80. data/lib/biz_api/models/transaction.rb +331 -0
  81. data/lib/biz_api/models/transaction_detail_response.rb +225 -0
  82. data/lib/biz_api/models/transaction_details.rb +259 -0
  83. data/lib/biz_api/models/transaction_list_item.rb +277 -0
  84. data/lib/biz_api/models/transaction_list_wrap_response.rb +225 -0
  85. data/lib/biz_api/models/transaction_psp.rb +232 -0
  86. data/lib/biz_api/models/transfer.rb +288 -0
  87. data/lib/biz_api/models/transfer_pa.rb +345 -0
  88. data/lib/biz_api/models/user.rb +302 -0
  89. data/lib/biz_api/models/user_detail.rb +230 -0
  90. data/lib/biz_api/models/wallet_info.rb +241 -0
  91. data/lib/biz_api/models/wallet_item.rb +322 -0
  92. data/lib/biz_api/version.rb +15 -0
  93. data/lib/biz_api.rb +80 -0
  94. data/spec/api/biz_events_helpdesk_api_spec.rb +60 -0
  95. data/spec/api/home_api_spec.rb +47 -0
  96. data/spec/api/io_transactions_restapis_api_spec.rb +96 -0
  97. data/spec/api/paid_notice_restapis_api_spec.rb +93 -0
  98. data/spec/api/payment_receipts_restapis_api_spec.rb +62 -0
  99. data/spec/models/app_info_spec.rb +48 -0
  100. data/spec/models/auth_request_spec.rb +60 -0
  101. data/spec/models/biz_event_spec.rb +136 -0
  102. data/spec/models/cart_item_spec.rb +66 -0
  103. data/spec/models/creditor_spec.rb +60 -0
  104. data/spec/models/ct_receipt_model_response_spec.rb +198 -0
  105. data/spec/models/debtor_position_spec.rb +54 -0
  106. data/spec/models/debtor_spec.rb +90 -0
  107. data/spec/models/details_spec.rb +48 -0
  108. data/spec/models/info_notice_spec.rb +104 -0
  109. data/spec/models/info_spec.rb +84 -0
  110. data/spec/models/info_transaction_spec.rb +60 -0
  111. data/spec/models/info_transaction_view_spec.rb +104 -0
  112. data/spec/models/map_entry_spec.rb +42 -0
  113. data/spec/models/mbd_spec.rb +60 -0
  114. data/spec/models/notice_detail_response_spec.rb +42 -0
  115. data/spec/models/notice_list_item_spec.rb +78 -0
  116. data/spec/models/notice_list_wrap_response_spec.rb +36 -0
  117. data/spec/models/page_info_spec.rb +54 -0
  118. data/spec/models/payer_spec.rb +90 -0
  119. data/spec/models/payment_authorization_request_spec.rb +66 -0
  120. data/spec/models/payment_info_spec.rb +132 -0
  121. data/spec/models/problem_json_spec.rb +48 -0
  122. data/spec/models/psp_spec.rb +72 -0
  123. data/spec/models/transaction_detail_response_spec.rb +42 -0
  124. data/spec/models/transaction_details_spec.rb +66 -0
  125. data/spec/models/transaction_list_item_spec.rb +78 -0
  126. data/spec/models/transaction_list_wrap_response_spec.rb +42 -0
  127. data/spec/models/transaction_psp_spec.rb +48 -0
  128. data/spec/models/transaction_spec.rb +114 -0
  129. data/spec/models/transfer_pa_spec.rb +78 -0
  130. data/spec/models/transfer_spec.rb +84 -0
  131. data/spec/models/user_detail_spec.rb +42 -0
  132. data/spec/models/user_spec.rb +76 -0
  133. data/spec/models/wallet_info_spec.rb +54 -0
  134. data/spec/models/wallet_item_spec.rb +88 -0
  135. data/spec/spec_helper.rb +111 -0
  136. metadata +259 -0
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #Biz-Events Service
3
+
4
+ #Microservice for exposing REST APIs about payment receipts.
5
+
6
+ The version of the OpenAPI document: 0.1.72
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BizReceipts
17
+ class AuthRequest
18
+ attr_accessor :auth_outcome
19
+
20
+ attr_accessor :guid
21
+
22
+ attr_accessor :correlation_id
23
+
24
+ attr_accessor :error
25
+
26
+ attr_accessor :auth_code
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'auth_outcome' => :'authOutcome',
32
+ :'guid' => :'guid',
33
+ :'correlation_id' => :'correlationId',
34
+ :'error' => :'error',
35
+ :'auth_code' => :'auth_code'
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
+ :'auth_outcome' => :'String',
48
+ :'guid' => :'String',
49
+ :'correlation_id' => :'String',
50
+ :'error' => :'String',
51
+ :'auth_code' => :'String'
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 `BizReceipts::AuthRequest` 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 `BizReceipts::AuthRequest`. 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?(:'auth_outcome')
77
+ self.auth_outcome = attributes[:'auth_outcome']
78
+ end
79
+
80
+ if attributes.key?(:'guid')
81
+ self.guid = attributes[:'guid']
82
+ end
83
+
84
+ if attributes.key?(:'correlation_id')
85
+ self.correlation_id = attributes[:'correlation_id']
86
+ end
87
+
88
+ if attributes.key?(:'error')
89
+ self.error = attributes[:'error']
90
+ end
91
+
92
+ if attributes.key?(:'auth_code')
93
+ self.auth_code = attributes[:'auth_code']
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
+ auth_outcome == o.auth_outcome &&
118
+ guid == o.guid &&
119
+ correlation_id == o.correlation_id &&
120
+ error == o.error &&
121
+ auth_code == o.auth_code
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
+ [auth_outcome, guid, correlation_id, error, auth_code].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 = BizReceipts.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,396 @@
1
+ =begin
2
+ #Biz-Events Service
3
+
4
+ #Microservice for exposing REST APIs about payment receipts.
5
+
6
+ The version of the OpenAPI document: 0.1.72
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BizReceipts
17
+ class BizEvent
18
+ attr_accessor :id
19
+
20
+ attr_accessor :version
21
+
22
+ attr_accessor :id_payment_manager
23
+
24
+ attr_accessor :complete
25
+
26
+ attr_accessor :receipt_id
27
+
28
+ attr_accessor :missing_info
29
+
30
+ attr_accessor :debtor_position
31
+
32
+ attr_accessor :creditor
33
+
34
+ attr_accessor :psp
35
+
36
+ attr_accessor :debtor
37
+
38
+ attr_accessor :payer
39
+
40
+ attr_accessor :payment_info
41
+
42
+ attr_accessor :transfer_list
43
+
44
+ attr_accessor :transaction_details
45
+
46
+ attr_accessor :event_status
47
+
48
+ attr_accessor :event_retry_enrichment_count
49
+
50
+ attr_accessor :_ts
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'id' => :'id',
78
+ :'version' => :'version',
79
+ :'id_payment_manager' => :'idPaymentManager',
80
+ :'complete' => :'complete',
81
+ :'receipt_id' => :'receiptId',
82
+ :'missing_info' => :'missingInfo',
83
+ :'debtor_position' => :'debtorPosition',
84
+ :'creditor' => :'creditor',
85
+ :'psp' => :'psp',
86
+ :'debtor' => :'debtor',
87
+ :'payer' => :'payer',
88
+ :'payment_info' => :'paymentInfo',
89
+ :'transfer_list' => :'transferList',
90
+ :'transaction_details' => :'transactionDetails',
91
+ :'event_status' => :'eventStatus',
92
+ :'event_retry_enrichment_count' => :'eventRetryEnrichmentCount',
93
+ :'_ts' => :'_ts'
94
+ }
95
+ end
96
+
97
+ # Returns all the JSON keys this model knows about
98
+ def self.acceptable_attributes
99
+ attribute_map.values
100
+ end
101
+
102
+ # Attribute type mapping.
103
+ def self.openapi_types
104
+ {
105
+ :'id' => :'String',
106
+ :'version' => :'String',
107
+ :'id_payment_manager' => :'String',
108
+ :'complete' => :'String',
109
+ :'receipt_id' => :'String',
110
+ :'missing_info' => :'Array<String>',
111
+ :'debtor_position' => :'DebtorPosition',
112
+ :'creditor' => :'Creditor',
113
+ :'psp' => :'Psp',
114
+ :'debtor' => :'Debtor',
115
+ :'payer' => :'Payer',
116
+ :'payment_info' => :'PaymentInfo',
117
+ :'transfer_list' => :'Array<Transfer>',
118
+ :'transaction_details' => :'TransactionDetails',
119
+ :'event_status' => :'String',
120
+ :'event_retry_enrichment_count' => :'Integer',
121
+ :'_ts' => :'Time'
122
+ }
123
+ end
124
+
125
+ # List of attributes with nullable: true
126
+ def self.openapi_nullable
127
+ Set.new([
128
+ ])
129
+ end
130
+
131
+ # Initializes the object
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ def initialize(attributes = {})
134
+ if (!attributes.is_a?(Hash))
135
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BizReceipts::BizEvent` initialize method"
136
+ end
137
+
138
+ # check to see if the attribute exists and convert string to symbol for hash key
139
+ attributes = attributes.each_with_object({}) { |(k, v), h|
140
+ if (!self.class.attribute_map.key?(k.to_sym))
141
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BizReceipts::BizEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
142
+ end
143
+ h[k.to_sym] = v
144
+ }
145
+
146
+ if attributes.key?(:'id')
147
+ self.id = attributes[:'id']
148
+ end
149
+
150
+ if attributes.key?(:'version')
151
+ self.version = attributes[:'version']
152
+ end
153
+
154
+ if attributes.key?(:'id_payment_manager')
155
+ self.id_payment_manager = attributes[:'id_payment_manager']
156
+ end
157
+
158
+ if attributes.key?(:'complete')
159
+ self.complete = attributes[:'complete']
160
+ end
161
+
162
+ if attributes.key?(:'receipt_id')
163
+ self.receipt_id = attributes[:'receipt_id']
164
+ end
165
+
166
+ if attributes.key?(:'missing_info')
167
+ if (value = attributes[:'missing_info']).is_a?(Array)
168
+ self.missing_info = value
169
+ end
170
+ end
171
+
172
+ if attributes.key?(:'debtor_position')
173
+ self.debtor_position = attributes[:'debtor_position']
174
+ end
175
+
176
+ if attributes.key?(:'creditor')
177
+ self.creditor = attributes[:'creditor']
178
+ end
179
+
180
+ if attributes.key?(:'psp')
181
+ self.psp = attributes[:'psp']
182
+ end
183
+
184
+ if attributes.key?(:'debtor')
185
+ self.debtor = attributes[:'debtor']
186
+ end
187
+
188
+ if attributes.key?(:'payer')
189
+ self.payer = attributes[:'payer']
190
+ end
191
+
192
+ if attributes.key?(:'payment_info')
193
+ self.payment_info = attributes[:'payment_info']
194
+ end
195
+
196
+ if attributes.key?(:'transfer_list')
197
+ if (value = attributes[:'transfer_list']).is_a?(Array)
198
+ self.transfer_list = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'transaction_details')
203
+ self.transaction_details = attributes[:'transaction_details']
204
+ end
205
+
206
+ if attributes.key?(:'event_status')
207
+ self.event_status = attributes[:'event_status']
208
+ end
209
+
210
+ if attributes.key?(:'event_retry_enrichment_count')
211
+ self.event_retry_enrichment_count = attributes[:'event_retry_enrichment_count']
212
+ end
213
+
214
+ if attributes.key?(:'_ts')
215
+ self._ts = attributes[:'_ts']
216
+ end
217
+ end
218
+
219
+ # Show invalid properties with the reasons. Usually used together with valid?
220
+ # @return Array for valid properties with the reasons
221
+ def list_invalid_properties
222
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
223
+ invalid_properties = Array.new
224
+ invalid_properties
225
+ end
226
+
227
+ # Check to see if the all the properties in the model are valid
228
+ # @return true if the model is valid
229
+ def valid?
230
+ warn '[DEPRECATED] the `valid?` method is obsolete'
231
+ event_status_validator = EnumAttributeValidator.new('String', ["NA", "RETRY", "FAILED", "DONE", "INGESTED"])
232
+ return false unless event_status_validator.valid?(@event_status)
233
+ true
234
+ end
235
+
236
+ # Custom attribute writer method checking allowed values (enum).
237
+ # @param [Object] event_status Object to be assigned
238
+ def event_status=(event_status)
239
+ validator = EnumAttributeValidator.new('String', ["NA", "RETRY", "FAILED", "DONE", "INGESTED"])
240
+ unless validator.valid?(event_status)
241
+ fail ArgumentError, "invalid value for \"event_status\", must be one of #{validator.allowable_values}."
242
+ end
243
+ @event_status = event_status
244
+ end
245
+
246
+ # Checks equality by comparing each attribute.
247
+ # @param [Object] Object to be compared
248
+ def ==(o)
249
+ return true if self.equal?(o)
250
+ self.class == o.class &&
251
+ id == o.id &&
252
+ version == o.version &&
253
+ id_payment_manager == o.id_payment_manager &&
254
+ complete == o.complete &&
255
+ receipt_id == o.receipt_id &&
256
+ missing_info == o.missing_info &&
257
+ debtor_position == o.debtor_position &&
258
+ creditor == o.creditor &&
259
+ psp == o.psp &&
260
+ debtor == o.debtor &&
261
+ payer == o.payer &&
262
+ payment_info == o.payment_info &&
263
+ transfer_list == o.transfer_list &&
264
+ transaction_details == o.transaction_details &&
265
+ event_status == o.event_status &&
266
+ event_retry_enrichment_count == o.event_retry_enrichment_count &&
267
+ _ts == o._ts
268
+ end
269
+
270
+ # @see the `==` method
271
+ # @param [Object] Object to be compared
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculates hash code according to all attributes.
277
+ # @return [Integer] Hash code
278
+ def hash
279
+ [id, version, id_payment_manager, complete, receipt_id, missing_info, debtor_position, creditor, psp, debtor, payer, payment_info, transfer_list, transaction_details, event_status, event_retry_enrichment_count, _ts].hash
280
+ end
281
+
282
+ # Builds the object from hash
283
+ # @param [Hash] attributes Model attributes in the form of hash
284
+ # @return [Object] Returns the model itself
285
+ def self.build_from_hash(attributes)
286
+ return nil unless attributes.is_a?(Hash)
287
+ attributes = attributes.transform_keys(&:to_sym)
288
+ transformed_hash = {}
289
+ openapi_types.each_pair do |key, type|
290
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
291
+ transformed_hash["#{key}"] = nil
292
+ elsif type =~ /\AArray<(.*)>/i
293
+ # check to ensure the input is an array given that the attribute
294
+ # is documented as an array but the input is not
295
+ if attributes[attribute_map[key]].is_a?(Array)
296
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
297
+ end
298
+ elsif !attributes[attribute_map[key]].nil?
299
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
300
+ end
301
+ end
302
+ new(transformed_hash)
303
+ end
304
+
305
+ # Deserializes the data based on type
306
+ # @param string type Data type
307
+ # @param string value Value to be deserialized
308
+ # @return [Object] Deserialized data
309
+ def self._deserialize(type, value)
310
+ case type.to_sym
311
+ when :Time
312
+ Time.parse(value)
313
+ when :Date
314
+ Date.parse(value)
315
+ when :String
316
+ value.to_s
317
+ when :Integer
318
+ value.to_i
319
+ when :Float
320
+ value.to_f
321
+ when :Boolean
322
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
323
+ true
324
+ else
325
+ false
326
+ end
327
+ when :Object
328
+ # generic object (usually a Hash), return directly
329
+ value
330
+ when /\AArray<(?<inner_type>.+)>\z/
331
+ inner_type = Regexp.last_match[:inner_type]
332
+ value.map { |v| _deserialize(inner_type, v) }
333
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
334
+ k_type = Regexp.last_match[:k_type]
335
+ v_type = Regexp.last_match[:v_type]
336
+ {}.tap do |hash|
337
+ value.each do |k, v|
338
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
339
+ end
340
+ end
341
+ else # model
342
+ # models (e.g. Pet) or oneOf
343
+ klass = BizReceipts.const_get(type)
344
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
345
+ end
346
+ end
347
+
348
+ # Returns the string representation of the object
349
+ # @return [String] String presentation of the object
350
+ def to_s
351
+ to_hash.to_s
352
+ end
353
+
354
+ # to_body is an alias to to_hash (backward compatibility)
355
+ # @return [Hash] Returns the object in the form of hash
356
+ def to_body
357
+ to_hash
358
+ end
359
+
360
+ # Returns the object in the form of hash
361
+ # @return [Hash] Returns the object in the form of hash
362
+ def to_hash
363
+ hash = {}
364
+ self.class.attribute_map.each_pair do |attr, param|
365
+ value = self.send(attr)
366
+ if value.nil?
367
+ is_nullable = self.class.openapi_nullable.include?(attr)
368
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
369
+ end
370
+
371
+ hash[param] = _to_hash(value)
372
+ end
373
+ hash
374
+ end
375
+
376
+ # Outputs non-array value in the form of hash
377
+ # For object, use to_hash. Otherwise, just return the value
378
+ # @param [Object] value Any valid value
379
+ # @return [Hash] Returns the value in the form of hash
380
+ def _to_hash(value)
381
+ if value.is_a?(Array)
382
+ value.compact.map { |v| _to_hash(v) }
383
+ elsif value.is_a?(Hash)
384
+ {}.tap do |hash|
385
+ value.each { |k, v| hash[k] = _to_hash(v) }
386
+ end
387
+ elsif value.respond_to? :to_hash
388
+ value.to_hash
389
+ else
390
+ value
391
+ end
392
+ end
393
+
394
+ end
395
+
396
+ end