onlinepayments-sdk-ruby 4.23.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +5 -6
- data/Rakefile +0 -0
- data/lib/onlinepayments/sdk/api_exception.rb +47 -35
- data/lib/onlinepayments/sdk/api_resource.rb +49 -97
- data/lib/onlinepayments/sdk/authentication/authenticator.rb +19 -0
- data/lib/onlinepayments/sdk/authentication/authorization_type.rb +15 -0
- data/lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb +109 -0
- data/lib/onlinepayments/sdk/authentication.rb +1 -0
- data/lib/onlinepayments/sdk/authorization_exception.rb +14 -8
- data/lib/onlinepayments/sdk/call_context.rb +30 -21
- data/lib/onlinepayments/sdk/client.rb +36 -18
- data/lib/onlinepayments/sdk/communication/communication_exception.rb +19 -0
- data/lib/onlinepayments/sdk/communication/connection.rb +48 -0
- data/lib/onlinepayments/sdk/communication/default_connection.rb +427 -0
- data/lib/onlinepayments/sdk/communication/metadata_provider.rb +160 -0
- data/lib/onlinepayments/sdk/communication/multipart_form_data_object.rb +52 -0
- data/lib/onlinepayments/sdk/communication/multipart_form_data_request.rb +13 -0
- data/lib/onlinepayments/sdk/communication/not_found_exception.rb +19 -0
- data/lib/onlinepayments/sdk/communication/param_request.rb +14 -0
- data/lib/onlinepayments/sdk/communication/pooled_connection.rb +26 -0
- data/lib/onlinepayments/sdk/communication/request_header.rb +62 -0
- data/lib/onlinepayments/sdk/communication/request_param.rb +28 -0
- data/lib/onlinepayments/sdk/communication/response_exception.rb +56 -0
- data/lib/onlinepayments/sdk/communication/response_header.rb +78 -0
- data/lib/onlinepayments/sdk/communication.rb +1 -0
- data/lib/onlinepayments/sdk/communicator.rb +475 -268
- data/lib/onlinepayments/sdk/communicator_configuration.rb +162 -53
- data/lib/onlinepayments/sdk/declined_payment_exception.rb +28 -21
- data/lib/onlinepayments/sdk/declined_payout_exception.rb +28 -23
- data/lib/onlinepayments/sdk/declined_refund_exception.rb +28 -23
- data/lib/onlinepayments/sdk/declined_transaction_exception.rb +16 -10
- data/lib/onlinepayments/sdk/domain/account_on_file.rb +44 -35
- data/lib/onlinepayments/sdk/domain/account_on_file_attribute.rb +42 -28
- data/lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb +29 -24
- data/lib/onlinepayments/sdk/domain/acquirer_information.rb +27 -22
- data/lib/onlinepayments/sdk/domain/acquirer_selection_information.rb +34 -24
- data/lib/onlinepayments/sdk/domain/additional_order_input.rb +43 -38
- data/lib/onlinepayments/sdk/domain/address.rb +65 -43
- data/lib/onlinepayments/sdk/domain/address_personal.rb +78 -52
- data/lib/onlinepayments/sdk/domain/airline_data.rb +204 -123
- data/lib/onlinepayments/sdk/domain/airline_flight_leg.rb +158 -95
- data/lib/onlinepayments/sdk/domain/airline_passenger.rb +59 -39
- data/lib/onlinepayments/sdk/domain/amount_breakdown.rb +27 -20
- data/lib/onlinepayments/sdk/domain/amount_of_money.rb +27 -20
- data/lib/onlinepayments/sdk/domain/api_error.rb +73 -47
- data/lib/onlinepayments/sdk/domain/apple_pay_line_item.rb +72 -0
- data/lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb +61 -0
- data/lib/onlinepayments/sdk/domain/bank_account_iban.rb +20 -16
- data/lib/onlinepayments/sdk/domain/browser_data.rb +51 -35
- data/lib/onlinepayments/sdk/domain/calculate_surcharge_request.rb +27 -24
- data/lib/onlinepayments/sdk/domain/calculate_surcharge_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +27 -22
- data/lib/onlinepayments/sdk/domain/cancel_payment_response.rb +20 -18
- data/lib/onlinepayments/sdk/domain/capture.rb +41 -32
- data/lib/onlinepayments/sdk/domain/capture_output.rb +106 -78
- data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +43 -26
- data/lib/onlinepayments/sdk/domain/capture_response.rb +41 -32
- data/lib/onlinepayments/sdk/domain/capture_status_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/captures_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/card.rb +41 -28
- data/lib/onlinepayments/sdk/domain/card_essentials.rb +41 -28
- data/lib/onlinepayments/sdk/domain/card_fraud_results.rb +34 -24
- data/lib/onlinepayments/sdk/domain/card_info.rb +27 -20
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +199 -128
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +149 -104
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +36 -28
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +142 -100
- data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +41 -30
- data/lib/onlinepayments/sdk/domain/card_recurrence_details.rb +20 -16
- data/lib/onlinepayments/sdk/domain/card_source.rb +41 -30
- data/lib/onlinepayments/sdk/domain/card_without_cvv.rb +34 -24
- data/lib/onlinepayments/sdk/domain/company_information.rb +20 -16
- data/lib/onlinepayments/sdk/domain/complete_payment_card_payment_method_specific_input.rb +20 -18
- data/lib/onlinepayments/sdk/domain/complete_payment_request.rb +27 -24
- data/lib/onlinepayments/sdk/domain/complete_payment_response.rb +35 -31
- data/lib/onlinepayments/sdk/domain/contact_details.rb +51 -35
- data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +76 -59
- data/lib/onlinepayments/sdk/domain/create_hosted_checkout_response.rb +60 -43
- data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +57 -42
- data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb +57 -44
- data/lib/onlinepayments/sdk/domain/create_mandate_request.rb +71 -48
- data/lib/onlinepayments/sdk/domain/create_mandate_response.rb +27 -24
- data/lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb +71 -48
- data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +127 -87
- data/lib/onlinepayments/sdk/domain/create_payment_request.rb +82 -60
- data/lib/onlinepayments/sdk/domain/create_payment_response.rb +35 -31
- data/lib/onlinepayments/sdk/domain/create_payout_request.rb +61 -40
- data/lib/onlinepayments/sdk/domain/create_token_request.rb +27 -22
- data/lib/onlinepayments/sdk/domain/created_payment_output.rb +27 -22
- data/lib/onlinepayments/sdk/domain/created_token_response.rb +50 -38
- data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +29 -26
- data/lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb +27 -20
- data/lib/onlinepayments/sdk/domain/currency_conversion.rb +27 -22
- data/lib/onlinepayments/sdk/domain/currency_conversion_input.rb +27 -20
- data/lib/onlinepayments/sdk/domain/currency_conversion_request.rb +27 -24
- data/lib/onlinepayments/sdk/domain/currency_conversion_response.rb +34 -28
- data/lib/onlinepayments/sdk/domain/currency_conversion_result.rb +27 -20
- data/lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/customer.rb +87 -68
- data/lib/onlinepayments/sdk/domain/customer_account.rb +77 -55
- data/lib/onlinepayments/sdk/domain/customer_account_authentication.rb +34 -20
- data/lib/onlinepayments/sdk/domain/customer_bank_account.rb +34 -24
- data/lib/onlinepayments/sdk/domain/customer_device.rb +64 -44
- data/lib/onlinepayments/sdk/domain/customer_device_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/customer_output.rb +20 -18
- data/lib/onlinepayments/sdk/domain/customer_payment_activity.rb +34 -24
- data/lib/onlinepayments/sdk/domain/customer_token.rb +35 -31
- data/lib/onlinepayments/sdk/domain/data_object.rb +32 -0
- data/lib/onlinepayments/sdk/domain/dcc_card_source.rb +41 -30
- data/lib/onlinepayments/sdk/domain/dcc_proposal.rb +51 -41
- data/lib/onlinepayments/sdk/domain/decrypted_payment_data.rb +51 -35
- data/lib/onlinepayments/sdk/domain/directory_entry.rb +34 -24
- data/lib/onlinepayments/sdk/domain/discount.rb +20 -16
- data/lib/onlinepayments/sdk/domain/empty_validator.rb +7 -6
- data/lib/onlinepayments/sdk/domain/error_response.rb +29 -24
- data/lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb +86 -55
- data/lib/onlinepayments/sdk/domain/external_token_linked.rb +35 -24
- data/lib/onlinepayments/sdk/domain/feedbacks.rb +42 -0
- data/lib/onlinepayments/sdk/domain/fixed_list_validator.rb +22 -20
- data/lib/onlinepayments/sdk/domain/fraud_fields.rb +37 -28
- data/lib/onlinepayments/sdk/domain/fraud_results.rb +20 -16
- data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +50 -36
- data/lib/onlinepayments/sdk/domain/get_hosted_checkout_response.rb +27 -22
- data/lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb +27 -22
- data/lib/onlinepayments/sdk/domain/get_iin_details_request.rb +27 -22
- data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +52 -38
- data/lib/onlinepayments/sdk/domain/get_mandate_response.rb +20 -18
- data/lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/get_payment_products_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/get_privacy_policy_response.rb +20 -16
- data/lib/onlinepayments/sdk/domain/gift_card_purchase.rb +27 -22
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +83 -56
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb +27 -20
- data/lib/onlinepayments/sdk/domain/iin_detail.rb +34 -24
- data/lib/onlinepayments/sdk/domain/label_template_element.rb +27 -20
- data/lib/onlinepayments/sdk/domain/length_validator.rb +27 -20
- data/lib/onlinepayments/sdk/domain/line_item.rb +44 -31
- data/lib/onlinepayments/sdk/domain/line_item_invoice_data.rb +20 -16
- data/lib/onlinepayments/sdk/domain/loan_recipient.rb +51 -35
- data/lib/onlinepayments/sdk/domain/lodging_data.rb +20 -16
- data/lib/onlinepayments/sdk/domain/mandate_address.rb +51 -35
- data/lib/onlinepayments/sdk/domain/mandate_address_response.rb +51 -35
- data/lib/onlinepayments/sdk/domain/mandate_contact_details.rb +20 -16
- data/lib/onlinepayments/sdk/domain/mandate_customer.rb +52 -44
- data/lib/onlinepayments/sdk/domain/mandate_customer_response.rb +52 -44
- data/lib/onlinepayments/sdk/domain/mandate_merchant_action.rb +27 -22
- data/lib/onlinepayments/sdk/domain/mandate_personal_information.rb +27 -22
- data/lib/onlinepayments/sdk/domain/mandate_personal_information_response.rb +27 -22
- data/lib/onlinepayments/sdk/domain/mandate_personal_name.rb +27 -20
- data/lib/onlinepayments/sdk/domain/mandate_personal_name_response.rb +27 -20
- data/lib/onlinepayments/sdk/domain/mandate_redirect_data.rb +27 -20
- data/lib/onlinepayments/sdk/domain/mandate_response.rb +64 -44
- data/lib/onlinepayments/sdk/domain/merchant_action.rb +54 -30
- data/lib/onlinepayments/sdk/domain/mobile_payment_data.rb +27 -20
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb +43 -26
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb +71 -50
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +58 -45
- data/lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb +32 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +20 -18
- data/lib/onlinepayments/sdk/domain/mobile_three_d_secure_challenge_parameters.rb +51 -0
- data/lib/onlinepayments/sdk/domain/multiple_payment_information.rb +27 -20
- data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/operation_output.rb +67 -45
- data/lib/onlinepayments/sdk/domain/operation_payment_references.rb +30 -0
- data/lib/onlinepayments/sdk/domain/order.rb +75 -66
- data/lib/onlinepayments/sdk/domain/order_line_details.rb +79 -47
- data/lib/onlinepayments/sdk/domain/order_references.rb +34 -24
- data/lib/onlinepayments/sdk/domain/order_status_output.rb +52 -38
- data/lib/onlinepayments/sdk/domain/order_type_information.rb +27 -20
- data/lib/onlinepayments/sdk/domain/other_details.rb +37 -0
- data/lib/onlinepayments/sdk/domain/payment_account_on_file.rb +27 -20
- data/lib/onlinepayments/sdk/domain/payment_context.rb +34 -26
- data/lib/onlinepayments/sdk/domain/payment_creation_output.rb +41 -28
- data/lib/onlinepayments/sdk/domain/payment_details_response.rb +60 -49
- data/lib/onlinepayments/sdk/domain/payment_error_response.rb +37 -31
- data/lib/onlinepayments/sdk/domain/payment_link_event.rb +34 -24
- data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +34 -28
- data/lib/onlinepayments/sdk/domain/payment_link_order_output.rb +34 -28
- data/lib/onlinepayments/sdk/domain/payment_link_response.rb +81 -51
- data/lib/onlinepayments/sdk/domain/payment_link_specific_input.rb +36 -24
- data/lib/onlinepayments/sdk/domain/payment_output.rb +115 -94
- data/lib/onlinepayments/sdk/domain/payment_product.rb +117 -85
- data/lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb +20 -18
- data/lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb +41 -28
- data/lib/onlinepayments/sdk/domain/payment_product3012.rb +27 -20
- data/lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb +51 -0
- data/lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb +22 -20
- data/lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb +27 -24
- data/lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb +29 -24
- data/lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb +48 -16
- data/lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product5404.rb +27 -20
- data/lib/onlinepayments/sdk/domain/payment_product5407.rb +27 -20
- data/lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb +41 -24
- data/lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb +20 -16
- data/lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb +72 -47
- data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +43 -38
- data/lib/onlinepayments/sdk/domain/payment_product_display_hints.rb +34 -24
- data/lib/onlinepayments/sdk/domain/payment_product_field.rb +41 -32
- data/lib/onlinepayments/sdk/domain/payment_product_field_data_restrictions.rb +27 -22
- data/lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb +41 -28
- data/lib/onlinepayments/sdk/domain/payment_product_field_display_hints.rb +84 -56
- data/lib/onlinepayments/sdk/domain/payment_product_field_form_element.rb +30 -24
- data/lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb +28 -20
- data/lib/onlinepayments/sdk/domain/payment_product_field_validators.rb +83 -73
- data/lib/onlinepayments/sdk/domain/payment_product_filter.rb +32 -29
- data/lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb +22 -20
- data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb +27 -24
- data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb +27 -24
- data/lib/onlinepayments/sdk/domain/payment_product_group.rb +44 -37
- data/lib/onlinepayments/sdk/domain/payment_product_networks_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/payment_references.rb +27 -20
- data/lib/onlinepayments/sdk/domain/payment_response.rb +51 -41
- data/lib/onlinepayments/sdk/domain/payment_status_output.rb +66 -46
- data/lib/onlinepayments/sdk/domain/payout_error_response.rb +37 -31
- data/lib/onlinepayments/sdk/domain/payout_output.rb +27 -22
- data/lib/onlinepayments/sdk/domain/payout_response.rb +41 -32
- data/lib/onlinepayments/sdk/domain/payout_result.rb +41 -32
- data/lib/onlinepayments/sdk/domain/payout_status_output.rb +34 -24
- data/lib/onlinepayments/sdk/domain/personal_information.rb +34 -26
- data/lib/onlinepayments/sdk/domain/personal_information_token.rb +20 -18
- data/lib/onlinepayments/sdk/domain/personal_name.rb +34 -24
- data/lib/onlinepayments/sdk/domain/personal_name_token.rb +27 -20
- data/lib/onlinepayments/sdk/domain/product_directory.rb +22 -20
- data/lib/onlinepayments/sdk/domain/protection_eligibility.rb +27 -20
- data/lib/onlinepayments/sdk/domain/range_validator.rb +27 -20
- data/lib/onlinepayments/sdk/domain/rate_details.rb +51 -35
- data/lib/onlinepayments/sdk/domain/reattempt_instructions.rb +46 -0
- data/lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb +37 -0
- data/lib/onlinepayments/sdk/domain/redirect_data.rb +27 -20
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +166 -88
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +95 -75
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3203_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3302_specific_input.rb +44 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb +27 -16
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +72 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5402_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5403_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5406_specific_input.rb +20 -18
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5408_specific_input.rb +27 -22
- data/lib/onlinepayments/sdk/domain/redirect_payment_product5410_specific_input.rb +32 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +41 -20
- data/lib/onlinepayments/sdk/domain/redirection_data.rb +20 -16
- data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +34 -26
- data/lib/onlinepayments/sdk/domain/refund_e_wallet_method_specific_output.rb +34 -26
- data/lib/onlinepayments/sdk/domain/refund_error_response.rb +37 -31
- data/lib/onlinepayments/sdk/domain/refund_mobile_method_specific_output.rb +34 -24
- data/lib/onlinepayments/sdk/domain/refund_output.rb +89 -64
- data/lib/onlinepayments/sdk/domain/refund_payment_product840_customer_account.rb +34 -24
- data/lib/onlinepayments/sdk/domain/refund_payment_product840_specific_output.rb +20 -18
- data/lib/onlinepayments/sdk/domain/refund_redirect_method_specific_output.rb +27 -20
- data/lib/onlinepayments/sdk/domain/refund_request.rb +43 -24
- data/lib/onlinepayments/sdk/domain/refund_response.rb +41 -32
- data/lib/onlinepayments/sdk/domain/refunds_response.rb +22 -20
- data/lib/onlinepayments/sdk/domain/regular_expression_validator.rb +20 -16
- data/lib/onlinepayments/sdk/domain/send_test_request.rb +30 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb +27 -22
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb +27 -22
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +34 -28
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb +27 -22
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input_base.rb +27 -22
- data/lib/onlinepayments/sdk/domain/session_request.rb +22 -20
- data/lib/onlinepayments/sdk/domain/session_response.rb +53 -39
- data/lib/onlinepayments/sdk/domain/shipping.rb +76 -52
- data/lib/onlinepayments/sdk/domain/shipping_method.rb +41 -28
- data/lib/onlinepayments/sdk/domain/shopping_cart.rb +62 -48
- data/lib/onlinepayments/sdk/domain/shopping_cart_extension.rb +51 -43
- data/lib/onlinepayments/sdk/domain/show_form_data.rb +35 -31
- data/lib/onlinepayments/sdk/domain/show_instructions_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +60 -39
- data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +20 -16
- data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +35 -31
- data/lib/onlinepayments/sdk/domain/subsequent_payment_response.rb +20 -18
- data/lib/onlinepayments/sdk/domain/surcharge.rb +59 -48
- data/lib/onlinepayments/sdk/domain/surcharge_calculation_card.rb +27 -20
- data/lib/onlinepayments/sdk/domain/surcharge_for_payment_link.rb +20 -16
- data/lib/onlinepayments/sdk/domain/surcharge_rate.rb +41 -28
- data/lib/onlinepayments/sdk/domain/surcharge_specific_input.rb +27 -22
- data/lib/onlinepayments/sdk/domain/surcharge_specific_output.rb +34 -28
- data/lib/onlinepayments/sdk/domain/test_connection.rb +20 -16
- data/lib/onlinepayments/sdk/domain/three_d_secure.rb +98 -63
- data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +78 -52
- data/lib/onlinepayments/sdk/domain/three_d_secure_data.rb +34 -24
- data/lib/onlinepayments/sdk/domain/three_d_secure_results.rb +107 -67
- data/lib/onlinepayments/sdk/domain/token_card.rb +27 -22
- data/lib/onlinepayments/sdk/domain/token_card_data.rb +27 -18
- data/lib/onlinepayments/sdk/domain/token_card_specific_input.rb +20 -18
- data/lib/onlinepayments/sdk/domain/token_data.rb +27 -18
- data/lib/onlinepayments/sdk/domain/token_e_wallet.rb +28 -22
- data/lib/onlinepayments/sdk/domain/token_response.rb +58 -45
- data/lib/onlinepayments/sdk/domain/transaction.rb +20 -18
- data/lib/onlinepayments/sdk/domain/uploadable_file.rb +33 -0
- data/lib/onlinepayments/sdk/domain/validate_credentials_request.rb +37 -0
- data/lib/onlinepayments/sdk/domain/validate_credentials_response.rb +30 -0
- data/lib/onlinepayments/sdk/domain/value_mapping_element.rb +29 -24
- data/lib/onlinepayments/sdk/domain.rb +4 -0
- data/lib/onlinepayments/sdk/exception_factory.rb +76 -0
- data/lib/onlinepayments/sdk/factory.rb +163 -118
- data/lib/onlinepayments/sdk/idempotence_exception.rb +23 -19
- data/lib/onlinepayments/sdk/json/default_marshaller.rb +34 -0
- data/lib/onlinepayments/sdk/json/marshaller.rb +27 -0
- data/lib/onlinepayments/sdk/json/marshaller_syntax_exception.rb +9 -0
- data/lib/onlinepayments/sdk/json.rb +1 -0
- data/lib/onlinepayments/sdk/logging/communicator_logger.rb +18 -16
- data/lib/onlinepayments/sdk/logging/log_message_builder.rb +80 -47
- data/lib/onlinepayments/sdk/logging/logging_capable.rb +1 -1
- data/lib/onlinepayments/sdk/logging/obfuscation/body_obfuscator.rb +113 -0
- data/lib/onlinepayments/sdk/logging/obfuscation/header_obfuscator.rb +54 -0
- data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_capable.rb +21 -0
- data/lib/onlinepayments/sdk/logging/obfuscation/obfuscation_rule.rb +47 -0
- data/lib/onlinepayments/sdk/logging/obfuscation.rb +1 -0
- data/lib/onlinepayments/sdk/logging/request_log_message_builder.rb +40 -29
- data/lib/onlinepayments/sdk/logging/response_log_message_builder.rb +30 -23
- data/lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb +49 -45
- data/lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb +20 -23
- data/lib/onlinepayments/sdk/logging.rb +1 -10
- data/lib/onlinepayments/sdk/merchant/captures/captures_client.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/captures.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/complete/complete_client.rb +60 -0
- data/lib/onlinepayments/sdk/merchant/complete.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +72 -71
- data/lib/onlinepayments/sdk/merchant/hostedcheckout.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +72 -71
- data/lib/onlinepayments/sdk/merchant/hostedtokenization.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +165 -164
- data/lib/onlinepayments/sdk/merchant/mandates.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/merchant_client.rb +116 -64
- data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +102 -101
- data/lib/onlinepayments/sdk/merchant/paymentlinks.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/payments/payments_client.rb +233 -332
- data/lib/onlinepayments/sdk/merchant/payments.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +73 -71
- data/lib/onlinepayments/sdk/merchant/payouts.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/privacypolicy/get_privacy_policy_params.rb +32 -0
- data/lib/onlinepayments/sdk/merchant/privacypolicy/privacy_policy_client.rb +54 -0
- data/lib/onlinepayments/sdk/merchant/privacypolicy.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +50 -47
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +50 -47
- data/lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb +72 -72
- data/lib/onlinepayments/sdk/merchant/productgroups.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +27 -25
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +50 -47
- data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +50 -47
- data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +21 -19
- data/lib/onlinepayments/sdk/merchant/products/products_client.rb +134 -136
- data/lib/onlinepayments/sdk/merchant/products.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/refunds/refunds_client.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/refunds.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/services/services_client.rb +124 -155
- data/lib/onlinepayments/sdk/merchant/services.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb +42 -41
- data/lib/onlinepayments/sdk/merchant/sessions.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +101 -100
- data/lib/onlinepayments/sdk/merchant/tokens.rb +4 -0
- data/lib/onlinepayments/sdk/merchant/webhooks/webhooks_client.rb +83 -0
- data/lib/onlinepayments/sdk/merchant/webhooks.rb +4 -0
- data/lib/onlinepayments/sdk/merchant.rb +4 -0
- data/lib/onlinepayments/sdk/platform_exception.rb +19 -0
- data/lib/onlinepayments/sdk/proxy_configuration.rb +60 -60
- data/lib/onlinepayments/sdk/reference_exception.rb +14 -9
- data/lib/onlinepayments/sdk/validation_exception.rb +14 -9
- data/lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb +17 -15
- data/lib/onlinepayments/sdk/webhooks/in_memory_secret_key_store.rb +46 -43
- data/lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb +16 -12
- data/lib/onlinepayments/sdk/webhooks/secret_key_store.rb +13 -11
- data/lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb +15 -14
- data/lib/onlinepayments/sdk/webhooks/signature_validator.rb +81 -0
- data/lib/onlinepayments/sdk/webhooks/webhooks_event.rb +84 -53
- data/lib/onlinepayments/sdk/webhooks/webhooks_helper.rb +28 -90
- data/lib/onlinepayments/sdk/webhooks.rb +1 -11
- data/lib/onlinepayments/sdk.rb +4 -26
- data/onlinepayments-sdk-ruby.gemspec +3 -2
- metadata +95 -35
- data/lib/onlinepayments/sdk/authenticator.rb +0 -16
- data/lib/onlinepayments/sdk/communication_exception.rb +0 -16
- data/lib/onlinepayments/sdk/connection.rb +0 -41
- data/lib/onlinepayments/sdk/data_object.rb +0 -31
- data/lib/onlinepayments/sdk/defaultimpl/authorization_type.rb +0 -24
- data/lib/onlinepayments/sdk/defaultimpl/default_authenticator.rb +0 -108
- data/lib/onlinepayments/sdk/defaultimpl/default_connection.rb +0 -365
- data/lib/onlinepayments/sdk/defaultimpl/default_marshaller.rb +0 -32
- data/lib/onlinepayments/sdk/defaultimpl.rb +0 -6
- data/lib/onlinepayments/sdk/endpoint_configuration.rb +0 -127
- data/lib/onlinepayments/sdk/exceptions.rb +0 -8
- data/lib/onlinepayments/sdk/logging/logging_util.rb +0 -286
- data/lib/onlinepayments/sdk/marshaller.rb +0 -24
- data/lib/onlinepayments/sdk/marshaller_syntax_exception.rb +0 -6
- data/lib/onlinepayments/sdk/merchant/services/get_privacy_policy_params.rb +0 -30
- data/lib/onlinepayments/sdk/meta_data_provider.rb +0 -150
- data/lib/onlinepayments/sdk/modules.rb +0 -62
- data/lib/onlinepayments/sdk/multipart_form_data_object.rb +0 -44
- data/lib/onlinepayments/sdk/multipart_form_data_request.rb +0 -9
- data/lib/onlinepayments/sdk/not_found_exception.rb +0 -16
- data/lib/onlinepayments/sdk/param_request.rb +0 -11
- data/lib/onlinepayments/sdk/payment_platform_exception.rb +0 -15
- data/lib/onlinepayments/sdk/pooled_connection.rb +0 -21
- data/lib/onlinepayments/sdk/request_header.rb +0 -50
- data/lib/onlinepayments/sdk/request_param.rb +0 -23
- data/lib/onlinepayments/sdk/response_exception.rb +0 -47
- data/lib/onlinepayments/sdk/response_header.rb +0 -42
- data/lib/onlinepayments/sdk/uploadable_file.rb +0 -30
- data/lib/onlinepayments/sdk/webhooks/webhooks.rb +0 -22
- data/lib/onlinepayments/sdk/webhooks/webhooks_helper_builder.rb +0 -25
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlinepayments-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Worldline Direct support team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -86,14 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1
|
89
|
+
version: '2.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webrick
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.7'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
110
|
+
version: '1.7'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,24 +143,34 @@ files:
|
|
129
143
|
- lib/onlinepayments/sdk.rb
|
130
144
|
- lib/onlinepayments/sdk/api_exception.rb
|
131
145
|
- lib/onlinepayments/sdk/api_resource.rb
|
132
|
-
- lib/onlinepayments/sdk/
|
146
|
+
- lib/onlinepayments/sdk/authentication.rb
|
147
|
+
- lib/onlinepayments/sdk/authentication/authenticator.rb
|
148
|
+
- lib/onlinepayments/sdk/authentication/authorization_type.rb
|
149
|
+
- lib/onlinepayments/sdk/authentication/v1hmac_authenticator.rb
|
133
150
|
- lib/onlinepayments/sdk/authorization_exception.rb
|
134
151
|
- lib/onlinepayments/sdk/call_context.rb
|
135
152
|
- lib/onlinepayments/sdk/client.rb
|
136
|
-
- lib/onlinepayments/sdk/
|
153
|
+
- lib/onlinepayments/sdk/communication.rb
|
154
|
+
- lib/onlinepayments/sdk/communication/communication_exception.rb
|
155
|
+
- lib/onlinepayments/sdk/communication/connection.rb
|
156
|
+
- lib/onlinepayments/sdk/communication/default_connection.rb
|
157
|
+
- lib/onlinepayments/sdk/communication/metadata_provider.rb
|
158
|
+
- lib/onlinepayments/sdk/communication/multipart_form_data_object.rb
|
159
|
+
- lib/onlinepayments/sdk/communication/multipart_form_data_request.rb
|
160
|
+
- lib/onlinepayments/sdk/communication/not_found_exception.rb
|
161
|
+
- lib/onlinepayments/sdk/communication/param_request.rb
|
162
|
+
- lib/onlinepayments/sdk/communication/pooled_connection.rb
|
163
|
+
- lib/onlinepayments/sdk/communication/request_header.rb
|
164
|
+
- lib/onlinepayments/sdk/communication/request_param.rb
|
165
|
+
- lib/onlinepayments/sdk/communication/response_exception.rb
|
166
|
+
- lib/onlinepayments/sdk/communication/response_header.rb
|
137
167
|
- lib/onlinepayments/sdk/communicator.rb
|
138
168
|
- lib/onlinepayments/sdk/communicator_configuration.rb
|
139
|
-
- lib/onlinepayments/sdk/connection.rb
|
140
|
-
- lib/onlinepayments/sdk/data_object.rb
|
141
169
|
- lib/onlinepayments/sdk/declined_payment_exception.rb
|
142
170
|
- lib/onlinepayments/sdk/declined_payout_exception.rb
|
143
171
|
- lib/onlinepayments/sdk/declined_refund_exception.rb
|
144
172
|
- lib/onlinepayments/sdk/declined_transaction_exception.rb
|
145
|
-
- lib/onlinepayments/sdk/
|
146
|
-
- lib/onlinepayments/sdk/defaultimpl/authorization_type.rb
|
147
|
-
- lib/onlinepayments/sdk/defaultimpl/default_authenticator.rb
|
148
|
-
- lib/onlinepayments/sdk/defaultimpl/default_connection.rb
|
149
|
-
- lib/onlinepayments/sdk/defaultimpl/default_marshaller.rb
|
173
|
+
- lib/onlinepayments/sdk/domain.rb
|
150
174
|
- lib/onlinepayments/sdk/domain/account_on_file.rb
|
151
175
|
- lib/onlinepayments/sdk/domain/account_on_file_attribute.rb
|
152
176
|
- lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb
|
@@ -161,6 +185,8 @@ files:
|
|
161
185
|
- lib/onlinepayments/sdk/domain/amount_breakdown.rb
|
162
186
|
- lib/onlinepayments/sdk/domain/amount_of_money.rb
|
163
187
|
- lib/onlinepayments/sdk/domain/api_error.rb
|
188
|
+
- lib/onlinepayments/sdk/domain/apple_pay_line_item.rb
|
189
|
+
- lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb
|
164
190
|
- lib/onlinepayments/sdk/domain/bank_account_iban.rb
|
165
191
|
- lib/onlinepayments/sdk/domain/browser_data.rb
|
166
192
|
- lib/onlinepayments/sdk/domain/calculate_surcharge_request.rb
|
@@ -221,6 +247,7 @@ files:
|
|
221
247
|
- lib/onlinepayments/sdk/domain/customer_output.rb
|
222
248
|
- lib/onlinepayments/sdk/domain/customer_payment_activity.rb
|
223
249
|
- lib/onlinepayments/sdk/domain/customer_token.rb
|
250
|
+
- lib/onlinepayments/sdk/domain/data_object.rb
|
224
251
|
- lib/onlinepayments/sdk/domain/dcc_card_source.rb
|
225
252
|
- lib/onlinepayments/sdk/domain/dcc_proposal.rb
|
226
253
|
- lib/onlinepayments/sdk/domain/decrypted_payment_data.rb
|
@@ -230,6 +257,7 @@ files:
|
|
230
257
|
- lib/onlinepayments/sdk/domain/error_response.rb
|
231
258
|
- lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb
|
232
259
|
- lib/onlinepayments/sdk/domain/external_token_linked.rb
|
260
|
+
- lib/onlinepayments/sdk/domain/feedbacks.rb
|
233
261
|
- lib/onlinepayments/sdk/domain/fixed_list_validator.rb
|
234
262
|
- lib/onlinepayments/sdk/domain/fraud_fields.rb
|
235
263
|
- lib/onlinepayments/sdk/domain/fraud_results.rb
|
@@ -269,15 +297,19 @@ files:
|
|
269
297
|
- lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb
|
270
298
|
- lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb
|
271
299
|
- lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb
|
300
|
+
- lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb
|
272
301
|
- lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb
|
302
|
+
- lib/onlinepayments/sdk/domain/mobile_three_d_secure_challenge_parameters.rb
|
273
303
|
- lib/onlinepayments/sdk/domain/multiple_payment_information.rb
|
274
304
|
- lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb
|
275
305
|
- lib/onlinepayments/sdk/domain/operation_output.rb
|
306
|
+
- lib/onlinepayments/sdk/domain/operation_payment_references.rb
|
276
307
|
- lib/onlinepayments/sdk/domain/order.rb
|
277
308
|
- lib/onlinepayments/sdk/domain/order_line_details.rb
|
278
309
|
- lib/onlinepayments/sdk/domain/order_references.rb
|
279
310
|
- lib/onlinepayments/sdk/domain/order_status_output.rb
|
280
311
|
- lib/onlinepayments/sdk/domain/order_type_information.rb
|
312
|
+
- lib/onlinepayments/sdk/domain/other_details.rb
|
281
313
|
- lib/onlinepayments/sdk/domain/payment_account_on_file.rb
|
282
314
|
- lib/onlinepayments/sdk/domain/payment_context.rb
|
283
315
|
- lib/onlinepayments/sdk/domain/payment_creation_output.rb
|
@@ -293,6 +325,7 @@ files:
|
|
293
325
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
|
294
326
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb
|
295
327
|
- lib/onlinepayments/sdk/domain/payment_product3012.rb
|
328
|
+
- lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb
|
296
329
|
- lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb
|
297
330
|
- lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb
|
298
331
|
- lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb
|
@@ -339,14 +372,22 @@ files:
|
|
339
372
|
- lib/onlinepayments/sdk/domain/protection_eligibility.rb
|
340
373
|
- lib/onlinepayments/sdk/domain/range_validator.rb
|
341
374
|
- lib/onlinepayments/sdk/domain/rate_details.rb
|
375
|
+
- lib/onlinepayments/sdk/domain/reattempt_instructions.rb
|
376
|
+
- lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb
|
342
377
|
- lib/onlinepayments/sdk/domain/redirect_data.rb
|
343
378
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb
|
344
379
|
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb
|
345
380
|
- lib/onlinepayments/sdk/domain/redirect_payment_product3203_specific_input.rb
|
381
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb
|
382
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product3302_specific_input.rb
|
346
383
|
- lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb
|
347
384
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb
|
385
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb
|
386
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product5402_specific_input.rb
|
387
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product5403_specific_input.rb
|
348
388
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5406_specific_input.rb
|
349
389
|
- lib/onlinepayments/sdk/domain/redirect_payment_product5408_specific_input.rb
|
390
|
+
- lib/onlinepayments/sdk/domain/redirect_payment_product5410_specific_input.rb
|
350
391
|
- lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb
|
351
392
|
- lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb
|
352
393
|
- lib/onlinepayments/sdk/domain/redirection_data.rb
|
@@ -362,6 +403,7 @@ files:
|
|
362
403
|
- lib/onlinepayments/sdk/domain/refund_response.rb
|
363
404
|
- lib/onlinepayments/sdk/domain/refunds_response.rb
|
364
405
|
- lib/onlinepayments/sdk/domain/regular_expression_validator.rb
|
406
|
+
- lib/onlinepayments/sdk/domain/send_test_request.rb
|
365
407
|
- lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb
|
366
408
|
- lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb
|
367
409
|
- lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb
|
@@ -374,6 +416,7 @@ files:
|
|
374
416
|
- lib/onlinepayments/sdk/domain/shopping_cart.rb
|
375
417
|
- lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
|
376
418
|
- lib/onlinepayments/sdk/domain/show_form_data.rb
|
419
|
+
- lib/onlinepayments/sdk/domain/show_instructions_data.rb
|
377
420
|
- lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb
|
378
421
|
- lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb
|
379
422
|
- lib/onlinepayments/sdk/domain/subsequent_payment_request.rb
|
@@ -396,56 +439,74 @@ files:
|
|
396
439
|
- lib/onlinepayments/sdk/domain/token_e_wallet.rb
|
397
440
|
- lib/onlinepayments/sdk/domain/token_response.rb
|
398
441
|
- lib/onlinepayments/sdk/domain/transaction.rb
|
442
|
+
- lib/onlinepayments/sdk/domain/uploadable_file.rb
|
443
|
+
- lib/onlinepayments/sdk/domain/validate_credentials_request.rb
|
444
|
+
- lib/onlinepayments/sdk/domain/validate_credentials_response.rb
|
399
445
|
- lib/onlinepayments/sdk/domain/value_mapping_element.rb
|
400
|
-
- lib/onlinepayments/sdk/
|
401
|
-
- lib/onlinepayments/sdk/exceptions.rb
|
446
|
+
- lib/onlinepayments/sdk/exception_factory.rb
|
402
447
|
- lib/onlinepayments/sdk/factory.rb
|
403
448
|
- lib/onlinepayments/sdk/idempotence_exception.rb
|
449
|
+
- lib/onlinepayments/sdk/json.rb
|
450
|
+
- lib/onlinepayments/sdk/json/default_marshaller.rb
|
451
|
+
- lib/onlinepayments/sdk/json/marshaller.rb
|
452
|
+
- lib/onlinepayments/sdk/json/marshaller_syntax_exception.rb
|
404
453
|
- lib/onlinepayments/sdk/logging.rb
|
405
454
|
- lib/onlinepayments/sdk/logging/communicator_logger.rb
|
406
455
|
- lib/onlinepayments/sdk/logging/log_message_builder.rb
|
407
456
|
- lib/onlinepayments/sdk/logging/logging_capable.rb
|
408
|
-
- lib/onlinepayments/sdk/logging/
|
457
|
+
- lib/onlinepayments/sdk/logging/obfuscation.rb
|
458
|
+
- lib/onlinepayments/sdk/logging/obfuscation/body_obfuscator.rb
|
459
|
+
- lib/onlinepayments/sdk/logging/obfuscation/header_obfuscator.rb
|
460
|
+
- lib/onlinepayments/sdk/logging/obfuscation/obfuscation_capable.rb
|
461
|
+
- lib/onlinepayments/sdk/logging/obfuscation/obfuscation_rule.rb
|
409
462
|
- lib/onlinepayments/sdk/logging/request_log_message_builder.rb
|
410
463
|
- lib/onlinepayments/sdk/logging/response_log_message_builder.rb
|
411
464
|
- lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb
|
412
465
|
- lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb
|
413
|
-
- lib/onlinepayments/sdk/
|
414
|
-
- lib/onlinepayments/sdk/
|
466
|
+
- lib/onlinepayments/sdk/merchant.rb
|
467
|
+
- lib/onlinepayments/sdk/merchant/captures.rb
|
468
|
+
- lib/onlinepayments/sdk/merchant/captures/captures_client.rb
|
469
|
+
- lib/onlinepayments/sdk/merchant/complete.rb
|
470
|
+
- lib/onlinepayments/sdk/merchant/complete/complete_client.rb
|
471
|
+
- lib/onlinepayments/sdk/merchant/hostedcheckout.rb
|
415
472
|
- lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb
|
473
|
+
- lib/onlinepayments/sdk/merchant/hostedtokenization.rb
|
416
474
|
- lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb
|
475
|
+
- lib/onlinepayments/sdk/merchant/mandates.rb
|
417
476
|
- lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb
|
418
477
|
- lib/onlinepayments/sdk/merchant/merchant_client.rb
|
478
|
+
- lib/onlinepayments/sdk/merchant/paymentlinks.rb
|
419
479
|
- lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb
|
480
|
+
- lib/onlinepayments/sdk/merchant/payments.rb
|
420
481
|
- lib/onlinepayments/sdk/merchant/payments/payments_client.rb
|
482
|
+
- lib/onlinepayments/sdk/merchant/payouts.rb
|
421
483
|
- lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb
|
484
|
+
- lib/onlinepayments/sdk/merchant/privacypolicy.rb
|
485
|
+
- lib/onlinepayments/sdk/merchant/privacypolicy/get_privacy_policy_params.rb
|
486
|
+
- lib/onlinepayments/sdk/merchant/privacypolicy/privacy_policy_client.rb
|
487
|
+
- lib/onlinepayments/sdk/merchant/productgroups.rb
|
422
488
|
- lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb
|
423
489
|
- lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb
|
424
490
|
- lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb
|
491
|
+
- lib/onlinepayments/sdk/merchant/products.rb
|
425
492
|
- lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb
|
426
493
|
- lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb
|
427
494
|
- lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb
|
428
495
|
- lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb
|
429
496
|
- lib/onlinepayments/sdk/merchant/products/products_client.rb
|
430
|
-
- lib/onlinepayments/sdk/merchant/
|
497
|
+
- lib/onlinepayments/sdk/merchant/refunds.rb
|
498
|
+
- lib/onlinepayments/sdk/merchant/refunds/refunds_client.rb
|
499
|
+
- lib/onlinepayments/sdk/merchant/services.rb
|
431
500
|
- lib/onlinepayments/sdk/merchant/services/services_client.rb
|
501
|
+
- lib/onlinepayments/sdk/merchant/sessions.rb
|
432
502
|
- lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb
|
503
|
+
- lib/onlinepayments/sdk/merchant/tokens.rb
|
433
504
|
- lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb
|
434
|
-
- lib/onlinepayments/sdk/
|
435
|
-
- lib/onlinepayments/sdk/
|
436
|
-
- lib/onlinepayments/sdk/
|
437
|
-
- lib/onlinepayments/sdk/multipart_form_data_request.rb
|
438
|
-
- lib/onlinepayments/sdk/not_found_exception.rb
|
439
|
-
- lib/onlinepayments/sdk/param_request.rb
|
440
|
-
- lib/onlinepayments/sdk/payment_platform_exception.rb
|
441
|
-
- lib/onlinepayments/sdk/pooled_connection.rb
|
505
|
+
- lib/onlinepayments/sdk/merchant/webhooks.rb
|
506
|
+
- lib/onlinepayments/sdk/merchant/webhooks/webhooks_client.rb
|
507
|
+
- lib/onlinepayments/sdk/platform_exception.rb
|
442
508
|
- lib/onlinepayments/sdk/proxy_configuration.rb
|
443
509
|
- lib/onlinepayments/sdk/reference_exception.rb
|
444
|
-
- lib/onlinepayments/sdk/request_header.rb
|
445
|
-
- lib/onlinepayments/sdk/request_param.rb
|
446
|
-
- lib/onlinepayments/sdk/response_exception.rb
|
447
|
-
- lib/onlinepayments/sdk/response_header.rb
|
448
|
-
- lib/onlinepayments/sdk/uploadable_file.rb
|
449
510
|
- lib/onlinepayments/sdk/validation_exception.rb
|
450
511
|
- lib/onlinepayments/sdk/webhooks.rb
|
451
512
|
- lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb
|
@@ -453,10 +514,9 @@ files:
|
|
453
514
|
- lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb
|
454
515
|
- lib/onlinepayments/sdk/webhooks/secret_key_store.rb
|
455
516
|
- lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb
|
456
|
-
- lib/onlinepayments/sdk/webhooks/
|
517
|
+
- lib/onlinepayments/sdk/webhooks/signature_validator.rb
|
457
518
|
- lib/onlinepayments/sdk/webhooks/webhooks_event.rb
|
458
519
|
- lib/onlinepayments/sdk/webhooks/webhooks_helper.rb
|
459
|
-
- lib/onlinepayments/sdk/webhooks/webhooks_helper_builder.rb
|
460
520
|
- onlinepayments-sdk-ruby.gemspec
|
461
521
|
homepage: https://github.com/wl-online-payments-direct/sdk-ruby
|
462
522
|
licenses:
|
@@ -477,7 +537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
477
537
|
- !ruby/object:Gem::Version
|
478
538
|
version: '0'
|
479
539
|
requirements: []
|
480
|
-
rubygems_version: 3.
|
540
|
+
rubygems_version: 3.1.6
|
481
541
|
signing_key:
|
482
542
|
specification_version: 4
|
483
543
|
summary: SDK to communicate with the Online Payments platform using the Online Payments
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module OnlinePayments::SDK
|
2
|
-
|
3
|
-
# Abstract class that is responsible for authenticating requests sent to the Online Payments platform.
|
4
|
-
class Authenticator
|
5
|
-
|
6
|
-
# Creates a signature to authenticate a request.
|
7
|
-
#
|
8
|
-
# @param http_method [String] 'GET', 'PUT', 'POST' or 'DELETE' indicating which HTTP method will be used with the request
|
9
|
-
# @param resource_uri [URI::HTTP] URI object that includes #path and #query of the URL that will be used, #query may be *nil*
|
10
|
-
# @param request_headers [Array<OnlinePayments::SDK::RequestHeader>] all headers used by the request
|
11
|
-
# @return [String] the created signature
|
12
|
-
def create_simple_authentication_signature(http_method, resource_uri, request_headers)
|
13
|
-
raise NotImplementedError
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module OnlinePayments::SDK
|
2
|
-
|
3
|
-
# This exception is used when an error occurs during network communication with the Online Payments platform.
|
4
|
-
# A common cause is a timeout while connecting or when receiving or sending data.
|
5
|
-
#
|
6
|
-
# @attr [Exception] cause The error that is the cause of this error.
|
7
|
-
class CommunicationException < RuntimeError
|
8
|
-
|
9
|
-
def initialize(cause)
|
10
|
-
super()
|
11
|
-
@cause = cause
|
12
|
-
end
|
13
|
-
|
14
|
-
attr_accessor :cause
|
15
|
-
end
|
16
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
module OnlinePayments::SDK
|
2
|
-
|
3
|
-
# Class used to communicate using the HTTP (or HTTPS) protocol.
|
4
|
-
# Performs GET, DELETE, POST and PUT requests given a target uri and request headers.
|
5
|
-
# @see OnlinePayments::SDK::DefaultImpl::DefaultConnection
|
6
|
-
class Connection
|
7
|
-
include OnlinePayments::SDK::Logging::LoggingCapable
|
8
|
-
|
9
|
-
# Performs a GET request to _uri_ using _request_headers_,
|
10
|
-
# and yields the response as the status code, headers and body.
|
11
|
-
#
|
12
|
-
# @yield (Integer, Array<OnlinePayments::SDK::ResponseHeader>, IO) The status code, headers and body of the response.
|
13
|
-
def get(uri, request_headers)
|
14
|
-
raise NotImplementedError
|
15
|
-
end
|
16
|
-
|
17
|
-
# Performs a DELETE request to _uri_ using _request_headers_,
|
18
|
-
# and yields the response as the status code, headers and body.
|
19
|
-
#
|
20
|
-
# @yield (Integer, Array<OnlinePayments::SDK::ResponseHeader>, IO) The status code, headers and body of the response.
|
21
|
-
def delete(uri, request_headers)
|
22
|
-
raise NotImplementedError
|
23
|
-
end
|
24
|
-
|
25
|
-
# Performs a POST request to _uri_ using _request_headers_ and _body_,
|
26
|
-
# and yields the response as the status code, headers and body.
|
27
|
-
#
|
28
|
-
# @yield (Integer, Array<OnlinePayments::SDK::ResponseHeader>, IO) The status code, headers and body of the response.
|
29
|
-
def post(uri, request_headers, body)
|
30
|
-
raise NotImplementedError
|
31
|
-
end
|
32
|
-
|
33
|
-
# Performs a PUT request to _uri_ using _request_headers_ and _body_,
|
34
|
-
# and yields the response as the status code, headers and body.
|
35
|
-
#
|
36
|
-
# @yield (Integer, Array<OnlinePayments::SDK::ResponseHeader>, IO) The status code, headers and body of the response.
|
37
|
-
def put(uri, request_headers, body)
|
38
|
-
raise NotImplementedError
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'json'
|
2
|
-
|
3
|
-
module OnlinePayments::SDK
|
4
|
-
|
5
|
-
# Base class for all SDK data objects, supports marshalling and unmarshalling the data object to and from JSON.
|
6
|
-
class DataObject
|
7
|
-
|
8
|
-
# Returns a hash representation of the DataObject.
|
9
|
-
# The hash contains camelCase representations of the variables, and their values.
|
10
|
-
# Should be overridden to add all instance variables of the object.
|
11
|
-
#
|
12
|
-
# @return [Hash]
|
13
|
-
def to_h
|
14
|
-
{}
|
15
|
-
end
|
16
|
-
|
17
|
-
# Create a new instance of this object (DataObject or descendant)
|
18
|
-
# from a hash containing attribute values in camelCase.
|
19
|
-
# Note that the hash contains Strings as keys instead of more commonly used tokens.
|
20
|
-
def self.new_from_hash(hash)
|
21
|
-
obj = self.new
|
22
|
-
obj.from_hash(hash)
|
23
|
-
obj
|
24
|
-
end
|
25
|
-
|
26
|
-
# Set attributes from values in parameter hash.
|
27
|
-
# Should be overridden by descendants in order to properly restore their attributes from the hash.
|
28
|
-
# Note that the hash contains Strings as keys instead of more commonly used tokens.
|
29
|
-
def from_hash(hash) end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module OnlinePayments::SDK
|
2
|
-
module DefaultImpl
|
3
|
-
|
4
|
-
# Contains all authentication schemes supported by the GlobabCollect platform.
|
5
|
-
class AuthorizationType
|
6
|
-
V1HMAC = 'v1HMAC'
|
7
|
-
|
8
|
-
# @return [String] the authorization string that belongs to the parameter _authorization_, or _nil_ if not found.
|
9
|
-
def self.get_authorization(authorization)
|
10
|
-
case authorization.downcase
|
11
|
-
when V1HMAC.downcase
|
12
|
-
return V1HMAC
|
13
|
-
else
|
14
|
-
raise ArgumentError "Unknown authorization type '#{authorization}'"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# @return [String]
|
19
|
-
def self.get_signature_string
|
20
|
-
V1HMAC
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
require 'openssl' # for HMAC-SHA256
|
2
|
-
require 'base64'
|
3
|
-
|
4
|
-
module OnlinePayments::SDK
|
5
|
-
module DefaultImpl
|
6
|
-
|
7
|
-
# Authenticates requests made to the Online Payments platform using the HMAC algorithm.
|
8
|
-
class DefaultAuthenticator < Authenticator
|
9
|
-
|
10
|
-
# HMAC algorithm used to generate the signature
|
11
|
-
HMAC_ALGOR = 'SHA256'.freeze
|
12
|
-
CONTENT_TYPE = 'Content-Type'.freeze
|
13
|
-
DATE = 'Date'.freeze
|
14
|
-
XGCS = 'x-gcs'.freeze
|
15
|
-
|
16
|
-
# Construct a new DefaultAuthenticator instance that can sign requests
|
17
|
-
# with the provided _api_key_id_ and _secret_api_key_.
|
18
|
-
#
|
19
|
-
# @param api_key_id [String] identifier for the secret key used in authentication.
|
20
|
-
# @param secret_api_key [String] the secret key that is used to generate the authentication signature.
|
21
|
-
# @param authorization_type [String] the authorization protocol to use for authentication.
|
22
|
-
def initialize(api_key_id, secret_api_key, authorization_type = AuthorizationType::V1HMAC)
|
23
|
-
raise ArgumentError unless api_key_id && !api_key_id.strip.empty?
|
24
|
-
raise ArgumentError unless secret_api_key && !secret_api_key.strip.empty?
|
25
|
-
raise ArgumentError unless authorization_type && !authorization_type.strip.empty?
|
26
|
-
|
27
|
-
@api_key_id = api_key_id
|
28
|
-
@secret_api_key = secret_api_key
|
29
|
-
@authorization_type = authorization_type
|
30
|
-
end
|
31
|
-
|
32
|
-
# Creates a signature to authenticate a request.
|
33
|
-
#
|
34
|
-
# @param http_method [String] 'GET', 'PUT', 'POST' or 'DELETE' indicating which HTTP method will be used with the request
|
35
|
-
# @param resource_uri [URI::HTTP] URI object that includes #path and #query of the URL that will be used, #query may be *nil*
|
36
|
-
# @param http_headers [Array<OnlinePayments::SDK::RequestHeader>] list that contains all headers used by the request
|
37
|
-
# @return [String] the created signature
|
38
|
-
def create_simple_authentication_signature(http_method, resource_uri, http_headers)
|
39
|
-
raise ArgumentError unless http_method && !http_method.strip.empty?
|
40
|
-
raise ArgumentError unless resource_uri
|
41
|
-
|
42
|
-
data_to_sign = to_data_to_sign(http_method, resource_uri, http_headers)
|
43
|
-
"GCS #{@authorization_type}:#{@api_key_id}:#{create_auth_signature(data_to_sign)}"
|
44
|
-
end
|
45
|
-
|
46
|
-
protected
|
47
|
-
|
48
|
-
# Canonizes the _http_method_, _resource_uri_ and _http_headers_ so a unique signature can be generated.
|
49
|
-
# Canonical form is as follows:
|
50
|
-
# * _http_method_ in upper case
|
51
|
-
# * Content-Type
|
52
|
-
# * Date header
|
53
|
-
# * X-GCS headers sorted alphabetically. Names are in lowercase and values are stripped of excess whitespace
|
54
|
-
# * path and query portion of the uri, separated by a question mark
|
55
|
-
def to_data_to_sign(http_method, resource_uri, http_headers)
|
56
|
-
content_type = ''
|
57
|
-
date = ''
|
58
|
-
canonical_resource = to_canonical_resource(resource_uri)
|
59
|
-
xgc_http_headers = []
|
60
|
-
|
61
|
-
http_headers&.each do |header|
|
62
|
-
name = header.name
|
63
|
-
value = header.value
|
64
|
-
case
|
65
|
-
when name.casecmp(CONTENT_TYPE).zero?
|
66
|
-
content_type = value
|
67
|
-
when name.casecmp(DATE).zero?
|
68
|
-
date = value
|
69
|
-
when to_canonical_header_name(name).start_with?("x-gcs")
|
70
|
-
xgc_http_headers << [to_canonical_header_name(name), to_canonical_header_value(value)]
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
xgc_http_headers.sort! { |(h1, v1), (h2, v2)| h1 <=> h2 } unless xgc_http_headers.empty?
|
75
|
-
|
76
|
-
data = "#{http_method.upcase}\n#{content_type}\n#{date}\n"
|
77
|
-
data << xgc_http_headers.inject('') { |s, (k, v)| "#{s}#{k}:#{v}\n" } unless xgc_http_headers.empty?
|
78
|
-
data << "#{canonical_resource}\n" if canonical_resource
|
79
|
-
end
|
80
|
-
|
81
|
-
# Applies the HMAC algorithm to the canonicalized data to obtain an HMAC digest.
|
82
|
-
# Afterwards the HMAC digest is encoded using base64 encoding.
|
83
|
-
def create_auth_signature(data_to_sign)
|
84
|
-
digest = OpenSSL::Digest.new(HMAC_ALGOR)
|
85
|
-
hmac = OpenSSL::HMAC.digest(digest, @secret_api_key, data_to_sign)
|
86
|
-
Base64.strict_encode64(hmac).strip
|
87
|
-
end
|
88
|
-
|
89
|
-
private
|
90
|
-
|
91
|
-
# Returns the encoded URI path without the HTTP method and including all decoded query parameters.
|
92
|
-
def to_canonical_resource(resource_uri)
|
93
|
-
return "#{resource_uri.path}?#{resource_uri.query}" if resource_uri.query
|
94
|
-
resource_uri.path
|
95
|
-
end
|
96
|
-
|
97
|
-
def to_canonical_header_name(original_name)
|
98
|
-
original_name ? original_name.downcase : original_name
|
99
|
-
end
|
100
|
-
|
101
|
-
# Strips a header value of excess whitespace to produce a canonical value
|
102
|
-
def to_canonical_header_value(original_value)
|
103
|
-
return '' unless original_value
|
104
|
-
original_value.gsub(/\r?\n[\s&&[^\r\n]]*/, ' ').strip
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|