onlinepayments-sdk-ruby 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +140 -0
  5. data/Rakefile +34 -0
  6. data/lib/onlinepayments/sdk/api_exception.rb +42 -0
  7. data/lib/onlinepayments/sdk/api_resource.rb +115 -0
  8. data/lib/onlinepayments/sdk/authenticator.rb +16 -0
  9. data/lib/onlinepayments/sdk/authorization_exception.rb +13 -0
  10. data/lib/onlinepayments/sdk/call_context.rb +26 -0
  11. data/lib/onlinepayments/sdk/client.rb +82 -0
  12. data/lib/onlinepayments/sdk/communication_exception.rb +16 -0
  13. data/lib/onlinepayments/sdk/communicator.rb +300 -0
  14. data/lib/onlinepayments/sdk/communicator_configuration.rb +59 -0
  15. data/lib/onlinepayments/sdk/connection.rb +41 -0
  16. data/lib/onlinepayments/sdk/data_object.rb +31 -0
  17. data/lib/onlinepayments/sdk/declined_payment_exception.rb +30 -0
  18. data/lib/onlinepayments/sdk/declined_payout_exception.rb +32 -0
  19. data/lib/onlinepayments/sdk/declined_refund_exception.rb +32 -0
  20. data/lib/onlinepayments/sdk/declined_transaction_exception.rb +16 -0
  21. data/lib/onlinepayments/sdk/defaultimpl/authorization_type.rb +24 -0
  22. data/lib/onlinepayments/sdk/defaultimpl/default_authenticator.rb +108 -0
  23. data/lib/onlinepayments/sdk/defaultimpl/default_connection.rb +295 -0
  24. data/lib/onlinepayments/sdk/defaultimpl/default_marshaller.rb +32 -0
  25. data/lib/onlinepayments/sdk/defaultimpl.rb +6 -0
  26. data/lib/onlinepayments/sdk/domain/account_on_file.rb +49 -0
  27. data/lib/onlinepayments/sdk/domain/account_on_file_attribute.rb +38 -0
  28. data/lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb +37 -0
  29. data/lib/onlinepayments/sdk/domain/additional_order_input.rb +54 -0
  30. data/lib/onlinepayments/sdk/domain/address.rb +50 -0
  31. data/lib/onlinepayments/sdk/domain/address_personal.rb +58 -0
  32. data/lib/onlinepayments/sdk/domain/airline_data.rb +128 -0
  33. data/lib/onlinepayments/sdk/domain/airline_flight_leg.rb +102 -0
  34. data/lib/onlinepayments/sdk/domain/airline_passenger.rb +38 -0
  35. data/lib/onlinepayments/sdk/domain/amount_breakdown.rb +30 -0
  36. data/lib/onlinepayments/sdk/domain/amount_of_money.rb +30 -0
  37. data/lib/onlinepayments/sdk/domain/api_error.rb +46 -0
  38. data/lib/onlinepayments/sdk/domain/bank_account_iban.rb +26 -0
  39. data/lib/onlinepayments/sdk/domain/browser_data.rb +42 -0
  40. data/lib/onlinepayments/sdk/domain/cancel_payment_response.rb +30 -0
  41. data/lib/onlinepayments/sdk/domain/capture.rb +46 -0
  42. data/lib/onlinepayments/sdk/domain/capture_output.rb +82 -0
  43. data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +38 -0
  44. data/lib/onlinepayments/sdk/domain/capture_response.rb +46 -0
  45. data/lib/onlinepayments/sdk/domain/capture_status_output.rb +26 -0
  46. data/lib/onlinepayments/sdk/domain/captures_response.rb +33 -0
  47. data/lib/onlinepayments/sdk/domain/card.rb +38 -0
  48. data/lib/onlinepayments/sdk/domain/card_essentials.rb +34 -0
  49. data/lib/onlinepayments/sdk/domain/card_fraud_results.rb +34 -0
  50. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +98 -0
  51. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +86 -0
  52. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +26 -0
  53. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +78 -0
  54. data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +38 -0
  55. data/lib/onlinepayments/sdk/domain/card_recurrence_details.rb +26 -0
  56. data/lib/onlinepayments/sdk/domain/card_without_cvv.rb +34 -0
  57. data/lib/onlinepayments/sdk/domain/company_information.rb +26 -0
  58. data/lib/onlinepayments/sdk/domain/complete_payment_card_payment_method_specific_input.rb +30 -0
  59. data/lib/onlinepayments/sdk/domain/complete_payment_request.rb +38 -0
  60. data/lib/onlinepayments/sdk/domain/complete_payment_response.rb +46 -0
  61. data/lib/onlinepayments/sdk/domain/contact_details.rb +42 -0
  62. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +78 -0
  63. data/lib/onlinepayments/sdk/domain/create_hosted_checkout_response.rb +48 -0
  64. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +38 -0
  65. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb +50 -0
  66. data/lib/onlinepayments/sdk/domain/create_mandate_request.rb +58 -0
  67. data/lib/onlinepayments/sdk/domain/create_mandate_response.rb +38 -0
  68. data/lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb +58 -0
  69. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +74 -0
  70. data/lib/onlinepayments/sdk/domain/create_payment_response.rb +46 -0
  71. data/lib/onlinepayments/sdk/domain/create_payout_request.rb +46 -0
  72. data/lib/onlinepayments/sdk/domain/create_token_request.rb +34 -0
  73. data/lib/onlinepayments/sdk/domain/created_payment_output.rb +34 -0
  74. data/lib/onlinepayments/sdk/domain/created_token_response.rb +50 -0
  75. data/lib/onlinepayments/sdk/domain/customer.rb +86 -0
  76. data/lib/onlinepayments/sdk/domain/customer_account.rb +70 -0
  77. data/lib/onlinepayments/sdk/domain/customer_account_authentication.rb +30 -0
  78. data/lib/onlinepayments/sdk/domain/customer_device.rb +50 -0
  79. data/lib/onlinepayments/sdk/domain/customer_payment_activity.rb +34 -0
  80. data/lib/onlinepayments/sdk/domain/customer_token.rb +46 -0
  81. data/lib/onlinepayments/sdk/domain/decrypted_payment_data.rb +42 -0
  82. data/lib/onlinepayments/sdk/domain/directory_entry.rb +34 -0
  83. data/lib/onlinepayments/sdk/domain/empty_validator.rb +12 -0
  84. data/lib/onlinepayments/sdk/domain/error_response.rb +37 -0
  85. data/lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb +58 -0
  86. data/lib/onlinepayments/sdk/domain/external_token_linked.rb +34 -0
  87. data/lib/onlinepayments/sdk/domain/fixed_list_validator.rb +32 -0
  88. data/lib/onlinepayments/sdk/domain/fraud_fields.rb +30 -0
  89. data/lib/onlinepayments/sdk/domain/fraud_results.rb +26 -0
  90. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +46 -0
  91. data/lib/onlinepayments/sdk/domain/get_hosted_checkout_response.rb +34 -0
  92. data/lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb +34 -0
  93. data/lib/onlinepayments/sdk/domain/get_iin_details_request.rb +34 -0
  94. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +45 -0
  95. data/lib/onlinepayments/sdk/domain/get_mandate_response.rb +30 -0
  96. data/lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb +33 -0
  97. data/lib/onlinepayments/sdk/domain/get_payment_products_response.rb +33 -0
  98. data/lib/onlinepayments/sdk/domain/gift_card_purchase.rb +34 -0
  99. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +66 -0
  100. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb +30 -0
  101. data/lib/onlinepayments/sdk/domain/iin_detail.rb +30 -0
  102. data/lib/onlinepayments/sdk/domain/label_template_element.rb +30 -0
  103. data/lib/onlinepayments/sdk/domain/length_validator.rb +30 -0
  104. data/lib/onlinepayments/sdk/domain/line_item.rb +46 -0
  105. data/lib/onlinepayments/sdk/domain/line_item_invoice_data.rb +26 -0
  106. data/lib/onlinepayments/sdk/domain/loan_recipient.rb +42 -0
  107. data/lib/onlinepayments/sdk/domain/lodging_data.rb +26 -0
  108. data/lib/onlinepayments/sdk/domain/mandate_address.rb +42 -0
  109. data/lib/onlinepayments/sdk/domain/mandate_contact_details.rb +26 -0
  110. data/lib/onlinepayments/sdk/domain/mandate_customer.rb +58 -0
  111. data/lib/onlinepayments/sdk/domain/mandate_merchant_action.rb +34 -0
  112. data/lib/onlinepayments/sdk/domain/mandate_personal_information.rb +34 -0
  113. data/lib/onlinepayments/sdk/domain/mandate_personal_name.rb +30 -0
  114. data/lib/onlinepayments/sdk/domain/mandate_redirect_data.rb +30 -0
  115. data/lib/onlinepayments/sdk/domain/mandate_response.rb +50 -0
  116. data/lib/onlinepayments/sdk/domain/merchant_action.rb +34 -0
  117. data/lib/onlinepayments/sdk/domain/mobile_payment_data.rb +30 -0
  118. data/lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb +30 -0
  119. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb +62 -0
  120. data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +58 -0
  121. data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +30 -0
  122. data/lib/onlinepayments/sdk/domain/operation_output.rb +58 -0
  123. data/lib/onlinepayments/sdk/domain/order.rb +70 -0
  124. data/lib/onlinepayments/sdk/domain/order_line_details.rb +54 -0
  125. data/lib/onlinepayments/sdk/domain/order_references.rb +34 -0
  126. data/lib/onlinepayments/sdk/domain/order_status_output.rb +49 -0
  127. data/lib/onlinepayments/sdk/domain/order_type_information.rb +30 -0
  128. data/lib/onlinepayments/sdk/domain/payment_account_on_file.rb +30 -0
  129. data/lib/onlinepayments/sdk/domain/payment_context.rb +38 -0
  130. data/lib/onlinepayments/sdk/domain/payment_creation_output.rb +38 -0
  131. data/lib/onlinepayments/sdk/domain/payment_details_response.rb +65 -0
  132. data/lib/onlinepayments/sdk/domain/payment_error_response.rb +45 -0
  133. data/lib/onlinepayments/sdk/domain/payment_output.rb +82 -0
  134. data/lib/onlinepayments/sdk/domain/payment_product.rb +102 -0
  135. data/lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb +30 -0
  136. data/lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb +38 -0
  137. data/lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb +32 -0
  138. data/lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb +36 -0
  139. data/lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb +26 -0
  140. data/lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb +26 -0
  141. data/lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb +34 -0
  142. data/lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb +26 -0
  143. data/lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb +54 -0
  144. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +53 -0
  145. data/lib/onlinepayments/sdk/domain/payment_product_display_hints.rb +34 -0
  146. data/lib/onlinepayments/sdk/domain/payment_product_field.rb +46 -0
  147. data/lib/onlinepayments/sdk/domain/payment_product_field_data_restrictions.rb +34 -0
  148. data/lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb +38 -0
  149. data/lib/onlinepayments/sdk/domain/payment_product_field_display_hints.rb +70 -0
  150. data/lib/onlinepayments/sdk/domain/payment_product_field_form_element.rb +37 -0
  151. data/lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb +30 -0
  152. data/lib/onlinepayments/sdk/domain/payment_product_field_validators.rb +90 -0
  153. data/lib/onlinepayments/sdk/domain/payment_product_filter.rb +42 -0
  154. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb +37 -0
  155. data/lib/onlinepayments/sdk/domain/payment_product_group.rb +52 -0
  156. data/lib/onlinepayments/sdk/domain/payment_product_networks_response.rb +32 -0
  157. data/lib/onlinepayments/sdk/domain/payment_references.rb +30 -0
  158. data/lib/onlinepayments/sdk/domain/payment_response.rb +54 -0
  159. data/lib/onlinepayments/sdk/domain/payment_status_output.rb +57 -0
  160. data/lib/onlinepayments/sdk/domain/payout_error_response.rb +45 -0
  161. data/lib/onlinepayments/sdk/domain/payout_output.rb +30 -0
  162. data/lib/onlinepayments/sdk/domain/payout_response.rb +46 -0
  163. data/lib/onlinepayments/sdk/domain/payout_result.rb +46 -0
  164. data/lib/onlinepayments/sdk/domain/payout_status_output.rb +34 -0
  165. data/lib/onlinepayments/sdk/domain/personal_information.rb +38 -0
  166. data/lib/onlinepayments/sdk/domain/personal_information_token.rb +30 -0
  167. data/lib/onlinepayments/sdk/domain/personal_name.rb +34 -0
  168. data/lib/onlinepayments/sdk/domain/personal_name_token.rb +30 -0
  169. data/lib/onlinepayments/sdk/domain/product_directory.rb +33 -0
  170. data/lib/onlinepayments/sdk/domain/protection_eligibility.rb +30 -0
  171. data/lib/onlinepayments/sdk/domain/range_validator.rb +30 -0
  172. data/lib/onlinepayments/sdk/domain/redirect_data.rb +30 -0
  173. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +66 -0
  174. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +66 -0
  175. data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +26 -0
  176. data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +26 -0
  177. data/lib/onlinepayments/sdk/domain/redirection_data.rb +26 -0
  178. data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +30 -0
  179. data/lib/onlinepayments/sdk/domain/refund_e_wallet_method_specific_output.rb +38 -0
  180. data/lib/onlinepayments/sdk/domain/refund_error_response.rb +45 -0
  181. data/lib/onlinepayments/sdk/domain/refund_mobile_method_specific_output.rb +34 -0
  182. data/lib/onlinepayments/sdk/domain/refund_output.rb +82 -0
  183. data/lib/onlinepayments/sdk/domain/refund_payment_product840_customer_account.rb +34 -0
  184. data/lib/onlinepayments/sdk/domain/refund_payment_product840_specific_output.rb +30 -0
  185. data/lib/onlinepayments/sdk/domain/refund_redirect_method_specific_output.rb +30 -0
  186. data/lib/onlinepayments/sdk/domain/refund_request.rb +38 -0
  187. data/lib/onlinepayments/sdk/domain/refund_response.rb +46 -0
  188. data/lib/onlinepayments/sdk/domain/refunds_response.rb +33 -0
  189. data/lib/onlinepayments/sdk/domain/regular_expression_validator.rb +26 -0
  190. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb +34 -0
  191. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb +34 -0
  192. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +42 -0
  193. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb +34 -0
  194. data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input_base.rb +34 -0
  195. data/lib/onlinepayments/sdk/domain/session_request.rb +32 -0
  196. data/lib/onlinepayments/sdk/domain/session_response.rb +48 -0
  197. data/lib/onlinepayments/sdk/domain/shipping.rb +58 -0
  198. data/lib/onlinepayments/sdk/domain/shopping_cart.rb +64 -0
  199. data/lib/onlinepayments/sdk/domain/shopping_cart_extension.rb +52 -0
  200. data/lib/onlinepayments/sdk/domain/test_connection.rb +26 -0
  201. data/lib/onlinepayments/sdk/domain/three_d_secure.rb +78 -0
  202. data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +58 -0
  203. data/lib/onlinepayments/sdk/domain/three_d_secure_data.rb +34 -0
  204. data/lib/onlinepayments/sdk/domain/three_d_secure_results.rb +30 -0
  205. data/lib/onlinepayments/sdk/domain/token_card.rb +34 -0
  206. data/lib/onlinepayments/sdk/domain/token_card_data.rb +30 -0
  207. data/lib/onlinepayments/sdk/domain/token_card_specific_input.rb +30 -0
  208. data/lib/onlinepayments/sdk/domain/token_data.rb +30 -0
  209. data/lib/onlinepayments/sdk/domain/token_e_wallet.rb +34 -0
  210. data/lib/onlinepayments/sdk/domain/token_response.rb +58 -0
  211. data/lib/onlinepayments/sdk/domain/value_mapping_element.rb +37 -0
  212. data/lib/onlinepayments/sdk/endpoint_configuration.rb +127 -0
  213. data/lib/onlinepayments/sdk/exceptions.rb +8 -0
  214. data/lib/onlinepayments/sdk/factory.rb +136 -0
  215. data/lib/onlinepayments/sdk/idempotence_exception.rb +24 -0
  216. data/lib/onlinepayments/sdk/logging/communicator_logger.rb +22 -0
  217. data/lib/onlinepayments/sdk/logging/log_message_builder.rb +56 -0
  218. data/lib/onlinepayments/sdk/logging/logging_capable.rb +17 -0
  219. data/lib/onlinepayments/sdk/logging/logging_util.rb +286 -0
  220. data/lib/onlinepayments/sdk/logging/request_log_message_builder.rb +39 -0
  221. data/lib/onlinepayments/sdk/logging/response_log_message_builder.rb +34 -0
  222. data/lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb +57 -0
  223. data/lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb +34 -0
  224. data/lib/onlinepayments/sdk/logging.rb +10 -0
  225. data/lib/onlinepayments/sdk/marshaller.rb +24 -0
  226. data/lib/onlinepayments/sdk/marshaller_syntax_exception.rb +6 -0
  227. data/lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +86 -0
  228. data/lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +86 -0
  229. data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +182 -0
  230. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +89 -0
  231. data/lib/onlinepayments/sdk/merchant/payments/payments_client.rb +322 -0
  232. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +86 -0
  233. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +57 -0
  234. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +57 -0
  235. data/lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb +87 -0
  236. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +38 -0
  237. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +57 -0
  238. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +57 -0
  239. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +30 -0
  240. data/lib/onlinepayments/sdk/merchant/products/products_client.rb +155 -0
  241. data/lib/onlinepayments/sdk/merchant/services/services_client.rb +82 -0
  242. data/lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb +54 -0
  243. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +116 -0
  244. data/lib/onlinepayments/sdk/meta_data_provider.rb +150 -0
  245. data/lib/onlinepayments/sdk/modules.rb +62 -0
  246. data/lib/onlinepayments/sdk/not_found_exception.rb +16 -0
  247. data/lib/onlinepayments/sdk/param_request.rb +11 -0
  248. data/lib/onlinepayments/sdk/payment_platform_exception.rb +15 -0
  249. data/lib/onlinepayments/sdk/pooled_connection.rb +21 -0
  250. data/lib/onlinepayments/sdk/proxy_configuration.rb +74 -0
  251. data/lib/onlinepayments/sdk/reference_exception.rb +14 -0
  252. data/lib/onlinepayments/sdk/request_header.rb +50 -0
  253. data/lib/onlinepayments/sdk/request_param.rb +23 -0
  254. data/lib/onlinepayments/sdk/response_exception.rb +47 -0
  255. data/lib/onlinepayments/sdk/response_header.rb +42 -0
  256. data/lib/onlinepayments/sdk/validation_exception.rb +14 -0
  257. data/lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb +20 -0
  258. data/lib/onlinepayments/sdk/webhooks/in_memory_secret_key_store.rb +56 -0
  259. data/lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb +17 -0
  260. data/lib/onlinepayments/sdk/webhooks/secret_key_store.rb +16 -0
  261. data/lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb +19 -0
  262. data/lib/onlinepayments/sdk/webhooks/webhooks.rb +22 -0
  263. data/lib/onlinepayments/sdk/webhooks/webhooks_event.rb +58 -0
  264. data/lib/onlinepayments/sdk/webhooks/webhooks_helper.rb +100 -0
  265. data/lib/onlinepayments/sdk/webhooks/webhooks_helper_builder.rb +25 -0
  266. data/lib/onlinepayments/sdk/webhooks.rb +11 -0
  267. data/lib/onlinepayments/sdk.rb +26 -0
  268. data/onlinepayments-sdk-ruby.gemspec +28 -0
  269. metadata +416 -0
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_references'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [Long] amount
11
+ # @attr [true/false] is_final
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
13
+ class CapturePaymentRequest < OnlinePayments::SDK::DataObject
14
+ attr_accessor :amount
15
+ attr_accessor :is_final
16
+ attr_accessor :references
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['amount'] = @amount unless @amount.nil?
22
+ hash['isFinal'] = @is_final unless @is_final.nil?
23
+ hash['references'] = @references.to_h if @references
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ @amount = hash['amount'] if hash.key? 'amount'
30
+ @is_final = hash['isFinal'] if hash.key? 'isFinal'
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'])
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,46 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/capture_output'
6
+ require 'onlinepayments/sdk/domain/capture_status_output'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [OnlinePayments::SDK::Domain::CaptureOutput] capture_output
12
+ # @attr [String] id
13
+ # @attr [String] status
14
+ # @attr [OnlinePayments::SDK::Domain::CaptureStatusOutput] status_output
15
+ class CaptureResponse < OnlinePayments::SDK::DataObject
16
+ attr_accessor :capture_output
17
+ attr_accessor :id
18
+ attr_accessor :status
19
+ attr_accessor :status_output
20
+
21
+ # @return (Hash)
22
+ def to_h
23
+ hash = super
24
+ hash['captureOutput'] = @capture_output.to_h if @capture_output
25
+ hash['id'] = @id unless @id.nil?
26
+ hash['status'] = @status unless @status.nil?
27
+ hash['statusOutput'] = @status_output.to_h if @status_output
28
+ hash
29
+ end
30
+
31
+ def from_hash(hash)
32
+ super
33
+ if hash.key? 'captureOutput'
34
+ raise TypeError, "value '%s' is not a Hash" % [hash['captureOutput']] unless hash['captureOutput'].is_a? Hash
35
+ @capture_output = OnlinePayments::SDK::Domain::CaptureOutput.new_from_hash(hash['captureOutput'])
36
+ end
37
+ @id = hash['id'] if hash.key? 'id'
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::CaptureStatusOutput.new_from_hash(hash['statusOutput'])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,26 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [Integer] status_code
10
+ class CaptureStatusOutput < OnlinePayments::SDK::DataObject
11
+ attr_accessor :status_code
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['statusCode'] = @status_code unless @status_code.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @status_code = hash['statusCode'] if hash.key? 'statusCode'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,33 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/capture'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [Array<OnlinePayments::SDK::Domain::Capture>] captures
11
+ class CapturesResponse < OnlinePayments::SDK::DataObject
12
+ attr_accessor :captures
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['captures'] = @captures.collect(&:to_h) if @captures
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.key? 'captures'
24
+ raise TypeError, "value '%s' is not an Array" % [hash['captures']] unless hash['captures'].is_a? Array
25
+ @captures = []
26
+ hash['captures'].each do |e|
27
+ @captures << OnlinePayments::SDK::Domain::Capture.new_from_hash(e)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] card_number
10
+ # @attr [String] cardholder_name
11
+ # @attr [String] cvv
12
+ # @attr [String] expiry_date
13
+ class Card < OnlinePayments::SDK::DataObject
14
+ attr_accessor :card_number
15
+ attr_accessor :cardholder_name
16
+ attr_accessor :cvv
17
+ attr_accessor :expiry_date
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['cardNumber'] = @card_number unless @card_number.nil?
23
+ hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
24
+ hash['cvv'] = @cvv unless @cvv.nil?
25
+ hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ @card_number = hash['cardNumber'] if hash.key? 'cardNumber'
32
+ @cardholder_name = hash['cardholderName'] if hash.key? 'cardholderName'
33
+ @cvv = hash['cvv'] if hash.key? 'cvv'
34
+ @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] bin
10
+ # @attr [String] card_number
11
+ # @attr [String] expiry_date
12
+ class CardEssentials < OnlinePayments::SDK::DataObject
13
+ attr_accessor :bin
14
+ attr_accessor :card_number
15
+ attr_accessor :expiry_date
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['bin'] = @bin unless @bin.nil?
21
+ hash['cardNumber'] = @card_number unless @card_number.nil?
22
+ hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @bin = hash['bin'] if hash.key? 'bin'
29
+ @card_number = hash['cardNumber'] if hash.key? 'cardNumber'
30
+ @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] avs_result
10
+ # @attr [String] cvv_result
11
+ # @attr [String] fraud_service_result
12
+ class CardFraudResults < OnlinePayments::SDK::DataObject
13
+ attr_accessor :avs_result
14
+ attr_accessor :cvv_result
15
+ attr_accessor :fraud_service_result
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['avsResult'] = @avs_result unless @avs_result.nil?
21
+ hash['cvvResult'] = @cvv_result unless @cvv_result.nil?
22
+ hash['fraudServiceResult'] = @fraud_service_result unless @fraud_service_result.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @avs_result = hash['avsResult'] if hash.key? 'avsResult'
29
+ @cvv_result = hash['cvvResult'] if hash.key? 'cvvResult'
30
+ @fraud_service_result = hash['fraudServiceResult'] if hash.key? 'fraudServiceResult'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,98 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card'
6
+ require 'onlinepayments/sdk/domain/card_recurrence_details'
7
+ require 'onlinepayments/sdk/domain/payment_product130_specific_input'
8
+ require 'onlinepayments/sdk/domain/three_d_secure'
9
+
10
+ module OnlinePayments::SDK
11
+ module Domain
12
+
13
+ # @attr [String] authorization_mode
14
+ # @attr [OnlinePayments::SDK::Domain::Card] card
15
+ # @attr [String] initial_scheme_transaction_id
16
+ # @attr [true/false] is_recurring
17
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
18
+ # @attr [Integer] payment_product_id
19
+ # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
20
+ # @attr [String] return_url
21
+ # @attr [true/false] skip_authentication
22
+ # @attr [OnlinePayments::SDK::Domain::ThreeDSecure] three_d_secure
23
+ # @attr [String] token
24
+ # @attr [true/false] tokenize
25
+ # @attr [String] transaction_channel
26
+ # @attr [String] unscheduled_card_on_file_requestor
27
+ # @attr [String] unscheduled_card_on_file_sequence_indicator
28
+ class CardPaymentMethodSpecificInput < OnlinePayments::SDK::DataObject
29
+ attr_accessor :authorization_mode
30
+ attr_accessor :card
31
+ attr_accessor :initial_scheme_transaction_id
32
+ attr_accessor :is_recurring
33
+ attr_accessor :payment_product130_specific_input
34
+ attr_accessor :payment_product_id
35
+ attr_accessor :recurring
36
+ attr_accessor :return_url
37
+ attr_accessor :skip_authentication
38
+ attr_accessor :three_d_secure
39
+ attr_accessor :token
40
+ attr_accessor :tokenize
41
+ attr_accessor :transaction_channel
42
+ attr_accessor :unscheduled_card_on_file_requestor
43
+ attr_accessor :unscheduled_card_on_file_sequence_indicator
44
+
45
+ # @return (Hash)
46
+ def to_h
47
+ hash = super
48
+ hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
49
+ hash['card'] = @card.to_h if @card
50
+ hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
51
+ hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
52
+ hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
53
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
54
+ hash['recurring'] = @recurring.to_h if @recurring
55
+ hash['returnUrl'] = @return_url unless @return_url.nil?
56
+ hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
57
+ hash['threeDSecure'] = @three_d_secure.to_h if @three_d_secure
58
+ hash['token'] = @token unless @token.nil?
59
+ hash['tokenize'] = @tokenize unless @tokenize.nil?
60
+ hash['transactionChannel'] = @transaction_channel unless @transaction_channel.nil?
61
+ hash['unscheduledCardOnFileRequestor'] = @unscheduled_card_on_file_requestor unless @unscheduled_card_on_file_requestor.nil?
62
+ hash['unscheduledCardOnFileSequenceIndicator'] = @unscheduled_card_on_file_sequence_indicator unless @unscheduled_card_on_file_sequence_indicator.nil?
63
+ hash
64
+ end
65
+
66
+ def from_hash(hash)
67
+ super
68
+ @authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
69
+ if hash.key? 'card'
70
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
71
+ @card = OnlinePayments::SDK::Domain::Card.new_from_hash(hash['card'])
72
+ end
73
+ @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
74
+ @is_recurring = hash['isRecurring'] if hash.key? 'isRecurring'
75
+ if hash.key? 'paymentProduct130SpecificInput'
76
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
77
+ @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
78
+ end
79
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
80
+ if hash.key? 'recurring'
81
+ raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
82
+ @recurring = OnlinePayments::SDK::Domain::CardRecurrenceDetails.new_from_hash(hash['recurring'])
83
+ end
84
+ @return_url = hash['returnUrl'] if hash.key? 'returnUrl'
85
+ @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
86
+ if hash.key? 'threeDSecure'
87
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
88
+ @three_d_secure = OnlinePayments::SDK::Domain::ThreeDSecure.new_from_hash(hash['threeDSecure'])
89
+ end
90
+ @token = hash['token'] if hash.key? 'token'
91
+ @tokenize = hash['tokenize'] if hash.key? 'tokenize'
92
+ @transaction_channel = hash['transactionChannel'] if hash.key? 'transactionChannel'
93
+ @unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor'] if hash.key? 'unscheduledCardOnFileRequestor'
94
+ @unscheduled_card_on_file_sequence_indicator = hash['unscheduledCardOnFileSequenceIndicator'] if hash.key? 'unscheduledCardOnFileSequenceIndicator'
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,86 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card_recurrence_details'
6
+ require 'onlinepayments/sdk/domain/payment_product130_specific_input'
7
+ require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
8
+ require 'onlinepayments/sdk/domain/three_d_secure_base'
9
+
10
+ module OnlinePayments::SDK
11
+ module Domain
12
+
13
+ # @attr [String] authorization_mode
14
+ # @attr [String] initial_scheme_transaction_id
15
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
16
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
17
+ # @attr [Integer] payment_product_id
18
+ # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
19
+ # @attr [OnlinePayments::SDK::Domain::ThreeDSecureBase] three_d_secure
20
+ # @attr [String] token
21
+ # @attr [true/false] tokenize
22
+ # @attr [String] transaction_channel
23
+ # @attr [String] unscheduled_card_on_file_requestor
24
+ # @attr [String] unscheduled_card_on_file_sequence_indicator
25
+ class CardPaymentMethodSpecificInputBase < OnlinePayments::SDK::DataObject
26
+ attr_accessor :authorization_mode
27
+ attr_accessor :initial_scheme_transaction_id
28
+ attr_accessor :payment_product130_specific_input
29
+ attr_accessor :payment_product5100_specific_input
30
+ attr_accessor :payment_product_id
31
+ attr_accessor :recurring
32
+ attr_accessor :three_d_secure
33
+ attr_accessor :token
34
+ attr_accessor :tokenize
35
+ attr_accessor :transaction_channel
36
+ attr_accessor :unscheduled_card_on_file_requestor
37
+ attr_accessor :unscheduled_card_on_file_sequence_indicator
38
+
39
+ # @return (Hash)
40
+ def to_h
41
+ hash = super
42
+ hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
43
+ hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
44
+ hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
45
+ hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
46
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
47
+ hash['recurring'] = @recurring.to_h if @recurring
48
+ hash['threeDSecure'] = @three_d_secure.to_h if @three_d_secure
49
+ hash['token'] = @token unless @token.nil?
50
+ hash['tokenize'] = @tokenize unless @tokenize.nil?
51
+ hash['transactionChannel'] = @transaction_channel unless @transaction_channel.nil?
52
+ hash['unscheduledCardOnFileRequestor'] = @unscheduled_card_on_file_requestor unless @unscheduled_card_on_file_requestor.nil?
53
+ hash['unscheduledCardOnFileSequenceIndicator'] = @unscheduled_card_on_file_sequence_indicator unless @unscheduled_card_on_file_sequence_indicator.nil?
54
+ hash
55
+ end
56
+
57
+ def from_hash(hash)
58
+ super
59
+ @authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
60
+ @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
61
+ if hash.key? 'paymentProduct130SpecificInput'
62
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
63
+ @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
64
+ end
65
+ if hash.key? 'paymentProduct5100SpecificInput'
66
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5100SpecificInput']] unless hash['paymentProduct5100SpecificInput'].is_a? Hash
67
+ @payment_product5100_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput.new_from_hash(hash['paymentProduct5100SpecificInput'])
68
+ end
69
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
70
+ if hash.key? 'recurring'
71
+ raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
72
+ @recurring = OnlinePayments::SDK::Domain::CardRecurrenceDetails.new_from_hash(hash['recurring'])
73
+ end
74
+ if hash.key? 'threeDSecure'
75
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
76
+ @three_d_secure = OnlinePayments::SDK::Domain::ThreeDSecureBase.new_from_hash(hash['threeDSecure'])
77
+ end
78
+ @token = hash['token'] if hash.key? 'token'
79
+ @tokenize = hash['tokenize'] if hash.key? 'tokenize'
80
+ @transaction_channel = hash['transactionChannel'] if hash.key? 'transactionChannel'
81
+ @unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor'] if hash.key? 'unscheduledCardOnFileRequestor'
82
+ @unscheduled_card_on_file_sequence_indicator = hash['unscheduledCardOnFileSequenceIndicator'] if hash.key? 'unscheduledCardOnFileSequenceIndicator'
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,26 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [true/false] group_cards
10
+ class CardPaymentMethodSpecificInputForHostedCheckout < OnlinePayments::SDK::DataObject
11
+ attr_accessor :group_cards
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['groupCards'] = @group_cards unless @group_cards.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @group_cards = hash['groupCards'] if hash.key? 'groupCards'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,78 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card_essentials'
6
+ require 'onlinepayments/sdk/domain/card_fraud_results'
7
+ require 'onlinepayments/sdk/domain/external_token_linked'
8
+ require 'onlinepayments/sdk/domain/three_d_secure_results'
9
+
10
+ module OnlinePayments::SDK
11
+ module Domain
12
+
13
+ # @attr [Long] authenticated_amount
14
+ # @attr [String] authorisation_code
15
+ # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
16
+ # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
17
+ # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
18
+ # @attr [String] initial_scheme_transaction_id
19
+ # @attr [String] payment_option
20
+ # @attr [Integer] payment_product_id
21
+ # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
22
+ # @attr [String] token
23
+ class CardPaymentMethodSpecificOutput < OnlinePayments::SDK::DataObject
24
+ attr_accessor :authenticated_amount
25
+ attr_accessor :authorisation_code
26
+ attr_accessor :card
27
+ attr_accessor :external_token_linked
28
+ attr_accessor :fraud_results
29
+ attr_accessor :initial_scheme_transaction_id
30
+ attr_accessor :payment_option
31
+ attr_accessor :payment_product_id
32
+ attr_accessor :three_d_secure_results
33
+ attr_accessor :token
34
+
35
+ # @return (Hash)
36
+ def to_h
37
+ hash = super
38
+ hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
39
+ hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
40
+ hash['card'] = @card.to_h if @card
41
+ hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
42
+ hash['fraudResults'] = @fraud_results.to_h if @fraud_results
43
+ hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
44
+ hash['paymentOption'] = @payment_option unless @payment_option.nil?
45
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
46
+ hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
47
+ hash['token'] = @token unless @token.nil?
48
+ hash
49
+ end
50
+
51
+ def from_hash(hash)
52
+ super
53
+ @authenticated_amount = hash['authenticatedAmount'] if hash.key? 'authenticatedAmount'
54
+ @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode'
55
+ if hash.key? 'card'
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
57
+ @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
58
+ end
59
+ if hash.key? 'externalTokenLinked'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
61
+ @external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
62
+ end
63
+ if hash.key? 'fraudResults'
64
+ raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
65
+ @fraud_results = OnlinePayments::SDK::Domain::CardFraudResults.new_from_hash(hash['fraudResults'])
66
+ end
67
+ @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
68
+ @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
69
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
70
+ if hash.key? 'threeDSecureResults'
71
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash
72
+ @three_d_secure_results = OnlinePayments::SDK::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
73
+ end
74
+ @token = hash['token'] if hash.key? 'token'
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::Card] card
11
+ # @attr [Integer] payment_product_id
12
+ # @attr [String] token
13
+ class CardPayoutMethodSpecificInput < OnlinePayments::SDK::DataObject
14
+ attr_accessor :card
15
+ attr_accessor :payment_product_id
16
+ attr_accessor :token
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['card'] = @card.to_h if @card
22
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
23
+ hash['token'] = @token unless @token.nil?
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.key? 'card'
30
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
31
+ @card = OnlinePayments::SDK::Domain::Card.new_from_hash(hash['card'])
32
+ end
33
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
34
+ @token = hash['token'] if hash.key? 'token'
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] recurring_payment_sequence_indicator
10
+ class CardRecurrenceDetails < OnlinePayments::SDK::DataObject
11
+ attr_accessor :recurring_payment_sequence_indicator
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator'] if hash.key? 'recurringPaymentSequenceIndicator'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] card_number
10
+ # @attr [String] cardholder_name
11
+ # @attr [String] expiry_date
12
+ class CardWithoutCvv < OnlinePayments::SDK::DataObject
13
+ attr_accessor :card_number
14
+ attr_accessor :cardholder_name
15
+ attr_accessor :expiry_date
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['cardNumber'] = @card_number unless @card_number.nil?
21
+ hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
22
+ hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @card_number = hash['cardNumber'] if hash.key? 'cardNumber'
29
+ @cardholder_name = hash['cardholderName'] if hash.key? 'cardholderName'
30
+ @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
31
+ end
32
+ end
33
+ end
34
+ end