onlinepayments-sdk-ruby 4.23.0 → 5.1.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 (414) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -0
  3. data/LICENSE.txt +0 -0
  4. data/README.md +5 -6
  5. data/Rakefile +0 -0
  6. data/lib/onlinepayments/sdk/api_exception.rb +47 -35
  7. data/lib/onlinepayments/sdk/api_resource.rb +49 -97
  8. data/lib/onlinepayments/sdk/authentication/authenticator.rb +19 -0
  9. data/lib/onlinepayments/sdk/authentication/authorization_type.rb +15 -0
  10. data/lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb +109 -0
  11. data/lib/onlinepayments/sdk/authentication.rb +1 -0
  12. data/lib/onlinepayments/sdk/authorization_exception.rb +14 -8
  13. data/lib/onlinepayments/sdk/call_context.rb +30 -21
  14. data/lib/onlinepayments/sdk/client.rb +36 -18
  15. data/lib/onlinepayments/sdk/communication/communication_exception.rb +19 -0
  16. data/lib/onlinepayments/sdk/communication/connection.rb +48 -0
  17. data/lib/onlinepayments/sdk/communication/default_connection.rb +427 -0
  18. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +160 -0
  19. data/lib/onlinepayments/sdk/communication/multipart_form_data_object.rb +52 -0
  20. data/lib/onlinepayments/sdk/communication/multipart_form_data_request.rb +13 -0
  21. data/lib/onlinepayments/sdk/communication/not_found_exception.rb +19 -0
  22. data/lib/onlinepayments/sdk/communication/param_request.rb +14 -0
  23. data/lib/onlinepayments/sdk/communication/pooled_connection.rb +26 -0
  24. data/lib/onlinepayments/sdk/communication/request_header.rb +62 -0
  25. data/lib/onlinepayments/sdk/communication/request_param.rb +28 -0
  26. data/lib/onlinepayments/sdk/communication/response_exception.rb +56 -0
  27. data/lib/onlinepayments/sdk/communication/response_header.rb +78 -0
  28. data/lib/onlinepayments/sdk/communication.rb +1 -0
  29. data/lib/onlinepayments/sdk/communicator.rb +475 -268
  30. data/lib/onlinepayments/sdk/communicator_configuration.rb +162 -53
  31. data/lib/onlinepayments/sdk/declined_payment_exception.rb +28 -21
  32. data/lib/onlinepayments/sdk/declined_payout_exception.rb +28 -23
  33. data/lib/onlinepayments/sdk/declined_refund_exception.rb +28 -23
  34. data/lib/onlinepayments/sdk/declined_transaction_exception.rb +16 -10
  35. data/lib/onlinepayments/sdk/domain/account_on_file.rb +44 -35
  36. data/lib/onlinepayments/sdk/domain/account_on_file_attribute.rb +42 -28
  37. data/lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb +29 -24
  38. data/lib/onlinepayments/sdk/domain/acquirer_information.rb +27 -22
  39. data/lib/onlinepayments/sdk/domain/acquirer_selection_information.rb +34 -24
  40. data/lib/onlinepayments/sdk/domain/additional_order_input.rb +43 -38
  41. data/lib/onlinepayments/sdk/domain/address.rb +65 -43
  42. data/lib/onlinepayments/sdk/domain/address_personal.rb +78 -52
  43. data/lib/onlinepayments/sdk/domain/airline_data.rb +204 -123
  44. data/lib/onlinepayments/sdk/domain/airline_flight_leg.rb +158 -95
  45. data/lib/onlinepayments/sdk/domain/airline_passenger.rb +59 -39
  46. data/lib/onlinepayments/sdk/domain/amount_breakdown.rb +27 -20
  47. data/lib/onlinepayments/sdk/domain/amount_of_money.rb +27 -20
  48. data/lib/onlinepayments/sdk/domain/api_error.rb +73 -47
  49. data/lib/onlinepayments/sdk/domain/apple_pay_line_item.rb +72 -0
  50. data/lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb +61 -0
  51. data/lib/onlinepayments/sdk/domain/bank_account_iban.rb +20 -16
  52. data/lib/onlinepayments/sdk/domain/browser_data.rb +51 -35
  53. data/lib/onlinepayments/sdk/domain/calculate_surcharge_request.rb +27 -24
  54. data/lib/onlinepayments/sdk/domain/calculate_surcharge_response.rb +22 -20
  55. data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +27 -22
  56. data/lib/onlinepayments/sdk/domain/cancel_payment_response.rb +20 -18
  57. data/lib/onlinepayments/sdk/domain/capture.rb +41 -32
  58. data/lib/onlinepayments/sdk/domain/capture_output.rb +106 -78
  59. data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +43 -26
  60. data/lib/onlinepayments/sdk/domain/capture_response.rb +41 -32
  61. data/lib/onlinepayments/sdk/domain/capture_status_output.rb +20 -16
  62. data/lib/onlinepayments/sdk/domain/captures_response.rb +22 -20
  63. data/lib/onlinepayments/sdk/domain/card.rb +41 -28
  64. data/lib/onlinepayments/sdk/domain/card_essentials.rb +41 -28
  65. data/lib/onlinepayments/sdk/domain/card_fraud_results.rb +34 -24
  66. data/lib/onlinepayments/sdk/domain/card_info.rb +27 -20
  67. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +199 -128
  68. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +149 -104
  69. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +36 -28
  70. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +142 -100
  71. data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +41 -30
  72. data/lib/onlinepayments/sdk/domain/card_recurrence_details.rb +20 -16
  73. data/lib/onlinepayments/sdk/domain/card_source.rb +41 -30
  74. data/lib/onlinepayments/sdk/domain/card_without_cvv.rb +34 -24
  75. data/lib/onlinepayments/sdk/domain/company_information.rb +20 -16
  76. data/lib/onlinepayments/sdk/domain/complete_payment_card_payment_method_specific_input.rb +20 -18
  77. data/lib/onlinepayments/sdk/domain/complete_payment_request.rb +27 -24
  78. data/lib/onlinepayments/sdk/domain/complete_payment_response.rb +35 -31
  79. data/lib/onlinepayments/sdk/domain/contact_details.rb +51 -35
  80. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +76 -59
  81. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_response.rb +60 -43
  82. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +57 -42
  83. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb +57 -44
  84. data/lib/onlinepayments/sdk/domain/create_mandate_request.rb +71 -48
  85. data/lib/onlinepayments/sdk/domain/create_mandate_response.rb +27 -24
  86. data/lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb +71 -48
  87. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +127 -87
  88. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +82 -60
  89. data/lib/onlinepayments/sdk/domain/create_payment_response.rb +35 -31
  90. data/lib/onlinepayments/sdk/domain/create_payout_request.rb +61 -40
  91. data/lib/onlinepayments/sdk/domain/create_token_request.rb +27 -22
  92. data/lib/onlinepayments/sdk/domain/created_payment_output.rb +27 -22
  93. data/lib/onlinepayments/sdk/domain/created_token_response.rb +50 -38
  94. data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +29 -26
  95. data/lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb +27 -20
  96. data/lib/onlinepayments/sdk/domain/currency_conversion.rb +27 -22
  97. data/lib/onlinepayments/sdk/domain/currency_conversion_input.rb +27 -20
  98. data/lib/onlinepayments/sdk/domain/currency_conversion_request.rb +27 -24
  99. data/lib/onlinepayments/sdk/domain/currency_conversion_response.rb +34 -28
  100. data/lib/onlinepayments/sdk/domain/currency_conversion_result.rb +27 -20
  101. data/lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb +20 -16
  102. data/lib/onlinepayments/sdk/domain/customer.rb +87 -68
  103. data/lib/onlinepayments/sdk/domain/customer_account.rb +77 -55
  104. data/lib/onlinepayments/sdk/domain/customer_account_authentication.rb +34 -20
  105. data/lib/onlinepayments/sdk/domain/customer_bank_account.rb +34 -24
  106. data/lib/onlinepayments/sdk/domain/customer_device.rb +64 -44
  107. data/lib/onlinepayments/sdk/domain/customer_device_output.rb +20 -16
  108. data/lib/onlinepayments/sdk/domain/customer_output.rb +20 -18
  109. data/lib/onlinepayments/sdk/domain/customer_payment_activity.rb +34 -24
  110. data/lib/onlinepayments/sdk/domain/customer_token.rb +35 -31
  111. data/lib/onlinepayments/sdk/domain/data_object.rb +32 -0
  112. data/lib/onlinepayments/sdk/domain/dcc_card_source.rb +41 -30
  113. data/lib/onlinepayments/sdk/domain/dcc_proposal.rb +51 -41
  114. data/lib/onlinepayments/sdk/domain/decrypted_payment_data.rb +51 -35
  115. data/lib/onlinepayments/sdk/domain/directory_entry.rb +34 -24
  116. data/lib/onlinepayments/sdk/domain/discount.rb +20 -16
  117. data/lib/onlinepayments/sdk/domain/empty_validator.rb +7 -6
  118. data/lib/onlinepayments/sdk/domain/error_response.rb +29 -24
  119. data/lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb +86 -55
  120. data/lib/onlinepayments/sdk/domain/external_token_linked.rb +35 -24
  121. data/lib/onlinepayments/sdk/domain/feedbacks.rb +42 -0
  122. data/lib/onlinepayments/sdk/domain/fixed_list_validator.rb +22 -20
  123. data/lib/onlinepayments/sdk/domain/fraud_fields.rb +37 -28
  124. data/lib/onlinepayments/sdk/domain/fraud_results.rb +20 -16
  125. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +50 -36
  126. data/lib/onlinepayments/sdk/domain/get_hosted_checkout_response.rb +27 -22
  127. data/lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb +27 -22
  128. data/lib/onlinepayments/sdk/domain/get_iin_details_request.rb +27 -22
  129. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +52 -38
  130. data/lib/onlinepayments/sdk/domain/get_mandate_response.rb +20 -18
  131. data/lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb +22 -20
  132. data/lib/onlinepayments/sdk/domain/get_payment_products_response.rb +22 -20
  133. data/lib/onlinepayments/sdk/domain/get_privacy_policy_response.rb +20 -16
  134. data/lib/onlinepayments/sdk/domain/gift_card_purchase.rb +27 -22
  135. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +83 -56
  136. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb +27 -20
  137. data/lib/onlinepayments/sdk/domain/iin_detail.rb +34 -24
  138. data/lib/onlinepayments/sdk/domain/label_template_element.rb +27 -20
  139. data/lib/onlinepayments/sdk/domain/length_validator.rb +27 -20
  140. data/lib/onlinepayments/sdk/domain/line_item.rb +44 -31
  141. data/lib/onlinepayments/sdk/domain/line_item_invoice_data.rb +20 -16
  142. data/lib/onlinepayments/sdk/domain/loan_recipient.rb +51 -35
  143. data/lib/onlinepayments/sdk/domain/lodging_data.rb +20 -16
  144. data/lib/onlinepayments/sdk/domain/mandate_address.rb +51 -35
  145. data/lib/onlinepayments/sdk/domain/mandate_address_response.rb +51 -35
  146. data/lib/onlinepayments/sdk/domain/mandate_contact_details.rb +20 -16
  147. data/lib/onlinepayments/sdk/domain/mandate_customer.rb +52 -44
  148. data/lib/onlinepayments/sdk/domain/mandate_customer_response.rb +52 -44
  149. data/lib/onlinepayments/sdk/domain/mandate_merchant_action.rb +27 -22
  150. data/lib/onlinepayments/sdk/domain/mandate_personal_information.rb +27 -22
  151. data/lib/onlinepayments/sdk/domain/mandate_personal_information_response.rb +27 -22
  152. data/lib/onlinepayments/sdk/domain/mandate_personal_name.rb +27 -20
  153. data/lib/onlinepayments/sdk/domain/mandate_personal_name_response.rb +27 -20
  154. data/lib/onlinepayments/sdk/domain/mandate_redirect_data.rb +27 -20
  155. data/lib/onlinepayments/sdk/domain/mandate_response.rb +64 -44
  156. data/lib/onlinepayments/sdk/domain/merchant_action.rb +54 -30
  157. data/lib/onlinepayments/sdk/domain/mobile_payment_data.rb +27 -20
  158. data/lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb +43 -26
  159. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb +71 -50
  160. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +58 -45
  161. data/lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb +32 -0
  162. data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +20 -18
  163. data/lib/onlinepayments/sdk/domain/mobile_three_d_secure_challenge_parameters.rb +51 -0
  164. data/lib/onlinepayments/sdk/domain/multiple_payment_information.rb +27 -20
  165. data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +20 -16
  166. data/lib/onlinepayments/sdk/domain/operation_output.rb +67 -45
  167. data/lib/onlinepayments/sdk/domain/operation_payment_references.rb +30 -0
  168. data/lib/onlinepayments/sdk/domain/order.rb +75 -66
  169. data/lib/onlinepayments/sdk/domain/order_line_details.rb +79 -47
  170. data/lib/onlinepayments/sdk/domain/order_references.rb +34 -24
  171. data/lib/onlinepayments/sdk/domain/order_status_output.rb +52 -38
  172. data/lib/onlinepayments/sdk/domain/order_type_information.rb +27 -20
  173. data/lib/onlinepayments/sdk/domain/other_details.rb +37 -0
  174. data/lib/onlinepayments/sdk/domain/payment_account_on_file.rb +27 -20
  175. data/lib/onlinepayments/sdk/domain/payment_context.rb +34 -26
  176. data/lib/onlinepayments/sdk/domain/payment_creation_output.rb +41 -28
  177. data/lib/onlinepayments/sdk/domain/payment_details_response.rb +60 -49
  178. data/lib/onlinepayments/sdk/domain/payment_error_response.rb +37 -31
  179. data/lib/onlinepayments/sdk/domain/payment_link_event.rb +34 -24
  180. data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +34 -28
  181. data/lib/onlinepayments/sdk/domain/payment_link_order_output.rb +34 -28
  182. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +81 -51
  183. data/lib/onlinepayments/sdk/domain/payment_link_specific_input.rb +36 -24
  184. data/lib/onlinepayments/sdk/domain/payment_output.rb +115 -94
  185. data/lib/onlinepayments/sdk/domain/payment_product.rb +117 -85
  186. data/lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb +20 -18
  187. data/lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb +41 -28
  188. data/lib/onlinepayments/sdk/domain/payment_product3012.rb +27 -20
  189. data/lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb +51 -0
  190. data/lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb +22 -20
  191. data/lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb +27 -24
  192. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb +20 -16
  193. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb +20 -16
  194. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb +20 -16
  195. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb +20 -16
  196. data/lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb +29 -24
  197. data/lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb +48 -16
  198. data/lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb +20 -16
  199. data/lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb +20 -16
  200. data/lib/onlinepayments/sdk/domain/payment_product5404.rb +27 -20
  201. data/lib/onlinepayments/sdk/domain/payment_product5407.rb +27 -20
  202. data/lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb +41 -24
  203. data/lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb +20 -16
  204. data/lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb +72 -47
  205. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +43 -38
  206. data/lib/onlinepayments/sdk/domain/payment_product_display_hints.rb +34 -24
  207. data/lib/onlinepayments/sdk/domain/payment_product_field.rb +41 -32
  208. data/lib/onlinepayments/sdk/domain/payment_product_field_data_restrictions.rb +27 -22
  209. data/lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb +41 -28
  210. data/lib/onlinepayments/sdk/domain/payment_product_field_display_hints.rb +84 -56
  211. data/lib/onlinepayments/sdk/domain/payment_product_field_form_element.rb +30 -24
  212. data/lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb +28 -20
  213. data/lib/onlinepayments/sdk/domain/payment_product_field_validators.rb +83 -73
  214. data/lib/onlinepayments/sdk/domain/payment_product_filter.rb +32 -29
  215. data/lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb +22 -20
  216. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb +27 -24
  217. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb +27 -24
  218. data/lib/onlinepayments/sdk/domain/payment_product_group.rb +44 -37
  219. data/lib/onlinepayments/sdk/domain/payment_product_networks_response.rb +22 -20
  220. data/lib/onlinepayments/sdk/domain/payment_references.rb +27 -20
  221. data/lib/onlinepayments/sdk/domain/payment_response.rb +51 -41
  222. data/lib/onlinepayments/sdk/domain/payment_status_output.rb +66 -46
  223. data/lib/onlinepayments/sdk/domain/payout_error_response.rb +37 -31
  224. data/lib/onlinepayments/sdk/domain/payout_output.rb +27 -22
  225. data/lib/onlinepayments/sdk/domain/payout_response.rb +41 -32
  226. data/lib/onlinepayments/sdk/domain/payout_result.rb +41 -32
  227. data/lib/onlinepayments/sdk/domain/payout_status_output.rb +34 -24
  228. data/lib/onlinepayments/sdk/domain/personal_information.rb +34 -26
  229. data/lib/onlinepayments/sdk/domain/personal_information_token.rb +20 -18
  230. data/lib/onlinepayments/sdk/domain/personal_name.rb +34 -24
  231. data/lib/onlinepayments/sdk/domain/personal_name_token.rb +27 -20
  232. data/lib/onlinepayments/sdk/domain/product_directory.rb +22 -20
  233. data/lib/onlinepayments/sdk/domain/protection_eligibility.rb +27 -20
  234. data/lib/onlinepayments/sdk/domain/range_validator.rb +27 -20
  235. data/lib/onlinepayments/sdk/domain/rate_details.rb +51 -35
  236. data/lib/onlinepayments/sdk/domain/reattempt_instructions.rb +46 -0
  237. data/lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb +37 -0
  238. data/lib/onlinepayments/sdk/domain/redirect_data.rb +27 -20
  239. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +166 -88
  240. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +95 -75
  241. data/lib/onlinepayments/sdk/domain/redirect_payment_product3203_specific_input.rb +20 -16
  242. data/lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb +30 -0
  243. data/lib/onlinepayments/sdk/domain/redirect_payment_product3302_specific_input.rb +44 -0
  244. data/lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb +20 -16
  245. data/lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb +27 -16
  246. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +72 -0
  247. data/lib/onlinepayments/sdk/domain/redirect_payment_product5402_specific_input.rb +30 -0
  248. data/lib/onlinepayments/sdk/domain/redirect_payment_product5403_specific_input.rb +30 -0
  249. data/lib/onlinepayments/sdk/domain/redirect_payment_product5406_specific_input.rb +20 -18
  250. data/lib/onlinepayments/sdk/domain/redirect_payment_product5408_specific_input.rb +27 -22
  251. data/lib/onlinepayments/sdk/domain/redirect_payment_product5410_specific_input.rb +32 -0
  252. data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +20 -16
  253. data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +41 -20
  254. data/lib/onlinepayments/sdk/domain/redirection_data.rb +20 -16
  255. data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +34 -26
  256. data/lib/onlinepayments/sdk/domain/refund_e_wallet_method_specific_output.rb +34 -26
  257. data/lib/onlinepayments/sdk/domain/refund_error_response.rb +37 -31
  258. data/lib/onlinepayments/sdk/domain/refund_mobile_method_specific_output.rb +34 -24
  259. data/lib/onlinepayments/sdk/domain/refund_output.rb +89 -64
  260. data/lib/onlinepayments/sdk/domain/refund_payment_product840_customer_account.rb +34 -24
  261. data/lib/onlinepayments/sdk/domain/refund_payment_product840_specific_output.rb +20 -18
  262. data/lib/onlinepayments/sdk/domain/refund_redirect_method_specific_output.rb +27 -20
  263. data/lib/onlinepayments/sdk/domain/refund_request.rb +43 -24
  264. data/lib/onlinepayments/sdk/domain/refund_response.rb +41 -32
  265. data/lib/onlinepayments/sdk/domain/refunds_response.rb +22 -20
  266. data/lib/onlinepayments/sdk/domain/regular_expression_validator.rb +20 -16
  267. data/lib/onlinepayments/sdk/domain/send_test_request.rb +30 -0
  268. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb +27 -22
  269. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb +27 -22
  270. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +34 -28
  271. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb +27 -22
  272. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input_base.rb +27 -22
  273. data/lib/onlinepayments/sdk/domain/session_request.rb +22 -20
  274. data/lib/onlinepayments/sdk/domain/session_response.rb +53 -39
  275. data/lib/onlinepayments/sdk/domain/shipping.rb +76 -52
  276. data/lib/onlinepayments/sdk/domain/shipping_method.rb +41 -28
  277. data/lib/onlinepayments/sdk/domain/shopping_cart.rb +62 -48
  278. data/lib/onlinepayments/sdk/domain/shopping_cart_extension.rb +51 -43
  279. data/lib/onlinepayments/sdk/domain/show_form_data.rb +35 -31
  280. data/lib/onlinepayments/sdk/domain/show_instructions_data.rb +30 -0
  281. data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +60 -39
  282. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +20 -16
  283. data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +35 -31
  284. data/lib/onlinepayments/sdk/domain/subsequent_payment_response.rb +20 -18
  285. data/lib/onlinepayments/sdk/domain/surcharge.rb +59 -48
  286. data/lib/onlinepayments/sdk/domain/surcharge_calculation_card.rb +27 -20
  287. data/lib/onlinepayments/sdk/domain/surcharge_for_payment_link.rb +20 -16
  288. data/lib/onlinepayments/sdk/domain/surcharge_rate.rb +41 -28
  289. data/lib/onlinepayments/sdk/domain/surcharge_specific_input.rb +27 -22
  290. data/lib/onlinepayments/sdk/domain/surcharge_specific_output.rb +34 -28
  291. data/lib/onlinepayments/sdk/domain/test_connection.rb +20 -16
  292. data/lib/onlinepayments/sdk/domain/three_d_secure.rb +98 -63
  293. data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +78 -52
  294. data/lib/onlinepayments/sdk/domain/three_d_secure_data.rb +34 -24
  295. data/lib/onlinepayments/sdk/domain/three_d_secure_results.rb +107 -67
  296. data/lib/onlinepayments/sdk/domain/token_card.rb +27 -22
  297. data/lib/onlinepayments/sdk/domain/token_card_data.rb +27 -18
  298. data/lib/onlinepayments/sdk/domain/token_card_specific_input.rb +20 -18
  299. data/lib/onlinepayments/sdk/domain/token_data.rb +27 -18
  300. data/lib/onlinepayments/sdk/domain/token_e_wallet.rb +28 -22
  301. data/lib/onlinepayments/sdk/domain/token_response.rb +58 -45
  302. data/lib/onlinepayments/sdk/domain/transaction.rb +20 -18
  303. data/lib/onlinepayments/sdk/domain/uploadable_file.rb +33 -0
  304. data/lib/onlinepayments/sdk/domain/validate_credentials_request.rb +37 -0
  305. data/lib/onlinepayments/sdk/domain/validate_credentials_response.rb +30 -0
  306. data/lib/onlinepayments/sdk/domain/value_mapping_element.rb +29 -24
  307. data/lib/onlinepayments/sdk/domain.rb +4 -0
  308. data/lib/onlinepayments/sdk/exception_factory.rb +76 -0
  309. data/lib/onlinepayments/sdk/factory.rb +163 -118
  310. data/lib/onlinepayments/sdk/idempotence_exception.rb +23 -19
  311. data/lib/onlinepayments/sdk/json/default_marshaller.rb +34 -0
  312. data/lib/onlinepayments/sdk/json/marshaller.rb +27 -0
  313. data/lib/onlinepayments/sdk/json/marshaller_syntax_exception.rb +9 -0
  314. data/lib/onlinepayments/sdk/json.rb +1 -0
  315. data/lib/onlinepayments/sdk/logging/communicator_logger.rb +18 -16
  316. data/lib/onlinepayments/sdk/logging/log_message_builder.rb +80 -47
  317. data/lib/onlinepayments/sdk/logging/logging_capable.rb +1 -1
  318. data/lib/onlinepayments/sdk/logging/obfuscation/body_obfuscator.rb +113 -0
  319. data/lib/onlinepayments/sdk/logging/obfuscation/header_obfuscator.rb +54 -0
  320. data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_capable.rb +21 -0
  321. data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_rule.rb +47 -0
  322. data/lib/onlinepayments/sdk/logging/obfuscation.rb +1 -0
  323. data/lib/onlinepayments/sdk/logging/request_log_message_builder.rb +40 -29
  324. data/lib/onlinepayments/sdk/logging/response_log_message_builder.rb +30 -23
  325. data/lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb +49 -45
  326. data/lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb +20 -23
  327. data/lib/onlinepayments/sdk/logging.rb +1 -10
  328. data/lib/onlinepayments/sdk/merchant/captures/captures_client.rb +57 -0
  329. data/lib/onlinepayments/sdk/merchant/captures.rb +4 -0
  330. data/lib/onlinepayments/sdk/merchant/complete/complete_client.rb +60 -0
  331. data/lib/onlinepayments/sdk/merchant/complete.rb +4 -0
  332. data/lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +72 -71
  333. data/lib/onlinepayments/sdk/merchant/hostedcheckout.rb +4 -0
  334. data/lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +72 -71
  335. data/lib/onlinepayments/sdk/merchant/hostedtokenization.rb +4 -0
  336. data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +165 -164
  337. data/lib/onlinepayments/sdk/merchant/mandates.rb +4 -0
  338. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +116 -64
  339. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +102 -101
  340. data/lib/onlinepayments/sdk/merchant/paymentlinks.rb +4 -0
  341. data/lib/onlinepayments/sdk/merchant/payments/payments_client.rb +233 -332
  342. data/lib/onlinepayments/sdk/merchant/payments.rb +4 -0
  343. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +73 -71
  344. data/lib/onlinepayments/sdk/merchant/payouts.rb +4 -0
  345. data/lib/onlinepayments/sdk/merchant/privacypolicy/get_privacy_policy_params.rb +32 -0
  346. data/lib/onlinepayments/sdk/merchant/privacypolicy/privacy_policy_client.rb +54 -0
  347. data/lib/onlinepayments/sdk/merchant/privacypolicy.rb +4 -0
  348. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +50 -47
  349. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +50 -47
  350. data/lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb +72 -72
  351. data/lib/onlinepayments/sdk/merchant/productgroups.rb +4 -0
  352. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +27 -25
  353. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +50 -47
  354. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +50 -47
  355. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +21 -19
  356. data/lib/onlinepayments/sdk/merchant/products/products_client.rb +134 -136
  357. data/lib/onlinepayments/sdk/merchant/products.rb +4 -0
  358. data/lib/onlinepayments/sdk/merchant/refunds/refunds_client.rb +57 -0
  359. data/lib/onlinepayments/sdk/merchant/refunds.rb +4 -0
  360. data/lib/onlinepayments/sdk/merchant/services/services_client.rb +124 -155
  361. data/lib/onlinepayments/sdk/merchant/services.rb +4 -0
  362. data/lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb +42 -41
  363. data/lib/onlinepayments/sdk/merchant/sessions.rb +4 -0
  364. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +101 -100
  365. data/lib/onlinepayments/sdk/merchant/tokens.rb +4 -0
  366. data/lib/onlinepayments/sdk/merchant/webhooks/webhooks_client.rb +83 -0
  367. data/lib/onlinepayments/sdk/merchant/webhooks.rb +4 -0
  368. data/lib/onlinepayments/sdk/merchant.rb +4 -0
  369. data/lib/onlinepayments/sdk/platform_exception.rb +19 -0
  370. data/lib/onlinepayments/sdk/proxy_configuration.rb +60 -60
  371. data/lib/onlinepayments/sdk/reference_exception.rb +14 -9
  372. data/lib/onlinepayments/sdk/validation_exception.rb +14 -9
  373. data/lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb +17 -15
  374. data/lib/onlinepayments/sdk/webhooks/in_memory_secret_key_store.rb +46 -43
  375. data/lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb +16 -12
  376. data/lib/onlinepayments/sdk/webhooks/secret_key_store.rb +13 -11
  377. data/lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb +15 -14
  378. data/lib/onlinepayments/sdk/webhooks/signature_validator.rb +81 -0
  379. data/lib/onlinepayments/sdk/webhooks/webhooks_event.rb +84 -53
  380. data/lib/onlinepayments/sdk/webhooks/webhooks_helper.rb +28 -90
  381. data/lib/onlinepayments/sdk/webhooks.rb +1 -11
  382. data/lib/onlinepayments/sdk.rb +4 -26
  383. data/onlinepayments-sdk-ruby.gemspec +3 -2
  384. metadata +95 -35
  385. data/lib/onlinepayments/sdk/authenticator.rb +0 -16
  386. data/lib/onlinepayments/sdk/communication_exception.rb +0 -16
  387. data/lib/onlinepayments/sdk/connection.rb +0 -41
  388. data/lib/onlinepayments/sdk/data_object.rb +0 -31
  389. data/lib/onlinepayments/sdk/defaultimpl/authorization_type.rb +0 -24
  390. data/lib/onlinepayments/sdk/defaultimpl/default_authenticator.rb +0 -108
  391. data/lib/onlinepayments/sdk/defaultimpl/default_connection.rb +0 -365
  392. data/lib/onlinepayments/sdk/defaultimpl/default_marshaller.rb +0 -32
  393. data/lib/onlinepayments/sdk/defaultimpl.rb +0 -6
  394. data/lib/onlinepayments/sdk/endpoint_configuration.rb +0 -127
  395. data/lib/onlinepayments/sdk/exceptions.rb +0 -8
  396. data/lib/onlinepayments/sdk/logging/logging_util.rb +0 -286
  397. data/lib/onlinepayments/sdk/marshaller.rb +0 -24
  398. data/lib/onlinepayments/sdk/marshaller_syntax_exception.rb +0 -6
  399. data/lib/onlinepayments/sdk/merchant/services/get_privacy_policy_params.rb +0 -30
  400. data/lib/onlinepayments/sdk/meta_data_provider.rb +0 -150
  401. data/lib/onlinepayments/sdk/modules.rb +0 -62
  402. data/lib/onlinepayments/sdk/multipart_form_data_object.rb +0 -44
  403. data/lib/onlinepayments/sdk/multipart_form_data_request.rb +0 -9
  404. data/lib/onlinepayments/sdk/not_found_exception.rb +0 -16
  405. data/lib/onlinepayments/sdk/param_request.rb +0 -11
  406. data/lib/onlinepayments/sdk/payment_platform_exception.rb +0 -15
  407. data/lib/onlinepayments/sdk/pooled_connection.rb +0 -21
  408. data/lib/onlinepayments/sdk/request_header.rb +0 -50
  409. data/lib/onlinepayments/sdk/request_param.rb +0 -23
  410. data/lib/onlinepayments/sdk/response_exception.rb +0 -47
  411. data/lib/onlinepayments/sdk/response_header.rb +0 -42
  412. data/lib/onlinepayments/sdk/uploadable_file.rb +0 -30
  413. data/lib/onlinepayments/sdk/webhooks/webhooks.rb +0 -22
  414. data/lib/onlinepayments/sdk/webhooks/webhooks_helper_builder.rb +0 -25
