direct-sdk-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,50 @@
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/api_error'
7
+
8
+ module Ingenico::Direct::SDK
9
+ module Domain
10
+
11
+ # @attr [Array<Ingenico::Direct::SDK::Domain::APIError>] errors
12
+ # @attr [true/false] is_cancellable
13
+ # @attr [String] status_category
14
+ # @attr [Integer] status_code
15
+ # @attr [String] status_code_change_date_time
16
+ class OrderStatusOutput < Ingenico::Direct::SDK::DataObject
17
+ attr_accessor :errors
18
+ attr_accessor :is_cancellable
19
+ attr_accessor :status_category
20
+ attr_accessor :status_code
21
+ attr_accessor :status_code_change_date_time
22
+
23
+ # @return (Hash)
24
+ def to_h
25
+ hash = super
26
+ hash['errors'] = @errors.collect(&:to_h) if @errors
27
+ hash['isCancellable'] = @is_cancellable unless @is_cancellable.nil?
28
+ hash['statusCategory'] = @status_category unless @status_category.nil?
29
+ hash['statusCode'] = @status_code unless @status_code.nil?
30
+ hash['statusCodeChangeDateTime'] = @status_code_change_date_time unless @status_code_change_date_time.nil?
31
+ hash
32
+ end
33
+
34
+ def from_hash(hash)
35
+ super
36
+ if hash.key? 'errors'
37
+ raise TypeError, "value '%s' is not an Array" % [hash['errors']] unless hash['errors'].is_a? Array
38
+ @errors = []
39
+ hash['errors'].each do |e|
40
+ @errors << Ingenico::Direct::SDK::Domain::APIError.new_from_hash(e)
41
+ end
42
+ end
43
+ @is_cancellable = hash['isCancellable'] if hash.key? 'isCancellable'
44
+ @status_category = hash['statusCategory'] if hash.key? 'statusCategory'
45
+ @status_code = hash['statusCode'] if hash.key? 'statusCode'
46
+ @status_code_change_date_time = hash['statusCodeChangeDateTime'] if hash.key? 'statusCodeChangeDateTime'
47
+ end
48
+ end
49
+ end
50
+ 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] purchase_type
11
+ # @attr [String] transaction_type
12
+ class OrderTypeInformation < Ingenico::Direct::SDK::DataObject
13
+ attr_accessor :purchase_type
14
+ attr_accessor :transaction_type
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['purchaseType'] = @purchase_type unless @purchase_type.nil?
20
+ hash['transactionType'] = @transaction_type unless @transaction_type.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @purchase_type = hash['purchaseType'] if hash.key? 'purchaseType'
27
+ @transaction_type = hash['transactionType'] if hash.key? 'transactionType'
28
+ end
29
+ end
30
+ end
31
+ 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] create_date
11
+ # @attr [Integer] number_of_card_on_file_creation_attempts_last24_hours
12
+ class PaymentAccountOnFile < Ingenico::Direct::SDK::DataObject
13
+ attr_accessor :create_date
14
+ attr_accessor :number_of_card_on_file_creation_attempts_last24_hours
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['createDate'] = @create_date unless @create_date.nil?
20
+ hash['numberOfCardOnFileCreationAttemptsLast24Hours'] = @number_of_card_on_file_creation_attempts_last24_hours unless @number_of_card_on_file_creation_attempts_last24_hours.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @create_date = hash['createDate'] if hash.key? 'createDate'
27
+ @number_of_card_on_file_creation_attempts_last24_hours = hash['numberOfCardOnFileCreationAttemptsLast24Hours'] if hash.key? 'numberOfCardOnFileCreationAttemptsLast24Hours'
28
+ end
29
+ end
30
+ end
31
+ 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] external_reference
11
+ # @attr [true/false] is_new_token
12
+ # @attr [String] token
13
+ # @attr [true/false] tokenization_succeeded
14
+ class PaymentCreationOutput < Ingenico::Direct::SDK::DataObject
15
+ attr_accessor :external_reference
16
+ attr_accessor :is_new_token
17
+ attr_accessor :token
18
+ attr_accessor :tokenization_succeeded
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['externalReference'] = @external_reference unless @external_reference.nil?
24
+ hash['isNewToken'] = @is_new_token unless @is_new_token.nil?
25
+ hash['token'] = @token unless @token.nil?
26
+ hash['tokenizationSucceeded'] = @tokenization_succeeded unless @tokenization_succeeded.nil?
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ @external_reference = hash['externalReference'] if hash.key? 'externalReference'
33
+ @is_new_token = hash['isNewToken'] if hash.key? 'isNewToken'
34
+ @token = hash['token'] if hash.key? 'token'
35
+ @tokenization_succeeded = hash['tokenizationSucceeded'] if hash.key? 'tokenizationSucceeded'
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,46 @@
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/api_error'
7
+ require 'ingenico/direct/sdk/domain/create_payment_response'
8
+
9
+ module Ingenico::Direct::SDK
10
+ module Domain
11
+
12
+ # @attr [String] error_id
13
+ # @attr [Array<Ingenico::Direct::SDK::Domain::APIError>] errors
14
+ # @attr [Ingenico::Direct::SDK::Domain::CreatePaymentResponse] payment_result
15
+ class PaymentErrorResponse < Ingenico::Direct::SDK::DataObject
16
+ attr_accessor :error_id
17
+ attr_accessor :errors
18
+ attr_accessor :payment_result
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['errorId'] = @error_id unless @error_id.nil?
24
+ hash['errors'] = @errors.collect(&:to_h) if @errors
25
+ hash['paymentResult'] = @payment_result.to_h if @payment_result
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ @error_id = hash['errorId'] if hash.key? 'errorId'
32
+ if hash.key? 'errors'
33
+ raise TypeError, "value '%s' is not an Array" % [hash['errors']] unless hash['errors'].is_a? Array
34
+ @errors = []
35
+ hash['errors'].each do |e|
36
+ @errors << Ingenico::Direct::SDK::Domain::APIError.new_from_hash(e)
37
+ end
38
+ end
39
+ if hash.key? 'paymentResult'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentResult']] unless hash['paymentResult'].is_a? Hash
41
+ @payment_result = Ingenico::Direct::SDK::Domain::CreatePaymentResponse.new_from_hash(hash['paymentResult'])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,79 @@
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/amount_of_money'
7
+ require 'ingenico/direct/sdk/domain/card_payment_method_specific_output'
8
+ require 'ingenico/direct/sdk/domain/mobile_payment_method_specific_output'
9
+ require 'ingenico/direct/sdk/domain/payment_references'
10
+ require 'ingenico/direct/sdk/domain/redirect_payment_method_specific_output'
11
+ require 'ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output'
12
+
13
+ module Ingenico::Direct::SDK
14
+ module Domain
15
+
16
+ # @attr [Ingenico::Direct::SDK::Domain::AmountOfMoney] amount_of_money
17
+ # @attr [Long] amount_paid
18
+ # @attr [Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificOutput] card_payment_method_specific_output
19
+ # @attr [Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificOutput] mobile_payment_method_specific_output
20
+ # @attr [String] payment_method
21
+ # @attr [Ingenico::Direct::SDK::Domain::RedirectPaymentMethodSpecificOutput] redirect_payment_method_specific_output
22
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentReferences] references
23
+ # @attr [Ingenico::Direct::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
24
+ class PaymentOutput < Ingenico::Direct::SDK::DataObject
25
+ attr_accessor :amount_of_money
26
+ attr_accessor :amount_paid
27
+ attr_accessor :card_payment_method_specific_output
28
+ attr_accessor :mobile_payment_method_specific_output
29
+ attr_accessor :payment_method
30
+ attr_accessor :redirect_payment_method_specific_output
31
+ attr_accessor :references
32
+ attr_accessor :sepa_direct_debit_payment_method_specific_output
33
+
34
+ # @return (Hash)
35
+ def to_h
36
+ hash = super
37
+ hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
38
+ hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
39
+ hash['cardPaymentMethodSpecificOutput'] = @card_payment_method_specific_output.to_h if @card_payment_method_specific_output
40
+ hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h if @mobile_payment_method_specific_output
41
+ hash['paymentMethod'] = @payment_method unless @payment_method.nil?
42
+ hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h if @redirect_payment_method_specific_output
43
+ hash['references'] = @references.to_h if @references
44
+ hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h if @sepa_direct_debit_payment_method_specific_output
45
+ hash
46
+ end
47
+
48
+ def from_hash(hash)
49
+ super
50
+ if hash.key? 'amountOfMoney'
51
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
52
+ @amount_of_money = Ingenico::Direct::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
53
+ end
54
+ @amount_paid = hash['amountPaid'] if hash.key? 'amountPaid'
55
+ if hash.key? 'cardPaymentMethodSpecificOutput'
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificOutput']] unless hash['cardPaymentMethodSpecificOutput'].is_a? Hash
57
+ @card_payment_method_specific_output = Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput'])
58
+ end
59
+ if hash.key? 'mobilePaymentMethodSpecificOutput'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']] unless hash['mobilePaymentMethodSpecificOutput'].is_a? Hash
61
+ @mobile_payment_method_specific_output = Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput'])
62
+ end
63
+ @payment_method = hash['paymentMethod'] if hash.key? 'paymentMethod'
64
+ if hash.key? 'redirectPaymentMethodSpecificOutput'
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificOutput']] unless hash['redirectPaymentMethodSpecificOutput'].is_a? Hash
66
+ @redirect_payment_method_specific_output = Ingenico::Direct::SDK::Domain::RedirectPaymentMethodSpecificOutput.new_from_hash(hash['redirectPaymentMethodSpecificOutput'])
67
+ end
68
+ if hash.key? 'references'
69
+ raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
70
+ @references = Ingenico::Direct::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
71
+ end
72
+ if hash.key? 'sepaDirectDebitPaymentMethodSpecificOutput'
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificOutput']] unless hash['sepaDirectDebitPaymentMethodSpecificOutput'].is_a? Hash
74
+ @sepa_direct_debit_payment_method_specific_output = Ingenico::Direct::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificOutput'])
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,77 @@
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/account_on_file'
7
+ require 'ingenico/direct/sdk/domain/payment_product_display_hints'
8
+ require 'ingenico/direct/sdk/domain/payment_product_field'
9
+
10
+ module Ingenico::Direct::SDK
11
+ module Domain
12
+
13
+ # @attr [Array<Ingenico::Direct::SDK::Domain::AccountOnFile>] accounts_on_file
14
+ # @attr [true/false] allows_recurring
15
+ # @attr [true/false] allows_tokenization
16
+ # @attr [Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints] display_hints
17
+ # @attr [Array<Ingenico::Direct::SDK::Domain::PaymentProductField>] fields
18
+ # @attr [Integer] id
19
+ # @attr [String] payment_method
20
+ # @attr [String] payment_product_group
21
+ # @attr [true/false] uses_redirection_to3rd_party
22
+ class PaymentProduct < Ingenico::Direct::SDK::DataObject
23
+ attr_accessor :accounts_on_file
24
+ attr_accessor :allows_recurring
25
+ attr_accessor :allows_tokenization
26
+ attr_accessor :display_hints
27
+ attr_accessor :fields
28
+ attr_accessor :id
29
+ attr_accessor :payment_method
30
+ attr_accessor :payment_product_group
31
+ attr_accessor :uses_redirection_to3rd_party
32
+
33
+ # @return (Hash)
34
+ def to_h
35
+ hash = super
36
+ hash['accountsOnFile'] = @accounts_on_file.collect(&:to_h) if @accounts_on_file
37
+ hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
38
+ hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
39
+ hash['displayHints'] = @display_hints.to_h if @display_hints
40
+ hash['fields'] = @fields.collect(&:to_h) if @fields
41
+ hash['id'] = @id unless @id.nil?
42
+ hash['paymentMethod'] = @payment_method unless @payment_method.nil?
43
+ hash['paymentProductGroup'] = @payment_product_group unless @payment_product_group.nil?
44
+ hash['usesRedirectionTo3rdParty'] = @uses_redirection_to3rd_party unless @uses_redirection_to3rd_party.nil?
45
+ hash
46
+ end
47
+
48
+ def from_hash(hash)
49
+ super
50
+ if hash.key? 'accountsOnFile'
51
+ raise TypeError, "value '%s' is not an Array" % [hash['accountsOnFile']] unless hash['accountsOnFile'].is_a? Array
52
+ @accounts_on_file = []
53
+ hash['accountsOnFile'].each do |e|
54
+ @accounts_on_file << Ingenico::Direct::SDK::Domain::AccountOnFile.new_from_hash(e)
55
+ end
56
+ end
57
+ @allows_recurring = hash['allowsRecurring'] if hash.key? 'allowsRecurring'
58
+ @allows_tokenization = hash['allowsTokenization'] if hash.key? 'allowsTokenization'
59
+ if hash.key? 'displayHints'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
61
+ @display_hints = Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints.new_from_hash(hash['displayHints'])
62
+ end
63
+ if hash.key? 'fields'
64
+ raise TypeError, "value '%s' is not an Array" % [hash['fields']] unless hash['fields'].is_a? Array
65
+ @fields = []
66
+ hash['fields'].each do |e|
67
+ @fields << Ingenico::Direct::SDK::Domain::PaymentProductField.new_from_hash(e)
68
+ end
69
+ end
70
+ @id = hash['id'] if hash.key? 'id'
71
+ @payment_method = hash['paymentMethod'] if hash.key? 'paymentMethod'
72
+ @payment_product_group = hash['paymentProductGroup'] if hash.key? 'paymentProductGroup'
73
+ @uses_redirection_to3rd_party = hash['usesRedirectionTo3rdParty'] if hash.key? 'usesRedirectionTo3rdParty'
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,27 @@
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] brand
11
+ class PaymentProduct5100SpecificInput < Ingenico::Direct::SDK::DataObject
12
+ attr_accessor :brand
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['brand'] = @brand unless @brand.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ @brand = hash['brand'] if hash.key? 'brand'
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
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] brand
11
+ class PaymentProduct5402SpecificOutput < Ingenico::Direct::SDK::DataObject
12
+ attr_accessor :brand
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['brand'] = @brand unless @brand.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ @brand = hash['brand'] if hash.key? 'brand'
24
+ end
25
+ end
26
+ end
27
+ 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 [String] payment_end_date
11
+ # @attr [String] payment_reference
12
+ # @attr [String] payment_start_date
13
+ class PaymentProduct5500SpecificOutput < Ingenico::Direct::SDK::DataObject
14
+ attr_accessor :payment_end_date
15
+ attr_accessor :payment_reference
16
+ attr_accessor :payment_start_date
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['paymentEndDate'] = @payment_end_date unless @payment_end_date.nil?
22
+ hash['paymentReference'] = @payment_reference unless @payment_reference.nil?
23
+ hash['paymentStartDate'] = @payment_start_date unless @payment_start_date.nil?
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ @payment_end_date = hash['paymentEndDate'] if hash.key? 'paymentEndDate'
30
+ @payment_reference = hash['paymentReference'] if hash.key? 'paymentReference'
31
+ @payment_start_date = hash['paymentStartDate'] if hash.key? 'paymentStartDate'
32
+ end
33
+ end
34
+ end
35
+ end