onlinepayments-sdk-ruby 11.1.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (513) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +9 -7
  3. data/README.md +133 -47
  4. data/Rakefile +8 -0
  5. data/lib/onlinepayments/sdk/api_exception.rb +5 -2
  6. data/lib/onlinepayments/sdk/api_resource.rb +19 -12
  7. data/lib/onlinepayments/sdk/authentication/authenticator.rb +2 -1
  8. data/lib/onlinepayments/sdk/authentication/authorization_type.rb +3 -1
  9. data/lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb +23 -19
  10. data/lib/onlinepayments/sdk/authentication.rb +2 -0
  11. data/lib/onlinepayments/sdk/authorization_exception.rb +2 -0
  12. data/lib/onlinepayments/sdk/call_context.rb +3 -7
  13. data/lib/onlinepayments/sdk/client.rb +4 -1
  14. data/lib/onlinepayments/sdk/communication/communication_exception.rb +2 -1
  15. data/lib/onlinepayments/sdk/communication/connection.rb +2 -0
  16. data/lib/onlinepayments/sdk/communication/default_connection.rb +187 -206
  17. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +37 -47
  18. data/lib/onlinepayments/sdk/communication/multipart_form_data_object.rb +8 -17
  19. data/lib/onlinepayments/sdk/communication/multipart_form_data_request.rb +2 -0
  20. data/lib/onlinepayments/sdk/communication/not_found_exception.rb +2 -1
  21. data/lib/onlinepayments/sdk/communication/param_request.rb +2 -0
  22. data/lib/onlinepayments/sdk/communication/pooled_connection.rb +5 -5
  23. data/lib/onlinepayments/sdk/communication/request_header.rb +11 -15
  24. data/lib/onlinepayments/sdk/communication/request_param.rb +5 -6
  25. data/lib/onlinepayments/sdk/communication/response_exception.rb +7 -11
  26. data/lib/onlinepayments/sdk/communication/response_header.rb +17 -24
  27. data/lib/onlinepayments/sdk/communication.rb +2 -0
  28. data/lib/onlinepayments/sdk/communicator.rb +100 -175
  29. data/lib/onlinepayments/sdk/communicator_configuration.rb +71 -53
  30. data/lib/onlinepayments/sdk/declined_payment_exception.rb +2 -0
  31. data/lib/onlinepayments/sdk/declined_payout_exception.rb +2 -0
  32. data/lib/onlinepayments/sdk/declined_refund_exception.rb +2 -0
  33. data/lib/onlinepayments/sdk/declined_transaction_exception.rb +2 -0
  34. data/lib/onlinepayments/sdk/domain/acceptance.rb +13 -3
  35. data/lib/onlinepayments/sdk/domain/account_on_file.rb +17 -6
  36. data/lib/onlinepayments/sdk/domain/account_on_file_attribute.rb +15 -4
  37. data/lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb +12 -3
  38. data/lib/onlinepayments/sdk/domain/acquirer_information.rb +12 -3
  39. data/lib/onlinepayments/sdk/domain/acquirer_selection_information.rb +13 -3
  40. data/lib/onlinepayments/sdk/domain/add_authorization_details_response.rb +10 -2
  41. data/lib/onlinepayments/sdk/domain/additional_order_input.rb +19 -8
  42. data/lib/onlinepayments/sdk/domain/address.rb +21 -7
  43. data/lib/onlinepayments/sdk/domain/address_personal.rb +26 -10
  44. data/lib/onlinepayments/sdk/domain/airline_data.rb +83 -27
  45. data/lib/onlinepayments/sdk/domain/airline_flight_leg.rb +69 -21
  46. data/lib/onlinepayments/sdk/domain/airline_passenger.rb +30 -8
  47. data/lib/onlinepayments/sdk/domain/amex.rb +15 -5
  48. data/lib/onlinepayments/sdk/domain/amount_breakdown.rb +11 -2
  49. data/lib/onlinepayments/sdk/domain/amount_of_money.rb +11 -2
  50. data/lib/onlinepayments/sdk/domain/api_error.rb +23 -8
  51. data/lib/onlinepayments/sdk/domain/api_parameters.rb +22 -10
  52. data/lib/onlinepayments/sdk/domain/apple_pay_line_item.rb +27 -7
  53. data/lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb +19 -7
  54. data/lib/onlinepayments/sdk/domain/authentication_options.rb +15 -4
  55. data/lib/onlinepayments/sdk/domain/auto_capture.rb +9 -1
  56. data/lib/onlinepayments/sdk/domain/bank_account_iban.rb +9 -1
  57. data/lib/onlinepayments/sdk/domain/batch_metadata.rb +13 -3
  58. data/lib/onlinepayments/sdk/domain/browser_data.rb +17 -5
  59. data/lib/onlinepayments/sdk/domain/calculate_surcharge_request.rb +13 -4
  60. data/lib/onlinepayments/sdk/domain/calculate_surcharge_response.rb +10 -2
  61. data/lib/onlinepayments/sdk/domain/cancel_payment_batch_request.rb +12 -3
  62. data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +21 -9
  63. data/lib/onlinepayments/sdk/domain/cancel_payment_response.rb +10 -2
  64. data/lib/onlinepayments/sdk/domain/capture.rb +17 -6
  65. data/lib/onlinepayments/sdk/domain/capture_output.rb +57 -23
  66. data/lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb +12 -3
  67. data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +23 -10
  68. data/lib/onlinepayments/sdk/domain/capture_response.rb +17 -6
  69. data/lib/onlinepayments/sdk/domain/capture_status_output.rb +9 -1
  70. data/lib/onlinepayments/sdk/domain/captures_response.rb +10 -2
  71. data/lib/onlinepayments/sdk/domain/car_rental_data.rb +57 -19
  72. data/lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb +21 -7
  73. data/lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb +11 -2
  74. data/lib/onlinepayments/sdk/domain/card.rb +15 -4
  75. data/lib/onlinepayments/sdk/domain/card_bin_details.rb +66 -20
  76. data/lib/onlinepayments/sdk/domain/card_data_without_cvv.rb +13 -3
  77. data/lib/onlinepayments/sdk/domain/card_essentials.rb +75 -23
  78. data/lib/onlinepayments/sdk/domain/card_fraud_results.rb +13 -3
  79. data/lib/onlinepayments/sdk/domain/card_info.rb +11 -2
  80. data/lib/onlinepayments/sdk/domain/card_installment_details.rb +6 -1
  81. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +122 -50
  82. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +93 -39
  83. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +16 -5
  84. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +88 -36
  85. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output_summary.rb +12 -3
  86. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output_summary_card.rb +9 -1
  87. data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +18 -6
  88. data/lib/onlinepayments/sdk/domain/card_recurrence_details.rb +9 -1
  89. data/lib/onlinepayments/sdk/domain/card_source.rb +16 -5
  90. data/lib/onlinepayments/sdk/domain/card_token.rb +21 -7
  91. data/lib/onlinepayments/sdk/domain/card_without_cvv.rb +13 -3
  92. data/lib/onlinepayments/sdk/domain/click_to_pay.rb +9 -1
  93. data/lib/onlinepayments/sdk/domain/company_information.rb +9 -1
  94. data/lib/onlinepayments/sdk/domain/complete_payment_card_payment_method_specific_input.rb +10 -2
  95. data/lib/onlinepayments/sdk/domain/complete_payment_request.rb +13 -4
  96. data/lib/onlinepayments/sdk/domain/complete_payment_response.rb +16 -6
  97. data/lib/onlinepayments/sdk/domain/contact_details.rb +17 -5
  98. data/lib/onlinepayments/sdk/domain/create_certificate_response.rb +11 -2
  99. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +38 -16
  100. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_response.rb +20 -7
  101. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +17 -6
  102. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb +22 -9
  103. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +23 -9
  104. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb +26 -8
  105. data/lib/onlinepayments/sdk/domain/create_mandate_request.rb +31 -9
  106. data/lib/onlinepayments/sdk/domain/create_mandate_response.rb +13 -4
  107. data/lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb +31 -9
  108. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +61 -25
  109. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +47 -19
  110. data/lib/onlinepayments/sdk/domain/create_payment_response.rb +16 -6
  111. data/lib/onlinepayments/sdk/domain/create_payout_request.rb +29 -11
  112. data/lib/onlinepayments/sdk/domain/create_token_request.rb +14 -4
  113. data/lib/onlinepayments/sdk/domain/created_payment_output.rb +12 -3
  114. data/lib/onlinepayments/sdk/domain/created_token_response.rb +22 -9
  115. data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +13 -4
  116. data/lib/onlinepayments/sdk/domain/credit_card_validation_rules.rb +11 -2
  117. data/lib/onlinepayments/sdk/domain/crm_token.rb +11 -2
  118. data/lib/onlinepayments/sdk/domain/csr_request.rb +9 -1
  119. data/lib/onlinepayments/sdk/domain/currency_conversion.rb +12 -3
  120. data/lib/onlinepayments/sdk/domain/currency_conversion_input.rb +11 -2
  121. data/lib/onlinepayments/sdk/domain/currency_conversion_request.rb +13 -4
  122. data/lib/onlinepayments/sdk/domain/currency_conversion_response.rb +15 -5
  123. data/lib/onlinepayments/sdk/domain/currency_conversion_result.rb +11 -2
  124. data/lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb +9 -1
  125. data/lib/onlinepayments/sdk/domain/cursor_pagination_info.rb +11 -2
  126. data/lib/onlinepayments/sdk/domain/customer.rb +42 -16
  127. data/lib/onlinepayments/sdk/domain/customer_account.rb +36 -12
  128. data/lib/onlinepayments/sdk/domain/customer_account_authentication.rb +13 -3
  129. data/lib/onlinepayments/sdk/domain/customer_bank_account.rb +13 -3
  130. data/lib/onlinepayments/sdk/domain/customer_device.rb +28 -8
  131. data/lib/onlinepayments/sdk/domain/customer_device_output.rb +9 -1
  132. data/lib/onlinepayments/sdk/domain/customer_output.rb +10 -2
  133. data/lib/onlinepayments/sdk/domain/customer_payment_activity.rb +13 -3
  134. data/lib/onlinepayments/sdk/domain/customer_token.rb +16 -6
  135. data/lib/onlinepayments/sdk/domain/data_object.rb +19 -2
  136. data/lib/onlinepayments/sdk/domain/dcc_card_source.rb +16 -5
  137. data/lib/onlinepayments/sdk/domain/dcc_proposal.rb +20 -8
  138. data/lib/onlinepayments/sdk/domain/decrypted_payment_data.rb +17 -5
  139. data/lib/onlinepayments/sdk/domain/detokenization_response.rb +10 -2
  140. data/lib/onlinepayments/sdk/domain/detokenized_token_response.rb +27 -7
  141. data/lib/onlinepayments/sdk/domain/directory_entry.rb +13 -3
  142. data/lib/onlinepayments/sdk/domain/discount.rb +9 -1
  143. data/lib/onlinepayments/sdk/domain/dpa_data.rb +9 -1
  144. data/lib/onlinepayments/sdk/domain/dpa_transaction_options.rb +10 -2
  145. data/lib/onlinepayments/sdk/domain/empty_validator.rb +2 -0
  146. data/lib/onlinepayments/sdk/domain/error_response.rb +12 -3
  147. data/lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb +36 -10
  148. data/lib/onlinepayments/sdk/domain/external_token_linked.rb +13 -3
  149. data/lib/onlinepayments/sdk/domain/feedbacks.rb +12 -3
  150. data/lib/onlinepayments/sdk/domain/fixed_list_validator.rb +10 -2
  151. data/lib/onlinepayments/sdk/domain/fraud_fields.rb +14 -4
  152. data/lib/onlinepayments/sdk/domain/fraud_results.rb +9 -1
  153. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +25 -7
  154. data/lib/onlinepayments/sdk/domain/get_batch_status_response.rb +15 -4
  155. data/lib/onlinepayments/sdk/domain/get_hosted_checkout_response.rb +12 -3
  156. data/lib/onlinepayments/sdk/domain/get_hosted_fields_session_response.rb +12 -3
  157. data/lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb +12 -3
  158. data/lib/onlinepayments/sdk/domain/get_iin_details_request.rb +12 -3
  159. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +76 -24
  160. data/lib/onlinepayments/sdk/domain/get_mandate_response.rb +10 -2
  161. data/lib/onlinepayments/sdk/domain/get_payment_links_by_merchant_group_request.rb +16 -6
  162. data/lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb +10 -2
  163. data/lib/onlinepayments/sdk/domain/get_payment_products_response.rb +10 -2
  164. data/lib/onlinepayments/sdk/domain/get_privacy_policy_response.rb +9 -1
  165. data/lib/onlinepayments/sdk/domain/gift_card_purchase.rb +12 -3
  166. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +48 -16
  167. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb +11 -2
  168. data/lib/onlinepayments/sdk/domain/iin_detail.rb +72 -22
  169. data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +33 -11
  170. data/lib/onlinepayments/sdk/domain/import_cof_series_response.rb +9 -1
  171. data/lib/onlinepayments/sdk/domain/increment_authorization_request.rb +10 -2
  172. data/lib/onlinepayments/sdk/domain/increment_authorization_response.rb +10 -2
  173. data/lib/onlinepayments/sdk/domain/label_template_element.rb +11 -2
  174. data/lib/onlinepayments/sdk/domain/length_validator.rb +11 -2
  175. data/lib/onlinepayments/sdk/domain/line_item.rb +19 -8
  176. data/lib/onlinepayments/sdk/domain/line_item_detail.rb +13 -3
  177. data/lib/onlinepayments/sdk/domain/line_item_invoice_data.rb +9 -1
  178. data/lib/onlinepayments/sdk/domain/loan_recipient.rb +17 -5
  179. data/lib/onlinepayments/sdk/domain/lodging_data.rb +9 -1
  180. data/lib/onlinepayments/sdk/domain/mandate_address.rb +17 -5
  181. data/lib/onlinepayments/sdk/domain/mandate_address_response.rb +17 -5
  182. data/lib/onlinepayments/sdk/domain/mandate_contact_details.rb +11 -2
  183. data/lib/onlinepayments/sdk/domain/mandate_customer.rb +21 -9
  184. data/lib/onlinepayments/sdk/domain/mandate_customer_response.rb +21 -9
  185. data/lib/onlinepayments/sdk/domain/mandate_merchant_action.rb +12 -3
  186. data/lib/onlinepayments/sdk/domain/mandate_personal_information.rb +12 -3
  187. data/lib/onlinepayments/sdk/domain/mandate_personal_information_response.rb +12 -3
  188. data/lib/onlinepayments/sdk/domain/mandate_personal_name.rb +11 -2
  189. data/lib/onlinepayments/sdk/domain/mandate_personal_name_response.rb +11 -2
  190. data/lib/onlinepayments/sdk/domain/mandate_redirect_data.rb +11 -2
  191. data/lib/onlinepayments/sdk/domain/mandate_response.rb +22 -8
  192. data/lib/onlinepayments/sdk/domain/market_place.rb +11 -2
  193. data/lib/onlinepayments/sdk/domain/mastercard.rb +14 -4
  194. data/lib/onlinepayments/sdk/domain/merchant_action.rb +21 -9
  195. data/lib/onlinepayments/sdk/domain/mobile_payment_data.rb +11 -2
  196. data/lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb +17 -6
  197. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb +40 -14
  198. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +22 -9
  199. data/lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb +17 -6
  200. data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +17 -6
  201. data/lib/onlinepayments/sdk/domain/mobile_three_d_secure_challenge_parameters.rb +15 -4
  202. data/lib/onlinepayments/sdk/domain/multiple_payment_information.rb +11 -2
  203. data/lib/onlinepayments/sdk/domain/network_token_data.rb +19 -6
  204. data/lib/onlinepayments/sdk/domain/network_token_essentials.rb +19 -6
  205. data/lib/onlinepayments/sdk/domain/network_token_linked.rb +13 -3
  206. data/lib/onlinepayments/sdk/domain/omnichannel_payment_specific_input.rb +9 -1
  207. data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +11 -2
  208. data/lib/onlinepayments/sdk/domain/omnichannel_refund_specific_input.rb +9 -1
  209. data/lib/onlinepayments/sdk/domain/omnichannel_subsequent_specific_input.rb +9 -1
  210. data/lib/onlinepayments/sdk/domain/operation_output.rb +34 -12
  211. data/lib/onlinepayments/sdk/domain/operation_payment_references.rb +24 -6
  212. data/lib/onlinepayments/sdk/domain/order.rb +44 -18
  213. data/lib/onlinepayments/sdk/domain/order_line_details.rb +36 -10
  214. data/lib/onlinepayments/sdk/domain/order_references.rb +30 -8
  215. data/lib/onlinepayments/sdk/domain/order_status_output.rb +18 -6
  216. data/lib/onlinepayments/sdk/domain/order_type_information.rb +11 -2
  217. data/lib/onlinepayments/sdk/domain/other_details.rb +11 -2
  218. data/lib/onlinepayments/sdk/domain/pagination.rb +11 -2
  219. data/lib/onlinepayments/sdk/domain/payment_account_on_file.rb +11 -2
  220. data/lib/onlinepayments/sdk/domain/payment_context.rb +14 -4
  221. data/lib/onlinepayments/sdk/domain/payment_creation_output.rb +15 -4
  222. data/lib/onlinepayments/sdk/domain/payment_details_response.rb +23 -10
  223. data/lib/onlinepayments/sdk/domain/payment_error_response.rb +15 -5
  224. data/lib/onlinepayments/sdk/domain/payment_link_event.rb +13 -3
  225. data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +15 -5
  226. data/lib/onlinepayments/sdk/domain/payment_link_order_output.rb +15 -5
  227. data/lib/onlinepayments/sdk/domain/payment_link_overview_entry.rb +37 -11
  228. data/lib/onlinepayments/sdk/domain/payment_link_overview_filtering.rb +13 -4
  229. data/lib/onlinepayments/sdk/domain/payment_link_overview_response.rb +15 -5
  230. data/lib/onlinepayments/sdk/domain/payment_link_overview_sorting.rb +11 -2
  231. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +38 -12
  232. data/lib/onlinepayments/sdk/domain/payment_link_specific_input.rb +13 -3
  233. data/lib/onlinepayments/sdk/domain/payment_output.rb +61 -25
  234. data/lib/onlinepayments/sdk/domain/payment_output_summary.rb +18 -7
  235. data/lib/onlinepayments/sdk/domain/payment_product.rb +55 -21
  236. data/lib/onlinepayments/sdk/domain/payment_product11.rb +17 -5
  237. data/lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb +10 -2
  238. data/lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb +15 -4
  239. data/lib/onlinepayments/sdk/domain/payment_product3012.rb +11 -2
  240. data/lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb +15 -4
  241. data/lib/onlinepayments/sdk/domain/payment_product3013_specific_input.rb +13 -3
  242. data/lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb +10 -2
  243. data/lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb +13 -4
  244. data/lib/onlinepayments/sdk/domain/payment_product3204_specific_output.rb +9 -1
  245. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb +9 -1
  246. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb +9 -1
  247. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb +9 -1
  248. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb +9 -1
  249. data/lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb +12 -3
  250. data/lib/onlinepayments/sdk/domain/payment_product350.rb +11 -2
  251. data/lib/onlinepayments/sdk/domain/payment_product5001.rb +11 -2
  252. data/lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb +17 -5
  253. data/lib/onlinepayments/sdk/domain/payment_product5002_specific_data.rb +10 -2
  254. data/lib/onlinepayments/sdk/domain/payment_product5002_specific_input.rb +11 -2
  255. data/lib/onlinepayments/sdk/domain/payment_product5002default_brand_parameters.rb +11 -2
  256. data/lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb +9 -1
  257. data/lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb +9 -1
  258. data/lib/onlinepayments/sdk/domain/payment_product5404.rb +11 -2
  259. data/lib/onlinepayments/sdk/domain/payment_product5407.rb +11 -2
  260. data/lib/onlinepayments/sdk/domain/payment_product5407_auto_capture.rb +6 -1
  261. data/lib/onlinepayments/sdk/domain/payment_product5412.rb +13 -3
  262. data/lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb +15 -4
  263. data/lib/onlinepayments/sdk/domain/payment_product5704_auto_capture.rb +9 -1
  264. data/lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb +9 -1
  265. data/lib/onlinepayments/sdk/domain/payment_product840.rb +9 -1
  266. data/lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb +30 -8
  267. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +33 -13
  268. data/lib/onlinepayments/sdk/domain/payment_product_display_hints.rb +13 -3
  269. data/lib/onlinepayments/sdk/domain/payment_product_field.rb +17 -6
  270. data/lib/onlinepayments/sdk/domain/payment_product_field_data_restrictions.rb +12 -3
  271. data/lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb +15 -4
  272. data/lib/onlinepayments/sdk/domain/payment_product_field_display_hints.rb +38 -12
  273. data/lib/onlinepayments/sdk/domain/payment_product_field_form_element.rb +12 -3
  274. data/lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb +11 -2
  275. data/lib/onlinepayments/sdk/domain/payment_product_field_validators.rb +42 -18
  276. data/lib/onlinepayments/sdk/domain/payment_product_filter.rb +13 -4
  277. data/lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb +10 -2
  278. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb +13 -4
  279. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_fields.rb +13 -4
  280. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb +13 -4
  281. data/lib/onlinepayments/sdk/domain/payment_product_group.rb +18 -7
  282. data/lib/onlinepayments/sdk/domain/payment_product_networks_response.rb +10 -2
  283. data/lib/onlinepayments/sdk/domain/payment_product_session302_specific_input.rb +11 -2
  284. data/lib/onlinepayments/sdk/domain/payment_product_session302_specific_output.rb +9 -1
  285. data/lib/onlinepayments/sdk/domain/payment_product_session_request.rb +10 -2
  286. data/lib/onlinepayments/sdk/domain/payment_product_session_response.rb +10 -2
  287. data/lib/onlinepayments/sdk/domain/payment_references.rb +27 -7
  288. data/lib/onlinepayments/sdk/domain/payment_response.rb +32 -12
  289. data/lib/onlinepayments/sdk/domain/payment_status_output.rb +28 -8
  290. data/lib/onlinepayments/sdk/domain/payment_status_output_summary.rb +16 -5
  291. data/lib/onlinepayments/sdk/domain/payment_summary.rb +17 -6
  292. data/lib/onlinepayments/sdk/domain/payments_report_response.rb +13 -4
  293. data/lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb +17 -6
  294. data/lib/onlinepayments/sdk/domain/payout_error_response.rb +15 -5
  295. data/lib/onlinepayments/sdk/domain/payout_output.rb +27 -9
  296. data/lib/onlinepayments/sdk/domain/payout_response.rb +17 -6
  297. data/lib/onlinepayments/sdk/domain/payout_result.rb +17 -6
  298. data/lib/onlinepayments/sdk/domain/payout_status_output.rb +13 -3
  299. data/lib/onlinepayments/sdk/domain/pending_authentication.rb +9 -1
  300. data/lib/onlinepayments/sdk/domain/personal_information.rb +14 -4
  301. data/lib/onlinepayments/sdk/domain/personal_information_token.rb +10 -2
  302. data/lib/onlinepayments/sdk/domain/personal_name.rb +13 -3
  303. data/lib/onlinepayments/sdk/domain/personal_name_token.rb +11 -2
  304. data/lib/onlinepayments/sdk/domain/problem_details_response.rb +17 -5
  305. data/lib/onlinepayments/sdk/domain/product302_recurring.rb +9 -1
  306. data/lib/onlinepayments/sdk/domain/product320_recurring.rb +9 -1
  307. data/lib/onlinepayments/sdk/domain/product_directory.rb +10 -2
  308. data/lib/onlinepayments/sdk/domain/protection_eligibility.rb +11 -2
  309. data/lib/onlinepayments/sdk/domain/range_validator.rb +11 -2
  310. data/lib/onlinepayments/sdk/domain/rate_details.rb +17 -5
  311. data/lib/onlinepayments/sdk/domain/reattempt_instructions.rb +14 -4
  312. data/lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb +11 -2
  313. data/lib/onlinepayments/sdk/domain/redirect_data.rb +11 -2
  314. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +117 -53
  315. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +50 -20
  316. data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +9 -1
  317. data/lib/onlinepayments/sdk/domain/redirect_payment_product3103_specific_input.rb +9 -1
  318. data/lib/onlinepayments/sdk/domain/redirect_payment_product3112_specific_input.rb +9 -1
  319. data/lib/onlinepayments/sdk/domain/redirect_payment_product3116_specific_input.rb +9 -1
  320. data/lib/onlinepayments/sdk/domain/redirect_payment_product3203_specific_input.rb +9 -1
  321. data/lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb +11 -2
  322. data/lib/onlinepayments/sdk/domain/redirect_payment_product3302_specific_input.rb +13 -3
  323. data/lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb +9 -1
  324. data/lib/onlinepayments/sdk/domain/redirect_payment_product3307_specific_input.rb +2 -0
  325. data/lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb +11 -2
  326. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +33 -9
  327. data/lib/onlinepayments/sdk/domain/redirect_payment_product5301_specific_input.rb +9 -1
  328. data/lib/onlinepayments/sdk/domain/redirect_payment_product5402_specific_input.rb +9 -1
  329. data/lib/onlinepayments/sdk/domain/redirect_payment_product5403_specific_input.rb +9 -1
  330. data/lib/onlinepayments/sdk/domain/redirect_payment_product5406_specific_input.rb +10 -2
  331. data/lib/onlinepayments/sdk/domain/redirect_payment_product5407_specific_input.rb +10 -2
  332. data/lib/onlinepayments/sdk/domain/redirect_payment_product5408_specific_input.rb +12 -3
  333. data/lib/onlinepayments/sdk/domain/redirect_payment_product5410_specific_input.rb +9 -1
  334. data/lib/onlinepayments/sdk/domain/redirect_payment_product5412_specific_input.rb +11 -2
  335. data/lib/onlinepayments/sdk/domain/redirect_payment_product5601_specific_input.rb +9 -1
  336. data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +9 -1
  337. data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +15 -4
  338. data/lib/onlinepayments/sdk/domain/redirect_payment_product900_specific_input.rb +9 -1
  339. data/lib/onlinepayments/sdk/domain/redirection_data.rb +9 -1
  340. data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +27 -9
  341. data/lib/onlinepayments/sdk/domain/refund_e_wallet_method_specific_output.rb +14 -4
  342. data/lib/onlinepayments/sdk/domain/refund_error_response.rb +15 -5
  343. data/lib/onlinepayments/sdk/domain/refund_mobile_method_specific_output.rb +13 -3
  344. data/lib/onlinepayments/sdk/domain/refund_output.rb +49 -19
  345. data/lib/onlinepayments/sdk/domain/refund_payment_batch_request.rb +12 -3
  346. data/lib/onlinepayments/sdk/domain/refund_payment_product840_customer_account.rb +13 -3
  347. data/lib/onlinepayments/sdk/domain/refund_payment_product840_specific_output.rb +10 -2
  348. data/lib/onlinepayments/sdk/domain/refund_redirect_method_specific_output.rb +11 -2
  349. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input.rb +10 -2
  350. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input.rb +9 -1
  351. data/lib/onlinepayments/sdk/domain/refund_request.rb +39 -15
  352. data/lib/onlinepayments/sdk/domain/refund_response.rb +17 -6
  353. data/lib/onlinepayments/sdk/domain/refunds_response.rb +10 -2
  354. data/lib/onlinepayments/sdk/domain/regular_expression_validator.rb +9 -1
  355. data/lib/onlinepayments/sdk/domain/revoke_mandate_request.rb +9 -1
  356. data/lib/onlinepayments/sdk/domain/send_test_request.rb +9 -1
  357. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb +12 -3
  358. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb +12 -3
  359. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +15 -5
  360. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb +12 -3
  361. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input_base.rb +12 -3
  362. data/lib/onlinepayments/sdk/domain/session_data.rb +18 -6
  363. data/lib/onlinepayments/sdk/domain/session_details.rb +11 -2
  364. data/lib/onlinepayments/sdk/domain/session_request.rb +10 -2
  365. data/lib/onlinepayments/sdk/domain/session_response.rb +18 -6
  366. data/lib/onlinepayments/sdk/domain/share_payment_link_request.rb +13 -3
  367. data/lib/onlinepayments/sdk/domain/shipping.rb +35 -11
  368. data/lib/onlinepayments/sdk/domain/shipping_detail.rb +11 -2
  369. data/lib/onlinepayments/sdk/domain/shipping_method.rb +15 -4
  370. data/lib/onlinepayments/sdk/domain/shopping_cart.rb +27 -9
  371. data/lib/onlinepayments/sdk/domain/shopping_cart_extension.rb +16 -13
  372. data/lib/onlinepayments/sdk/domain/show_form_data.rb +42 -18
  373. data/lib/onlinepayments/sdk/domain/show_instructions_data.rb +9 -1
  374. data/lib/onlinepayments/sdk/domain/split_payment_product_filter.rb +10 -2
  375. data/lib/onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout.rb +13 -4
  376. data/lib/onlinepayments/sdk/domain/sub_merchant.rb +20 -7
  377. data/lib/onlinepayments/sdk/domain/submit_batch_request_body.rb +38 -16
  378. data/lib/onlinepayments/sdk/domain/submit_batch_response.rb +11 -2
  379. data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +32 -10
  380. data/lib/onlinepayments/sdk/domain/subsequent_payment_batch_request.rb +12 -3
  381. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +9 -1
  382. data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +22 -8
  383. data/lib/onlinepayments/sdk/domain/subsequent_payment_response.rb +10 -2
  384. data/lib/onlinepayments/sdk/domain/surcharge.rb +23 -10
  385. data/lib/onlinepayments/sdk/domain/surcharge_calculation_card.rb +11 -2
  386. data/lib/onlinepayments/sdk/domain/surcharge_for_payment_link.rb +9 -1
  387. data/lib/onlinepayments/sdk/domain/surcharge_rate.rb +15 -4
  388. data/lib/onlinepayments/sdk/domain/surcharge_specific_input.rb +12 -3
  389. data/lib/onlinepayments/sdk/domain/surcharge_specific_output.rb +15 -5
  390. data/lib/onlinepayments/sdk/domain/test_connection.rb +9 -1
  391. data/lib/onlinepayments/sdk/domain/three_d_secure.rb +45 -15
  392. data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +34 -10
  393. data/lib/onlinepayments/sdk/domain/three_d_secure_data.rb +13 -3
  394. data/lib/onlinepayments/sdk/domain/three_d_secure_results.rb +45 -13
  395. data/lib/onlinepayments/sdk/domain/three_ds_input_data.rb +13 -3
  396. data/lib/onlinepayments/sdk/domain/token_card.rb +12 -3
  397. data/lib/onlinepayments/sdk/domain/token_card_data.rb +15 -5
  398. data/lib/onlinepayments/sdk/domain/token_card_specific_input.rb +10 -2
  399. data/lib/onlinepayments/sdk/domain/token_data.rb +12 -3
  400. data/lib/onlinepayments/sdk/domain/token_e_wallet.rb +12 -3
  401. data/lib/onlinepayments/sdk/domain/token_info.rb +15 -4
  402. data/lib/onlinepayments/sdk/domain/token_response.rb +35 -13
  403. data/lib/onlinepayments/sdk/domain/transaction.rb +10 -2
  404. data/lib/onlinepayments/sdk/domain/update_authorization_additional_data_request.rb +10 -2
  405. data/lib/onlinepayments/sdk/domain/uploadable_file.rb +6 -8
  406. data/lib/onlinepayments/sdk/domain/validate_credentials_request.rb +11 -2
  407. data/lib/onlinepayments/sdk/domain/validate_credentials_response.rb +9 -1
  408. data/lib/onlinepayments/sdk/domain/value_mapping_element.rb +12 -3
  409. data/lib/onlinepayments/sdk/domain/visa.rb +18 -6
  410. data/lib/onlinepayments/sdk/domain/visa_authentication_options.rb +13 -3
  411. data/lib/onlinepayments/sdk/domain.rb +2 -0
  412. data/lib/onlinepayments/sdk/exception_factory.rb +3 -1
  413. data/lib/onlinepayments/sdk/factory.rb +127 -54
  414. data/lib/onlinepayments/sdk/idempotence_exception.rb +2 -0
  415. data/lib/onlinepayments/sdk/json/default_marshaller.rb +7 -5
  416. data/lib/onlinepayments/sdk/json/marshaller.rb +2 -1
  417. data/lib/onlinepayments/sdk/json/marshaller_syntax_exception.rb +2 -0
  418. data/lib/onlinepayments/sdk/json.rb +2 -0
  419. data/lib/onlinepayments/sdk/logging/communicator_logger.rb +4 -3
  420. data/lib/onlinepayments/sdk/logging/log_message_builder.rb +76 -69
  421. data/lib/onlinepayments/sdk/logging/logging_capable.rb +2 -1
  422. data/lib/onlinepayments/sdk/logging/obfuscation/body_obfuscator.rb +50 -49
  423. data/lib/onlinepayments/sdk/logging/obfuscation/header_obfuscator.rb +12 -15
  424. data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_capable.rb +27 -5
  425. data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_rule.rb +14 -16
  426. data/lib/onlinepayments/sdk/logging/obfuscation.rb +2 -0
  427. data/lib/onlinepayments/sdk/logging/request_log_message_builder.rb +18 -14
  428. data/lib/onlinepayments/sdk/logging/response_log_message_builder.rb +15 -13
  429. data/lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb +12 -13
  430. data/lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb +7 -5
  431. data/lib/onlinepayments/sdk/logging.rb +2 -0
  432. data/lib/onlinepayments/sdk/merchant/captures/captures_client.rb +2 -0
  433. data/lib/onlinepayments/sdk/merchant/captures.rb +2 -0
  434. data/lib/onlinepayments/sdk/merchant/cofseries/cof_series_client.rb +2 -0
  435. data/lib/onlinepayments/sdk/merchant/cofseries.rb +2 -0
  436. data/lib/onlinepayments/sdk/merchant/complete/complete_client.rb +2 -0
  437. data/lib/onlinepayments/sdk/merchant/complete.rb +2 -0
  438. data/lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +2 -0
  439. data/lib/onlinepayments/sdk/merchant/hostedcheckout.rb +2 -0
  440. data/lib/onlinepayments/sdk/merchant/hostedfields/hosted_fields_client.rb +2 -0
  441. data/lib/onlinepayments/sdk/merchant/hostedfields.rb +2 -0
  442. data/lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +2 -0
  443. data/lib/onlinepayments/sdk/merchant/hostedtokenization.rb +2 -0
  444. data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +2 -0
  445. data/lib/onlinepayments/sdk/merchant/mandates.rb +2 -0
  446. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +3 -1
  447. data/lib/onlinepayments/sdk/merchant/merchantbatch/get_payments_report_params.rb +9 -0
  448. data/lib/onlinepayments/sdk/merchant/merchantbatch/merchant_batch_client.rb +2 -0
  449. data/lib/onlinepayments/sdk/merchant/merchantbatch.rb +2 -0
  450. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +2 -0
  451. data/lib/onlinepayments/sdk/merchant/paymentlinks.rb +2 -0
  452. data/lib/onlinepayments/sdk/merchant/payments/payments_client.rb +2 -0
  453. data/lib/onlinepayments/sdk/merchant/payments.rb +2 -0
  454. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +2 -0
  455. data/lib/onlinepayments/sdk/merchant/payouts.rb +2 -0
  456. data/lib/onlinepayments/sdk/merchant/preauthorization/pre_authorization_client.rb +2 -0
  457. data/lib/onlinepayments/sdk/merchant/preauthorization.rb +2 -0
  458. data/lib/onlinepayments/sdk/merchant/privacypolicy/get_privacy_policy_params.rb +9 -0
  459. data/lib/onlinepayments/sdk/merchant/privacypolicy/privacy_policy_client.rb +2 -0
  460. data/lib/onlinepayments/sdk/merchant/privacypolicy.rb +2 -0
  461. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +13 -0
  462. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +13 -0
  463. data/lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb +2 -0
  464. data/lib/onlinepayments/sdk/merchant/productgroups.rb +2 -0
  465. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +11 -0
  466. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +14 -0
  467. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +14 -0
  468. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +9 -0
  469. data/lib/onlinepayments/sdk/merchant/products/products_client.rb +2 -0
  470. data/lib/onlinepayments/sdk/merchant/products.rb +2 -0
  471. data/lib/onlinepayments/sdk/merchant/refunds/refunds_client.rb +2 -0
  472. data/lib/onlinepayments/sdk/merchant/refunds.rb +2 -0
  473. data/lib/onlinepayments/sdk/merchant/services/services_client.rb +2 -0
  474. data/lib/onlinepayments/sdk/merchant/services.rb +2 -0
  475. data/lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb +2 -0
  476. data/lib/onlinepayments/sdk/merchant/sessions.rb +2 -0
  477. data/lib/onlinepayments/sdk/merchant/subsequent/subsequent_client.rb +2 -0
  478. data/lib/onlinepayments/sdk/merchant/subsequent.rb +2 -0
  479. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_payments_params.rb +8 -0
  480. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_tokens_params.rb +8 -0
  481. data/lib/onlinepayments/sdk/merchant/tokenization/tokenization_client.rb +2 -0
  482. data/lib/onlinepayments/sdk/merchant/tokenization.rb +2 -0
  483. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +2 -0
  484. data/lib/onlinepayments/sdk/merchant/tokens.rb +2 -0
  485. data/lib/onlinepayments/sdk/merchant/webhooks/webhooks_client.rb +2 -0
  486. data/lib/onlinepayments/sdk/merchant/webhooks.rb +2 -0
  487. data/lib/onlinepayments/sdk/merchant.rb +2 -0
  488. data/lib/onlinepayments/sdk/platform_exception.rb +2 -0
  489. data/lib/onlinepayments/sdk/problem_details_exception.rb +2 -0
  490. data/lib/onlinepayments/sdk/proxy_configuration.rb +22 -18
  491. data/lib/onlinepayments/sdk/reference_exception.rb +2 -0
  492. data/lib/onlinepayments/sdk/validation_exception.rb +2 -0
  493. data/lib/onlinepayments/sdk/version.rb +8 -0
  494. data/lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb +3 -3
  495. data/lib/onlinepayments/sdk/webhooks/in_memory_secret_key_store.rb +7 -4
  496. data/lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb +4 -2
  497. data/lib/onlinepayments/sdk/webhooks/secret_key_store.rb +2 -1
  498. data/lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb +2 -1
  499. data/lib/onlinepayments/sdk/webhooks/signature_validator.rb +13 -10
  500. data/lib/onlinepayments/sdk/webhooks/webhooks_event.rb +38 -62
  501. data/lib/onlinepayments/sdk/webhooks/webhooks_helper.rb +3 -1
  502. data/lib/onlinepayments/sdk/webhooks.rb +2 -0
  503. data/lib/onlinepayments/sdk.rb +2 -0
  504. data/onlinepayments-sdk-ruby.gemspec +12 -7
  505. data/skills/worldline-direct/examples/client_setup.rb +10 -13
  506. data/skills/worldline-direct/examples/webhooks_setup.rb +2 -2
  507. data/skills/worldline-direct/references/ruby.md +30 -29
  508. data/skills/worldline-direct/references/webhooks.md +2 -2
  509. metadata +76 -23
  510. data/lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb +0 -37
  511. data/lib/onlinepayments/sdk/domain/payment_links_response.rb +0 -35
  512. data/lib/onlinepayments/sdk/domain/shopping_cart_output.rb +0 -35
  513. data/lib/onlinepayments/sdk/merchant/paymentlinks/get_payment_links_in_bulk_params.rb +0 -28
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -29,6 +31,22 @@ module OnlinePayments
29
31
 