@@ -1,80 +1,105 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
5
4
  require 'onlinepayments/sdk/domain/amount_of_money'
5
+ require 'onlinepayments/sdk/domain/data_object'
6
+ require 'onlinepayments/sdk/domain/operation_payment_references'
6
7
  require 'onlinepayments/sdk/domain/payment_references'
7
8
  require 'onlinepayments/sdk/domain/refund_card_method_specific_output'
8
9
  require 'onlinepayments/sdk/domain/refund_e_wallet_method_specific_output'
9
10
  require 'onlinepayments/sdk/domain/refund_mobile_method_specific_output'
10
11
  require 'onlinepayments/sdk/domain/refund_redirect_method_specific_output'
11
12
 
12
- module OnlinePayments::SDK
13
- module Domain
13
+ module OnlinePayments
14
+ module SDK
15
+ module Domain
16
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
17
+ # @attr [Integer] amount_paid
18
+ # @attr [OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput] card_refund_method_specific_output
19
+ # @attr [OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput] e_wallet_refund_method_specific_output
20
+ # @attr [String] merchant_parameters
21
+ # @attr [OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput] mobile_refund_method_specific_output
22
+ # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
23
+ # @attr [String] payment_method
24
+ # @attr [OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput] redirect_refund_method_specific_output
25
+ # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
26
+ class RefundOutput < OnlinePayments::SDK::Domain::DataObject
14
27
 
