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,46 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/merchant_action'
6
+ require 'onlinepayments/sdk/domain/payment_creation_output'
7
+ require 'onlinepayments/sdk/domain/payment_response'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentCreationOutput] creation_output
13
+ # @attr [OnlinePayments::SDK::Domain::MerchantAction] merchant_action
14
+ # @attr [OnlinePayments::SDK::Domain::PaymentResponse] payment
15
+ class CreatePaymentResponse < OnlinePayments::SDK::DataObject
16
+ attr_accessor :creation_output
17
+ attr_accessor :merchant_action
18
+ attr_accessor :payment
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['creationOutput'] = @creation_output.to_h if @creation_output
24
+ hash['merchantAction'] = @merchant_action.to_h if @merchant_action
25
+ hash['payment'] = @payment.to_h if @payment
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ if hash.key? 'creationOutput'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['creationOutput']] unless hash['creationOutput'].is_a? Hash
33
+ @creation_output = OnlinePayments::SDK::Domain::PaymentCreationOutput.new_from_hash(hash['creationOutput'])
34
+ end
35
+ if hash.key? 'merchantAction'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['merchantAction']] unless hash['merchantAction'].is_a? Hash
37
+ @merchant_action = OnlinePayments::SDK::Domain::MerchantAction.new_from_hash(hash['merchantAction'])
38
+ end
39
+ if hash.key? 'payment'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
41
+ @payment = OnlinePayments::SDK::Domain::PaymentResponse.new_from_hash(hash['payment'])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/amount_of_money'
6
+ require 'onlinepayments/sdk/domain/card_payout_method_specific_input'
7
+ require 'onlinepayments/sdk/domain/payment_references'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
13
+ # @attr [OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput] card_payout_method_specific_input
14
+ # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
15
+ class CreatePayoutRequest < OnlinePayments::SDK::DataObject
16
+ attr_accessor :amount_of_money
17
+ attr_accessor :card_payout_method_specific_input
18
+ attr_accessor :references
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
24
+ hash['cardPayoutMethodSpecificInput'] = @card_payout_method_specific_input.to_h if @card_payout_method_specific_input
25
+ hash['references'] = @references.to_h if @references
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ if hash.key? 'amountOfMoney'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
33
+ @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
34
+ end
35
+ if hash.key? 'cardPayoutMethodSpecificInput'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardPayoutMethodSpecificInput']] unless hash['cardPayoutMethodSpecificInput'].is_a? Hash
37
+ @card_payout_method_specific_input = OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput.new_from_hash(hash['cardPayoutMethodSpecificInput'])
38
+ end
39
+ if hash.key? 'references'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
41
+ @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/token_card_specific_input'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::TokenCardSpecificInput] card
11
+ # @attr [Integer] payment_product_id
12
+ class CreateTokenRequest < OnlinePayments::SDK::DataObject
13
+ attr_accessor :card
14
+ attr_accessor :payment_product_id
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['card'] = @card.to_h if @card
20
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'card'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
28
+ @card = OnlinePayments::SDK::Domain::TokenCardSpecificInput.new_from_hash(hash['card'])
29
+ end
30
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
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
+ require 'onlinepayments/sdk/domain/payment_response'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::PaymentResponse] payment
11
+ # @attr [String] payment_status_category
12
+ class CreatedPaymentOutput < OnlinePayments::SDK::DataObject
13
+ attr_accessor :payment
14
+ attr_accessor :payment_status_category
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['payment'] = @payment.to_h if @payment
20
+ hash['paymentStatusCategory'] = @payment_status_category unless @payment_status_category.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'payment'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
28
+ @payment = OnlinePayments::SDK::Domain::PaymentResponse.new_from_hash(hash['payment'])
29
+ end
30
+ @payment_status_category = hash['paymentStatusCategory'] if hash.key? 'paymentStatusCategory'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,50 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card_without_cvv'
6
+ require 'onlinepayments/sdk/domain/external_token_linked'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [OnlinePayments::SDK::Domain::CardWithoutCvv] card
12
+ # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
13
+ # @attr [true/false] is_new_token
14
+ # @attr [String] token
15
+ # @attr [String] token_status
16
+ class CreatedTokenResponse < OnlinePayments::SDK::DataObject
17
+ attr_accessor :card
18
+ attr_accessor :external_token_linked
19
+ attr_accessor :is_new_token
20
+ attr_accessor :token
21
+ attr_accessor :token_status
22
+
23
+ # @return (Hash)
24
+ def to_h
25
+ hash = super
26
+ hash['card'] = @card.to_h if @card
27
+ hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
28
+ hash['isNewToken'] = @is_new_token unless @is_new_token.nil?
29
+ hash['token'] = @token unless @token.nil?
30
+ hash['tokenStatus'] = @token_status unless @token_status.nil?
31
+ hash
32
+ end
33
+
34
+ def from_hash(hash)
35
+ super
36
+ if hash.key? 'card'
37
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
38
+ @card = OnlinePayments::SDK::Domain::CardWithoutCvv.new_from_hash(hash['card'])
39
+ end
40
+ if hash.key? 'externalTokenLinked'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
42
+ @external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
43
+ end
44
+ @is_new_token = hash['isNewToken'] if hash.key? 'isNewToken'
45
+ @token = hash['token'] if hash.key? 'token'
46
+ @token_status = hash['tokenStatus'] if hash.key? 'tokenStatus'
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,86 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/address'
6
+ require 'onlinepayments/sdk/domain/company_information'
7
+ require 'onlinepayments/sdk/domain/contact_details'
8
+ require 'onlinepayments/sdk/domain/customer_account'
9
+ require 'onlinepayments/sdk/domain/customer_device'
10
+ require 'onlinepayments/sdk/domain/personal_information'
11
+
12
+ module OnlinePayments::SDK
13
+ module Domain
14
+
15
+ # @attr [OnlinePayments::SDK::Domain::CustomerAccount] account
16
+ # @attr [String] account_type
17
+ # @attr [OnlinePayments::SDK::Domain::Address] billing_address
18
+ # @attr [OnlinePayments::SDK::Domain::CompanyInformation] company_information
19
+ # @attr [OnlinePayments::SDK::Domain::ContactDetails] contact_details
20
+ # @attr [OnlinePayments::SDK::Domain::CustomerDevice] device
21
+ # @attr [String] fiscal_number
22
+ # @attr [String] locale
23
+ # @attr [String] merchant_customer_id
24
+ # @attr [OnlinePayments::SDK::Domain::PersonalInformation] personal_information
25
+ class Customer < OnlinePayments::SDK::DataObject
26
+ attr_accessor :account
27
+ attr_accessor :account_type
28
+ attr_accessor :billing_address
29
+ attr_accessor :company_information
30
+ attr_accessor :contact_details
31
+ attr_accessor :device
32
+ attr_accessor :fiscal_number
33
+ attr_accessor :locale
34
+ attr_accessor :merchant_customer_id
35
+ attr_accessor :personal_information
36
+
37
+ # @return (Hash)
38
+ def to_h
39
+ hash = super
40
+ hash['account'] = @account.to_h if @account
41
+ hash['accountType'] = @account_type unless @account_type.nil?
42
+ hash['billingAddress'] = @billing_address.to_h if @billing_address
43
+ hash['companyInformation'] = @company_information.to_h if @company_information
44
+ hash['contactDetails'] = @contact_details.to_h if @contact_details
45
+ hash['device'] = @device.to_h if @device
46
+ hash['fiscalNumber'] = @fiscal_number unless @fiscal_number.nil?
47
+ hash['locale'] = @locale unless @locale.nil?
48
+ hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil?
49
+ hash['personalInformation'] = @personal_information.to_h if @personal_information
50
+ hash
51
+ end
52
+
53
+ def from_hash(hash)
54
+ super
55
+ if hash.key? 'account'
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['account']] unless hash['account'].is_a? Hash
57
+ @account = OnlinePayments::SDK::Domain::CustomerAccount.new_from_hash(hash['account'])
58
+ end
59
+ @account_type = hash['accountType'] if hash.key? 'accountType'
60
+ if hash.key? 'billingAddress'
61
+ raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
62
+ @billing_address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['billingAddress'])
63
+ end
64
+ if hash.key? 'companyInformation'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['companyInformation']] unless hash['companyInformation'].is_a? Hash
66
+ @company_information = OnlinePayments::SDK::Domain::CompanyInformation.new_from_hash(hash['companyInformation'])
67
+ end
68
+ if hash.key? 'contactDetails'
69
+ raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash
70
+ @contact_details = OnlinePayments::SDK::Domain::ContactDetails.new_from_hash(hash['contactDetails'])
71
+ end
72
+ if hash.key? 'device'
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['device']] unless hash['device'].is_a? Hash
74
+ @device = OnlinePayments::SDK::Domain::CustomerDevice.new_from_hash(hash['device'])
75
+ end
76
+ @fiscal_number = hash['fiscalNumber'] if hash.key? 'fiscalNumber'
77
+ @locale = hash['locale'] if hash.key? 'locale'
78
+ @merchant_customer_id = hash['merchantCustomerId'] if hash.key? 'merchantCustomerId'
79
+ if hash.key? 'personalInformation'
80
+ raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash
81
+ @personal_information = OnlinePayments::SDK::Domain::PersonalInformation.new_from_hash(hash['personalInformation'])
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,70 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/customer_account_authentication'
6
+ require 'onlinepayments/sdk/domain/customer_payment_activity'
7
+ require 'onlinepayments/sdk/domain/payment_account_on_file'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [OnlinePayments::SDK::Domain::CustomerAccountAuthentication] authentication
13
+ # @attr [String] change_date
14
+ # @attr [true/false] changed_during_checkout
15
+ # @attr [String] create_date
16
+ # @attr [true/false] had_suspicious_activity
17
+ # @attr [String] password_change_date
18
+ # @attr [true/false] password_changed_during_checkout
19
+ # @attr [OnlinePayments::SDK::Domain::PaymentAccountOnFile] payment_account_on_file
20
+ # @attr [OnlinePayments::SDK::Domain::CustomerPaymentActivity] payment_activity
21
+ class CustomerAccount < OnlinePayments::SDK::DataObject
22
+ attr_accessor :authentication
23
+ attr_accessor :change_date
24
+ attr_accessor :changed_during_checkout
25
+ attr_accessor :create_date
26
+ attr_accessor :had_suspicious_activity
27
+ attr_accessor :password_change_date
28
+ attr_accessor :password_changed_during_checkout
29
+ attr_accessor :payment_account_on_file
30
+ attr_accessor :payment_activity
31
+
32
+ # @return (Hash)
33
+ def to_h
34
+ hash = super
35
+ hash['authentication'] = @authentication.to_h if @authentication
36
+ hash['changeDate'] = @change_date unless @change_date.nil?
37
+ hash['changedDuringCheckout'] = @changed_during_checkout unless @changed_during_checkout.nil?
38
+ hash['createDate'] = @create_date unless @create_date.nil?
39
+ hash['hadSuspiciousActivity'] = @had_suspicious_activity unless @had_suspicious_activity.nil?
40
+ hash['passwordChangeDate'] = @password_change_date unless @password_change_date.nil?
41
+ hash['passwordChangedDuringCheckout'] = @password_changed_during_checkout unless @password_changed_during_checkout.nil?
42
+ hash['paymentAccountOnFile'] = @payment_account_on_file.to_h if @payment_account_on_file
43
+ hash['paymentActivity'] = @payment_activity.to_h if @payment_activity
44
+ hash
45
+ end
46
+
47
+ def from_hash(hash)
48
+ super
49
+ if hash.key? 'authentication'
50
+ raise TypeError, "value '%s' is not a Hash" % [hash['authentication']] unless hash['authentication'].is_a? Hash
51
+ @authentication = OnlinePayments::SDK::Domain::CustomerAccountAuthentication.new_from_hash(hash['authentication'])
52
+ end
53
+ @change_date = hash['changeDate'] if hash.key? 'changeDate'
54
+ @changed_during_checkout = hash['changedDuringCheckout'] if hash.key? 'changedDuringCheckout'
55
+ @create_date = hash['createDate'] if hash.key? 'createDate'
56
+ @had_suspicious_activity = hash['hadSuspiciousActivity'] if hash.key? 'hadSuspiciousActivity'
57
+ @password_change_date = hash['passwordChangeDate'] if hash.key? 'passwordChangeDate'
58
+ @password_changed_during_checkout = hash['passwordChangedDuringCheckout'] if hash.key? 'passwordChangedDuringCheckout'
59
+ if hash.key? 'paymentAccountOnFile'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentAccountOnFile']] unless hash['paymentAccountOnFile'].is_a? Hash
61
+ @payment_account_on_file = OnlinePayments::SDK::Domain::PaymentAccountOnFile.new_from_hash(hash['paymentAccountOnFile'])
62
+ end
63
+ if hash.key? 'paymentActivity'
64
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentActivity']] unless hash['paymentActivity'].is_a? Hash
65
+ @payment_activity = OnlinePayments::SDK::Domain::CustomerPaymentActivity.new_from_hash(hash['paymentActivity'])
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,30 @@
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] method
10
+ # @attr [String] utc_timestamp
11
+ class CustomerAccountAuthentication < OnlinePayments::SDK::DataObject
12
+ attr_accessor :method
13
+ attr_accessor :utc_timestamp
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['method'] = @method unless @method.nil?
19
+ hash['utcTimestamp'] = @utc_timestamp unless @utc_timestamp.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @method = hash['method'] if hash.key? 'method'
26
+ @utc_timestamp = hash['utcTimestamp'] if hash.key? 'utcTimestamp'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,50 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/browser_data'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] accept_header
11
+ # @attr [OnlinePayments::SDK::Domain::BrowserData] browser_data
12
+ # @attr [String] ip_address
13
+ # @attr [String] locale
14
+ # @attr [String] timezone_offset_utc_minutes
15
+ # @attr [String] user_agent
16
+ class CustomerDevice < OnlinePayments::SDK::DataObject
17
+ attr_accessor :accept_header
18
+ attr_accessor :browser_data
19
+ attr_accessor :ip_address
20
+ attr_accessor :locale
21
+ attr_accessor :timezone_offset_utc_minutes
22
+ attr_accessor :user_agent
23
+
24
+ # @return (Hash)
25
+ def to_h
26
+ hash = super
27
+ hash['acceptHeader'] = @accept_header unless @accept_header.nil?
28
+ hash['browserData'] = @browser_data.to_h if @browser_data
29
+ hash['ipAddress'] = @ip_address unless @ip_address.nil?
30
+ hash['locale'] = @locale unless @locale.nil?
31
+ hash['timezoneOffsetUtcMinutes'] = @timezone_offset_utc_minutes unless @timezone_offset_utc_minutes.nil?
32
+ hash['userAgent'] = @user_agent unless @user_agent.nil?
33
+ hash
34
+ end
35
+
36
+ def from_hash(hash)
37
+ super
38
+ @accept_header = hash['acceptHeader'] if hash.key? 'acceptHeader'
39
+ if hash.key? 'browserData'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['browserData']] unless hash['browserData'].is_a? Hash
41
+ @browser_data = OnlinePayments::SDK::Domain::BrowserData.new_from_hash(hash['browserData'])
42
+ end
43
+ @ip_address = hash['ipAddress'] if hash.key? 'ipAddress'
44
+ @locale = hash['locale'] if hash.key? 'locale'
45
+ @timezone_offset_utc_minutes = hash['timezoneOffsetUtcMinutes'] if hash.key? 'timezoneOffsetUtcMinutes'
46
+ @user_agent = hash['userAgent'] if hash.key? 'userAgent'
47
+ end
48
+ end
49
+ end
50
+ 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 [Integer] number_of_payment_attempts_last24_hours
10
+ # @attr [Integer] number_of_payment_attempts_last_year
11
+ # @attr [Integer] number_of_purchases_last6_months
12
+ class CustomerPaymentActivity < OnlinePayments::SDK::DataObject
13
+ attr_accessor :number_of_payment_attempts_last24_hours
14
+ attr_accessor :number_of_payment_attempts_last_year
15
+ attr_accessor :number_of_purchases_last6_months
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['numberOfPaymentAttemptsLast24Hours'] = @number_of_payment_attempts_last24_hours unless @number_of_payment_attempts_last24_hours.nil?
21
+ hash['numberOfPaymentAttemptsLastYear'] = @number_of_payment_attempts_last_year unless @number_of_payment_attempts_last_year.nil?
22
+ hash['numberOfPurchasesLast6Months'] = @number_of_purchases_last6_months unless @number_of_purchases_last6_months.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @number_of_payment_attempts_last24_hours = hash['numberOfPaymentAttemptsLast24Hours'] if hash.key? 'numberOfPaymentAttemptsLast24Hours'
29
+ @number_of_payment_attempts_last_year = hash['numberOfPaymentAttemptsLastYear'] if hash.key? 'numberOfPaymentAttemptsLastYear'
30
+ @number_of_purchases_last6_months = hash['numberOfPurchasesLast6Months'] if hash.key? 'numberOfPurchasesLast6Months'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,46 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/address'
6
+ require 'onlinepayments/sdk/domain/company_information'
7
+ require 'onlinepayments/sdk/domain/personal_information_token'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [OnlinePayments::SDK::Domain::Address] billing_address
13
+ # @attr [OnlinePayments::SDK::Domain::CompanyInformation] company_information
14
+ # @attr [OnlinePayments::SDK::Domain::PersonalInformationToken] personal_information
15
+ class CustomerToken < OnlinePayments::SDK::DataObject
16
+ attr_accessor :billing_address
17
+ attr_accessor :company_information
18
+ attr_accessor :personal_information
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['billingAddress'] = @billing_address.to_h if @billing_address
24
+ hash['companyInformation'] = @company_information.to_h if @company_information
25
+ hash['personalInformation'] = @personal_information.to_h if @personal_information
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ if hash.key? 'billingAddress'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
33
+ @billing_address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['billingAddress'])
34
+ end
35
+ if hash.key? 'companyInformation'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['companyInformation']] unless hash['companyInformation'].is_a? Hash
37
+ @company_information = OnlinePayments::SDK::Domain::CompanyInformation.new_from_hash(hash['companyInformation'])
38
+ end
39
+ if hash.key? 'personalInformation'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash
41
+ @personal_information = OnlinePayments::SDK::Domain::PersonalInformationToken.new_from_hash(hash['personalInformation'])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,42 @@
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] cardholder_name
10
+ # @attr [String] cryptogram
11
+ # @attr [String] dpan
12
+ # @attr [Integer] eci
13
+ # @attr [String] expiry_date
14
+ class DecryptedPaymentData < OnlinePayments::SDK::DataObject
15
+ attr_accessor :cardholder_name
16
+ attr_accessor :cryptogram
17
+ attr_accessor :dpan
18
+ attr_accessor :eci
19
+ attr_accessor :expiry_date
20
+
21
+ # @return (Hash)
22
+ def to_h
23
+ hash = super
24
+ hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
25
+ hash['cryptogram'] = @cryptogram unless @cryptogram.nil?
26
+ hash['dpan'] = @dpan unless @dpan.nil?
27
+ hash['eci'] = @eci unless @eci.nil?
28
+ hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
29
+ hash
30
+ end
31
+
32
+ def from_hash(hash)
33
+ super
34
+ @cardholder_name = hash['cardholderName'] if hash.key? 'cardholderName'
35
+ @cryptogram = hash['cryptogram'] if hash.key? 'cryptogram'
36
+ @dpan = hash['dpan'] if hash.key? 'dpan'
37
+ @eci = hash['eci'] if hash.key? 'eci'
38
+ @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
39
+ end
40
+ end
41
+ end
42
+ 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] issuer_id
10
+ # @attr [String] issuer_list
11
+ # @attr [String] issuer_name
12
+ class DirectoryEntry < OnlinePayments::SDK::DataObject
13
+ attr_accessor :issuer_id
14
+ attr_accessor :issuer_list
15
+ attr_accessor :issuer_name
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['issuerId'] = @issuer_id unless @issuer_id.nil?
21
+ hash['issuerList'] = @issuer_list unless @issuer_list.nil?
22
+ hash['issuerName'] = @issuer_name unless @issuer_name.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @issuer_id = hash['issuerId'] if hash.key? 'issuerId'
29
+ @issuer_list = hash['issuerList'] if hash.key? 'issuerList'
30
+ @issuer_name = hash['issuerName'] if hash.key? 'issuerName'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,12 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ class EmptyValidator < OnlinePayments::SDK::DataObject
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/api_error'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] error_id
11
+ # @attr [Array<OnlinePayments::SDK::Domain::APIError>] errors
12
+ class ErrorResponse < OnlinePayments::SDK::DataObject
13
+ attr_accessor :error_id
14
+ attr_accessor :errors
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['errorId'] = @error_id unless @error_id.nil?
20
+ hash['errors'] = @errors.collect(&:to_h) if @errors
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @error_id = hash['errorId'] if hash.key? 'errorId'
27
+ if hash.key? 'errors'
28
+ raise TypeError, "value '%s' is not an Array" % [hash['errors']] unless hash['errors'].is_a? Array
29
+ @errors = []
30
+ hash['errors'].each do |e|
31
+ @errors << OnlinePayments::SDK::Domain::APIError.new_from_hash(e)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end