30
32
  attr_accessor :total_amount_refunded
31
33
 
34
+ # Creates a new instance; every attribute can be given as a keyword argument.
35
+ def initialize(acceptance: nil,
36
+ authorisation_code: nil,
37
+ currency_conversion: nil,
38
+ reattempt_instructions: nil,
39
+ total_amount_paid: nil,
40
+ total_amount_refunded: nil)
41
+ super()
42
+ @acceptance = acceptance
43
+ @authorisation_code = authorisation_code
44
+ @currency_conversion = currency_conversion
45
+ @reattempt_instructions = reattempt_instructions
46
+ @total_amount_paid = total_amount_paid
47
+ @total_amount_refunded = total_amount_refunded
48
+ end
49
+
32
50
  # Sets the property and returns this same instance.
33
51
  def with_acceptance(value)
34
52
  @acceptance = value
@@ -79,25 +97,25 @@ module OnlinePayments
79
97
 
80
98
  def from_hash(hash)
81
99
  super
82
- if hash.has_key? 'acceptance'
83
- raise TypeError, "value '%s' is not a Hash" % [hash['acceptance']] unless hash['acceptance'].is_a? Hash
100
+ if hash.key? 'acceptance'
101
+ raise TypeError, "value '#{hash['acceptance']}' is not a Hash" unless hash['acceptance'].is_a? Hash
84
102
  @acceptance = OnlinePayments::SDK::Domain::Acceptance.new_from_hash(hash['acceptance'])
