direct-sdk-ruby 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +141 -0
  5. data/Rakefile +34 -0
  6. data/direct-sdk-ruby.gemspec +28 -0
  7. data/lib/ingenico/direct/sdk.rb +26 -0
  8. data/lib/ingenico/direct/sdk/api_exception.rb +42 -0
  9. data/lib/ingenico/direct/sdk/api_resource.rb +115 -0
  10. data/lib/ingenico/direct/sdk/authenticator.rb +16 -0
  11. data/lib/ingenico/direct/sdk/authorization_exception.rb +13 -0
  12. data/lib/ingenico/direct/sdk/call_context.rb +26 -0
  13. data/lib/ingenico/direct/sdk/client.rb +85 -0
  14. data/lib/ingenico/direct/sdk/communication_exception.rb +16 -0
  15. data/lib/ingenico/direct/sdk/communicator.rb +301 -0
  16. data/lib/ingenico/direct/sdk/communicator_configuration.rb +59 -0
  17. data/lib/ingenico/direct/sdk/connection.rb +41 -0
  18. data/lib/ingenico/direct/sdk/data_object.rb +32 -0
  19. data/lib/ingenico/direct/sdk/declined_payment_exception.rb +30 -0
  20. data/lib/ingenico/direct/sdk/declined_payout_exception.rb +32 -0
  21. data/lib/ingenico/direct/sdk/declined_refund_exception.rb +32 -0
  22. data/lib/ingenico/direct/sdk/declined_transaction_exception.rb +16 -0
  23. data/lib/ingenico/direct/sdk/defaultimpl.rb +6 -0
  24. data/lib/ingenico/direct/sdk/defaultimpl/authorization_type.rb +24 -0
  25. data/lib/ingenico/direct/sdk/defaultimpl/default_authenticator.rb +108 -0
  26. data/lib/ingenico/direct/sdk/defaultimpl/default_connection.rb +293 -0
  27. data/lib/ingenico/direct/sdk/defaultimpl/default_marshaller.rb +32 -0
  28. data/lib/ingenico/direct/sdk/direct_exception.rb +15 -0
  29. data/lib/ingenico/direct/sdk/domain/account_on_file.rb +50 -0
  30. data/lib/ingenico/direct/sdk/domain/account_on_file_attribute.rb +39 -0
  31. data/lib/ingenico/direct/sdk/domain/account_on_file_display_hints.rb +38 -0
  32. data/lib/ingenico/direct/sdk/domain/additional_order_input.rb +47 -0
  33. data/lib/ingenico/direct/sdk/domain/address.rb +51 -0
  34. data/lib/ingenico/direct/sdk/domain/address_personal.rb +59 -0
  35. data/lib/ingenico/direct/sdk/domain/airline_data.rb +129 -0
  36. data/lib/ingenico/direct/sdk/domain/airline_flight_leg.rb +99 -0
  37. data/lib/ingenico/direct/sdk/domain/airline_passenger.rb +39 -0
  38. data/lib/ingenico/direct/sdk/domain/amount_breakdown.rb +31 -0
  39. data/lib/ingenico/direct/sdk/domain/amount_of_money.rb +31 -0
  40. data/lib/ingenico/direct/sdk/domain/api_error.rb +47 -0
  41. data/lib/ingenico/direct/sdk/domain/browser_data.rb +39 -0
  42. data/lib/ingenico/direct/sdk/domain/cancel_payment_response.rb +31 -0
  43. data/lib/ingenico/direct/sdk/domain/capture.rb +47 -0
  44. data/lib/ingenico/direct/sdk/domain/capture_output.rb +79 -0
  45. data/lib/ingenico/direct/sdk/domain/capture_payment_request.rb +31 -0
  46. data/lib/ingenico/direct/sdk/domain/capture_response.rb +47 -0
  47. data/lib/ingenico/direct/sdk/domain/capture_status_output.rb +27 -0
  48. data/lib/ingenico/direct/sdk/domain/captures_response.rb +34 -0
  49. data/lib/ingenico/direct/sdk/domain/card.rb +39 -0
  50. data/lib/ingenico/direct/sdk/domain/card_essentials.rb +31 -0
  51. data/lib/ingenico/direct/sdk/domain/card_fraud_results.rb +35 -0
  52. data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb +95 -0
  53. data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_input_base.rb +79 -0
  54. data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb +67 -0
  55. data/lib/ingenico/direct/sdk/domain/card_payout_method_specific_input.rb +39 -0
  56. data/lib/ingenico/direct/sdk/domain/card_recurrence_details.rb +27 -0
  57. data/lib/ingenico/direct/sdk/domain/card_without_cvv.rb +35 -0
  58. data/lib/ingenico/direct/sdk/domain/company_information.rb +27 -0
  59. data/lib/ingenico/direct/sdk/domain/complete_payment_card_payment_method_specific_input.rb +31 -0
  60. data/lib/ingenico/direct/sdk/domain/complete_payment_request.rb +39 -0
  61. data/lib/ingenico/direct/sdk/domain/complete_payment_response.rb +47 -0
  62. data/lib/ingenico/direct/sdk/domain/contact_details.rb +43 -0
  63. data/lib/ingenico/direct/sdk/domain/create_hosted_checkout_request.rb +63 -0
  64. data/lib/ingenico/direct/sdk/domain/create_hosted_checkout_response.rb +49 -0
  65. data/lib/ingenico/direct/sdk/domain/create_hosted_tokenization_request.rb +39 -0
  66. data/lib/ingenico/direct/sdk/domain/create_hosted_tokenization_response.rb +41 -0
  67. data/lib/ingenico/direct/sdk/domain/create_payment_request.rb +67 -0
  68. data/lib/ingenico/direct/sdk/domain/create_payment_response.rb +47 -0
  69. data/lib/ingenico/direct/sdk/domain/create_payout_request.rb +47 -0
  70. data/lib/ingenico/direct/sdk/domain/create_token_request.rb +35 -0
  71. data/lib/ingenico/direct/sdk/domain/created_payment_output.rb +35 -0
  72. data/lib/ingenico/direct/sdk/domain/created_token_response.rb +51 -0
  73. data/lib/ingenico/direct/sdk/domain/customer.rb +87 -0
  74. data/lib/ingenico/direct/sdk/domain/customer_account.rb +71 -0
  75. data/lib/ingenico/direct/sdk/domain/customer_account_authentication.rb +31 -0
  76. data/lib/ingenico/direct/sdk/domain/customer_device.rb +51 -0
  77. data/lib/ingenico/direct/sdk/domain/customer_payment_activity.rb +35 -0
  78. data/lib/ingenico/direct/sdk/domain/customer_token.rb +47 -0
  79. data/lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb +43 -0
  80. data/lib/ingenico/direct/sdk/domain/directory_entry.rb +35 -0
  81. data/lib/ingenico/direct/sdk/domain/empty_validator.rb +13 -0
  82. data/lib/ingenico/direct/sdk/domain/error_response.rb +38 -0
  83. data/lib/ingenico/direct/sdk/domain/external_cardholder_authentication_data.rb +59 -0
  84. data/lib/ingenico/direct/sdk/domain/external_token_linked.rb +27 -0
  85. data/lib/ingenico/direct/sdk/domain/fixed_list_validator.rb +33 -0
  86. data/lib/ingenico/direct/sdk/domain/fraud_fields.rb +31 -0
  87. data/lib/ingenico/direct/sdk/domain/fraud_results.rb +27 -0
  88. data/lib/ingenico/direct/sdk/domain/g_pay_three_d_secure.rb +47 -0
  89. data/lib/ingenico/direct/sdk/domain/get_hosted_checkout_response.rb +35 -0
  90. data/lib/ingenico/direct/sdk/domain/get_hosted_tokenization_response.rb +35 -0
  91. data/lib/ingenico/direct/sdk/domain/get_payment_product_groups_response.rb +34 -0
  92. data/lib/ingenico/direct/sdk/domain/get_payment_products_response.rb +34 -0
  93. data/lib/ingenico/direct/sdk/domain/gift_card_purchase.rb +35 -0
  94. data/lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb +55 -0
  95. data/lib/ingenico/direct/sdk/domain/hosted_checkout_specific_output.rb +31 -0
  96. data/lib/ingenico/direct/sdk/domain/label_template_element.rb +31 -0
  97. data/lib/ingenico/direct/sdk/domain/length_validator.rb +31 -0
  98. data/lib/ingenico/direct/sdk/domain/line_item.rb +47 -0
  99. data/lib/ingenico/direct/sdk/domain/line_item_invoice_data.rb +27 -0
  100. data/lib/ingenico/direct/sdk/domain/loan_recipient.rb +43 -0
  101. data/lib/ingenico/direct/sdk/domain/merchant_action.rb +35 -0
  102. data/lib/ingenico/direct/sdk/domain/mobile_payment_data.rb +31 -0
  103. data/lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_input.rb +63 -0
  104. data/lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb +59 -0
  105. data/lib/ingenico/direct/sdk/domain/mobile_payment_product320_specific_input.rb +31 -0
  106. data/lib/ingenico/direct/sdk/domain/order.rb +71 -0
  107. data/lib/ingenico/direct/sdk/domain/order_line_details.rb +55 -0
  108. data/lib/ingenico/direct/sdk/domain/order_references.rb +31 -0
  109. data/lib/ingenico/direct/sdk/domain/order_status_output.rb +50 -0
  110. data/lib/ingenico/direct/sdk/domain/order_type_information.rb +31 -0
  111. data/lib/ingenico/direct/sdk/domain/payment_account_on_file.rb +31 -0
  112. data/lib/ingenico/direct/sdk/domain/payment_creation_output.rb +39 -0
  113. data/lib/ingenico/direct/sdk/domain/payment_error_response.rb +46 -0
  114. data/lib/ingenico/direct/sdk/domain/payment_output.rb +79 -0
  115. data/lib/ingenico/direct/sdk/domain/payment_product.rb +77 -0
  116. data/lib/ingenico/direct/sdk/domain/payment_product5100_specific_input.rb +27 -0
  117. data/lib/ingenico/direct/sdk/domain/payment_product5402_specific_output.rb +27 -0
  118. data/lib/ingenico/direct/sdk/domain/payment_product5500_specific_output.rb +35 -0
  119. data/lib/ingenico/direct/sdk/domain/payment_product771_specific_output.rb +13 -0
  120. data/lib/ingenico/direct/sdk/domain/payment_product840_customer_account.rb +55 -0
  121. data/lib/ingenico/direct/sdk/domain/payment_product840_specific_output.rb +54 -0
  122. data/lib/ingenico/direct/sdk/domain/payment_product_display_hints.rb +35 -0
  123. data/lib/ingenico/direct/sdk/domain/payment_product_field.rb +47 -0
  124. data/lib/ingenico/direct/sdk/domain/payment_product_field_data_restrictions.rb +35 -0
  125. data/lib/ingenico/direct/sdk/domain/payment_product_field_display_element.rb +39 -0
  126. data/lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb +71 -0
  127. data/lib/ingenico/direct/sdk/domain/payment_product_field_form_element.rb +38 -0
  128. data/lib/ingenico/direct/sdk/domain/payment_product_field_tooltip.rb +31 -0
  129. data/lib/ingenico/direct/sdk/domain/payment_product_field_validators.rb +91 -0
  130. data/lib/ingenico/direct/sdk/domain/payment_product_filter.rb +43 -0
  131. data/lib/ingenico/direct/sdk/domain/payment_product_filters_hosted_checkout.rb +38 -0
  132. data/lib/ingenico/direct/sdk/domain/payment_product_group.rb +43 -0
  133. data/lib/ingenico/direct/sdk/domain/payment_product_networks_response.rb +33 -0
  134. data/lib/ingenico/direct/sdk/domain/payment_references.rb +27 -0
  135. data/lib/ingenico/direct/sdk/domain/payment_response.rb +55 -0
  136. data/lib/ingenico/direct/sdk/domain/payment_status_output.rb +58 -0
  137. data/lib/ingenico/direct/sdk/domain/payout_error_response.rb +46 -0
  138. data/lib/ingenico/direct/sdk/domain/payout_output.rb +31 -0
  139. data/lib/ingenico/direct/sdk/domain/payout_response.rb +47 -0
  140. data/lib/ingenico/direct/sdk/domain/payout_result.rb +47 -0
  141. data/lib/ingenico/direct/sdk/domain/payout_status_output.rb +35 -0
  142. data/lib/ingenico/direct/sdk/domain/personal_information.rb +39 -0
  143. data/lib/ingenico/direct/sdk/domain/personal_information_token.rb +31 -0
  144. data/lib/ingenico/direct/sdk/domain/personal_name.rb +35 -0
  145. data/lib/ingenico/direct/sdk/domain/personal_name_token.rb +31 -0
  146. data/lib/ingenico/direct/sdk/domain/product_directory.rb +34 -0
  147. data/lib/ingenico/direct/sdk/domain/protection_eligibility.rb +31 -0
  148. data/lib/ingenico/direct/sdk/domain/range_validator.rb +31 -0
  149. data/lib/ingenico/direct/sdk/domain/redirect_data.rb +31 -0
  150. data/lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_input.rb +67 -0
  151. data/lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_output.rb +67 -0
  152. data/lib/ingenico/direct/sdk/domain/redirect_payment_product809_specific_input.rb +27 -0
  153. data/lib/ingenico/direct/sdk/domain/redirect_payment_product840_specific_input.rb +27 -0
  154. data/lib/ingenico/direct/sdk/domain/redirection_data.rb +27 -0
  155. data/lib/ingenico/direct/sdk/domain/refund_card_method_specific_output.rb +31 -0
  156. data/lib/ingenico/direct/sdk/domain/refund_e_wallet_method_specific_output.rb +39 -0
  157. data/lib/ingenico/direct/sdk/domain/refund_error_response.rb +46 -0
  158. data/lib/ingenico/direct/sdk/domain/refund_mobile_method_specific_output.rb +35 -0
  159. data/lib/ingenico/direct/sdk/domain/refund_output.rb +79 -0
  160. data/lib/ingenico/direct/sdk/domain/refund_payment_product840_customer_account.rb +35 -0
  161. data/lib/ingenico/direct/sdk/domain/refund_payment_product840_specific_output.rb +31 -0
  162. data/lib/ingenico/direct/sdk/domain/refund_redirect_method_specific_output.rb +31 -0
  163. data/lib/ingenico/direct/sdk/domain/refund_request.rb +31 -0
  164. data/lib/ingenico/direct/sdk/domain/refund_response.rb +47 -0
  165. data/lib/ingenico/direct/sdk/domain/refunds_response.rb +34 -0
  166. data/lib/ingenico/direct/sdk/domain/regular_expression_validator.rb +27 -0
  167. data/lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +43 -0
  168. data/lib/ingenico/direct/sdk/domain/session_request.rb +33 -0
  169. data/lib/ingenico/direct/sdk/domain/session_response.rb +49 -0
  170. data/lib/ingenico/direct/sdk/domain/shipping.rb +51 -0
  171. data/lib/ingenico/direct/sdk/domain/shopping_cart.rb +65 -0
  172. data/lib/ingenico/direct/sdk/domain/shopping_cart_extension.rb +52 -0
  173. data/lib/ingenico/direct/sdk/domain/test_connection.rb +27 -0
  174. data/lib/ingenico/direct/sdk/domain/three_d_secure.rb +63 -0
  175. data/lib/ingenico/direct/sdk/domain/three_d_secure_base.rb +47 -0
  176. data/lib/ingenico/direct/sdk/domain/three_d_secure_data.rb +35 -0
  177. data/lib/ingenico/direct/sdk/domain/three_d_secure_results.rb +31 -0
  178. data/lib/ingenico/direct/sdk/domain/token_card.rb +35 -0
  179. data/lib/ingenico/direct/sdk/domain/token_card_data.rb +31 -0
  180. data/lib/ingenico/direct/sdk/domain/token_card_specific_input.rb +31 -0
  181. data/lib/ingenico/direct/sdk/domain/token_data.rb +31 -0
  182. data/lib/ingenico/direct/sdk/domain/token_e_wallet.rb +35 -0
  183. data/lib/ingenico/direct/sdk/domain/token_response.rb +55 -0
  184. data/lib/ingenico/direct/sdk/domain/value_mapping_element.rb +38 -0
  185. data/lib/ingenico/direct/sdk/endpoint_configuration.rb +127 -0
  186. data/lib/ingenico/direct/sdk/exceptions.rb +8 -0
  187. data/lib/ingenico/direct/sdk/factory.rb +136 -0
  188. data/lib/ingenico/direct/sdk/idempotence_exception.rb +24 -0
  189. data/lib/ingenico/direct/sdk/logging.rb +10 -0
  190. data/lib/ingenico/direct/sdk/logging/communicator_logger.rb +22 -0
  191. data/lib/ingenico/direct/sdk/logging/log_message_builder.rb +56 -0
  192. data/lib/ingenico/direct/sdk/logging/logging_capable.rb +19 -0
  193. data/lib/ingenico/direct/sdk/logging/logging_util.rb +271 -0
  194. data/lib/ingenico/direct/sdk/logging/request_log_message_builder.rb +39 -0
  195. data/lib/ingenico/direct/sdk/logging/response_log_message_builder.rb +34 -0
  196. data/lib/ingenico/direct/sdk/logging/ruby_communicator_logger.rb +57 -0
  197. data/lib/ingenico/direct/sdk/logging/stdout_communicator_logger.rb +34 -0
  198. data/lib/ingenico/direct/sdk/marshaller.rb +24 -0
  199. data/lib/ingenico/direct/sdk/marshaller_syntax_exception.rb +6 -0
  200. data/lib/ingenico/direct/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +87 -0
  201. data/lib/ingenico/direct/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +87 -0
  202. data/lib/ingenico/direct/sdk/merchant/merchant_client.rb +83 -0
  203. data/lib/ingenico/direct/sdk/merchant/payments/payments_client.rb +291 -0
  204. data/lib/ingenico/direct/sdk/merchant/payouts/payouts_client.rb +87 -0
  205. data/lib/ingenico/direct/sdk/merchant/productgroups/get_product_group_params.rb +58 -0
  206. data/lib/ingenico/direct/sdk/merchant/productgroups/get_product_groups_params.rb +58 -0
  207. data/lib/ingenico/direct/sdk/merchant/productgroups/product_groups_client.rb +88 -0
  208. data/lib/ingenico/direct/sdk/merchant/products/get_payment_product_networks_params.rb +39 -0
  209. data/lib/ingenico/direct/sdk/merchant/products/get_payment_product_params.rb +58 -0
  210. data/lib/ingenico/direct/sdk/merchant/products/get_payment_products_params.rb +58 -0
  211. data/lib/ingenico/direct/sdk/merchant/products/get_product_directory_params.rb +31 -0
  212. data/lib/ingenico/direct/sdk/merchant/products/products_client.rb +156 -0
  213. data/lib/ingenico/direct/sdk/merchant/services/services_client.rb +52 -0
  214. data/lib/ingenico/direct/sdk/merchant/sessions/sessions_client.rb +55 -0
  215. data/lib/ingenico/direct/sdk/merchant/tokens/tokens_client.rb +117 -0
  216. data/lib/ingenico/direct/sdk/meta_data_provider.rb +150 -0
  217. data/lib/ingenico/direct/sdk/modules.rb +71 -0
  218. data/lib/ingenico/direct/sdk/not_found_exception.rb +16 -0
  219. data/lib/ingenico/direct/sdk/param_request.rb +11 -0
  220. data/lib/ingenico/direct/sdk/pooled_connection.rb +21 -0
  221. data/lib/ingenico/direct/sdk/proxy_configuration.rb +74 -0
  222. data/lib/ingenico/direct/sdk/reference_exception.rb +14 -0
  223. data/lib/ingenico/direct/sdk/request_header.rb +50 -0
  224. data/lib/ingenico/direct/sdk/request_param.rb +23 -0
  225. data/lib/ingenico/direct/sdk/response_exception.rb +47 -0
  226. data/lib/ingenico/direct/sdk/response_header.rb +42 -0
  227. data/lib/ingenico/direct/sdk/validation_exception.rb +14 -0
  228. data/lib/ingenico/direct/sdk/webhooks.rb +11 -0
  229. data/lib/ingenico/direct/sdk/webhooks/api_version_mismatch_exception.rb +20 -0
  230. data/lib/ingenico/direct/sdk/webhooks/in_memory_secret_key_store.rb +56 -0
  231. data/lib/ingenico/direct/sdk/webhooks/secret_key_not_available_exception.rb +17 -0
  232. data/lib/ingenico/direct/sdk/webhooks/secret_key_store.rb +16 -0
  233. data/lib/ingenico/direct/sdk/webhooks/signature_validation_exception.rb +19 -0
  234. data/lib/ingenico/direct/sdk/webhooks/webhooks.rb +22 -0
  235. data/lib/ingenico/direct/sdk/webhooks/webhooks_event.rb +58 -0
  236. data/lib/ingenico/direct/sdk/webhooks/webhooks_helper.rb +99 -0
  237. data/lib/ingenico/direct/sdk/webhooks/webhooks_helper_builder.rb +25 -0
  238. metadata +385 -0
