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,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/factory'
|
6
|
+
require 'ingenico/connect/sdk/merchant/products/get_product_params'
|
7
|
+
|
8
|
+
Products = Ingenico::Connect::SDK::Merchant::Products
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Products::GetProductParams.new
|
13
|
+
query.amount = 1000
|
14
|
+
query.is_recurring = true
|
15
|
+
query.country_code = 'US'
|
16
|
+
query.locale = 'en_US'
|
17
|
+
query.currency_code = 'USD'
|
18
|
+
query.add_hide('fields')
|
19
|
+
|
20
|
+
response = client.merchant('merchantId').products().get(1, query)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_client
|
25
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
26
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
27
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
28
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
29
|
+
ensure
|
30
|
+
# Free networking resources when done
|
31
|
+
client.close unless client.nil?
|
32
|
+
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/merchant/products/find_products_params'
|
7
|
+
|
8
|
+
Products = Ingenico::Connect::SDK::Merchant::Products
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Products::FindProductsParams.new
|
13
|
+
query.amount = 1000
|
14
|
+
query.is_recurring = true
|
15
|
+
query.country_code = 'US'
|
16
|
+
query.locale = 'en_US'
|
17
|
+
query.currency_code = 'USD'
|
18
|
+
query.add_hide('fields')
|
19
|
+
|
20
|
+
response = client.merchant('merchantId').products().find(query)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_client
|
25
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
26
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
27
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
28
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
29
|
+
ensure
|
30
|
+
# Free networking resources when done
|
31
|
+
client.close unless client.nil?
|
32
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/refund/approve_refund_request'
|
7
|
+
|
8
|
+
Refund = Ingenico::Connect::SDK::Domain::Refund
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
body = Refund::ApproveRefundRequest.new
|
13
|
+
body.amount = 199
|
14
|
+
|
15
|
+
client.merchant('merchantId').refunds().approve('refundId', body)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def get_client
|
20
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
21
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
22
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
23
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
24
|
+
ensure
|
25
|
+
# Free networking resources when done
|
26
|
+
client.close unless client.nil?
|
27
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
client.merchant('merchantId').refunds().cancelapproval('refundId')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
client.merchant('merchantId').refunds().cancel('refundId')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
response = client.merchant('merchantId').refunds().get('refundId')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/address'
|
7
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
8
|
+
require 'ingenico/connect/sdk/domain/definitions/bank_account_bban'
|
9
|
+
require 'ingenico/connect/sdk/domain/riskassessments/risk_assessment_bank_account'
|
10
|
+
require 'ingenico/connect/sdk/domain/riskassessments/customer_risk_assessment'
|
11
|
+
require 'ingenico/connect/sdk/domain/riskassessments/order_risk_assessment'
|
12
|
+
|
13
|
+
Definitions = Ingenico::Connect::SDK::Domain::Definitions
|
14
|
+
Riskassessments = Ingenico::Connect::SDK::Domain::Riskassessments
|
15
|
+
|
16
|
+
def example
|
17
|
+
get_client do |client|
|
18
|
+
bank_account_bban = Definitions::BankAccountBban.new
|
19
|
+
bank_account_bban.account_number = '0532013000'
|
20
|
+
bank_account_bban.bank_code = '37040044'
|
21
|
+
bank_account_bban.country_code = 'DE'
|
22
|
+
|
23
|
+
amount_of_money = Definitions::AmountOfMoney.new
|
24
|
+
amount_of_money.amount = 100
|
25
|
+
amount_of_money.currency_code = 'EUR'
|
26
|
+
|
27
|
+
billing_address = Definitions::Address.new
|
28
|
+
billing_address.country_code = 'US'
|
29
|
+
|
30
|
+
customer = Riskassessments::CustomerRiskAssessment.new
|
31
|
+
customer.billing_address = billing_address
|
32
|
+
customer.locale = 'en_US'
|
33
|
+
|
34
|
+
order = Riskassessments::OrderRiskAssessment.new
|
35
|
+
order.amount_of_money = amount_of_money
|
36
|
+
order.customer = customer
|
37
|
+
|
38
|
+
body = Riskassessments::RiskAssessmentBankAccount.new
|
39
|
+
body.bank_account_bban = bank_account_bban
|
40
|
+
body.order = order
|
41
|
+
|
42
|
+
response = client.merchant('merchantId').riskassessments().bankaccounts(body)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def get_client
|
47
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
48
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
49
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
50
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
51
|
+
ensure
|
52
|
+
# Free networking resources when done
|
53
|
+
client.close unless client.nil?
|
54
|
+
end
|
@@ -0,0 +1,114 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/additional_order_input_airline_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/definitions/address'
|
8
|
+
require 'ingenico/connect/sdk/domain/definitions/airline_data'
|
9
|
+
require 'ingenico/connect/sdk/domain/definitions/airline_flight_leg'
|
10
|
+
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
11
|
+
require 'ingenico/connect/sdk/domain/definitions/card'
|
12
|
+
require 'ingenico/connect/sdk/domain/riskassessments/risk_assessment_card'
|
13
|
+
require 'ingenico/connect/sdk/domain/riskassessments/customer_risk_assessment'
|
14
|
+
require 'ingenico/connect/sdk/domain/riskassessments/order_risk_assessment'
|
15
|
+
|
16
|
+
Definitions = Ingenico::Connect::SDK::Domain::Definitions
|
17
|
+
Riskassessments = Ingenico::Connect::SDK::Domain::Riskassessments
|
18
|
+
|
19
|
+
def example
|
20
|
+
get_client do |client|
|
21
|
+
card = Definitions::Card.new
|
22
|
+
card.card_number = '4567350000427977'
|
23
|
+
card.cvv = '123'
|
24
|
+
card.expiry_date = '0820'
|
25
|
+
|
26
|
+
flight_legs = []
|
27
|
+
|
28
|
+
flight_leg1 = Definitions::AirlineFlightLeg.new
|
29
|
+
flight_leg1.airline_class = '1'
|
30
|
+
flight_leg1.arrival_airport = 'AMS'
|
31
|
+
flight_leg1.carrier_code = '14'
|
32
|
+
flight_leg1.date = '20150102'
|
33
|
+
flight_leg1.departure_time = '17:59'
|
34
|
+
flight_leg1.fare = 'fare'
|
35
|
+
flight_leg1.fare_basis = 'INTERNET'
|
36
|
+
flight_leg1.flight_number = 'KL791'
|
37
|
+
flight_leg1.number = 1
|
38
|
+
flight_leg1.origin_airport = 'BCN'
|
39
|
+
flight_leg1.stopover_code = 'non-permitted'
|
40
|
+
|
41
|
+
flight_legs << flight_leg1
|
42
|
+
|
43
|
+
flight_leg2 = Definitions::AirlineFlightLeg.new
|
44
|
+
flight_leg2.airline_class = '1'
|
45
|
+
flight_leg2.arrival_airport = 'BCN'
|
46
|
+
flight_leg2.carrier_code = '14'
|
47
|
+
flight_leg2.date = '20150102'
|
48
|
+
flight_leg2.departure_time = '23:59'
|
49
|
+
flight_leg2.fare = 'fare'
|
50
|
+
flight_leg2.fare_basis = 'INTERNET'
|
51
|
+
flight_leg2.flight_number = 'KL792'
|
52
|
+
flight_leg2.number = 2
|
53
|
+
flight_leg2.origin_airport = 'AMS'
|
54
|
+
flight_leg2.stopover_code = 'non-permitted'
|
55
|
+
|
56
|
+
flight_legs << flight_leg2
|
57
|
+
|
58
|
+
airline_data = Definitions::AirlineData.new
|
59
|
+
airline_data.agent_numeric_code = '123321'
|
60
|
+
airline_data.code = '123'
|
61
|
+
airline_data.flight_date = '20150102'
|
62
|
+
airline_data.flight_legs = flight_legs
|
63
|
+
airline_data.invoice_number = '123456'
|
64
|
+
airline_data.is_e_ticket = true
|
65
|
+
airline_data.is_registered_customer = true
|
66
|
+
airline_data.is_restricted_ticket = true
|
67
|
+
airline_data.is_third_party = true
|
68
|
+
airline_data.issue_date = '20150101'
|
69
|
+
airline_data.merchant_customer_id = '14'
|
70
|
+
airline_data.name = 'Air France KLM'
|
71
|
+
airline_data.passenger_name = 'WECOYOTE'
|
72
|
+
airline_data.place_of_issue = 'Utah'
|
73
|
+
airline_data.pnr = '4JTGKT'
|
74
|
+
airline_data.point_of_sale = 'IATA point of sale name'
|
75
|
+
airline_data.pos_city_code = 'AMS'
|
76
|
+
airline_data.ticket_delivery_method = 'e-ticket'
|
77
|
+
airline_data.ticket_number = 'KLM20050000'
|
78
|
+
|
79
|
+
additional_input = Definitions::AdditionalOrderInputAirlineData.new
|
80
|
+
additional_input.airline_data = airline_data
|
81
|
+
|
82
|
+
amount_of_money = Definitions::AmountOfMoney.new
|
83
|
+
amount_of_money.amount = 100
|
84
|
+
amount_of_money.currency_code = 'EUR'
|
85
|
+
|
86
|
+
billing_address = Definitions::Address.new
|
87
|
+
billing_address.country_code = 'US'
|
88
|
+
|
89
|
+
customer = Riskassessments::CustomerRiskAssessment.new
|
90
|
+
customer.billing_address = billing_address
|
91
|
+
customer.locale = 'en_US'
|
92
|
+
|
93
|
+
order = Riskassessments::OrderRiskAssessment.new
|
94
|
+
order.additional_input = additional_input
|
95
|
+
order.amount_of_money = amount_of_money
|
96
|
+
order.customer = customer
|
97
|
+
|
98
|
+
body = Riskassessments::RiskAssessmentCard.new
|
99
|
+
body.card = card
|
100
|
+
body.order = order
|
101
|
+
|
102
|
+
response = client.merchant('merchantId').riskassessments().cards(body)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def get_client
|
107
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
108
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
109
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
110
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
111
|
+
ensure
|
112
|
+
# Free networking resources when done
|
113
|
+
client.close unless client.nil?
|
114
|
+
end
|
@@ -0,0 +1,29 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/merchant/services/convert_amount_params'
|
7
|
+
|
8
|
+
Services = Ingenico::Connect::SDK::Merchant::Services
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Services::ConvertAmountParams.new
|
13
|
+
query.source = 'EUR'
|
14
|
+
query.amount = 100
|
15
|
+
query.target = 'USD'
|
16
|
+
|
17
|
+
response = client.merchant('merchantId').services().convert_amount(query)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_client
|
22
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
23
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
24
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
25
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
26
|
+
ensure
|
27
|
+
# Free networking resources when done
|
28
|
+
client.close unless client.nil?
|
29
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/bank_account_bban'
|
7
|
+
require 'ingenico/connect/sdk/domain/services/bank_details_request'
|
8
|
+
|
9
|
+
Definitions = Ingenico::Connect::SDK::Domain::Definitions
|
10
|
+
Services = Ingenico::Connect::SDK::Domain::Services
|
11
|
+
|
12
|
+
def example
|
13
|
+
get_client do |client|
|
14
|
+
bank_account_bban = Definitions::BankAccountBban.new
|
15
|
+
bank_account_bban.account_number = '0532013000'
|
16
|
+
bank_account_bban.bank_code = '37040044'
|
17
|
+
bank_account_bban.country_code = 'DE'
|
18
|
+
|
19
|
+
body = Services::BankDetailsRequest.new
|
20
|
+
body.bank_account_bban = bank_account_bban
|
21
|
+
|
22
|
+
response = client.merchant('merchantId').services().bankaccount(body)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_client
|
27
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
28
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
29
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
30
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
31
|
+
ensure
|
32
|
+
# Free networking resources when done
|
33
|
+
client.close unless client.nil?
|
34
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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/factory'
|
6
|
+
require 'ingenico/connect/sdk/domain/services/get_iin_details_request'
|
7
|
+
|
8
|
+
Services = Ingenico::Connect::SDK::Domain::Services
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
body = Services::GetIINDetailsRequest.new
|
13
|
+
body.bin = '4567350000427977'
|
14
|
+
|
15
|
+
response = client.merchant('merchantId').services().get_iin_details(body)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def get_client
|
20
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
21
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
22
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
23
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
24
|
+
ensure
|
25
|
+
# Free networking resources when done
|
26
|
+
client.close unless client.nil?
|
27
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
response = client.merchant('merchantId').services().testconnection()
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|