diff --git a/CHANGELOG.md b/CHANGELOG.md index a4689ac73..72852366a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [17.6.0] - 2026-05-15 +### Added +* Add support for `user_interaction` and `use_cases` fields in payment API for commercial mandates + ## [17.5.1] - 2025-10-31 ### Fixed * Update Sonatype Central badge url in order to show latest version diff --git a/gradle.properties b/gradle.properties index ab4e27c5b..41fac3ba5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Main properties group=com.truelayer archivesBaseName=truelayer-java -version=17.5.1 +version=17.6.0 # Artifacts properties project_name=TrueLayer Java diff --git a/src/main/java/com/truelayer/java/entities/UseCase.java b/src/main/java/com/truelayer/java/entities/UseCase.java new file mode 100644 index 000000000..b04837026 --- /dev/null +++ b/src/main/java/com/truelayer/java/entities/UseCase.java @@ -0,0 +1,17 @@ +package com.truelayer.java.entities; + +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public enum UseCase { + CHARITY("charity"), + FINANCIAL_SERVICES("financial_services"), + GOVERNMENT("government"), + UTILITIES("utilities"); + + @JsonValue + private final String useCase; +} diff --git a/src/main/java/com/truelayer/java/mandates/entities/mandate/VRPCommercialMandate.java b/src/main/java/com/truelayer/java/mandates/entities/mandate/VRPCommercialMandate.java index 7e847c1af..4c7835f89 100644 --- a/src/main/java/com/truelayer/java/mandates/entities/mandate/VRPCommercialMandate.java +++ b/src/main/java/com/truelayer/java/mandates/entities/mandate/VRPCommercialMandate.java @@ -2,6 +2,7 @@ import static com.truelayer.java.mandates.entities.mandate.Mandate.Type.COMMERCIAL; +import com.truelayer.java.entities.UseCase; import com.truelayer.java.mandates.entities.beneficiary.Beneficiary; import com.truelayer.java.payments.entities.providerselection.ProviderSelection; import lombok.Builder; @@ -20,4 +21,6 @@ public class VRPCommercialMandate extends Mandate { private Beneficiary beneficiary; private String reference; + + private UseCase useCase; } diff --git a/src/main/java/com/truelayer/java/mandates/entities/mandatedetail/MandateDetail.java b/src/main/java/com/truelayer/java/mandates/entities/mandatedetail/MandateDetail.java index cb8ae618a..e10054f2e 100644 --- a/src/main/java/com/truelayer/java/mandates/entities/mandatedetail/MandateDetail.java +++ b/src/main/java/com/truelayer/java/mandates/entities/mandatedetail/MandateDetail.java @@ -5,6 +5,7 @@ import com.truelayer.java.TrueLayerException; import com.truelayer.java.commonapi.entities.UserDetail; import com.truelayer.java.entities.CurrencyCode; +import com.truelayer.java.entities.UseCase; import com.truelayer.java.mandates.entities.Constraints; import com.truelayer.java.mandates.entities.beneficiary.Beneficiary; import com.truelayer.java.payments.entities.providerselection.ProviderSelection; @@ -40,6 +41,10 @@ public abstract class MandateDetail { private ProviderSelection providerSelection; + private UseCase useCase; + + private String type; + public abstract Status getStatus(); public AuthorizationRequiredMandateDetail asAuthorizationRequiredMandateDetail() { diff --git a/src/main/java/com/truelayer/java/payments/entities/UserInteraction.java b/src/main/java/com/truelayer/java/payments/entities/UserInteraction.java new file mode 100644 index 000000000..5a7a0186c --- /dev/null +++ b/src/main/java/com/truelayer/java/payments/entities/UserInteraction.java @@ -0,0 +1,15 @@ +package com.truelayer.java.payments.entities; + +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public enum UserInteraction { + PRESENT("present"), + NOT_PRESENT("not_present"); + + @JsonValue + private final String userInteraction; +} diff --git a/src/main/java/com/truelayer/java/payments/entities/paymentmethod/Mandate.java b/src/main/java/com/truelayer/java/payments/entities/paymentmethod/Mandate.java index 9ec7b60e4..037681fc2 100644 --- a/src/main/java/com/truelayer/java/payments/entities/paymentmethod/Mandate.java +++ b/src/main/java/com/truelayer/java/payments/entities/paymentmethod/Mandate.java @@ -3,6 +3,7 @@ import static com.truelayer.java.payments.entities.paymentmethod.PaymentMethod.Type.MANDATE; import com.fasterxml.jackson.annotation.JsonGetter; +import com.truelayer.java.payments.entities.UserInteraction; import com.truelayer.java.payments.entities.retry.Retry; import java.util.Optional; import lombok.Builder; @@ -29,4 +30,6 @@ public class Mandate extends PaymentMethod { public Optional getReference() { return Optional.ofNullable(reference); } + + private UserInteraction userInteraction; } diff --git a/src/main/java/com/truelayer/java/payments/entities/submerchants/BusinessClient.java b/src/main/java/com/truelayer/java/payments/entities/submerchants/BusinessClient.java index 0aeb90354..e4937c323 100644 --- a/src/main/java/com/truelayer/java/payments/entities/submerchants/BusinessClient.java +++ b/src/main/java/com/truelayer/java/payments/entities/submerchants/BusinessClient.java @@ -12,6 +12,7 @@ @EqualsAndHashCode(callSuper = false) public class BusinessClient extends UltimateCounterparty { private final Type type = Type.BUSINESS_CLIENT; + private String id; private String tradingName; private String commercialName; private String url; diff --git a/src/main/java/com/truelayer/java/paymentsproviders/entities/VrpCommercialCapabilities.java b/src/main/java/com/truelayer/java/paymentsproviders/entities/VrpCommercialCapabilities.java index b0783c526..c914caafe 100644 --- a/src/main/java/com/truelayer/java/paymentsproviders/entities/VrpCommercialCapabilities.java +++ b/src/main/java/com/truelayer/java/paymentsproviders/entities/VrpCommercialCapabilities.java @@ -1,7 +1,9 @@ package com.truelayer.java.paymentsproviders.entities; import com.truelayer.java.entities.ProviderAvailability; +import com.truelayer.java.entities.UseCase; import com.truelayer.java.payments.entities.ReleaseChannel; +import java.util.List; import lombok.Value; @Value @@ -9,4 +11,6 @@ public class VrpCommercialCapabilities { ReleaseChannel releaseChannel; ProviderAvailability availability; + + List useCases; } diff --git a/src/main/java/com/truelayer/java/paymentsproviders/entities/searchproviders/VrpCommercialCapabilities.java b/src/main/java/com/truelayer/java/paymentsproviders/entities/searchproviders/VrpCommercialCapabilities.java index 94c268ab1..d1c10f8bf 100644 --- a/src/main/java/com/truelayer/java/paymentsproviders/entities/searchproviders/VrpCommercialCapabilities.java +++ b/src/main/java/com/truelayer/java/paymentsproviders/entities/searchproviders/VrpCommercialCapabilities.java @@ -1,6 +1,10 @@ package com.truelayer.java.paymentsproviders.entities.searchproviders; +import com.truelayer.java.entities.UseCase; +import java.util.List; import lombok.Value; @Value -public class VrpCommercialCapabilities {} +public class VrpCommercialCapabilities { + List useCases; +} diff --git a/src/test/java/com/truelayer/java/acceptance/MandatesAcceptanceTests.java b/src/test/java/com/truelayer/java/acceptance/MandatesAcceptanceTests.java index c16d04a93..5011e6ac6 100644 --- a/src/test/java/com/truelayer/java/acceptance/MandatesAcceptanceTests.java +++ b/src/test/java/com/truelayer/java/acceptance/MandatesAcceptanceTests.java @@ -83,7 +83,8 @@ public void itShouldCreateASweepingMandateWithSignupPlusIntention() { ProviderSelection.preselected().providerId(PROVIDER_ID).build(), RelatedProducts.builder() .signupPlus(Collections.emptyMap()) - .build())) + .build(), + null)) .get(); assertNotError(createMandateResponse); @@ -309,7 +310,12 @@ public void itShouldCreateAndRevokeAMandate(String mandatesScope, Mandate.Type m @ParameterizedTest(name = "with retry {0}") @MethodSource("provideItShouldCreateAPaymentOnMandateTestParameters") @SneakyThrows - public void itShouldCreateAPaymentOnMandate(String mandatesScope, Mandate.Type mandateType, Retry retry) { + public void itShouldCreateAPaymentOnMandate( + String mandatesScope, + Mandate.Type mandateType, + Retry retry, + UseCase useCase, + UserInteraction userInteraction) { // create client with required scopes var tlClient = buildMandatesTlClient(mandatesScope); @@ -317,7 +323,7 @@ public void itShouldCreateAPaymentOnMandate(String mandatesScope, Mandate.Type m ProviderSelection preselectedProvider = ProviderSelection.preselected().providerId(PROVIDER_ID).build(); ApiResponse createMandateResponse = tlClient.mandates() - .createMandate(createMandateRequest(mandateType, preselectedProvider)) + .createMandate(createMandateRequest(mandateType, preselectedProvider, null, useCase)) .get(); assertNotError(createMandateResponse); @@ -375,6 +381,10 @@ public void itShouldCreateAPaymentOnMandate(String mandatesScope, Mandate.Type m mandateBuilder.retry(retry); } + if (ObjectUtils.isNotEmpty(userInteraction)) { + mandateBuilder.userInteraction(userInteraction); + } + // create a payment on mandate CreatePaymentRequest createPaymentRequest = CreatePaymentRequest.builder() .amountInMinor(getMandateResponse.getData().getConstraints().getMaximumIndividualAmount()) @@ -389,11 +399,11 @@ public void itShouldCreateAPaymentOnMandate(String mandatesScope, Mandate.Type m } private CreateMandateRequest createMandateRequest(Mandate.Type type, ProviderSelection providerSelection) { - return createMandateRequest(type, providerSelection, null); + return createMandateRequest(type, providerSelection, null, null); } private CreateMandateRequest createMandateRequest( - Mandate.Type type, ProviderSelection providerSelection, RelatedProducts relatedProducts) { + Mandate.Type type, ProviderSelection providerSelection, RelatedProducts relatedProducts, UseCase useCase) { Mandate mandate = null; if (type.equals(Mandate.Type.COMMERCIAL)) { mandate = Mandate.vrpCommercialMandate() @@ -405,6 +415,7 @@ private CreateMandateRequest createMandateRequest( .build()) .accountHolderName("Andrea Java SDK") .build()) + .useCase(useCase) .build(); } else { mandate = Mandate.vrpSweepingMandate() @@ -542,30 +553,47 @@ private static TrueLayerClient buildMandatesTlClient(String mandatesScope) { private static Stream provideItShouldCreateAPaymentOnMandateTestParameters() { return Stream.of( - Arguments.of(RECURRING_PAYMENTS_SWEEPING, SWEEPING, null), - Arguments.of(RECURRING_PAYMENTS_COMMERCIAL, COMMERCIAL, null), + Arguments.of(RECURRING_PAYMENTS_SWEEPING, SWEEPING, null, null, null), + Arguments.of(RECURRING_PAYMENTS_COMMERCIAL, COMMERCIAL, null, null, null), Arguments.of( RECURRING_PAYMENTS_SWEEPING, SWEEPING, - Retry.standard().forDuration("30m").build()), + Retry.standard().forDuration("30m").build(), + null, + null), Arguments.of( RECURRING_PAYMENTS_COMMERCIAL, COMMERCIAL, - Retry.standard().forDuration("30m").build()), + Retry.standard().forDuration("30m").build(), + null, + null), Arguments.of( RECURRING_PAYMENTS_SWEEPING, SWEEPING, Retry.smart() .forDuration("90d") .ensureMinimumBalanceInMinor(100) - .build()), + .build(), + null, + null), + Arguments.of( + RECURRING_PAYMENTS_COMMERCIAL, + COMMERCIAL, + Retry.smart() + .forDuration("90d") + .ensureMinimumBalanceInMinor(100) + .build(), + null, + null), Arguments.of( RECURRING_PAYMENTS_COMMERCIAL, COMMERCIAL, Retry.smart() .forDuration("90d") .ensureMinimumBalanceInMinor(100) - .build())); + .build(), + UseCase.FINANCIAL_SERVICES, + UserInteraction.PRESENT)); } private static Stream provideMandatesScopesAndTypes() { diff --git a/src/test/java/com/truelayer/java/acceptance/PaymentsAcceptanceTests.java b/src/test/java/com/truelayer/java/acceptance/PaymentsAcceptanceTests.java index 6ae14c409..aab7be4aa 100644 --- a/src/test/java/com/truelayer/java/acceptance/PaymentsAcceptanceTests.java +++ b/src/test/java/com/truelayer/java/acceptance/PaymentsAcceptanceTests.java @@ -864,6 +864,7 @@ private static Stream provideSubMerchantsScenarios() { Arguments.of( "BusinessClient", BusinessClient.builder() + .id("client-123") .tradingName("Test Trading Ltd") .commercialName("Test Commercial Name") .url("https://example.com") diff --git a/src/test/java/com/truelayer/java/integration/MandatesIntegrationTests.java b/src/test/java/com/truelayer/java/integration/MandatesIntegrationTests.java index d2cdb974e..5fa7f829c 100644 --- a/src/test/java/com/truelayer/java/integration/MandatesIntegrationTests.java +++ b/src/test/java/com/truelayer/java/integration/MandatesIntegrationTests.java @@ -141,6 +141,33 @@ public void shouldGetAMandateById(Status expectedStatus) { assertEquals(expected, response.getData()); } + @Test + @SneakyThrows + @DisplayName("It should get the commercial mandate details") + public void shouldGetACommercialMandateById() { + String jsonResponseFile = "mandates/200.get_commercial_mandate_by_id.json"; + RequestStub.New() + .method("post") + .path(urlPathEqualTo("/connect/token")) + .status(200) + .bodyFile("auth/200.access_token.json") + .build(); + RequestStub.New() + .method("get") + .path(urlPathMatching("/mandates/" + A_MANDATE_ID)) + .withAuthorization() + .status(200) + .bodyFile(jsonResponseFile) + .build(); + + ApiResponse response = + tlClient.mandates().getMandate(A_MANDATE_ID).get(); + + verifyGeneratedToken(Collections.singletonList(RECURRING_PAYMENTS_SWEEPING)); + MandateDetail expected = deserializeJsonFileTo(jsonResponseFile, MandateDetail.class); + assertEquals(expected, response.getData()); + } + @SneakyThrows @ParameterizedTest(name = "and get a response of type {0}") @ValueSource(strings = {"provider_selection", "redirect", "wait"}) diff --git a/src/test/java/com/truelayer/java/integration/PaymentSubMerchantsIntegrationTest.java b/src/test/java/com/truelayer/java/integration/PaymentSubMerchantsIntegrationTest.java index 5841c11b4..45bae8be4 100644 --- a/src/test/java/com/truelayer/java/integration/PaymentSubMerchantsIntegrationTest.java +++ b/src/test/java/com/truelayer/java/integration/PaymentSubMerchantsIntegrationTest.java @@ -57,6 +57,7 @@ void shouldDeserializePaymentWithSubMerchants() { assertTrue(ultimateCounterparty.isBusinessClient()); BusinessClient businessClient = ultimateCounterparty.asBusinessClient(); + assertEquals("client-123", businessClient.getId()); assertEquals("Example Trading Ltd", businessClient.getTradingName()); assertEquals("Example Commercial Name", businessClient.getCommercialName()); assertEquals("https://example.com", businessClient.getUrl()); diff --git a/src/test/java/com/truelayer/java/payments/entities/submerchants/SubMerchantsTest.java b/src/test/java/com/truelayer/java/payments/entities/submerchants/SubMerchantsTest.java index 5b82d0569..b9d0fa1ec 100644 --- a/src/test/java/com/truelayer/java/payments/entities/submerchants/SubMerchantsTest.java +++ b/src/test/java/com/truelayer/java/payments/entities/submerchants/SubMerchantsTest.java @@ -17,6 +17,7 @@ void canCreateBusinessClient() { .build(); BusinessClient businessClient = UltimateCounterparty.businessClient() + .id("client-123") .tradingName("Test Trading Name") .commercialName("Test Commercial Name") .url("https://example.com") diff --git a/src/test/resources/__files/mandates/200.get_commercial_mandate_by_id.json b/src/test/resources/__files/mandates/200.get_commercial_mandate_by_id.json new file mode 100644 index 000000000..5bdc54f3b --- /dev/null +++ b/src/test/resources/__files/mandates/200.get_commercial_mandate_by_id.json @@ -0,0 +1,72 @@ +{ + "status": "authorized", + "id": "string", + "type": "commercial", + "use_case": "financial_services", + "authorization_flow":{ + "actions":{ + "next":{ + "type":"provider_selection", + "providers":[ + { + "provider_id":"ob-bank-name", + "display_name":"Bank Name", + "icon_uri":"https://truelayer-provider-assets.s3.amazonaws.com/global/icon/generic.svg", + "logo_uri":"https://truelayer-provider-assets.s3.amazonaws.com/global/logos/generic.svg", + "bg_color":"#000000", + "country_code":"GB" + } + ] + } + } + }, + "currency": "GBP", + "beneficiary": { + "type": "merchant_account", + "id": "string", + "account_holder_name": "string" + }, + "reference": "a-mandate-ref", + "provider_selection":{ + "type":"preselected", + "provider_id": "a-provider-id", + "remitter": { + "account_holder_name": "Andrea Di Lisio", + "account_identifier": { + "type":"sort_code_account_number", + "sort_code":"040662", + "account_number":"00002723" + } + } + }, + "user": { + "id": "f9b48c9d-176b-46dd-b2da-fe1a2b77350c" + }, + "created_at": "2022-01-17T17:13:18.214924Z", + "authorized_at": "2022-01-17T17:13:18.214924Z", + "constraints": { + "valid_from": "2022-01-17T17:13:18.214924Z", + "valid_to": "2023-01-17T17:13:18.214924Z", + "maximum_individual_amount": 1, + "periodic_limits": { + "day": { + "maximum_amount": 0, + "period_alignment": "consent" + }, + "week": { + "maximum_amount": 0, + "period_alignment": "consent" + } + } + }, + "metadata": { + "a_custom_key": "a-value" + }, + "remitter": { + "account_holder_name": "Andrea Di Lisio", + "account_identifier": { + "type":"iban", + "iban":"GB53CLRB04066200002723" + } + } +} \ No newline at end of file diff --git a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorization_required.json b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorization_required.json index e45835e36..99f3ff682 100644 --- a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorization_required.json +++ b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorization_required.json @@ -1,6 +1,7 @@ { "status": "authorization_required", "id": "string", + "type": "sweeping", "currency": "GBP", "beneficiary": { "type": "merchant_account", diff --git a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorized.json b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorized.json index 604a424b3..3ece5a280 100644 --- a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorized.json +++ b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorized.json @@ -1,6 +1,7 @@ { "status": "authorized", "id": "string", + "type": "sweeping", "authorization_flow":{ "actions":{ "next":{ diff --git a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorizing.json b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorizing.json index 0b39b5934..ab4e84f9f 100644 --- a/src/test/resources/__files/mandates/200.get_mandate_by_id.authorizing.json +++ b/src/test/resources/__files/mandates/200.get_mandate_by_id.authorizing.json @@ -1,6 +1,7 @@ { "status": "authorizing", "id": "string", + "type": "sweeping", "authorization_flow":{ "actions":{ "next":{ diff --git a/src/test/resources/__files/mandates/200.get_mandate_by_id.failed.json b/src/test/resources/__files/mandates/200.get_mandate_by_id.failed.json index 99b186da3..879ad55ef 100644 --- a/src/test/resources/__files/mandates/200.get_mandate_by_id.failed.json +++ b/src/test/resources/__files/mandates/200.get_mandate_by_id.failed.json @@ -1,6 +1,7 @@ { "status": "failed", "id": "string", + "type": "sweeping", "failure_stage": "authorization_required", "failure_reason": "a failure reason", "currency": "GBP", diff --git a/src/test/resources/__files/mandates/200.get_mandate_by_id.revoked.json b/src/test/resources/__files/mandates/200.get_mandate_by_id.revoked.json index eee238e6a..3da0ef20b 100644 --- a/src/test/resources/__files/mandates/200.get_mandate_by_id.revoked.json +++ b/src/test/resources/__files/mandates/200.get_mandate_by_id.revoked.json @@ -1,6 +1,7 @@ { "status": "revoked", "id": "string", + "type": "sweeping", "revocation_source": "a revocation source", "currency": "GBP", "beneficiary": { diff --git a/src/test/resources/__files/mandates/200.list_mandates.json b/src/test/resources/__files/mandates/200.list_mandates.json index e8a70a2a0..5b2fd5f95 100644 --- a/src/test/resources/__files/mandates/200.list_mandates.json +++ b/src/test/resources/__files/mandates/200.list_mandates.json @@ -3,6 +3,7 @@ { "status": "authorization_required", "id": "da91c0d2-4436-48f9-82f8-***", + "type": "sweeping", "currency": "GBP", "beneficiary": { "type": "external_account", @@ -38,6 +39,7 @@ { "status": "authorizing", "id": "4d528370-292a-4baf-a2fd-***", + "type": "sweeping", "currency": "GBP", "beneficiary": { "type": "external_account", @@ -70,6 +72,42 @@ { "status": "authorization_required", "id": "6aeb626f-c80d-4538-9600-46352d8c7d84", + "type": "sweeping", + "currency": "GBP", + "beneficiary": { + "type": "external_account", + "account_identifier": { + "type": "sort_code_account_number", + "sort_code": "140662", + "account_number": "10003957" + }, + "account_holder_name": "Andrea Java SDK" + }, + "user": { + "id": "8842dc0b-7ef1-478f-865a-fe48b6dbcf9b" + }, + "created_at": "2022-04-13T16:17:29.332221Z", + "constraints": { + "valid_from": "2022-01-01T00:00:00Z", + "valid_to": "2022-12-31T23:59:59Z", + "maximum_individual_amount": 1000, + "periodic_limits": { + "day": { + "maximum_amount": 0, + "period_alignment": "consent" + }, + "week": { + "maximum_amount": 0, + "period_alignment": "consent" + } + } + } + }, + { + "status": "authorization_required", + "id": "6aeb626f-c80d-4538-9600-46352d8c7d84", + "type": "commercial", + "use_case": "utilities", "currency": "GBP", "beneficiary": { "type": "external_account", diff --git a/src/test/resources/__files/payments/200.get_payment_by_id.mandate.executed.json b/src/test/resources/__files/payments/200.get_payment_by_id.mandate.executed.json index 503166805..06cfb595e 100644 --- a/src/test/resources/__files/payments/200.get_payment_by_id.mandate.executed.json +++ b/src/test/resources/__files/payments/200.get_payment_by_id.mandate.executed.json @@ -12,7 +12,8 @@ "retry": { "type": "standard", "for": "90m" - } + }, + "user_interaction": "present" }, "created_at": "2022-12-14T16:14:40.723135Z", "status": "executed", diff --git a/src/test/resources/__files/payments/200.get_payment_by_id.mandate.failed.json b/src/test/resources/__files/payments/200.get_payment_by_id.mandate.failed.json index 35bdf4e4e..3719486d1 100644 --- a/src/test/resources/__files/payments/200.get_payment_by_id.mandate.failed.json +++ b/src/test/resources/__files/payments/200.get_payment_by_id.mandate.failed.json @@ -13,7 +13,8 @@ "type": "smart", "for": "90d", "ensure_minimum_balance_in_minor": 2500 - } + }, + "user_interaction": "not_present" }, "status": "failed", "created_at": "2022-12-14T16:14:40.723135Z", diff --git a/src/test/resources/__files/payments/200.get_payment_by_id.with_submerchants.json b/src/test/resources/__files/payments/200.get_payment_by_id.with_submerchants.json index 03aa704ef..f31e2faf2 100644 --- a/src/test/resources/__files/payments/200.get_payment_by_id.with_submerchants.json +++ b/src/test/resources/__files/payments/200.get_payment_by_id.with_submerchants.json @@ -51,6 +51,7 @@ "sub_merchants": { "ultimate_counterparty": { "type": "business_client", + "id": "client-123", "trading_name": "Example Trading Ltd", "commercial_name": "Example Commercial Name", "url": "https://example.com", diff --git a/src/test/resources/__files/payments_providers/200.get_payments_provider.json b/src/test/resources/__files/payments_providers/200.get_payments_provider.json index f800cdd53..194cc4964 100644 --- a/src/test/resources/__files/payments_providers/200.get_payments_provider.json +++ b/src/test/resources/__files/payments_providers/200.get_payments_provider.json @@ -33,7 +33,13 @@ "availability": { "recommended_status":"healthy", "updated_at":"2024-04-16T14:11:18.214924Z" - } + }, + "use_cases": [ + "charity", + "financial_services", + "government", + "utilities" + ] } } } diff --git a/src/test/resources/__files/payments_providers/200.search_payments_providers.json b/src/test/resources/__files/payments_providers/200.search_payments_providers.json index cc64e2a6c..5259bb7c5 100644 --- a/src/test/resources/__files/payments_providers/200.search_payments_providers.json +++ b/src/test/resources/__files/payments_providers/200.search_payments_providers.json @@ -38,7 +38,13 @@ "release_channel": "private_beta" }, "vrp_commercial": { - "release_channel": "private_beta" + "release_channel": "private_beta", + "use_cases": [ + "charity", + "financial_services", + "government", + "utilities" + ] } } },