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,259 @@
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 PaymentAuthorizationRequest
18
+ attr_accessor :auth_outcome
19
+
20
+ attr_accessor :request_id
21
+
22
+ attr_accessor :correlation_id
23
+
24
+ attr_accessor :auth_code
25
+
26
+ attr_accessor :payment_method_type
27
+
28
+ attr_accessor :details
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'auth_outcome' => :'authOutcome',
34
+ :'request_id' => :'requestId',
35
+ :'correlation_id' => :'correlationId',
36
+ :'auth_code' => :'authCode',
37
+ :'payment_method_type' => :'paymentMethodType',
38
+ :'details' => :'details'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'auth_outcome' => :'String',
51
+ :'request_id' => :'String',
52
+ :'correlation_id' => :'String',
53
+ :'auth_code' => :'String',
54
+ :'payment_method_type' => :'String',
55
+ :'details' => :'Details'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BizReceipts::PaymentAuthorizationRequest` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BizReceipts::PaymentAuthorizationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'auth_outcome')
81
+ self.auth_outcome = attributes[:'auth_outcome']
82
+ end
83
+
84
+ if attributes.key?(:'request_id')
85
+ self.request_id = attributes[:'request_id']
86
+ end
87
+
88
+ if attributes.key?(:'correlation_id')
89
+ self.correlation_id = attributes[:'correlation_id']
90
+ end
91
+
92
+ if attributes.key?(:'auth_code')
93
+ self.auth_code = attributes[:'auth_code']
94
+ end
95
+
96
+ if attributes.key?(:'payment_method_type')
97
+ self.payment_method_type = attributes[:'payment_method_type']
98
+ end
99
+
100
+ if attributes.key?(:'details')
101
+ self.details = attributes[:'details']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ auth_outcome == o.auth_outcome &&
126
+ request_id == o.request_id &&
127
+ correlation_id == o.correlation_id &&
128
+ auth_code == o.auth_code &&
129
+ payment_method_type == o.payment_method_type &&
130
+ details == o.details
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [auth_outcome, request_id, correlation_id, auth_code, payment_method_type, details].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def self._deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = BizReceipts.const_get(type)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -0,0 +1,360 @@
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 PaymentInfo
18
+ attr_accessor :payment_date_time
19
+
20
+ attr_accessor :application_date
21
+
22
+ attr_accessor :transfer_date
23
+
24
+ attr_accessor :due_date
25
+
26
+ attr_accessor :payment_token
27
+
28
+ attr_accessor :amount
29
+
30
+ attr_accessor :fee
31
+
32
+ attr_accessor :primary_ci_incurred_fee
33
+
34
+ attr_accessor :id_bundle
35
+
36
+ attr_accessor :id_ci_bundle
37
+
38
+ attr_accessor :total_notice
39
+
40
+ attr_accessor :payment_method
41
+
42
+ attr_accessor :touchpoint
43
+
44
+ attr_accessor :remittance_information
45
+
46
+ attr_accessor :description
47
+
48
+ attr_accessor :metadata
49
+
50
+ attr_accessor :iur
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'payment_date_time' => :'paymentDateTime',
56
+ :'application_date' => :'applicationDate',
57
+ :'transfer_date' => :'transferDate',
58
+ :'due_date' => :'dueDate',
59
+ :'payment_token' => :'paymentToken',
60
+ :'amount' => :'amount',
61
+ :'fee' => :'fee',
62
+ :'primary_ci_incurred_fee' => :'primaryCiIncurredFee',
63
+ :'id_bundle' => :'idBundle',
64
+ :'id_ci_bundle' => :'idCiBundle',
65
+ :'total_notice' => :'totalNotice',
66
+ :'payment_method' => :'paymentMethod',
67
+ :'touchpoint' => :'touchpoint',
68
+ :'remittance_information' => :'remittanceInformation',
69
+ :'description' => :'description',
70
+ :'metadata' => :'metadata',
71
+ :'iur' => :'IUR'
72
+ }
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'payment_date_time' => :'String',
84
+ :'application_date' => :'String',
85
+ :'transfer_date' => :'String',
86
+ :'due_date' => :'String',
87
+ :'payment_token' => :'String',
88
+ :'amount' => :'String',
89
+ :'fee' => :'String',
90
+ :'primary_ci_incurred_fee' => :'String',
91
+ :'id_bundle' => :'String',
92
+ :'id_ci_bundle' => :'String',
93
+ :'total_notice' => :'String',
94
+ :'payment_method' => :'String',
95
+ :'touchpoint' => :'String',
96
+ :'remittance_information' => :'String',
97
+ :'description' => :'String',
98
+ :'metadata' => :'Array<MapEntry>',
99
+ :'iur' => :'String'
100
+ }
101
+ end
102
+
103
+ # List of attributes with nullable: true
104
+ def self.openapi_nullable
105
+ Set.new([
106
+ ])
107
+ end
108
+
109
+ # Initializes the object
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ def initialize(attributes = {})
112
+ if (!attributes.is_a?(Hash))
113
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BizReceipts::PaymentInfo` initialize method"
114
+ end
115
+
116
+ # check to see if the attribute exists and convert string to symbol for hash key
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!self.class.attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BizReceipts::PaymentInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'payment_date_time')
125
+ self.payment_date_time = attributes[:'payment_date_time']
126
+ end
127
+
128
+ if attributes.key?(:'application_date')
129
+ self.application_date = attributes[:'application_date']
130
+ end
131
+
132
+ if attributes.key?(:'transfer_date')
133
+ self.transfer_date = attributes[:'transfer_date']
134
+ end
135
+
136
+ if attributes.key?(:'due_date')
137
+ self.due_date = attributes[:'due_date']
138
+ end
139
+
140
+ if attributes.key?(:'payment_token')
141
+ self.payment_token = attributes[:'payment_token']
142
+ end
143
+
144
+ if attributes.key?(:'amount')
145
+ self.amount = attributes[:'amount']
146
+ end
147
+
148
+ if attributes.key?(:'fee')
149
+ self.fee = attributes[:'fee']
150
+ end
151
+
152
+ if attributes.key?(:'primary_ci_incurred_fee')
153
+ self.primary_ci_incurred_fee = attributes[:'primary_ci_incurred_fee']
154
+ end
155
+
156
+ if attributes.key?(:'id_bundle')
157
+ self.id_bundle = attributes[:'id_bundle']
158
+ end
159
+
160
+ if attributes.key?(:'id_ci_bundle')
161
+ self.id_ci_bundle = attributes[:'id_ci_bundle']
162
+ end
163
+
164
+ if attributes.key?(:'total_notice')
165
+ self.total_notice = attributes[:'total_notice']
166
+ end
167
+
168
+ if attributes.key?(:'payment_method')
169
+ self.payment_method = attributes[:'payment_method']
170
+ end
171
+
172
+ if attributes.key?(:'touchpoint')
173
+ self.touchpoint = attributes[:'touchpoint']
174
+ end
175
+
176
+ if attributes.key?(:'remittance_information')
177
+ self.remittance_information = attributes[:'remittance_information']
178
+ end
179
+
180
+ if attributes.key?(:'description')
181
+ self.description = attributes[:'description']
182
+ end
183
+
184
+ if attributes.key?(:'metadata')
185
+ if (value = attributes[:'metadata']).is_a?(Array)
186
+ self.metadata = value
187
+ end
188
+ end
189
+
190
+ if attributes.key?(:'iur')
191
+ self.iur = attributes[:'iur']
192
+ end
193
+ end
194
+
195
+ # Show invalid properties with the reasons. Usually used together with valid?
196
+ # @return Array for valid properties with the reasons
197
+ def list_invalid_properties
198
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
199
+ invalid_properties = Array.new
200
+ invalid_properties
201
+ end
202
+
203
+ # Check to see if the all the properties in the model are valid
204
+ # @return true if the model is valid
205
+ def valid?
206
+ warn '[DEPRECATED] the `valid?` method is obsolete'
207
+ true
208
+ end
209
+
210
+ # Checks equality by comparing each attribute.
211
+ # @param [Object] Object to be compared
212
+ def ==(o)
213
+ return true if self.equal?(o)
214
+ self.class == o.class &&
215
+ payment_date_time == o.payment_date_time &&
216
+ application_date == o.application_date &&
217
+ transfer_date == o.transfer_date &&
218
+ due_date == o.due_date &&
219
+ payment_token == o.payment_token &&
220
+ amount == o.amount &&
221
+ fee == o.fee &&
222
+ primary_ci_incurred_fee == o.primary_ci_incurred_fee &&
223
+ id_bundle == o.id_bundle &&
224
+ id_ci_bundle == o.id_ci_bundle &&
225
+ total_notice == o.total_notice &&
226
+ payment_method == o.payment_method &&
227
+ touchpoint == o.touchpoint &&
228
+ remittance_information == o.remittance_information &&
229
+ description == o.description &&
230
+ metadata == o.metadata &&
231
+ iur == o.iur
232
+ end
233
+
234
+ # @see the `==` method
235
+ # @param [Object] Object to be compared
236
+ def eql?(o)
237
+ self == o
238
+ end
239
+
240
+ # Calculates hash code according to all attributes.
241
+ # @return [Integer] Hash code
242
+ def hash
243
+ [payment_date_time, application_date, transfer_date, due_date, payment_token, amount, fee, primary_ci_incurred_fee, id_bundle, id_ci_bundle, total_notice, payment_method, touchpoint, remittance_information, description, metadata, iur].hash
244
+ end
245
+
246
+ # Builds the object from hash
247
+ # @param [Hash] attributes Model attributes in the form of hash
248
+ # @return [Object] Returns the model itself
249
+ def self.build_from_hash(attributes)
250
+ return nil unless attributes.is_a?(Hash)
251
+ attributes = attributes.transform_keys(&:to_sym)
252
+ transformed_hash = {}
253
+ openapi_types.each_pair do |key, type|
254
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
255
+ transformed_hash["#{key}"] = nil
256
+ elsif type =~ /\AArray<(.*)>/i
257
+ # check to ensure the input is an array given that the attribute
258
+ # is documented as an array but the input is not
259
+ if attributes[attribute_map[key]].is_a?(Array)
260
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
261
+ end
262
+ elsif !attributes[attribute_map[key]].nil?
263
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
264
+ end
265
+ end
266
+ new(transformed_hash)
267
+ end
268
+
269
+ # Deserializes the data based on type
270
+ # @param string type Data type
271
+ # @param string value Value to be deserialized
272
+ # @return [Object] Deserialized data
273
+ def self._deserialize(type, value)
274
+ case type.to_sym
275
+ when :Time
276
+ Time.parse(value)
277
+ when :Date
278
+ Date.parse(value)
279
+ when :String
280
+ value.to_s
281
+ when :Integer
282
+ value.to_i
283
+ when :Float
284
+ value.to_f
285
+ when :Boolean
286
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
287
+ true
288
+ else
289
+ false
290
+ end
291
+ when :Object
292
+ # generic object (usually a Hash), return directly
293
+ value
294
+ when /\AArray<(?<inner_type>.+)>\z/
295
+ inner_type = Regexp.last_match[:inner_type]
296
+ value.map { |v| _deserialize(inner_type, v) }
297
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
298
+ k_type = Regexp.last_match[:k_type]
299
+ v_type = Regexp.last_match[:v_type]
300
+ {}.tap do |hash|
301
+ value.each do |k, v|
302
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
303
+ end
304
+ end
305
+ else # model
306
+ # models (e.g. Pet) or oneOf
307
+ klass = BizReceipts.const_get(type)
308
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
309
+ end
310
+ end
311
+
312
+ # Returns the string representation of the object
313
+ # @return [String] String presentation of the object
314
+ def to_s
315
+ to_hash.to_s
316
+ end
317
+
318
+ # to_body is an alias to to_hash (backward compatibility)
319
+ # @return [Hash] Returns the object in the form of hash
320
+ def to_body
321
+ to_hash
322
+ end
323
+
324
+ # Returns the object in the form of hash
325
+ # @return [Hash] Returns the object in the form of hash
326
+ def to_hash
327
+ hash = {}
328
+ self.class.attribute_map.each_pair do |attr, param|
329
+ value = self.send(attr)
330
+ if value.nil?
331
+ is_nullable = self.class.openapi_nullable.include?(attr)
332
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
333
+ end
334
+
335
+ hash[param] = _to_hash(value)
336
+ end
337
+ hash
338
+ end
339
+
340
+ # Outputs non-array value in the form of hash
341
+ # For object, use to_hash. Otherwise, just return the value
342
+ # @param [Object] value Any valid value
343
+ # @return [Hash] Returns the value in the form of hash
344
+ def _to_hash(value)
345
+ if value.is_a?(Array)
346
+ value.compact.map { |v| _to_hash(v) }
347
+ elsif value.is_a?(Hash)
348
+ {}.tap do |hash|
349
+ value.each { |k, v| hash[k] = _to_hash(v) }
350
+ end
351
+ elsif value.respond_to? :to_hash
352
+ value.to_hash
353
+ else
354
+ value
355
+ end
356
+ end
357
+
358
+ end
359
+
360
+ end