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,58 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/address_personal'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::AddressPersonal] address
11
+ # @attr [String] address_indicator
12
+ # @attr [String] email_address
13
+ # @attr [String] first_usage_date
14
+ # @attr [true/false] is_first_usage
15
+ # @attr [Long] shipping_cost
16
+ # @attr [Long] shipping_cost_tax
17
+ # @attr [String] type
18
+ class Shipping < OnlinePayments::SDK::DataObject
19
+ attr_accessor :address
20
+ attr_accessor :address_indicator
21
+ attr_accessor :email_address
22
+ attr_accessor :first_usage_date
23
+ attr_accessor :is_first_usage
24
+ attr_accessor :shipping_cost
25
+ attr_accessor :shipping_cost_tax
26
+ attr_accessor :type
27
+
28
+ # @return (Hash)
29
+ def to_h
30
+ hash = super
31
+ hash['address'] = @address.to_h if @address
32
+ hash['addressIndicator'] = @address_indicator unless @address_indicator.nil?
33
+ hash['emailAddress'] = @email_address unless @email_address.nil?
34
+ hash['firstUsageDate'] = @first_usage_date unless @first_usage_date.nil?
35
+ hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil?
36
+ hash['shippingCost'] = @shipping_cost unless @shipping_cost.nil?
37
+ hash['shippingCostTax'] = @shipping_cost_tax unless @shipping_cost_tax.nil?
38
+ hash['type'] = @type unless @type.nil?
39
+ hash
40
+ end
41
+
42
+ def from_hash(hash)
43
+ super
44
+ if hash.key? 'address'
45
+ raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash
46
+ @address = OnlinePayments::SDK::Domain::AddressPersonal.new_from_hash(hash['address'])
47
+ end
48
+ @address_indicator = hash['addressIndicator'] if hash.key? 'addressIndicator'
49
+ @email_address = hash['emailAddress'] if hash.key? 'emailAddress'
50
+ @first_usage_date = hash['firstUsageDate'] if hash.key? 'firstUsageDate'
51
+ @is_first_usage = hash['isFirstUsage'] if hash.key? 'isFirstUsage'
52
+ @shipping_cost = hash['shippingCost'] if hash.key? 'shippingCost'
53
+ @shipping_cost_tax = hash['shippingCostTax'] if hash.key? 'shippingCostTax'
54
+ @type = hash['type'] if hash.key? 'type'
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,64 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/amount_breakdown'
6
+ require 'onlinepayments/sdk/domain/gift_card_purchase'
7
+ require 'onlinepayments/sdk/domain/line_item'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [Array<OnlinePayments::SDK::Domain::AmountBreakdown>] amount_breakdown
13
+ # @attr [OnlinePayments::SDK::Domain::GiftCardPurchase] gift_card_purchase
14
+ # @attr [true/false] is_pre_order
15
+ # @attr [Array<OnlinePayments::SDK::Domain::LineItem>] items
16
+ # @attr [String] pre_order_item_availability_date
17
+ # @attr [true/false] re_order_indicator
18
+ class ShoppingCart < OnlinePayments::SDK::DataObject
19
+ attr_accessor :amount_breakdown
20
+ attr_accessor :gift_card_purchase
21
+ attr_accessor :is_pre_order
22
+ attr_accessor :items
23
+ attr_accessor :pre_order_item_availability_date
24
+ attr_accessor :re_order_indicator
25
+
26
+ # @return (Hash)
27
+ def to_h
28
+ hash = super
29
+ hash['amountBreakdown'] = @amount_breakdown.collect(&:to_h) if @amount_breakdown
30
+ hash['giftCardPurchase'] = @gift_card_purchase.to_h if @gift_card_purchase
31
+ hash['isPreOrder'] = @is_pre_order unless @is_pre_order.nil?
32
+ hash['items'] = @items.collect(&:to_h) if @items
33
+ hash['preOrderItemAvailabilityDate'] = @pre_order_item_availability_date unless @pre_order_item_availability_date.nil?
34
+ hash['reOrderIndicator'] = @re_order_indicator unless @re_order_indicator.nil?
35
+ hash
36
+ end
37
+
38
+ def from_hash(hash)
39
+ super
40
+ if hash.key? 'amountBreakdown'
41
+ raise TypeError, "value '%s' is not an Array" % [hash['amountBreakdown']] unless hash['amountBreakdown'].is_a? Array
42
+ @amount_breakdown = []
43
+ hash['amountBreakdown'].each do |e|
44
+ @amount_breakdown << OnlinePayments::SDK::Domain::AmountBreakdown.new_from_hash(e)
45
+ end
46
+ end
47
+ if hash.key? 'giftCardPurchase'
48
+ raise TypeError, "value '%s' is not a Hash" % [hash['giftCardPurchase']] unless hash['giftCardPurchase'].is_a? Hash
49
+ @gift_card_purchase = OnlinePayments::SDK::Domain::GiftCardPurchase.new_from_hash(hash['giftCardPurchase'])
50
+ end
51
+ @is_pre_order = hash['isPreOrder'] if hash.key? 'isPreOrder'
52
+ if hash.key? 'items'
53
+ raise TypeError, "value '%s' is not an Array" % [hash['items']] unless hash['items'].is_a? Array
54
+ @items = []
55
+ hash['items'].each do |e|
56
+ @items << OnlinePayments::SDK::Domain::LineItem.new_from_hash(e)
57
+ end
58
+ end
59
+ @pre_order_item_availability_date = hash['preOrderItemAvailabilityDate'] if hash.key? 'preOrderItemAvailabilityDate'
60
+ @re_order_indicator = hash['reOrderIndicator'] if hash.key? 'reOrderIndicator'
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,52 @@
1
+ require 'onlinepayments/sdk/data_object'
2
+
3
+ module OnlinePayments::SDK::Domain
4
+
5
+ # Represents metadata part of shopping carts.
6
+ class ShoppingCartExtension < OnlinePayments::SDK::DataObject
7
+ def initialize(creator, name, version, extension_id = nil)
8
+ raise ArgumentError if creator.nil? || creator.strip.empty?
9
+ raise ArgumentError if name.nil? || name.strip.empty?
10
+ raise ArgumentError if version.nil? || version.to_s.strip.empty?
11
+
12
+ @creator = creator
13
+ @name = name
14
+ @version = version.to_s
15
+ @extension_id = extension_id
16
+ end
17
+
18
+ # Constructs a new ShoppingCartExtension from parameter hash
19
+ # the hash should contain a _creator_, _name_, _version_ and _extensionId_
20
+ #--
21
+ # Overridden so ShoppingCartExtension can retain mandatory default arguments
22
+ #++
23
+ def self.new_from_hash(hash)
24
+ creator = hash['creator'] if hash.has_key?('creator')
25
+ name = hash['name'] if hash.has_key?('name')
26
+ version = hash['version'] if hash.has_key?('version')
27
+ extension_id = hash['extensionId'] if hash.has_key?('extensionId')
28
+ self.new(creator, name, version, extension_id)
29
+ end
30
+
31
+ # Converts the shopping cart metadata to a hash
32
+ def to_h
33
+ hash = super
34
+ hash['creator'] = @creator unless @creator.nil?
35
+ hash['name'] = @name unless @name.nil?
36
+ hash['version'] = @version unless @version.nil?
37
+ hash['extensionId'] = @extension_id unless @extension_id.nil?
38
+ hash
39
+ end
40
+
41
+ # loads shopping cart metadata from a parameter hash
42
+ def from_hash(hash)
43
+ super
44
+ @creator = hash['creator'] if hash.has_key? 'creator'
45
+ @name = hash['name'] if hash.has_key? 'name'
46
+ @version = hash['version'] if hash.has_key? 'version'
47
+ @extension_id = hash['extensionId'] if hash.has_key? 'extensionId'
48
+ end
49
+
50
+ attr_reader :creator, :name, :version, :extension_id
51
+ end
52
+ 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] result
10
+ class TestConnection < OnlinePayments::SDK::DataObject
11
+ attr_accessor :result
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['result'] = @result unless @result.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @result = hash['result'] if hash.key? 'result'
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/external_cardholder_authentication_data'
6
+ require 'onlinepayments/sdk/domain/redirection_data'
7
+ require 'onlinepayments/sdk/domain/three_d_secure_data'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [Long] authentication_amount
13
+ # @attr [String] challenge_canvas_size
14
+ # @attr [String] challenge_indicator
15
+ # @attr [String] exemption_request
16
+ # @attr [OnlinePayments::SDK::Domain::ExternalCardholderAuthenticationData] external_cardholder_authentication_data
17
+ # @attr [Integer] merchant_fraud_rate
18
+ # @attr [OnlinePayments::SDK::Domain::ThreeDSecureData] prior_three_d_secure_data
19
+ # @attr [OnlinePayments::SDK::Domain::RedirectionData] redirection_data
20
+ # @attr [true/false] secure_corporate_payment
21
+ # @attr [true/false] skip_authentication
22
+ # @attr [true/false] skip_soft_decline
23
+ class ThreeDSecure < OnlinePayments::SDK::DataObject
24
+ attr_accessor :authentication_amount
25
+ attr_accessor :challenge_canvas_size
26
+ attr_accessor :challenge_indicator
27
+ attr_accessor :exemption_request
28
+ attr_accessor :external_cardholder_authentication_data
29
+ attr_accessor :merchant_fraud_rate
30
+ attr_accessor :prior_three_d_secure_data
31
+ attr_accessor :redirection_data
32
+ attr_accessor :secure_corporate_payment
33
+ attr_accessor :skip_authentication
34
+ attr_accessor :skip_soft_decline
35
+
36
+ # @return (Hash)
37
+ def to_h
38
+ hash = super
39
+ hash['authenticationAmount'] = @authentication_amount unless @authentication_amount.nil?
40
+ hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
41
+ hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
42
+ hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
43
+ hash['externalCardholderAuthenticationData'] = @external_cardholder_authentication_data.to_h if @external_cardholder_authentication_data
44
+ hash['merchantFraudRate'] = @merchant_fraud_rate unless @merchant_fraud_rate.nil?
45
+ hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h if @prior_three_d_secure_data
46
+ hash['redirectionData'] = @redirection_data.to_h if @redirection_data
47
+ hash['secureCorporatePayment'] = @secure_corporate_payment unless @secure_corporate_payment.nil?
48
+ hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
49
+ hash['skipSoftDecline'] = @skip_soft_decline unless @skip_soft_decline.nil?
50
+ hash
51
+ end
52
+
53
+ def from_hash(hash)
54
+ super
55
+ @authentication_amount = hash['authenticationAmount'] if hash.key? 'authenticationAmount'
56
+ @challenge_canvas_size = hash['challengeCanvasSize'] if hash.key? 'challengeCanvasSize'
57
+ @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
58
+ @exemption_request = hash['exemptionRequest'] if hash.key? 'exemptionRequest'
59
+ if hash.key? 'externalCardholderAuthenticationData'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['externalCardholderAuthenticationData']] unless hash['externalCardholderAuthenticationData'].is_a? Hash
61
+ @external_cardholder_authentication_data = OnlinePayments::SDK::Domain::ExternalCardholderAuthenticationData.new_from_hash(hash['externalCardholderAuthenticationData'])
62
+ end
63
+ @merchant_fraud_rate = hash['merchantFraudRate'] if hash.key? 'merchantFraudRate'
64
+ if hash.key? 'priorThreeDSecureData'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['priorThreeDSecureData']] unless hash['priorThreeDSecureData'].is_a? Hash
66
+ @prior_three_d_secure_data = OnlinePayments::SDK::Domain::ThreeDSecureData.new_from_hash(hash['priorThreeDSecureData'])
67
+ end
68
+ if hash.key? 'redirectionData'
69
+ raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
70
+ @redirection_data = OnlinePayments::SDK::Domain::RedirectionData.new_from_hash(hash['redirectionData'])
71
+ end
72
+ @secure_corporate_payment = hash['secureCorporatePayment'] if hash.key? 'secureCorporatePayment'
73
+ @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
74
+ @skip_soft_decline = hash['skipSoftDecline'] if hash.key? 'skipSoftDecline'
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,58 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/three_d_secure_data'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] challenge_canvas_size
11
+ # @attr [String] challenge_indicator
12
+ # @attr [String] exemption_request
13
+ # @attr [Integer] merchant_fraud_rate
14
+ # @attr [OnlinePayments::SDK::Domain::ThreeDSecureData] prior_three_d_secure_data
15
+ # @attr [true/false] secure_corporate_payment
16
+ # @attr [true/false] skip_authentication
17
+ # @attr [true/false] skip_soft_decline
18
+ class ThreeDSecureBase < OnlinePayments::SDK::DataObject
19
+ attr_accessor :challenge_canvas_size
20
+ attr_accessor :challenge_indicator
21
+ attr_accessor :exemption_request
22
+ attr_accessor :merchant_fraud_rate
23
+ attr_accessor :prior_three_d_secure_data
24
+ attr_accessor :secure_corporate_payment
25
+ attr_accessor :skip_authentication
26
+ attr_accessor :skip_soft_decline
27
+
28
+ # @return (Hash)
29
+ def to_h
30
+ hash = super
31
+ hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
32
+ hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
33
+ hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
34
+ hash['merchantFraudRate'] = @merchant_fraud_rate unless @merchant_fraud_rate.nil?
35
+ hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h if @prior_three_d_secure_data
36
+ hash['secureCorporatePayment'] = @secure_corporate_payment unless @secure_corporate_payment.nil?
37
+ hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
38
+ hash['skipSoftDecline'] = @skip_soft_decline unless @skip_soft_decline.nil?
39
+ hash
40
+ end
41
+
42
+ def from_hash(hash)
43
+ super
44
+ @challenge_canvas_size = hash['challengeCanvasSize'] if hash.key? 'challengeCanvasSize'
45
+ @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
46
+ @exemption_request = hash['exemptionRequest'] if hash.key? 'exemptionRequest'
47
+ @merchant_fraud_rate = hash['merchantFraudRate'] if hash.key? 'merchantFraudRate'
48
+ if hash.key? 'priorThreeDSecureData'
49
+ raise TypeError, "value '%s' is not a Hash" % [hash['priorThreeDSecureData']] unless hash['priorThreeDSecureData'].is_a? Hash
50
+ @prior_three_d_secure_data = OnlinePayments::SDK::Domain::ThreeDSecureData.new_from_hash(hash['priorThreeDSecureData'])
51
+ end
52
+ @secure_corporate_payment = hash['secureCorporatePayment'] if hash.key? 'secureCorporatePayment'
53
+ @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
54
+ @skip_soft_decline = hash['skipSoftDecline'] if hash.key? 'skipSoftDecline'
55
+ end
56
+ end
57
+ end
58
+ 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] acs_transaction_id
10
+ # @attr [String] method
11
+ # @attr [String] utc_timestamp
12
+ class ThreeDSecureData < OnlinePayments::SDK::DataObject
13
+ attr_accessor :acs_transaction_id
14
+ attr_accessor :method
15
+ attr_accessor :utc_timestamp
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['acsTransactionId'] = @acs_transaction_id unless @acs_transaction_id.nil?
21
+ hash['method'] = @method unless @method.nil?
22
+ hash['utcTimestamp'] = @utc_timestamp unless @utc_timestamp.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @acs_transaction_id = hash['acsTransactionId'] if hash.key? 'acsTransactionId'
29
+ @method = hash['method'] if hash.key? 'method'
30
+ @utc_timestamp = hash['utcTimestamp'] if hash.key? 'utcTimestamp'
31
+ end
32
+ end
33
+ end
34
+ 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] eci
10
+ # @attr [String] xid
11
+ class ThreeDSecureResults < OnlinePayments::SDK::DataObject
12
+ attr_accessor :eci
13
+ attr_accessor :xid
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['eci'] = @eci unless @eci.nil?
19
+ hash['xid'] = @xid unless @xid.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @eci = hash['eci'] if hash.key? 'eci'
26
+ @xid = hash['xid'] if hash.key? 'xid'
27
+ end
28
+ end
29
+ end
30
+ 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_data'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] alias
11
+ # @attr [OnlinePayments::SDK::Domain::TokenCardData] data
12
+ class TokenCard < OnlinePayments::SDK::DataObject
13
+ attr_accessor :alias
14
+ attr_accessor :data
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['alias'] = @alias unless @alias.nil?
20
+ hash['data'] = @data.to_h if @data
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @alias = hash['alias'] if hash.key? 'alias'
27
+ if hash.key? 'data'
28
+ raise TypeError, "value '%s' is not a Hash" % [hash['data']] unless hash['data'].is_a? Hash
29
+ @data = OnlinePayments::SDK::Domain::TokenCardData.new_from_hash(hash['data'])
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card_without_cvv'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::CardWithoutCvv] card_without_cvv
11
+ class TokenCardData < OnlinePayments::SDK::DataObject
12
+ attr_accessor :card_without_cvv
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['cardWithoutCvv'] = @card_without_cvv.to_h if @card_without_cvv
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.key? 'cardWithoutCvv'
24
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardWithoutCvv']] unless hash['cardWithoutCvv'].is_a? Hash
25
+ @card_without_cvv = OnlinePayments::SDK::Domain::CardWithoutCvv.new_from_hash(hash['cardWithoutCvv'])
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/token_data'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::TokenData] data
11
+ class TokenCardSpecificInput < OnlinePayments::SDK::DataObject
12
+ attr_accessor :data
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['data'] = @data.to_h if @data
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.key? 'data'
24
+ raise TypeError, "value '%s' is not a Hash" % [hash['data']] unless hash['data'].is_a? Hash
25
+ @data = OnlinePayments::SDK::Domain::TokenData.new_from_hash(hash['data'])
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
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
+ class TokenData < OnlinePayments::SDK::DataObject
12
+ attr_accessor :card
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['card'] = @card.to_h if @card
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.key? 'card'
24
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
25
+ @card = OnlinePayments::SDK::Domain::Card.new_from_hash(hash['card'])
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/customer_token'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] alias
11
+ # @attr [OnlinePayments::SDK::Domain::CustomerToken] customer
12
+ class TokenEWallet < OnlinePayments::SDK::DataObject
13
+ attr_accessor :alias
14
+ attr_accessor :customer
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['alias'] = @alias unless @alias.nil?
20
+ hash['customer'] = @customer.to_h if @customer
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @alias = hash['alias'] if hash.key? 'alias'
27
+ if hash.key? 'customer'
28
+ raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
29
+ @customer = OnlinePayments::SDK::Domain::CustomerToken.new_from_hash(hash['customer'])
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,58 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/external_token_linked'
6
+ require 'onlinepayments/sdk/domain/token_card'
7
+ require 'onlinepayments/sdk/domain/token_e_wallet'
8
+
9
+ module OnlinePayments::SDK
10
+ module Domain
11
+
12
+ # @attr [OnlinePayments::SDK::Domain::TokenCard] card
13
+ # @attr [OnlinePayments::SDK::Domain::TokenEWallet] e_wallet
14
+ # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
15
+ # @attr [String] id
16
+ # @attr [true/false] is_temporary
17
+ # @attr [Integer] payment_product_id
18
+ class TokenResponse < OnlinePayments::SDK::DataObject
19
+ attr_accessor :card
20
+ attr_accessor :e_wallet
21
+ attr_accessor :external_token_linked
22
+ attr_accessor :id
23
+ attr_accessor :is_temporary
24
+ attr_accessor :payment_product_id
25
+
26
+ # @return (Hash)
27
+ def to_h
28
+ hash = super
29
+ hash['card'] = @card.to_h if @card
30
+ hash['eWallet'] = @e_wallet.to_h if @e_wallet
31
+ hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
32
+ hash['id'] = @id unless @id.nil?
33
+ hash['isTemporary'] = @is_temporary unless @is_temporary.nil?
34
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
35
+ hash
36
+ end
37
+
38
+ def from_hash(hash)
39
+ super
40
+ if hash.key? 'card'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
42
+ @card = OnlinePayments::SDK::Domain::TokenCard.new_from_hash(hash['card'])
43
+ end
44
+ if hash.key? 'eWallet'
45
+ raise TypeError, "value '%s' is not a Hash" % [hash['eWallet']] unless hash['eWallet'].is_a? Hash
46
+ @e_wallet = OnlinePayments::SDK::Domain::TokenEWallet.new_from_hash(hash['eWallet'])
47
+ end
48
+ if hash.key? 'externalTokenLinked'
49
+ raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
50
+ @external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
51
+ end
52
+ @id = hash['id'] if hash.key? 'id'
53
+ @is_temporary = hash['isTemporary'] if hash.key? 'isTemporary'
54
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_product_field_display_element'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [Array<OnlinePayments::SDK::Domain::PaymentProductFieldDisplayElement>] display_elements
11
+ # @attr [String] value
12
+ class ValueMappingElement < OnlinePayments::SDK::DataObject
13
+ attr_accessor :display_elements
14
+ attr_accessor :value
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['displayElements'] = @display_elements.collect(&:to_h) if @display_elements
20
+ hash['value'] = @value unless @value.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'displayElements'
27
+ raise TypeError, "value '%s' is not an Array" % [hash['displayElements']] unless hash['displayElements'].is_a? Array
28
+ @display_elements = []
29
+ hash['displayElements'].each do |e|
30
+ @display_elements << OnlinePayments::SDK::Domain::PaymentProductFieldDisplayElement.new_from_hash(e)
31
+ end
32
+ end
33
+ @value = hash['value'] if hash.key? 'value'
34
+ end
35
+ end
36
+ end
37
+ end