connect-sdk-ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +140 -0
- data/Rakefile +34 -0
- data/connect-sdk-ruby.gemspec +28 -0
- data/examples/merchant/example_configuration.yml +6 -0
- data/examples/merchant/hostedcheckouts/create_hosted_checkout_example.rb +53 -0
- data/examples/merchant/hostedcheckouts/get_hosted_checkout_example.rb +22 -0
- data/examples/merchant/payments/approve_payment_example.rb +42 -0
- data/examples/merchant/payments/cancel_approval_payment_example.rb +22 -0
- data/examples/merchant/payments/cancel_payment_example.rb +22 -0
- data/examples/merchant/payments/create_payment_example.rb +177 -0
- data/examples/merchant/payments/get_payment_example.rb +22 -0
- data/examples/merchant/payments/process_challenged_payment_example.rb +22 -0
- data/examples/merchant/payments/refund_payment_example.rb +85 -0
- data/examples/merchant/payments/tokenize_payment_example.rb +27 -0
- data/examples/merchant/payouts/approve_payout_example.rb +27 -0
- data/examples/merchant/payouts/cancel_approval_payout_example.rb +22 -0
- data/examples/merchant/payouts/cancel_payout_example.rb +22 -0
- data/examples/merchant/payouts/create_payout_example.rb +96 -0
- data/examples/merchant/payouts/get_payout_example.rb +22 -0
- data/examples/merchant/productgroups/get_payment_product_group_example.rb +32 -0
- data/examples/merchant/productgroups/get_payment_product_groups_example.rb +32 -0
- data/examples/merchant/products/get_directory_example.rb +28 -0
- data/examples/merchant/products/get_payment_product_example.rb +32 -0
- data/examples/merchant/products/get_payment_products_example.rb +32 -0
- data/examples/merchant/refunds/approve_refund_example.rb +27 -0
- data/examples/merchant/refunds/cancel_approval_refund_example.rb +22 -0
- data/examples/merchant/refunds/cancel_refund_example.rb +22 -0
- data/examples/merchant/refunds/get_refund_example.rb +22 -0
- data/examples/merchant/riskassessments/risk_assessment_bank_account_example.rb +54 -0
- data/examples/merchant/riskassessments/risk_assessment_cards_example.rb +114 -0
- data/examples/merchant/services/convert_amount_example.rb +29 -0
- data/examples/merchant/services/convert_bank_account_example.rb +34 -0
- data/examples/merchant/services/iin_details_example.rb +27 -0
- data/examples/merchant/services/test_connection_example.rb +22 -0
- data/examples/merchant/sessions/create_session_example.rb +34 -0
- data/examples/merchant/tokens/approve_sepa_direct_debit_token_example.rb +29 -0
- data/examples/merchant/tokens/create_token_example.rb +82 -0
- data/examples/merchant/tokens/delete_token_example.rb +27 -0
- data/examples/merchant/tokens/get_token_example.rb +22 -0
- data/examples/merchant/tokens/update_token_example.rb +76 -0
- data/lib/ingenico/connect/sdk.rb +27 -0
- data/lib/ingenico/connect/sdk/api_exception.rb +52 -0
- data/lib/ingenico/connect/sdk/api_resource.rb +126 -0
- data/lib/ingenico/connect/sdk/authenticator.rb +15 -0
- data/lib/ingenico/connect/sdk/authorization_exception.rb +13 -0
- data/lib/ingenico/connect/sdk/call_context.rb +26 -0
- data/lib/ingenico/connect/sdk/client.rb +92 -0
- data/lib/ingenico/connect/sdk/communication_exception.rb +15 -0
- data/lib/ingenico/connect/sdk/communicator.rb +277 -0
- data/lib/ingenico/connect/sdk/communicator_configuration.rb +98 -0
- data/lib/ingenico/connect/sdk/connection.rb +31 -0
- data/lib/ingenico/connect/sdk/data_object.rb +43 -0
- data/lib/ingenico/connect/sdk/declined_payment_exception.rb +44 -0
- data/lib/ingenico/connect/sdk/declined_payout_exception.rb +44 -0
- data/lib/ingenico/connect/sdk/declined_refund_exception.rb +46 -0
- data/lib/ingenico/connect/sdk/declined_transaction_exception.rb +16 -0
- data/lib/ingenico/connect/sdk/defaultimpl.rb +6 -0
- data/lib/ingenico/connect/sdk/defaultimpl/authorization_type.rb +18 -0
- data/lib/ingenico/connect/sdk/defaultimpl/default_authenticator.rb +106 -0
- data/lib/ingenico/connect/sdk/defaultimpl/default_connection.rb +242 -0
- data/lib/ingenico/connect/sdk/defaultimpl/default_marshaller.rb +35 -0
- data/lib/ingenico/connect/sdk/domain/definitions/abstract_order_status.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/additional_order_input_airline_data.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/definitions/address.rb +81 -0
- data/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb +165 -0
- data/lib/ingenico/connect/sdk/domain/definitions/airline_flight_leg.rb +102 -0
- data/lib/ingenico/connect/sdk/domain/definitions/amount_of_money.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/definitions/bank_account.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/bank_account_bban.rb +67 -0
- data/lib/ingenico/connect/sdk/domain/definitions/bank_account_iban.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/card.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/card_essentials.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/definitions/card_without_cvv.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/definitions/company_information.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/contact_details_base.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/definitions/customer_base.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/definitions/fraud_fields.rb +115 -0
- data/lib/ingenico/connect/sdk/domain/definitions/fraud_results.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/definitions/fraud_results_retail_decisions.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/definitions/key_value_pair.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/definitions/order_status_output.rb +67 -0
- data/lib/ingenico/connect/sdk/domain/definitions/payment_product_filter.rb +51 -0
- data/lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/definitions/result_do_risk_assessment.rb +61 -0
- data/lib/ingenico/connect/sdk/domain/definitions/retail_decisions_cc_fraud_check_output.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_check.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb +67 -0
- data/lib/ingenico/connect/sdk/domain/errors/api_error.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/errors/error_response.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb +102 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb +72 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb +53 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/get_hosted_checkout_response.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb +78 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout.rb +53 -0
- data/lib/ingenico/connect/sdk/domain/metadata/shopping_cart_extension.rb +48 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +72 -0
- data/lib/ingenico/connect/sdk/domain/payment/address_personal.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/approve_payment_card_payment_method_specific_output.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/approve_payment_non_sepa_direct_debit_payment_method_specific_input.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/approve_payment_payment_method_specific_input.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/approve_payment_request.rb +65 -0
- data/lib/ingenico/connect/sdk/domain/payment/approve_payment_sepa_direct_debit_payment_method_specific_input.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_input.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_input_base.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/cancel_approval_payment_response.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/cancel_payment_card_payment_method_specific_output.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb +61 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb +65 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input_base.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_product1503_specific_input.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_product1504_specific_input.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/contact_details.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb +131 -0
- data/lib/ingenico/connect/sdk/domain/payment/create_payment_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/create_payment_result.rb +58 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer.rb +83 -0
- data/lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/line_item.rb +58 -0
- data/lib/ingenico/connect/sdk/domain/payment/line_item_invoice_data.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb +81 -0
- data/lib/ingenico/connect/sdk/domain/payment/merchant_action.rb +64 -0
- data/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb +71 -0
- data/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_output.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_product705_specific_input.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/payment/order.rb +83 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_approve_payment.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_invoice_data.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_output.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_references.rb +57 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_references_approve_payment.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_type_information.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment.rb +54 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_approval_response.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_creation_output.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_creation_references.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_error_response.rb +57 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_output.rb +116 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_product836_specific_output.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_product840_customer_account.rb +88 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_references.rb +67 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/personal_information.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/payment/personal_name.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_data.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb +72 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_output.rb +58 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product809_specific_input.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product816_specific_input.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product882_specific_input.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_bank_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_card_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_e_wallet_method_specific_output.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_method_specific_output.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_output.rb +72 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_payment_product840_customer_account.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/refund_payment_product840_specific_output.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_output.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/tokenize_payment_request.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payout/approve_payout_request.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb +101 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_customer.rb +76 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_error_response.rb +57 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_references.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_result.rb +54 -0
- data/lib/ingenico/connect/sdk/domain/product/account_on_file.rb +64 -0
- data/lib/ingenico/connect/sdk/domain/product/account_on_file_attribute.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/product/directory.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/directory_entry.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/product/empty_validator.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/product/fixed_list_validator.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/product/label_template_element.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/length_validator.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product.rb +134 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_display_hints.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field.rb +61 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field_data_restrictions.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb +96 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field_form_element.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field_tooltip.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb +100 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_group.rb +71 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_group_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_groups.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_product_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/product/payment_products.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/range_validator.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/product/regular_expression_validator.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/product/value_mapping_element.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/refund/approve_refund_request.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/refund/bank_account_bban_refund.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/refund/bank_refund_method_specific_input.rb +54 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_customer.rb +58 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_error_response.rb +57 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_references.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_request.rb +76 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_response.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/refund/refund_result.rb +54 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/customer_risk_assessment.rb +65 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/order_risk_assessment.rb +58 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/personal_information_risk_assessment.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/personal_name_risk_assessment.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment.rb +54 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment_bank_account.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment_card.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment_response.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/services/bank_data.rb +53 -0
- data/lib/ingenico/connect/sdk/domain/services/bank_details.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/services/bank_details_request.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/services/bank_details_response.rb +69 -0
- data/lib/ingenico/connect/sdk/domain/services/convert_amount.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/services/get_iin_details_request.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb +60 -0
- data/lib/ingenico/connect/sdk/domain/services/iin_detail.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/services/payment_context.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/services/swift.rb +95 -0
- data/lib/ingenico/connect/sdk/domain/services/test_connection.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/sessions/payment_product_filters_client_session.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/sessions/session_request.rb +49 -0
- data/lib/ingenico/connect/sdk/domain/sessions/session_response.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/token/abstract_token.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/token/approve_token_request.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/token/contact_details_token.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/token/create_token_request.rb +76 -0
- data/lib/ingenico/connect/sdk/domain/token/create_token_response.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/token/creditor.rb +102 -0
- data/lib/ingenico/connect/sdk/domain/token/customer_token.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/customer_token_with_contact_details.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/token/debtor.rb +102 -0
- data/lib/ingenico/connect/sdk/domain/token/mandate_approval.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/token/mandate_non_sepa_direct_debit.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_with_mandate_id.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb +79 -0
- data/lib/ingenico/connect/sdk/domain/token/personal_information_token.rb +36 -0
- data/lib/ingenico/connect/sdk/domain/token/personal_name_token.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/token/token_card.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/token_card_data.rb +50 -0
- data/lib/ingenico/connect/sdk/domain/token/token_e_wallet.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/token_e_wallet_data.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/token/token_non_sepa_direct_debit.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/token_non_sepa_direct_debit_payment_product705_specific_data.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/token/token_response.rb +83 -0
- data/lib/ingenico/connect/sdk/domain/token/token_sepa_direct_debit.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/token_sepa_direct_debit_without_creditor.rb +47 -0
- data/lib/ingenico/connect/sdk/domain/token/update_token_request.rb +76 -0
- data/lib/ingenico/connect/sdk/endpoint_configuration.rb +139 -0
- data/lib/ingenico/connect/sdk/exceptions.rb +8 -0
- data/lib/ingenico/connect/sdk/factory.rb +200 -0
- data/lib/ingenico/connect/sdk/global_collect_exception.rb +15 -0
- data/lib/ingenico/connect/sdk/idempotence_exception.rb +24 -0
- data/lib/ingenico/connect/sdk/logging.rb +10 -0
- data/lib/ingenico/connect/sdk/logging/communicator_logger.rb +19 -0
- data/lib/ingenico/connect/sdk/logging/log_message_builder.rb +61 -0
- data/lib/ingenico/connect/sdk/logging/logging_capable.rb +19 -0
- data/lib/ingenico/connect/sdk/logging/logging_util.rb +298 -0
- data/lib/ingenico/connect/sdk/logging/request_log_message_builder.rb +42 -0
- data/lib/ingenico/connect/sdk/logging/response_log_message_builder.rb +34 -0
- data/lib/ingenico/connect/sdk/logging/ruby_communicator_logger.rb +58 -0
- data/lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb +36 -0
- data/lib/ingenico/connect/sdk/marshaller.rb +19 -0
- data/lib/ingenico/connect/sdk/marshaller_syntax_exception.rb +6 -0
- data/lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb +88 -0
- data/lib/ingenico/connect/sdk/merchant/merchant_client.rb +110 -0
- data/lib/ingenico/connect/sdk/merchant/payments/payments_client.rb +319 -0
- data/lib/ingenico/connect/sdk/merchant/payouts/payouts_client.rb +197 -0
- data/lib/ingenico/connect/sdk/merchant/productgroups/find_productgroups_params.rb +55 -0
- data/lib/ingenico/connect/sdk/merchant/productgroups/get_productgroup_params.rb +55 -0
- data/lib/ingenico/connect/sdk/merchant/productgroups/productgroups_client.rb +90 -0
- data/lib/ingenico/connect/sdk/merchant/products/directory_params.rb +31 -0
- data/lib/ingenico/connect/sdk/merchant/products/find_products_params.rb +55 -0
- data/lib/ingenico/connect/sdk/merchant/products/get_product_params.rb +55 -0
- data/lib/ingenico/connect/sdk/merchant/products/products_client.rb +124 -0
- data/lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb +154 -0
- data/lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb +85 -0
- data/lib/ingenico/connect/sdk/merchant/services/convert_amount_params.rb +35 -0
- data/lib/ingenico/connect/sdk/merchant/services/services_client.rb +149 -0
- data/lib/ingenico/connect/sdk/merchant/sessions/sessions_client.rb +55 -0
- data/lib/ingenico/connect/sdk/merchant/tokens/delete_token_params.rb +27 -0
- data/lib/ingenico/connect/sdk/merchant/tokens/tokens_client.rb +192 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +152 -0
- data/lib/ingenico/connect/sdk/modules.rb +130 -0
- data/lib/ingenico/connect/sdk/not_found_exception.rb +19 -0
- data/lib/ingenico/connect/sdk/param_request.rb +33 -0
- data/lib/ingenico/connect/sdk/pooled_connection.rb +21 -0
- data/lib/ingenico/connect/sdk/proxy_configuration.rb +75 -0
- data/lib/ingenico/connect/sdk/reference_exception.rb +14 -0
- data/lib/ingenico/connect/sdk/request_header.rb +25 -0
- data/lib/ingenico/connect/sdk/request_param.rb +24 -0
- data/lib/ingenico/connect/sdk/response.rb +62 -0
- data/lib/ingenico/connect/sdk/response_exception.rb +54 -0
- data/lib/ingenico/connect/sdk/response_header.rb +25 -0
- data/lib/ingenico/connect/sdk/session.rb +39 -0
- data/lib/ingenico/connect/sdk/validation_exception.rb +14 -0
- data/spec/comparable_extension.rb +29 -0
- data/spec/fixtures/resources/defaultimpl/convertAmount.json +3 -0
- data/spec/fixtures/resources/defaultimpl/createPayment.failure.invalidCardNumber.json +11 -0
- data/spec/fixtures/resources/defaultimpl/createPayment.failure.rejected.json +48 -0
- data/spec/fixtures/resources/defaultimpl/createPayment.json +40 -0
- data/spec/fixtures/resources/defaultimpl/idempotence_duplicate_failure.json +8 -0
- data/spec/fixtures/resources/defaultimpl/idempotence_rejected.json +46 -0
- data/spec/fixtures/resources/defaultimpl/idempotence_success.json +39 -0
- data/spec/fixtures/resources/defaultimpl/notFound.html +1 -0
- data/spec/fixtures/resources/defaultimpl/testConnection.json +3 -0
- data/spec/fixtures/resources/defaultimpl/unknownServerError.json +10 -0
- data/spec/fixtures/resources/logging/bodyNoObfuscation.json +17 -0
- data/spec/fixtures/resources/logging/bodyWithBinObfuscated.json +3 -0
- data/spec/fixtures/resources/logging/bodyWithBinOriginal.json +3 -0
- data/spec/fixtures/resources/logging/bodyWithCardObfuscated.json +21 -0
- data/spec/fixtures/resources/logging/bodyWithCardOriginal.json +21 -0
- data/spec/fixtures/resources/logging/bodyWithIbanObfuscated.json +19 -0
- data/spec/fixtures/resources/logging/bodyWithIbanOriginal.json +19 -0
- data/spec/fixtures/resources/payment/duplicate_request.json +8 -0
- data/spec/fixtures/resources/payment/invalid_authorization.json +9 -0
- data/spec/fixtures/resources/payment/invalid_request.json +11 -0
- data/spec/fixtures/resources/payment/method_not_allowed.html +1 -0
- data/spec/fixtures/resources/payment/not_found.html +1 -0
- data/spec/fixtures/resources/payment/pending_approval.json +39 -0
- data/spec/fixtures/resources/payment/rejected.json +46 -0
- data/spec/fixtures/resources/properties.proxy.yml +13 -0
- data/spec/fixtures/resources/properties.yml +7 -0
- data/spec/integration/connection_pooling_spec.rb +78 -0
- data/spec/integration/convert_amount_spec.rb +25 -0
- data/spec/integration/idempotence_spec.rb +59 -0
- data/spec/integration/multiline_header_spec.rb +30 -0
- data/spec/integration/payment_product_groups_spec.rb +23 -0
- data/spec/integration/payment_products_spec.rb +22 -0
- data/spec/integration/risk_assessments_spec.rb +37 -0
- data/spec/integration/sdk_proxy_spec.rb +89 -0
- data/spec/integration/token_spec.rb +42 -0
- data/spec/integration_setup.rb +50 -0
- data/spec/lib/client_spec.rb +69 -0
- data/spec/lib/communicator_configuration_spec.rb +179 -0
- data/spec/lib/communicator_spec.rb +31 -0
- data/spec/lib/defaultimpl/default_authenticator_spec.rb +74 -0
- data/spec/lib/defaultimpl/default_connection_idempotence_spec.rb +142 -0
- data/spec/lib/defaultimpl/default_connection_logger_spec.rb +526 -0
- data/spec/lib/defaultimpl/default_connection_spec.rb +334 -0
- data/spec/lib/defaultimpl/default_marshaller_spec.rb +36 -0
- data/spec/lib/factory_spec.rb +41 -0
- data/spec/lib/logging/header_obfuscator_spec.rb +51 -0
- data/spec/lib/logging/logging_util_spec.rb +143 -0
- data/spec/lib/logging/obfuscator_spec.rb +52 -0
- data/spec/lib/logging/ruby_communicator_logger_spec.rb +84 -0
- data/spec/lib/logging/stdout_communicator_logger_spec.rb +64 -0
- data/spec/lib/logging/value_obfuscator_spec.rb +95 -0
- data/spec/lib/meta_data_provider_spec.rb +71 -0
- data/spec/lib/payments_client_spec.rb +157 -0
- data/spec/lib/requestparams/delete_params_spec.rb +21 -0
- data/spec/lib/requestparams/directory_params_spec.rb +27 -0
- data/spec/lib/requestparams/find_params_spec.rb +58 -0
- data/spec/lib/requestparams/get_params_spec.rb +59 -0
- data/spec/lib/requestparams/param_request_spec.rb +57 -0
- data/spec/spec_helper.rb +23 -0
- metadata +565 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/domain/definitions/address'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/customer_base'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/address_personal'
|
8
|
+
require 'ingenico/connect/sdk/domain/payment/contact_details'
|
9
|
+
require 'ingenico/connect/sdk/domain/payment/personal_information'
|
10
|
+
|
11
|
+
module Ingenico::Connect::SDK
|
12
|
+
module Domain
|
13
|
+
module Payment
|
14
|
+
|
15
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_Customer Customer}
|
16
|
+
class Customer < Ingenico::Connect::SDK::Domain::Definitions::CustomerBase
|
17
|
+
|
18
|
+
# {Ingenico::Connect::SDK::Domain::Definitions::Address}
|
19
|
+
attr_accessor :billing_address
|
20
|
+
|
21
|
+
# {Ingenico::Connect::SDK::Domain::Payment::ContactDetails}
|
22
|
+
attr_accessor :contact_details
|
23
|
+
|
24
|
+
# String
|
25
|
+
attr_accessor :fiscal_number
|
26
|
+
|
27
|
+
# String
|
28
|
+
attr_accessor :locale
|
29
|
+
|
30
|
+
# {Ingenico::Connect::SDK::Domain::Payment::PersonalInformation}
|
31
|
+
attr_accessor :personal_information
|
32
|
+
|
33
|
+
# {Ingenico::Connect::SDK::Domain::Payment::AddressPersonal}
|
34
|
+
attr_accessor :shipping_address
|
35
|
+
|
36
|
+
def to_h
|
37
|
+
hash = super
|
38
|
+
add_to_hash(hash, 'billingAddress', @billing_address)
|
39
|
+
add_to_hash(hash, 'contactDetails', @contact_details)
|
40
|
+
add_to_hash(hash, 'fiscalNumber', @fiscal_number)
|
41
|
+
add_to_hash(hash, 'locale', @locale)
|
42
|
+
add_to_hash(hash, 'personalInformation', @personal_information)
|
43
|
+
add_to_hash(hash, 'shippingAddress', @shipping_address)
|
44
|
+
hash
|
45
|
+
end
|
46
|
+
|
47
|
+
def from_hash(hash)
|
48
|
+
super
|
49
|
+
if hash.has_key?('billingAddress')
|
50
|
+
if !(hash['billingAddress'].is_a? Hash)
|
51
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']]
|
52
|
+
end
|
53
|
+
@billing_address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['billingAddress'])
|
54
|
+
end
|
55
|
+
if hash.has_key?('contactDetails')
|
56
|
+
if !(hash['contactDetails'].is_a? Hash)
|
57
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']]
|
58
|
+
end
|
59
|
+
@contact_details = Ingenico::Connect::SDK::Domain::Payment::ContactDetails.new_from_hash(hash['contactDetails'])
|
60
|
+
end
|
61
|
+
if hash.has_key?('fiscalNumber')
|
62
|
+
@fiscal_number = hash['fiscalNumber']
|
63
|
+
end
|
64
|
+
if hash.has_key?('locale')
|
65
|
+
@locale = hash['locale']
|
66
|
+
end
|
67
|
+
if hash.has_key?('personalInformation')
|
68
|
+
if !(hash['personalInformation'].is_a? Hash)
|
69
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']]
|
70
|
+
end
|
71
|
+
@personal_information = Ingenico::Connect::SDK::Domain::Payment::PersonalInformation.new_from_hash(hash['personalInformation'])
|
72
|
+
end
|
73
|
+
if hash.has_key?('shippingAddress')
|
74
|
+
if !(hash['shippingAddress'].is_a? Hash)
|
75
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['shippingAddress']]
|
76
|
+
end
|
77
|
+
@shipping_address = Ingenico::Connect::SDK::Domain::Payment::AddressPersonal.new_from_hash(hash['shippingAddress'])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_ExternalCardholderAuthenticationData ExternalCardholderAuthenticationData}
|
12
|
+
class ExternalCardholderAuthenticationData < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :cavv
|
16
|
+
|
17
|
+
# String
|
18
|
+
attr_accessor :cavv_algorithm
|
19
|
+
|
20
|
+
# Integer
|
21
|
+
attr_accessor :eci
|
22
|
+
|
23
|
+
# String
|
24
|
+
attr_accessor :validation_result
|
25
|
+
|
26
|
+
# String
|
27
|
+
attr_accessor :xid
|
28
|
+
|
29
|
+
def to_h
|
30
|
+
hash = super
|
31
|
+
add_to_hash(hash, 'cavv', @cavv)
|
32
|
+
add_to_hash(hash, 'cavvAlgorithm', @cavv_algorithm)
|
33
|
+
add_to_hash(hash, 'eci', @eci)
|
34
|
+
add_to_hash(hash, 'validationResult', @validation_result)
|
35
|
+
add_to_hash(hash, 'xid', @xid)
|
36
|
+
hash
|
37
|
+
end
|
38
|
+
|
39
|
+
def from_hash(hash)
|
40
|
+
super
|
41
|
+
if hash.has_key?('cavv')
|
42
|
+
@cavv = hash['cavv']
|
43
|
+
end
|
44
|
+
if hash.has_key?('cavvAlgorithm')
|
45
|
+
@cavv_algorithm = hash['cavvAlgorithm']
|
46
|
+
end
|
47
|
+
if hash.has_key?('eci')
|
48
|
+
@eci = hash['eci']
|
49
|
+
end
|
50
|
+
if hash.has_key?('validationResult')
|
51
|
+
@validation_result = hash['validationResult']
|
52
|
+
end
|
53
|
+
if hash.has_key?('xid')
|
54
|
+
@xid = hash['xid']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_InvoicePaymentMethodSpecificInput InvoicePaymentMethodSpecificInput}
|
12
|
+
class InvoicePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :additional_reference
|
16
|
+
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
add_to_hash(hash, 'additionalReference', @additional_reference)
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
if hash.has_key?('additionalReference')
|
26
|
+
@additional_reference = hash['additionalReference']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_InvoicePaymentMethodSpecificOutput InvoicePaymentMethodSpecificOutput}
|
12
|
+
class InvoicePaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Payment::AbstractPaymentMethodSpecificOutput
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_Level3SummaryData Level3SummaryData}
|
12
|
+
class Level3SummaryData < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# Integer
|
15
|
+
attr_accessor :discount_amount
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :duty_amount
|
19
|
+
|
20
|
+
# Integer
|
21
|
+
attr_accessor :shipping_amount
|
22
|
+
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
add_to_hash(hash, 'discountAmount', @discount_amount)
|
26
|
+
add_to_hash(hash, 'dutyAmount', @duty_amount)
|
27
|
+
add_to_hash(hash, 'shippingAmount', @shipping_amount)
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key?('discountAmount')
|
34
|
+
@discount_amount = hash['discountAmount']
|
35
|
+
end
|
36
|
+
if hash.has_key?('dutyAmount')
|
37
|
+
@duty_amount = hash['dutyAmount']
|
38
|
+
end
|
39
|
+
if hash.has_key?('shippingAmount')
|
40
|
+
@shipping_amount = hash['shippingAmount']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/line_item_invoice_data'
|
8
|
+
require 'ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information'
|
9
|
+
|
10
|
+
module Ingenico::Connect::SDK
|
11
|
+
module Domain
|
12
|
+
module Payment
|
13
|
+
|
14
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_LineItem LineItem}
|
15
|
+
class LineItem < Ingenico::Connect::SDK::DataObject
|
16
|
+
|
17
|
+
# {Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney}
|
18
|
+
attr_accessor :amount_of_money
|
19
|
+
|
20
|
+
# {Ingenico::Connect::SDK::Domain::Payment::LineItemInvoiceData}
|
21
|
+
attr_accessor :invoice_data
|
22
|
+
|
23
|
+
# {Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation}
|
24
|
+
attr_accessor :level3_interchange_information
|
25
|
+
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
add_to_hash(hash, 'amountOfMoney', @amount_of_money)
|
29
|
+
add_to_hash(hash, 'invoiceData', @invoice_data)
|
30
|
+
add_to_hash(hash, 'level3InterchangeInformation', @level3_interchange_information)
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
|
34
|
+
def from_hash(hash)
|
35
|
+
super
|
36
|
+
if hash.has_key?('amountOfMoney')
|
37
|
+
if !(hash['amountOfMoney'].is_a? Hash)
|
38
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']]
|
39
|
+
end
|
40
|
+
@amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
41
|
+
end
|
42
|
+
if hash.has_key?('invoiceData')
|
43
|
+
if !(hash['invoiceData'].is_a? Hash)
|
44
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['invoiceData']]
|
45
|
+
end
|
46
|
+
@invoice_data = Ingenico::Connect::SDK::Domain::Payment::LineItemInvoiceData.new_from_hash(hash['invoiceData'])
|
47
|
+
end
|
48
|
+
if hash.has_key?('level3InterchangeInformation')
|
49
|
+
if !(hash['level3InterchangeInformation'].is_a? Hash)
|
50
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['level3InterchangeInformation']]
|
51
|
+
end
|
52
|
+
@level3_interchange_information = Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation.new_from_hash(hash['level3InterchangeInformation'])
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_LineItemInvoiceData LineItemInvoiceData}
|
12
|
+
class LineItemInvoiceData < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :description
|
16
|
+
|
17
|
+
# String
|
18
|
+
attr_accessor :merchant_linenumber
|
19
|
+
|
20
|
+
# String
|
21
|
+
attr_accessor :merchant_pagenumber
|
22
|
+
|
23
|
+
# String
|
24
|
+
attr_accessor :nr_of_items
|
25
|
+
|
26
|
+
# Integer
|
27
|
+
attr_accessor :price_per_item
|
28
|
+
|
29
|
+
def to_h
|
30
|
+
hash = super
|
31
|
+
add_to_hash(hash, 'description', @description)
|
32
|
+
add_to_hash(hash, 'merchantLinenumber', @merchant_linenumber)
|
33
|
+
add_to_hash(hash, 'merchantPagenumber', @merchant_pagenumber)
|
34
|
+
add_to_hash(hash, 'nrOfItems', @nr_of_items)
|
35
|
+
add_to_hash(hash, 'pricePerItem', @price_per_item)
|
36
|
+
hash
|
37
|
+
end
|
38
|
+
|
39
|
+
def from_hash(hash)
|
40
|
+
super
|
41
|
+
if hash.has_key?('description')
|
42
|
+
@description = hash['description']
|
43
|
+
end
|
44
|
+
if hash.has_key?('merchantLinenumber')
|
45
|
+
@merchant_linenumber = hash['merchantLinenumber']
|
46
|
+
end
|
47
|
+
if hash.has_key?('merchantPagenumber')
|
48
|
+
@merchant_pagenumber = hash['merchantPagenumber']
|
49
|
+
end
|
50
|
+
if hash.has_key?('nrOfItems')
|
51
|
+
@nr_of_items = hash['nrOfItems']
|
52
|
+
end
|
53
|
+
if hash.has_key?('pricePerItem')
|
54
|
+
@price_per_item = hash['pricePerItem']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Payment
|
10
|
+
|
11
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_LineItemLevel3InterchangeInformation LineItemLevel3InterchangeInformation}
|
12
|
+
class LineItemLevel3InterchangeInformation < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# Integer
|
15
|
+
attr_accessor :discount_amount
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :line_amount_total
|
19
|
+
|
20
|
+
# String
|
21
|
+
attr_accessor :product_code
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :product_price
|
25
|
+
|
26
|
+
# String
|
27
|
+
attr_accessor :product_type
|
28
|
+
|
29
|
+
# Integer
|
30
|
+
attr_accessor :quantity
|
31
|
+
|
32
|
+
# Integer
|
33
|
+
attr_accessor :tax_amount
|
34
|
+
|
35
|
+
# String
|
36
|
+
attr_accessor :unit
|
37
|
+
|
38
|
+
def to_h
|
39
|
+
hash = super
|
40
|
+
add_to_hash(hash, 'discountAmount', @discount_amount)
|
41
|
+
add_to_hash(hash, 'lineAmountTotal', @line_amount_total)
|
42
|
+
add_to_hash(hash, 'productCode', @product_code)
|
43
|
+
add_to_hash(hash, 'productPrice', @product_price)
|
44
|
+
add_to_hash(hash, 'productType', @product_type)
|
45
|
+
add_to_hash(hash, 'quantity', @quantity)
|
46
|
+
add_to_hash(hash, 'taxAmount', @tax_amount)
|
47
|
+
add_to_hash(hash, 'unit', @unit)
|
48
|
+
hash
|
49
|
+
end
|
50
|
+
|
51
|
+
def from_hash(hash)
|
52
|
+
super
|
53
|
+
if hash.has_key?('discountAmount')
|
54
|
+
@discount_amount = hash['discountAmount']
|
55
|
+
end
|
56
|
+
if hash.has_key?('lineAmountTotal')
|
57
|
+
@line_amount_total = hash['lineAmountTotal']
|
58
|
+
end
|
59
|
+
if hash.has_key?('productCode')
|
60
|
+
@product_code = hash['productCode']
|
61
|
+
end
|
62
|
+
if hash.has_key?('productPrice')
|
63
|
+
@product_price = hash['productPrice']
|
64
|
+
end
|
65
|
+
if hash.has_key?('productType')
|
66
|
+
@product_type = hash['productType']
|
67
|
+
end
|
68
|
+
if hash.has_key?('quantity')
|
69
|
+
@quantity = hash['quantity']
|
70
|
+
end
|
71
|
+
if hash.has_key?('taxAmount')
|
72
|
+
@tax_amount = hash['taxAmount']
|
73
|
+
end
|
74
|
+
if hash.has_key?('unit')
|
75
|
+
@unit = hash['unit']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://developer.globalcollect.com/documentation/api/server/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/key_value_pair'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/redirect_data'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Payment
|
12
|
+
|
13
|
+
# Class {https://developer.globalcollect.com/documentation/api/server/#schema_MerchantAction MerchantAction}
|
14
|
+
class MerchantAction < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :action_type
|
18
|
+
|
19
|
+
# {Ingenico::Connect::SDK::Domain::Payment::RedirectData}
|
20
|
+
attr_accessor :redirect_data
|
21
|
+
|
22
|
+
# String
|
23
|
+
attr_accessor :rendering_data
|
24
|
+
|
25
|
+
# Array of {Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair}
|
26
|
+
attr_accessor :show_data
|
27
|
+
|
28
|
+
def to_h
|
29
|
+
hash = super
|
30
|
+
add_to_hash(hash, 'actionType', @action_type)
|
31
|
+
add_to_hash(hash, 'redirectData', @redirect_data)
|
32
|
+
add_to_hash(hash, 'renderingData', @rendering_data)
|
33
|
+
add_to_hash(hash, 'showData', @show_data)
|
34
|
+
hash
|
35
|
+
end
|
36
|
+
|
37
|
+
def from_hash(hash)
|
38
|
+
super
|
39
|
+
if hash.has_key?('actionType')
|
40
|
+
@action_type = hash['actionType']
|
41
|
+
end
|
42
|
+
if hash.has_key?('redirectData')
|
43
|
+
if !(hash['redirectData'].is_a? Hash)
|
44
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectData']]
|
45
|
+
end
|
46
|
+
@redirect_data = Ingenico::Connect::SDK::Domain::Payment::RedirectData.new_from_hash(hash['redirectData'])
|
47
|
+
end
|
48
|
+
if hash.has_key?('renderingData')
|
49
|
+
@rendering_data = hash['renderingData']
|
50
|
+
end
|
51
|
+
if hash.has_key?('showData')
|
52
|
+
if !(hash['showData'].is_a? Array)
|
53
|
+
raise TypeError, "value '%s' is not an Array" % [hash['showData']]
|
54
|
+
end
|
55
|
+
@show_data = []
|
56
|
+
hash['showData'].each do |e|
|
57
|
+
@show_data << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|