85
103
  end
86
- if hash.has_key? 'authorisationCode'
104
+ if hash.key? 'authorisationCode'
87
105
  @authorisation_code = hash['authorisationCode']
88
106
  end
89
- if hash.has_key? 'currencyConversion'
90
- raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
107
+ if hash.key? 'currencyConversion'
108
+ raise TypeError, "value '#{hash['currencyConversion']}' is not a Hash" unless hash['currencyConversion'].is_a? Hash
91
109
  @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
92
110
  end
93
- if hash.has_key? 'reattemptInstructions'
94
- raise TypeError, "value '%s' is not a Hash" % [hash['reattemptInstructions']] unless hash['reattemptInstructions'].is_a? Hash
111
+ if hash.key? 'reattemptInstructions'
112
+ raise TypeError, "value '#{hash['reattemptInstructions']}' is not a Hash" unless hash['reattemptInstructions'].is_a? Hash
95
113
  @reattempt_instructions = OnlinePayments::SDK::Domain::ReattemptInstructions.new_from_hash(hash['reattemptInstructions'])
96
114
  end
97
- if hash.has_key? 'totalAmountPaid'
115
+ if hash.key? 'totalAmountPaid'
98
116
  @total_amount_paid = hash['totalAmountPaid']
99
117
  end