15
- # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
16
- # @attr [Long] amount_paid
17
- # @attr [OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput] card_refund_method_specific_output
18
- # @attr [OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput] e_wallet_refund_method_specific_output
19
- # @attr [String] merchant_parameters
20
- # @attr [OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput] mobile_refund_method_specific_output
21
- # @attr [String] payment_method
22
- # @attr [OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput] redirect_refund_method_specific_output
23
- # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
24
- class RefundOutput < OnlinePayments::SDK::DataObject
25
- attr_accessor :amount_of_money
26
- attr_accessor :amount_paid
27
- attr_accessor :card_refund_method_specific_output
28
- attr_accessor :e_wallet_refund_method_specific_output
29
- attr_accessor :merchant_parameters
30
- attr_accessor :mobile_refund_method_specific_output
31
- attr_accessor :payment_method
32
- attr_accessor :redirect_refund_method_specific_output
33
- attr_accessor :references
28
+ attr_accessor :amount_of_money
34
29
 
35
- # @return (Hash)
36
- def to_h
37
- hash = super
38
- hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
39
- hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
40
- hash['cardRefundMethodSpecificOutput'] = @card_refund_method_specific_output.to_h if @card_refund_method_specific_output
41
- hash['eWalletRefundMethodSpecificOutput'] = @e_wallet_refund_method_specific_output.to_h if @e_wallet_refund_method_specific_output
42
- hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
43
- hash['mobileRefundMethodSpecificOutput'] = @mobile_refund_method_specific_output.to_h if @mobile_refund_method_specific_output
44
- hash['paymentMethod'] = @payment_method unless @payment_method.nil?
45
- hash['redirectRefundMethodSpecificOutput'] = @redirect_refund_method_specific_output.to_h if @redirect_refund_method_specific_output
46
- hash['references'] = @references.to_h if @references
47
- hash
48
- end
30
+ attr_accessor :amount_paid
49
31
 
