From a2c4284e375125ea160be1a710c2f539d0776d34 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Thu, 21 Jan 2021 10:44:03 +0100 Subject: [PATCH] Release 2.2.12 --- LICENSE | 2 +- README.md | 6 +- build.gradle | 2 +- build.sbt | 2 +- pom.xml | 2 +- src/main/java/com/wallee/sdk/ApiClient.java | 48 ++ .../sdk/model/AbstractPaymentLinkUpdate.java | 55 +- .../sdk/model/AuthenticatedCardData.java | 104 ++++ .../model/AuthenticatedCardDataCreate.java | 282 +++++++++++ .../com/wallee/sdk/model/BankAccount.java | 209 ++++++++ .../sdk/model/BankAccountEnvironment.java | 66 +++ .../wallee/sdk/model/BankAccountState.java | 70 +++ .../com/wallee/sdk/model/BankAccountType.java | 146 ++++++ .../com/wallee/sdk/model/BankTransaction.java | 375 ++++++++++++++ .../model/BankTransactionFlowDirection.java | 66 +++ .../sdk/model/BankTransactionSource.java | 130 +++++ .../sdk/model/BankTransactionState.java | 66 +++ .../wallee/sdk/model/BankTransactionType.java | 130 +++++ .../sdk/model/CardAuthenticationResponse.java | 72 +++ .../sdk/model/CardAuthenticationVersion.java | 66 +++ .../com/wallee/sdk/model/CardCryptogram.java | 112 +++++ .../sdk/model/CardCryptogramCreate.java | 130 +++++ .../wallee/sdk/model/CardCryptogramType.java | 64 +++ .../sdk/model/CardholderAuthentication.java | 161 ++++++ .../model/CardholderAuthenticationCreate.java | 206 ++++++++ .../sdk/model/ChargeBankTransaction.java | 217 ++++++++ .../wallee/sdk/model/CurrencyBankAccount.java | 177 +++++++ .../ExternalTransferBankTransaction.java | 192 +++++++ .../InternalTransferBankTransaction.java | 160 ++++++ .../wallee/sdk/model/PaymentAdjustment.java | 161 ++++++ .../sdk/model/PaymentAdjustmentType.java | 130 +++++ .../com/wallee/sdk/model/PaymentLink.java | 39 +- .../wallee/sdk/model/PaymentLinkActive.java | 10 +- .../model/PaymentLinkAddressHandlingMode.java | 68 +++ .../wallee/sdk/model/PaymentLinkCreate.java | 10 +- .../wallee/sdk/model/PaymentLinkUpdate.java | 55 +- .../model/PaymentTerminalContactAddress.java | 109 ---- .../sdk/model/PaymentTerminalLocation.java | 23 +- .../java/com/wallee/sdk/model/Permission.java | 20 +- .../wallee/sdk/model/RecurringIndicator.java | 70 +++ .../sdk/model/RefundBankTransaction.java | 201 ++++++++ .../model/RefundRecoveryBankTransaction.java | 220 ++++++++ .../wallee/sdk/model/TokenizedCardData.java | 129 +++++ ...eate.java => TokenizedCardDataCreate.java} | 101 +++- .../com/wallee/sdk/model/Transaction.java | 100 +++- .../wallee/sdk/model/UnencryptedCardData.java | 143 ------ .../sdk/model/WebAppConfirmationRequest.java | 95 ++++ .../sdk/model/WebAppConfirmationResponse.java | 160 ++++++ .../java/com/wallee/sdk/model/WebhookUrl.java | 20 +- .../sdk/service/CardProcessingService.java | 19 +- .../service/ChargeBankTransactionService.java | 473 ++++++++++++++++++ ...xternalTransferBankTransactionService.java | 473 ++++++++++++++++++ ...nternalTransferBankTransactionService.java | 473 ++++++++++++++++++ .../service/RefundBankTransactionService.java | 473 ++++++++++++++++++ .../RefundRecoveryBankTransactionService.java | 473 ++++++++++++++++++ .../com/wallee/sdk/service/WebAppService.java | 370 ++++++++++++++ 56 files changed, 7547 insertions(+), 389 deletions(-) create mode 100644 src/main/java/com/wallee/sdk/model/AuthenticatedCardData.java create mode 100644 src/main/java/com/wallee/sdk/model/AuthenticatedCardDataCreate.java create mode 100644 src/main/java/com/wallee/sdk/model/BankAccount.java create mode 100644 src/main/java/com/wallee/sdk/model/BankAccountEnvironment.java create mode 100644 src/main/java/com/wallee/sdk/model/BankAccountState.java create mode 100644 src/main/java/com/wallee/sdk/model/BankAccountType.java create mode 100644 src/main/java/com/wallee/sdk/model/BankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/BankTransactionFlowDirection.java create mode 100644 src/main/java/com/wallee/sdk/model/BankTransactionSource.java create mode 100644 src/main/java/com/wallee/sdk/model/BankTransactionState.java create mode 100644 src/main/java/com/wallee/sdk/model/BankTransactionType.java create mode 100644 src/main/java/com/wallee/sdk/model/CardAuthenticationResponse.java create mode 100644 src/main/java/com/wallee/sdk/model/CardAuthenticationVersion.java create mode 100644 src/main/java/com/wallee/sdk/model/CardCryptogram.java create mode 100644 src/main/java/com/wallee/sdk/model/CardCryptogramCreate.java create mode 100644 src/main/java/com/wallee/sdk/model/CardCryptogramType.java create mode 100644 src/main/java/com/wallee/sdk/model/CardholderAuthentication.java create mode 100644 src/main/java/com/wallee/sdk/model/CardholderAuthenticationCreate.java create mode 100644 src/main/java/com/wallee/sdk/model/ChargeBankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/CurrencyBankAccount.java create mode 100644 src/main/java/com/wallee/sdk/model/ExternalTransferBankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/InternalTransferBankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/PaymentAdjustment.java create mode 100644 src/main/java/com/wallee/sdk/model/PaymentAdjustmentType.java create mode 100644 src/main/java/com/wallee/sdk/model/PaymentLinkAddressHandlingMode.java delete mode 100644 src/main/java/com/wallee/sdk/model/PaymentTerminalContactAddress.java create mode 100644 src/main/java/com/wallee/sdk/model/RecurringIndicator.java create mode 100644 src/main/java/com/wallee/sdk/model/RefundBankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/RefundRecoveryBankTransaction.java create mode 100644 src/main/java/com/wallee/sdk/model/TokenizedCardData.java rename src/main/java/com/wallee/sdk/model/{UnencryptedCardDataCreate.java => TokenizedCardDataCreate.java} (60%) delete mode 100644 src/main/java/com/wallee/sdk/model/UnencryptedCardData.java create mode 100644 src/main/java/com/wallee/sdk/model/WebAppConfirmationRequest.java create mode 100644 src/main/java/com/wallee/sdk/model/WebAppConfirmationResponse.java create mode 100644 src/main/java/com/wallee/sdk/service/ChargeBankTransactionService.java create mode 100644 src/main/java/com/wallee/sdk/service/ExternalTransferBankTransactionService.java create mode 100644 src/main/java/com/wallee/sdk/service/InternalTransferBankTransactionService.java create mode 100644 src/main/java/com/wallee/sdk/service/RefundBankTransactionService.java create mode 100644 src/main/java/com/wallee/sdk/service/RefundRecoveryBankTransactionService.java create mode 100644 src/main/java/com/wallee/sdk/service/WebAppService.java diff --git a/LICENSE b/LICENSE index de06a902..e24cd8df 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 wallee AG + Copyright 2021 wallee AG Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index a55385d0..9d33ea89 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add this dependency to your project's POM: com.wallee wallee-java-sdk - 2.2.11 + 2.2.12 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.wallee:wallee-java-sdk:2.2.11" +compile "com.wallee:wallee-java-sdk:2.2.12" ``` ### Others @@ -46,7 +46,7 @@ mvn clean package Then manually install the following JARs: -* `target/wallee-java-sdk-2.2.11.jar` +* `target/wallee-java-sdk-2.2.12.jar` * `target/lib/*.jar` ## Usage diff --git a/build.gradle b/build.gradle index 285bb2e3..a1e754c0 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.wallee' -version = '2.2.11' +version = '2.2.12' buildscript { repositories { diff --git a/build.sbt b/build.sbt index d5173822..611c3852 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.wallee", name := "wallee-java-sdk", - version := "2.2.11", + version := "2.2.12", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/pom.xml b/pom.xml index 1a4257ea..68dbe56c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ wallee-java-sdk jar wallee-java-sdk - 2.2.11 + 2.2.12 https://www.wallee.com The SDK for simplifying the integration with wallee API. diff --git a/src/main/java/com/wallee/sdk/ApiClient.java b/src/main/java/com/wallee/sdk/ApiClient.java index 423f3074..841e2200 100644 --- a/src/main/java/com/wallee/sdk/ApiClient.java +++ b/src/main/java/com/wallee/sdk/ApiClient.java @@ -141,6 +141,14 @@ public ChargeAttemptService getChargeAttemptService() { return this.chargeAttemptService; } + private ChargeBankTransactionService chargeBankTransactionService; + public ChargeBankTransactionService getChargeBankTransactionService() { + if (this.chargeBankTransactionService == null) { + this.chargeBankTransactionService = new ChargeBankTransactionService(this); + } + return this.chargeBankTransactionService; + } + private ChargeFlowLevelPaymentLinkService chargeFlowLevelPaymentLinkService; public ChargeFlowLevelPaymentLinkService getChargeFlowLevelPaymentLinkService() { if (this.chargeFlowLevelPaymentLinkService == null) { @@ -269,6 +277,14 @@ public DocumentTemplateTypeService getDocumentTemplateTypeService() { return this.documentTemplateTypeService; } + private ExternalTransferBankTransactionService externalTransferBankTransactionService; + public ExternalTransferBankTransactionService getExternalTransferBankTransactionService() { + if (this.externalTransferBankTransactionService == null) { + this.externalTransferBankTransactionService = new ExternalTransferBankTransactionService(this); + } + return this.externalTransferBankTransactionService; + } + private HumanUserService humanUserService; public HumanUserService getHumanUserService() { if (this.humanUserService == null) { @@ -317,6 +333,14 @@ public InstallmentPlanSliceConfigurationService getInstallmentPlanSliceConfigura return this.installmentPlanSliceConfigurationService; } + private InternalTransferBankTransactionService internalTransferBankTransactionService; + public InternalTransferBankTransactionService getInternalTransferBankTransactionService() { + if (this.internalTransferBankTransactionService == null) { + this.internalTransferBankTransactionService = new InternalTransferBankTransactionService(this); + } + return this.internalTransferBankTransactionService; + } + private LabelDescriptionGroupService labelDescriptionGroupService; public LabelDescriptionGroupService getLabelDescriptionGroupService() { if (this.labelDescriptionGroupService == null) { @@ -453,6 +477,14 @@ public PermissionService getPermissionService() { return this.permissionService; } + private RefundBankTransactionService refundBankTransactionService; + public RefundBankTransactionService getRefundBankTransactionService() { + if (this.refundBankTransactionService == null) { + this.refundBankTransactionService = new RefundBankTransactionService(this); + } + return this.refundBankTransactionService; + } + private RefundCommentService refundCommentService; public RefundCommentService getRefundCommentService() { if (this.refundCommentService == null) { @@ -461,6 +493,14 @@ public RefundCommentService getRefundCommentService() { return this.refundCommentService; } + private RefundRecoveryBankTransactionService refundRecoveryBankTransactionService; + public RefundRecoveryBankTransactionService getRefundRecoveryBankTransactionService() { + if (this.refundRecoveryBankTransactionService == null) { + this.refundRecoveryBankTransactionService = new RefundRecoveryBankTransactionService(this); + } + return this.refundRecoveryBankTransactionService; + } + private RefundService refundService; public RefundService getRefundService() { if (this.refundService == null) { @@ -821,6 +861,14 @@ public UserSpaceRoleService getUserSpaceRoleService() { return this.userSpaceRoleService; } + private WebAppService webAppService; + public WebAppService getWebAppService() { + if (this.webAppService == null) { + this.webAppService = new WebAppService(this); + } + return this.webAppService; + } + private WebhookListenerService webhookListenerService; public WebhookListenerService getWebhookListenerService() { if (this.webhookListenerService == null) { diff --git a/src/main/java/com/wallee/sdk/model/AbstractPaymentLinkUpdate.java b/src/main/java/com/wallee/sdk/model/AbstractPaymentLinkUpdate.java index 974a6fd8..3cff7bd9 100644 --- a/src/main/java/com/wallee/sdk/model/AbstractPaymentLinkUpdate.java +++ b/src/main/java/com/wallee/sdk/model/AbstractPaymentLinkUpdate.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.wallee.sdk.model.LineItemCreate; +import com.wallee.sdk.model.PaymentLinkAddressHandlingMode; import com.wallee.sdk.model.PaymentMethodConfiguration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -56,8 +57,8 @@ public class AbstractPaymentLinkUpdate { protected OffsetDateTime availableUntil = null; - @JsonProperty("billingAddressRequired") - protected Boolean billingAddressRequired = null; + @JsonProperty("billingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode billingAddressHandlingMode = null; @JsonProperty("currency") @@ -80,8 +81,8 @@ public class AbstractPaymentLinkUpdate { protected String name = null; - @JsonProperty("shippingAddressRequired") - protected Boolean shippingAddressRequired = null; + @JsonProperty("shippingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode shippingAddressHandlingMode = null; @@ -169,22 +170,22 @@ public void setAvailableUntil(OffsetDateTime availableUntil) { } - public AbstractPaymentLinkUpdate billingAddressRequired(Boolean billingAddressRequired) { - this.billingAddressRequired = billingAddressRequired; + public AbstractPaymentLinkUpdate billingAddressHandlingMode(PaymentLinkAddressHandlingMode billingAddressHandlingMode) { + this.billingAddressHandlingMode = billingAddressHandlingMode; return this; } /** - * By making the billing address required the transaction can only be created when a billing address is provided within the request. - * @return billingAddressRequired + * The billing address handling mode controls if the address is collected or not and how it is collected. + * @return billingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the billing address required the transaction can only be created when a billing address is provided within the request.") - public Boolean isBillingAddressRequired() { - return billingAddressRequired; + @ApiModelProperty(value = "The billing address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getBillingAddressHandlingMode() { + return billingAddressHandlingMode; } - public void setBillingAddressRequired(Boolean billingAddressRequired) { - this.billingAddressRequired = billingAddressRequired; + public void setBillingAddressHandlingMode(PaymentLinkAddressHandlingMode billingAddressHandlingMode) { + this.billingAddressHandlingMode = billingAddressHandlingMode; } @@ -291,22 +292,22 @@ public void setName(String name) { } - public AbstractPaymentLinkUpdate shippingAddressRequired(Boolean shippingAddressRequired) { - this.shippingAddressRequired = shippingAddressRequired; + public AbstractPaymentLinkUpdate shippingAddressHandlingMode(PaymentLinkAddressHandlingMode shippingAddressHandlingMode) { + this.shippingAddressHandlingMode = shippingAddressHandlingMode; return this; } /** - * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. - * @return shippingAddressRequired + * The shipping address handling mode controls if the address is collected or not and how it is collected. + * @return shippingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the shipping address required the transaction can only be created when a shipping address is provided within the request.") - public Boolean isShippingAddressRequired() { - return shippingAddressRequired; + @ApiModelProperty(value = "The shipping address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getShippingAddressHandlingMode() { + return shippingAddressHandlingMode; } - public void setShippingAddressRequired(Boolean shippingAddressRequired) { - this.shippingAddressRequired = shippingAddressRequired; + public void setShippingAddressHandlingMode(PaymentLinkAddressHandlingMode shippingAddressHandlingMode) { + this.shippingAddressHandlingMode = shippingAddressHandlingMode; } @@ -324,18 +325,18 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.appliedSpaceView, abstractPaymentLinkUpdate.appliedSpaceView) && Objects.equals(this.availableFrom, abstractPaymentLinkUpdate.availableFrom) && Objects.equals(this.availableUntil, abstractPaymentLinkUpdate.availableUntil) && - Objects.equals(this.billingAddressRequired, abstractPaymentLinkUpdate.billingAddressRequired) && + Objects.equals(this.billingAddressHandlingMode, abstractPaymentLinkUpdate.billingAddressHandlingMode) && Objects.equals(this.currency, abstractPaymentLinkUpdate.currency) && Objects.equals(this.language, abstractPaymentLinkUpdate.language) && Objects.equals(this.lineItems, abstractPaymentLinkUpdate.lineItems) && Objects.equals(this.maximalNumberOfTransactions, abstractPaymentLinkUpdate.maximalNumberOfTransactions) && Objects.equals(this.name, abstractPaymentLinkUpdate.name) && - Objects.equals(this.shippingAddressRequired, abstractPaymentLinkUpdate.shippingAddressRequired); + Objects.equals(this.shippingAddressHandlingMode, abstractPaymentLinkUpdate.shippingAddressHandlingMode); } @Override public int hashCode() { - return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressRequired, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressRequired); + return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressHandlingMode, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressHandlingMode); } @@ -348,13 +349,13 @@ public String toString() { sb.append(" appliedSpaceView: ").append(toIndentedString(appliedSpaceView)).append("\n"); sb.append(" availableFrom: ").append(toIndentedString(availableFrom)).append("\n"); sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n"); - sb.append(" billingAddressRequired: ").append(toIndentedString(billingAddressRequired)).append("\n"); + sb.append(" billingAddressHandlingMode: ").append(toIndentedString(billingAddressHandlingMode)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" maximalNumberOfTransactions: ").append(toIndentedString(maximalNumberOfTransactions)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" shippingAddressRequired: ").append(toIndentedString(shippingAddressRequired)).append("\n"); + sb.append(" shippingAddressHandlingMode: ").append(toIndentedString(shippingAddressHandlingMode)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/wallee/sdk/model/AuthenticatedCardData.java b/src/main/java/com/wallee/sdk/model/AuthenticatedCardData.java new file mode 100644 index 00000000..5d30abcf --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/AuthenticatedCardData.java @@ -0,0 +1,104 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardholderAuthentication; +import com.wallee.sdk.model.TokenizedCardData; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the card data and optional cardholder authentication details. + */ +@ApiModel(description = "This model holds the card data and optional cardholder authentication details.") + +public class AuthenticatedCardData extends TokenizedCardData { + + @JsonProperty("cardholderAuthentication") + protected CardholderAuthentication cardholderAuthentication = null; + + + + /** + * The cardholder authentication information. The authentication is optional and can be provided if the cardholder has been already authenticated (e.g. in 3-D Secure system). + * @return cardholderAuthentication + **/ + @ApiModelProperty(value = "The cardholder authentication information. The authentication is optional and can be provided if the cardholder has been already authenticated (e.g. in 3-D Secure system).") + public CardholderAuthentication getCardholderAuthentication() { + return cardholderAuthentication; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthenticatedCardData authenticatedCardData = (AuthenticatedCardData) o; + return Objects.equals(this.cryptogram, authenticatedCardData.cryptogram) && + Objects.equals(this.recurringIndicator, authenticatedCardData.recurringIndicator) && + Objects.equals(this.tokenRequestorId, authenticatedCardData.tokenRequestorId) && + Objects.equals(this.cardholderAuthentication, authenticatedCardData.cardholderAuthentication) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(cryptogram, recurringIndicator, tokenRequestorId, cardholderAuthentication, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthenticatedCardData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" cryptogram: ").append(toIndentedString(cryptogram)).append("\n"); + sb.append(" recurringIndicator: ").append(toIndentedString(recurringIndicator)).append("\n"); + sb.append(" tokenRequestorId: ").append(toIndentedString(tokenRequestorId)).append("\n"); + sb.append(" cardholderAuthentication: ").append(toIndentedString(cardholderAuthentication)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/AuthenticatedCardDataCreate.java b/src/main/java/com/wallee/sdk/model/AuthenticatedCardDataCreate.java new file mode 100644 index 00000000..745ada6c --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/AuthenticatedCardDataCreate.java @@ -0,0 +1,282 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardCryptogramCreate; +import com.wallee.sdk.model.CardholderAuthenticationCreate; +import com.wallee.sdk.model.RecurringIndicator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the card data and optional cardholder authentication details. + */ +@ApiModel(description = "This model holds the card data and optional cardholder authentication details.") + +public class AuthenticatedCardDataCreate { + + @JsonProperty("cardHolderName") + protected String cardHolderName = null; + + + @JsonProperty("cardVerificationCode") + protected String cardVerificationCode = null; + + + @JsonProperty("cardholderAuthentication") + protected CardholderAuthenticationCreate cardholderAuthentication = null; + + + @JsonProperty("cryptogram") + protected CardCryptogramCreate cryptogram = null; + + + @JsonProperty("expiryDate") + protected String expiryDate = null; + + + @JsonProperty("primaryAccountNumber") + protected String primaryAccountNumber = null; + + + @JsonProperty("recurringIndicator") + protected RecurringIndicator recurringIndicator = null; + + + @JsonProperty("tokenRequestorId") + protected String tokenRequestorId = null; + + + + public AuthenticatedCardDataCreate cardHolderName(String cardHolderName) { + this.cardHolderName = cardHolderName; + return this; + } + + /** + * The card holder name is the name printed onto the card. It identifies the person who owns the card. + * @return cardHolderName + **/ + @ApiModelProperty(value = "The card holder name is the name printed onto the card. It identifies the person who owns the card.") + public String getCardHolderName() { + return cardHolderName; + } + + public void setCardHolderName(String cardHolderName) { + this.cardHolderName = cardHolderName; + } + + + public AuthenticatedCardDataCreate cardVerificationCode(String cardVerificationCode) { + this.cardVerificationCode = cardVerificationCode; + return this; + } + + /** + * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. + * @return cardVerificationCode + **/ + @ApiModelProperty(value = "The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional.") + public String getCardVerificationCode() { + return cardVerificationCode; + } + + public void setCardVerificationCode(String cardVerificationCode) { + this.cardVerificationCode = cardVerificationCode; + } + + + public AuthenticatedCardDataCreate cardholderAuthentication(CardholderAuthenticationCreate cardholderAuthentication) { + this.cardholderAuthentication = cardholderAuthentication; + return this; + } + + /** + * The cardholder authentication information. The authentication is optional and can be provided if the cardholder has been already authenticated (e.g. in 3-D Secure system). + * @return cardholderAuthentication + **/ + @ApiModelProperty(value = "The cardholder authentication information. The authentication is optional and can be provided if the cardholder has been already authenticated (e.g. in 3-D Secure system).") + public CardholderAuthenticationCreate getCardholderAuthentication() { + return cardholderAuthentication; + } + + public void setCardholderAuthentication(CardholderAuthenticationCreate cardholderAuthentication) { + this.cardholderAuthentication = cardholderAuthentication; + } + + + public AuthenticatedCardDataCreate cryptogram(CardCryptogramCreate cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The additional authentication value used to secure the tokenized card transactions. + * @return cryptogram + **/ + @ApiModelProperty(value = "The additional authentication value used to secure the tokenized card transactions.") + public CardCryptogramCreate getCryptogram() { + return cryptogram; + } + + public void setCryptogram(CardCryptogramCreate cryptogram) { + this.cryptogram = cryptogram; + } + + + public AuthenticatedCardDataCreate expiryDate(String expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). + * @return expiryDate + **/ + @ApiModelProperty(value = "The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09).") + public String getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + public AuthenticatedCardDataCreate primaryAccountNumber(String primaryAccountNumber) { + this.primaryAccountNumber = primaryAccountNumber; + return this; + } + + /** + * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. + * @return primaryAccountNumber + **/ + @ApiModelProperty(required = true, value = "The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card.") + public String getPrimaryAccountNumber() { + return primaryAccountNumber; + } + + public void setPrimaryAccountNumber(String primaryAccountNumber) { + this.primaryAccountNumber = primaryAccountNumber; + } + + + public AuthenticatedCardDataCreate recurringIndicator(RecurringIndicator recurringIndicator) { + this.recurringIndicator = recurringIndicator; + return this; + } + + /** + * + * @return recurringIndicator + **/ + @ApiModelProperty(value = "") + public RecurringIndicator getRecurringIndicator() { + return recurringIndicator; + } + + public void setRecurringIndicator(RecurringIndicator recurringIndicator) { + this.recurringIndicator = recurringIndicator; + } + + + public AuthenticatedCardDataCreate tokenRequestorId(String tokenRequestorId) { + this.tokenRequestorId = tokenRequestorId; + return this; + } + + /** + * + * @return tokenRequestorId + **/ + @ApiModelProperty(value = "") + public String getTokenRequestorId() { + return tokenRequestorId; + } + + public void setTokenRequestorId(String tokenRequestorId) { + this.tokenRequestorId = tokenRequestorId; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthenticatedCardDataCreate authenticatedCardDataCreate = (AuthenticatedCardDataCreate) o; + return Objects.equals(this.cardHolderName, authenticatedCardDataCreate.cardHolderName) && + Objects.equals(this.cardVerificationCode, authenticatedCardDataCreate.cardVerificationCode) && + Objects.equals(this.cardholderAuthentication, authenticatedCardDataCreate.cardholderAuthentication) && + Objects.equals(this.cryptogram, authenticatedCardDataCreate.cryptogram) && + Objects.equals(this.expiryDate, authenticatedCardDataCreate.expiryDate) && + Objects.equals(this.primaryAccountNumber, authenticatedCardDataCreate.primaryAccountNumber) && + Objects.equals(this.recurringIndicator, authenticatedCardDataCreate.recurringIndicator) && + Objects.equals(this.tokenRequestorId, authenticatedCardDataCreate.tokenRequestorId); + } + + @Override + public int hashCode() { + return Objects.hash(cardHolderName, cardVerificationCode, cardholderAuthentication, cryptogram, expiryDate, primaryAccountNumber, recurringIndicator, tokenRequestorId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthenticatedCardDataCreate {\n"); + + sb.append(" cardHolderName: ").append(toIndentedString(cardHolderName)).append("\n"); + sb.append(" cardVerificationCode: ").append(toIndentedString(cardVerificationCode)).append("\n"); + sb.append(" cardholderAuthentication: ").append(toIndentedString(cardholderAuthentication)).append("\n"); + sb.append(" cryptogram: ").append(toIndentedString(cryptogram)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append(" primaryAccountNumber: ").append(toIndentedString(primaryAccountNumber)).append("\n"); + sb.append(" recurringIndicator: ").append(toIndentedString(recurringIndicator)).append("\n"); + sb.append(" tokenRequestorId: ").append(toIndentedString(tokenRequestorId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/BankAccount.java b/src/main/java/com/wallee/sdk/model/BankAccount.java new file mode 100644 index 00000000..21ddc9e9 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankAccount.java @@ -0,0 +1,209 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankAccountState; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class BankAccount { + + @JsonProperty("description") + protected String description = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("identifier") + protected String identifier = null; + + + @JsonProperty("linkedSpaceId") + protected Long linkedSpaceId = null; + + + @JsonProperty("plannedPurgeDate") + protected OffsetDateTime plannedPurgeDate = null; + + + @JsonProperty("state") + protected BankAccountState state = null; + + + @JsonProperty("type") + protected Long type = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * The optional description is shown along the identifier. The intention of the description is to give an alternative name to the bank account. + * @return description + **/ + @ApiModelProperty(value = "The optional description is shown along the identifier. The intention of the description is to give an alternative name to the bank account.") + public String getDescription() { + return description; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * The bank account identifier is responsible to uniquely identify the bank account. + * @return identifier + **/ + @ApiModelProperty(value = "The bank account identifier is responsible to uniquely identify the bank account.") + public String getIdentifier() { + return identifier; + } + + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * @return linkedSpaceId + **/ + @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + public Long getLinkedSpaceId() { + return linkedSpaceId; + } + + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * @return plannedPurgeDate + **/ + @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + public OffsetDateTime getPlannedPurgeDate() { + return plannedPurgeDate; + } + + + /** + * + * @return state + **/ + @ApiModelProperty(value = "") + public BankAccountState getState() { + return state; + } + + + /** + * + * @return type + **/ + @ApiModelProperty(value = "") + public Long getType() { + return type; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankAccount bankAccount = (BankAccount) o; + return Objects.equals(this.description, bankAccount.description) && + Objects.equals(this.id, bankAccount.id) && + Objects.equals(this.identifier, bankAccount.identifier) && + Objects.equals(this.linkedSpaceId, bankAccount.linkedSpaceId) && + Objects.equals(this.plannedPurgeDate, bankAccount.plannedPurgeDate) && + Objects.equals(this.state, bankAccount.state) && + Objects.equals(this.type, bankAccount.type) && + Objects.equals(this.version, bankAccount.version); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, identifier, linkedSpaceId, plannedPurgeDate, state, type, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankAccount {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" plannedPurgeDate: ").append(toIndentedString(plannedPurgeDate)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/BankAccountEnvironment.java b/src/main/java/com/wallee/sdk/model/BankAccountEnvironment.java new file mode 100644 index 00000000..22315539 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankAccountEnvironment.java @@ -0,0 +1,66 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum BankAccountEnvironment { + + PRODUCTION("PRODUCTION"), + + TEST("TEST"); + + private String value; + + BankAccountEnvironment(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BankAccountEnvironment fromValue(String text) { + for (BankAccountEnvironment b : BankAccountEnvironment.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/BankAccountState.java b/src/main/java/com/wallee/sdk/model/BankAccountState.java new file mode 100644 index 00000000..86dbebaa --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankAccountState.java @@ -0,0 +1,70 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum BankAccountState { + + CREATE("CREATE"), + + ACTIVE("ACTIVE"), + + DELETING("DELETING"), + + DELETED("DELETED"); + + private String value; + + BankAccountState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BankAccountState fromValue(String text) { + for (BankAccountState b : BankAccountState.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/BankAccountType.java b/src/main/java/com/wallee/sdk/model/BankAccountType.java new file mode 100644 index 00000000..c568f13a --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankAccountType.java @@ -0,0 +1,146 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class BankAccountType { + + @JsonProperty("description") + protected Map description = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("identifierName") + protected Map identifierName = null; + + + @JsonProperty("name") + protected Map name = null; + + + + /** + * + * @return description + **/ + @ApiModelProperty(value = "") + public Map getDescription() { + return description; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * + * @return identifierName + **/ + @ApiModelProperty(value = "") + public Map getIdentifierName() { + return identifierName; + } + + + /** + * + * @return name + **/ + @ApiModelProperty(value = "") + public Map getName() { + return name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankAccountType bankAccountType = (BankAccountType) o; + return Objects.equals(this.description, bankAccountType.description) && + Objects.equals(this.id, bankAccountType.id) && + Objects.equals(this.identifierName, bankAccountType.identifierName) && + Objects.equals(this.name, bankAccountType.name); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, identifierName, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankAccountType {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" identifierName: ").append(toIndentedString(identifierName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/BankTransaction.java b/src/main/java/com/wallee/sdk/model/BankTransaction.java new file mode 100644 index 00000000..0b4e422a --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankTransaction.java @@ -0,0 +1,375 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransactionFlowDirection; +import com.wallee.sdk.model.BankTransactionState; +import com.wallee.sdk.model.CurrencyBankAccount; +import com.wallee.sdk.model.PaymentAdjustment; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class BankTransaction { + + @JsonProperty("adjustments") + protected List adjustments = null; + + + @JsonProperty("createdBy") + protected Long createdBy = null; + + + @JsonProperty("createdOn") + protected OffsetDateTime createdOn = null; + + + @JsonProperty("currencyBankAccount") + protected CurrencyBankAccount currencyBankAccount = null; + + + @JsonProperty("externalId") + protected String externalId = null; + + + @JsonProperty("flowDirection") + protected BankTransactionFlowDirection flowDirection = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("linkedSpaceId") + protected Long linkedSpaceId = null; + + + @JsonProperty("plannedPurgeDate") + protected OffsetDateTime plannedPurgeDate = null; + + + @JsonProperty("postingAmount") + protected BigDecimal postingAmount = null; + + + @JsonProperty("reference") + protected String reference = null; + + + @JsonProperty("source") + protected Long source = null; + + + @JsonProperty("state") + protected BankTransactionState state = null; + + + @JsonProperty("totalAdjustmentAmountIncludingTax") + protected BigDecimal totalAdjustmentAmountIncludingTax = null; + + + @JsonProperty("type") + protected Long type = null; + + + @JsonProperty("valueAmount") + protected BigDecimal valueAmount = null; + + + @JsonProperty("valueDate") + protected OffsetDateTime valueDate = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * The adjustments applied on this bank transaction. + * @return adjustments + **/ + @ApiModelProperty(value = "The adjustments applied on this bank transaction.") + public List getAdjustments() { + return adjustments; + } + + + /** + * The created by indicates the user which has created the bank transaction. + * @return createdBy + **/ + @ApiModelProperty(value = "The created by indicates the user which has created the bank transaction.") + public Long getCreatedBy() { + return createdBy; + } + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * @return createdOn + **/ + @ApiModelProperty(value = "The created on date indicates the date on which the entity was stored into the database.") + public OffsetDateTime getCreatedOn() { + return createdOn; + } + + + /** + * The currency bank account which is used to handle money flow. + * @return currencyBankAccount + **/ + @ApiModelProperty(value = "The currency bank account which is used to handle money flow.") + public CurrencyBankAccount getCurrencyBankAccount() { + return currencyBankAccount; + } + + + /** + * + * @return externalId + **/ + @ApiModelProperty(value = "") + public String getExternalId() { + return externalId; + } + + + /** + * + * @return flowDirection + **/ + @ApiModelProperty(value = "") + public BankTransactionFlowDirection getFlowDirection() { + return flowDirection; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * @return linkedSpaceId + **/ + @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + public Long getLinkedSpaceId() { + return linkedSpaceId; + } + + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * @return plannedPurgeDate + **/ + @ApiModelProperty(value = "The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.") + public OffsetDateTime getPlannedPurgeDate() { + return plannedPurgeDate; + } + + + /** + * The posting amount indicates the amount including adjustments. + * @return postingAmount + **/ + @ApiModelProperty(value = "The posting amount indicates the amount including adjustments.") + public BigDecimal getPostingAmount() { + return postingAmount; + } + + + /** + * + * @return reference + **/ + @ApiModelProperty(value = "") + public String getReference() { + return reference; + } + + + /** + * + * @return source + **/ + @ApiModelProperty(value = "") + public Long getSource() { + return source; + } + + + /** + * + * @return state + **/ + @ApiModelProperty(value = "") + public BankTransactionState getState() { + return state; + } + + + /** + * + * @return totalAdjustmentAmountIncludingTax + **/ + @ApiModelProperty(value = "") + public BigDecimal getTotalAdjustmentAmountIncludingTax() { + return totalAdjustmentAmountIncludingTax; + } + + + /** + * + * @return type + **/ + @ApiModelProperty(value = "") + public Long getType() { + return type; + } + + + /** + * + * @return valueAmount + **/ + @ApiModelProperty(value = "") + public BigDecimal getValueAmount() { + return valueAmount; + } + + + /** + * The value date describes the date the amount is effective on the account. + * @return valueDate + **/ + @ApiModelProperty(value = "The value date describes the date the amount is effective on the account.") + public OffsetDateTime getValueDate() { + return valueDate; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankTransaction bankTransaction = (BankTransaction) o; + return Objects.equals(this.adjustments, bankTransaction.adjustments) && + Objects.equals(this.createdBy, bankTransaction.createdBy) && + Objects.equals(this.createdOn, bankTransaction.createdOn) && + Objects.equals(this.currencyBankAccount, bankTransaction.currencyBankAccount) && + Objects.equals(this.externalId, bankTransaction.externalId) && + Objects.equals(this.flowDirection, bankTransaction.flowDirection) && + Objects.equals(this.id, bankTransaction.id) && + Objects.equals(this.linkedSpaceId, bankTransaction.linkedSpaceId) && + Objects.equals(this.plannedPurgeDate, bankTransaction.plannedPurgeDate) && + Objects.equals(this.postingAmount, bankTransaction.postingAmount) && + Objects.equals(this.reference, bankTransaction.reference) && + Objects.equals(this.source, bankTransaction.source) && + Objects.equals(this.state, bankTransaction.state) && + Objects.equals(this.totalAdjustmentAmountIncludingTax, bankTransaction.totalAdjustmentAmountIncludingTax) && + Objects.equals(this.type, bankTransaction.type) && + Objects.equals(this.valueAmount, bankTransaction.valueAmount) && + Objects.equals(this.valueDate, bankTransaction.valueDate) && + Objects.equals(this.version, bankTransaction.version); + } + + @Override + public int hashCode() { + return Objects.hash(adjustments, createdBy, createdOn, currencyBankAccount, externalId, flowDirection, id, linkedSpaceId, plannedPurgeDate, postingAmount, reference, source, state, totalAdjustmentAmountIncludingTax, type, valueAmount, valueDate, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankTransaction {\n"); + + sb.append(" adjustments: ").append(toIndentedString(adjustments)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n"); + sb.append(" currencyBankAccount: ").append(toIndentedString(currencyBankAccount)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" flowDirection: ").append(toIndentedString(flowDirection)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" plannedPurgeDate: ").append(toIndentedString(plannedPurgeDate)).append("\n"); + sb.append(" postingAmount: ").append(toIndentedString(postingAmount)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" totalAdjustmentAmountIncludingTax: ").append(toIndentedString(totalAdjustmentAmountIncludingTax)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" valueAmount: ").append(toIndentedString(valueAmount)).append("\n"); + sb.append(" valueDate: ").append(toIndentedString(valueDate)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/BankTransactionFlowDirection.java b/src/main/java/com/wallee/sdk/model/BankTransactionFlowDirection.java new file mode 100644 index 00000000..c1742b85 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankTransactionFlowDirection.java @@ -0,0 +1,66 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum BankTransactionFlowDirection { + + INFLOW("INFLOW"), + + OUTFLOW("OUTFLOW"); + + private String value; + + BankTransactionFlowDirection(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BankTransactionFlowDirection fromValue(String text) { + for (BankTransactionFlowDirection b : BankTransactionFlowDirection.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/BankTransactionSource.java b/src/main/java/com/wallee/sdk/model/BankTransactionSource.java new file mode 100644 index 00000000..a5176f22 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankTransactionSource.java @@ -0,0 +1,130 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class BankTransactionSource { + + @JsonProperty("description") + protected Map description = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("name") + protected Map name = null; + + + + /** + * + * @return description + **/ + @ApiModelProperty(value = "") + public Map getDescription() { + return description; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * + * @return name + **/ + @ApiModelProperty(value = "") + public Map getName() { + return name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankTransactionSource bankTransactionSource = (BankTransactionSource) o; + return Objects.equals(this.description, bankTransactionSource.description) && + Objects.equals(this.id, bankTransactionSource.id) && + Objects.equals(this.name, bankTransactionSource.name); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankTransactionSource {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/BankTransactionState.java b/src/main/java/com/wallee/sdk/model/BankTransactionState.java new file mode 100644 index 00000000..1456d078 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankTransactionState.java @@ -0,0 +1,66 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum BankTransactionState { + + UPCOMING("UPCOMING"), + + SETTLED("SETTLED"); + + private String value; + + BankTransactionState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BankTransactionState fromValue(String text) { + for (BankTransactionState b : BankTransactionState.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/BankTransactionType.java b/src/main/java/com/wallee/sdk/model/BankTransactionType.java new file mode 100644 index 00000000..61679afa --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/BankTransactionType.java @@ -0,0 +1,130 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class BankTransactionType { + + @JsonProperty("description") + protected Map description = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("name") + protected Map name = null; + + + + /** + * + * @return description + **/ + @ApiModelProperty(value = "") + public Map getDescription() { + return description; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * + * @return name + **/ + @ApiModelProperty(value = "") + public Map getName() { + return name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankTransactionType bankTransactionType = (BankTransactionType) o; + return Objects.equals(this.description, bankTransactionType.description) && + Objects.equals(this.id, bankTransactionType.id) && + Objects.equals(this.name, bankTransactionType.name); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankTransactionType {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/CardAuthenticationResponse.java b/src/main/java/com/wallee/sdk/model/CardAuthenticationResponse.java new file mode 100644 index 00000000..7a3cbe69 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardAuthenticationResponse.java @@ -0,0 +1,72 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum CardAuthenticationResponse { + + ENROLLMENT_VERIFICATION_ERROR("ENROLLMENT_VERIFICATION_ERROR"), + + NOT_ENROLLED("NOT_ENROLLED"), + + AUTHENTICATION_ERROR("AUTHENTICATION_ERROR"), + + AUTHENTICATION_NOT_REQUIRED("AUTHENTICATION_NOT_REQUIRED"), + + FULLY_AUTHENTICATED("FULLY_AUTHENTICATED"); + + private String value; + + CardAuthenticationResponse(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardAuthenticationResponse fromValue(String text) { + for (CardAuthenticationResponse b : CardAuthenticationResponse.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/CardAuthenticationVersion.java b/src/main/java/com/wallee/sdk/model/CardAuthenticationVersion.java new file mode 100644 index 00000000..11b6b99e --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardAuthenticationVersion.java @@ -0,0 +1,66 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * This model defines the card authentication versions. + */ +public enum CardAuthenticationVersion { + + V1("V1"), + + V2("V2"); + + private String value; + + CardAuthenticationVersion(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardAuthenticationVersion fromValue(String text) { + for (CardAuthenticationVersion b : CardAuthenticationVersion.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/CardCryptogram.java b/src/main/java/com/wallee/sdk/model/CardCryptogram.java new file mode 100644 index 00000000..47e1b356 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardCryptogram.java @@ -0,0 +1,112 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardCryptogramType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the additional card authentication. + */ +@ApiModel(description = "This model holds the additional card authentication.") + +public class CardCryptogram { + + @JsonProperty("type") + protected CardCryptogramType type = null; + + + @JsonProperty("value") + protected String value = null; + + + + /** + * + * @return type + **/ + @ApiModelProperty(value = "") + public CardCryptogramType getType() { + return type; + } + + + /** + * + * @return value + **/ + @ApiModelProperty(value = "") + public String getValue() { + return value; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardCryptogram cardCryptogram = (CardCryptogram) o; + return Objects.equals(this.type, cardCryptogram.type) && + Objects.equals(this.value, cardCryptogram.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, value); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardCryptogram {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/CardCryptogramCreate.java b/src/main/java/com/wallee/sdk/model/CardCryptogramCreate.java new file mode 100644 index 00000000..c513775f --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardCryptogramCreate.java @@ -0,0 +1,130 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardCryptogramType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the additional card authentication. + */ +@ApiModel(description = "This model holds the additional card authentication.") + +public class CardCryptogramCreate { + + @JsonProperty("type") + protected CardCryptogramType type = null; + + + @JsonProperty("value") + protected String value = null; + + + + public CardCryptogramCreate type(CardCryptogramType type) { + this.type = type; + return this; + } + + /** + * + * @return type + **/ + @ApiModelProperty(required = true, value = "") + public CardCryptogramType getType() { + return type; + } + + public void setType(CardCryptogramType type) { + this.type = type; + } + + + public CardCryptogramCreate value(String value) { + this.value = value; + return this; + } + + /** + * + * @return value + **/ + @ApiModelProperty(required = true, value = "") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardCryptogramCreate cardCryptogramCreate = (CardCryptogramCreate) o; + return Objects.equals(this.type, cardCryptogramCreate.type) && + Objects.equals(this.value, cardCryptogramCreate.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, value); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardCryptogramCreate {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/CardCryptogramType.java b/src/main/java/com/wallee/sdk/model/CardCryptogramType.java new file mode 100644 index 00000000..45be08e4 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardCryptogramType.java @@ -0,0 +1,64 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * This model defines the card cryptogram types. + */ +public enum CardCryptogramType { + + SCHEME_TOKEN("SCHEME_TOKEN"); + + private String value; + + CardCryptogramType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardCryptogramType fromValue(String text) { + for (CardCryptogramType b : CardCryptogramType.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/CardholderAuthentication.java b/src/main/java/com/wallee/sdk/model/CardholderAuthentication.java new file mode 100644 index 00000000..367985e0 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardholderAuthentication.java @@ -0,0 +1,161 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardAuthenticationResponse; +import com.wallee.sdk.model.CardAuthenticationVersion; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the cardholder authentication data (e.g. 3-D Secure authentication). + */ +@ApiModel(description = "This model holds the cardholder authentication data (e.g. 3-D Secure authentication).") + +public class CardholderAuthentication { + + @JsonProperty("authenticationIdentifier") + protected String authenticationIdentifier = null; + + + @JsonProperty("authenticationResponse") + protected CardAuthenticationResponse authenticationResponse = null; + + + @JsonProperty("authenticationValue") + protected String authenticationValue = null; + + + @JsonProperty("electronicCommerceIndicator") + protected String electronicCommerceIndicator = null; + + + @JsonProperty("version") + protected CardAuthenticationVersion version = null; + + + + /** + * The authentication identifier as assigned by authentication system (e.g. XID or 3DSTransactionID). + * @return authenticationIdentifier + **/ + @ApiModelProperty(value = "The authentication identifier as assigned by authentication system (e.g. XID or 3DSTransactionID).") + public String getAuthenticationIdentifier() { + return authenticationIdentifier; + } + + + /** + * + * @return authenticationResponse + **/ + @ApiModelProperty(value = "") + public CardAuthenticationResponse getAuthenticationResponse() { + return authenticationResponse; + } + + + /** + * The cardholder authentication value. Also known as Cardholder Authentication Verification Value (CAVV). + * @return authenticationValue + **/ + @ApiModelProperty(value = "The cardholder authentication value. Also known as Cardholder Authentication Verification Value (CAVV).") + public String getAuthenticationValue() { + return authenticationValue; + } + + + /** + * The Electronic Commerce Indicator (ECI) value. The ECI is returned by authentication system and indicates the outcome/status of authentication. + * @return electronicCommerceIndicator + **/ + @ApiModelProperty(value = "The Electronic Commerce Indicator (ECI) value. The ECI is returned by authentication system and indicates the outcome/status of authentication.") + public String getElectronicCommerceIndicator() { + return electronicCommerceIndicator; + } + + + /** + * + * @return version + **/ + @ApiModelProperty(value = "") + public CardAuthenticationVersion getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardholderAuthentication cardholderAuthentication = (CardholderAuthentication) o; + return Objects.equals(this.authenticationIdentifier, cardholderAuthentication.authenticationIdentifier) && + Objects.equals(this.authenticationResponse, cardholderAuthentication.authenticationResponse) && + Objects.equals(this.authenticationValue, cardholderAuthentication.authenticationValue) && + Objects.equals(this.electronicCommerceIndicator, cardholderAuthentication.electronicCommerceIndicator) && + Objects.equals(this.version, cardholderAuthentication.version); + } + + @Override + public int hashCode() { + return Objects.hash(authenticationIdentifier, authenticationResponse, authenticationValue, electronicCommerceIndicator, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardholderAuthentication {\n"); + + sb.append(" authenticationIdentifier: ").append(toIndentedString(authenticationIdentifier)).append("\n"); + sb.append(" authenticationResponse: ").append(toIndentedString(authenticationResponse)).append("\n"); + sb.append(" authenticationValue: ").append(toIndentedString(authenticationValue)).append("\n"); + sb.append(" electronicCommerceIndicator: ").append(toIndentedString(electronicCommerceIndicator)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/CardholderAuthenticationCreate.java b/src/main/java/com/wallee/sdk/model/CardholderAuthenticationCreate.java new file mode 100644 index 00000000..8cbd311e --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CardholderAuthenticationCreate.java @@ -0,0 +1,206 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardAuthenticationResponse; +import com.wallee.sdk.model.CardAuthenticationVersion; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the cardholder authentication data (e.g. 3-D Secure authentication). + */ +@ApiModel(description = "This model holds the cardholder authentication data (e.g. 3-D Secure authentication).") + +public class CardholderAuthenticationCreate { + + @JsonProperty("authenticationIdentifier") + protected String authenticationIdentifier = null; + + + @JsonProperty("authenticationResponse") + protected CardAuthenticationResponse authenticationResponse = null; + + + @JsonProperty("authenticationValue") + protected String authenticationValue = null; + + + @JsonProperty("electronicCommerceIndicator") + protected String electronicCommerceIndicator = null; + + + @JsonProperty("version") + protected CardAuthenticationVersion version = null; + + + + public CardholderAuthenticationCreate authenticationIdentifier(String authenticationIdentifier) { + this.authenticationIdentifier = authenticationIdentifier; + return this; + } + + /** + * The authentication identifier as assigned by authentication system (e.g. XID or 3DSTransactionID). + * @return authenticationIdentifier + **/ + @ApiModelProperty(value = "The authentication identifier as assigned by authentication system (e.g. XID or 3DSTransactionID).") + public String getAuthenticationIdentifier() { + return authenticationIdentifier; + } + + public void setAuthenticationIdentifier(String authenticationIdentifier) { + this.authenticationIdentifier = authenticationIdentifier; + } + + + public CardholderAuthenticationCreate authenticationResponse(CardAuthenticationResponse authenticationResponse) { + this.authenticationResponse = authenticationResponse; + return this; + } + + /** + * + * @return authenticationResponse + **/ + @ApiModelProperty(required = true, value = "") + public CardAuthenticationResponse getAuthenticationResponse() { + return authenticationResponse; + } + + public void setAuthenticationResponse(CardAuthenticationResponse authenticationResponse) { + this.authenticationResponse = authenticationResponse; + } + + + public CardholderAuthenticationCreate authenticationValue(String authenticationValue) { + this.authenticationValue = authenticationValue; + return this; + } + + /** + * The cardholder authentication value. Also known as Cardholder Authentication Verification Value (CAVV). + * @return authenticationValue + **/ + @ApiModelProperty(value = "The cardholder authentication value. Also known as Cardholder Authentication Verification Value (CAVV).") + public String getAuthenticationValue() { + return authenticationValue; + } + + public void setAuthenticationValue(String authenticationValue) { + this.authenticationValue = authenticationValue; + } + + + public CardholderAuthenticationCreate electronicCommerceIndicator(String electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) value. The ECI is returned by authentication system and indicates the outcome/status of authentication. + * @return electronicCommerceIndicator + **/ + @ApiModelProperty(value = "The Electronic Commerce Indicator (ECI) value. The ECI is returned by authentication system and indicates the outcome/status of authentication.") + public String getElectronicCommerceIndicator() { + return electronicCommerceIndicator; + } + + public void setElectronicCommerceIndicator(String electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + } + + + public CardholderAuthenticationCreate version(CardAuthenticationVersion version) { + this.version = version; + return this; + } + + /** + * + * @return version + **/ + @ApiModelProperty(required = true, value = "") + public CardAuthenticationVersion getVersion() { + return version; + } + + public void setVersion(CardAuthenticationVersion version) { + this.version = version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardholderAuthenticationCreate cardholderAuthenticationCreate = (CardholderAuthenticationCreate) o; + return Objects.equals(this.authenticationIdentifier, cardholderAuthenticationCreate.authenticationIdentifier) && + Objects.equals(this.authenticationResponse, cardholderAuthenticationCreate.authenticationResponse) && + Objects.equals(this.authenticationValue, cardholderAuthenticationCreate.authenticationValue) && + Objects.equals(this.electronicCommerceIndicator, cardholderAuthenticationCreate.electronicCommerceIndicator) && + Objects.equals(this.version, cardholderAuthenticationCreate.version); + } + + @Override + public int hashCode() { + return Objects.hash(authenticationIdentifier, authenticationResponse, authenticationValue, electronicCommerceIndicator, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardholderAuthenticationCreate {\n"); + + sb.append(" authenticationIdentifier: ").append(toIndentedString(authenticationIdentifier)).append("\n"); + sb.append(" authenticationResponse: ").append(toIndentedString(authenticationResponse)).append("\n"); + sb.append(" authenticationValue: ").append(toIndentedString(authenticationValue)).append("\n"); + sb.append(" electronicCommerceIndicator: ").append(toIndentedString(electronicCommerceIndicator)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/ChargeBankTransaction.java b/src/main/java/com/wallee/sdk/model/ChargeBankTransaction.java new file mode 100644 index 00000000..6671cb2e --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/ChargeBankTransaction.java @@ -0,0 +1,217 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransaction; +import com.wallee.sdk.model.TransactionAwareEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class ChargeBankTransaction extends TransactionAwareEntity { + + @JsonProperty("bankTransaction") + protected BankTransaction bankTransaction = null; + + + @JsonProperty("completion") + protected Long completion = null; + + + @JsonProperty("language") + protected String language = null; + + + @JsonProperty("spaceViewId") + protected Long spaceViewId = null; + + + @JsonProperty("transaction") + protected Long transaction = null; + + + @JsonProperty("transactionCurrencyAmount") + protected BigDecimal transactionCurrencyAmount = null; + + + @JsonProperty("transactionCurrencyValueAmount") + protected BigDecimal transactionCurrencyValueAmount = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * + * @return bankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getBankTransaction() { + return bankTransaction; + } + + + /** + * + * @return completion + **/ + @ApiModelProperty(value = "") + public Long getCompletion() { + return completion; + } + + + /** + * + * @return language + **/ + @ApiModelProperty(value = "") + public String getLanguage() { + return language; + } + + + /** + * + * @return spaceViewId + **/ + @ApiModelProperty(value = "") + public Long getSpaceViewId() { + return spaceViewId; + } + + + /** + * + * @return transaction + **/ + @ApiModelProperty(value = "") + public Long getTransaction() { + return transaction; + } + + + /** + * Specify the posting amount in the transaction's currency. + * @return transactionCurrencyAmount + **/ + @ApiModelProperty(value = "Specify the posting amount in the transaction's currency.") + public BigDecimal getTransactionCurrencyAmount() { + return transactionCurrencyAmount; + } + + + /** + * + * @return transactionCurrencyValueAmount + **/ + @ApiModelProperty(value = "") + public BigDecimal getTransactionCurrencyValueAmount() { + return transactionCurrencyValueAmount; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargeBankTransaction chargeBankTransaction = (ChargeBankTransaction) o; + return Objects.equals(this.id, chargeBankTransaction.id) && + Objects.equals(this.linkedSpaceId, chargeBankTransaction.linkedSpaceId) && + Objects.equals(this.linkedTransaction, chargeBankTransaction.linkedTransaction) && + Objects.equals(this.bankTransaction, chargeBankTransaction.bankTransaction) && + Objects.equals(this.completion, chargeBankTransaction.completion) && + Objects.equals(this.language, chargeBankTransaction.language) && + Objects.equals(this.spaceViewId, chargeBankTransaction.spaceViewId) && + Objects.equals(this.transaction, chargeBankTransaction.transaction) && + Objects.equals(this.transactionCurrencyAmount, chargeBankTransaction.transactionCurrencyAmount) && + Objects.equals(this.transactionCurrencyValueAmount, chargeBankTransaction.transactionCurrencyValueAmount) && + Objects.equals(this.version, chargeBankTransaction.version) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, linkedSpaceId, linkedTransaction, bankTransaction, completion, language, spaceViewId, transaction, transactionCurrencyAmount, transactionCurrencyValueAmount, version, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargeBankTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" linkedTransaction: ").append(toIndentedString(linkedTransaction)).append("\n"); + sb.append(" bankTransaction: ").append(toIndentedString(bankTransaction)).append("\n"); + sb.append(" completion: ").append(toIndentedString(completion)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" spaceViewId: ").append(toIndentedString(spaceViewId)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append(" transactionCurrencyAmount: ").append(toIndentedString(transactionCurrencyAmount)).append("\n"); + sb.append(" transactionCurrencyValueAmount: ").append(toIndentedString(transactionCurrencyValueAmount)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/CurrencyBankAccount.java b/src/main/java/com/wallee/sdk/model/CurrencyBankAccount.java new file mode 100644 index 00000000..b2460b7e --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/CurrencyBankAccount.java @@ -0,0 +1,177 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankAccount; +import com.wallee.sdk.model.BankAccountEnvironment; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class CurrencyBankAccount { + + @JsonProperty("bankAccount") + protected BankAccount bankAccount = null; + + + @JsonProperty("currency") + protected String currency = null; + + + @JsonProperty("environment") + protected BankAccountEnvironment environment = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("linkedSpaceId") + protected Long linkedSpaceId = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * + * @return bankAccount + **/ + @ApiModelProperty(value = "") + public BankAccount getBankAccount() { + return bankAccount; + } + + + /** + * + * @return currency + **/ + @ApiModelProperty(value = "") + public String getCurrency() { + return currency; + } + + + /** + * + * @return environment + **/ + @ApiModelProperty(value = "") + public BankAccountEnvironment getEnvironment() { + return environment; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * @return linkedSpaceId + **/ + @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + public Long getLinkedSpaceId() { + return linkedSpaceId; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CurrencyBankAccount currencyBankAccount = (CurrencyBankAccount) o; + return Objects.equals(this.bankAccount, currencyBankAccount.bankAccount) && + Objects.equals(this.currency, currencyBankAccount.currency) && + Objects.equals(this.environment, currencyBankAccount.environment) && + Objects.equals(this.id, currencyBankAccount.id) && + Objects.equals(this.linkedSpaceId, currencyBankAccount.linkedSpaceId) && + Objects.equals(this.version, currencyBankAccount.version); + } + + @Override + public int hashCode() { + return Objects.hash(bankAccount, currency, environment, id, linkedSpaceId, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CurrencyBankAccount {\n"); + + sb.append(" bankAccount: ").append(toIndentedString(bankAccount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/ExternalTransferBankTransaction.java b/src/main/java/com/wallee/sdk/model/ExternalTransferBankTransaction.java new file mode 100644 index 00000000..0d6f0a63 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/ExternalTransferBankTransaction.java @@ -0,0 +1,192 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransaction; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class ExternalTransferBankTransaction { + + @JsonProperty("bankTransaction") + protected BankTransaction bankTransaction = null; + + + @JsonProperty("externalAccountIdentifier") + protected String externalAccountIdentifier = null; + + + @JsonProperty("externalAccountType") + protected String externalAccountType = null; + + + @JsonProperty("externalBankName") + protected String externalBankName = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("linkedSpaceId") + protected Long linkedSpaceId = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * + * @return bankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getBankTransaction() { + return bankTransaction; + } + + + /** + * + * @return externalAccountIdentifier + **/ + @ApiModelProperty(value = "") + public String getExternalAccountIdentifier() { + return externalAccountIdentifier; + } + + + /** + * + * @return externalAccountType + **/ + @ApiModelProperty(value = "") + public String getExternalAccountType() { + return externalAccountType; + } + + + /** + * + * @return externalBankName + **/ + @ApiModelProperty(value = "") + public String getExternalBankName() { + return externalBankName; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * @return linkedSpaceId + **/ + @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + public Long getLinkedSpaceId() { + return linkedSpaceId; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalTransferBankTransaction externalTransferBankTransaction = (ExternalTransferBankTransaction) o; + return Objects.equals(this.bankTransaction, externalTransferBankTransaction.bankTransaction) && + Objects.equals(this.externalAccountIdentifier, externalTransferBankTransaction.externalAccountIdentifier) && + Objects.equals(this.externalAccountType, externalTransferBankTransaction.externalAccountType) && + Objects.equals(this.externalBankName, externalTransferBankTransaction.externalBankName) && + Objects.equals(this.id, externalTransferBankTransaction.id) && + Objects.equals(this.linkedSpaceId, externalTransferBankTransaction.linkedSpaceId) && + Objects.equals(this.version, externalTransferBankTransaction.version); + } + + @Override + public int hashCode() { + return Objects.hash(bankTransaction, externalAccountIdentifier, externalAccountType, externalBankName, id, linkedSpaceId, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalTransferBankTransaction {\n"); + + sb.append(" bankTransaction: ").append(toIndentedString(bankTransaction)).append("\n"); + sb.append(" externalAccountIdentifier: ").append(toIndentedString(externalAccountIdentifier)).append("\n"); + sb.append(" externalAccountType: ").append(toIndentedString(externalAccountType)).append("\n"); + sb.append(" externalBankName: ").append(toIndentedString(externalBankName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/InternalTransferBankTransaction.java b/src/main/java/com/wallee/sdk/model/InternalTransferBankTransaction.java new file mode 100644 index 00000000..a2614cc8 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/InternalTransferBankTransaction.java @@ -0,0 +1,160 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransaction; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class InternalTransferBankTransaction { + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("linkedSpaceId") + protected Long linkedSpaceId = null; + + + @JsonProperty("sourceBankTransaction") + protected BankTransaction sourceBankTransaction = null; + + + @JsonProperty("targetBankTransaction") + protected BankTransaction targetBankTransaction = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * @return linkedSpaceId + **/ + @ApiModelProperty(value = "The linked space id holds the ID of the space to which the entity belongs to.") + public Long getLinkedSpaceId() { + return linkedSpaceId; + } + + + /** + * + * @return sourceBankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getSourceBankTransaction() { + return sourceBankTransaction; + } + + + /** + * + * @return targetBankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getTargetBankTransaction() { + return targetBankTransaction; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalTransferBankTransaction internalTransferBankTransaction = (InternalTransferBankTransaction) o; + return Objects.equals(this.id, internalTransferBankTransaction.id) && + Objects.equals(this.linkedSpaceId, internalTransferBankTransaction.linkedSpaceId) && + Objects.equals(this.sourceBankTransaction, internalTransferBankTransaction.sourceBankTransaction) && + Objects.equals(this.targetBankTransaction, internalTransferBankTransaction.targetBankTransaction) && + Objects.equals(this.version, internalTransferBankTransaction.version); + } + + @Override + public int hashCode() { + return Objects.hash(id, linkedSpaceId, sourceBankTransaction, targetBankTransaction, version); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalTransferBankTransaction {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" sourceBankTransaction: ").append(toIndentedString(sourceBankTransaction)).append("\n"); + sb.append(" targetBankTransaction: ").append(toIndentedString(targetBankTransaction)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/PaymentAdjustment.java b/src/main/java/com/wallee/sdk/model/PaymentAdjustment.java new file mode 100644 index 00000000..62cf8b51 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/PaymentAdjustment.java @@ -0,0 +1,161 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.Tax; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class PaymentAdjustment { + + @JsonProperty("amountExcludingTax") + protected BigDecimal amountExcludingTax = null; + + + @JsonProperty("amountIncludingTax") + protected BigDecimal amountIncludingTax = null; + + + @JsonProperty("rateInPercentage") + protected BigDecimal rateInPercentage = null; + + + @JsonProperty("tax") + protected Tax tax = null; + + + @JsonProperty("type") + protected Long type = null; + + + + /** + * + * @return amountExcludingTax + **/ + @ApiModelProperty(value = "") + public BigDecimal getAmountExcludingTax() { + return amountExcludingTax; + } + + + /** + * The total amount of this adjustment including taxes. + * @return amountIncludingTax + **/ + @ApiModelProperty(value = "The total amount of this adjustment including taxes.") + public BigDecimal getAmountIncludingTax() { + return amountIncludingTax; + } + + + /** + * The rate in percentage is the rate on which the adjustment amount was calculated with. + * @return rateInPercentage + **/ + @ApiModelProperty(value = "The rate in percentage is the rate on which the adjustment amount was calculated with.") + public BigDecimal getRateInPercentage() { + return rateInPercentage; + } + + + /** + * + * @return tax + **/ + @ApiModelProperty(value = "") + public Tax getTax() { + return tax; + } + + + /** + * + * @return type + **/ + @ApiModelProperty(value = "") + public Long getType() { + return type; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentAdjustment paymentAdjustment = (PaymentAdjustment) o; + return Objects.equals(this.amountExcludingTax, paymentAdjustment.amountExcludingTax) && + Objects.equals(this.amountIncludingTax, paymentAdjustment.amountIncludingTax) && + Objects.equals(this.rateInPercentage, paymentAdjustment.rateInPercentage) && + Objects.equals(this.tax, paymentAdjustment.tax) && + Objects.equals(this.type, paymentAdjustment.type); + } + + @Override + public int hashCode() { + return Objects.hash(amountExcludingTax, amountIncludingTax, rateInPercentage, tax, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentAdjustment {\n"); + + sb.append(" amountExcludingTax: ").append(toIndentedString(amountExcludingTax)).append("\n"); + sb.append(" amountIncludingTax: ").append(toIndentedString(amountIncludingTax)).append("\n"); + sb.append(" rateInPercentage: ").append(toIndentedString(rateInPercentage)).append("\n"); + sb.append(" tax: ").append(toIndentedString(tax)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/PaymentAdjustmentType.java b/src/main/java/com/wallee/sdk/model/PaymentAdjustmentType.java new file mode 100644 index 00000000..528456ed --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/PaymentAdjustmentType.java @@ -0,0 +1,130 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class PaymentAdjustmentType { + + @JsonProperty("description") + protected Map description = null; + + + @JsonProperty("id") + protected Long id = null; + + + @JsonProperty("name") + protected Map name = null; + + + + /** + * + * @return description + **/ + @ApiModelProperty(value = "") + public Map getDescription() { + return description; + } + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * @return id + **/ + @ApiModelProperty(value = "The ID is the primary key of the entity. The ID identifies the entity uniquely.") + public Long getId() { + return id; + } + + + /** + * + * @return name + **/ + @ApiModelProperty(value = "") + public Map getName() { + return name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentAdjustmentType paymentAdjustmentType = (PaymentAdjustmentType) o; + return Objects.equals(this.description, paymentAdjustmentType.description) && + Objects.equals(this.id, paymentAdjustmentType.id) && + Objects.equals(this.name, paymentAdjustmentType.name); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentAdjustmentType {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/PaymentLink.java b/src/main/java/com/wallee/sdk/model/PaymentLink.java index b272ee86..08396060 100644 --- a/src/main/java/com/wallee/sdk/model/PaymentLink.java +++ b/src/main/java/com/wallee/sdk/model/PaymentLink.java @@ -26,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.wallee.sdk.model.CreationEntityState; import com.wallee.sdk.model.LineItem; +import com.wallee.sdk.model.PaymentLinkAddressHandlingMode; import com.wallee.sdk.model.PaymentLinkProtectionMode; import com.wallee.sdk.model.PaymentMethodConfiguration; import io.swagger.annotations.ApiModel; @@ -59,8 +60,8 @@ public class PaymentLink { protected OffsetDateTime availableUntil = null; - @JsonProperty("billingAddressRequired") - protected Boolean billingAddressRequired = null; + @JsonProperty("billingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode billingAddressHandlingMode = null; @JsonProperty("currency") @@ -103,8 +104,8 @@ public class PaymentLink { protected PaymentLinkProtectionMode protectionMode = null; - @JsonProperty("shippingAddressRequired") - protected Boolean shippingAddressRequired = null; + @JsonProperty("shippingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode shippingAddressHandlingMode = null; @JsonProperty("state") @@ -161,12 +162,12 @@ public OffsetDateTime getAvailableUntil() { /** - * By making the billing address required the transaction can only be created when a billing address is provided within the request. - * @return billingAddressRequired + * The billing address handling mode controls if the address is collected or not and how it is collected. + * @return billingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the billing address required the transaction can only be created when a billing address is provided within the request.") - public Boolean isBillingAddressRequired() { - return billingAddressRequired; + @ApiModelProperty(value = "The billing address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getBillingAddressHandlingMode() { + return billingAddressHandlingMode; } @@ -271,12 +272,12 @@ public PaymentLinkProtectionMode getProtectionMode() { /** - * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. - * @return shippingAddressRequired + * The shipping address handling mode controls if the address is collected or not and how it is collected. + * @return shippingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the shipping address required the transaction can only be created when a shipping address is provided within the request.") - public Boolean isShippingAddressRequired() { - return shippingAddressRequired; + @ApiModelProperty(value = "The shipping address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getShippingAddressHandlingMode() { + return shippingAddressHandlingMode; } @@ -324,7 +325,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.appliedSpaceView, paymentLink.appliedSpaceView) && Objects.equals(this.availableFrom, paymentLink.availableFrom) && Objects.equals(this.availableUntil, paymentLink.availableUntil) && - Objects.equals(this.billingAddressRequired, paymentLink.billingAddressRequired) && + Objects.equals(this.billingAddressHandlingMode, paymentLink.billingAddressHandlingMode) && Objects.equals(this.currency, paymentLink.currency) && Objects.equals(this.externalId, paymentLink.externalId) && Objects.equals(this.id, paymentLink.id) && @@ -335,7 +336,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.name, paymentLink.name) && Objects.equals(this.plannedPurgeDate, paymentLink.plannedPurgeDate) && Objects.equals(this.protectionMode, paymentLink.protectionMode) && - Objects.equals(this.shippingAddressRequired, paymentLink.shippingAddressRequired) && + Objects.equals(this.shippingAddressHandlingMode, paymentLink.shippingAddressHandlingMode) && Objects.equals(this.state, paymentLink.state) && Objects.equals(this.url, paymentLink.url) && Objects.equals(this.version, paymentLink.version); @@ -343,7 +344,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressRequired, currency, externalId, id, language, lineItems, linkedSpaceId, maximalNumberOfTransactions, name, plannedPurgeDate, protectionMode, shippingAddressRequired, state, url, version); + return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressHandlingMode, currency, externalId, id, language, lineItems, linkedSpaceId, maximalNumberOfTransactions, name, plannedPurgeDate, protectionMode, shippingAddressHandlingMode, state, url, version); } @@ -356,7 +357,7 @@ public String toString() { sb.append(" appliedSpaceView: ").append(toIndentedString(appliedSpaceView)).append("\n"); sb.append(" availableFrom: ").append(toIndentedString(availableFrom)).append("\n"); sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n"); - sb.append(" billingAddressRequired: ").append(toIndentedString(billingAddressRequired)).append("\n"); + sb.append(" billingAddressHandlingMode: ").append(toIndentedString(billingAddressHandlingMode)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -367,7 +368,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" plannedPurgeDate: ").append(toIndentedString(plannedPurgeDate)).append("\n"); sb.append(" protectionMode: ").append(toIndentedString(protectionMode)).append("\n"); - sb.append(" shippingAddressRequired: ").append(toIndentedString(shippingAddressRequired)).append("\n"); + sb.append(" shippingAddressHandlingMode: ").append(toIndentedString(shippingAddressHandlingMode)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); diff --git a/src/main/java/com/wallee/sdk/model/PaymentLinkActive.java b/src/main/java/com/wallee/sdk/model/PaymentLinkActive.java index 11121e18..e4715995 100644 --- a/src/main/java/com/wallee/sdk/model/PaymentLinkActive.java +++ b/src/main/java/com/wallee/sdk/model/PaymentLinkActive.java @@ -79,20 +79,20 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.appliedSpaceView, paymentLinkActive.appliedSpaceView) && Objects.equals(this.availableFrom, paymentLinkActive.availableFrom) && Objects.equals(this.availableUntil, paymentLinkActive.availableUntil) && - Objects.equals(this.billingAddressRequired, paymentLinkActive.billingAddressRequired) && + Objects.equals(this.billingAddressHandlingMode, paymentLinkActive.billingAddressHandlingMode) && Objects.equals(this.currency, paymentLinkActive.currency) && Objects.equals(this.language, paymentLinkActive.language) && Objects.equals(this.lineItems, paymentLinkActive.lineItems) && Objects.equals(this.maximalNumberOfTransactions, paymentLinkActive.maximalNumberOfTransactions) && Objects.equals(this.name, paymentLinkActive.name) && - Objects.equals(this.shippingAddressRequired, paymentLinkActive.shippingAddressRequired) && + Objects.equals(this.shippingAddressHandlingMode, paymentLinkActive.shippingAddressHandlingMode) && Objects.equals(this.state, paymentLinkActive.state) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(id, version, allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressRequired, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressRequired, state, super.hashCode()); + return Objects.hash(id, version, allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressHandlingMode, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressHandlingMode, state, super.hashCode()); } @@ -107,13 +107,13 @@ public String toString() { sb.append(" appliedSpaceView: ").append(toIndentedString(appliedSpaceView)).append("\n"); sb.append(" availableFrom: ").append(toIndentedString(availableFrom)).append("\n"); sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n"); - sb.append(" billingAddressRequired: ").append(toIndentedString(billingAddressRequired)).append("\n"); + sb.append(" billingAddressHandlingMode: ").append(toIndentedString(billingAddressHandlingMode)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" maximalNumberOfTransactions: ").append(toIndentedString(maximalNumberOfTransactions)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" shippingAddressRequired: ").append(toIndentedString(shippingAddressRequired)).append("\n"); + sb.append(" shippingAddressHandlingMode: ").append(toIndentedString(shippingAddressHandlingMode)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/wallee/sdk/model/PaymentLinkAddressHandlingMode.java b/src/main/java/com/wallee/sdk/model/PaymentLinkAddressHandlingMode.java new file mode 100644 index 00000000..2a6943af --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/PaymentLinkAddressHandlingMode.java @@ -0,0 +1,68 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The address handling mode controls if the address is required and how it is enforced to be provided. + */ +public enum PaymentLinkAddressHandlingMode { + + NOT_REQUIRED("NOT_REQUIRED"), + + REQUIRED_IN_URL("REQUIRED_IN_URL"), + + REQUIRED_ON_PAYMENT_PAGE("REQUIRED_ON_PAYMENT_PAGE"); + + private String value; + + PaymentLinkAddressHandlingMode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PaymentLinkAddressHandlingMode fromValue(String text) { + for (PaymentLinkAddressHandlingMode b : PaymentLinkAddressHandlingMode.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/PaymentLinkCreate.java b/src/main/java/com/wallee/sdk/model/PaymentLinkCreate.java index 4f372e33..76bf19a7 100644 --- a/src/main/java/com/wallee/sdk/model/PaymentLinkCreate.java +++ b/src/main/java/com/wallee/sdk/model/PaymentLinkCreate.java @@ -124,13 +124,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.appliedSpaceView, paymentLinkCreate.appliedSpaceView) && Objects.equals(this.availableFrom, paymentLinkCreate.availableFrom) && Objects.equals(this.availableUntil, paymentLinkCreate.availableUntil) && - Objects.equals(this.billingAddressRequired, paymentLinkCreate.billingAddressRequired) && + Objects.equals(this.billingAddressHandlingMode, paymentLinkCreate.billingAddressHandlingMode) && Objects.equals(this.currency, paymentLinkCreate.currency) && Objects.equals(this.language, paymentLinkCreate.language) && Objects.equals(this.lineItems, paymentLinkCreate.lineItems) && Objects.equals(this.maximalNumberOfTransactions, paymentLinkCreate.maximalNumberOfTransactions) && Objects.equals(this.name, paymentLinkCreate.name) && - Objects.equals(this.shippingAddressRequired, paymentLinkCreate.shippingAddressRequired) && + Objects.equals(this.shippingAddressHandlingMode, paymentLinkCreate.shippingAddressHandlingMode) && Objects.equals(this.state, paymentLinkCreate.state) && Objects.equals(this.externalId, paymentLinkCreate.externalId) && Objects.equals(this.protectionMode, paymentLinkCreate.protectionMode) && @@ -139,7 +139,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressRequired, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressRequired, state, externalId, protectionMode, super.hashCode()); + return Objects.hash(allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressHandlingMode, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressHandlingMode, state, externalId, protectionMode, super.hashCode()); } @@ -152,13 +152,13 @@ public String toString() { sb.append(" appliedSpaceView: ").append(toIndentedString(appliedSpaceView)).append("\n"); sb.append(" availableFrom: ").append(toIndentedString(availableFrom)).append("\n"); sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n"); - sb.append(" billingAddressRequired: ").append(toIndentedString(billingAddressRequired)).append("\n"); + sb.append(" billingAddressHandlingMode: ").append(toIndentedString(billingAddressHandlingMode)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" maximalNumberOfTransactions: ").append(toIndentedString(maximalNumberOfTransactions)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" shippingAddressRequired: ").append(toIndentedString(shippingAddressRequired)).append("\n"); + sb.append(" shippingAddressHandlingMode: ").append(toIndentedString(shippingAddressHandlingMode)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); sb.append(" protectionMode: ").append(toIndentedString(protectionMode)).append("\n"); diff --git a/src/main/java/com/wallee/sdk/model/PaymentLinkUpdate.java b/src/main/java/com/wallee/sdk/model/PaymentLinkUpdate.java index e59e48e4..d5693843 100644 --- a/src/main/java/com/wallee/sdk/model/PaymentLinkUpdate.java +++ b/src/main/java/com/wallee/sdk/model/PaymentLinkUpdate.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.wallee.sdk.model.LineItemCreate; +import com.wallee.sdk.model.PaymentLinkAddressHandlingMode; import com.wallee.sdk.model.PaymentMethodConfiguration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -65,8 +66,8 @@ public class PaymentLinkUpdate { protected OffsetDateTime availableUntil = null; - @JsonProperty("billingAddressRequired") - protected Boolean billingAddressRequired = null; + @JsonProperty("billingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode billingAddressHandlingMode = null; @JsonProperty("currency") @@ -89,8 +90,8 @@ public class PaymentLinkUpdate { protected String name = null; - @JsonProperty("shippingAddressRequired") - protected Boolean shippingAddressRequired = null; + @JsonProperty("shippingAddressHandlingMode") + protected PaymentLinkAddressHandlingMode shippingAddressHandlingMode = null; @@ -216,22 +217,22 @@ public void setAvailableUntil(OffsetDateTime availableUntil) { } - public PaymentLinkUpdate billingAddressRequired(Boolean billingAddressRequired) { - this.billingAddressRequired = billingAddressRequired; + public PaymentLinkUpdate billingAddressHandlingMode(PaymentLinkAddressHandlingMode billingAddressHandlingMode) { + this.billingAddressHandlingMode = billingAddressHandlingMode; return this; } /** - * By making the billing address required the transaction can only be created when a billing address is provided within the request. - * @return billingAddressRequired + * The billing address handling mode controls if the address is collected or not and how it is collected. + * @return billingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the billing address required the transaction can only be created when a billing address is provided within the request.") - public Boolean isBillingAddressRequired() { - return billingAddressRequired; + @ApiModelProperty(value = "The billing address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getBillingAddressHandlingMode() { + return billingAddressHandlingMode; } - public void setBillingAddressRequired(Boolean billingAddressRequired) { - this.billingAddressRequired = billingAddressRequired; + public void setBillingAddressHandlingMode(PaymentLinkAddressHandlingMode billingAddressHandlingMode) { + this.billingAddressHandlingMode = billingAddressHandlingMode; } @@ -338,22 +339,22 @@ public void setName(String name) { } - public PaymentLinkUpdate shippingAddressRequired(Boolean shippingAddressRequired) { - this.shippingAddressRequired = shippingAddressRequired; + public PaymentLinkUpdate shippingAddressHandlingMode(PaymentLinkAddressHandlingMode shippingAddressHandlingMode) { + this.shippingAddressHandlingMode = shippingAddressHandlingMode; return this; } /** - * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. - * @return shippingAddressRequired + * The shipping address handling mode controls if the address is collected or not and how it is collected. + * @return shippingAddressHandlingMode **/ - @ApiModelProperty(value = "By making the shipping address required the transaction can only be created when a shipping address is provided within the request.") - public Boolean isShippingAddressRequired() { - return shippingAddressRequired; + @ApiModelProperty(value = "The shipping address handling mode controls if the address is collected or not and how it is collected.") + public PaymentLinkAddressHandlingMode getShippingAddressHandlingMode() { + return shippingAddressHandlingMode; } - public void setShippingAddressRequired(Boolean shippingAddressRequired) { - this.shippingAddressRequired = shippingAddressRequired; + public void setShippingAddressHandlingMode(PaymentLinkAddressHandlingMode shippingAddressHandlingMode) { + this.shippingAddressHandlingMode = shippingAddressHandlingMode; } @@ -373,18 +374,18 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.appliedSpaceView, paymentLinkUpdate.appliedSpaceView) && Objects.equals(this.availableFrom, paymentLinkUpdate.availableFrom) && Objects.equals(this.availableUntil, paymentLinkUpdate.availableUntil) && - Objects.equals(this.billingAddressRequired, paymentLinkUpdate.billingAddressRequired) && + Objects.equals(this.billingAddressHandlingMode, paymentLinkUpdate.billingAddressHandlingMode) && Objects.equals(this.currency, paymentLinkUpdate.currency) && Objects.equals(this.language, paymentLinkUpdate.language) && Objects.equals(this.lineItems, paymentLinkUpdate.lineItems) && Objects.equals(this.maximalNumberOfTransactions, paymentLinkUpdate.maximalNumberOfTransactions) && Objects.equals(this.name, paymentLinkUpdate.name) && - Objects.equals(this.shippingAddressRequired, paymentLinkUpdate.shippingAddressRequired); + Objects.equals(this.shippingAddressHandlingMode, paymentLinkUpdate.shippingAddressHandlingMode); } @Override public int hashCode() { - return Objects.hash(id, version, allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressRequired, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressRequired); + return Objects.hash(id, version, allowedPaymentMethodConfigurations, appliedSpaceView, availableFrom, availableUntil, billingAddressHandlingMode, currency, language, lineItems, maximalNumberOfTransactions, name, shippingAddressHandlingMode); } @@ -399,13 +400,13 @@ public String toString() { sb.append(" appliedSpaceView: ").append(toIndentedString(appliedSpaceView)).append("\n"); sb.append(" availableFrom: ").append(toIndentedString(availableFrom)).append("\n"); sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n"); - sb.append(" billingAddressRequired: ").append(toIndentedString(billingAddressRequired)).append("\n"); + sb.append(" billingAddressHandlingMode: ").append(toIndentedString(billingAddressHandlingMode)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" maximalNumberOfTransactions: ").append(toIndentedString(maximalNumberOfTransactions)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" shippingAddressRequired: ").append(toIndentedString(shippingAddressRequired)).append("\n"); + sb.append(" shippingAddressHandlingMode: ").append(toIndentedString(shippingAddressHandlingMode)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/wallee/sdk/model/PaymentTerminalContactAddress.java b/src/main/java/com/wallee/sdk/model/PaymentTerminalContactAddress.java deleted file mode 100644 index 4bc7f872..00000000 --- a/src/main/java/com/wallee/sdk/model/PaymentTerminalContactAddress.java +++ /dev/null @@ -1,109 +0,0 @@ -/** -* wallee SDK -* -* This library allows to interact with the wallee payment service. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - - -package com.wallee.sdk.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.wallee.sdk.model.PaymentTerminalAddress; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.*; -import java.time.OffsetDateTime; - -/** - * - */ -@ApiModel(description = "") - -public class PaymentTerminalContactAddress extends PaymentTerminalAddress { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentTerminalContactAddress paymentTerminalContactAddress = (PaymentTerminalContactAddress) o; - return Objects.equals(this.city, paymentTerminalContactAddress.city) && - Objects.equals(this.country, paymentTerminalContactAddress.country) && - Objects.equals(this.dependentLocality, paymentTerminalContactAddress.dependentLocality) && - Objects.equals(this.emailAddress, paymentTerminalContactAddress.emailAddress) && - Objects.equals(this.familyName, paymentTerminalContactAddress.familyName) && - Objects.equals(this.givenName, paymentTerminalContactAddress.givenName) && - Objects.equals(this.mobilePhoneNumber, paymentTerminalContactAddress.mobilePhoneNumber) && - Objects.equals(this.organizationName, paymentTerminalContactAddress.organizationName) && - Objects.equals(this.phoneNumber, paymentTerminalContactAddress.phoneNumber) && - Objects.equals(this.postalState, paymentTerminalContactAddress.postalState) && - Objects.equals(this.postcode, paymentTerminalContactAddress.postcode) && - Objects.equals(this.salutation, paymentTerminalContactAddress.salutation) && - Objects.equals(this.sortingCode, paymentTerminalContactAddress.sortingCode) && - Objects.equals(this.street, paymentTerminalContactAddress.street) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(city, country, dependentLocality, emailAddress, familyName, givenName, mobilePhoneNumber, organizationName, phoneNumber, postalState, postcode, salutation, sortingCode, street, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentTerminalContactAddress {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" dependentLocality: ").append(toIndentedString(dependentLocality)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" familyName: ").append(toIndentedString(familyName)).append("\n"); - sb.append(" givenName: ").append(toIndentedString(givenName)).append("\n"); - sb.append(" mobilePhoneNumber: ").append(toIndentedString(mobilePhoneNumber)).append("\n"); - sb.append(" organizationName: ").append(toIndentedString(organizationName)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" postalState: ").append(toIndentedString(postalState)).append("\n"); - sb.append(" postcode: ").append(toIndentedString(postcode)).append("\n"); - sb.append(" salutation: ").append(toIndentedString(salutation)).append("\n"); - sb.append(" sortingCode: ").append(toIndentedString(sortingCode)).append("\n"); - sb.append(" street: ").append(toIndentedString(street)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/wallee/sdk/model/PaymentTerminalLocation.java b/src/main/java/com/wallee/sdk/model/PaymentTerminalLocation.java index 12a02a1f..0723070d 100644 --- a/src/main/java/com/wallee/sdk/model/PaymentTerminalLocation.java +++ b/src/main/java/com/wallee/sdk/model/PaymentTerminalLocation.java @@ -26,7 +26,6 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.wallee.sdk.model.PaymentTerminalAddress; import com.wallee.sdk.model.PaymentTerminalConfiguration; -import com.wallee.sdk.model.PaymentTerminalContactAddress; import com.wallee.sdk.model.PaymentTerminalLocationState; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -42,17 +41,13 @@ public class PaymentTerminalLocation { @JsonProperty("contactAddress") - protected PaymentTerminalContactAddress contactAddress = null; + protected PaymentTerminalAddress contactAddress = null; @JsonProperty("defaultConfiguration") protected PaymentTerminalConfiguration defaultConfiguration = null; - @JsonProperty("deliveryAddress") - protected PaymentTerminalAddress deliveryAddress = null; - - @JsonProperty("id") protected Long id = null; @@ -83,7 +78,7 @@ public class PaymentTerminalLocation { * @return contactAddress **/ @ApiModelProperty(value = "") - public PaymentTerminalContactAddress getContactAddress() { + public PaymentTerminalAddress getContactAddress() { return contactAddress; } @@ -98,16 +93,6 @@ public PaymentTerminalConfiguration getDefaultConfiguration() { } - /** - * - * @return deliveryAddress - **/ - @ApiModelProperty(value = "") - public PaymentTerminalAddress getDeliveryAddress() { - return deliveryAddress; - } - - /** * The ID is the primary key of the entity. The ID identifies the entity uniquely. * @return id @@ -180,7 +165,6 @@ public boolean equals(java.lang.Object o) { PaymentTerminalLocation paymentTerminalLocation = (PaymentTerminalLocation) o; return Objects.equals(this.contactAddress, paymentTerminalLocation.contactAddress) && Objects.equals(this.defaultConfiguration, paymentTerminalLocation.defaultConfiguration) && - Objects.equals(this.deliveryAddress, paymentTerminalLocation.deliveryAddress) && Objects.equals(this.id, paymentTerminalLocation.id) && Objects.equals(this.linkedSpaceId, paymentTerminalLocation.linkedSpaceId) && Objects.equals(this.name, paymentTerminalLocation.name) && @@ -191,7 +175,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(contactAddress, defaultConfiguration, deliveryAddress, id, linkedSpaceId, name, plannedPurgeDate, state, version); + return Objects.hash(contactAddress, defaultConfiguration, id, linkedSpaceId, name, plannedPurgeDate, state, version); } @@ -202,7 +186,6 @@ public String toString() { sb.append(" contactAddress: ").append(toIndentedString(contactAddress)).append("\n"); sb.append(" defaultConfiguration: ").append(toIndentedString(defaultConfiguration)).append("\n"); - sb.append(" deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/wallee/sdk/model/Permission.java b/src/main/java/com/wallee/sdk/model/Permission.java index b67bdadd..dd5e6963 100644 --- a/src/main/java/com/wallee/sdk/model/Permission.java +++ b/src/main/java/com/wallee/sdk/model/Permission.java @@ -80,6 +80,10 @@ public class Permission { protected Boolean twoFactorRequired = null; + @JsonProperty("webAppEnabled") + protected Boolean webAppEnabled = null; + + /** * @@ -181,6 +185,16 @@ public Boolean isTwoFactorRequired() { } + /** + * + * @return webAppEnabled + **/ + @ApiModelProperty(value = "") + public Boolean isWebAppEnabled() { + return webAppEnabled; + } + + @Override public boolean equals(java.lang.Object o) { @@ -200,12 +214,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.parent, permission.parent) && Objects.equals(this.pathToRoot, permission.pathToRoot) && Objects.equals(this.title, permission.title) && - Objects.equals(this.twoFactorRequired, permission.twoFactorRequired); + Objects.equals(this.twoFactorRequired, permission.twoFactorRequired) && + Objects.equals(this.webAppEnabled, permission.webAppEnabled); } @Override public int hashCode() { - return Objects.hash(description, feature, group, id, leaf, name, parent, pathToRoot, title, twoFactorRequired); + return Objects.hash(description, feature, group, id, leaf, name, parent, pathToRoot, title, twoFactorRequired, webAppEnabled); } @@ -224,6 +239,7 @@ public String toString() { sb.append(" pathToRoot: ").append(toIndentedString(pathToRoot)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" twoFactorRequired: ").append(toIndentedString(twoFactorRequired)).append("\n"); + sb.append(" webAppEnabled: ").append(toIndentedString(webAppEnabled)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/wallee/sdk/model/RecurringIndicator.java b/src/main/java/com/wallee/sdk/model/RecurringIndicator.java new file mode 100644 index 00000000..134408ae --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/RecurringIndicator.java @@ -0,0 +1,70 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import java.util.*; +import java.time.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * + */ +public enum RecurringIndicator { + + REGULAR_TRANSACTION("REGULAR_TRANSACTION"), + + INITIAL_RECURRING_TRANSACTION("INITIAL_RECURRING_TRANSACTION"), + + MERCHANT_INITIATED_RECURRING_TRANSACTION("MERCHANT_INITIATED_RECURRING_TRANSACTION"), + + CUSTOMER_INITIATED_RECURRING_TRANSACTION("CUSTOMER_INITIATED_RECURRING_TRANSACTION"); + + private String value; + + RecurringIndicator(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RecurringIndicator fromValue(String text) { + for (RecurringIndicator b : RecurringIndicator.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/wallee/sdk/model/RefundBankTransaction.java b/src/main/java/com/wallee/sdk/model/RefundBankTransaction.java new file mode 100644 index 00000000..4364e2e5 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/RefundBankTransaction.java @@ -0,0 +1,201 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransaction; +import com.wallee.sdk.model.TransactionAwareEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class RefundBankTransaction extends TransactionAwareEntity { + + @JsonProperty("bankTransaction") + protected BankTransaction bankTransaction = null; + + + @JsonProperty("language") + protected String language = null; + + + @JsonProperty("refund") + protected Long refund = null; + + + @JsonProperty("refundCurrencyAmount") + protected BigDecimal refundCurrencyAmount = null; + + + @JsonProperty("refundCurrencyValueAmount") + protected BigDecimal refundCurrencyValueAmount = null; + + + @JsonProperty("spaceViewId") + protected Long spaceViewId = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * + * @return bankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getBankTransaction() { + return bankTransaction; + } + + + /** + * + * @return language + **/ + @ApiModelProperty(value = "") + public String getLanguage() { + return language; + } + + + /** + * + * @return refund + **/ + @ApiModelProperty(value = "") + public Long getRefund() { + return refund; + } + + + /** + * Specify the posting amount in the refund's currency. + * @return refundCurrencyAmount + **/ + @ApiModelProperty(value = "Specify the posting amount in the refund's currency.") + public BigDecimal getRefundCurrencyAmount() { + return refundCurrencyAmount; + } + + + /** + * + * @return refundCurrencyValueAmount + **/ + @ApiModelProperty(value = "") + public BigDecimal getRefundCurrencyValueAmount() { + return refundCurrencyValueAmount; + } + + + /** + * + * @return spaceViewId + **/ + @ApiModelProperty(value = "") + public Long getSpaceViewId() { + return spaceViewId; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundBankTransaction refundBankTransaction = (RefundBankTransaction) o; + return Objects.equals(this.id, refundBankTransaction.id) && + Objects.equals(this.linkedSpaceId, refundBankTransaction.linkedSpaceId) && + Objects.equals(this.linkedTransaction, refundBankTransaction.linkedTransaction) && + Objects.equals(this.bankTransaction, refundBankTransaction.bankTransaction) && + Objects.equals(this.language, refundBankTransaction.language) && + Objects.equals(this.refund, refundBankTransaction.refund) && + Objects.equals(this.refundCurrencyAmount, refundBankTransaction.refundCurrencyAmount) && + Objects.equals(this.refundCurrencyValueAmount, refundBankTransaction.refundCurrencyValueAmount) && + Objects.equals(this.spaceViewId, refundBankTransaction.spaceViewId) && + Objects.equals(this.version, refundBankTransaction.version) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, linkedSpaceId, linkedTransaction, bankTransaction, language, refund, refundCurrencyAmount, refundCurrencyValueAmount, spaceViewId, version, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundBankTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" linkedTransaction: ").append(toIndentedString(linkedTransaction)).append("\n"); + sb.append(" bankTransaction: ").append(toIndentedString(bankTransaction)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" refund: ").append(toIndentedString(refund)).append("\n"); + sb.append(" refundCurrencyAmount: ").append(toIndentedString(refundCurrencyAmount)).append("\n"); + sb.append(" refundCurrencyValueAmount: ").append(toIndentedString(refundCurrencyValueAmount)).append("\n"); + sb.append(" spaceViewId: ").append(toIndentedString(spaceViewId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/RefundRecoveryBankTransaction.java b/src/main/java/com/wallee/sdk/model/RefundRecoveryBankTransaction.java new file mode 100644 index 00000000..2777a9d7 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/RefundRecoveryBankTransaction.java @@ -0,0 +1,220 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.BankTransaction; +import com.wallee.sdk.model.LineItem; +import com.wallee.sdk.model.TransactionAwareEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class RefundRecoveryBankTransaction extends TransactionAwareEntity { + + @JsonProperty("bankTransaction") + protected BankTransaction bankTransaction = null; + + + @JsonProperty("language") + protected String language = null; + + + @JsonProperty("lineItems") + protected List lineItems = null; + + + @JsonProperty("refund") + protected Long refund = null; + + + @JsonProperty("refundCurrencyAmount") + protected BigDecimal refundCurrencyAmount = null; + + + @JsonProperty("refundCurrencyValueAmount") + protected BigDecimal refundCurrencyValueAmount = null; + + + @JsonProperty("spaceViewId") + protected Long spaceViewId = null; + + + @JsonProperty("version") + protected Integer version = null; + + + + /** + * + * @return bankTransaction + **/ + @ApiModelProperty(value = "") + public BankTransaction getBankTransaction() { + return bankTransaction; + } + + + /** + * + * @return language + **/ + @ApiModelProperty(value = "") + public String getLanguage() { + return language; + } + + + /** + * The line items contain the items which could be recovered. + * @return lineItems + **/ + @ApiModelProperty(value = "The line items contain the items which could be recovered.") + public List getLineItems() { + return lineItems; + } + + + /** + * + * @return refund + **/ + @ApiModelProperty(value = "") + public Long getRefund() { + return refund; + } + + + /** + * Specify the posting amount in the refund's currency. + * @return refundCurrencyAmount + **/ + @ApiModelProperty(value = "Specify the posting amount in the refund's currency.") + public BigDecimal getRefundCurrencyAmount() { + return refundCurrencyAmount; + } + + + /** + * + * @return refundCurrencyValueAmount + **/ + @ApiModelProperty(value = "") + public BigDecimal getRefundCurrencyValueAmount() { + return refundCurrencyValueAmount; + } + + + /** + * + * @return spaceViewId + **/ + @ApiModelProperty(value = "") + public Long getSpaceViewId() { + return spaceViewId; + } + + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * @return version + **/ + @ApiModelProperty(value = "The version number indicates the version of the entity. The version is incremented whenever the entity is changed.") + public Integer getVersion() { + return version; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundRecoveryBankTransaction refundRecoveryBankTransaction = (RefundRecoveryBankTransaction) o; + return Objects.equals(this.id, refundRecoveryBankTransaction.id) && + Objects.equals(this.linkedSpaceId, refundRecoveryBankTransaction.linkedSpaceId) && + Objects.equals(this.linkedTransaction, refundRecoveryBankTransaction.linkedTransaction) && + Objects.equals(this.bankTransaction, refundRecoveryBankTransaction.bankTransaction) && + Objects.equals(this.language, refundRecoveryBankTransaction.language) && + Objects.equals(this.lineItems, refundRecoveryBankTransaction.lineItems) && + Objects.equals(this.refund, refundRecoveryBankTransaction.refund) && + Objects.equals(this.refundCurrencyAmount, refundRecoveryBankTransaction.refundCurrencyAmount) && + Objects.equals(this.refundCurrencyValueAmount, refundRecoveryBankTransaction.refundCurrencyValueAmount) && + Objects.equals(this.spaceViewId, refundRecoveryBankTransaction.spaceViewId) && + Objects.equals(this.version, refundRecoveryBankTransaction.version) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, linkedSpaceId, linkedTransaction, bankTransaction, language, lineItems, refund, refundCurrencyAmount, refundCurrencyValueAmount, spaceViewId, version, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundRecoveryBankTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); + sb.append(" linkedTransaction: ").append(toIndentedString(linkedTransaction)).append("\n"); + sb.append(" bankTransaction: ").append(toIndentedString(bankTransaction)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); + sb.append(" refund: ").append(toIndentedString(refund)).append("\n"); + sb.append(" refundCurrencyAmount: ").append(toIndentedString(refundCurrencyAmount)).append("\n"); + sb.append(" refundCurrencyValueAmount: ").append(toIndentedString(refundCurrencyValueAmount)).append("\n"); + sb.append(" spaceViewId: ").append(toIndentedString(spaceViewId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/TokenizedCardData.java b/src/main/java/com/wallee/sdk/model/TokenizedCardData.java new file mode 100644 index 00000000..5bb2e3e4 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/TokenizedCardData.java @@ -0,0 +1,129 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardCryptogram; +import com.wallee.sdk.model.RecurringIndicator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * This model holds the card data in plain. + */ +@ApiModel(description = "This model holds the card data in plain.") + +public class TokenizedCardData { + + @JsonProperty("cryptogram") + protected CardCryptogram cryptogram = null; + + + @JsonProperty("recurringIndicator") + protected RecurringIndicator recurringIndicator = null; + + + @JsonProperty("tokenRequestorId") + protected String tokenRequestorId = null; + + + + /** + * The additional authentication value used to secure the tokenized card transactions. + * @return cryptogram + **/ + @ApiModelProperty(value = "The additional authentication value used to secure the tokenized card transactions.") + public CardCryptogram getCryptogram() { + return cryptogram; + } + + + /** + * + * @return recurringIndicator + **/ + @ApiModelProperty(value = "") + public RecurringIndicator getRecurringIndicator() { + return recurringIndicator; + } + + + /** + * + * @return tokenRequestorId + **/ + @ApiModelProperty(value = "") + public String getTokenRequestorId() { + return tokenRequestorId; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenizedCardData tokenizedCardData = (TokenizedCardData) o; + return Objects.equals(this.cryptogram, tokenizedCardData.cryptogram) && + Objects.equals(this.recurringIndicator, tokenizedCardData.recurringIndicator) && + Objects.equals(this.tokenRequestorId, tokenizedCardData.tokenRequestorId); + } + + @Override + public int hashCode() { + return Objects.hash(cryptogram, recurringIndicator, tokenRequestorId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenizedCardData {\n"); + + sb.append(" cryptogram: ").append(toIndentedString(cryptogram)).append("\n"); + sb.append(" recurringIndicator: ").append(toIndentedString(recurringIndicator)).append("\n"); + sb.append(" tokenRequestorId: ").append(toIndentedString(tokenRequestorId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/UnencryptedCardDataCreate.java b/src/main/java/com/wallee/sdk/model/TokenizedCardDataCreate.java similarity index 60% rename from src/main/java/com/wallee/sdk/model/UnencryptedCardDataCreate.java rename to src/main/java/com/wallee/sdk/model/TokenizedCardDataCreate.java index a416cc9c..1c8ee200 100644 --- a/src/main/java/com/wallee/sdk/model/UnencryptedCardDataCreate.java +++ b/src/main/java/com/wallee/sdk/model/TokenizedCardDataCreate.java @@ -24,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.CardCryptogramCreate; +import com.wallee.sdk.model.RecurringIndicator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.*; @@ -34,7 +36,7 @@ */ @ApiModel(description = "This model holds the card data in plain.") -public class UnencryptedCardDataCreate { +public class TokenizedCardDataCreate { @JsonProperty("cardHolderName") protected String cardHolderName = null; @@ -44,6 +46,10 @@ public class UnencryptedCardDataCreate { protected String cardVerificationCode = null; + @JsonProperty("cryptogram") + protected CardCryptogramCreate cryptogram = null; + + @JsonProperty("expiryDate") protected String expiryDate = null; @@ -52,8 +58,16 @@ public class UnencryptedCardDataCreate { protected String primaryAccountNumber = null; + @JsonProperty("recurringIndicator") + protected RecurringIndicator recurringIndicator = null; + + + @JsonProperty("tokenRequestorId") + protected String tokenRequestorId = null; + - public UnencryptedCardDataCreate cardHolderName(String cardHolderName) { + + public TokenizedCardDataCreate cardHolderName(String cardHolderName) { this.cardHolderName = cardHolderName; return this; } @@ -72,7 +86,7 @@ public void setCardHolderName(String cardHolderName) { } - public UnencryptedCardDataCreate cardVerificationCode(String cardVerificationCode) { + public TokenizedCardDataCreate cardVerificationCode(String cardVerificationCode) { this.cardVerificationCode = cardVerificationCode; return this; } @@ -91,7 +105,26 @@ public void setCardVerificationCode(String cardVerificationCode) { } - public UnencryptedCardDataCreate expiryDate(String expiryDate) { + public TokenizedCardDataCreate cryptogram(CardCryptogramCreate cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The additional authentication value used to secure the tokenized card transactions. + * @return cryptogram + **/ + @ApiModelProperty(value = "The additional authentication value used to secure the tokenized card transactions.") + public CardCryptogramCreate getCryptogram() { + return cryptogram; + } + + public void setCryptogram(CardCryptogramCreate cryptogram) { + this.cryptogram = cryptogram; + } + + + public TokenizedCardDataCreate expiryDate(String expiryDate) { this.expiryDate = expiryDate; return this; } @@ -110,7 +143,7 @@ public void setExpiryDate(String expiryDate) { } - public UnencryptedCardDataCreate primaryAccountNumber(String primaryAccountNumber) { + public TokenizedCardDataCreate primaryAccountNumber(String primaryAccountNumber) { this.primaryAccountNumber = primaryAccountNumber; return this; } @@ -129,6 +162,44 @@ public void setPrimaryAccountNumber(String primaryAccountNumber) { } + public TokenizedCardDataCreate recurringIndicator(RecurringIndicator recurringIndicator) { + this.recurringIndicator = recurringIndicator; + return this; + } + + /** + * + * @return recurringIndicator + **/ + @ApiModelProperty(value = "") + public RecurringIndicator getRecurringIndicator() { + return recurringIndicator; + } + + public void setRecurringIndicator(RecurringIndicator recurringIndicator) { + this.recurringIndicator = recurringIndicator; + } + + + public TokenizedCardDataCreate tokenRequestorId(String tokenRequestorId) { + this.tokenRequestorId = tokenRequestorId; + return this; + } + + /** + * + * @return tokenRequestorId + **/ + @ApiModelProperty(value = "") + public String getTokenRequestorId() { + return tokenRequestorId; + } + + public void setTokenRequestorId(String tokenRequestorId) { + this.tokenRequestorId = tokenRequestorId; + } + + @Override public boolean equals(java.lang.Object o) { @@ -138,28 +209,34 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UnencryptedCardDataCreate unencryptedCardDataCreate = (UnencryptedCardDataCreate) o; - return Objects.equals(this.cardHolderName, unencryptedCardDataCreate.cardHolderName) && - Objects.equals(this.cardVerificationCode, unencryptedCardDataCreate.cardVerificationCode) && - Objects.equals(this.expiryDate, unencryptedCardDataCreate.expiryDate) && - Objects.equals(this.primaryAccountNumber, unencryptedCardDataCreate.primaryAccountNumber); + TokenizedCardDataCreate tokenizedCardDataCreate = (TokenizedCardDataCreate) o; + return Objects.equals(this.cardHolderName, tokenizedCardDataCreate.cardHolderName) && + Objects.equals(this.cardVerificationCode, tokenizedCardDataCreate.cardVerificationCode) && + Objects.equals(this.cryptogram, tokenizedCardDataCreate.cryptogram) && + Objects.equals(this.expiryDate, tokenizedCardDataCreate.expiryDate) && + Objects.equals(this.primaryAccountNumber, tokenizedCardDataCreate.primaryAccountNumber) && + Objects.equals(this.recurringIndicator, tokenizedCardDataCreate.recurringIndicator) && + Objects.equals(this.tokenRequestorId, tokenizedCardDataCreate.tokenRequestorId); } @Override public int hashCode() { - return Objects.hash(cardHolderName, cardVerificationCode, expiryDate, primaryAccountNumber); + return Objects.hash(cardHolderName, cardVerificationCode, cryptogram, expiryDate, primaryAccountNumber, recurringIndicator, tokenRequestorId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UnencryptedCardDataCreate {\n"); + sb.append("class TokenizedCardDataCreate {\n"); sb.append(" cardHolderName: ").append(toIndentedString(cardHolderName)).append("\n"); sb.append(" cardVerificationCode: ").append(toIndentedString(cardVerificationCode)).append("\n"); + sb.append(" cryptogram: ").append(toIndentedString(cryptogram)).append("\n"); sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); sb.append(" primaryAccountNumber: ").append(toIndentedString(primaryAccountNumber)).append("\n"); + sb.append(" recurringIndicator: ").append(toIndentedString(recurringIndicator)).append("\n"); + sb.append(" tokenRequestorId: ").append(toIndentedString(tokenRequestorId)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/wallee/sdk/model/Transaction.java b/src/main/java/com/wallee/sdk/model/Transaction.java index af2930df..8b118928 100644 --- a/src/main/java/com/wallee/sdk/model/Transaction.java +++ b/src/main/java/com/wallee/sdk/model/Transaction.java @@ -210,6 +210,10 @@ public class Transaction { protected String invoiceMerchantReference = null; + @JsonProperty("javaEnabled") + protected Boolean javaEnabled = null; + + @JsonProperty("language") protected String language = null; @@ -250,6 +254,18 @@ public class Transaction { protected BigDecimal refundedAmount = null; + @JsonProperty("screenColorDepth") + protected String screenColorDepth = null; + + + @JsonProperty("screenHeight") + protected String screenHeight = null; + + + @JsonProperty("screenWidth") + protected String screenWidth = null; + + @JsonProperty("shippingAddress") protected Address shippingAddress = null; @@ -310,6 +326,14 @@ public class Transaction { protected Integer version = null; + @JsonProperty("windowHeight") + protected String windowHeight = null; + + + @JsonProperty("windowWidth") + protected String windowWidth = null; + + /** * @@ -691,6 +715,16 @@ public String getInvoiceMerchantReference() { } + /** + * + * @return javaEnabled + **/ + @ApiModelProperty(value = "") + public Boolean isJavaEnabled() { + return javaEnabled; + } + + /** * * @return language @@ -791,6 +825,36 @@ public BigDecimal getRefundedAmount() { } + /** + * + * @return screenColorDepth + **/ + @ApiModelProperty(value = "") + public String getScreenColorDepth() { + return screenColorDepth; + } + + + /** + * + * @return screenHeight + **/ + @ApiModelProperty(value = "") + public String getScreenHeight() { + return screenHeight; + } + + + /** + * + * @return screenWidth + **/ + @ApiModelProperty(value = "") + public String getScreenWidth() { + return screenWidth; + } + + /** * * @return shippingAddress @@ -941,6 +1005,26 @@ public Integer getVersion() { } + /** + * + * @return windowHeight + **/ + @ApiModelProperty(value = "") + public String getWindowHeight() { + return windowHeight; + } + + + /** + * + * @return windowWidth + **/ + @ApiModelProperty(value = "") + public String getWindowWidth() { + return windowWidth; + } + + @Override public boolean equals(java.lang.Object o) { @@ -989,6 +1073,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.internetProtocolAddress, transaction.internetProtocolAddress) && Objects.equals(this.internetProtocolAddressCountry, transaction.internetProtocolAddressCountry) && Objects.equals(this.invoiceMerchantReference, transaction.invoiceMerchantReference) && + Objects.equals(this.javaEnabled, transaction.javaEnabled) && Objects.equals(this.language, transaction.language) && Objects.equals(this.lineItems, transaction.lineItems) && Objects.equals(this.linkedSpaceId, transaction.linkedSpaceId) && @@ -999,6 +1084,9 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.plannedPurgeDate, transaction.plannedPurgeDate) && Objects.equals(this.processingOn, transaction.processingOn) && Objects.equals(this.refundedAmount, transaction.refundedAmount) && + Objects.equals(this.screenColorDepth, transaction.screenColorDepth) && + Objects.equals(this.screenHeight, transaction.screenHeight) && + Objects.equals(this.screenWidth, transaction.screenWidth) && Objects.equals(this.shippingAddress, transaction.shippingAddress) && Objects.equals(this.shippingMethod, transaction.shippingMethod) && Objects.equals(this.spaceViewId, transaction.spaceViewId) && @@ -1013,12 +1101,14 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.userAgentHeader, transaction.userAgentHeader) && Objects.equals(this.userFailureMessage, transaction.userFailureMessage) && Objects.equals(this.userInterfaceType, transaction.userInterfaceType) && - Objects.equals(this.version, transaction.version); + Objects.equals(this.version, transaction.version) && + Objects.equals(this.windowHeight, transaction.windowHeight) && + Objects.equals(this.windowWidth, transaction.windowWidth); } @Override public int hashCode() { - return Objects.hash(acceptHeader, acceptLanguageHeader, allowedPaymentMethodBrands, allowedPaymentMethodConfigurations, authorizationAmount, authorizationEnvironment, authorizationSalesChannel, authorizationTimeoutOn, authorizedOn, autoConfirmationEnabled, billingAddress, chargeRetryEnabled, completedAmount, completedOn, completionBehavior, completionTimeoutOn, confirmedBy, confirmedOn, createdBy, createdOn, currency, customerEmailAddress, customerId, customersPresence, deliveryDecisionMadeOn, deviceSessionIdentifier, emailsDisabled, endOfLife, environment, environmentSelectionStrategy, failedOn, failedUrl, failureReason, group, id, internetProtocolAddress, internetProtocolAddressCountry, invoiceMerchantReference, language, lineItems, linkedSpaceId, merchantReference, metaData, parent, paymentConnectorConfiguration, plannedPurgeDate, processingOn, refundedAmount, shippingAddress, shippingMethod, spaceViewId, state, successUrl, terminal, timeZone, token, tokenizationMode, totalAppliedFees, totalSettledAmount, userAgentHeader, userFailureMessage, userInterfaceType, version); + return Objects.hash(acceptHeader, acceptLanguageHeader, allowedPaymentMethodBrands, allowedPaymentMethodConfigurations, authorizationAmount, authorizationEnvironment, authorizationSalesChannel, authorizationTimeoutOn, authorizedOn, autoConfirmationEnabled, billingAddress, chargeRetryEnabled, completedAmount, completedOn, completionBehavior, completionTimeoutOn, confirmedBy, confirmedOn, createdBy, createdOn, currency, customerEmailAddress, customerId, customersPresence, deliveryDecisionMadeOn, deviceSessionIdentifier, emailsDisabled, endOfLife, environment, environmentSelectionStrategy, failedOn, failedUrl, failureReason, group, id, internetProtocolAddress, internetProtocolAddressCountry, invoiceMerchantReference, javaEnabled, language, lineItems, linkedSpaceId, merchantReference, metaData, parent, paymentConnectorConfiguration, plannedPurgeDate, processingOn, refundedAmount, screenColorDepth, screenHeight, screenWidth, shippingAddress, shippingMethod, spaceViewId, state, successUrl, terminal, timeZone, token, tokenizationMode, totalAppliedFees, totalSettledAmount, userAgentHeader, userFailureMessage, userInterfaceType, version, windowHeight, windowWidth); } @@ -1065,6 +1155,7 @@ public String toString() { sb.append(" internetProtocolAddress: ").append(toIndentedString(internetProtocolAddress)).append("\n"); sb.append(" internetProtocolAddressCountry: ").append(toIndentedString(internetProtocolAddressCountry)).append("\n"); sb.append(" invoiceMerchantReference: ").append(toIndentedString(invoiceMerchantReference)).append("\n"); + sb.append(" javaEnabled: ").append(toIndentedString(javaEnabled)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); @@ -1075,6 +1166,9 @@ public String toString() { sb.append(" plannedPurgeDate: ").append(toIndentedString(plannedPurgeDate)).append("\n"); sb.append(" processingOn: ").append(toIndentedString(processingOn)).append("\n"); sb.append(" refundedAmount: ").append(toIndentedString(refundedAmount)).append("\n"); + sb.append(" screenColorDepth: ").append(toIndentedString(screenColorDepth)).append("\n"); + sb.append(" screenHeight: ").append(toIndentedString(screenHeight)).append("\n"); + sb.append(" screenWidth: ").append(toIndentedString(screenWidth)).append("\n"); sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); sb.append(" shippingMethod: ").append(toIndentedString(shippingMethod)).append("\n"); sb.append(" spaceViewId: ").append(toIndentedString(spaceViewId)).append("\n"); @@ -1090,6 +1184,8 @@ public String toString() { sb.append(" userFailureMessage: ").append(toIndentedString(userFailureMessage)).append("\n"); sb.append(" userInterfaceType: ").append(toIndentedString(userInterfaceType)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" windowHeight: ").append(toIndentedString(windowHeight)).append("\n"); + sb.append(" windowWidth: ").append(toIndentedString(windowWidth)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/wallee/sdk/model/UnencryptedCardData.java b/src/main/java/com/wallee/sdk/model/UnencryptedCardData.java deleted file mode 100644 index 420f80a9..00000000 --- a/src/main/java/com/wallee/sdk/model/UnencryptedCardData.java +++ /dev/null @@ -1,143 +0,0 @@ -/** -* wallee SDK -* -* This library allows to interact with the wallee payment service. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - - -package com.wallee.sdk.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.*; -import java.time.OffsetDateTime; - -/** - * This model holds the card data in plain. - */ -@ApiModel(description = "This model holds the card data in plain.") - -public class UnencryptedCardData { - - @JsonProperty("cardHolderName") - protected String cardHolderName = null; - - - @JsonProperty("cardVerificationCode") - protected String cardVerificationCode = null; - - - @JsonProperty("expiryDate") - protected String expiryDate = null; - - - @JsonProperty("primaryAccountNumber") - protected String primaryAccountNumber = null; - - - - /** - * The card holder name is the name printed onto the card. It identifies the person who owns the card. - * @return cardHolderName - **/ - @ApiModelProperty(value = "The card holder name is the name printed onto the card. It identifies the person who owns the card.") - public String getCardHolderName() { - return cardHolderName; - } - - - /** - * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. - * @return cardVerificationCode - **/ - @ApiModelProperty(value = "The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional.") - public String getCardVerificationCode() { - return cardVerificationCode; - } - - - /** - * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). - * @return expiryDate - **/ - @ApiModelProperty(value = "The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09).") - public String getExpiryDate() { - return expiryDate; - } - - - /** - * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. - * @return primaryAccountNumber - **/ - @ApiModelProperty(value = "The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card.") - public String getPrimaryAccountNumber() { - return primaryAccountNumber; - } - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnencryptedCardData unencryptedCardData = (UnencryptedCardData) o; - return Objects.equals(this.cardHolderName, unencryptedCardData.cardHolderName) && - Objects.equals(this.cardVerificationCode, unencryptedCardData.cardVerificationCode) && - Objects.equals(this.expiryDate, unencryptedCardData.expiryDate) && - Objects.equals(this.primaryAccountNumber, unencryptedCardData.primaryAccountNumber); - } - - @Override - public int hashCode() { - return Objects.hash(cardHolderName, cardVerificationCode, expiryDate, primaryAccountNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnencryptedCardData {\n"); - - sb.append(" cardHolderName: ").append(toIndentedString(cardHolderName)).append("\n"); - sb.append(" cardVerificationCode: ").append(toIndentedString(cardVerificationCode)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append(" primaryAccountNumber: ").append(toIndentedString(primaryAccountNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/wallee/sdk/model/WebAppConfirmationRequest.java b/src/main/java/com/wallee/sdk/model/WebAppConfirmationRequest.java new file mode 100644 index 00000000..3f9c95b5 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/WebAppConfirmationRequest.java @@ -0,0 +1,95 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * + */ +@ApiModel(description = "") + +public class WebAppConfirmationRequest { + + @JsonProperty("code") + protected String code = null; + + + + /** + * The user returns to the web app after granting the permission. The HTTP request contains the code. Provide it here to confirm the web app installation. + * @return code + **/ + @ApiModelProperty(value = "The user returns to the web app after granting the permission. The HTTP request contains the code. Provide it here to confirm the web app installation.") + public String getCode() { + return code; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebAppConfirmationRequest webAppConfirmationRequest = (WebAppConfirmationRequest) o; + return Objects.equals(this.code, webAppConfirmationRequest.code); + } + + @Override + public int hashCode() { + return Objects.hash(code); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebAppConfirmationRequest {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/WebAppConfirmationResponse.java b/src/main/java/com/wallee/sdk/model/WebAppConfirmationResponse.java new file mode 100644 index 00000000..e1c54326 --- /dev/null +++ b/src/main/java/com/wallee/sdk/model/WebAppConfirmationResponse.java @@ -0,0 +1,160 @@ +/** +* wallee SDK +* +* This library allows to interact with the wallee payment service. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +package com.wallee.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.wallee.sdk.model.Space; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.*; +import java.time.OffsetDateTime; + +/** + * The confirmation response provides the details about the installation of the web app. + */ +@ApiModel(description = "The confirmation response provides the details about the installation of the web app.") + +public class WebAppConfirmationResponse { + + @JsonProperty("access_token") + protected String accessToken = null; + + + @JsonProperty("scope") + protected String scope = null; + + + @JsonProperty("space") + protected Space space = null; + + + @JsonProperty("state") + protected String state = null; + + + @JsonProperty("token_type") + protected String tokenType = null; + + + + /** + * The access code grants permissions to the web service API according to the OAuth standard. + * @return accessToken + **/ + @ApiModelProperty(value = "The access code grants permissions to the web service API according to the OAuth standard.") + public String getAccessToken() { + return accessToken; + } + + + /** + * The scope contains the permissions granted to the web app within the space. + * @return scope + **/ + @ApiModelProperty(value = "The scope contains the permissions granted to the web app within the space.") + public String getScope() { + return scope; + } + + + /** + * This is the space into which the web app is installed into. + * @return space + **/ + @ApiModelProperty(value = "This is the space into which the web app is installed into.") + public Space getSpace() { + return space; + } + + + /** + * The state contains the state parameter content provided when initiating the app installation. + * @return state + **/ + @ApiModelProperty(value = "The state contains the state parameter content provided when initiating the app installation.") + public String getState() { + return state; + } + + + /** + * The token type indicates the type of the access token. The type determines the authentication mechanism to use for accessing the web service API. + * @return tokenType + **/ + @ApiModelProperty(value = "The token type indicates the type of the access token. The type determines the authentication mechanism to use for accessing the web service API.") + public String getTokenType() { + return tokenType; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebAppConfirmationResponse webAppConfirmationResponse = (WebAppConfirmationResponse) o; + return Objects.equals(this.accessToken, webAppConfirmationResponse.accessToken) && + Objects.equals(this.scope, webAppConfirmationResponse.scope) && + Objects.equals(this.space, webAppConfirmationResponse.space) && + Objects.equals(this.state, webAppConfirmationResponse.state) && + Objects.equals(this.tokenType, webAppConfirmationResponse.tokenType); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, scope, space, state, tokenType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebAppConfirmationResponse {\n"); + + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" space: ").append(toIndentedString(space)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/wallee/sdk/model/WebhookUrl.java b/src/main/java/com/wallee/sdk/model/WebhookUrl.java index 90078d08..d1c65155 100644 --- a/src/main/java/com/wallee/sdk/model/WebhookUrl.java +++ b/src/main/java/com/wallee/sdk/model/WebhookUrl.java @@ -38,6 +38,10 @@ public class WebhookUrl { + @JsonProperty("applicationManaged") + protected Boolean applicationManaged = null; + + @JsonProperty("id") protected Long id = null; @@ -67,6 +71,16 @@ public class WebhookUrl { + /** + * The webhook URL is managed by the application and cannot be changed via the user interface. + * @return applicationManaged + **/ + @ApiModelProperty(value = "The webhook URL is managed by the application and cannot be changed via the user interface.") + public Boolean isApplicationManaged() { + return applicationManaged; + } + + /** * The ID is the primary key of the entity. The ID identifies the entity uniquely. * @return id @@ -147,7 +161,8 @@ public boolean equals(java.lang.Object o) { return false; } WebhookUrl webhookUrl = (WebhookUrl) o; - return Objects.equals(this.id, webhookUrl.id) && + return Objects.equals(this.applicationManaged, webhookUrl.applicationManaged) && + Objects.equals(this.id, webhookUrl.id) && Objects.equals(this.linkedSpaceId, webhookUrl.linkedSpaceId) && Objects.equals(this.name, webhookUrl.name) && Objects.equals(this.plannedPurgeDate, webhookUrl.plannedPurgeDate) && @@ -158,7 +173,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, linkedSpaceId, name, plannedPurgeDate, state, url, version); + return Objects.hash(applicationManaged, id, linkedSpaceId, name, plannedPurgeDate, state, url, version); } @@ -167,6 +182,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WebhookUrl {\n"); + sb.append(" applicationManaged: ").append(toIndentedString(applicationManaged)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" linkedSpaceId: ").append(toIndentedString(linkedSpaceId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/wallee/sdk/service/CardProcessingService.java b/src/main/java/com/wallee/sdk/service/CardProcessingService.java index 0c852051..28220262 100644 --- a/src/main/java/com/wallee/sdk/service/CardProcessingService.java +++ b/src/main/java/com/wallee/sdk/service/CardProcessingService.java @@ -2,10 +2,11 @@ import com.wallee.sdk.ApiClient; +import com.wallee.sdk.model.AuthenticatedCardDataCreate; import com.wallee.sdk.model.ClientError; import com.wallee.sdk.model.ServerError; +import com.wallee.sdk.model.TokenizedCardDataCreate; import com.wallee.sdk.model.Transaction; -import com.wallee.sdk.model.UnencryptedCardDataCreate; import com.fasterxml.jackson.core.type.TypeReference; import com.google.api.client.http.*; @@ -52,7 +53,7 @@ public void setApiClient(ApiClient apiClient) { * @see Process Documentation **/ - public Transaction process(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData) throws IOException { + public Transaction process(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, AuthenticatedCardDataCreate cardData) throws IOException { HttpResponse response = processForHttpResponse(spaceId, transactionId, paymentMethodConfigurationId, cardData); String returnType = "Transaction"; if(returnType.equals("String")){ @@ -80,7 +81,7 @@ public Transaction process(Long spaceId, Long transactionId, Long paymentMethodC * @see Process Documentation **/ - public Transaction process(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData, Map params) throws IOException { + public Transaction process(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, AuthenticatedCardDataCreate cardData, Map params) throws IOException { HttpResponse response = processForHttpResponse(spaceId, transactionId, paymentMethodConfigurationId, cardData, params); String returnType = "Transaction"; if(returnType.equals("String")){ @@ -90,7 +91,7 @@ public Transaction process(Long spaceId, Long transactionId, Long paymentMethodC return (Transaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } - public HttpResponse processForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData) throws IOException { + public HttpResponse processForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, AuthenticatedCardDataCreate cardData) throws IOException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling process"); @@ -207,7 +208,7 @@ apiClient.new JacksonJsonHttpContent(null) : return httpRequest.execute(); } - public HttpResponse processForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData, Map params) throws IOException { + public HttpResponse processForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, AuthenticatedCardDataCreate cardData, Map params) throws IOException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling process"); @@ -275,7 +276,7 @@ public HttpResponse processForHttpResponse(Long spaceId, Long transactionId, Lon * @see Process With 3-D Secure Documentation **/ - public String processWith3DSecure(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData) throws IOException { + public String processWith3DSecure(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, TokenizedCardDataCreate cardData) throws IOException { HttpResponse response = processWith3DSecureForHttpResponse(spaceId, transactionId, paymentMethodConfigurationId, cardData); String returnType = "String"; if(returnType.equals("String")){ @@ -303,7 +304,7 @@ public String processWith3DSecure(Long spaceId, Long transactionId, Long payment * @see Process With 3-D Secure Documentation **/ - public String processWith3DSecure(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData, Map params) throws IOException { + public String processWith3DSecure(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, TokenizedCardDataCreate cardData, Map params) throws IOException { HttpResponse response = processWith3DSecureForHttpResponse(spaceId, transactionId, paymentMethodConfigurationId, cardData, params); String returnType = "String"; if(returnType.equals("String")){ @@ -313,7 +314,7 @@ public String processWith3DSecure(Long spaceId, Long transactionId, Long payment return (String)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } - public HttpResponse processWith3DSecureForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData) throws IOException { + public HttpResponse processWith3DSecureForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, TokenizedCardDataCreate cardData) throws IOException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling processWith3DSecure"); @@ -430,7 +431,7 @@ apiClient.new JacksonJsonHttpContent(null) : return httpRequest.execute(); } - public HttpResponse processWith3DSecureForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, UnencryptedCardDataCreate cardData, Map params) throws IOException { + public HttpResponse processWith3DSecureForHttpResponse(Long spaceId, Long transactionId, Long paymentMethodConfigurationId, TokenizedCardDataCreate cardData, Map params) throws IOException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling processWith3DSecure"); diff --git a/src/main/java/com/wallee/sdk/service/ChargeBankTransactionService.java b/src/main/java/com/wallee/sdk/service/ChargeBankTransactionService.java new file mode 100644 index 00000000..bb1d61c3 --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/ChargeBankTransactionService.java @@ -0,0 +1,473 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ChargeBankTransaction; +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.EntityQuery; +import com.wallee.sdk.model.EntityQueryFilter; +import com.wallee.sdk.model.ServerError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class ChargeBankTransactionService { + private ApiClient apiClient; + + public ChargeBankTransactionService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 filter The filter which restricts the entities which are used to calculate the count. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(Long spaceId, EntityQueryFilter filter) throws IOException { + HttpResponse response = countForHttpResponse(spaceId, filter); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + HttpResponse response = countForHttpResponse(filter, spaceId, params); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(Long spaceId, java.io.InputStream filter, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = filter == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/count"); + + // 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); + + 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(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the charge bank transaction which should be returned. + * @return ChargeBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public ChargeBankTransaction read(Long spaceId, Long id) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id); + String returnType = "ChargeBankTransaction"; + if(returnType.equals("String")){ + return (ChargeBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (ChargeBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the charge bank transaction which should be returned. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return ChargeBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public ChargeBankTransaction read(Long spaceId, Long id, Map params) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id, params); + String returnType = "ChargeBankTransaction"; + if(returnType.equals("String")){ + return (ChargeBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (ChargeBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/read"); + 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 (id != null) { + String key = "id"; + Object value = id; + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/read"); + + // 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 'id' to the map of query params + allParams.put("id", id); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the charge bank transactions which are returned by the search. + * @return List<ChargeBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query); + String returnType = "List<ChargeBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the charge bank transactions which are returned by the search. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return List<ChargeBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query, Map params) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query, params); + String returnType = "List<ChargeBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, java.io.InputStream query, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = query == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/charge-bank-transaction/search"); + + // 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); + + 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(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + +} diff --git a/src/main/java/com/wallee/sdk/service/ExternalTransferBankTransactionService.java b/src/main/java/com/wallee/sdk/service/ExternalTransferBankTransactionService.java new file mode 100644 index 00000000..376d26a7 --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/ExternalTransferBankTransactionService.java @@ -0,0 +1,473 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.EntityQuery; +import com.wallee.sdk.model.EntityQueryFilter; +import com.wallee.sdk.model.ExternalTransferBankTransaction; +import com.wallee.sdk.model.ServerError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class ExternalTransferBankTransactionService { + private ApiClient apiClient; + + public ExternalTransferBankTransactionService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 filter The filter which restricts the entities which are used to calculate the count. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(Long spaceId, EntityQueryFilter filter) throws IOException { + HttpResponse response = countForHttpResponse(spaceId, filter); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + HttpResponse response = countForHttpResponse(filter, spaceId, params); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(Long spaceId, java.io.InputStream filter, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = filter == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/count"); + + // 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); + + 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(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the external transfer bank transaction which should be returned. + * @return ExternalTransferBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public ExternalTransferBankTransaction read(Long spaceId, Long id) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id); + String returnType = "ExternalTransferBankTransaction"; + if(returnType.equals("String")){ + return (ExternalTransferBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (ExternalTransferBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the external transfer bank transaction which should be returned. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return ExternalTransferBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public ExternalTransferBankTransaction read(Long spaceId, Long id, Map params) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id, params); + String returnType = "ExternalTransferBankTransaction"; + if(returnType.equals("String")){ + return (ExternalTransferBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (ExternalTransferBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/read"); + 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 (id != null) { + String key = "id"; + Object value = id; + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/read"); + + // 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 'id' to the map of query params + allParams.put("id", id); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the external transfer bank transactions which are returned by the search. + * @return List<ExternalTransferBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query); + String returnType = "List<ExternalTransferBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the external transfer bank transactions which are returned by the search. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return List<ExternalTransferBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query, Map params) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query, params); + String returnType = "List<ExternalTransferBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, java.io.InputStream query, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = query == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/external-transfer-bank-transaction/search"); + + // 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); + + 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(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + +} diff --git a/src/main/java/com/wallee/sdk/service/InternalTransferBankTransactionService.java b/src/main/java/com/wallee/sdk/service/InternalTransferBankTransactionService.java new file mode 100644 index 00000000..98c3b9ea --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/InternalTransferBankTransactionService.java @@ -0,0 +1,473 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.EntityQuery; +import com.wallee.sdk.model.EntityQueryFilter; +import com.wallee.sdk.model.InternalTransferBankTransaction; +import com.wallee.sdk.model.ServerError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class InternalTransferBankTransactionService { + private ApiClient apiClient; + + public InternalTransferBankTransactionService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 filter The filter which restricts the entities which are used to calculate the count. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(Long spaceId, EntityQueryFilter filter) throws IOException { + HttpResponse response = countForHttpResponse(spaceId, filter); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + HttpResponse response = countForHttpResponse(filter, spaceId, params); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(Long spaceId, java.io.InputStream filter, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = filter == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/count"); + + // 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); + + 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(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the internal transfer bank transaction which should be returned. + * @return InternalTransferBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public InternalTransferBankTransaction read(Long spaceId, Long id) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id); + String returnType = "InternalTransferBankTransaction"; + if(returnType.equals("String")){ + return (InternalTransferBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (InternalTransferBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the internal transfer bank transaction which should be returned. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return InternalTransferBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public InternalTransferBankTransaction read(Long spaceId, Long id, Map params) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id, params); + String returnType = "InternalTransferBankTransaction"; + if(returnType.equals("String")){ + return (InternalTransferBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (InternalTransferBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/read"); + 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 (id != null) { + String key = "id"; + Object value = id; + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/read"); + + // 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 'id' to the map of query params + allParams.put("id", id); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the internal transfer bank transactions which are returned by the search. + * @return List<InternalTransferBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query); + String returnType = "List<InternalTransferBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the internal transfer bank transactions which are returned by the search. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return List<InternalTransferBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query, Map params) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query, params); + String returnType = "List<InternalTransferBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, java.io.InputStream query, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = query == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/internal-transfer-bank-transaction/search"); + + // 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); + + 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(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + +} diff --git a/src/main/java/com/wallee/sdk/service/RefundBankTransactionService.java b/src/main/java/com/wallee/sdk/service/RefundBankTransactionService.java new file mode 100644 index 00000000..413d820b --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/RefundBankTransactionService.java @@ -0,0 +1,473 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.EntityQuery; +import com.wallee.sdk.model.EntityQueryFilter; +import com.wallee.sdk.model.RefundBankTransaction; +import com.wallee.sdk.model.ServerError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class RefundBankTransactionService { + private ApiClient apiClient; + + public RefundBankTransactionService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 filter The filter which restricts the entities which are used to calculate the count. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(Long spaceId, EntityQueryFilter filter) throws IOException { + HttpResponse response = countForHttpResponse(spaceId, filter); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + HttpResponse response = countForHttpResponse(filter, spaceId, params); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(Long spaceId, java.io.InputStream filter, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = filter == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/count"); + + // 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); + + 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(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the refund bank transaction which should be returned. + * @return RefundBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public RefundBankTransaction read(Long spaceId, Long id) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id); + String returnType = "RefundBankTransaction"; + if(returnType.equals("String")){ + return (RefundBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (RefundBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the refund bank transaction which should be returned. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return RefundBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public RefundBankTransaction read(Long spaceId, Long id, Map params) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id, params); + String returnType = "RefundBankTransaction"; + if(returnType.equals("String")){ + return (RefundBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (RefundBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/read"); + 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 (id != null) { + String key = "id"; + Object value = id; + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/read"); + + // 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 'id' to the map of query params + allParams.put("id", id); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the refund bank transactions which are returned by the search. + * @return List<RefundBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query); + String returnType = "List<RefundBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the refund bank transactions which are returned by the search. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return List<RefundBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query, Map params) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query, params); + String returnType = "List<RefundBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, java.io.InputStream query, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = query == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-bank-transaction/search"); + + // 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); + + 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(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + +} diff --git a/src/main/java/com/wallee/sdk/service/RefundRecoveryBankTransactionService.java b/src/main/java/com/wallee/sdk/service/RefundRecoveryBankTransactionService.java new file mode 100644 index 00000000..47ad8289 --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/RefundRecoveryBankTransactionService.java @@ -0,0 +1,473 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.EntityQuery; +import com.wallee.sdk.model.EntityQueryFilter; +import com.wallee.sdk.model.RefundRecoveryBankTransaction; +import com.wallee.sdk.model.ServerError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class RefundRecoveryBankTransactionService { + private ApiClient apiClient; + + public RefundRecoveryBankTransactionService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 filter The filter which restricts the entities which are used to calculate the count. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(Long spaceId, EntityQueryFilter filter) throws IOException { + HttpResponse response = countForHttpResponse(spaceId, filter); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Count + * Counts the number of items in the database as restricted by the given filter. + *

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 params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return Long + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Count Documentation + + **/ + public Long count(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + HttpResponse response = countForHttpResponse(filter, spaceId, params); + String returnType = "Long"; + if(returnType.equals("String")){ + return (Long) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (Long)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse countForHttpResponse(Long spaceId, EntityQueryFilter filter) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(Long spaceId, java.io.InputStream filter, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/count"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = filter == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse countForHttpResponse(EntityQueryFilter filter, Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling count"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/count"); + + // 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); + + 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(filter); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the refund recovery bank transaction which should be returned. + * @return RefundRecoveryBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public RefundRecoveryBankTransaction read(Long spaceId, Long id) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id); + String returnType = "RefundRecoveryBankTransaction"; + if(returnType.equals("String")){ + return (RefundRecoveryBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (RefundRecoveryBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Read + * Reads the entity with the given 'id' and returns 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 id The ID of the refund recovery bank transaction which should be returned. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return RefundRecoveryBankTransaction + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Read Documentation + + **/ + public RefundRecoveryBankTransaction read(Long spaceId, Long id, Map params) throws IOException { + HttpResponse response = readForHttpResponse(spaceId, id, params); + String returnType = "RefundRecoveryBankTransaction"; + if(returnType.equals("String")){ + return (RefundRecoveryBankTransaction) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (RefundRecoveryBankTransaction)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/read"); + 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 (id != null) { + String key = "id"; + Object value = id; + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse readForHttpResponse(Long spaceId, Long id, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling read"); + }// verify the required parameter 'id' is set + if (id == null) { + throw new IllegalArgumentException("Missing the required parameter 'id' when calling read"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/read"); + + // 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 'id' to the map of query params + allParams.put("id", id); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + httpRequest.getHeaders().setContentType("*/*"); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the refund recovery bank transactions which are returned by the search. + * @return List<RefundRecoveryBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query); + String returnType = "List<RefundRecoveryBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Search + * Searches for the entities as specified by the given query. + *

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 query The query restricts the refund recovery bank transactions which are returned by the search. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return List<RefundRecoveryBankTransaction> + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Search Documentation + + **/ + public List search(Long spaceId, EntityQuery query, Map params) throws IOException { + HttpResponse response = searchForHttpResponse(spaceId, query, params); + String returnType = "List<RefundRecoveryBankTransaction>"; + if(returnType.equals("String")){ + return (List) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference>() {}; + return (List)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, java.io.InputStream query, String mediaType) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/search"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = query == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse searchForHttpResponse(Long spaceId, EntityQuery query, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling search"); + }// verify the required parameter 'query' is set + if (query == null) { + throw new IllegalArgumentException("Missing the required parameter 'query' when calling search"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/refund-recovery-bank-transaction/search"); + + // 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); + + 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(query); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + +} diff --git a/src/main/java/com/wallee/sdk/service/WebAppService.java b/src/main/java/com/wallee/sdk/service/WebAppService.java new file mode 100644 index 00000000..6081bbb1 --- /dev/null +++ b/src/main/java/com/wallee/sdk/service/WebAppService.java @@ -0,0 +1,370 @@ +package com.wallee.sdk.service; + +import com.wallee.sdk.ApiClient; + +import com.wallee.sdk.model.ClientError; +import com.wallee.sdk.model.ServerError; +import com.wallee.sdk.model.WebAppConfirmationRequest; +import com.wallee.sdk.model.WebAppConfirmationResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.*; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + + +public class WebAppService { + private ApiClient apiClient; + + public WebAppService(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Check Installation + * This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 This parameter identifies the space which should be checked if the web app is installed. + * @return Boolean + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Check Installation Documentation + + **/ + public Boolean checkInstallation(Long spaceId) throws IOException { + HttpResponse response = checkInstallationForHttpResponse(spaceId); + 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 Installation + * This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 This parameter identifies the space which should be checked if the web app is installed. + * @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 Installation Documentation + + **/ + public Boolean checkInstallation(Long spaceId, Map params) throws IOException { + HttpResponse response = checkInstallationForHttpResponse(spaceId, 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 checkInstallationForHttpResponse(Long spaceId) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling checkInstallation"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/check-installation"); + 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); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse checkInstallationForHttpResponse(Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling checkInstallation"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/check-installation"); + + // 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); + + 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 = null; + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Confirm + * This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 request + * @return WebAppConfirmationResponse + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Confirm Documentation + + **/ + public WebAppConfirmationResponse confirm(WebAppConfirmationRequest request) throws IOException { + HttpResponse response = confirmForHttpResponse(request); + String returnType = "WebAppConfirmationResponse"; + if(returnType.equals("String")){ + return (WebAppConfirmationResponse) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (WebAppConfirmationResponse)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * Confirm + * This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 request + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return WebAppConfirmationResponse + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Confirm Documentation + + **/ + public WebAppConfirmationResponse confirm(WebAppConfirmationRequest request, Map params) throws IOException { + HttpResponse response = confirmForHttpResponse(request, params); + String returnType = "WebAppConfirmationResponse"; + if(returnType.equals("String")){ + return (WebAppConfirmationResponse) (Object) response.parseAsString(); + } + TypeReference typeRef = new TypeReference() {}; + return (WebAppConfirmationResponse)apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse confirmForHttpResponse(WebAppConfirmationRequest request) throws IOException { + // verify the required parameter 'request' is set + if (request == null) { + throw new IllegalArgumentException("Missing the required parameter 'request' when calling confirm"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/confirm"); + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(request); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse confirmForHttpResponse(java.io.InputStream request, String mediaType) throws IOException { + // verify the required parameter 'request' is set + if (request == null) { + throw new IllegalArgumentException("Missing the required parameter 'request' when calling confirm"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/confirm"); + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = request == null ? + apiClient.new JacksonJsonHttpContent(null) : + new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, request); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + public HttpResponse confirmForHttpResponse(WebAppConfirmationRequest request, Map params) throws IOException { + // verify the required parameter 'request' is set + if (request == null) { + throw new IllegalArgumentException("Missing the required parameter 'request' when calling confirm"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/confirm"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + + 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(request); + HttpRequest httpRequest = apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content); + + + httpRequest.setReadTimeout(ApiClient.READ_TIMEOUT); + return httpRequest.execute(); + } + + /** + * Uninstall + * This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 This parameter identifies the space within which the web app should be uninstalled. + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Uninstall Documentation + + **/ + public void uninstall(Long spaceId) throws IOException { + uninstallForHttpResponse(spaceId); + } + + /** + * Uninstall + * This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. + *

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 This parameter identifies the space within which the web app should be uninstalled. + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @throws IOException if an error occurs while attempting to invoke the API + * For more information visit this link. + * @see Uninstall Documentation + + **/ + public void uninstall(Long spaceId, Map params) throws IOException { + uninstallForHttpResponse(spaceId, params); + } + + public HttpResponse uninstallForHttpResponse(Long spaceId) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling uninstall"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/uninstall"); + 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); + } + } + + 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 uninstallForHttpResponse(Long spaceId, Map params) throws IOException { + // verify the required parameter 'spaceId' is set + if (spaceId == null) { + throw new IllegalArgumentException("Missing the required parameter 'spaceId' when calling uninstall"); + } + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/web-app/uninstall"); + + // 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); + + 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(); + } + +}