100
- if hash.has_key? 'totalAmountRefunded'
118
+ if hash.key? 'totalAmountRefunded'
101
119
  @total_amount_refunded = hash['totalAmountRefunded']
102
120
  end
103
121
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -18,6 +20,14 @@ module OnlinePayments
18
20
 
19
21
  attr_accessor :total_amount_refunded
20
22
 
23
+ # Creates a new instance; every attribute can be given as a keyword argument.
24
+ def initialize(payment_product840_specific_output: nil, total_amount_paid: nil, total_amount_refunded: nil)
25
+ super()
26
+ @payment_product840_specific_output = payment_product840_specific_output
27
+ @total_amount_paid = total_amount_paid
28
+ @total_amount_refunded = total_amount_refunded
29
+ end
30
+
21
31
  # Sets the property and returns this same instance.
22
32
  def with_payment_product840_specific_output(value)
23
33
  @payment_product840_specific_output = value
@@ -47,14 +57,14 @@ module OnlinePayments
47
57
 
48
58
  def from_hash(hash)
49
59
  super
50
- if hash.has_key? 'paymentProduct840SpecificOutput'
51
- raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificOutput']] unless hash['paymentProduct840SpecificOutput'].is_a? Hash
60
+ if hash.key? 'paymentProduct840SpecificOutput'
61
+ raise TypeError, "value '#{hash['paymentProduct840SpecificOutput']}' is not a Hash" unless hash['paymentProduct840SpecificOutput'].is_a? Hash
52
62
  @payment_product840_specific_output = OnlinePayments::SDK::Domain::RefundPaymentProduct840SpecificOutput.new_from_hash(hash['paymentProduct840SpecificOutput'])