50
- def from_hash(hash)
51
- super
52
- if hash.key? 'amountOfMoney'
53
- raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
54
- @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
55
- end
56
- @amount_paid = hash['amountPaid'] if hash.key? 'amountPaid'
57
- if hash.key? 'cardRefundMethodSpecificOutput'
58
- raise TypeError, "value '%s' is not a Hash" % [hash['cardRefundMethodSpecificOutput']] unless hash['cardRefundMethodSpecificOutput'].is_a? Hash
59
- @card_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput.new_from_hash(hash['cardRefundMethodSpecificOutput'])
60
- end
61
- if hash.key? 'eWalletRefundMethodSpecificOutput'
62
- raise TypeError, "value '%s' is not a Hash" % [hash['eWalletRefundMethodSpecificOutput']] unless hash['eWalletRefundMethodSpecificOutput'].is_a? Hash
63
- @e_wallet_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput'])
64
- end
65
- @merchant_parameters = hash['merchantParameters'] if hash.key? 'merchantParameters'
66
- if hash.key? 'mobileRefundMethodSpecificOutput'
67
- raise TypeError, "value '%s' is not a Hash" % [hash['mobileRefundMethodSpecificOutput']] unless hash['mobileRefundMethodSpecificOutput'].is_a? Hash
68
- @mobile_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput'])
69
- end
70
- @payment_method = hash['paymentMethod'] if hash.key? 'paymentMethod'
71
- if hash.key? 'redirectRefundMethodSpecificOutput'
72
- raise TypeError, "value '%s' is not a Hash" % [hash['redirectRefundMethodSpecificOutput']] unless hash['redirectRefundMethodSpecificOutput'].is_a? Hash
73
- @redirect_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput.new_from_hash(hash['redirectRefundMethodSpecificOutput'])
32
+ attr_accessor :card_refund_method_specific_output
33
+
34
+ attr_accessor :e_wallet_refund_method_specific_output
35
+
36
+ attr_accessor :merchant_parameters
37
+
38
+ attr_accessor :mobile_refund_method_specific_output
39
+
40
+ attr_accessor :operation_references
41
+
42
+ attr_accessor :payment_method
43
+
44
+ attr_accessor :redirect_refund_method_specific_output
45
+
46
+ attr_accessor :references
47
+
48
+ # @return (Hash)
49
+ def to_h
50
+ hash = super
51
+ hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
52
+ hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
53
+ hash['cardRefundMethodSpecificOutput'] = @card_refund_method_specific_output.to_h unless @card_refund_method_specific_output.nil?
54
+ hash['eWalletRefundMethodSpecificOutput'] = @e_wallet_refund_method_specific_output.to_h unless @e_wallet_refund_method_specific_output.nil?
55
+ hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
56
+ hash['mobileRefundMethodSpecificOutput'] = @mobile_refund_method_specific_output.to_h unless @mobile_refund_method_specific_output.nil?
57
+ hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
58
+ hash['paymentMethod'] = @payment_method unless @payment_method.nil?
59
+ hash['redirectRefundMethodSpecificOutput'] = @redirect_refund_method_specific_output.to_h unless @redirect_refund_method_specific_output.nil?
60
+ hash['references'] = @references.to_h unless @references.nil?
61
+ hash
74
62
  end
