From d23255f806830dcd55582bf143f165b1cb22d13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:30:29 +0100 Subject: [PATCH 1/2] Add disabled_payment_methods --- lib/checkout_sdk/payments/hosted/hosted_payments_session.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb b/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb index ff19347..4c62674 100644 --- a/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +++ b/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb @@ -28,6 +28,8 @@ module Payments # @return [ProcessingSettings] # @!attribute allow_payment_methods # @return [Array(CheckoutSdk::Common::PaymentSourceType)] + # @!attribute disabled_payment_methods + # @return [Array(CheckoutSdk::Common::PaymentSourceType)] # @!attribute products # @return [Array(CheckoutSdk::Common::Product)] # @!attribute risk @@ -66,6 +68,7 @@ class HostedPaymentsSession :recipient, :processing, :allow_payment_methods, + :disabled_payment_methods, :products, :risk, :success_url, From 46d1d70904914e61962889c68fdd9ff5f8649c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:30:46 +0100 Subject: [PATCH 2/2] Add compiled submitted evidence endpoint to disputes --- lib/checkout_sdk/disputes/disputes_client.rb | 6 ++++++ spec/checkout_sdk/disputes/disputes_integration_spec.rb | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lib/checkout_sdk/disputes/disputes_client.rb b/lib/checkout_sdk/disputes/disputes_client.rb index 09e0c99..96cdcfd 100644 --- a/lib/checkout_sdk/disputes/disputes_client.rb +++ b/lib/checkout_sdk/disputes/disputes_client.rb @@ -7,6 +7,7 @@ class DisputesClient < Client FILES = 'files' ACCEPT = 'accept' EVIDENCE = 'evidence' + SUBMITTED = 'submitted' SCHEME_FILES = 'schemefiles' private_constant :DISPUTES, :FILES, :ACCEPT, :EVIDENCE, :SCHEME_FILES @@ -47,6 +48,11 @@ def submit_evidence(dispute_id) api_client.invoke_post(build_path(DISPUTES, dispute_id, EVIDENCE), sdk_authorization) end + # @param [String] dispute_id + def get_compiled_submitted_evidence(dispute_id) + api_client.invoke_get(build_path(DISPUTES, dispute_id, EVIDENCE, SUBMITTED), sdk_authorization) + end + # @param [String] dispute_id def get_dispute_scheme_files(dispute_id) api_client.invoke_get(build_path(DISPUTES, dispute_id, SCHEME_FILES), sdk_authorization) diff --git a/spec/checkout_sdk/disputes/disputes_integration_spec.rb b/spec/checkout_sdk/disputes/disputes_integration_spec.rb index 27934cd..bd0dfdf 100644 --- a/spec/checkout_sdk/disputes/disputes_integration_spec.rb +++ b/spec/checkout_sdk/disputes/disputes_integration_spec.rb @@ -123,6 +123,13 @@ expect(response.http_metadata.status_code).to eq 204 end + it 'should compiled submitted evidence successfully' do + response = default_sdk.disputes.get_compiled_submitted_evidence(@dispute.id, request) + + expect(response).not_to be nil + expect(response).file_id.not_to be nil + end + it 'should have new values for updated fields' do response = default_sdk.disputes.get_evidence(@dispute.id)