53
63
  end
54
- if hash.has_key? 'totalAmountPaid'
64
+ if hash.key? 'totalAmountPaid'
55
65
  @total_amount_paid = hash['totalAmountPaid']
56
66
  end
57
- if hash.has_key? 'totalAmountRefunded'
67
+ if hash.key? 'totalAmountRefunded'
58
68
  @total_amount_refunded = hash['totalAmountRefunded']
59
69
  end
60
70
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -19,6 +21,14 @@ module OnlinePayments
19
21
 
20
22
  attr_accessor :refund_result
21
23
 
24
+ # Creates a new instance; every attribute can be given as a keyword argument.
25
+ def initialize(error_id: nil, errors: nil, refund_result: nil)
26
+ super()
27
+ @error_id = error_id
28
+ @errors = errors
29
+ @refund_result = refund_result
30
+ end
31
+
22
32
  # Sets the property and returns this same instance.
23
33
  def with_error_id(value)
24
34
  @error_id = value
@@ -48,18 +58,18 @@ module OnlinePayments
48
58
 
49
59
  def from_hash(hash)
50
60
  super
51
- if hash.has_key? 'errorId'
61
+ if hash.key? 'errorId'
52
62
  @error_id = hash['errorId']
53
63
  end
54
- if hash.has_key? 'errors'
55
- raise TypeError, "value '%s' is not an Array" % [hash['errors']] unless hash['errors'].is_a? Array
64
+ if hash.key? 'errors'
65
+ raise TypeError, "value '#{hash['errors']}' is not an Array" unless hash['errors'].is_a? Array
56
66
  @errors = []