75
- if hash.key? 'references'
76
- raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
77
- @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
63
+
64
+ def from_hash(hash)
65
+ super
66
+ if hash.has_key? 'amountOfMoney'
67
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
68
+ @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
69
+ end
70
+ if hash.has_key? 'amountPaid'
71
+ @amount_paid = hash['amountPaid']
72
+ end
73
+ if hash.has_key? 'cardRefundMethodSpecificOutput'
74
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardRefundMethodSpecificOutput']] unless hash['cardRefundMethodSpecificOutput'].is_a? Hash
75
+ @card_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput.new_from_hash(hash['cardRefundMethodSpecificOutput'])
76
+ end
77
+ if hash.has_key? 'eWalletRefundMethodSpecificOutput'
78
+ raise TypeError, "value '%s' is not a Hash" % [hash['eWalletRefundMethodSpecificOutput']] unless hash['eWalletRefundMethodSpecificOutput'].is_a? Hash
79
+ @e_wallet_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput'])
80
+ end
81
+ if hash.has_key? 'merchantParameters'
82
+ @merchant_parameters = hash['merchantParameters']
83
+ end
84
+ if hash.has_key? 'mobileRefundMethodSpecificOutput'
85
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobileRefundMethodSpecificOutput']] unless hash['mobileRefundMethodSpecificOutput'].is_a? Hash
86
+ @mobile_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput'])
87
+ end
88
+ if hash.has_key? 'operationReferences'
89
+ raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
90
+ @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
91
+ end
92
+ if hash.has_key? 'paymentMethod'
93
+ @payment_method = hash['paymentMethod']
94
+ end
95
+ if hash.has_key? 'redirectRefundMethodSpecificOutput'
96
+ raise TypeError, "value '%s' is not a Hash" % [hash['redirectRefundMethodSpecificOutput']] unless hash['redirectRefundMethodSpecificOutput'].is_a? Hash
97
+ @redirect_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput.new_from_hash(hash['redirectRefundMethodSpecificOutput'])
98
+ end
99
+ if hash.has_key? 'references'
100
+ raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
101
+ @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
102
+ end
78
103
  end
