From 734d90d9d70fd12c31deb6ded08942e819507316 Mon Sep 17 00:00:00 2001 From: Drew Rowan Date: Tue, 15 Dec 2020 16:00:01 +0100 Subject: [PATCH] Release 2.2.11 --- README.md | 6 +- build.gradle | 2 +- build.sbt | 2 +- pom.xml | 2 +- .../sdk/service/AccountService.java | 12 + .../sdk/service/ApplicationUserService.java | 12 + .../sdk/service/ChargeAttemptService.java | 6 + .../ChargeFlowLevelPaymentLinkService.java | 6 + .../sdk/service/ChargeFlowLevelService.java | 8 + .../sdk/service/ChargeFlowService.java | 10 + .../sdk/service/ConditionTypeService.java | 4 + .../sdk/service/CountryService.java | 2 + .../sdk/service/CountryStateService.java | 4 + .../sdk/service/CurrencyService.java | 2 + .../sdk/service/CustomerAddressService.java | 14 + .../sdk/service/CustomerCommentService.java | 16 + .../sdk/service/CustomerService.java | 12 + .../service/DeliveryIndicationService.java | 10 + .../sdk/service/DocumentTemplateService.java | 6 + .../service/DocumentTemplateTypeService.java | 4 + .../sdk/service/HumanUserService.java | 14 + .../service/LabelDescriptionGroupService.java | 4 + .../sdk/service/LabelDescriptionService.java | 4 + .../sdk/service/LanguageService.java | 2 + .../service/LegalOrganizationFormService.java | 6 + .../sdk/service/ManualTaskService.java | 6 + .../PaymentConnectorConfigurationService.java | 6 + .../sdk/service/PaymentConnectorService.java | 4 + .../sdk/service/PaymentLinkService.java | 12 + .../service/PaymentMethodBrandService.java | 4 + .../PaymentMethodConfigurationService.java | 6 + .../sdk/service/PaymentMethodService.java | 4 + .../PaymentProcessorConfigurationService.java | 6 + .../sdk/service/PaymentProcessorService.java | 4 + .../sdk/service/PermissionService.java | 4 + .../sdk/service/RefundCommentService.java | 14 + .../sdk/service/RefundService.java | 16 + .../service/ShopifyTransactionService.java | 6 + .../sdk/service/SpaceService.java | 12 + .../sdk/service/StaticValueService.java | 4 + .../sdk/service/TokenService.java | 283 ++++++++++++++++++ .../sdk/service/TokenVersionService.java | 8 + .../service/TransactionCommentService.java | 14 + .../service/TransactionCompletionService.java | 14 + .../sdk/service/TransactionIframeService.java | 2 + .../TransactionInvoiceCommentService.java | 14 + .../service/TransactionInvoiceService.java | 18 ++ .../service/TransactionLightboxService.java | 2 + .../service/TransactionMobileSdkService.java | 2 + .../TransactionPaymentPageService.java | 2 + .../sdk/service/TransactionService.java | 38 +++ .../sdk/service/TransactionVoidService.java | 10 + .../sdk/service/UserAccountRoleService.java | 6 + .../sdk/service/UserSpaceRoleService.java | 6 + .../sdk/service/WebhookListenerService.java | 12 + .../sdk/service/WebhookUrlService.java | 12 + .../test/PaymentTerminalTillServiceTest.java | 105 +++++++ 57 files changed, 820 insertions(+), 6 deletions(-) create mode 100644 src/test/java/com/postfinancecheckout/sdk/test/PaymentTerminalTillServiceTest.java diff --git a/README.md b/README.md index 9e119f0..560d3b2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add this dependency to your project's POM: com.postfinancecheckout postfinancecheckout-java-sdk - 2.2.10 + 2.2.11 compile ``` @@ -33,7 +33,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.2.10" +compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.2.11" ``` ### Others @@ -46,7 +46,7 @@ mvn clean package Then manually install the following JARs: -* `target/postfinancecheckout-java-sdk-2.2.10.jar` +* `target/postfinancecheckout-java-sdk-2.2.11.jar` * `target/lib/*.jar` ## Usage diff --git a/build.gradle b/build.gradle index 683f414..30d05eb 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.postfinancecheckout' -version = '2.2.10' +version = '2.2.11' buildscript { repositories { diff --git a/build.sbt b/build.sbt index ee2e1e9..b69c7f0 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.postfinancecheckout", name := "postfinancecheckout-java-sdk", - version := "2.2.10", + version := "2.2.11", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/pom.xml b/pom.xml index 036cebb..4f8b6bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ postfinancecheckout-java-sdk jar postfinancecheckout-java-sdk - 2.2.10 + 2.2.11 https://www.postfinance.ch/checkout The SDK for simplifying the integration with PostFinance Checkout API. diff --git a/src/main/java/com/postfinancecheckout/sdk/service/AccountService.java b/src/main/java/com/postfinancecheckout/sdk/service/AccountService.java index 861abb9..8ac8199 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/AccountService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/AccountService.java @@ -94,6 +94,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter) throws IOExce HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -142,6 +143,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Map params) t HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -438,6 +444,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -475,6 +482,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -540,6 +548,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query) throws IOException HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -594,6 +603,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query, Map HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -660,6 +670,7 @@ public HttpResponse updateForHttpResponse(AccountUpdate entity) throws IOExcepti HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -714,6 +725,7 @@ public HttpResponse updateForHttpResponse(AccountUpdate entity, Map params) t HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -439,6 +445,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -476,6 +483,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -541,6 +549,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query) throws IOException HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -595,6 +604,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query, Map HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -661,6 +671,7 @@ public HttpResponse updateForHttpResponse(ApplicationUserUpdate entity) throws I HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -715,6 +726,7 @@ public HttpResponse updateForHttpResponse(ApplicationUserUpdate entity, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/CountryService.java b/src/main/java/com/postfinancecheckout/sdk/service/CountryService.java index 3830bfe..4c20f83 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/CountryService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/CountryService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/CountryStateService.java b/src/main/java/com/postfinancecheckout/sdk/service/CountryStateService.java index 8406023..ecc73cc 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/CountryStateService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/CountryStateService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse countryForHttpResponse(String code) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse countryForHttpResponse(String code, Map para HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/CurrencyService.java b/src/main/java/com/postfinancecheckout/sdk/service/CurrencyService.java index 40f8941..b74765f 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/CurrencyService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/CurrencyService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/CustomerAddressService.java b/src/main/java/com/postfinancecheckout/sdk/service/CustomerAddressService.java index aea3d7f..12898dd 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/CustomerAddressService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/CustomerAddressService.java @@ -110,6 +110,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -177,6 +178,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -257,6 +259,7 @@ public HttpResponse createForHttpResponse(Long spaceId, CustomerAddressCreate en HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -330,6 +333,7 @@ public HttpResponse createForHttpResponse(Long spaceId, CustomerAddressCreate en HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -396,6 +400,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id) throws IOExcept HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -469,6 +474,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/HumanUserService.java b/src/main/java/com/postfinancecheckout/sdk/service/HumanUserService.java index 0baaaec..912a1cc 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/HumanUserService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/HumanUserService.java @@ -95,6 +95,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter) throws IOExce HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -143,6 +144,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Map params) t HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -429,6 +435,7 @@ public HttpResponse exportForHttpResponse(EntityExportRequest request) throws IO HttpContent content = apiClient.new JacksonJsonHttpContent(request); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -483,6 +490,7 @@ public HttpResponse exportForHttpResponse(EntityExportRequest request, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -659,6 +669,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query) throws IOException HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -713,6 +724,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query, Map HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -779,6 +791,7 @@ public HttpResponse updateForHttpResponse(HumanUserUpdate entity) throws IOExcep HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -833,6 +846,7 @@ public HttpResponse updateForHttpResponse(HumanUserUpdate entity, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/LabelDescriptionService.java b/src/main/java/com/postfinancecheckout/sdk/service/LabelDescriptionService.java index a99bf6a..514ac38 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/LabelDescriptionService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/LabelDescriptionService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/LanguageService.java b/src/main/java/com/postfinancecheckout/sdk/service/LanguageService.java index e4a16d7..6f342b2 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/LanguageService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/LanguageService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/LegalOrganizationFormService.java b/src/main/java/com/postfinancecheckout/sdk/service/LegalOrganizationFormService.java index 8ce3d89..7f21865 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/LegalOrganizationFormService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/LegalOrganizationFormService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse countryForHttpResponse(String code) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse countryForHttpResponse(String code, Map para HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -307,6 +311,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -344,6 +349,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/ManualTaskService.java b/src/main/java/com/postfinancecheckout/sdk/service/ManualTaskService.java index ebcece1..aae6497 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/ManualTaskService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/ManualTaskService.java @@ -108,6 +108,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -175,6 +176,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -264,6 +266,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOExceptio HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -306,6 +309,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/PaymentLinkService.java b/src/main/java/com/postfinancecheckout/sdk/service/PaymentLinkService.java index aa40d40..5471cba 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/PaymentLinkService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/PaymentLinkService.java @@ -110,6 +110,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -177,6 +178,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -257,6 +259,7 @@ public HttpResponse createForHttpResponse(Long spaceId, PaymentLinkCreate entity HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -330,6 +333,7 @@ public HttpResponse createForHttpResponse(Long spaceId, PaymentLinkCreate entity HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -396,6 +400,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id) throws IOExcept HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -469,6 +474,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/PaymentMethodConfigurationService.java b/src/main/java/com/postfinancecheckout/sdk/service/PaymentMethodConfigurationService.java index 35a04e5..7a18989 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/PaymentMethodConfigurationService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/PaymentMethodConfigurationService.java @@ -108,6 +108,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -175,6 +176,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -264,6 +266,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOExceptio HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -306,6 +309,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/PaymentProcessorConfigurationService.java b/src/main/java/com/postfinancecheckout/sdk/service/PaymentProcessorConfigurationService.java index 9a364bb..1164c59 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/PaymentProcessorConfigurationService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/PaymentProcessorConfigurationService.java @@ -108,6 +108,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -175,6 +176,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -264,6 +266,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOExceptio HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -306,6 +309,7 @@ public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/PermissionService.java b/src/main/java/com/postfinancecheckout/sdk/service/PermissionService.java index b66a5c3..ee10682 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/PermissionService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/PermissionService.java @@ -88,6 +88,7 @@ public HttpResponse allForHttpResponse() throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -120,6 +121,7 @@ public HttpResponse allForHttpResponse(Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/RefundCommentService.java b/src/main/java/com/postfinancecheckout/sdk/service/RefundCommentService.java index c247bd5..e091923 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/RefundCommentService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/RefundCommentService.java @@ -122,6 +122,7 @@ public HttpResponse allForHttpResponse(Long spaceId, Long refundId) throws IOExc HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -164,6 +165,7 @@ public HttpResponse allForHttpResponse(Long spaceId, Long refundId, Map params) t HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -438,6 +444,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -475,6 +482,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -540,6 +548,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query) throws IOException HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -594,6 +603,7 @@ public HttpResponse searchForHttpResponse(EntityQuery query, Map HttpContent content = apiClient.new JacksonJsonHttpContent(query); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -660,6 +670,7 @@ public HttpResponse updateForHttpResponse(SpaceUpdate entity) throws IOException HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -714,6 +725,7 @@ public HttpResponse updateForHttpResponse(SpaceUpdate entity, Map params) throws IOExce HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -195,6 +197,7 @@ public HttpResponse readForHttpResponse(Long id) throws IOException { HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); @@ -232,6 +235,7 @@ public HttpResponse readForHttpResponse(Long id, Map params) thr HttpContent content = null; HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); diff --git a/src/main/java/com/postfinancecheckout/sdk/service/TokenService.java b/src/main/java/com/postfinancecheckout/sdk/service/TokenService.java index e94ac90..bc453a1 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/TokenService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/TokenService.java @@ -9,6 +9,7 @@ import com.postfinancecheckout.sdk.model.Token; import com.postfinancecheckout.sdk.model.TokenCreate; import com.postfinancecheckout.sdk.model.TokenUpdate; +import com.postfinancecheckout.sdk.model.TokenVersion; import com.postfinancecheckout.sdk.model.Transaction; import com.fasterxml.jackson.core.type.TypeReference; @@ -39,6 +40,140 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Check If Token Creation Is Possible + * This operation checks if the given transaction can be used to create a token out of it. + *

200 - This status code indicates that a client request was successfully received, understood, and accepted. + *

442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error. + *

542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request. + * @param spaceId + * @param transactionId The id of the transaction for which we want to check if the token can be created or not. + * @return Boolean + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Check If Token Creation Is Possible Documentation + + **/ + public Boolean checkTokenCreationPossible(Long spaceId, Long transactionId) throws IOException { + HttpResponse response = checkTokenCreationPossibleForHttpResponse(spaceId, transactionId); + String returnType = "Boolean"; + if(returnType.equals("String")){ + return (Boolean) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Boolean)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Check If Token Creation Is Possible + * This operation checks if the given transaction can be used to create a token out of it. + *

200 - This status code indicates that a client request was successfully received, understood, and accepted. + *

442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error. + *

542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request. + * @param spaceId + * @param transactionId The id of the transaction for which we want to check if the token can be created or not. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Boolean + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Check If Token Creation Is Possible Documentation + + **/ + public Boolean checkTokenCreationPossible(Long spaceId, Long transactionId, Map params) throws IOException { + HttpResponse response = checkTokenCreationPossibleForHttpResponse(spaceId, transactionId, params); + String returnType = "Boolean"; + if(returnType.equals("String")){ + return (Boolean) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Boolean)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse checkTokenCreationPossibleForHttpResponse(Long spaceId, Long transactionId) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling checkTokenCreationPossible"); + }// verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new IllegalArgumentException("Missing the required parameter 'transactionId' when calling checkTokenCreationPossible"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/token/check-token-creation-possible"); + if (spaceId != null) { + String key = "spaceId"; + Object value = spaceId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (transactionId != null) { + String key = "transactionId"; + Object value = transactionId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse checkTokenCreationPossibleForHttpResponse(Long spaceId, Long transactionId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling checkTokenCreationPossible"); + }// verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new IllegalArgumentException("Missing the required parameter 'transactionId' when calling checkTokenCreationPossible"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/token/check-token-creation-possible"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + // Add the required query param 'spaceId' to the map of query params + allParams.put("spaceId", spaceId); + // Add the required query param 'transactionId' to the map of query params + allParams.put("transactionId", transactionId); + + for (Map.Entry entryMap: allParams.entrySet()) { + String key = entryMap.getKey(); + Object value = entryMap.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + /** * Count * Counts the number of items in the database as restricted by the given filter. @@ -111,6 +246,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -178,6 +314,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -258,6 +395,7 @@ public HttpResponse createForHttpResponse(Long spaceId, TokenCreate entity) thro HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -331,6 +469,141 @@ public HttpResponse createForHttpResponse(Long spaceId, TokenCreate entity, Map< HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Create Token Based On Transaction + * This operation creates a token for the given transaction and fills it with the stored payment information of the transaction. + *

200 - This status code indicates that a client request was successfully received, understood, and accepted. + *

442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error. + *

542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request. + * @param spaceId + * @param transactionId The id of the transaction for which we want to create the token. + * @return TokenVersion + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Create Token Based On Transaction Documentation + + **/ + public TokenVersion createTokenBasedOnTransaction(Long spaceId, Long transactionId) throws IOException { + HttpResponse response = createTokenBasedOnTransactionForHttpResponse(spaceId, transactionId); + String returnType = "TokenVersion"; + if(returnType.equals("String")){ + return (TokenVersion) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (TokenVersion)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Create Token Based On Transaction + * This operation creates a token for the given transaction and fills it with the stored payment information of the transaction. + *

200 - This status code indicates that a client request was successfully received, understood, and accepted. + *

442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error. + *

542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request. + * @param spaceId + * @param transactionId The id of the transaction for which we want to create the token. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return TokenVersion + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Create Token Based On Transaction Documentation + + **/ + public TokenVersion createTokenBasedOnTransaction(Long spaceId, Long transactionId, Map params) throws IOException { + HttpResponse response = createTokenBasedOnTransactionForHttpResponse(spaceId, transactionId, params); + String returnType = "TokenVersion"; + if(returnType.equals("String")){ + return (TokenVersion) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (TokenVersion)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse createTokenBasedOnTransactionForHttpResponse(Long spaceId, Long transactionId) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling createTokenBasedOnTransaction"); + }// verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new IllegalArgumentException("Missing the required parameter 'transactionId' when calling createTokenBasedOnTransaction"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/token/create-token-based-on-transaction"); + if (spaceId != null) { + String key = "spaceId"; + Object value = spaceId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (transactionId != null) { + String key = "transactionId"; + Object value = transactionId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse createTokenBasedOnTransactionForHttpResponse(Long spaceId, Long transactionId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling createTokenBasedOnTransaction"); + }// verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new IllegalArgumentException("Missing the required parameter 'transactionId' when calling createTokenBasedOnTransaction"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/token/create-token-based-on-transaction"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + // Add the required query param 'spaceId' to the map of query params + allParams.put("spaceId", spaceId); + // Add the required query param 'transactionId' to the map of query params + allParams.put("transactionId", transactionId); + + for (Map.Entry entryMap: allParams.entrySet()) { + String key = entryMap.getKey(); + Object value = entryMap.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -421,6 +694,7 @@ public HttpResponse createTransactionForTokenUpdateForHttpResponse(Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -463,6 +737,7 @@ public HttpResponse createTransactionForTokenUpdateForHttpResponse(Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -529,6 +804,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id) throws IOExcept HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -602,6 +878,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id, Map param HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } diff --git a/src/main/java/com/postfinancecheckout/sdk/service/UserSpaceRoleService.java b/src/main/java/com/postfinancecheckout/sdk/service/UserSpaceRoleService.java index 1f62f0a..a476f69 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/UserSpaceRoleService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/UserSpaceRoleService.java @@ -135,6 +135,7 @@ public HttpResponse addRoleForHttpResponse(Long userId, Long spaceId, Long roleI HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -182,6 +183,7 @@ public HttpResponse addRoleForHttpResponse(Long userId, Long spaceId, Long roleI HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -274,6 +276,7 @@ public HttpResponse listForHttpResponse(Long userId, Long spaceId) throws IOExce HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -316,6 +319,7 @@ public HttpResponse listForHttpResponse(Long userId, Long spaceId, Map param HttpContent content = apiClient.new JacksonJsonHttpContent(null); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } diff --git a/src/main/java/com/postfinancecheckout/sdk/service/WebhookListenerService.java b/src/main/java/com/postfinancecheckout/sdk/service/WebhookListenerService.java index bbaf2db..3c7226d 100644 --- a/src/main/java/com/postfinancecheckout/sdk/service/WebhookListenerService.java +++ b/src/main/java/com/postfinancecheckout/sdk/service/WebhookListenerService.java @@ -110,6 +110,7 @@ public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -177,6 +178,7 @@ public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, HttpContent content = apiClient.new JacksonJsonHttpContent(filter); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -257,6 +259,7 @@ public HttpResponse createForHttpResponse(Long spaceId, WebhookListenerCreate en HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -330,6 +333,7 @@ public HttpResponse createForHttpResponse(Long spaceId, WebhookListenerCreate en HttpContent content = apiClient.new JacksonJsonHttpContent(entity); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -396,6 +400,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id) throws IOExcept HttpContent content = apiClient.new JacksonJsonHttpContent(id); HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); return httpRequest.execute(); } @@ -469,6 +474,7 @@ public HttpResponse deleteForHttpResponse(Long spaceId, Long id, Map