57
67
  hash['errors'].each do |e|
58
68
  @errors << OnlinePayments::SDK::Domain::APIError.new_from_hash(e)
59
69
  end
60
70
  end
61
- if hash.has_key? 'refundResult'
62
- raise TypeError, "value '%s' is not a Hash" % [hash['refundResult']] unless hash['refundResult'].is_a? Hash
71
+ if hash.key? 'refundResult'
72
+ raise TypeError, "value '#{hash['refundResult']}' is not a Hash" unless hash['refundResult'].is_a? Hash
63
73
  @refund_result = OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(hash['refundResult'])
64
74
  end
65
75
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -17,6 +19,14 @@ module OnlinePayments
17
19
 
18
20
  attr_accessor :total_amount_refunded
19
21
 
22
+ # Creates a new instance; every attribute can be given as a keyword argument.
23
+ def initialize(network: nil, total_amount_paid: nil, total_amount_refunded: nil)
24
+ super()
25
+ @network = network
26
+ @total_amount_paid = total_amount_paid
27
+ @total_amount_refunded = total_amount_refunded
28
+ end
29
+
20
30
  # Sets the property and returns this same instance.
21
31
  def with_network(value)
22
32
  @network = value
@@ -46,13 +56,13 @@ module OnlinePayments
46
56
 
47
57
  def from_hash(hash)
48
58
  super
49
- if hash.has_key? 'network'
59
+ if hash.key? 'network'
50
60
  @network = hash['network']
51
61
  end
52
- if hash.has_key? 'totalAmountPaid'
62
+ if hash.key? 'totalAmountPaid'
53
63
  @total_amount_paid = hash['totalAmountPaid']
54
64
  end
55
- if hash.has_key? 'totalAmountRefunded'
65
+ if hash.key? 'totalAmountRefunded'
56
66
  @total_amount_refunded = hash['totalAmountRefunded']
57
67
  end
58
68
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -53,6 +55,34 @@ module OnlinePayments
53
55
 
54
56
  attr_accessor :transaction_date
55
57
 
58
+ # Creates a new instance; every attribute can be given as a keyword argument.
59
+ def initialize(amount_of_money: nil,
60
+ amount_paid: nil,
61
+ card_refund_method_specific_output: nil,
62
+ e_wallet_refund_method_specific_output: nil,
63
+ merchant_parameters: nil,
64
+ mobile_refund_method_specific_output: nil,
65
+ operation_references: nil,
66
+ payment_creation_date: nil,
67
+ payment_method: nil,
68
+ redirect_refund_method_specific_output: nil,
69
+ references: nil,
70
+ transaction_date: nil)
71
+ super()
72
+ @amount_of_money = amount_of_money
73
+ @amount_paid = amount_paid
74
+ @card_refund_method_specific_output = card_refund_method_specific_output
75
+ @e_wallet_refund_method_specific_output = e_wallet_refund_method_specific_output
76
+ @merchant_parameters = merchant_parameters
77
+ @mobile_refund_method_specific_output = mobile_refund_method_specific_output
78
+ @operation_references = operation_references
79
+ @payment_creation_date = payment_creation_date
80
+ @payment_method = payment_method
81
+ @redirect_refund_method_specific_output = redirect_refund_method_specific_output
82
+ @references = references
83
+ @transaction_date = transaction_date
84
+ end
85
+
56
86
  # Sets the property and returns this same instance.
57
87
  def with_amount_of_money(value)
58
88
  @amount_of_money = value
@@ -145,47 +175,47 @@ module OnlinePayments
145
175
 
146
176
  def from_hash(hash)
147
177
  super
148
- if hash.has_key? 'amountOfMoney'
149
- raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
178
+ if hash.key? 'amountOfMoney'
179
+ raise TypeError, "value '#{hash['amountOfMoney']}' is not a Hash" unless hash['amountOfMoney'].is_a? Hash
150
180
  @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
151
181
  end
152
- if hash.has_key? 'amountPaid'
182
+ if hash.key? 'amountPaid'
153
183
  @amount_paid = hash['amountPaid']
154
184
  end
155
- if hash.has_key? 'cardRefundMethodSpecificOutput'
156
- raise TypeError, "value '%s' is not a Hash" % [hash['cardRefundMethodSpecificOutput']] unless hash['cardRefundMethodSpecificOutput'].is_a? Hash
185
+ if hash.key? 'cardRefundMethodSpecificOutput'
186
+ raise TypeError, "value '#{hash['cardRefundMethodSpecificOutput']}' is not a Hash" unless hash['cardRefundMethodSpecificOutput'].is_a? Hash
157
187
  @card_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput.new_from_hash(hash['cardRefundMethodSpecificOutput'])
158
188
  end