79
104
  end
80
105
  end
@@ -1,33 +1,43 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
 
6
- module OnlinePayments::SDK
7
- module Domain
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] customer_account_status
10
+ # @attr [String] customer_address_status
11
+ # @attr [String] payer_id
12
+ class RefundPaymentProduct840CustomerAccount < OnlinePayments::SDK::Domain::DataObject
8
13
 
9
- # @attr [String] customer_account_status
10
- # @attr [String] customer_address_status
11
- # @attr [String] payer_id
12
- class RefundPaymentProduct840CustomerAccount < OnlinePayments::SDK::DataObject
13
- attr_accessor :customer_account_status
14
- attr_accessor :customer_address_status
15
- attr_accessor :payer_id
14
+ attr_accessor :customer_account_status
16
15
 
17
- # @return (Hash)
18
- def to_h
19
- hash = super
20
- hash['customerAccountStatus'] = @customer_account_status unless @customer_account_status.nil?
21
- hash['customerAddressStatus'] = @customer_address_status unless @customer_address_status.nil?
22
- hash['payerId'] = @payer_id unless @payer_id.nil?
23
- hash
24
- end
16
+ attr_accessor :customer_address_status
17
+
18
+ attr_accessor :payer_id
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['customerAccountStatus'] = @customer_account_status unless @customer_account_status.nil?
24
+ hash['customerAddressStatus'] = @customer_address_status unless @customer_address_status.nil?
25
+ hash['payerId'] = @payer_id unless @payer_id.nil?
26
+ hash
27
+ end
25
28
 
