request) throws TrustlySignatureException;
-
-
- * This report includes all the transactions (both incoming and outgoing transactions) that affect the merchant's Trustly account
- * balance.
- *
- * Only settled transactions are included.
- */
- public AccountLedgerResponseData accountLedger(AccountLedgerRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, AccountLedgerResponseData.class, "AccountLedger", null);
- }
-
- /**
- * This method is used by merchants to transfer money to their customer's bank accounts.
- *
- * The merchant specifies the receiving bank account in {@link AccountPayoutRequestData#setAccountId}, which is a unique identifier
- * generated by Trustly.
- *
- * The merchant can get the {@code AccountID} from {@link NotificationRequest}<{@link AccountNotificationData}> which is sent after
- * a {@link TrustlyApiClient#selectAccount} or {@link TrustlyApiClient#deposit} order has been completed.
- *
- * Alternatively, the {@link TrustlyApiClient#registerAccount} method can be used to get the {@code AccountID}, if the merchant already
- * has the bank account details and want to register them in Trustly's system.
- *
- * Funds must be transferred to the merchant's Trustly account before the payout can be made. No credit is given. To see how much money
- * you have on your Trustly account you can use the {@link TrustlyApiClient#balance} method or simply log in to the Trustly backoffice.
- *
- *
- * Note: this notification is not enabled by default. Please speak to your Trustly contact person if you want to have it enabled.
- *
- * If the payout fails, a {@link NotificationRequest}<{@link CreditNotificationData}> is sent (see more details here).
- *
- * Note: this notification is not enabled by default. Please speak to your Trustly contact person if you want to have it enabled.
- *
- * If the payout fails, a {@link NotificationRequest}<{@link CreditNotificationData}> is sent (see more details here).
- *
- * An {@code AccountID} does not expire in Trustly's system, so it can be used for multiple AccountPayout requests.
- *
- * 🚧 Please do not use this method more than once every 15 minutes.
- */
- public BalanceResponseData balance(BalanceRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, BalanceResponseData.class, "Balance", null);
- }
-
- /**
- * For {@link TrustlyApiClient#charge} requests that have a future {@link ChargeRequestDataAttributes#setPaymentDate}, it’s possible to
- * cancel the Charge up until 18:30 on the {@code PaymentDate}.
- *
- * A {@code Charge} request that doesn’t have any {@code PaymentDate} specified cannot be canceled. It’s also not possible to cancel a
- * {@code Charge} request if the {@code PaymentDate} is equal to the date when {@code Charge} request was sent.
- */
- public CancelChargeResponseData cancelCharge(CancelChargeRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, CancelChargeResponseData.class, "CancelCharge", null);
- }
-
- /**
- * Charges a specific {@link ChargeRequestData#setAccountId} using direct debit.
- *
- * A previously approved direct debit mandate must exist on the {@link ChargeRequestData#setAccountId} (see
- * {@link TrustlyApiClient#selectAccount} for details).
- */
- public ChargeResponseData charge(ChargeRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, ChargeResponseData.class, "Charge", null);
- }
-
- /**
- * Denies a withdrawal prepared by the user.
- *
- * Please contact your integration manager at Trustly if you want to enable automatic approval of the withdrawals.
- */
- public DenyWithdrawalResponseData denyWithdrawal(DenyWithdrawalRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, DenyWithdrawalResponseData.class, "DenyWithdrawal", null);
- }
-
- /**
- * This method returns {@link DepositResponseData#getUrl()} where the end-user can make a payment from their bank account.
- *
- * A typical Deposit flow is:
- *
- * This notification is not enabled by default, please reach out to your Trustly contact if you want to receive it.
- *
- * The Refund will always be made to the same bank account that was used in the original payment.
- *
- * You must have sufficient funds on your merchant account to make the refund. No credit is given. If the deposit has not yet been settled
- * when the refund request is received, the refund will be queued and executed once the money for the deposit has been received.
- */
- public RefundResponseData refund(RefundRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, RefundResponseData.class, "Refund", null);
- }
-
- public CreateAccountResponseData createAccount(CreateAccountRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, CreateAccountResponseData.class, "CreateAccount", null);
- }
-
- /**
- * Initiates a new order where the end-user can select and verify one of his/her bank accounts.
- *
- * You can find more information about how to display the Trustly URL here.
- *
- * When the account has been verified an account notification is immediately sent to the
- * {@link SelectAccountRequestData#setNotificationUrl}.
- *
- * A typical flow is:
- *
- * A typical payout flow is:
- *
- * The first settlement is required to be done through Trustly Back Office as the receiving bank account needs to be registered before a settlement can be processed.
- */
- public MerchantSettlementResponseData registerMerchantSettlement(MerchantSettlementRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, MerchantSettlementResponseData.class, "MerchantSettlement", null);
- }
-
- public SettlementReportResponseData settlementReport(SettlementReportRequestData request) throws TrustlyRequestException {
- return this.sendRequest(
- request, SettlementReportResponseData.class, "ViewAutomaticSettlementDetailsCSV", null
- );
- }
-
- /**
- * Initiates a new withdrawal, returning the URL where the end-user can complete the withdrawal process.
- *
- * You can find more information about how to display the Trustly URL here.
- *
- * A typical withdrawal flow is:
- *
- *
- * This method should only be used if there is no existing {@code addOnXyzListener} method for the notification you want.
- */
- public
- * Should only be used if you need to call an undocumented/newly released method that is not yet added to this library.
- */
- public
- * It will then call the appropriate notification listeners for this client only. If the incoming notification method does not have a
- * listener, the {@code Unknown} notification listener will be called.
- *
- * It is up to your listener to call the appropriate {@link NotificationArgs#respondWithOk()} or
- * {@link NotificationArgs#respondWithFailed} methods, which will callback to your here given {@code onOK} or {@code onFailed} arguments.
- *
- * It is recommended to not use this method directly if possible, and instead use
- * {@link TrustlyApiClientExtensions#handleNotificationRequest} which will call all registered {@link TrustlyApiClient} notification
- * listeners, and handle the servlet request reading and response writing.
- *
- * If you want to handle the reading and writing yourself, then call this method from your own controller or servlet to help with the
- * handling of an incoming notification.
- *
- * @param jsonString The incoming notification as a JSON string
- * @param onOK The callback which will be executed if a listener calls {@link NotificationArgs#respondWithOk()}.
- * @param onFailed The callback which will be executed if a listener calls {@link NotificationArgs#respondWithFailed(String)}.
- *
- * @throws IOException If the JSON string could not be deserialized or the response could not be sent.
- * @throws TrustlyNoNotificationListenerException If there was no listener for the notification, nor one for unknown ones.
- * @throws TrustlyValidationException If the response data could not be properly validated.
- * @throws TrustlySignatureException If the signature of the response could not be properly verified.
- */
- public void handleNotification(
- String jsonString,
- NotificationOkHandler onOK,
- NotificationFailHandler onFailed
- ) throws IOException, TrustlyNoNotificationListenerException, TrustlyValidationException, TrustlySignatureException {
-
- JsonNode jsonToken = this.objectMapper.readTree(jsonString);
- String methodValue = jsonToken.at("/method").asText("").toLowerCase(Locale.ROOT);
-
- NotificationMeta extends IFromTrustlyRequestData> mapper = this.onNotification.get(methodValue);
-
- if (mapper == null || mapper.getListeners().isEmpty()) {
- log.warn(String.format("There is no listener for incoming notification '%s'. Will fallback on 'unknown' listener", methodValue));
- mapper = this.onNotification.get("");
- if (mapper == null || mapper.getListeners().isEmpty()) {
- throw new TrustlyNoNotificationListenerException(String.format("There is no listener for incoming notification '%s' nor unknown", methodValue));
- }
- }
-
- this.handleNotification(jsonString, mapper, onOK, onFailed);
- }
-
- private > {
-
- String getMethod();
-
- double getVersion();
-
- P getParams();
-}
diff --git a/src/main/java/com/trustly/api/domain/base/IRequestParams.java b/src/main/java/com/trustly/api/domain/base/IRequestParams.java
deleted file mode 100644
index 740c070..0000000
--- a/src/main/java/com/trustly/api/domain/base/IRequestParams.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.trustly.api.domain.base;
-
-public interface IRequestParams
- * If possible, try to keep this text as short as possible to maximise the chance that the full reference will fit into the reference
- * field on the customer's bank since some banks allow only a limited number of characters.
- */
- @JsonProperty(value = "ShopperStatement", required = true)
- @NotBlank
- String shopperStatement;
-
- /**
- * The ExternalReference is a reference set by the merchant for any purpose and does not need to be unique for every API call. The
- * ExternalReference will be included in version 1.2 of the settlement report, ViewAutomaticSettlementDetailsCSV.
- */
- @JsonProperty(value = "ExternalReference")
- String externalReference;
-
- /**
- * Human-readable identifier of the consumer-facing merchant (e.g. legal name or trade name)
- *
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing
- * account. It is also mandatory for E-wallets used directly in a merchant's checkout, whereby the purpose of a Trustly transaction is to
- * pay for goods/services by placing funds on the payer's e-money account ("funding stage") following an immediate transfer into the
- * e-money account of the payee ( "payment" stage).
- */
- @JsonProperty(value = "pspMerchant")
- String pspMerchant;
-
- /**
- * URL of the consumer-facing website where the order is initiated
- *
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Mandatory attributes for Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing
- * account. It is also mandatory for E-wallets used directly in a merchant's checkout, whereby the purpose of a Trustly transaction is to
- * pay for goods/services by placing funds on the payer's e-money account ("funding stage") following an immediate transfer into the
- * e-money account of the payee ( "payment" stage).
- */
- @JsonProperty(value = "PSPMerchantURL")
- String pspMerchantUrl;
-
- /**
- * VISA category codes describing the merchant's nature of business.
- *
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Mandatory attributes for Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing
- * account. It is also mandatory for E-wallets used directly in a merchant's checkout, whereby the purpose of a Trustly transaction is to
- * pay for goods/services by placing funds on the payer's e-money account ("funding stage") following an immediate transfer into the
- * e-money account of the payee ( "payment" stage).
- */
- @JsonProperty(value = "MerchantCategoryCode")
- String merchantCategoryCode;
-
- /**
- * Information about the Payer (ultimate debtor). This is required for some merchants and partners, see below.
- *
- * SenderInformation is mandatory to send in Attributes{} for money transfer services (including remittance houses), e-wallets, prepaid
- * cards, as well as for Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing
- * account (other cases may also apply).
- */
- @JsonProperty(value = "SenderInformation")
- RecipientOrSenderInformation senderInformation;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/accountpayout/AccountPayoutResponseData.java b/src/main/java/com/trustly/api/domain/methods/accountpayout/AccountPayoutResponseData.java
deleted file mode 100644
index 3713f41..0000000
--- a/src/main/java/com/trustly/api/domain/methods/accountpayout/AccountPayoutResponseData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.trustly.api.domain.methods.accountpayout;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import com.trustly.api.domain.common.StringBooleanDeserializer;
-import com.trustly.api.domain.common.StringBooleanSerializer;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class AccountPayoutResponseData extends AbstractResponseResultData {
-
- /**
- * The globally unique OrderID the account payout order was assigned in our system.
- */
- @JsonProperty("orderid")
- long orderId;
-
- /**
- * "1" if the payout could be accepted and "0" otherwise.
- */
- @JsonProperty("result")
- @JsonSerialize(using = StringBooleanSerializer.class)
- @JsonDeserialize(using = StringBooleanDeserializer.class)
- boolean result;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/approvewithdrawal/ApproveWithdrawalRequestData.java b/src/main/java/com/trustly/api/domain/methods/approvewithdrawal/ApproveWithdrawalRequestData.java
deleted file mode 100644
index 8c9817e..0000000
--- a/src/main/java/com/trustly/api/domain/methods/approvewithdrawal/ApproveWithdrawalRequestData.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.trustly.api.domain.methods.approvewithdrawal;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class ApproveWithdrawalRequestData extends AbstractToTrustlyRequestData
- * For a successful CancelCharge, this will be {@code null}.
- */
- @JsonProperty("rejected")
- @JsonInclude(Include.ALWAYS)
- String rejected;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestData.java b/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestData.java
deleted file mode 100644
index 02c6cd2..0000000
--- a/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestData.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.trustly.api.domain.methods.charge;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-import org.hibernate.validator.constraints.URL;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class ChargeRequestData extends AbstractToTrustlyRequestData
- * Preferably the same ID/username as used in the merchant's own backoffice in order to simplify for the merchant's support department.
- */
- @JsonProperty(value = "EndUserID", required = true)
- @NotBlank
- String endUserId;
-
- /**
- * Your unique ID for the charge.
- */
- @JsonProperty(value = "MessageID", required = true)
- @NotBlank
- String messageId;
-
- /**
- * The amount to charge with exactly two decimals.Only digits. Use dot (.) as decimal separator.
- */
- @JsonProperty(value = "Amount", required = true)
- @NotBlank
- String amount;
-
- /**
- * The currency of the amount to charge.
- */
- @JsonProperty(value = "Currency", required = true)
- @NotBlank
- String currency;
-}
-
diff --git a/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestDataAttributes.java
deleted file mode 100644
index 51ebe71..0000000
--- a/src/main/java/com/trustly/api/domain/methods/charge/ChargeRequestDataAttributes.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package com.trustly.api.domain.methods.charge;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractRequestParamsDataAttributes;
-import jakarta.validation.constraints.Email;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class ChargeRequestDataAttributes extends AbstractRequestParamsDataAttributes {
-
- /**
- * The text to show on the end-user's bank statement as well as in end-user e-mail communication. On the bank statement, only the first
- * seven characters (along with Trustly's reference) will be shown.
- *
- * Allowed characters:
- *
- * With {@code "Sport Shop"} set as ShopperStatement:
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * The possible rejected codes are:
- *
- * ERROR_MANDATE_NOT_FOUND - the AccountID does not have an active mandate ERROR_DIRECT_DEBIT_NOT_ALLOWED - Trustly Direct Debit is not
- * enabled on the merchant's account in Trustly's system. ERROR_ACCOUNT_NOT_FOUND - the specified AccountID does not exist.
- */
- @JsonProperty("rejected")
- String rejected;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestData.java b/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestData.java
deleted file mode 100644
index 909e434..0000000
--- a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestData.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.trustly.api.domain.methods.createaccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class CreateAccountRequestData extends AbstractToTrustlyRequestData
- * Preferably the same ID/username as used in the merchant's own backoffice in order to simplify for the merchant's support department.
- */
- @JsonProperty(value = "EndUserID", required = true)
- @NotBlank
- String endUserId;
-
- /**
- * The clearing house of the end-user's bank account. Typically the name of a country in uppercase letters. See table* below.
- */
- @JsonProperty(value = "ClearingHouse", required = true)
- @NotBlank
- String clearingHouse;
-
- /**
- * The bank number identifying the end-user's bank in the given clearing house. For bank accounts in IBAN format you should just provide
- * an empty string (""). For non-IBAN format, see table* below.
- */
- @JsonProperty(value = "BankNumber", required = true)
- @NotBlank
- String bankNumber;
-
- /**
- * The account number, identifying the end-user's account in the bank. Can be either IBAN or country-specific format, see table* below.
- */
- @JsonProperty(value = "AccountNumber", required = true)
- @NotBlank
- String accountNumber;
- /**
- * First name of the account holder (or the name of the company/organization)
- */
- @JsonProperty(value = "Firstname", required = true)
- @NotBlank
- String firstname;
-
- /**
- * Last name of the account holder(empty for organizations/companies)
- */
- @JsonProperty(value = "Lastname", required = true)
- @NotBlank
- String lastname;
-}
-
diff --git a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestDataAttributes.java
deleted file mode 100644
index c89edd2..0000000
--- a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountRequestDataAttributes.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.trustly.api.domain.methods.createaccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractRequestParamsDataAttributes;
-import jakarta.validation.constraints.Email;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class CreateAccountRequestDataAttributes extends AbstractRequestParamsDataAttributes {
-
- /**
- * The date of birth of the account holder(ISO 8601).
- */
- @JsonProperty(value = "DateOfBirth")
- String dateOfBirth;
-
- /**
- * The mobile phonenumber to the account holder in international format.This is used for KYC and AML routines.
- */
- @JsonProperty(value = "MobilePhone")
- String mobilePhone;
-
- /**
- * The account holder's social security number / personal number / birth number / etc. Useful for some banks for identifying transactions
- * and KYC/AML.
- */
- @JsonProperty(value = "NationalIdentificationNumber")
- String nationalIdentificationNumber;
-
- /**
- * The ISO 3166-1-alpha-2 code of the account holder's country.
- */
- @JsonProperty(value = "AddressCountry")
- String addressCountry;
-
- /**
- * Postal code of the account holder.
- */
- @JsonProperty(value = "AddressPostalCode")
- String addressPostalCode;
-
- /**
- * City of the account holder.
- */
- @JsonProperty(value = "AddressCity")
- String addressCity;
-
- /**
- * Street address of the account holder.
- */
- @JsonProperty(value = "AddressLine1")
- String addressLine1;
-
- /**
- * Additional address information of the account holder.
- */
- @JsonProperty(value = "AddressLine2")
- String addressLine2;
-
- /**
- * The entire address of the account holder. This attribute should only be used if you are unable to provide the address information in
- * the 5 separate attributes:
- *
- *
- * The iDEAL integration offered by Trustly allows for both iDEAL and Trustly payments on a single integration with all transactions
- * visible in the same AccountLedger. To initiate a new iDEAL payment, add Method = "deposit.bank.netherlands.ideal" to the Deposit
- * attributes.
- */
- @JsonProperty(value = "Method")
- private String method;
-
- /**
- * The currency of the end-user's account in the merchant's system.
- */
- @JsonProperty(value = "Currency", required = true)
- @NotBlank
- private String currency;
-
- /**
- * The amount to deposit with exactly two decimals in the currency specified by Currency. Do not use this attribute in combination with
- * {@link DepositRequestDataAttributes#getSuggestedMinAmount()} and {@link DepositRequestDataAttributes#getSuggestedMaxAmount()}. Only
- * digits. Use dot (.) as decimal separator.
- */
-
- @JsonProperty(value = "Amount")
- private String amount;
-
- /**
- * The ISO 3166-1-alpha-2 code of the shipping address country.
- */
- @JsonProperty(value = "ShippingAddressCountry")
- private String shippingAddressCountry;
-
- /**
- * The postalcode of the shipping address.
- */
- @JsonProperty(value = "ShippingAddressPostalCode")
- private String shippingAddressPostalCode;
-
- /**
- * The city of the shipping address.
- */
- @JsonProperty(value = "ShippingAddressCity")
- private String shippingAddressCity;
-
- /**
- * Shipping address street
- */
- @JsonProperty(value = "ShippingAddressLine1")
- private String shippingAddressLine1;
-
- /**
- * Additional shipping address information.
- */
- @JsonProperty(value = "ShippingAddressLine2")
- private String shippingAddressLine2;
-
- /**
- * The entire shipping address.
- *
- * This attribute should only be used if you are unable to provide the shipping address information in the 5 separate attributes:
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Required for some merchants and partners.
- *
- * RecipientInformation is mandatory to send for money transfer services (including remittance houses), e-wallets, prepaid cards, as
- * well as for Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing account (other
- * cases may also apply).
- */
- @JsonProperty(value = "RecipientInformation")
- private RecipientOrSenderInformation recipientInformation;
-
- /**
- * Trustly will send a KYC notification to the merchant’s NotificationURL if the attribute "RequestKYC" : "1" is sent in a Deposit API call.
- * The KYC notification should be expected after the end user has performed a successful login to their bank, and always before a deposit
- * transfer is initiated.
- */
- @JsonProperty(value = "RequestKYC")
- private String requestKyc;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/deposit/DepositResponseData.java b/src/main/java/com/trustly/api/domain/methods/deposit/DepositResponseData.java
deleted file mode 100644
index f56e914..0000000
--- a/src/main/java/com/trustly/api/domain/methods/deposit/DepositResponseData.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.trustly.api.domain.methods.deposit;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class DepositResponseData extends AbstractResponseResultData {
-
- /**
- * The OrderID specified when calling the method.
- */
- @JsonProperty("orderid")
- String orderId;
-
- /**
- * The URL that should be loaded so that the end-user can complete the deposit.
- */
- @JsonProperty("url")
- String url;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/getwithdrawals/GetWithdrawalsRequestData.java b/src/main/java/com/trustly/api/domain/methods/getwithdrawals/GetWithdrawalsRequestData.java
deleted file mode 100644
index 3c628a1..0000000
--- a/src/main/java/com/trustly/api/domain/methods/getwithdrawals/GetWithdrawalsRequestData.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.trustly.api.domain.methods.getwithdrawals;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class GetWithdrawalsRequestData extends AbstractToTrustlyRequestData
- * Examples are:
- *
- * It's important that no logic is built on the merchant side based on any specific transferState.
- * New states can be added, and existing states can be changed or removed without notice.
- */
- @JsonProperty("transferstate")
- String transferState;
-
- /**
- * The amount of the withdrawal.
- */
- @JsonProperty("amount")
- String amount;
-
- /**
- * The accountid of the receiving account.
- */
- @JsonProperty("accountid")
- String accountid;
-
- /**
- * The currency of the withdrawal.
- */
- @JsonProperty("currency")
- String currency;
-
- /**
- * The estimated date and time for when the funds will be available on the receiving bank account.If this information is not available it
- * will be null.
- */
- @JsonProperty("eta")
- String eta;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/merchantsettlement/MerchantSettlementRequestData.java b/src/main/java/com/trustly/api/domain/methods/merchantsettlement/MerchantSettlementRequestData.java
deleted file mode 100644
index 2d8a05e..0000000
--- a/src/main/java/com/trustly/api/domain/methods/merchantsettlement/MerchantSettlementRequestData.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.trustly.api.domain.methods.merchantsettlement;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class MerchantSettlementRequestData extends AbstractToTrustlyRequestData
- * This will be included in version {@code 1.2} of the settlement report, {@code ViewAutomaticSettlementDetailsCSV}.
- */
- @JsonProperty(value = "ExternalReference")
- String externalReference;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/refund/RefundResponseData.java b/src/main/java/com/trustly/api/domain/methods/refund/RefundResponseData.java
deleted file mode 100644
index f7b46da..0000000
--- a/src/main/java/com/trustly/api/domain/methods/refund/RefundResponseData.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.trustly.api.domain.methods.refund;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import com.trustly.api.domain.base.JsonRpcResponse;
-import com.trustly.api.domain.common.StringBooleanDeserializer;
-import com.trustly.api.domain.common.StringBooleanSerializer;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class RefundResponseData extends AbstractResponseResultData {
-
- /**
- * The OrderID specified when calling the method.
- */
- @JsonProperty("orderid")
- long orderId;
-
- /**
- * "1" if the refund request is accepted by Trustly's system.
- *
- * If the refund request is not accepted, you will get an error code back in {@link JsonRpcResponse#getError()}.
- */
- @JsonProperty("result")
- @JsonSerialize(using = StringBooleanSerializer.class)
- @JsonDeserialize(using = StringBooleanDeserializer.class)
- boolean result;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestData.java b/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestData.java
deleted file mode 100644
index fa5cba9..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestData.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.trustly.api.domain.methods.registeraccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class RegisterAccountRequestData extends AbstractToTrustlyRequestData
- * See table here.
- *
- *
- * If possible, try to keep this text as short as possible to maximise the chance that the full reference will fit into the reference
- * field on the customer's bank since some banks allow only a limited number of characters.
- */
- @JsonProperty(value = "ShopperStatement", required = true)
- @NotBlank
- String shopperStatement;
-
- /**
- * *The ExternalReference is a reference set by the merchant for any purpose and does not need to be unique *for every API call. The
- * ExternalReference will be included in version 1.2 of the settlement report, ViewAutomaticSettlementDetailsCSV.
- */
- @JsonProperty(value = "ExternalReference")
- String externalReference;
-
- /**
- * Human-readable identifier of the consumer-facing merchant (e.g. legal name or trade name)
- *
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account. It is also mandatory for E-wallets used directly in a merchant's checkout.
- *
- * If this is set to 1, then {@link SelectAccountRequestDataAttributes#getEmail()} is required.
- */
- @JsonProperty(value = "RequestDirectDebitMandate")
- int requestDirectDebitMandate;
-
- /**
- * The end-user's date of birth.
- *
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding(EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding(EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- * Must be "1.2". We also have older versions of the report, but those should not be implemented by new merchants.
- * Do not use in combination with {@link WithdrawRequestDataAttributes#getSuggestedMinAmount()} and
- * {@link WithdrawRequestDataAttributes#getSuggestedMaxAmount()}.
- *
- * Use dot(.) as decimal separator.
- */
- @JsonProperty(value = "SuggestedAmount")
- String suggestedAmount;
-
- /**
- * The end-user's first name.
- */
- @JsonProperty(value = "DateOfBirth")
- String dateOfBirth;
-
- /**
- * The ISO 3166-1-alpha-2 code of the shipping address country.
- */
- @JsonProperty(value = "AddressCountry")
- String addressCountry;
-
- /**
- * The postalcode of the shipping address.
- */
- @JsonProperty(value = "AddressPostalCode")
- String addressPostalCode;
-
- /**
- * The city of the shipping address.
- */
- @JsonProperty(value = "AddressCity")
- String addressCity;
-
- /**
- * Shipping address street
- */
- @JsonProperty(value = "AddressLine1")
- String addressLine1;
-
- /**
- * Additional shipping address information.
- */
- @JsonProperty(value = "AddressLine2")
- String addressLine2;
-
- /**
- * The entire shipping address.
- *
- * This attribute should only be used if you are unable to provide the shipping address information in the 5 separate properties:
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * Note: Mandatory attribute for Trustly Partners that are using Express Merchant Onboarding (EMO) and aggregate traffic under a master
- * processing account.
- *
- * SenderInformation is mandatory for money transfer services (including remittance houses), e-wallets, prepaid cards, as well as for
- * Trustly Partners that are using Express Merchant Onboarding and aggregate traffic under a master processing account (other cases may
- * also apply).
- */
- @JsonProperty(value = "SenderInformation")
- RecipientOrSenderInformation senderInformation;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawResponseData.java b/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawResponseData.java
deleted file mode 100644
index 59ebe7b..0000000
--- a/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawResponseData.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.trustly.api.domain.methods.withdraw;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class WithdrawResponseData extends AbstractResponseResultData {
-
- /**
- * The globally unique OrderID the withdrawal was assigned in our system.
- */
- @JsonProperty("orderid")
- long orderId;
-
- /**
- * The URL that should be loaded so that the end-user can complete the withdrawal.
- */
- @JsonProperty("url")
- String url;
-}
diff --git a/src/main/java/com/trustly/api/domain/notifications/AbstractCreditDebitPendingPayoutNotificationData.java b/src/main/java/com/trustly/api/domain/notifications/AbstractCreditDebitPendingPayoutNotificationData.java
deleted file mode 100644
index 595fead..0000000
--- a/src/main/java/com/trustly/api/domain/notifications/AbstractCreditDebitPendingPayoutNotificationData.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.trustly.api.domain.notifications;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractFromTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.Value;
-import lombok.experimental.NonFinal;
-import lombok.experimental.SuperBuilder;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@NonFinal
-@RequiredArgsConstructor
-public class AbstractCreditDebitPendingPayoutNotificationData extends
- AbstractFromTrustlyRequestData
- * This notification is not enabled by default. Please contact your Trustly integration manager in case you want to receive it.
- *
- *
- * Note: In many cases, the {@code payoutconfirmation} will be sent within minutes after the AccountPayout request has been received by
- * Trustly. But in some cases there will be a delay of 1day or more,since Trustly relies on receiving statement files from banks.
- *
- * If you have sent an AccountPayout request and haven’t received a {@code payoutconfirmation} within an hour or so, it does not necessarily
- * mean that something is wrong. If you experience this and need to know the actual status of the payout, you can either use Trustly’s
- * backoffice ({@code Transactions} > {@code Withdrawals}), or use the {@link TrustlyApiClient#getWithdrawals(GetWithdrawalsRequestData)}
- * API method.
- *
- * If you use the {@link TrustlyApiClient#getWithdrawals(GetWithdrawalsRequestData)} method and receive status {@code EXECUTING} or
- * {@code EXECUTED}, it means that the withdrawal is currently being processed or has been processed, but is not confirmed yet.
- *
- * The {@link TrustlyApiClient#getWithdrawals(GetWithdrawalsRequestData)} method must not be used more than once every 15 minutes per
- * payout.
- *
- * Please note that even if a {@code payoutconfirmation} has been sent,the payout can still fail afterwards. If that happens, Trustly will
- * send a credit notification to the merchant’s {@code NotificationURL}. This can happen for example if the funds are sent to a bank account
- * that is closed.
- */
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@Jacksonized
-public class PayoutConfirmationNotificationData extends AbstractCreditDebitPendingPayoutNotificationData {
-
-}
diff --git a/src/main/java/com/trustly/api/domain/notifications/PendingNotificationData.java b/src/main/java/com/trustly/api/domain/notifications/PendingNotificationData.java
deleted file mode 100644
index 69fb7e2..0000000
--- a/src/main/java/com/trustly/api/domain/notifications/PendingNotificationData.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.trustly.api.domain.notifications;
-
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@Jacksonized
-public class PendingNotificationData extends AbstractCreditDebitPendingPayoutNotificationData {
-
-}
diff --git a/src/main/java/com/trustly/api/domain/notifications/UnknownNotificationData.java b/src/main/java/com/trustly/api/domain/notifications/UnknownNotificationData.java
deleted file mode 100644
index 4c74039..0000000
--- a/src/main/java/com/trustly/api/domain/notifications/UnknownNotificationData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.trustly.api.domain.notifications;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.trustly.api.domain.base.AbstractFromTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import java.util.HashMap;
-import java.util.Map;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Singular;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class UnknownNotificationData extends AbstractFromTrustlyRequestData request) {
-
- }
-
- @Override
- public Example flow 1: SelectAccount + AccountPayout
- *
- *
- *
- * Example flow 2: RegisterAccount + AccountPayout
- *
- *
- */
- public AccountPayoutResponseData accountPayout(AccountPayoutRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, AccountPayoutResponseData.class, "AccountPayout", null);
- }
-
- /**
- * Approves a withdrawal prepared by the user. Please contact your integration manager at Trustly if you want to enable automatic approval
- * of the withdrawals.
- */
- public ApproveWithdrawalResponseData approveWithdrawal(ApproveWithdrawalRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, ApproveWithdrawalResponseData.class, "ApproveWithdrawal", null);
- }
-
- /**
- * This method returns the current balance for all currencies available on the merchant's Trustly account.
- *
- *
- */
- public DepositResponseData deposit(DepositRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, DepositResponseData.class, "Deposit", null);
- }
-
- /**
- * This method returns the details of a payout (works for the {@link TrustlyApiClient#withdraw}, {@link TrustlyApiClient#accountPayout}
- * and {@link TrustlyApiClient#refund} methods).
- */
- public GetWithdrawalsResponseData getWithdrawals(GetWithdrawalsRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, GetWithdrawalsResponseData.class, "GetWithdrawals", null);
- }
-
- /**
- * Refunds the customer on a previous {@link TrustlyApiClient#deposit} or {@link TrustlyApiClient#charge}.
- *
- *
- */
- public SelectAccountResponseData selectAccount(SelectAccountRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, SelectAccountResponseData.class, "SelectAccount", null);
- }
-
- /**
- * Registers and verifies the format of an account to be used in {@link TrustlyApiClient#accountPayout}.
- *
- *
- * Multiple calls to this method with the same bank account details will result in the same {@link RegisterAccountResponseData#getAccountId()} being returned.
- */
- public RegisterAccountResponseData registerAccount(RegisterAccountRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, RegisterAccountResponseData.class, "RegisterAccount", null);
- }
-
- public RegisterAccountPayoutResponseData registerAccountPayout(RegisterAccountPayoutRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, RegisterAccountPayoutResponseData.class, "RegisterAccountPayout", null);
- }
-
- /**
- * Initiate a settlement of funds, which will always be sent to the last settlement account for that specific currency.
- *
- *
- */
- public WithdrawResponseData withdraw(WithdrawRequestData request) throws TrustlyRequestException {
- return this.sendRequest(request, WithdrawResponseData.class, "Withdraw", null);
- }
-
- // Notifications
-
- /**
- * Add a custom listener for a certain notification type.
- *
- *
- *
- *
- *
- *
- *
- *
- */
- @JsonProperty("status")
- String status;
-}
diff --git a/src/main/java/com/trustly/api/domain/base/RequestParams.java b/src/main/java/com/trustly/api/domain/base/RequestParams.java
deleted file mode 100644
index 0de6065..0000000
--- a/src/main/java/com/trustly/api/domain/base/RequestParams.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.trustly.api.domain.base;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import jakarta.validation.Valid;
-import lombok.Builder;
-import lombok.RequiredArgsConstructor;
-import lombok.Value;
-import lombok.With;
-import lombok.experimental.NonFinal;
-
-@Value
-@NonFinal
-@Builder(toBuilder = true)
-@RequiredArgsConstructor
-public class RequestParams{@code https://example.com/thank_you.html}
- */
- @JsonProperty("SuccessURL")
- @NotBlank
- @URL
- String successUrl;
-
- /**
- * The URL to which the end-user should be redirected after a failed deposit. Do not put any logic on that page since it's not guaranteed
- * that the end-user will in fact visit it.
- *
- * {@code https://trustly.com/error.html}
- */
- @JsonProperty(value = "FailURL")
- @NotBlank
- @URL
- String failURL;
-
- /**
- * The TemplateURL should be used if you want to design your own payment page but have it hosted on Trustly's side. The URL of your
- * template page should be provided in this attribute in every Deposit API call. Our system will then fetch the content of your template
- * page, insert the Trustly iframe into it and host the entire page on Trustly’s side. In the response to the Deposit request, you will
- * receive a URL to the hosted template page which you should redirect the user to (the hosted page cannot be iframed).
- */
- @JsonProperty(value = "TemplateURL")
- String templateURL;
-
- /**
- * The html target/framename of the SuccessURL. Only _top, _self and _parent are suported.
- */
- @JsonProperty(value = "URLTarget")
- String urlTarget;
-
- /**
- * The end-user's social security number / personal number / birth number / etc. Useful for some banks for identifying transactions and
- * KYC/AML. If a Swedish personid ("personnummer") is provided, it will be pre-filled when the user logs in to their bank.
- */
- @JsonProperty(value = "NationalIdentificationNumber")
- String nationalIdentificationNumber;
-
- /**
- * This attribute disables the possibility to change/type in national identification number when logging in to a Swedish bank.If this
- * attribute is sent, the attribute NationalIdentificationNumber needs to be correctly included in the request. Note: This is only
- * available for Swedish banks.
- */
- @JsonProperty(value = "UnchangeableNationalIdentificationNumber")
- String unchangeableNationalIdentificationNumber;
-
- /**
- * If you are using Trustly from within your native iOS app, this attribute should be sent so that we can redirect the users back to your
- * app in case an external app is used for authentication (for example Mobile Bank ID in Sweden).
- */
- @JsonProperty("URLScheme")
- String urlScheme;
-}
diff --git a/src/main/java/com/trustly/api/domain/common/AbstractAmountConstrainedAccountDataAttributes.java b/src/main/java/com/trustly/api/domain/common/AbstractAmountConstrainedAccountDataAttributes.java
deleted file mode 100644
index f32d324..0000000
--- a/src/main/java/com/trustly/api/domain/common/AbstractAmountConstrainedAccountDataAttributes.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.trustly.api.domain.common;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@JsonInclude(Include.NON_NULL)
-public abstract class AbstractAmountConstrainedAccountDataAttributes extends AbstractAccountDataAttributes {
-
- /**
- * The minimum amount the end-user is allowed to deposit in the currency specified by Currency.Only digits. Use dot (.) as decimal
- * separator.
- */
- @JsonProperty(value = "SuggestedMinAmount")
- String suggestedMinAmount;
-
- /**
- * The maximum amount the end-user is allowed to deposit in the currency specified by Currency.Only digits. Use dot (.) as decimal
- * separator.
- */
- @JsonProperty(value = "SuggestedMaxAmount")
- String suggestedMaxAmount;
-}
diff --git a/src/main/java/com/trustly/api/domain/common/RecipientOrSenderInformation.java b/src/main/java/com/trustly/api/domain/common/RecipientOrSenderInformation.java
deleted file mode 100644
index adfa654..0000000
--- a/src/main/java/com/trustly/api/domain/common/RecipientOrSenderInformation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.trustly.api.domain.common;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.Pattern;
-import lombok.Builder;
-import lombok.RequiredArgsConstructor;
-import lombok.Value;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@Builder(toBuilder = true)
-@Jacksonized
-@RequiredArgsConstructor
-public class RecipientOrSenderInformation {
-
- /**
- * Partytype can be "PERSON" or "ORGANISATION" (if the recipient or ultimate debtor is an organisation/company).
- */
- @JsonProperty("Partytype")
- @NotBlank
- String partytype;
-
- /**
- * First name of the person, or the name of the organisation.
- */
- @JsonProperty("Firstname")
- @NotBlank
- String firstname;
-
- /**
- * Last name of the person (NULL for organisation).
- */
- @JsonProperty("Lastname")
- @NotBlank
- String lastname;
-
- /**
- * The ISO 3166-1-alpha-2 code of the country that the recipient resides in.
- */
- @JsonProperty("CountryCode")
- @NotBlank
- @Pattern(regexp = "[A-Z]{2}")
- String countryCode;
-
- /**
- * Payment account number or an alternative consistent unique identifier(e.g.customer number). Note: this is not a transaction ID or
- * similar.This identifier must stay consistent across all transactions relating to this recipient (payee).
- */
- @JsonProperty("CustomerID")
- String customerID;
-
- /**
- * Full address of the recipient, excluding the country.
- */
- @JsonProperty("Address")
- String address;
-
- /**
- * Date of birth (YYYY-MM-DD) of the beneficiary, or organisational number for the organisation.
- */
- @JsonProperty("DateOfBirth")
- String dateOfBirth;
-}
diff --git a/src/main/java/com/trustly/api/domain/common/StringBooleanDeserializer.java b/src/main/java/com/trustly/api/domain/common/StringBooleanDeserializer.java
deleted file mode 100644
index 5d68179..0000000
--- a/src/main/java/com/trustly/api/domain/common/StringBooleanDeserializer.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.trustly.api.domain.common;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import java.io.IOException;
-
-public class StringBooleanDeserializer extends StdDeserializer
- *
- *
- *
- *
- */
- @JsonProperty(value = "ShopperStatement", required = true)
- @NotBlank
- String shopperStatement;
-
- /**
- * The email address of the end user.
- */
- @JsonProperty(value = "Email", required = true)
- @NotBlank
- @Email
- String email;
-
- /**
- * The date when the funds will be charged from the end user's bank account. If this attribute is not sent, the charge will be attempted
- * as soon as possible.
- */
- @JsonProperty(value = "PaymentDate")
- String paymentDate;
-
- /**
- * The ExternalReference is a reference set by the merchant for any purpose and does not need to be unique for every API call. For
- * example, it can be used for invoice references, OCR numbers and also for offering end users the option to part-pay an invoice using the
- * same ExternalReference. The ExternalReference will be included in version 1.2 of the settlement report,
- * ViewAutomaticSettlementDetailsCSV.
- *
- * {@code "T Sport S xyz"}{@code "Sport Shop"}{@code 32423534523}
- */
- @JsonProperty(value = "ExternalReference")
- String externalReference;
-
- /**
- * Human-readable identifier of the consumer-facing merchant (e.g. legal name or trade name)
- *
- *
- *
- */
- @JsonProperty(value = "Address")
- String address;
-
- /**
- * The email address of the account holder.
- */
- @JsonProperty(value = "Email")
- @Email
- String email;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountResponseData.java b/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountResponseData.java
deleted file mode 100644
index cad7109..0000000
--- a/src/main/java/com/trustly/api/domain/methods/createaccount/CreateAccountResponseData.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.trustly.api.domain.methods.createaccount;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class CreateAccountResponseData extends AbstractResponseResultData {
-
- /**
- * The globally unique AccountID the account was assigned in our system.
- */
- @JsonProperty("accountid")
- String accountId;
-
- /**
- * The clearinghouse for this account.
- */
- @JsonProperty("clearinghouse")
- String clearingHouse;
-
- /**
- * The name of the bank for this account.
- */
- @JsonProperty("bank")
- String bank;
-
- /**
- * A descriptor for this account that is safe to show to the end user.
- */
- @JsonProperty("descriptor")
- String descriptor;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/denywithdrawal/DenyWithdrawalRequestData.java b/src/main/java/com/trustly/api/domain/methods/denywithdrawal/DenyWithdrawalRequestData.java
deleted file mode 100644
index abed571..0000000
--- a/src/main/java/com/trustly/api/domain/methods/denywithdrawal/DenyWithdrawalRequestData.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.trustly.api.domain.methods.denywithdrawal;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import com.trustly.api.domain.base.EmptyRequestDataAttributes;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class DenyWithdrawalRequestData extends AbstractToTrustlyRequestData
- *
- */
- @JsonProperty(value = "ShippingAddress")
- private String shippingAddress;
-
- /**
- * In addition to the deposit, request a direct debit mandate from the account used for the deposit. 1 enables, 0 disables. The default is
- * disabled. If this attribute is set, additional account notifications might be sent. You can read more about Trustly Direct Debit here,
- * under section 2.1
- */
- @JsonProperty(value = "RequestDirectDebitMandate")
- private String requestDirectDebitMandate;
-
- /**
- * The AccountID received from an account notification which shall be charged in a Trustly Direct Debit deposit. This attribute should
- * only be sent in combination with "QuickDeposit" : 1
- */
- @JsonProperty("ChargeAccountID")
- private String chargeAccountId;
-
- /**
- * Set to 1 for Trustly Direct Debit deposits. QuickDeposit should be set set to 1 when the end user attempts a quick deposit, even if
- * ChargeAccountID is not set. You can read more about QuickDeposits here, under section 1.1 and 1.2.
- */
- @JsonProperty(value = "QuickDeposit")
- private Integer quickDeposit;
-
- /**
- * The ExternalReference is a reference set by the merchant for any purpose and does not need to be unique for every API call. The
- * ExternalReference will be included in version 1.2 of the settlement report, ViewAutomaticSettlementDetailsCSV.
- */
- @JsonProperty(value = "ExternalReference")
- private String externalReference;
-
- /**
- * Human-readable identifier of the consumer-facing merchant (e.g. legal name or trade name)
- *
- *
- *
- *
- * {@code SWEDEN}
- */
- @JsonProperty(value = "ClearingHouse")
- @NotBlank
- String clearingHouse;
-
- /**
- * The bank number identifying the end-user's bank in the given clearing house. For bank accounts in IBAN format you should just provide
- * an empty string (""). For non-IBAN format, see table here
- */
- @JsonProperty(value = "BankNumber")
- @NotBlank
- String bankNumber;
-
- /**
- * The account number, identifying the end-user's account in the bank. Can be either IBAN or country-specific format, see table
- * here
- */
- @JsonProperty(value = "AccountNumber")
- @NotBlank
- String accountNumber;
-
- /**
- * First name of the account holder (or the name of the company/organization)
- */
- @JsonProperty(value = "Firstname")
- @NotBlank
- String firstname;
-
- /**
- * Last name of the account holder (empty for organizations/companies)
- */
- @JsonProperty(value = "Lastname")
- @NotBlank
- String lastname;
-}
-
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestDataAttributes.java
deleted file mode 100644
index 334c364..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountRequestDataAttributes.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.trustly.api.domain.methods.registeraccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractRequestParamsDataAttributes;
-import jakarta.validation.constraints.Email;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class RegisterAccountRequestDataAttributes extends AbstractRequestParamsDataAttributes {
-
- /**
- * The end-user's date of birth.
- *
- * {@code 1979-01-31}
- */
- @JsonProperty(value = "DateOfBirth")
- String dateOfBirth;
-
- /**
- * The mobile phonenumber to the account holder in international format. This is used for KYC and AML routines.
- *
- * {@code +46709876543}
- */
- @JsonProperty(value = "MobilePhone")
- String mobilePhone;
-
- /**
- * The account holder's social security number / personal number / birth number / etc. Useful for some banks for identifying transactions
- * and KYC/AML.
- *
- * {@code 790131-1234}
- */
- @JsonProperty(value = "NationalIdentificationNumber")
- String nationalIdentificationNumber;
-
- /**
- * The ISO 3166-1-alpha-2 code of the account holder's country.
- *
- * {@code SE}
- */
- @JsonProperty(value = "AddressCountry")
- String addressCountry;
-
- /**
- * Postal code of the account holder.
- *
- * {@code SE-11253}
- */
- @JsonProperty(value = "AddressPostalCode")
- String addressPostalCode;
-
- /**
- * City of the account holder.
- *
- * {@code Stockholm}
- */
- @JsonProperty(value = "AddressCity")
- String addressCity;
-
- /**
- * Street address of the account holder.
- *
- * {@code Main street 1}
- */
- @JsonProperty(value = "AddressLine1")
- String addressLine1;
-
- /**
- * Additional address information of the account holder.
- *
- * {@code Apartment 123, 2 stairs up}
- */
- @JsonProperty(value = "AddressLine2")
- String addressLine2;
-
- /**
- * The entire address of the account holder. This attribute should only be used if you are unable to provide the address information in
- * the 5 separate attributes above (AddressCountry, AddressPostalCode, AddressCity, AddressLine1 and AddressLine2).
- *
- * {@code Birgerstreet 14, SE-11411, Stockholm, Sweden}
- */
- @JsonProperty(value = "Address")
- String address;
-
- /**
- * The email address of the account holder.
- *
- * {@code test@trustly.com}
- */
- @JsonProperty(value = "Email")
- @Email
- String email;
-
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountResponseData.java b/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountResponseData.java
deleted file mode 100644
index 1bdb84c..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccount/RegisterAccountResponseData.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.trustly.api.domain.methods.registeraccount;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class RegisterAccountResponseData extends AbstractResponseResultData {
-
- /**
- * The globally unique AccountID the account was assigned in our system.
- *
- * {@code 7653385737}
- */
- @JsonProperty(value = "accountid")
- String accountId;
-
- /**
- * The clearinghouse for this account.
- *
- * {@code SWEDEN}
- */
- @JsonProperty(value = "clearinghouse")
- String clearingHouse;
-
- /**
- * The name of the bank for this account.
- *
- * {@code Skandiabanken}
- */
- @JsonProperty(value = "bank")
- String bank;
-
- /**
- * A descriptor for this account that is safe to show to the end user.
- *
- * {@code ***4057}
- */
- @JsonProperty(value = "descriptor")
- String descriptor;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestData.java b/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestData.java
deleted file mode 100644
index 932a809..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestData.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.trustly.api.domain.methods.registeraccountpayout;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-import org.hibernate.validator.constraints.URL;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class RegisterAccountPayoutRequestData extends AbstractToTrustlyRequestData{@code SWEDEN}
- */
- @JsonProperty(value = "ClearingHouse")
- String clearingHouse;
-
- /**
- * The bank number identifying the end-user's bank in the given clearing house. For bank accounts in IBAN format you should just provide
- * an empty string (""). For non-IBAN format, see table here
- */
- @JsonProperty(value = "BankNumber")
- String bankNumber;
-
- /**
- * The account number, identifying the end-user's account in the bank. Can be either IBAN or country-specific format, see table
- * here
- */
- @JsonProperty(value = "AccountNumber")
- String accountNumber;
-
- /**
- * First name of the account holder (or the name of the company/organization)
- */
- @JsonProperty(value = "Firstname")
- String firstname;
-
- /**
- * Last name of the account holder (empty for organizations/companies)
- */
- @JsonProperty(value = "Lastname")
- String lastname;
-
- /**
- * The URL to which notifications for this payment should be sent to. This URL should be hard to guess and not contain a ? ("question
- * mark").
- */
- @JsonProperty(value = "NotificationURL", required = true)
- @NotBlank
- @URL
- String notificationUrl;
-
- /**
- * Your unique ID for the payout. If the MessageID is a previously initiated P2P order then the payout will be attached to that P2P order
- * and the amount must be equal to or lower than the previously deposited amount.
- */
- @JsonProperty(value = "MessageID", required = true)
- @NotBlank
- String messageId;
-
- /**
- * The amount to send with exactly two decimals. Only digits. Use dot (.) as decimal separator. If the end-user holds a balance in the
- * merchant's system then the amount must have been deducted from that balance before calling this method.
- */
- @JsonProperty(value = "Amount", required = true)
- @NotBlank
- String amount;
-
- /**
- * The currency of the end-user's account in the merchant's system.
- */
- @JsonProperty(value = "Currency", required = true)
- @NotBlank
- String currency;
-}
-
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestDataAttributes.java
deleted file mode 100644
index 3906420..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutRequestDataAttributes.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package com.trustly.api.domain.methods.registeraccountpayout;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractRequestParamsDataAttributes;
-import com.trustly.api.domain.common.RecipientOrSenderInformation;
-import jakarta.validation.constraints.Email;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class RegisterAccountPayoutRequestDataAttributes extends AbstractRequestParamsDataAttributes {
-
- /**
- * The text to show on the end-user's bank statement after Trustly's own 10 digit reference (which always will be displayed first). The
- * reference must let the end user identify the merchant based on this value. So the ShopperStatement should contain either your brand
- * name, website name, or company name.
- * {@code 1979-01-31}
- */
- @JsonProperty(value = "DateOfBirth")
- String dateOfBirth;
-
- /**
- * The mobile phonenumber to the account holder in international format. This is used for KYC and AML routines.
- *
- * {@code +46709876543}
- */
- @JsonProperty(value = "MobilePhone")
- String mobilePhone;
-
- /**
- * The account holder's social security number / personal number / birth number / etc. Useful for some banks for identifying transactions
- * and KYC/AML.
- *
- * {@code 790131-1234}
- */
- @JsonProperty(value = "NationalIdentificationNumber")
- String nationalIdentificationNumber;
-
- /**
- * The ISO 3166-1-alpha-2 code of the account holder's country.
- *
- * {@code SE}
- */
- @JsonProperty(value = "AddressCountry")
- String addressCountry;
-
- /**
- * Postal code of the account holder.
- *
- * {@code SE-11253}
- */
- @JsonProperty(value = "AddressPostalCode")
- String addressPostalCode;
-
- /**
- * City of the account holder.
- *
- * {@code Stockholm}
- */
- @JsonProperty(value = "AddressCity")
- String addressCity;
-
- /**
- * Street address of the account holder.
- *
- * {@code Main street 1}
- */
- @JsonProperty(value = "AddressLine1")
- String addressLine1;
-
- /**
- * Additional address information of the account holder.
- *
- * {@code Apartment 123, 2 stairs up}
- */
- @JsonProperty(value = "AddressLine2")
- String addressLine2;
-
- /**
- * The entire address of the account holder. This attribute should only be used if you are unable to provide the address information in
- * the 5 separate attributes above (AddressCountry, AddressPostalCode, AddressCity, AddressLine1 and AddressLine2).
- *
- * {@code Birgerstreet 14, SE-11411 Stockholm, Sweden}
- */
- @JsonProperty(value = "Address")
- String address;
-
- /**
- * The email address of the account holder.
- *
- * {@code test@trustly.com}
- */
- @JsonProperty(value = "Email")
- @Email
- String email;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutResponseData.java b/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutResponseData.java
deleted file mode 100644
index 37118db..0000000
--- a/src/main/java/com/trustly/api/domain/methods/registeraccountpayout/RegisterAccountPayoutResponseData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.trustly.api.domain.methods.registeraccountpayout;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import com.trustly.api.domain.common.StringBooleanDeserializer;
-import com.trustly.api.domain.common.StringBooleanSerializer;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class RegisterAccountPayoutResponseData extends AbstractResponseResultData {
-
- /**
- * The globally unique OrderID the account payout order was assigned in our system .
- */
- @JsonProperty("orderid")
- long orderId;
-
- /**
- * "1" if the payout could be accepted and "0" otherwise .
- */
- @JsonProperty("result")
- @JsonSerialize(using = StringBooleanSerializer.class)
- @JsonDeserialize(using = StringBooleanDeserializer.class)
- boolean result;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestData.java b/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestData.java
deleted file mode 100644
index 61b580c..0000000
--- a/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestData.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.trustly.api.domain.methods.selectaccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-import org.hibernate.validator.constraints.URL;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class SelectAccountRequestData extends AbstractToTrustlyRequestData{@code https://example.com/trustly/notification/a2b63j23dj23883jhfhfh}
- */
- @JsonProperty(value = "NotificationURL", required = true)
- @NotBlank
- @URL
- String notificationUrl;
-
- /**
- * ID, username, hash or anything uniquely identifying the end-user to be identified. Preferably the same ID/username as used in the
- * merchant's own backoffice in order to simplify for the merchant's support department
- */
- @JsonProperty(value = "EndUserID", required = true)
- @NotBlank
- String endUserId;
-
- /**
- * Your unique ID for the account selection order. Each order you create must have an unique MessageID.
- */
- @JsonProperty(value = "MessageID", required = true)
- @NotBlank
- String messageId;
-}
-
diff --git a/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestDataAttributes.java
deleted file mode 100644
index b51e5bd..0000000
--- a/src/main/java/com/trustly/api/domain/methods/selectaccount/SelectAccountRequestDataAttributes.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.trustly.api.domain.methods.selectaccount;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.common.AbstractAccountDataAttributes;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class SelectAccountRequestDataAttributes extends AbstractAccountDataAttributes {
-
- /**
- * Only for Trustly Direct Debit. Request a direct debit mandate from the selected account. 1 or 0. See section "Direct Debit Mandates"
- * below for details.
- * {@code 1979-01-31}
- */
- @JsonProperty(value = "DateOfBirth")
- String dateOfBirth;
-
- /**
- * Human-readable identifier of the consumer-facing merchant(e.g.legal name or trade name)
- *
- * {@code Merchant Ltd.}
- */
- @JsonProperty(value = "pspMerchant")
- String pspMerchant;
-
- /**
- * URL of the consumer-facing website where the order is initiated
- *
- * {@code www.merchant.com}
- */
- @JsonProperty(value = "PSPMerchantURL")
- String pspMerchantUrl;
-
- /**
- * VISA category codes describing the merchant's nature of business.
- *
- * {@code 7653345737}
- */
- @JsonProperty("orderid")
- String orderId;
-
- /**
- * The URL that should be loaded so that the end-user can complete the identification process.
- *
- * {@code https://trustly.com/_/2f6b14fa-446a-4364-92f8-84b738d589ff}
- */
- @JsonProperty("url")
- String url;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportParser.java b/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportParser.java
deleted file mode 100644
index 1be6825..0000000
--- a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportParser.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package com.trustly.api.domain.methods.settlementreport;
-
-import com.trustly.api.domain.methods.settlementreport.SettlementReportResponseDataEntry.SettlementReportResponseDataEntryBuilder;
-import java.time.Instant;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatterBuilder;
-import java.time.format.DateTimeParseException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-public class SettlementReportParser {
-
- @FunctionalInterface
- public interface Mapper {
-
- void map(SettlementReportResponseDataEntryBuilder row, String value);
- }
-
- private static final Mapper NOOP_MAPPER = (row, value) -> {
- };
-
- private static final DateTimeFormatter[] DATE_TIME_FORMATTERS = new DateTimeFormatter[]{
-
- new DateTimeFormatterBuilder()
- .parseCaseInsensitive()
- .append(DateTimeFormatter.ISO_LOCAL_DATE)
- .appendLiteral(' ')
- .append(DateTimeFormatter.ISO_LOCAL_TIME)
- .appendOffsetId()
- .toFormatter(Locale.ROOT),
-
- DateTimeFormatter.ISO_DATE_TIME,
- DateTimeFormatter.ISO_INSTANT
- };
-
- private final Map{@code 2014-04-01}
- */
- @JsonProperty(value = "SettlementDate")
- String settlementDate;
-}
-
-
diff --git a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportRequestDataAttributes.java b/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportRequestDataAttributes.java
deleted file mode 100644
index 65e4c04..0000000
--- a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportRequestDataAttributes.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.trustly.api.domain.methods.settlementreport;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractRequestParamsDataAttributes;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.Pattern;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class SettlementReportRequestDataAttributes extends AbstractRequestParamsDataAttributes {
-
- /**
- * Required. The APIVersion.
- *
- * {@code 1.2}
- */
- @JsonProperty(value = "APIVersion", required = true)
- @NotBlank
- @Pattern(regexp = "1\\.2")
- String apiVersion;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportResponseData.java b/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportResponseData.java
deleted file mode 100644
index a34288c..0000000
--- a/src/main/java/com/trustly/api/domain/methods/settlementreport/SettlementReportResponseData.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.trustly.api.domain.methods.settlementreport;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractResponseResultData;
-import java.util.List;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-
-@Value
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@AllArgsConstructor
-@Jacksonized
-public class SettlementReportResponseData extends AbstractResponseResultData {
-
- String csvContent;
-
- @JsonIgnore
- List{@code 2014-03-31 11:50:06.46106+00}
- */
- Instant datestamp;
-
- /**
- * MessageID of the order associated with the transaction, if available.
- */
- String messageId;
-
- /**
- * OrderID of the order associated with the transaction, if available.
- */
- String orderId;
-
- /**
- * The type of the order associated with the transaction, if available.Text See list of possible orderypes in the table below.
- */
- String orderType;
-
- /**
- * The sum of all amounts of the respective currency within the report.
- */
- Double total;
-
- /**
- * The username of the child merchant account.
- */
- String username;
-
- /**
- * The amount that the end user paid, if the currency is different from the requested deposit currency. For transactions where the payment
- * currency is the same as the requested currency, this field will be empty.
- */
- Double fxPaymentAmount;
-
- /**
- * The currency that the user paid with, if the currency is different from the requested deposit currency. For transactions where the
- * payment currency is the same as the requested currency, this field will be empty.
- */
- String fxPaymentCurrency;
-
- /**
- * The 10 digit reference that will show up on the merchant's bank statement for this automatic settlement batch. The same value will be
- * sent on every row in the report.
- */
- String settlementBankWithdrawalId;
-
- /**
- * Contains the ExternalReference value for Deposit, Charge, and Refund transactions if provided.Otherwise empty.
- */
- @JsonAlias("extraRef")
- String externalReference;
-}
diff --git a/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawRequestData.java b/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawRequestData.java
deleted file mode 100644
index 9d08f65..0000000
--- a/src/main/java/com/trustly/api/domain/methods/withdraw/WithdrawRequestData.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.trustly.api.domain.methods.withdraw;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.trustly.api.domain.base.AbstractToTrustlyRequestData;
-import jakarta.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.SuperBuilder;
-import lombok.extern.jackson.Jacksonized;
-import org.hibernate.validator.constraints.URL;
-
-@Data
-@SuperBuilder(toBuilder = true)
-@EqualsAndHashCode(callSuper = true)
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Jacksonized
-@JsonInclude(Include.NON_NULL)
-public class WithdrawRequestData extends AbstractToTrustlyRequestData
- *
- */
- @JsonProperty(value = "Address")
- String address;
-
- /**
- * The ExternalReference is a reference set by the merchant for any purpose and does not need to be unique for every API call. The
- * ExternalReference will be included in version 1.2 of the settlement report, ViewAutomaticSettlementDetailsCSV.
- */
- @JsonProperty(value = "ExternalReference")
- String externalReference;
-
- /**
- * Human-readable identifier of the consumer-facing merchant (e.g. legal name or trade name)
- *
- *