159
- if hash.has_key? 'eWalletRefundMethodSpecificOutput'
160
- raise TypeError, "value '%s' is not a Hash" % [hash['eWalletRefundMethodSpecificOutput']] unless hash['eWalletRefundMethodSpecificOutput'].is_a? Hash
189
+ if hash.key? 'eWalletRefundMethodSpecificOutput'
190
+ raise TypeError, "value '#{hash['eWalletRefundMethodSpecificOutput']}' is not a Hash" unless hash['eWalletRefundMethodSpecificOutput'].is_a? Hash
161
191
  @e_wallet_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput'])
162
192
  end
163
- if hash.has_key? 'merchantParameters'
193
+ if hash.key? 'merchantParameters'
164
194
  @merchant_parameters = hash['merchantParameters']
165
195
  end
166
- if hash.has_key? 'mobileRefundMethodSpecificOutput'
167
- raise TypeError, "value '%s' is not a Hash" % [hash['mobileRefundMethodSpecificOutput']] unless hash['mobileRefundMethodSpecificOutput'].is_a? Hash
196
+ if hash.key? 'mobileRefundMethodSpecificOutput'
197
+ raise TypeError, "value '#{hash['mobileRefundMethodSpecificOutput']}' is not a Hash" unless hash['mobileRefundMethodSpecificOutput'].is_a? Hash
168
198
  @mobile_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput'])
169
199
  end
170
- if hash.has_key? 'operationReferences'
171
- raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
200
+ if hash.key? 'operationReferences'
201
+ raise TypeError, "value '#{hash['operationReferences']}' is not a Hash" unless hash['operationReferences'].is_a? Hash
172
202
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
173
203
  end
174
- if hash.has_key? 'paymentCreationDate'
204
+ if hash.key? 'paymentCreationDate'
175
205
  @payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
176
206
  end
177
- if hash.has_key? 'paymentMethod'
207
+ if hash.key? 'paymentMethod'
178
208
  @payment_method = hash['paymentMethod']
179
209
  end
180
- if hash.has_key? 'redirectRefundMethodSpecificOutput'
181
- raise TypeError, "value '%s' is not a Hash" % [hash['redirectRefundMethodSpecificOutput']] unless hash['redirectRefundMethodSpecificOutput'].is_a? Hash
210
+ if hash.key? 'redirectRefundMethodSpecificOutput'
211
+ raise TypeError, "value '#{hash['redirectRefundMethodSpecificOutput']}' is not a Hash" unless hash['redirectRefundMethodSpecificOutput'].is_a? Hash
182
212
  @redirect_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput.new_from_hash(hash['redirectRefundMethodSpecificOutput'])
183
213
  end
184
- if hash.has_key? 'references'
185
- raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
214
+ if hash.key? 'references'
215
+ raise TypeError, "value '#{hash['references']}' is not a Hash" unless hash['references'].is_a? Hash
186
216
  @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
187
217
  end
188
- if hash.has_key? 'transactionDate'
218
+ if hash.key? 'transactionDate'
189
219
  @transaction_date = DateTime.parse(hash['transactionDate'])
190
220
  end
191
221
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -15,6 +17,13 @@ module OnlinePayments
15
17
 
16
18
  attr_accessor :refund
17
19
 
20
+ # Creates a new instance; every attribute can be given as a keyword argument.
21
+ def initialize(payment_id: nil, refund: nil)
22
+ super()
23
+ @payment_id = payment_id
24
+ @refund = refund
25
+ end
26
+
18
27
  # Sets the property and returns this same instance.
19
28
  def with_payment_id(value)
20
29
  @payment_id = value
@@ -37,11 +46,11 @@ module OnlinePayments
37
46
 
38
47
  def from_hash(hash)
39
48
  super
40
- if hash.has_key? 'paymentId'
49
+ if hash.key? 'paymentId'
41
50
  @payment_id = hash['paymentId']
42
51
  end
43
- if hash.has_key? 'refund'
44
- raise TypeError, "value '%s' is not a Hash" % [hash['refund']] unless hash['refund'].is_a? Hash
52
+ if hash.key? 'refund'
53
+ raise TypeError, "value '#{hash['refund']}' is not a Hash" unless hash['refund'].is_a? Hash
45
54
  @refund = OnlinePayments::SDK::Domain::RefundRequest.new_from_hash(hash['refund'])
46
55
  end
47
56
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -17,6 +19,14 @@ module OnlinePayments
17
19
 
18
20
  attr_accessor :payer_id
19
21
 
22
+ # Creates a new instance; every attribute can be given as a keyword argument.
23
+ def initialize(customer_account_status: nil, customer_address_status: nil, payer_id: nil)
24
+ super()
25
+ @customer_account_status = customer_account_status
26
+ @customer_address_status = customer_address_status
27
+ @payer_id = payer_id
28
+ end
29
+
20
30
  # Sets the property and returns this same instance.
21
31
  def with_customer_account_status(value)
22
32
  @customer_account_status = value
@@ -46,13 +56,13 @@ module OnlinePayments
46
56
 
47
57
  def from_hash(hash)
48
58
  super
49
- if hash.has_key? 'customerAccountStatus'
59
+ if hash.key? 'customerAccountStatus'
50
60
  @customer_account_status = hash['customerAccountStatus']
51
61
  end
52
- if hash.has_key? 'customerAddressStatus'
62
+ if hash.key? 'customerAddressStatus'
53
63
  @customer_address_status = hash['customerAddressStatus']
54
64
  end
55
- if hash.has_key? 'payerId'
65
+ if hash.key? 'payerId'
56
66
  @payer_id = hash['payerId']
57
67
  end
58
68
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -12,6 +14,12 @@ module OnlinePayments
12
14
 
13
15
  attr_accessor :customer_account
14
16
 
17
+ # Creates a new instance; every attribute can be given as a keyword argument.
18
+ def initialize(customer_account: nil)
19
+ super()
20
+ @customer_account = customer_account
21
+ end
22
+
15
23
  # Sets the property and returns this same instance.
16
24
  def with_customer_account(value)
17
25
  @customer_account = value
@@ -27,8 +35,8 @@ module OnlinePayments
27
35
 
28
36
  def from_hash(hash)
29
37
  super
30
- if hash.has_key? 'customerAccount'
31
- raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
38
+ if hash.key? 'customerAccount'
39
+ raise TypeError, "value '#{hash['customerAccount']}' is not a Hash" unless hash['customerAccount'].is_a? Hash
32
40
  @customer_account = OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount'])
33
41
  end
34
42
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -14,6 +16,13 @@ module OnlinePayments
14
16
 
15
17
  attr_accessor :total_amount_refunded
16
18
 
19
+ # Creates a new instance; every attribute can be given as a keyword argument.
20
+ def initialize(total_amount_paid: nil, total_amount_refunded: nil)
21
+ super()
22
+ @total_amount_paid = total_amount_paid
23
+ @total_amount_refunded = total_amount_refunded
24
+ end
25
+
17
26
  # Sets the property and returns this same instance.
18
27
  def with_total_amount_paid(value)
19
28
  @total_amount_paid = value
@@ -36,10 +45,10 @@ module OnlinePayments
36
45
 
37
46
  def from_hash(hash)
38
47
  super
39
- if hash.has_key? 'totalAmountPaid'
48
+ if hash.key? 'totalAmountPaid'
40
49
  @total_amount_paid = hash['totalAmountPaid']
41
50
  end
42
- if hash.has_key? 'totalAmountRefunded'
51
+ if hash.key? 'totalAmountRefunded'
43
52
  @total_amount_refunded = hash['totalAmountRefunded']
44
53
  end
45
54
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -12,6 +14,12 @@ module OnlinePayments
12
14
 
13
15
  attr_accessor :refund_redirect_payment_product900_specific_input
14
16
 
17
+ # Creates a new instance; every attribute can be given as a keyword argument.
18
+ def initialize(refund_redirect_payment_product900_specific_input: nil)
19
+ super()
20
+ @refund_redirect_payment_product900_specific_input = refund_redirect_payment_product900_specific_input
21
+ end
22
+
15
23
  # Sets the property and returns this same instance.
16
24
  def with_refund_redirect_payment_product900_specific_input(value)
17
25
  @refund_redirect_payment_product900_specific_input = value
@@ -27,8 +35,8 @@ module OnlinePayments
27
35
 
28
36
  def from_hash(hash)
29
37
  super