26
- def from_hash(hash)
27
- super
28
- @customer_account_status = hash['customerAccountStatus'] if hash.key? 'customerAccountStatus'
29
- @customer_address_status = hash['customerAddressStatus'] if hash.key? 'customerAddressStatus'
30
- @payer_id = hash['payerId'] if hash.key? 'payerId'
29
+ def from_hash(hash)
30
+ super
31
+ if hash.has_key? 'customerAccountStatus'
32
+ @customer_account_status = hash['customerAccountStatus']
33
+ end
34
+ if hash.has_key? 'customerAddressStatus'
35
+ @customer_address_status = hash['customerAddressStatus']
36
+ end
37
+ if hash.has_key? 'payerId'
38
+ @payer_id = hash['payerId']
39
+ end
40
+ end
31
41
  end
32
42
  end
33
43
  end
@@ -1,28 +1,30 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/refund_payment_product840_customer_account'
6
6
 
7
- module OnlinePayments::SDK
8
- module Domain
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount] customer_account
11
+ class RefundPaymentProduct840SpecificOutput < OnlinePayments::SDK::Domain::DataObject
9
12
 
10
- # @attr [OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount] customer_account
11
- class RefundPaymentProduct840SpecificOutput < OnlinePayments::SDK::DataObject
12
- attr_accessor :customer_account
13
+ attr_accessor :customer_account
13
14
 
14
- # @return (Hash)
15
- def to_h
16
- hash = super
17
- hash['customerAccount'] = @customer_account.to_h if @customer_account
18
- hash
19
- end
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil?
19
+ hash
20
+ end
20
21
 
21
- def from_hash(hash)
22
- super
23
- if hash.key? 'customerAccount'
24
- raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
25
- @customer_account = OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount'])
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key? 'customerAccount'
25
+ raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
26
+ @customer_account = OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount'])
27
+ end
26
28
  end
27
29
  end
28
30
  end
@@ -1,29 +1,36 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
 
6
- module OnlinePayments::SDK
7
- module Domain
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [Integer] total_amount_paid
10
+ # @attr [Integer] total_amount_refunded
11
+ class RefundRedirectMethodSpecificOutput < OnlinePayments::SDK::Domain::DataObject
8
12
 
9
- # @attr [Long] total_amount_paid
10
- # @attr [Long] total_amount_refunded
11
- class RefundRedirectMethodSpecificOutput < OnlinePayments::SDK::DataObject
12
- attr_accessor :total_amount_paid
13
- attr_accessor :total_amount_refunded
13
+ attr_accessor :total_amount_paid
14
14
 
15
- # @return (Hash)
16
- def to_h
17
- hash = super
18
- hash['totalAmountPaid'] = @total_amount_paid unless @total_amount_paid.nil?
19
- hash['totalAmountRefunded'] = @total_amount_refunded unless @total_amount_refunded.nil?
20
- hash
21
- end
15
+ attr_accessor :total_amount_refunded
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['totalAmountPaid'] = @total_amount_paid unless @total_amount_paid.nil?
21
+ hash['totalAmountRefunded'] = @total_amount_refunded unless @total_amount_refunded.nil?
22
+ hash
23
+ end
22
24
 
23
- def from_hash(hash)
24
- super
25
- @total_amount_paid = hash['totalAmountPaid'] if hash.key? 'totalAmountPaid'
26
- @total_amount_refunded = hash['totalAmountRefunded'] if hash.key? 'totalAmountRefunded'
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'totalAmountPaid'
28
+ @total_amount_paid = hash['totalAmountPaid']
29
+ end
30
+ if hash.has_key? 'totalAmountRefunded'
31
+ @total_amount_refunded = hash['totalAmountRefunded']
32
+ end
33
+ end
27
34
  end
28
35
  end
29
36
  end
@@ -1,36 +1,55 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
5
4
  require 'onlinepayments/sdk/domain/amount_of_money'
5
+ require 'onlinepayments/sdk/domain/data_object'
6
+ require 'onlinepayments/sdk/domain/operation_payment_references'
6
7
  require 'onlinepayments/sdk/domain/payment_references'
7
8
 
8
- module OnlinePayments::SDK
9
- module Domain
9
+ module OnlinePayments
10
+ module SDK
11
+ module Domain
12
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
13
+ # @attr [String] capture_id
14
+ # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
15
+ # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
16
+ class RefundRequest < OnlinePayments::SDK::Domain::DataObject
10
17
 
11
- # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
12
- # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
13
- class RefundRequest < OnlinePayments::SDK::DataObject
14
- attr_accessor :amount_of_money
15
- attr_accessor :references
18
+ attr_accessor :amount_of_money
16
19
 
17
- # @return (Hash)
18
- def to_h
19
- hash = super
20
- hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
21
- hash['references'] = @references.to_h if @references
22
- hash
23
- end
20
+ attr_accessor :capture_id
21
+
22
+ attr_accessor :operation_references
24
23
 
25
- def from_hash(hash)
26
- super
27
- if hash.key? 'amountOfMoney'
28
- raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
29
- @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
24
+ attr_accessor :references
25
+
26
+ # @return (Hash)
27
+ def to_h
28
+ hash = super
29
+ hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
30
+ hash['captureId'] = @capture_id unless @capture_id.nil?
31
+ hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
32
+ hash['references'] = @references.to_h unless @references.nil?
33
+ hash
30
34
  end