@@ -0,0 +1,13 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+
7
+ module Ingenico::Direct::SDK
8
+ module Domain
9
+
10
+ class PaymentProduct771SpecificOutput < Ingenico::Direct::SDK::DataObject
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,55 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+
7
+ module Ingenico::Direct::SDK
8
+ module Domain
9
+
10
+ # @attr [String] account_id
11
+ # @attr [String] company_name
12
+ # @attr [String] country_code
13
+ # @attr [String] customer_account_status
14
+ # @attr [String] customer_address_status
15
+ # @attr [String] first_name
16
+ # @attr [String] payer_id
17
+ # @attr [String] surname
18
+ class PaymentProduct840CustomerAccount < Ingenico::Direct::SDK::DataObject
19
+ attr_accessor :account_id
20
+ attr_accessor :company_name
21
+ attr_accessor :country_code
22
+ attr_accessor :customer_account_status
23
+ attr_accessor :customer_address_status
24
+ attr_accessor :first_name
25
+ attr_accessor :payer_id
26
+ attr_accessor :surname
27
+
28
+ # @return (Hash)
29
+ def to_h
30
+ hash = super
31
+ hash['accountId'] = @account_id unless @account_id.nil?
32
+ hash['companyName'] = @company_name unless @company_name.nil?
33
+ hash['countryCode'] = @country_code unless @country_code.nil?
34
+ hash['customerAccountStatus'] = @customer_account_status unless @customer_account_status.nil?
35
+ hash['customerAddressStatus'] = @customer_address_status unless @customer_address_status.nil?
36
+ hash['firstName'] = @first_name unless @first_name.nil?
37
+ hash['payerId'] = @payer_id unless @payer_id.nil?
38
+ hash['surname'] = @surname unless @surname.nil?
39
+ hash
40
+ end
41
+
42
+ def from_hash(hash)
43
+ super
44
+ @account_id = hash['accountId'] if hash.key? 'accountId'
45
+ @company_name = hash['companyName'] if hash.key? 'companyName'
46
+ @country_code = hash['countryCode'] if hash.key? 'countryCode'
47
+ @customer_account_status = hash['customerAccountStatus'] if hash.key? 'customerAccountStatus'
48
+ @customer_address_status = hash['customerAddressStatus'] if hash.key? 'customerAddressStatus'
49
+ @first_name = hash['firstName'] if hash.key? 'firstName'
50
+ @payer_id = hash['payerId'] if hash.key? 'payerId'
51
+ @surname = hash['surname'] if hash.key? 'surname'
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,54 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/address'
7
+ require 'ingenico/direct/sdk/domain/payment_product840_customer_account'
8
+ require 'ingenico/direct/sdk/domain/protection_eligibility'
9
+
10
+ module Ingenico::Direct::SDK
11
+ module Domain
12
+
13
+ # @attr [Ingenico::Direct::SDK::Domain::Address] billing_address
14
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProduct840CustomerAccount] customer_account
15
+ # @attr [Ingenico::Direct::SDK::Domain::Address] customer_address
16
+ # @attr [Ingenico::Direct::SDK::Domain::ProtectionEligibility] protection_eligibility
17
+ class PaymentProduct840SpecificOutput < Ingenico::Direct::SDK::DataObject
18
+ attr_accessor :billing_address
19
+ attr_accessor :customer_account
20
+ attr_accessor :customer_address
21
+ attr_accessor :protection_eligibility
22
+
23
+ # @return (Hash)
24
+ def to_h
25
+ hash = super
26
+ hash['billingAddress'] = @billing_address.to_h if @billing_address
27
+ hash['customerAccount'] = @customer_account.to_h if @customer_account
28
+ hash['customerAddress'] = @customer_address.to_h if @customer_address
29
+ hash['protectionEligibility'] = @protection_eligibility.to_h if @protection_eligibility
30
+ hash
31
+ end
32
+
33
+ def from_hash(hash)
34
+ super
35
+ if hash.key? 'billingAddress'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
37
+ @billing_address = Ingenico::Direct::SDK::Domain::Address.new_from_hash(hash['billingAddress'])
38
+ end
39
+ if hash.key? 'customerAccount'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
41
+ @customer_account = Ingenico::Direct::SDK::Domain::PaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount'])
42
+ end
43
+ if hash.key? 'customerAddress'
44
+ raise TypeError, "value '%s' is not a Hash" % [hash['customerAddress']] unless hash['customerAddress'].is_a? Hash
45
+ @customer_address = Ingenico::Direct::SDK::Domain::Address.new_from_hash(hash['customerAddress'])
46
+ end
47
+ if hash.key? 'protectionEligibility'
48
+ raise TypeError, "value '%s' is not a Hash" % [hash['protectionEligibility']] unless hash['protectionEligibility'].is_a? Hash
49
+ @protection_eligibility = Ingenico::Direct::SDK::Domain::ProtectionEligibility.new_from_hash(hash['protectionEligibility'])
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,35 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+
7
+ module Ingenico::Direct::SDK
8
+ module Domain
9
+
10
+ # @attr [Integer] display_order
11
+ # @attr [String] label
12
+ # @attr [String] logo
13
+ class PaymentProductDisplayHints < Ingenico::Direct::SDK::DataObject
14
+ attr_accessor :display_order
15
+ attr_accessor :label
16
+ attr_accessor :logo
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['displayOrder'] = @display_order unless @display_order.nil?
22
+ hash['label'] = @label unless @label.nil?
23
+ hash['logo'] = @logo unless @logo.nil?
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ @display_order = hash['displayOrder'] if hash.key? 'displayOrder'
30
+ @label = hash['label'] if hash.key? 'label'
31
+ @logo = hash['logo'] if hash.key? 'logo'
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,47 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/payment_product_field_data_restrictions'
7
+ require 'ingenico/direct/sdk/domain/payment_product_field_display_hints'
8
+
9
+ module Ingenico::Direct::SDK
10
+ module Domain
11
+
12
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductFieldDataRestrictions] data_restrictions
13
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints] display_hints
14
+ # @attr [String] id
15
+ # @attr [String] type
16
+ class PaymentProductField < Ingenico::Direct::SDK::DataObject
17
+ attr_accessor :data_restrictions
18
+ attr_accessor :display_hints
19
+ attr_accessor :id
20
+ attr_accessor :type
21
+
22
+ # @return (Hash)
23
+ def to_h
24
+ hash = super
25
+ hash['dataRestrictions'] = @data_restrictions.to_h if @data_restrictions
26
+ hash['displayHints'] = @display_hints.to_h if @display_hints
27
+ hash['id'] = @id unless @id.nil?
28
+ hash['type'] = @type unless @type.nil?
29
+ hash
30
+ end
31
+
32
+ def from_hash(hash)
33
+ super
34
+ if hash.key? 'dataRestrictions'
35
+ raise TypeError, "value '%s' is not a Hash" % [hash['dataRestrictions']] unless hash['dataRestrictions'].is_a? Hash
36
+ @data_restrictions = Ingenico::Direct::SDK::Domain::PaymentProductFieldDataRestrictions.new_from_hash(hash['dataRestrictions'])
37
+ end
38
+ if hash.key? 'displayHints'
39
+ raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
40
+ @display_hints = Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints.new_from_hash(hash['displayHints'])
41
+ end
42
+ @id = hash['id'] if hash.key? 'id'
43
+ @type = hash['type'] if hash.key? 'type'
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,35 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/payment_product_field_validators'
7
+
8
+ module Ingenico::Direct::SDK
9
+ module Domain
10
+
11
+ # @attr [true/false] is_required
12
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductFieldValidators] validators
13
+ class PaymentProductFieldDataRestrictions < Ingenico::Direct::SDK::DataObject
14
+ attr_accessor :is_required
15
+ attr_accessor :validators
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['isRequired'] = @is_required unless @is_required.nil?
21
+ hash['validators'] = @validators.to_h if @validators
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ @is_required = hash['isRequired'] if hash.key? 'isRequired'
28
+ if hash.key? 'validators'
29
+ raise TypeError, "value '%s' is not a Hash" % [hash['validators']] unless hash['validators'].is_a? Hash
30
+ @validators = Ingenico::Direct::SDK::Domain::PaymentProductFieldValidators.new_from_hash(hash['validators'])
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+
7
+ module Ingenico::Direct::SDK
8
+ module Domain
9
+
10
+ # @attr [String] id
11
+ # @attr [String] label
12
+ # @attr [String] type
13
+ # @attr [String] value
14
+ class PaymentProductFieldDisplayElement < Ingenico::Direct::SDK::DataObject
15
+ attr_accessor :id
16
+ attr_accessor :label
17
+ attr_accessor :type
18
+ attr_accessor :value
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['id'] = @id unless @id.nil?
24
+ hash['label'] = @label unless @label.nil?
25
+ hash['type'] = @type unless @type.nil?
26
+ hash['value'] = @value unless @value.nil?
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ @id = hash['id'] if hash.key? 'id'
33
+ @label = hash['label'] if hash.key? 'label'
34
+ @type = hash['type'] if hash.key? 'type'
35
+ @value = hash['value'] if hash.key? 'value'
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,71 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/payment_product_field_form_element'
7
+ require 'ingenico/direct/sdk/domain/payment_product_field_tooltip'
8
+
9
+ module Ingenico::Direct::SDK
10
+ module Domain
11
+
12
+ # @attr [true/false] always_show
13
+ # @attr [Integer] display_order
14
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductFieldFormElement] form_element
15
+ # @attr [String] label
16
+ # @attr [String] link
17
+ # @attr [String] mask
18
+ # @attr [true/false] obfuscate
19
+ # @attr [String] placeholder_label
20
+ # @attr [String] preferred_input_type
21
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductFieldTooltip] tooltip
22
+ class PaymentProductFieldDisplayHints < Ingenico::Direct::SDK::DataObject
23
+ attr_accessor :always_show
24
+ attr_accessor :display_order
25
+ attr_accessor :form_element
26
+ attr_accessor :label
27
+ attr_accessor :link
28
+ attr_accessor :mask
29
+ attr_accessor :obfuscate
30
+ attr_accessor :placeholder_label
31
+ attr_accessor :preferred_input_type
32
+ attr_accessor :tooltip
33
+
34
+ # @return (Hash)
35
+ def to_h
36
+ hash = super
37
+ hash['alwaysShow'] = @always_show unless @always_show.nil?
38
+ hash['displayOrder'] = @display_order unless @display_order.nil?
39
+ hash['formElement'] = @form_element.to_h if @form_element
40
+ hash['label'] = @label unless @label.nil?
41
+ hash['link'] = @link unless @link.nil?
42
+ hash['mask'] = @mask unless @mask.nil?
43
+ hash['obfuscate'] = @obfuscate unless @obfuscate.nil?
44
+ hash['placeholderLabel'] = @placeholder_label unless @placeholder_label.nil?
45
+ hash['preferredInputType'] = @preferred_input_type unless @preferred_input_type.nil?
46
+ hash['tooltip'] = @tooltip.to_h if @tooltip
47
+ hash
48
+ end
49
+
50
+ def from_hash(hash)
51
+ super
52
+ @always_show = hash['alwaysShow'] if hash.key? 'alwaysShow'
53
+ @display_order = hash['displayOrder'] if hash.key? 'displayOrder'
54
+ if hash.key? 'formElement'
55
+ raise TypeError, "value '%s' is not a Hash" % [hash['formElement']] unless hash['formElement'].is_a? Hash
56
+ @form_element = Ingenico::Direct::SDK::Domain::PaymentProductFieldFormElement.new_from_hash(hash['formElement'])
57
+ end
58
+ @label = hash['label'] if hash.key? 'label'
59
+ @link = hash['link'] if hash.key? 'link'
60
+ @mask = hash['mask'] if hash.key? 'mask'
61
+ @obfuscate = hash['obfuscate'] if hash.key? 'obfuscate'
62
+ @placeholder_label = hash['placeholderLabel'] if hash.key? 'placeholderLabel'
63
+ @preferred_input_type = hash['preferredInputType'] if hash.key? 'preferredInputType'
64
+ if hash.key? 'tooltip'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['tooltip']] unless hash['tooltip'].is_a? Hash
66
+ @tooltip = Ingenico::Direct::SDK::Domain::PaymentProductFieldTooltip.new_from_hash(hash['tooltip'])
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/value_mapping_element'
7
+
8
+ module Ingenico::Direct::SDK
9
+ module Domain
10
+
11
+ # @attr [String] type
12
+ # @attr [Array<Ingenico::Direct::SDK::Domain::ValueMappingElement>] value_mapping
13
+ class PaymentProductFieldFormElement < Ingenico::Direct::SDK::DataObject
14
+ attr_accessor :type
15
+ attr_accessor :value_mapping
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['type'] = @type unless @type.nil?
21
+ hash['valueMapping'] = @value_mapping.collect(&:to_h) if @value_mapping
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ @type = hash['type'] if hash.key? 'type'
28
+ if hash.key? 'valueMapping'
29
+ raise TypeError, "value '%s' is not an Array" % [hash['valueMapping']] unless hash['valueMapping'].is_a? Array
30
+ @value_mapping = []
31
+ hash['valueMapping'].each do |e|
32
+ @value_mapping << Ingenico::Direct::SDK::Domain::ValueMappingElement.new_from_hash(e)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,31 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+
7
+ module Ingenico::Direct::SDK
8
+ module Domain
9
+
10
+ # @attr [String] image
11
+ # @attr [String] label
12
+ class PaymentProductFieldTooltip < Ingenico::Direct::SDK::DataObject
13
+ attr_accessor :image
14
+ attr_accessor :label
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['image'] = @image unless @image.nil?
20
+ hash['label'] = @label unless @label.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @image = hash['image'] if hash.key? 'image'
27
+ @label = hash['label'] if hash.key? 'label'
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,91 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://support.direct.ingenico.com/documentation/api/reference/
4
+ #
5
+ require 'ingenico/direct/sdk/data_object'
6
+ require 'ingenico/direct/sdk/domain/empty_validator'
7
+ require 'ingenico/direct/sdk/domain/fixed_list_validator'
8
+ require 'ingenico/direct/sdk/domain/length_validator'
9
+ require 'ingenico/direct/sdk/domain/range_validator'
10
+ require 'ingenico/direct/sdk/domain/regular_expression_validator'
11
+
12
+ module Ingenico::Direct::SDK
13
+ module Domain
14
+
15
+ # @attr [Ingenico::Direct::SDK::Domain::EmptyValidator] email_address
16
+ # @attr [Ingenico::Direct::SDK::Domain::EmptyValidator] expiration_date
17
+ # @attr [Ingenico::Direct::SDK::Domain::FixedListValidator] fixed_list
18
+ # @attr [Ingenico::Direct::SDK::Domain::EmptyValidator] iban
19
+ # @attr [Ingenico::Direct::SDK::Domain::LengthValidator] length
20
+ # @attr [Ingenico::Direct::SDK::Domain::EmptyValidator] luhn
21
+ # @attr [Ingenico::Direct::SDK::Domain::RangeValidator] range
22
+ # @attr [Ingenico::Direct::SDK::Domain::RegularExpressionValidator] regular_expression
23
+ # @attr [Ingenico::Direct::SDK::Domain::EmptyValidator] terms_and_conditions
24
+ class PaymentProductFieldValidators < Ingenico::Direct::SDK::DataObject
25
+ attr_accessor :email_address
26
+ attr_accessor :expiration_date
27
+ attr_accessor :fixed_list
28
+ attr_accessor :iban
29
+ attr_accessor :length
30
+ attr_accessor :luhn
31
+ attr_accessor :range
32
+ attr_accessor :regular_expression
33
+ attr_accessor :terms_and_conditions
34
+
35
+ # @return (Hash)
36
+ def to_h
37
+ hash = super
38
+ hash['emailAddress'] = @email_address.to_h if @email_address
39
+ hash['expirationDate'] = @expiration_date.to_h if @expiration_date
40
+ hash['fixedList'] = @fixed_list.to_h if @fixed_list
41
+ hash['iban'] = @iban.to_h if @iban
42
+ hash['length'] = @length.to_h if @length
43
+ hash['luhn'] = @luhn.to_h if @luhn
44
+ hash['range'] = @range.to_h if @range
45
+ hash['regularExpression'] = @regular_expression.to_h if @regular_expression
46
+ hash['termsAndConditions'] = @terms_and_conditions.to_h if @terms_and_conditions
47
+ hash
48
+ end
49
+
50
+ def from_hash(hash)
51
+ super
52
+ if hash.key? 'emailAddress'
53
+ raise TypeError, "value '%s' is not a Hash" % [hash['emailAddress']] unless hash['emailAddress'].is_a? Hash
54
+ @email_address = Ingenico::Direct::SDK::Domain::EmptyValidator.new_from_hash(hash['emailAddress'])
55
+ end
56
+ if hash.key? 'expirationDate'
57
+ raise TypeError, "value '%s' is not a Hash" % [hash['expirationDate']] unless hash['expirationDate'].is_a? Hash
58
+ @expiration_date = Ingenico::Direct::SDK::Domain::EmptyValidator.new_from_hash(hash['expirationDate'])
59
+ end
60
+ if hash.key? 'fixedList'
61
+ raise TypeError, "value '%s' is not a Hash" % [hash['fixedList']] unless hash['fixedList'].is_a? Hash
62
+ @fixed_list = Ingenico::Direct::SDK::Domain::FixedListValidator.new_from_hash(hash['fixedList'])
63
+ end
64
+ if hash.key? 'iban'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['iban']] unless hash['iban'].is_a? Hash
66
+ @iban = Ingenico::Direct::SDK::Domain::EmptyValidator.new_from_hash(hash['iban'])
67
+ end
68
+ if hash.key? 'length'
69
+ raise TypeError, "value '%s' is not a Hash" % [hash['length']] unless hash['length'].is_a? Hash
70
+ @length = Ingenico::Direct::SDK::Domain::LengthValidator.new_from_hash(hash['length'])
71
+ end
72
+ if hash.key? 'luhn'
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['luhn']] unless hash['luhn'].is_a? Hash
74
+ @luhn = Ingenico::Direct::SDK::Domain::EmptyValidator.new_from_hash(hash['luhn'])
75
+ end
76
+ if hash.key? 'range'
77
+ raise TypeError, "value '%s' is not a Hash" % [hash['range']] unless hash['range'].is_a? Hash
78
+ @range = Ingenico::Direct::SDK::Domain::RangeValidator.new_from_hash(hash['range'])
79
+ end
80
+ if hash.key? 'regularExpression'
81
+ raise TypeError, "value '%s' is not a Hash" % [hash['regularExpression']] unless hash['regularExpression'].is_a? Hash
82
+ @regular_expression = Ingenico::Direct::SDK::Domain::RegularExpressionValidator.new_from_hash(hash['regularExpression'])
83
+ end
84
+ if hash.key? 'termsAndConditions'
85
+ raise TypeError, "value '%s' is not a Hash" % [hash['termsAndConditions']] unless hash['termsAndConditions'].is_a? Hash
86
+ @terms_and_conditions = Ingenico::Direct::SDK::Domain::EmptyValidator.new_from_hash(hash['termsAndConditions'])
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end