30
- if hash.has_key? 'refundRedirectPaymentProduct900SpecificInput'
31
- raise TypeError, "value '%s' is not a Hash" % [hash['refundRedirectPaymentProduct900SpecificInput']] unless hash['refundRedirectPaymentProduct900SpecificInput'].is_a? Hash
38
+ if hash.key? 'refundRedirectPaymentProduct900SpecificInput'
39
+ raise TypeError, "value '#{hash['refundRedirectPaymentProduct900SpecificInput']}' is not a Hash" unless hash['refundRedirectPaymentProduct900SpecificInput'].is_a? Hash
32
40
  @refund_redirect_payment_product900_specific_input = OnlinePayments::SDK::Domain::RefundRedirectPaymentProduct900SpecificInput.new_from_hash(hash['refundRedirectPaymentProduct900SpecificInput'])
33
41
  end
34
42
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -11,6 +13,12 @@ module OnlinePayments
11
13
 
12
14
  attr_accessor :refund_reason
13
15
 
16
+ # Creates a new instance; every attribute can be given as a keyword argument.
17
+ def initialize(refund_reason: nil)
18
+ super()
19
+ @refund_reason = refund_reason
20
+ end
21
+
14
22
  # Sets the property and returns this same instance.
15
23
  def with_refund_reason(value)
16
24
  @refund_reason = value
@@ -26,7 +34,7 @@ module OnlinePayments
26
34
 
27
35
  def from_hash(hash)
28
36
  super
29
- if hash.has_key? 'refundReason'
37
+ if hash.key? 'refundReason'
30
38
  @refund_reason = hash['refundReason']
31
39
  end
32
40
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -41,6 +43,28 @@ module OnlinePayments
41
43
 
42
44
  attr_accessor :refund_redirect_payment_method_specific_input
43
45
 
46
+ # Creates a new instance; every attribute can be given as a keyword argument.
47
+ def initialize(amount_of_money: nil,
48
+ capture_id: nil,
49
+ is_final: nil,
50
+ line_item_details: nil,
51
+ omnichannel_refund_specific_input: nil,
52
+ operation_references: nil,
53
+ reason: nil,
54
+ references: nil,
55
+ refund_redirect_payment_method_specific_input: nil)
56
+ super()
57
+ @amount_of_money = amount_of_money
58
+ @capture_id = capture_id
59
+ @is_final = is_final
60
+ @line_item_details = line_item_details
61
+ @omnichannel_refund_specific_input = omnichannel_refund_specific_input
62
+ @operation_references = operation_references
63
+ @reason = reason
64
+ @references = references
65
+ @refund_redirect_payment_method_specific_input = refund_redirect_payment_method_specific_input
66
+ end
67
+
44
68
  # Sets the property and returns this same instance.
45
69
  def with_amount_of_money(value)
46
70
  @amount_of_money = value
@@ -112,40 +136,40 @@ module OnlinePayments
112
136
 
113
137
  def from_hash(hash)
114
138
  super
115
- if hash.has_key? 'amountOfMoney'
116
- raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
139
+ if hash.key? 'amountOfMoney'
140
+ raise TypeError, "value '#{hash['amountOfMoney']}' is not a Hash" unless hash['amountOfMoney'].is_a? Hash
117
141
  @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
118
142
  end
119
- if hash.has_key? 'captureId'
143
+ if hash.key? 'captureId'
120
144
  @capture_id = hash['captureId']
121
145
  end
122
- if hash.has_key? 'isFinal'
146
+ if hash.key? 'isFinal'
123
147
  @is_final = hash['isFinal']
124
148
  end
125
- if hash.has_key? 'lineItemDetails'
126
- raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
149
+ if hash.key? 'lineItemDetails'
150
+ raise TypeError, "value '#{hash['lineItemDetails']}' is not an Array" unless hash['lineItemDetails'].is_a? Array
127
151
  @line_item_details = []
128
152
  hash['lineItemDetails'].each do |e|
129
153
  @line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
130
154
  end
131
155
  end
132
- if hash.has_key? 'omnichannelRefundSpecificInput'
133
- raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelRefundSpecificInput']] unless hash['omnichannelRefundSpecificInput'].is_a? Hash
156
+ if hash.key? 'omnichannelRefundSpecificInput'
157
+ raise TypeError, "value '#{hash['omnichannelRefundSpecificInput']}' is not a Hash" unless hash['omnichannelRefundSpecificInput'].is_a? Hash
134
158
  @omnichannel_refund_specific_input = OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput.new_from_hash(hash['omnichannelRefundSpecificInput'])
135
159
  end
136
- if hash.has_key? 'operationReferences'
137
- raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
160
+ if hash.key? 'operationReferences'
161
+ raise TypeError, "value '#{hash['operationReferences']}' is not a Hash" unless hash['operationReferences'].is_a? Hash
138
162
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
139
163
  end
140
- if hash.has_key? 'reason'
164
+ if hash.key? 'reason'
141
165
  @reason = hash['reason']
142
166
  end
143
- if hash.has_key? 'references'
144
- raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
167
+ if hash.key? 'references'
168
+ raise TypeError, "value '#{hash['references']}' is not a Hash" unless hash['references'].is_a? Hash
145
169
  @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
146
170
  end
147
- if hash.has_key? 'refundRedirectPaymentMethodSpecificInput'
148
- raise TypeError, "value '%s' is not a Hash" % [hash['refundRedirectPaymentMethodSpecificInput']] unless hash['refundRedirectPaymentMethodSpecificInput'].is_a? Hash
171
+ if hash.key? 'refundRedirectPaymentMethodSpecificInput'
172
+ raise TypeError, "value '#{hash['refundRedirectPaymentMethodSpecificInput']}' is not a Hash" unless hash['refundRedirectPaymentMethodSpecificInput'].is_a? Hash
149
173
  @refund_redirect_payment_method_specific_input = OnlinePayments::SDK::Domain::RefundRedirectPaymentMethodSpecificInput.new_from_hash(hash['refundRedirectPaymentMethodSpecificInput'])
150
174
  end
151
175
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -22,6 +24,15 @@ module OnlinePayments
22
24
 
23
25
  attr_accessor :status_output
24
26
 
27
+ # Creates a new instance; every attribute can be given as a keyword argument.
28
+ def initialize(id: nil, refund_output: nil, status: nil, status_output: nil)
29
+ super()
30
+ @id = id
31
+ @refund_output = refund_output
32
+ @status = status
33
+ @status_output = status_output
34
+ end
35
+
25
36
  # Sets the property and returns this same instance.
26
37
  def with_id(value)
27
38
  @id = value
@@ -58,18 +69,18 @@ module OnlinePayments
58
69
 
59
70
  def from_hash(hash)
60
71
  super
61
- if hash.has_key? 'id'
72
+ if hash.key? 'id'
62
73
  @id = hash['id']
63
74
  end
64
- if hash.has_key? 'refundOutput'
65
- raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] unless hash['refundOutput'].is_a? Hash
75
+ if hash.key? 'refundOutput'
76
+ raise TypeError, "value '#{hash['refundOutput']}' is not a Hash" unless hash['refundOutput'].is_a? Hash
66
77
  @refund_output = OnlinePayments::SDK::Domain::RefundOutput.new_from_hash(hash['refundOutput'])
67
78
  end
68
- if hash.has_key? 'status'
79
+ if hash.key? 'status'
69
80
  @status = hash['status']
70
81
  end
71
- if hash.has_key? 'statusOutput'
72
- raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
82
+ if hash.key? 'statusOutput'
83
+ raise TypeError, "value '#{hash['statusOutput']}' is not a Hash" unless hash['statusOutput'].is_a? Hash
73
84
  @status_output = OnlinePayments::SDK::Domain::OrderStatusOutput.new_from_hash(hash['statusOutput'])
74
85
  end
75
86
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # This file was automatically generated.
3
5
  #
@@ -12,6 +14,12 @@ module OnlinePayments
12
14
 
13
15
  attr_accessor :refunds
14
16
 
17
+ # Creates a new instance; every attribute can be given as a keyword argument.
18
+ def initialize(refunds: nil)
19
+ super()
20
+ @refunds = refunds
21
+ end
22
+
15
23
  # Sets the property and returns this same instance.
16
24
  def with_refunds(value)
17
25
  @refunds = value
@@ -27,8 +35,8 @@ module OnlinePayments
27
35
 
28
36
  def from_hash(hash)
29
37
  super
30
- if hash.has_key? 'refunds'
31
- raise TypeError, "value '%s' is not an Array" % [hash['refunds']] unless hash['refunds'].is_a? Array
38
+ if hash.key? 'refunds'
39
+ raise TypeError, "value '#{hash['refunds']}' is not an Array" unless hash['refunds'].is_a? Array
32
40
  @refunds = []
33
41
  hash['refunds'].each do |e|
34
42
  @refunds << OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(e)