31
- if hash.key? 'references'
32
- raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
33
- @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
35
+
36
+ def from_hash(hash)
37
+ super
38
+ if hash.has_key? 'amountOfMoney'
39
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
40
+ @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
41
+ end
42
+ if hash.has_key? 'captureId'
43
+ @capture_id = hash['captureId']
44
+ end
45
+ if hash.has_key? 'operationReferences'
46
+ raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
47
+ @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
48
+ end
49
+ if hash.has_key? 'references'
50
+ raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
51
+ @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
52
+ end
34
53
  end
35
54
  end
36
55
  end
@@ -1,44 +1,53 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/order_status_output'
6
6
  require 'onlinepayments/sdk/domain/refund_output'
7
7
 
8
- module OnlinePayments::SDK
9
- module Domain
8
+ module OnlinePayments
9
+ module SDK
10
+ module Domain
11
+ # @attr [String] id
12
+ # @attr [OnlinePayments::SDK::Domain::RefundOutput] refund_output
13
+ # @attr [String] status
14
+ # @attr [OnlinePayments::SDK::Domain::OrderStatusOutput] status_output
15
+ class RefundResponse < OnlinePayments::SDK::Domain::DataObject
10
16
 
11
- # @attr [String] id
12
- # @attr [OnlinePayments::SDK::Domain::RefundOutput] refund_output
13
- # @attr [String] status
14
- # @attr [OnlinePayments::SDK::Domain::OrderStatusOutput] status_output
15
- class RefundResponse < OnlinePayments::SDK::DataObject
16
- attr_accessor :id
17
- attr_accessor :refund_output
18
- attr_accessor :status
19
- attr_accessor :status_output
17
+ attr_accessor :id
20
18
 
21
- # @return (Hash)
22
- def to_h
23
- hash = super
24
- hash['id'] = @id unless @id.nil?
25
- hash['refundOutput'] = @refund_output.to_h if @refund_output
26
- hash['status'] = @status unless @status.nil?
27
- hash['statusOutput'] = @status_output.to_h if @status_output
28
- hash
29
- end
19
+ attr_accessor :refund_output
20
+
21
+ attr_accessor :status
30
22
 
31
- def from_hash(hash)
32
- super
33
- @id = hash['id'] if hash.key? 'id'
34
- if hash.key? 'refundOutput'
35
- raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] unless hash['refundOutput'].is_a? Hash
36
- @refund_output = OnlinePayments::SDK::Domain::RefundOutput.new_from_hash(hash['refundOutput'])
23
+ attr_accessor :status_output
24
+
25
+ # @return (Hash)
26
+ def to_h
27
+ hash = super
28
+ hash['id'] = @id unless @id.nil?
29
+ hash['refundOutput'] = @refund_output.to_h unless @refund_output.nil?
30
+ hash['status'] = @status unless @status.nil?
31
+ hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
32
+ hash
37
33
  end
38
- @status = hash['status'] if hash.key? 'status'
39
- if hash.key? 'statusOutput'
40
- raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
41
- @status_output = OnlinePayments::SDK::Domain::OrderStatusOutput.new_from_hash(hash['statusOutput'])
34
+
35
+ def from_hash(hash)
36
+ super
37
+ if hash.has_key? 'id'
38
+ @id = hash['id']
39
+ end
40
+ if hash.has_key? 'refundOutput'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] unless hash['refundOutput'].is_a? Hash
42
+ @refund_output = OnlinePayments::SDK::Domain::RefundOutput.new_from_hash(hash['refundOutput'])
43
+ end
44
+ if hash.has_key? 'status'
45
+ @status = hash['status']
46
+ end
47
+ if hash.has_key? 'statusOutput'
48
+ raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
49
+ @status_output = OnlinePayments::SDK::Domain::OrderStatusOutput.new_from_hash(hash['statusOutput'])
50
+ end
42
51
  end
43
52
  end
44
53
  end
@@ -1,30 +1,32 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/refund_response'
6
6
 
7
- module OnlinePayments::SDK
8
- module Domain
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [Array<OnlinePayments::SDK::Domain::RefundResponse>] refunds
11
+ class RefundsResponse < OnlinePayments::SDK::Domain::DataObject
9
12
 
10
- # @attr [Array<OnlinePayments::SDK::Domain::RefundResponse>] refunds
11
- class RefundsResponse < OnlinePayments::SDK::DataObject
12
- attr_accessor :refunds
13
+ attr_accessor :refunds
13
14
 
14
- # @return (Hash)
15
- def to_h
16
- hash = super
17
- hash['refunds'] = @refunds.collect(&:to_h) if @refunds
18
- hash
19
- end
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['refunds'] = @refunds.collect{|val| val.to_h} unless @refunds.nil?
19
+ hash
20
+ end
20
21
 
21
- def from_hash(hash)
22
- super
23
- if hash.key? 'refunds'
24
- raise TypeError, "value '%s' is not an Array" % [hash['refunds']] unless hash['refunds'].is_a? Array
25
- @refunds = []
26
- hash['refunds'].each do |e|
27
- @refunds << OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(e)
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key? 'refunds'
25
+ raise TypeError, "value '%s' is not an Array" % [hash['refunds']] unless hash['refunds'].is_a? Array
26
+ @refunds = []
27
+ hash['refunds'].each do |e|
28
+ @refunds << OnlinePayments::SDK::Domain::RefundResponse.new_from_hash(e)
29
+ end
28
30
  end
29
31
  end
30
32
  end
@@ -1,25 +1,29 @@
1
1
  #
2
- # This class was auto-generated.
2
+ # This file was automatically generated.
3
3
  #
4
- require 'onlinepayments/sdk/data_object'
4
+ require 'onlinepayments/sdk/domain/data_object'
5
5
 
6
- module OnlinePayments::SDK
7
- module Domain
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] regular_expression
10
+ class RegularExpressionValidator < OnlinePayments::SDK::Domain::DataObject
8
11
 
9
- # @attr [String] regular_expression
10
- class RegularExpressionValidator < OnlinePayments::SDK::DataObject
11
- attr_accessor :regular_expression
12
+ attr_accessor :regular_expression
12
13
 
13
- # @return (Hash)
14
- def to_h
15
- hash = super
16
- hash['regularExpression'] = @regular_expression unless @regular_expression.nil?
17
- hash
18
- end
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['regularExpression'] = @regular_expression unless @regular_expression.nil?
18
+ hash
19
+ end
19
20
 
20
- def from_hash(hash)
21
- super
22
- @regular_expression = hash['regularExpression'] if hash.key? 'regularExpression'
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'regularExpression'
24
+ @regular_expression = hash['regularExpression']
25
+ end
26
+ end
23
27
  end
24
28
  end
25
29
  end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] url
10
+ class SendTestRequest < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :url
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['url'] = @url unless @url.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'url'
24
+ @url = hash['url']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end