From cb41ac59f7b17f6fc67e053f1c969b3bdcf5e078 Mon Sep 17 00:00:00 2001 From: Giorgos Adam Date: Fri, 26 Oct 2018 17:32:52 +0200 Subject: [PATCH 1/3] Added OSGI manifest Added checkstyles --- checkstyle.xml | 172 +++++ pom.xml | 54 +- .../java/com/adyen/Util/HMACValidator.java | 19 +- .../com/adyen/constants/ApiConstants.java | 9 +- .../java/com/adyen/enums/Environment.java | 22 +- .../java/com/adyen/enums/VatCategory.java | 8 +- .../adyen/httpclient/HTTPClientException.java | 5 +- .../httpclient/HttpURLConnectionClient.java | 22 +- src/main/java/com/adyen/model/Address.java | 348 +++++----- .../java/com/adyen/model/BankAccount.java | 478 +++++++------- .../java/com/adyen/model/BrowserInfo.java | 161 ++--- src/main/java/com/adyen/model/Card.java | 439 +++++++------ src/main/java/com/adyen/model/ELV.java | 303 ++++----- src/main/java/com/adyen/model/ForexQuote.java | 619 +++++++++--------- .../com/adyen/model/FraudCheckResult.java | 205 +++--- .../java/com/adyen/model/Installments.java | 99 +-- src/main/java/com/adyen/model/Name.java | 291 ++++---- .../java/com/adyen/model/PaymentResult.java | 2 - .../com/adyen/model/ThreeDSecureData.java | 434 ++++++------ .../java/com/adyen/model/TokenDetails.java | 159 ++--- .../com/adyen/model/checkout/InputDetail.java | 28 +- .../model/checkout/ModelConfiguration.java | 10 +- .../adyen/model/checkout/PaymentMethod.java | 43 +- .../model/checkout/PaymentSessionRequest.java | 191 ++++-- .../adyen/model/checkout/PaymentsRequest.java | 33 +- .../adyen/model/checkout/RecurringDetail.java | 45 +- .../UpdateAccountHolderStateResponse.java | 2 - .../ExchangeMessageContainer.java | 1 - ...TestNotificationConfigurationResponse.java | 6 +- .../notification/NotificationRequest.java | 4 +- .../adyen/model/recurring/DisableRequest.java | 258 ++++---- .../adyen/model/recurring/DisableResult.java | 171 ++--- .../com/adyen/model/recurring/Recurring.java | 227 +++---- .../model/recurring/RecurringDetail.java | 2 +- src/main/java/com/adyen/service/Checkout.java | 18 +- src/main/java/com/adyen/service/Fund.java | 2 +- .../com/adyen/service/HostedPaymentPages.java | 2 +- .../java/com/adyen/service/Modification.java | 24 +- .../java/com/adyen/service/Notification.java | 39 +- src/main/java/com/adyen/service/Payout.java | 2 - .../resource/modification/Capture.java | 1 - src/test/java/com/adyen/MarketPayTest.java | 2 +- 42 files changed, 2655 insertions(+), 2305 deletions(-) create mode 100644 checkstyle.xml diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 000000000..51f711dab --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index b45f4bb4d..0ac039c8c 100644 --- a/pom.xml +++ b/pom.xml @@ -42,19 +42,11 @@ - maven-assembly-plugin - - - package - - single - - - + maven-jar-plugin - - jar-with-dependencies - + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + @@ -126,6 +118,44 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.0.0 + + checkstyle.xml + UTF-8 + true + true + + + + validate + validate + + check + + + + + + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + + + com.adyen + + + diff --git a/src/main/java/com/adyen/Util/HMACValidator.java b/src/main/java/com/adyen/Util/HMACValidator.java index b4e931b95..4eb058074 100644 --- a/src/main/java/com/adyen/Util/HMACValidator.java +++ b/src/main/java/com/adyen/Util/HMACValidator.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -20,10 +20,6 @@ */ package com.adyen.Util; -import static com.adyen.constants.ApiConstants.AdditionalData.HMAC_SIGNATURE; - -import com.adyen.model.Amount; -import com.adyen.model.notification.NotificationRequestItem; import java.nio.charset.Charset; import java.security.SignatureException; import java.util.ArrayList; @@ -33,10 +29,13 @@ import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Hex; +import com.adyen.model.Amount; +import com.adyen.model.notification.NotificationRequestItem; +import static com.adyen.constants.ApiConstants.AdditionalData.HMAC_SIGNATURE; public class HMACValidator { - public final static String HMAC_SHA256_ALGORITHM = "HmacSHA256"; - public final static Charset C_UTF8 = Charset.forName("UTF8"); + public static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + public static final Charset C_UTF8 = Charset.forName("UTF8"); public static final String DATA_SEPARATOR = ":"; // To calculate the HMAC SHA-256 @@ -64,13 +63,11 @@ public String calculateHMAC(String data, String key) throws java.security.Signat } // To calculate the HMAC SHA-256 - public String calculateHMAC(NotificationRequestItem notificationRequestItem, String key) - throws SignatureException { + public String calculateHMAC(NotificationRequestItem notificationRequestItem, String key) throws SignatureException { return calculateHMAC(getDataToSign(notificationRequestItem), key); } - public boolean validateHMAC(NotificationRequestItem notificationRequestItem, String key) - throws SignatureException { + public boolean validateHMAC(NotificationRequestItem notificationRequestItem, String key) throws SignatureException { final String expectedSign = calculateHMAC(notificationRequestItem, key); final String merchantSign = notificationRequestItem.getAdditionalData().get(HMAC_SIGNATURE); diff --git a/src/main/java/com/adyen/constants/ApiConstants.java b/src/main/java/com/adyen/constants/ApiConstants.java index 6db112d3b..985840c1e 100644 --- a/src/main/java/com/adyen/constants/ApiConstants.java +++ b/src/main/java/com/adyen/constants/ApiConstants.java @@ -98,14 +98,13 @@ interface PaymentMethodType { String TYPE_SCHEME = "scheme"; } - interface RequestProperty - { + interface RequestProperty { String IDEMPOTENCY_KEY = "Idempotency-Key"; String ACCEPT_CHARSET = "Accept-Charset"; String USER_AGENT = "User-Agent"; - String METHOD_POST ="POST"; - String CONTENT_TYPE ="Content-Type"; + String METHOD_POST = "POST"; + String CONTENT_TYPE = "Content-Type"; String API_KEY = "x-api-key"; - String APPLICATION_JSON_TYPE ="application/json"; + String APPLICATION_JSON_TYPE = "application/json"; } } diff --git a/src/main/java/com/adyen/enums/Environment.java b/src/main/java/com/adyen/enums/Environment.java index 8bb68df0d..fe94709a1 100644 --- a/src/main/java/com/adyen/enums/Environment.java +++ b/src/main/java/com/adyen/enums/Environment.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -21,14 +21,14 @@ package com.adyen.enums; public enum Environment { - TEST { - public String toString(){ - return "TEST"; - } - }, - LIVE{ - public String toString(){ - return "LIVE"; - } - } + TEST { + public String toString() { + return "TEST"; + } + }, + LIVE { + public String toString() { + return "LIVE"; + } + } } diff --git a/src/main/java/com/adyen/enums/VatCategory.java b/src/main/java/com/adyen/enums/VatCategory.java index 703ce4fdf..4cfed5269 100644 --- a/src/main/java/com/adyen/enums/VatCategory.java +++ b/src/main/java/com/adyen/enums/VatCategory.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -22,17 +22,17 @@ public enum VatCategory { HIGH { - public String toString(){ + public String toString() { return "High"; } }, LOW { - public String toString(){ + public String toString() { return "Low"; } }, NONE { - public String toString(){ + public String toString() { return "None"; } } diff --git a/src/main/java/com/adyen/httpclient/HTTPClientException.java b/src/main/java/com/adyen/httpclient/HTTPClientException.java index b2adfdc45..4c856c499 100644 --- a/src/main/java/com/adyen/httpclient/HTTPClientException.java +++ b/src/main/java/com/adyen/httpclient/HTTPClientException.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -28,7 +28,8 @@ public class HTTPClientException extends Exception { private Map> responseHeaders = null; private String responseBody = null; - public HTTPClientException() {} + public HTTPClientException() { + } public HTTPClientException(Throwable throwable) { super(throwable); diff --git a/src/main/java/com/adyen/httpclient/HttpURLConnectionClient.java b/src/main/java/com/adyen/httpclient/HttpURLConnectionClient.java index 652e85777..7bb53fb3d 100644 --- a/src/main/java/com/adyen/httpclient/HttpURLConnectionClient.java +++ b/src/main/java/com/adyen/httpclient/HttpURLConnectionClient.java @@ -20,11 +20,6 @@ */ package com.adyen.httpclient; -import com.adyen.Client; -import com.adyen.Config; -import com.adyen.model.RequestOptions; -import org.apache.commons.codec.binary.Base64; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -35,8 +30,17 @@ import java.net.URLEncoder; import java.util.Map; import java.util.Scanner; - -import static com.adyen.constants.ApiConstants.RequestProperty.*; +import org.apache.commons.codec.binary.Base64; +import com.adyen.Client; +import com.adyen.Config; +import com.adyen.model.RequestOptions; +import static com.adyen.constants.ApiConstants.RequestProperty.ACCEPT_CHARSET; +import static com.adyen.constants.ApiConstants.RequestProperty.API_KEY; +import static com.adyen.constants.ApiConstants.RequestProperty.APPLICATION_JSON_TYPE; +import static com.adyen.constants.ApiConstants.RequestProperty.CONTENT_TYPE; +import static com.adyen.constants.ApiConstants.RequestProperty.IDEMPOTENCY_KEY; +import static com.adyen.constants.ApiConstants.RequestProperty.METHOD_POST; +import static com.adyen.constants.ApiConstants.RequestProperty.USER_AGENT; public class HttpURLConnectionClient implements ClientInterface { private static final String CHARSET = "UTF-8"; @@ -66,7 +70,7 @@ public String request(String requestUrl, String requestBody, Config config, bool String apiKey = config.getApiKey(); int connectionTimeoutMillis = config.getConnectionTimeoutMillis(); // Use Api key if required or if provided - if (isApiKeyRequired || (apiKey != null && !apiKey.isEmpty())) { + if (isApiKeyRequired || (apiKey != null && ! apiKey.isEmpty())) { setApiKey(httpConnection, apiKey); } else { setBasicAuthentication(httpConnection, config.getUsername(), config.getPassword()); @@ -178,7 +182,7 @@ private HttpURLConnection setContentType(HttpURLConnection httpConnection, Strin * Sets api key */ private HttpURLConnection setApiKey(HttpURLConnection httpConnection, String apiKey) { - if (apiKey != null && !apiKey.isEmpty()) { + if (apiKey != null && ! apiKey.isEmpty()) { httpConnection.setRequestProperty(API_KEY, apiKey); } return httpConnection; diff --git a/src/main/java/com/adyen/model/Address.java b/src/main/java/com/adyen/model/Address.java index 8607383ed..8eaa519c1 100644 --- a/src/main/java/com/adyen/model/Address.java +++ b/src/main/java/com/adyen/model/Address.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,175 +27,181 @@ * Address */ public class Address { - @SerializedName("city") - private String city = null; - - @SerializedName("country") - private String country = null; - - @SerializedName("houseNumberOrName") - private String houseNumberOrName = null; - - @SerializedName("postalCode") - private String postalCode = null; - - @SerializedName("stateOrProvince") - private String stateOrProvince = null; - - @SerializedName("street") - private String street = null; - - public Address city(String city) { - this.city = city; - return this; - } - - /** - * the city - * @return city - **/ - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public Address country(String country) { - this.country = country; - return this; - } - - /** - * the two letter country code (ISO 3166-1) - * @return country - **/ - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public Address houseNumberOrName(String houseNumberOrName) { - this.houseNumberOrName = houseNumberOrName; - return this; - } - - /** - * the house number or name - * @return houseNumberOrName - **/ - public String getHouseNumberOrName() { - return houseNumberOrName; - } - - public void setHouseNumberOrName(String houseNumberOrName) { - this.houseNumberOrName = houseNumberOrName; - } - - public Address postalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** - * the postal / zip code - * @return postalCode - **/ - public String getPostalCode() { - return postalCode; - } - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - public Address stateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - return this; - } - - /** - * the state or province - * @return stateOrProvince - **/ - public String getStateOrProvince() { - return stateOrProvince; - } - - public void setStateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - } - - public Address street(String street) { - this.street = street; - return this; - } - - /** - * the street name - * @return street - **/ - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Address address = (Address) o; - return Objects.equals(this.city, address.city) && - Objects.equals(this.country, address.country) && - Objects.equals(this.houseNumberOrName, address.houseNumberOrName) && - Objects.equals(this.postalCode, address.postalCode) && - Objects.equals(this.stateOrProvince, address.stateOrProvince) && - Objects.equals(this.street, address.street); - } - - @Override - public int hashCode() { - return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Address {\n"); - - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + @SerializedName("city") + private String city = null; + + @SerializedName("country") + private String country = null; + + @SerializedName("houseNumberOrName") + private String houseNumberOrName = null; + + @SerializedName("postalCode") + private String postalCode = null; + + @SerializedName("stateOrProvince") + private String stateOrProvince = null; + + @SerializedName("street") + private String street = null; + + public Address city(String city) { + this.city = city; + return this; + } + + /** + * the city + * + * @return city + **/ + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public Address country(String country) { + this.country = country; + return this; + } + + /** + * the two letter country code (ISO 3166-1) + * + * @return country + **/ + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public Address houseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + return this; + } + + /** + * the house number or name + * + * @return houseNumberOrName + **/ + public String getHouseNumberOrName() { + return houseNumberOrName; + } + + public void setHouseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + } + + public Address postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * the postal / zip code + * + * @return postalCode + **/ + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + public Address stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * the state or province + * + * @return stateOrProvince + **/ + public String getStateOrProvince() { + return stateOrProvince; + } + + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + } + + public Address street(String street) { + this.street = street; + return this; + } + + /** + * the street name + * + * @return street + **/ + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Address address = (Address) o; + return Objects.equals(this.city, address.city) + && Objects.equals(this.country, address.country) + && Objects.equals(this.houseNumberOrName, address.houseNumberOrName) + && Objects.equals(this.postalCode, address.postalCode) + && Objects.equals(this.stateOrProvince, address.stateOrProvince) + && Objects.equals(this.street, address.street); + } + + @Override + public int hashCode() { + return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Address {\n"); + + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/BankAccount.java b/src/main/java/com/adyen/model/BankAccount.java index 509b8019d..3e990a457 100644 --- a/src/main/java/com/adyen/model/BankAccount.java +++ b/src/main/java/com/adyen/model/BankAccount.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,241 +27,251 @@ * BankAccount */ public class BankAccount { - @SerializedName("iban") - private String iban = null; - - @SerializedName("ownerName") - private String ownerName = null; - - @SerializedName("bankName") - private String bankName = null; - - @SerializedName("taxId") - private String taxId = null; - - @SerializedName("bankCity") - private String bankCity = null; - - @SerializedName("countryCode") - private String countryCode = null; - - @SerializedName("bankAccountNumber") - private String bankAccountNumber = null; - - @SerializedName("bankLocationId") - private String bankLocationId = null; - - @SerializedName("bic") - private String bic = null; - - public BankAccount iban(String iban) { - this.iban = iban; - return this; - } - - /** - * the international bank account number - * @return iban - **/ - public String getIban() { - return iban; - } - - public void setIban(String iban) { - this.iban = iban; - } - - public BankAccount ownerName(String ownerName) { - this.ownerName = ownerName; - return this; - } - - /** - * the bank account holder name - * @return ownerName - **/ - public String getOwnerName() { - return ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public BankAccount bankName(String bankName) { - this.bankName = bankName; - return this; - } - - /** - * the name of the bank - * @return bankName - **/ - public String getBankName() { - return bankName; - } - - public void setBankName(String bankName) { - this.bankName = bankName; - } - - public BankAccount taxId(String taxId) { - this.taxId = taxId; - return this; - } - - /** - * the bank account holder TAX id - * @return taxId - **/ - public String getTaxId() { - return taxId; - } - - public void setTaxId(String taxId) { - this.taxId = taxId; - } - - public BankAccount bankCity(String bankCity) { - this.bankCity = bankCity; - return this; - } - - /** - * the bank city - * @return bankCity - **/ - public String getBankCity() { - return bankCity; - } - - public void setBankCity(String bankCity) { - this.bankCity = bankCity; - } - - public BankAccount countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * the two letter country code where the bank account is located (ISO 3166-1) - * @return countryCode - **/ - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - public BankAccount bankAccountNumber(String bankAccountNumber) { - this.bankAccountNumber = bankAccountNumber; - return this; - } - - /** - * the bank account number (without separators) - * @return bankAccountNumber - **/ - public String getBankAccountNumber() { - return bankAccountNumber; - } - - public void setBankAccountNumber(String bankAccountNumber) { - this.bankAccountNumber = bankAccountNumber; - } - - public BankAccount bankLocationId(String bankLocationId) { - this.bankLocationId = bankLocationId; - return this; - } - - /** - * the bank transit routing number - * @return bankLocationId - **/ - public String getBankLocationId() { - return bankLocationId; - } - - public void setBankLocationId(String bankLocationId) { - this.bankLocationId = bankLocationId; - } - - public BankAccount bic(String bic) { - this.bic = bic; - return this; - } - - /** - * the business identifier code - * @return bic - **/ - public String getBic() { - return bic; - } - - public void setBic(String bic) { - this.bic = bic; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @SerializedName("iban") + private String iban = null; + + @SerializedName("ownerName") + private String ownerName = null; + + @SerializedName("bankName") + private String bankName = null; + + @SerializedName("taxId") + private String taxId = null; + + @SerializedName("bankCity") + private String bankCity = null; + + @SerializedName("countryCode") + private String countryCode = null; + + @SerializedName("bankAccountNumber") + private String bankAccountNumber = null; + + @SerializedName("bankLocationId") + private String bankLocationId = null; + + @SerializedName("bic") + private String bic = null; + + public BankAccount iban(String iban) { + this.iban = iban; + return this; + } + + /** + * the international bank account number + * + * @return iban + **/ + public String getIban() { + return iban; + } + + public void setIban(String iban) { + this.iban = iban; + } + + public BankAccount ownerName(String ownerName) { + this.ownerName = ownerName; + return this; + } + + /** + * the bank account holder name + * + * @return ownerName + **/ + public String getOwnerName() { + return ownerName; } - if (o == null || getClass() != o.getClass()) { - return false; + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + public BankAccount bankName(String bankName) { + this.bankName = bankName; + return this; + } + + /** + * the name of the bank + * + * @return bankName + **/ + public String getBankName() { + return bankName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public BankAccount taxId(String taxId) { + this.taxId = taxId; + return this; } - BankAccount bankAccount = (BankAccount) o; - return Objects.equals(this.iban, bankAccount.iban) && - Objects.equals(this.ownerName, bankAccount.ownerName) && - Objects.equals(this.bankName, bankAccount.bankName) && - Objects.equals(this.taxId, bankAccount.taxId) && - Objects.equals(this.bankCity, bankAccount.bankCity) && - Objects.equals(this.countryCode, bankAccount.countryCode) && - Objects.equals(this.bankAccountNumber, bankAccount.bankAccountNumber) && - Objects.equals(this.bankLocationId, bankAccount.bankLocationId) && - Objects.equals(this.bic, bankAccount.bic); - } - - @Override - public int hashCode() { - return Objects.hash(iban, ownerName, bankName, taxId, bankCity, countryCode, bankAccountNumber, bankLocationId, bic); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BankAccount {\n"); - - sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); - sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); - sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); - sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); - sb.append(" bankCity: ").append(toIndentedString(bankCity)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n"); - sb.append(" bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n"); - sb.append(" bic: ").append(toIndentedString(bic)).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(Object o) { - if (o == null) { - return "null"; + + /** + * the bank account holder TAX id + * + * @return taxId + **/ + public String getTaxId() { + return taxId; + } + + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + public BankAccount bankCity(String bankCity) { + this.bankCity = bankCity; + return this; + } + + /** + * the bank city + * + * @return bankCity + **/ + public String getBankCity() { + return bankCity; + } + + public void setBankCity(String bankCity) { + this.bankCity = bankCity; } - return o.toString().replace("\n", "\n "); - } - + + public BankAccount countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * the two letter country code where the bank account is located (ISO 3166-1) + * + * @return countryCode + **/ + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + public BankAccount bankAccountNumber(String bankAccountNumber) { + this.bankAccountNumber = bankAccountNumber; + return this; + } + + /** + * the bank account number (without separators) + * + * @return bankAccountNumber + **/ + public String getBankAccountNumber() { + return bankAccountNumber; + } + + public void setBankAccountNumber(String bankAccountNumber) { + this.bankAccountNumber = bankAccountNumber; + } + + public BankAccount bankLocationId(String bankLocationId) { + this.bankLocationId = bankLocationId; + return this; + } + + /** + * the bank transit routing number + * + * @return bankLocationId + **/ + public String getBankLocationId() { + return bankLocationId; + } + + public void setBankLocationId(String bankLocationId) { + this.bankLocationId = bankLocationId; + } + + public BankAccount bic(String bic) { + this.bic = bic; + return this; + } + + /** + * the business identifier code + * + * @return bic + **/ + public String getBic() { + return bic; + } + + public void setBic(String bic) { + this.bic = bic; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankAccount bankAccount = (BankAccount) o; + return Objects.equals(this.iban, bankAccount.iban) + && Objects.equals(this.ownerName, bankAccount.ownerName) + && Objects.equals(this.bankName, bankAccount.bankName) + && Objects.equals(this.taxId, + bankAccount.taxId) + && Objects.equals(this.bankCity, bankAccount.bankCity) + && Objects.equals(this.countryCode, bankAccount.countryCode) + && Objects.equals(this.bankAccountNumber, bankAccount.bankAccountNumber) + && Objects.equals(this.bankLocationId, bankAccount.bankLocationId) + && Objects.equals(this.bic, bankAccount.bic); + } + + @Override + public int hashCode() { + return Objects.hash(iban, ownerName, bankName, taxId, bankCity, countryCode, bankAccountNumber, bankLocationId, bic); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankAccount {\n"); + + sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); + sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" bankCity: ").append(toIndentedString(bankCity)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n"); + sb.append(" bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n"); + sb.append(" bic: ").append(toIndentedString(bic)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/BrowserInfo.java b/src/main/java/com/adyen/model/BrowserInfo.java index 36da557f3..3a8784d92 100644 --- a/src/main/java/com/adyen/model/BrowserInfo.java +++ b/src/main/java/com/adyen/model/BrowserInfo.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,87 +27,88 @@ * BrowserInfo */ public class BrowserInfo { - @SerializedName("userAgent") - private String userAgent = null; - - @SerializedName("acceptHeader") - private String acceptHeader = null; - - public BrowserInfo userAgent(String userAgent) { - this.userAgent = userAgent; - return this; - } - - /** - * the user agent value of the shopper's browser - * @return userAgent - **/ - public String getUserAgent() { - return userAgent; - } - - public void setUserAgent(String userAgent) { - this.userAgent = userAgent; - } - - public BrowserInfo acceptHeader(String acceptHeader) { - this.acceptHeader = acceptHeader; - return this; - } - - /** - * the accept header value of the shopper's browser - * @return acceptHeader - **/ - public String getAcceptHeader() { - return acceptHeader; - } - - public void setAcceptHeader(String acceptHeader) { - this.acceptHeader = acceptHeader; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @SerializedName("userAgent") + private String userAgent = null; + + @SerializedName("acceptHeader") + private String acceptHeader = null; + + public BrowserInfo userAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * the user agent value of the shopper's browser + * + * @return userAgent + **/ + public String getUserAgent() { + return userAgent; + } + + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + public BrowserInfo acceptHeader(String acceptHeader) { + this.acceptHeader = acceptHeader; + return this; } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * the accept header value of the shopper's browser + * + * @return acceptHeader + **/ + public String getAcceptHeader() { + return acceptHeader; } - BrowserInfo browserInfo = (BrowserInfo) o; - return Objects.equals(this.userAgent, browserInfo.userAgent) && - Objects.equals(this.acceptHeader, browserInfo.acceptHeader); - } - - @Override - public int hashCode() { - return Objects.hash(userAgent, acceptHeader); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BrowserInfo {\n"); - - sb.append(" userAgent: ").append(toIndentedString(userAgent)).append("\n"); - sb.append(" acceptHeader: ").append(toIndentedString(acceptHeader)).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(Object o) { - if (o == null) { - return "null"; + + public void setAcceptHeader(String acceptHeader) { + this.acceptHeader = acceptHeader; } - return o.toString().replace("\n", "\n "); - } - + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrowserInfo browserInfo = (BrowserInfo) o; + return Objects.equals(this.userAgent, browserInfo.userAgent) && Objects.equals(this.acceptHeader, browserInfo.acceptHeader); + } + + @Override + public int hashCode() { + return Objects.hash(userAgent, acceptHeader); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BrowserInfo {\n"); + + sb.append(" userAgent: ").append(toIndentedString(userAgent)).append("\n"); + sb.append(" acceptHeader: ").append(toIndentedString(acceptHeader)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/Card.java b/src/main/java/com/adyen/model/Card.java index 70bee7d91..d966ab4ce 100644 --- a/src/main/java/com/adyen/model/Card.java +++ b/src/main/java/com/adyen/model/Card.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,219 +27,228 @@ * Card */ public class Card { - @SerializedName("expiryMonth") - private String expiryMonth = null; - - @SerializedName("expiryYear") - private String expiryYear = null; - - @SerializedName("cvc") - private String cvc = null; - - @SerializedName("holderName") - private String holderName = null; - - @SerializedName("issueNumber") - private String issueNumber = null; - - @SerializedName("number") - private String number = null; - - @SerializedName("startMonth") - private String startMonth = null; - - @SerializedName("startYear") - private String startYear = null; - - public Card expiryMonth(String expiryMonth) { - this.expiryMonth = expiryMonth; - return this; - } - - /** - * the month component of the expiry date (may be left padded with 0 for single digits) - * @return expiryMonth - **/ - public String getExpiryMonth() { - return expiryMonth; - } - - public void setExpiryMonth(String expiryMonth) { - this.expiryMonth = expiryMonth; - } - - public Card expiryYear(String expiryYear) { - this.expiryYear = expiryYear; - return this; - } - - /** - * the year component of the expiry date - * @return expiryYear - **/ - public String getExpiryYear() { - return expiryYear; - } - - public void setExpiryYear(String expiryYear) { - this.expiryYear = expiryYear; - } - - public Card cvc(String cvc) { - this.cvc = cvc; - return this; - } - - /** - * the card security code which, depending on card brand, is referred to as CVV2/CVC2 (three digits) or CID (4 digits) - * @return cvc - **/ - public String getCvc() { - return cvc; - } - - public void setCvc(String cvc) { - this.cvc = cvc; - } - - public Card holderName(String holderName) { - this.holderName = holderName; - return this; - } - - /** - * the cardholder name as printed on the card - * @return holderName - **/ - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public Card issueNumber(String issueNumber) { - this.issueNumber = issueNumber; - return this; - } - - /** - * for some UK debit cards only the issue number of the card - * @return issueNumber - **/ - public String getIssueNumber() { - return issueNumber; - } - - public void setIssueNumber(String issueNumber) { - this.issueNumber = issueNumber; - } - - public Card number(String number) { - this.number = number; - return this; - } - - /** - * the card number (without separators) - * @return number - **/ - public String getNumber() { - return number; - } - - public void setNumber(String number) { - this.number = number; - } - - public Card startMonth(String startMonth) { - this.startMonth = startMonth; - return this; - } - - /** - * for some UK debit cards only the month component of the start date - * @return startMonth - **/ - public String getStartMonth() { - return startMonth; - } - - public void setStartMonth(String startMonth) { - this.startMonth = startMonth; - } - - public Card startYear(String startYear) { - this.startYear = startYear; - return this; - } - - /** - * for some UK debit cards only the year component of the start date - * @return startYear - **/ - public String getStartYear() { - return startYear; - } - - public void setStartYear(String startYear) { - this.startYear = startYear; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Card card = (Card) o; - return Objects.equals(this.expiryMonth, card.expiryMonth) && - Objects.equals(this.expiryYear, card.expiryYear) && - Objects.equals(this.cvc, card.cvc) && - Objects.equals(this.holderName, card.holderName) && - Objects.equals(this.issueNumber, card.issueNumber) && - Objects.equals(this.number, card.number) && - Objects.equals(this.startMonth, card.startMonth) && - Objects.equals(this.startYear, card.startYear); - } - - @Override - public int hashCode() { - return Objects.hash(expiryMonth, expiryYear, cvc, holderName, issueNumber, number, startMonth, startYear); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Card {\n"); - - sb.append(" expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n"); - sb.append(" expiryYear: ").append(toIndentedString(expiryYear)).append("\n"); - sb.append(" cvc: ").append(toIndentedString(cvc)).append("\n"); - sb.append(" holderName: ").append(toIndentedString(holderName)).append("\n"); - sb.append(" issueNumber: ").append(toIndentedString(issueNumber)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" startMonth: ").append(toIndentedString(startMonth)).append("\n"); - sb.append(" startYear: ").append(toIndentedString(startYear)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + @SerializedName("expiryMonth") + private String expiryMonth = null; + + @SerializedName("expiryYear") + private String expiryYear = null; + + @SerializedName("cvc") + private String cvc = null; + + @SerializedName("holderName") + private String holderName = null; + + @SerializedName("issueNumber") + private String issueNumber = null; + + @SerializedName("number") + private String number = null; + + @SerializedName("startMonth") + private String startMonth = null; + + @SerializedName("startYear") + private String startYear = null; + + public Card expiryMonth(String expiryMonth) { + this.expiryMonth = expiryMonth; + return this; + } + + /** + * the month component of the expiry date (may be left padded with 0 for single digits) + * + * @return expiryMonth + **/ + public String getExpiryMonth() { + return expiryMonth; + } + + public void setExpiryMonth(String expiryMonth) { + this.expiryMonth = expiryMonth; + } + + public Card expiryYear(String expiryYear) { + this.expiryYear = expiryYear; + return this; + } + + /** + * the year component of the expiry date + * + * @return expiryYear + **/ + public String getExpiryYear() { + return expiryYear; + } + + public void setExpiryYear(String expiryYear) { + this.expiryYear = expiryYear; + } + + public Card cvc(String cvc) { + this.cvc = cvc; + return this; + } + + /** + * the card security code which, depending on card brand, is referred to as CVV2/CVC2 (three digits) or CID (4 digits) + * + * @return cvc + **/ + public String getCvc() { + return cvc; + } + + public void setCvc(String cvc) { + this.cvc = cvc; + } + + public Card holderName(String holderName) { + this.holderName = holderName; + return this; + } + + /** + * the cardholder name as printed on the card + * + * @return holderName + **/ + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public Card issueNumber(String issueNumber) { + this.issueNumber = issueNumber; + return this; + } + + /** + * for some UK debit cards only the issue number of the card + * + * @return issueNumber + **/ + public String getIssueNumber() { + return issueNumber; + } + + public void setIssueNumber(String issueNumber) { + this.issueNumber = issueNumber; + } + + public Card number(String number) { + this.number = number; + return this; + } + + /** + * the card number (without separators) + * + * @return number + **/ + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public Card startMonth(String startMonth) { + this.startMonth = startMonth; + return this; + } + + /** + * for some UK debit cards only the month component of the start date + * + * @return startMonth + **/ + public String getStartMonth() { + return startMonth; + } + + public void setStartMonth(String startMonth) { + this.startMonth = startMonth; + } + + public Card startYear(String startYear) { + this.startYear = startYear; + return this; + } + + /** + * for some UK debit cards only the year component of the start date + * + * @return startYear + **/ + public String getStartYear() { + return startYear; + } + + public void setStartYear(String startYear) { + this.startYear = startYear; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Card card = (Card) o; + return Objects.equals(this.expiryMonth, card.expiryMonth) + && Objects.equals(this.expiryYear, card.expiryYear) + && Objects.equals(this.cvc, card.cvc) + && Objects.equals(this.holderName, + card.holderName) + && Objects.equals(this.issueNumber, card.issueNumber) + && Objects.equals(this.number, card.number) + && Objects.equals(this.startMonth, card.startMonth) + && Objects.equals(this.startYear, card.startYear); + } + + @Override + public int hashCode() { + return Objects.hash(expiryMonth, expiryYear, cvc, holderName, issueNumber, number, startMonth, startYear); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Card {\n"); + + sb.append(" expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n"); + sb.append(" expiryYear: ").append(toIndentedString(expiryYear)).append("\n"); + sb.append(" cvc: ").append(toIndentedString(cvc)).append("\n"); + sb.append(" holderName: ").append(toIndentedString(holderName)).append("\n"); + sb.append(" issueNumber: ").append(toIndentedString(issueNumber)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" startMonth: ").append(toIndentedString(startMonth)).append("\n"); + sb.append(" startYear: ").append(toIndentedString(startYear)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/ELV.java b/src/main/java/com/adyen/model/ELV.java index 40838d782..3fd81e374 100644 --- a/src/main/java/com/adyen/model/ELV.java +++ b/src/main/java/com/adyen/model/ELV.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,153 +27,158 @@ * ELV */ public class ELV { - @SerializedName("bankName") - private String bankName = null; - - @SerializedName("bankAccountNumber") - private String bankAccountNumber = null; - - @SerializedName("bankLocationId") - private String bankLocationId = null; - - @SerializedName("bankLocation") - private String bankLocation = null; - - @SerializedName("accountHolderName") - private String accountHolderName = null; - - public ELV bankName(String bankName) { - this.bankName = bankName; - return this; - } - - /** - * Get bankName - * @return bankName - **/ - public String getBankName() { - return bankName; - } - - public void setBankName(String bankName) { - this.bankName = bankName; - } - - public ELV bankAccountNumber(String bankAccountNumber) { - this.bankAccountNumber = bankAccountNumber; - return this; - } - - /** - * Get bankAccountNumber - * @return bankAccountNumber - **/ - public String getBankAccountNumber() { - return bankAccountNumber; - } - - public void setBankAccountNumber(String bankAccountNumber) { - this.bankAccountNumber = bankAccountNumber; - } - - public ELV bankLocationId(String bankLocationId) { - this.bankLocationId = bankLocationId; - return this; - } - - /** - * Get bankLocationId - * @return bankLocationId - **/ - public String getBankLocationId() { - return bankLocationId; - } - - public void setBankLocationId(String bankLocationId) { - this.bankLocationId = bankLocationId; - } - - public ELV bankLocation(String bankLocation) { - this.bankLocation = bankLocation; - return this; - } - - /** - * Get bankLocation - * @return bankLocation - **/ - public String getBankLocation() { - return bankLocation; - } - - public void setBankLocation(String bankLocation) { - this.bankLocation = bankLocation; - } - - public ELV accountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } - - /** - * Get accountHolderName - * @return accountHolderName - **/ - public String getAccountHolderName() { - return accountHolderName; - } - - public void setAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ELV ELV = (ELV) o; - return Objects.equals(this.bankName, ELV.bankName) && - Objects.equals(this.bankAccountNumber, ELV.bankAccountNumber) && - Objects.equals(this.bankLocationId, ELV.bankLocationId) && - Objects.equals(this.bankLocation, ELV.bankLocation) && - Objects.equals(this.accountHolderName, ELV.accountHolderName); - } - - @Override - public int hashCode() { - return Objects.hash(bankName, bankAccountNumber, bankLocationId, bankLocation, accountHolderName); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ELV {\n"); - - sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); - sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n"); - sb.append(" bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n"); - sb.append(" bankLocation: ").append(toIndentedString(bankLocation)).append("\n"); - sb.append(" accountHolderName: ").append(toIndentedString(accountHolderName)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + @SerializedName("bankName") + private String bankName = null; + + @SerializedName("bankAccountNumber") + private String bankAccountNumber = null; + + @SerializedName("bankLocationId") + private String bankLocationId = null; + + @SerializedName("bankLocation") + private String bankLocation = null; + + @SerializedName("accountHolderName") + private String accountHolderName = null; + + public ELV bankName(String bankName) { + this.bankName = bankName; + return this; + } + + /** + * Get bankName + * + * @return bankName + **/ + public String getBankName() { + return bankName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public ELV bankAccountNumber(String bankAccountNumber) { + this.bankAccountNumber = bankAccountNumber; + return this; + } + + /** + * Get bankAccountNumber + * + * @return bankAccountNumber + **/ + public String getBankAccountNumber() { + return bankAccountNumber; + } + + public void setBankAccountNumber(String bankAccountNumber) { + this.bankAccountNumber = bankAccountNumber; + } + + public ELV bankLocationId(String bankLocationId) { + this.bankLocationId = bankLocationId; + return this; + } + + /** + * Get bankLocationId + * + * @return bankLocationId + **/ + public String getBankLocationId() { + return bankLocationId; + } + + public void setBankLocationId(String bankLocationId) { + this.bankLocationId = bankLocationId; + } + + public ELV bankLocation(String bankLocation) { + this.bankLocation = bankLocation; + return this; + } + + /** + * Get bankLocation + * + * @return bankLocation + **/ + public String getBankLocation() { + return bankLocation; + } + + public void setBankLocation(String bankLocation) { + this.bankLocation = bankLocation; + } + + public ELV accountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + + /** + * Get accountHolderName + * + * @return accountHolderName + **/ + public String getAccountHolderName() { + return accountHolderName; + } + + public void setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ELV elv = (ELV) o; + return Objects.equals(this.bankName, elv.bankName) + && Objects.equals(this.bankAccountNumber, elv.bankAccountNumber) + && Objects.equals(this.bankLocationId, elv.bankLocationId) + && Objects.equals(this.bankLocation, elv.bankLocation) + && Objects.equals(this.accountHolderName, elv.accountHolderName); + } + + @Override + public int hashCode() { + return Objects.hash(bankName, bankAccountNumber, bankLocationId, bankLocation, accountHolderName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ELV {\n"); + + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n"); + sb.append(" bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n"); + sb.append(" bankLocation: ").append(toIndentedString(bankLocation)).append("\n"); + sb.append(" accountHolderName: ").append(toIndentedString(accountHolderName)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/ForexQuote.java b/src/main/java/com/adyen/model/ForexQuote.java index c6dafe05c..f41f2ce48 100644 --- a/src/main/java/com/adyen/model/ForexQuote.java +++ b/src/main/java/com/adyen/model/ForexQuote.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -28,307 +28,320 @@ * ForexQuote */ public class ForexQuote { - @SerializedName("reference") - private String reference = null; - - @SerializedName("interbank") - private Amount interbank = null; - - @SerializedName("sell") - private Amount sell = null; - - @SerializedName("buy") - private Amount buy = null; - - @SerializedName("validTill") - private Date validTill = null; - - @SerializedName("basePoints") - private Integer basePoints = null; - - @SerializedName("source") - private String source = null; - - @SerializedName("signature") - private String signature = null; - - @SerializedName("type") - private String type = null; - - @SerializedName("baseAmount") - private Amount baseAmount = null; - - @SerializedName("account") - private String account = null; - - @SerializedName("accountType") - private String accountType = null; - - public ForexQuote reference(String reference) { - this.reference = reference; - return this; - } - - /** - * the reference assigned to the forex quote request - * @return reference - **/ - public String getReference() { - return reference; - } - - public void setReference(String reference) { - this.reference = reference; - } - - public ForexQuote interbank(Amount interbank) { - this.interbank = interbank; - return this; - } - - /** - * Get interbank - * @return interbank - **/ - public Amount getInterbank() { - return interbank; - } - - public void setInterbank(Amount interbank) { - this.interbank = interbank; - } - - public ForexQuote sell(Amount sell) { - this.sell = sell; - return this; - } - - /** - * the sell rate - * @return sell - **/ - public Amount getSell() { - return sell; - } - - public void setSell(Amount sell) { - this.sell = sell; - } - - public ForexQuote buy(Amount buy) { - this.buy = buy; - return this; - } - - /** - * the buy rate - * @return buy - **/ - public Amount getBuy() { - return buy; - } - - public void setBuy(Amount buy) { - this.buy = buy; - } - - public ForexQuote validTill(Date validTill) { - this.validTill = validTill; - return this; - } - - /** - * Get validTill - * @return validTill - **/ - public Date getValidTill() { - return validTill; - } - - public void setValidTill(Date validTill) { - this.validTill = validTill; - } - - public ForexQuote basePoints(Integer basePoints) { - this.basePoints = basePoints; - return this; - } - - /** - * Get basePoints - * @return basePoints - **/ - public Integer getBasePoints() { - return basePoints; - } - - public void setBasePoints(Integer basePoints) { - this.basePoints = basePoints; - } - - public ForexQuote source(String source) { - this.source = source; - return this; - } - - /** - * the source of the forex quote - * @return source - **/ - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public ForexQuote signature(String signature) { - this.signature = signature; - return this; - } - - /** - * the signature to validate the integrity - * @return signature - **/ - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public ForexQuote type(String type) { - this.type = type; - return this; - } - - /** - * the type of forex - * @return type - **/ - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public ForexQuote baseAmount(Amount baseAmount) { - this.baseAmount = baseAmount; - return this; - } - - /** - * the base amount - * @return baseAmount - **/ - public Amount getBaseAmount() { - return baseAmount; - } - - public void setBaseAmount(Amount baseAmount) { - this.baseAmount = baseAmount; - } - - public ForexQuote account(String account) { - this.account = account; - return this; - } - - /** - * the account name - * @return account - **/ - public String getAccount() { - return account; - } - - public void setAccount(String account) { - this.account = account; - } - - public ForexQuote accountType(String accountType) { - this.accountType = accountType; - return this; - } - - /** - * the account type - * @return accountType - **/ - public String getAccountType() { - return accountType; - } - - public void setAccountType(String accountType) { - this.accountType = accountType; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ForexQuote forexQuote = (ForexQuote) o; - return Objects.equals(this.reference, forexQuote.reference) && - Objects.equals(this.interbank, forexQuote.interbank) && - Objects.equals(this.sell, forexQuote.sell) && - Objects.equals(this.buy, forexQuote.buy) && - Objects.equals(this.validTill, forexQuote.validTill) && - Objects.equals(this.basePoints, forexQuote.basePoints) && - Objects.equals(this.source, forexQuote.source) && - Objects.equals(this.signature, forexQuote.signature) && - Objects.equals(this.type, forexQuote.type) && - Objects.equals(this.baseAmount, forexQuote.baseAmount) && - Objects.equals(this.account, forexQuote.account) && - Objects.equals(this.accountType, forexQuote.accountType); - } - - @Override - public int hashCode() { - return Objects.hash(reference, interbank, sell, buy, validTill, basePoints, source, signature, type, baseAmount, account, accountType); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ForexQuote {\n"); - - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append(" interbank: ").append(toIndentedString(interbank)).append("\n"); - sb.append(" sell: ").append(toIndentedString(sell)).append("\n"); - sb.append(" buy: ").append(toIndentedString(buy)).append("\n"); - sb.append(" validTill: ").append(toIndentedString(validTill)).append("\n"); - sb.append(" basePoints: ").append(toIndentedString(basePoints)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + @SerializedName("reference") + private String reference = null; + + @SerializedName("interbank") + private Amount interbank = null; + + @SerializedName("sell") + private Amount sell = null; + + @SerializedName("buy") + private Amount buy = null; + + @SerializedName("validTill") + private Date validTill = null; + + @SerializedName("basePoints") + private Integer basePoints = null; + + @SerializedName("source") + private String source = null; + + @SerializedName("signature") + private String signature = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("baseAmount") + private Amount baseAmount = null; + + @SerializedName("account") + private String account = null; + + @SerializedName("accountType") + private String accountType = null; + + public ForexQuote reference(String reference) { + this.reference = reference; + return this; + } + + /** + * the reference assigned to the forex quote request + * + * @return reference + **/ + public String getReference() { + return reference; + } + + public void setReference(String reference) { + this.reference = reference; + } + + public ForexQuote interbank(Amount interbank) { + this.interbank = interbank; + return this; + } + + /** + * Get interbank + * + * @return interbank + **/ + public Amount getInterbank() { + return interbank; + } + + public void setInterbank(Amount interbank) { + this.interbank = interbank; + } + + public ForexQuote sell(Amount sell) { + this.sell = sell; + return this; + } + + /** + * the sell rate + * + * @return sell + **/ + public Amount getSell() { + return sell; + } + + public void setSell(Amount sell) { + this.sell = sell; + } + + public ForexQuote buy(Amount buy) { + this.buy = buy; + return this; + } + + /** + * the buy rate + * + * @return buy + **/ + public Amount getBuy() { + return buy; + } + + public void setBuy(Amount buy) { + this.buy = buy; + } + + public ForexQuote validTill(Date validTill) { + this.validTill = validTill; + return this; + } + + /** + * Get validTill + * + * @return validTill + **/ + public Date getValidTill() { + return validTill; + } + + public void setValidTill(Date validTill) { + this.validTill = validTill; + } + + public ForexQuote basePoints(Integer basePoints) { + this.basePoints = basePoints; + return this; + } + + /** + * Get basePoints + * + * @return basePoints + **/ + public Integer getBasePoints() { + return basePoints; + } + + public void setBasePoints(Integer basePoints) { + this.basePoints = basePoints; + } + + public ForexQuote source(String source) { + this.source = source; + return this; + } + + /** + * the source of the forex quote + * + * @return source + **/ + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public ForexQuote signature(String signature) { + this.signature = signature; + return this; + } + + /** + * the signature to validate the integrity + * + * @return signature + **/ + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public ForexQuote type(String type) { + this.type = type; + return this; + } + + /** + * the type of forex + * + * @return type + **/ + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ForexQuote baseAmount(Amount baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * the base amount + * + * @return baseAmount + **/ + public Amount getBaseAmount() { + return baseAmount; + } + + public void setBaseAmount(Amount baseAmount) { + this.baseAmount = baseAmount; + } + + public ForexQuote account(String account) { + this.account = account; + return this; + } + + /** + * the account name + * + * @return account + **/ + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public ForexQuote accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * the account type + * + * @return accountType + **/ + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ForexQuote forexQuote = (ForexQuote) o; + return Objects.equals(this.reference, forexQuote.reference) + && Objects.equals(this.interbank, forexQuote.interbank) + && Objects.equals(this.sell, forexQuote.sell) + && Objects.equals(this.buy, + forexQuote.buy) + && Objects.equals(this.validTill, forexQuote.validTill) + && Objects.equals(this.basePoints, forexQuote.basePoints) + && Objects.equals(this.source, forexQuote.source) + && Objects.equals(this.signature, forexQuote.signature) + && Objects.equals(this.type, forexQuote.type) + && Objects.equals(this.baseAmount, forexQuote.baseAmount) + && Objects.equals(this.account, forexQuote.account) + && Objects.equals(this.accountType, forexQuote.accountType); + } + + @Override + public int hashCode() { + return Objects.hash(reference, interbank, sell, buy, validTill, basePoints, source, signature, type, baseAmount, account, accountType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForexQuote {\n"); + + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" interbank: ").append(toIndentedString(interbank)).append("\n"); + sb.append(" sell: ").append(toIndentedString(sell)).append("\n"); + sb.append(" buy: ").append(toIndentedString(buy)).append("\n"); + sb.append(" validTill: ").append(toIndentedString(validTill)).append("\n"); + sb.append(" basePoints: ").append(toIndentedString(basePoints)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/FraudCheckResult.java b/src/main/java/com/adyen/model/FraudCheckResult.java index 11100103c..c8b7f19cc 100644 --- a/src/main/java/com/adyen/model/FraudCheckResult.java +++ b/src/main/java/com/adyen/model/FraudCheckResult.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,109 +27,110 @@ * FraudCheckResult */ public class FraudCheckResult { - @SerializedName("name") - private String name = null; - - @SerializedName("accountScore") - private Integer accountScore = null; - - @SerializedName("checkId") - private Integer checkId = null; - - public FraudCheckResult name(String name) { - this.name = name; - return this; - } - - /** - * the name of the risk check - * @return name - **/ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public FraudCheckResult accountScore(Integer accountScore) { - this.accountScore = accountScore; - return this; - } - - /** - * the fraud score generated by the risk check - * @return accountScore - **/ - public Integer getAccountScore() { - return accountScore; - } - - public void setAccountScore(Integer accountScore) { - this.accountScore = accountScore; - } - - public FraudCheckResult checkId(Integer checkId) { - this.checkId = checkId; - return this; - } - - /** - * the id of the risk check - * @return checkId - **/ - public Integer getCheckId() { - return checkId; - } - - public void setCheckId(Integer checkId) { - this.checkId = checkId; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @SerializedName("name") + private String name = null; + + @SerializedName("accountScore") + private Integer accountScore = null; + + @SerializedName("checkId") + private Integer checkId = null; + + public FraudCheckResult name(String name) { + this.name = name; + return this; + } + + /** + * the name of the risk check + * + * @return name + **/ + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public FraudCheckResult accountScore(Integer accountScore) { + this.accountScore = accountScore; + return this; + } + + /** + * the fraud score generated by the risk check + * + * @return accountScore + **/ + public Integer getAccountScore() { + return accountScore; + } + + public void setAccountScore(Integer accountScore) { + this.accountScore = accountScore; + } + + public FraudCheckResult checkId(Integer checkId) { + this.checkId = checkId; + return this; + } + + /** + * the id of the risk check + * + * @return checkId + **/ + public Integer getCheckId() { + return checkId; + } + + public void setCheckId(Integer checkId) { + this.checkId = checkId; } - if (o == null || getClass() != o.getClass()) { - return false; + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FraudCheckResult fraudCheckResult = (FraudCheckResult) o; + return Objects.equals(this.name, fraudCheckResult.name) && Objects.equals(this.accountScore, fraudCheckResult.accountScore) && Objects.equals(this.checkId, fraudCheckResult.checkId); } - FraudCheckResult fraudCheckResult = (FraudCheckResult) o; - return Objects.equals(this.name, fraudCheckResult.name) && - Objects.equals(this.accountScore, fraudCheckResult.accountScore) && - Objects.equals(this.checkId, fraudCheckResult.checkId); - } - - @Override - public int hashCode() { - return Objects.hash(name, accountScore, checkId); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FraudCheckResult {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" accountScore: ").append(toIndentedString(accountScore)).append("\n"); - sb.append(" checkId: ").append(toIndentedString(checkId)).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(Object o) { - if (o == null) { - return "null"; + + @Override + public int hashCode() { + return Objects.hash(name, accountScore, checkId); } - return o.toString().replace("\n", "\n "); - } - + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FraudCheckResult {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" accountScore: ").append(toIndentedString(accountScore)).append("\n"); + sb.append(" checkId: ").append(toIndentedString(checkId)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/Installments.java b/src/main/java/com/adyen/model/Installments.java index 228a2bda6..a46cd563a 100644 --- a/src/main/java/com/adyen/model/Installments.java +++ b/src/main/java/com/adyen/model/Installments.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,65 +27,66 @@ * Installments */ public class Installments { - @SerializedName("value") - private Integer value = null; + @SerializedName("value") + private Integer value = null; - public Installments value(Integer value) { - this.value = value; - return this; - } + public Installments value(Integer value) { + this.value = value; + return this; + } - /** - * the number of installments in which the payment will be divided - * @return value - **/ - public Integer getValue() { - return value; - } + /** + * the number of installments in which the payment will be divided + * + * @return value + **/ + public Integer getValue() { + return value; + } - public void setValue(Integer value) { - this.value = value; - } + public void setValue(Integer value) { + this.value = value; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Installments installments = (Installments) o; + return Objects.equals(this.value, installments.value); } - if (o == null || getClass() != o.getClass()) { - return false; - } - Installments installments = (Installments) o; - return Objects.equals(this.value, installments.value); - } - @Override - public int hashCode() { - return Objects.hash(value); - } + @Override + public int hashCode() { + return Objects.hash(value); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Installments {\n"); + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Installments {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } + 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(Object o) { - if (o == null) { - return "null"; + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } - + } diff --git a/src/main/java/com/adyen/model/Name.java b/src/main/java/com/adyen/model/Name.java index ab8e04b92..38151e9b4 100644 --- a/src/main/java/com/adyen/model/Name.java +++ b/src/main/java/com/adyen/model/Name.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,156 +27,157 @@ * Name */ public class Name { - @SerializedName("infix") - private String infix = null; + @SerializedName("infix") + private String infix = null; + + /** + * the gender + */ + public enum GenderEnum { + @SerializedName("MALE") + MALE("MALE"), + + @SerializedName("FEMALE") + FEMALE("FEMALE"), + + @SerializedName("UNKNOWN") + UNKNOWN("UNKNOWN"); + + private String value; + + GenderEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("gender") + private GenderEnum gender = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("firstName") + private String firstName = null; - /** - * the gender - */ - public enum GenderEnum { - @SerializedName("MALE") - MALE("MALE"), - - @SerializedName("FEMALE") - FEMALE("FEMALE"), - - @SerializedName("UNKNOWN") - UNKNOWN("UNKNOWN"); + public Name infix(String infix) { + this.infix = infix; + return this; + } + + /** + * the infix + * + * @return infix + **/ + public String getInfix() { + return infix; + } - private String value; + public void setInfix(String infix) { + this.infix = infix; + } + + public Name gender(GenderEnum gender) { + this.gender = gender; + return this; + } - GenderEnum(String value) { - this.value = value; + /** + * the gender + * + * @return gender + **/ + public GenderEnum getGender() { + return gender; } + public void setGender(GenderEnum gender) { + this.gender = gender; + } + + public Name lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * the last name + * + * @return lastName + **/ + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public Name firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * the first name + * + * @return firstName + **/ + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.infix, name.infix) && Objects.equals(this.gender, name.gender) && Objects.equals(this.lastName, name.lastName) && Objects.equals(this.firstName, name.firstName); + } + + @Override + public int hashCode() { + return Objects.hash(infix, gender, lastName, firstName); + } + + @Override public String toString() { - return String.valueOf(value); - } - } - - @SerializedName("gender") - private GenderEnum gender = null; - - @SerializedName("lastName") - private String lastName = null; - - @SerializedName("firstName") - private String firstName = null; - - public Name infix(String infix) { - this.infix = infix; - return this; - } - - /** - * the infix - * @return infix - **/ - public String getInfix() { - return infix; - } - - public void setInfix(String infix) { - this.infix = infix; - } - - public Name gender(GenderEnum gender) { - this.gender = gender; - return this; - } - - /** - * the gender - * @return gender - **/ - public GenderEnum getGender() { - return gender; - } - - public void setGender(GenderEnum gender) { - this.gender = gender; - } - - public Name lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * the last name - * @return lastName - **/ - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public Name firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * the first name - * @return firstName - **/ - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.infix, name.infix) && - Objects.equals(this.gender, name.gender) && - Objects.equals(this.lastName, name.lastName) && - Objects.equals(this.firstName, name.firstName); - } - - @Override - public int hashCode() { - return Objects.hash(infix, gender, lastName, firstName); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - - sb.append(" infix: ").append(toIndentedString(infix)).append("\n"); - sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" infix: ").append(toIndentedString(infix)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/PaymentResult.java b/src/main/java/com/adyen/model/PaymentResult.java index 863b2465f..e9226d96f 100644 --- a/src/main/java/com/adyen/model/PaymentResult.java +++ b/src/main/java/com/adyen/model/PaymentResult.java @@ -20,8 +20,6 @@ */ package com.adyen.model; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/com/adyen/model/ThreeDSecureData.java b/src/main/java/com/adyen/model/ThreeDSecureData.java index 4f23998df..54aa9f718 100644 --- a/src/main/java/com/adyen/model/ThreeDSecureData.java +++ b/src/main/java/com/adyen/model/ThreeDSecureData.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,231 +27,231 @@ * ThreeDSecureData */ public class ThreeDSecureData { - @SerializedName("cavvAlgorithm") - private String cavvAlgorithm = null; - - /** - * the enrollment response from the 3D directory server - */ - public enum DirectoryResponseEnum { - @SerializedName("Y") - Y("Y"), - - @SerializedName("N") - N("N"), - - @SerializedName("U") - U("U"), - - @SerializedName("E") - E("E"); - - private String value; - - DirectoryResponseEnum(String value) { - this.value = value; + @SerializedName("cavvAlgorithm") + private String cavvAlgorithm = null; + + /** + * the enrollment response from the 3D directory server + */ + public enum DirectoryResponseEnum { + @SerializedName("Y") + Y("Y"), + + @SerializedName("N") + N("N"), + + @SerializedName("U") + U("U"), + + @SerializedName("E") + E("E"); + + private String value; + + DirectoryResponseEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } } - @Override - public String toString() { - return String.valueOf(value); + @SerializedName("directoryResponse") + private DirectoryResponseEnum directoryResponse = null; + + /** + * the authentication response if the shopper was redirected + */ + public enum AuthenticationResponseEnum { + @SerializedName("Y") + Y("Y"), + + @SerializedName("N") + N("N"), + + @SerializedName("U") + U("U"), + + @SerializedName("A") + A("A"); + + private String value; + + AuthenticationResponseEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("authenticationResponse") + private AuthenticationResponseEnum authenticationResponse = null; + + @SerializedName("xid") + private String xid = null; + + @SerializedName("cavv") + private String cavv = null; + + @SerializedName("eci") + private String eci = null; + + public ThreeDSecureData cavvAlgorithm(String cavvAlgorithm) { + this.cavvAlgorithm = cavvAlgorithm; + return this; + } + + /** + * the CAVV algorithm used + * @return cavvAlgorithm + **/ + public String getCavvAlgorithm() { + return cavvAlgorithm; + } + + public void setCavvAlgorithm(String cavvAlgorithm) { + this.cavvAlgorithm = cavvAlgorithm; + } + + public ThreeDSecureData directoryResponse(DirectoryResponseEnum directoryResponse) { + this.directoryResponse = directoryResponse; + return this; + } + + /** + * the enrollment response from the 3D directory server + * @return directoryResponse + **/ + public DirectoryResponseEnum getDirectoryResponse() { + return directoryResponse; + } + + public void setDirectoryResponse(DirectoryResponseEnum directoryResponse) { + this.directoryResponse = directoryResponse; } - } - - @SerializedName("directoryResponse") - private DirectoryResponseEnum directoryResponse = null; - - /** - * the authentication response if the shopper was redirected - */ - public enum AuthenticationResponseEnum { - @SerializedName("Y") - Y("Y"), - - @SerializedName("N") - N("N"), - - @SerializedName("U") - U("U"), - - @SerializedName("A") - A("A"); - - private String value; - - AuthenticationResponseEnum(String value) { - this.value = value; + + public ThreeDSecureData authenticationResponse(AuthenticationResponseEnum authenticationResponse) { + this.authenticationResponse = authenticationResponse; + return this; + } + + /** + * the authentication response if the shopper was redirected + * @return authenticationResponse + **/ + public AuthenticationResponseEnum getAuthenticationResponse() { + return authenticationResponse; + } + + public void setAuthenticationResponse(AuthenticationResponseEnum authenticationResponse) { + this.authenticationResponse = authenticationResponse; + } + + public ThreeDSecureData xid(String xid) { + this.xid = xid; + return this; + } + + /** + * the transaction identifier (base64 encoded, 20 bytes in decoded form) + * @return xid + **/ + public String getXid() { + return xid; + } + + public void setXid(String xid) { + this.xid = xid; + } + + public ThreeDSecureData cavv(String cavv) { + this.cavv = cavv; + return this; + } + + /** + * the cardholder authentication value (base64 encoded, 20 bytes in decoded form) + * @return cavv + **/ + public String getCavv() { + return cavv; + } + + public void setCavv(String cavv) { + this.cavv = cavv; } + public ThreeDSecureData eci(String eci) { + this.eci = eci; + return this; + } + + /** + * the electronic commerce indicator + * @return eci + **/ + public String getEci() { + return eci; + } + + public void setEci(String eci) { + this.eci = eci; + } + + @Override - public String toString() { - return String.valueOf(value); + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThreeDSecureData threeDSecureData = (ThreeDSecureData) o; + return Objects.equals(this.cavvAlgorithm, threeDSecureData.cavvAlgorithm) + && Objects.equals(this.directoryResponse, threeDSecureData.directoryResponse) + && Objects.equals(this.authenticationResponse, threeDSecureData.authenticationResponse) + && Objects.equals(this.xid, threeDSecureData.xid) + && Objects.equals(this.cavv, threeDSecureData.cavv) + && Objects.equals(this.eci, threeDSecureData.eci); } - } - - @SerializedName("authenticationResponse") - private AuthenticationResponseEnum authenticationResponse = null; - - @SerializedName("xid") - private String xid = null; - - @SerializedName("cavv") - private String cavv = null; - - @SerializedName("eci") - private String eci = null; - - public ThreeDSecureData cavvAlgorithm(String cavvAlgorithm) { - this.cavvAlgorithm = cavvAlgorithm; - return this; - } - - /** - * the CAVV algorithm used - * @return cavvAlgorithm - **/ - public String getCavvAlgorithm() { - return cavvAlgorithm; - } - - public void setCavvAlgorithm(String cavvAlgorithm) { - this.cavvAlgorithm = cavvAlgorithm; - } - - public ThreeDSecureData directoryResponse(DirectoryResponseEnum directoryResponse) { - this.directoryResponse = directoryResponse; - return this; - } - - /** - * the enrollment response from the 3D directory server - * @return directoryResponse - **/ - public DirectoryResponseEnum getDirectoryResponse() { - return directoryResponse; - } - - public void setDirectoryResponse(DirectoryResponseEnum directoryResponse) { - this.directoryResponse = directoryResponse; - } - - public ThreeDSecureData authenticationResponse(AuthenticationResponseEnum authenticationResponse) { - this.authenticationResponse = authenticationResponse; - return this; - } - - /** - * the authentication response if the shopper was redirected - * @return authenticationResponse - **/ - public AuthenticationResponseEnum getAuthenticationResponse() { - return authenticationResponse; - } - - public void setAuthenticationResponse(AuthenticationResponseEnum authenticationResponse) { - this.authenticationResponse = authenticationResponse; - } - - public ThreeDSecureData xid(String xid) { - this.xid = xid; - return this; - } - - /** - * the transaction identifier (base64 encoded, 20 bytes in decoded form) - * @return xid - **/ - public String getXid() { - return xid; - } - - public void setXid(String xid) { - this.xid = xid; - } - - public ThreeDSecureData cavv(String cavv) { - this.cavv = cavv; - return this; - } - - /** - * the cardholder authentication value (base64 encoded, 20 bytes in decoded form) - * @return cavv - **/ - public String getCavv() { - return cavv; - } - - public void setCavv(String cavv) { - this.cavv = cavv; - } - - public ThreeDSecureData eci(String eci) { - this.eci = eci; - return this; - } - - /** - * the electronic commerce indicator - * @return eci - **/ - public String getEci() { - return eci; - } - - public void setEci(String eci) { - this.eci = eci; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(cavvAlgorithm, directoryResponse, authenticationResponse, xid, cavv, eci); } - if (o == null || getClass() != o.getClass()) { - return false; + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThreeDSecureData {\n"); + + sb.append(" cavvAlgorithm: ").append(toIndentedString(cavvAlgorithm)).append("\n"); + sb.append(" directoryResponse: ").append(toIndentedString(directoryResponse)).append("\n"); + sb.append(" authenticationResponse: ").append(toIndentedString(authenticationResponse)).append("\n"); + sb.append(" xid: ").append(toIndentedString(xid)).append("\n"); + sb.append(" cavv: ").append(toIndentedString(cavv)).append("\n"); + sb.append(" eci: ").append(toIndentedString(eci)).append("\n"); + sb.append("}"); + return sb.toString(); } - ThreeDSecureData threeDSecureData = (ThreeDSecureData) o; - return Objects.equals(this.cavvAlgorithm, threeDSecureData.cavvAlgorithm) && - Objects.equals(this.directoryResponse, threeDSecureData.directoryResponse) && - Objects.equals(this.authenticationResponse, threeDSecureData.authenticationResponse) && - Objects.equals(this.xid, threeDSecureData.xid) && - Objects.equals(this.cavv, threeDSecureData.cavv) && - Objects.equals(this.eci, threeDSecureData.eci); - } - - @Override - public int hashCode() { - return Objects.hash(cavvAlgorithm, directoryResponse, authenticationResponse, xid, cavv, eci); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ThreeDSecureData {\n"); - - sb.append(" cavvAlgorithm: ").append(toIndentedString(cavvAlgorithm)).append("\n"); - sb.append(" directoryResponse: ").append(toIndentedString(directoryResponse)).append("\n"); - sb.append(" authenticationResponse: ").append(toIndentedString(authenticationResponse)).append("\n"); - sb.append(" xid: ").append(toIndentedString(xid)).append("\n"); - sb.append(" cavv: ").append(toIndentedString(cavv)).append("\n"); - sb.append(" eci: ").append(toIndentedString(eci)).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(Object o) { - if (o == null) { - return "null"; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } - + } diff --git a/src/main/java/com/adyen/model/TokenDetails.java b/src/main/java/com/adyen/model/TokenDetails.java index 6aec31267..c8c3eacc2 100644 --- a/src/main/java/com/adyen/model/TokenDetails.java +++ b/src/main/java/com/adyen/model/TokenDetails.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -28,86 +28,87 @@ * TokenDetails */ public class TokenDetails { - @SerializedName("tokenDataType") - private String tokenDataType = null; - - @SerializedName("tokenData") - private Map tokenData = null; - - public TokenDetails tokenDataType(String tokenDataType) { - this.tokenDataType = tokenDataType; - return this; - } - - /** - * Get tokenDataType - * @return tokenDataType - **/ - public String getTokenDataType() { - return tokenDataType; - } - - public void setTokenDataType(String tokenDataType) { - this.tokenDataType = tokenDataType; - } - - public TokenDetails tokenData(Map tokenData) { - this.tokenData = tokenData; - return this; - } - - /** - * Get tokenData - * @return tokenData - */ - public Map getTokenData() { - return tokenData; - } - - public void setTokenData(Map tokenData) { - this.tokenData = tokenData; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @SerializedName("tokenDataType") + private String tokenDataType = null; + + @SerializedName("tokenData") + private Map tokenData = null; + + public TokenDetails tokenDataType(String tokenDataType) { + this.tokenDataType = tokenDataType; + return this; + } + + /** + * Get tokenDataType + * + * @return tokenDataType + **/ + public String getTokenDataType() { + return tokenDataType; + } + + public void setTokenDataType(String tokenDataType) { + this.tokenDataType = tokenDataType; + } + + public TokenDetails tokenData(Map tokenData) { + this.tokenData = tokenData; + return this; + } + + /** + * Get tokenData + * + * @return tokenData + */ + public Map getTokenData() { + return tokenData; } - if (o == null || getClass() != o.getClass()) { - return false; + + public void setTokenData(Map tokenData) { + this.tokenData = tokenData; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenDetails tokenDetails = (TokenDetails) o; + return Objects.equals(this.tokenDataType, tokenDetails.tokenDataType) && Objects.equals(this.tokenData, tokenDetails.tokenData); } - TokenDetails tokenDetails = (TokenDetails) o; - return Objects.equals(this.tokenDataType, tokenDetails.tokenDataType) && - Objects.equals(this.tokenData, tokenDetails.tokenData); - } - - @Override - public int hashCode() { - return Objects.hash(tokenDataType, tokenData); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TokenDetails {\n"); - - sb.append(" tokenDataType: ").append(toIndentedString(tokenDataType)).append("\n"); - sb.append(" tokenData: ").append(toIndentedString(tokenData)).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(Object o) { - if (o == null) { - return "null"; + + @Override + public int hashCode() { + return Objects.hash(tokenDataType, tokenData); } - return o.toString().replace("\n", "\n "); - } - + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenDetails {\n"); + + sb.append(" tokenDataType: ").append(toIndentedString(tokenDataType)).append("\n"); + sb.append(" tokenData: ").append(toIndentedString(tokenData)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/checkout/InputDetail.java b/src/main/java/com/adyen/model/checkout/InputDetail.java index 7ab1a63d1..0cf57a194 100755 --- a/src/main/java/com/adyen/model/checkout/InputDetail.java +++ b/src/main/java/com/adyen/model/checkout/InputDetail.java @@ -35,7 +35,7 @@ public class InputDetail { @SerializedName("configuration") - private Map _configuration = null; + private Map configuration = null; @SerializedName("details") private List details = null; @@ -58,32 +58,32 @@ public class InputDetail { @SerializedName("value") private String value = null; - public InputDetail _configuration(Map _configuration) { - this._configuration = _configuration; + public InputDetail configuration(Map configuration) { + this.configuration = configuration; return this; } - public InputDetail putConfigurationItem(String key, String _configurationItem) { + public InputDetail putConfigurationItem(String key, String configurationItem) { - if (this._configuration == null) { - this._configuration = null; + if (this.configuration == null) { + this.configuration = null; } - this._configuration.put(key, _configurationItem); + this.configuration.put(key, configurationItem); return this; } /** * Configuration parameters for the required input. * - * @return _configuration + * @return configuration **/ public Map getConfiguration() { - return _configuration; + return configuration; } - public void setConfiguration(Map _configuration) { - this._configuration = _configuration; + public void setConfiguration(Map configuration) { + this.configuration = configuration; } public InputDetail details(List details) { @@ -246,7 +246,7 @@ public boolean equals(Object o) { return false; } InputDetail inputDetail = (InputDetail) o; - return Objects.equals(this._configuration, inputDetail._configuration) && + return Objects.equals(this.configuration, inputDetail.configuration) && Objects.equals(this.details, inputDetail.details) && Objects.equals(this.itemSearchUrl, inputDetail.itemSearchUrl) && Objects.equals(this.items, inputDetail.items) && @@ -258,7 +258,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(_configuration, details, itemSearchUrl, items, key, optional, type, value); + return Objects.hash(configuration, details, itemSearchUrl, items, key, optional, type, value); } @Override @@ -266,7 +266,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InputDetail {\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n"); sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" itemSearchUrl: ").append(toIndentedString(itemSearchUrl)).append("\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/ModelConfiguration.java b/src/main/java/com/adyen/model/checkout/ModelConfiguration.java index d5e37f550..011f4b3f6 100755 --- a/src/main/java/com/adyen/model/checkout/ModelConfiguration.java +++ b/src/main/java/com/adyen/model/checkout/ModelConfiguration.java @@ -21,11 +21,10 @@ package com.adyen.model.checkout; +import java.util.Objects; import com.adyen.model.Installments; import com.google.gson.annotations.SerializedName; -import java.util.Objects; - /** * ModelConfiguration */ @@ -105,10 +104,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ModelConfiguration _configuration = (ModelConfiguration) o; - return Objects.equals(this.avs, _configuration.avs) && - Objects.equals(this.cardHolderNameRequired, _configuration.cardHolderNameRequired) && - Objects.equals(this.installments, _configuration.installments); + ModelConfiguration configuration = (ModelConfiguration) o; + return Objects.equals(this.avs, configuration.avs) && Objects.equals(this.cardHolderNameRequired, configuration.cardHolderNameRequired) && Objects.equals(this.installments, + configuration.installments); } @Override diff --git a/src/main/java/com/adyen/model/checkout/PaymentMethod.java b/src/main/java/com/adyen/model/checkout/PaymentMethod.java index dec381c87..2f0c97512 100755 --- a/src/main/java/com/adyen/model/checkout/PaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/PaymentMethod.java @@ -18,16 +18,13 @@ * This file is open source and available under the MIT license. * See the LICENSE file for more info. */ - - package com.adyen.model.checkout; -import com.google.gson.annotations.SerializedName; - import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; +import com.google.gson.annotations.SerializedName; /** * PaymentMethod @@ -35,7 +32,7 @@ public class PaymentMethod { @SerializedName("configuration") - private Map _configuration = null; + private Map configuration = null; @SerializedName("details") private List details = null; @@ -52,32 +49,32 @@ public class PaymentMethod { @SerializedName("type") private String type = null; - public PaymentMethod _configuration(Map _configuration) { - this._configuration = _configuration; + public PaymentMethod configuration(Map configuration) { + this.configuration = configuration; return this; } - public PaymentMethod putConfigurationItem(String key, String _configurationItem) { + public PaymentMethod putConfigurationItem(String key, String configurationItem) { - if (this._configuration == null) { - this._configuration = null; + if (this.configuration == null) { + this.configuration = null; } - this._configuration.put(key, _configurationItem); + this.configuration.put(key, configurationItem); return this; } /** * The configuration of the payment method. * - * @return _configuration + * @return configuration **/ public Map getConfiguration() { - return _configuration; + return configuration; } - public void setConfiguration(Map _configuration) { - this._configuration = _configuration; + public void setConfiguration(Map configuration) { + this.configuration = configuration; } public PaymentMethod details(List details) { @@ -193,17 +190,17 @@ public boolean equals(Object o) { return false; } PaymentMethod paymentMethod = (PaymentMethod) o; - return Objects.equals(this._configuration, paymentMethod._configuration) && - Objects.equals(this.details, paymentMethod.details) && - Objects.equals(this.group, paymentMethod.group) && - Objects.equals(this.name, paymentMethod.name) && - Objects.equals(this.paymentMethodData, paymentMethod.paymentMethodData) && - Objects.equals(this.type, paymentMethod.type); + return Objects.equals(this.configuration, paymentMethod.configuration) + && Objects.equals(this.details, paymentMethod.details) + && Objects.equals(this.group, paymentMethod.group) + && Objects.equals(this.name, paymentMethod.name) + && Objects.equals(this.paymentMethodData, paymentMethod.paymentMethodData) + && Objects.equals(this.type, paymentMethod.type); } @Override public int hashCode() { - return Objects.hash(_configuration, details, group, name, paymentMethodData, type); + return Objects.hash(configuration, details, group, name, paymentMethodData, type); } @Override @@ -211,7 +208,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PaymentMethod {\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n"); sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/PaymentSessionRequest.java b/src/main/java/com/adyen/model/checkout/PaymentSessionRequest.java index abd263deb..1217a4c46 100755 --- a/src/main/java/com/adyen/model/checkout/PaymentSessionRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentSessionRequest.java @@ -18,19 +18,25 @@ * This file is open source and available under the MIT license. * See the LICENSE file for more info. */ - package com.adyen.model.checkout; -import com.adyen.model.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import com.adyen.model.Address; +import com.adyen.model.Amount; +import com.adyen.model.ForexQuote; +import com.adyen.model.Installments; +import com.adyen.model.Name; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.*; - /** * PaymentSessionRequest */ @@ -52,7 +58,7 @@ public class PaymentSessionRequest { @SerializedName("company") private Company company = null; @SerializedName("configuration") - private ModelConfiguration _configuration = null; + private ModelConfiguration configuration = null; @SerializedName("countryCode") private String countryCode = null; @SerializedName("dateOfBirth") @@ -136,7 +142,8 @@ public PaymentSessionRequest putAdditionalDataItem(String key, String additional } /** - * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/developers/api-reference/payments-api#paymentrequestadditionaldata). + * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and + * value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/developers/api-reference/payments-api#paymentrequestadditionaldata). * * @return additionalData **/ @@ -208,7 +215,8 @@ public PaymentSessionRequest channel(ChannelEnum channel) { } /** - * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or token. Possible values: * iOS * Android * Web + * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we + * will try to infer it from the `sdkVersion` or token. Possible values: * iOS * Android * Web * * @return channel **/ @@ -238,22 +246,22 @@ public void setCompany(Company company) { this.company = company; } - public PaymentSessionRequest _configuration(ModelConfiguration _configuration) { - this._configuration = _configuration; + public PaymentSessionRequest configuration(ModelConfiguration configuration) { + this.configuration = configuration; return this; } /** - * Get _configuration + * Get configuration * - * @return _configuration + * @return configuration **/ public ModelConfiguration getConfiguration() { - return _configuration; + return configuration; } - public void setConfiguration(ModelConfiguration _configuration) { - this._configuration = _configuration; + public void setConfiguration(ModelConfiguration configuration) { + this.configuration = configuration; } public PaymentSessionRequest countryCode(String countryCode) { @@ -506,7 +514,8 @@ public PaymentSessionRequest mcc(String mcc) { } /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant + * activity that is conducted by the merchant. * * @return mcc **/ @@ -542,7 +551,8 @@ public PaymentSessionRequest merchantOrderReference(String merchantOrderReferenc } /** - * This reference allows linking multiple transactions to each other. > When providing the `merchantOrderReference` value, we also recommend you submit `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values. + * This reference allows linking multiple transactions to each other. > When providing the `merchantOrderReference` value, we also recommend you submit + * `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values. * * @return merchantOrderReference **/ @@ -624,7 +634,8 @@ public PaymentSessionRequest reference(String reference) { } /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a + * requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. * * @return reference **/ @@ -714,7 +725,8 @@ public PaymentSessionRequest shopperIP(String shopperIP) { } /** - * The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > This field is mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). + * The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > This + * field is mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new). * * @return shopperIP **/ @@ -732,7 +744,12 @@ public PaymentSessionRequest shopperInteraction(ShopperInteractionEnum shopperIn } /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper + * interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we + * recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant + * (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order + * transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment + * using a secure payment terminal. * * @return shopperInteraction **/ @@ -879,51 +896,91 @@ public boolean equals(Object o) { return false; } PaymentSessionRequest paymentSessionRequest = (PaymentSessionRequest) o; - return Objects.equals(this.additionalData, paymentSessionRequest.additionalData) && - Objects.equals(this.amount, paymentSessionRequest.amount) && - Objects.equals(this.billingAddress, paymentSessionRequest.billingAddress) && - Objects.equals(this.captureDelayHours, paymentSessionRequest.captureDelayHours) && - Objects.equals(this.channel, paymentSessionRequest.channel) && - Objects.equals(this.company, paymentSessionRequest.company) && - Objects.equals(this._configuration, paymentSessionRequest._configuration) && - Objects.equals(this.countryCode, paymentSessionRequest.countryCode) && - Objects.equals(this.dateOfBirth, paymentSessionRequest.dateOfBirth) && - Objects.equals(this.dccQuote, paymentSessionRequest.dccQuote) && - Objects.equals(this.deliveryAddress, paymentSessionRequest.deliveryAddress) && - Objects.equals(this.deliveryDate, paymentSessionRequest.deliveryDate) && - Objects.equals(this.enableOneClick, paymentSessionRequest.enableOneClick) && - Objects.equals(this.enablePayOut, paymentSessionRequest.enablePayOut) && - Objects.equals(this.enableRecurring, paymentSessionRequest.enableRecurring) && - Objects.equals(this.entityType, paymentSessionRequest.entityType) && - Objects.equals(this.fraudOffset, paymentSessionRequest.fraudOffset) && - Objects.equals(this.html, paymentSessionRequest.html) && - Objects.equals(this.installments, paymentSessionRequest.installments) && - Objects.equals(this.lineItems, paymentSessionRequest.lineItems) && - Objects.equals(this.mcc, paymentSessionRequest.mcc) && - Objects.equals(this.merchantAccount, paymentSessionRequest.merchantAccount) && - Objects.equals(this.merchantOrderReference, paymentSessionRequest.merchantOrderReference) && - Objects.equals(this.metadata, paymentSessionRequest.metadata) && - Objects.equals(this.orderReference, paymentSessionRequest.orderReference) && - Objects.equals(this.origin, paymentSessionRequest.origin) && - Objects.equals(this.reference, paymentSessionRequest.reference) && - Objects.equals(this.returnUrl, paymentSessionRequest.returnUrl) && - Objects.equals(this.sdkVersion, paymentSessionRequest.sdkVersion) && - Objects.equals(this.sessionValidity, paymentSessionRequest.sessionValidity) && - Objects.equals(this.shopperEmail, paymentSessionRequest.shopperEmail) && - Objects.equals(this.shopperIP, paymentSessionRequest.shopperIP) && - Objects.equals(this.shopperInteraction, paymentSessionRequest.shopperInteraction) && - Objects.equals(this.shopperLocale, paymentSessionRequest.shopperLocale) && - Objects.equals(this.shopperName, paymentSessionRequest.shopperName) && - Objects.equals(this.shopperReference, paymentSessionRequest.shopperReference) && - Objects.equals(this.shopperStatement, paymentSessionRequest.shopperStatement) && - Objects.equals(this.socialSecurityNumber, paymentSessionRequest.socialSecurityNumber) && - Objects.equals(this.telephoneNumber, paymentSessionRequest.telephoneNumber) && - Objects.equals(this.token, paymentSessionRequest.token); + return Objects.equals(this.additionalData, paymentSessionRequest.additionalData) + && Objects.equals(this.amount, paymentSessionRequest.amount) + && Objects.equals(this.billingAddress, + paymentSessionRequest.billingAddress) + && Objects.equals(this.captureDelayHours, paymentSessionRequest.captureDelayHours) + && Objects.equals(this.channel, paymentSessionRequest.channel) + && Objects.equals(this.company, paymentSessionRequest.company) + && Objects.equals(this.configuration, paymentSessionRequest.configuration) + && Objects.equals(this.countryCode, paymentSessionRequest.countryCode) + && Objects.equals(this.dateOfBirth, paymentSessionRequest.dateOfBirth) + && Objects.equals(this.dccQuote, paymentSessionRequest.dccQuote) + && Objects.equals(this.deliveryAddress, paymentSessionRequest.deliveryAddress) + && Objects.equals(this.deliveryDate, paymentSessionRequest.deliveryDate) + && Objects.equals(this.enableOneClick, paymentSessionRequest.enableOneClick) + && Objects.equals(this.enablePayOut, paymentSessionRequest.enablePayOut) + && Objects.equals(this.enableRecurring, paymentSessionRequest.enableRecurring) + && Objects.equals(this.entityType, paymentSessionRequest.entityType) + && Objects.equals(this.fraudOffset, paymentSessionRequest.fraudOffset) + && Objects.equals(this.html, paymentSessionRequest.html) + && Objects.equals(this.installments, paymentSessionRequest.installments) + && Objects.equals(this.lineItems, paymentSessionRequest.lineItems) + && Objects.equals(this.mcc, paymentSessionRequest.mcc) + && Objects.equals(this.merchantAccount, paymentSessionRequest.merchantAccount) + && Objects.equals(this.merchantOrderReference, paymentSessionRequest.merchantOrderReference) + && Objects.equals(this.metadata, paymentSessionRequest.metadata) + && Objects.equals(this.orderReference, paymentSessionRequest.orderReference) + && Objects.equals(this.origin, paymentSessionRequest.origin) + && Objects.equals(this.reference, paymentSessionRequest.reference) + && Objects.equals(this.returnUrl, paymentSessionRequest.returnUrl) + && Objects.equals(this.sdkVersion, paymentSessionRequest.sdkVersion) + && Objects.equals(this.sessionValidity, paymentSessionRequest.sessionValidity) + && Objects.equals(this.shopperEmail, paymentSessionRequest.shopperEmail) + && Objects.equals(this.shopperIP, paymentSessionRequest.shopperIP) + && Objects.equals(this.shopperInteraction, paymentSessionRequest.shopperInteraction) + && Objects.equals(this.shopperLocale, paymentSessionRequest.shopperLocale) + && Objects.equals(this.shopperName, paymentSessionRequest.shopperName) + && Objects.equals(this.shopperReference, paymentSessionRequest.shopperReference) + && Objects.equals(this.shopperStatement, paymentSessionRequest.shopperStatement) + && Objects.equals(this.socialSecurityNumber, paymentSessionRequest.socialSecurityNumber) + && Objects.equals(this.telephoneNumber, paymentSessionRequest.telephoneNumber) + && Objects.equals(this.token, paymentSessionRequest.token); } @Override public int hashCode() { - return Objects.hash(additionalData, amount, billingAddress, captureDelayHours, channel, company, _configuration, countryCode, dateOfBirth, dccQuote, deliveryAddress, deliveryDate, enableOneClick, enablePayOut, enableRecurring, entityType, fraudOffset, html, installments, lineItems, mcc, merchantAccount, merchantOrderReference, metadata, orderReference, origin, reference, returnUrl, sdkVersion, sessionValidity, shopperEmail, shopperIP, shopperInteraction, shopperLocale, shopperName, shopperReference, shopperStatement, socialSecurityNumber, telephoneNumber, token); + return Objects.hash(additionalData, + amount, + billingAddress, + captureDelayHours, + channel, + company, + configuration, + countryCode, + dateOfBirth, + dccQuote, + deliveryAddress, + deliveryDate, + enableOneClick, + enablePayOut, + enableRecurring, + entityType, + fraudOffset, + html, + installments, + lineItems, + mcc, + merchantAccount, + merchantOrderReference, + metadata, + orderReference, + origin, + reference, + returnUrl, + sdkVersion, + sessionValidity, + shopperEmail, + shopperIP, + shopperInteraction, + shopperLocale, + shopperName, + shopperReference, + shopperStatement, + socialSecurityNumber, + telephoneNumber, + token); } @Override @@ -937,7 +994,7 @@ public String toString() { sb.append(" captureDelayHours: ").append(toIndentedString(captureDelayHours)).append("\n"); sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); sb.append(" company: ").append(toIndentedString(company)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" dccQuote: ").append(toIndentedString(dccQuote)).append("\n"); @@ -987,7 +1044,8 @@ private String toIndentedString(Object o) { } /** - * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or token. Possible values: * iOS * Android * Web + * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we + * will try to infer it from the `sdkVersion` or token. Possible values: * iOS * Android * Web */ @JsonAdapter(ChannelEnum.Adapter.class) public enum ChannelEnum { @@ -1082,7 +1140,12 @@ public EntityTypeEnum read(final JsonReader jsonReader) throws IOException { } /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper + * interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we + * recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant + * (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order + * transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment + * using a secure payment terminal. */ @JsonAdapter(ShopperInteractionEnum.Adapter.class) public enum ShopperInteractionEnum { diff --git a/src/main/java/com/adyen/model/checkout/PaymentsRequest.java b/src/main/java/com/adyen/model/checkout/PaymentsRequest.java index 43a7e7530..6e08e6c29 100755 --- a/src/main/java/com/adyen/model/checkout/PaymentsRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentsRequest.java @@ -22,18 +22,36 @@ package com.adyen.model.checkout; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; import com.adyen.Util.Util; -import com.adyen.model.*; +import com.adyen.model.Address; +import com.adyen.model.Amount; +import com.adyen.model.BrowserInfo; +import com.adyen.model.ForexQuote; +import com.adyen.model.Installments; +import com.adyen.model.Name; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; - -import java.io.IOException; -import java.util.*; - -import static com.adyen.constants.ApiConstants.PaymentMethod.*; +import static com.adyen.constants.ApiConstants.PaymentMethod.CVC; +import static com.adyen.constants.ApiConstants.PaymentMethod.ENCRYPTED_CARD_NUMBER; +import static com.adyen.constants.ApiConstants.PaymentMethod.ENCRYPTED_EXPIRY_MONTH; +import static com.adyen.constants.ApiConstants.PaymentMethod.ENCRYPTED_EXPIRY_YEAR; +import static com.adyen.constants.ApiConstants.PaymentMethod.ENCRYPTED_SECURITY_CODE; +import static com.adyen.constants.ApiConstants.PaymentMethod.EXPIRY_MONTH; +import static com.adyen.constants.ApiConstants.PaymentMethod.EXPIRY_YEAR; +import static com.adyen.constants.ApiConstants.PaymentMethod.HOLDER_NAME; +import static com.adyen.constants.ApiConstants.PaymentMethod.METHOD_TYPE; +import static com.adyen.constants.ApiConstants.PaymentMethod.NUMBER; +import static com.adyen.constants.ApiConstants.PaymentMethod.RECURRING_DETAIL_REFERENCE; import static com.adyen.constants.ApiConstants.PaymentMethodType.TYPE_SCHEME; /** @@ -616,7 +634,8 @@ public PaymentsRequest addEncryptedCardData(String encryptedCardNumber, String e } /** - * Add raw card data into the payment request. You need to be PCI compliant! + * Add raw card data into the payment request. You need to be PCI compliant! + * * @return paymentMethod */ public PaymentsRequest addCardData(String cardNumber, String expiryMonth, String expiryYear, String securityCode, String holderName) { diff --git a/src/main/java/com/adyen/model/checkout/RecurringDetail.java b/src/main/java/com/adyen/model/checkout/RecurringDetail.java index b4acac2b7..a19827a30 100755 --- a/src/main/java/com/adyen/model/checkout/RecurringDetail.java +++ b/src/main/java/com/adyen/model/checkout/RecurringDetail.java @@ -18,16 +18,13 @@ * This file is open source and available under the MIT license. * See the LICENSE file for more info. */ - - package com.adyen.model.checkout; -import com.google.gson.annotations.SerializedName; - import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; +import com.google.gson.annotations.SerializedName; /** * RecurringDetail @@ -35,7 +32,7 @@ public class RecurringDetail { @SerializedName("configuration") - private Map _configuration = null; + private Map configuration = null; @SerializedName("details") private List details = null; @@ -55,32 +52,32 @@ public class RecurringDetail { @SerializedName("type") private String type = null; - public RecurringDetail _configuration(Map _configuration) { - this._configuration = _configuration; + public RecurringDetail configuration(Map configuration) { + this.configuration = configuration; return this; } - public RecurringDetail putConfigurationItem(String key, String _configurationItem) { + public RecurringDetail putConfigurationItem(String key, String configurationItem) { - if (this._configuration == null) { - this._configuration = null; + if (this.configuration == null) { + this.configuration = null; } - this._configuration.put(key, _configurationItem); + this.configuration.put(key, configurationItem); return this; } /** * The configuration of the payment method. * - * @return _configuration + * @return configuration **/ public Map getConfiguration() { - return _configuration; + return configuration; } - public void setConfiguration(Map _configuration) { - this._configuration = _configuration; + public void setConfiguration(Map configuration) { + this.configuration = configuration; } public RecurringDetail details(List details) { @@ -215,18 +212,18 @@ public boolean equals(Object o) { return false; } RecurringDetail recurringDetail = (RecurringDetail) o; - return Objects.equals(this._configuration, recurringDetail._configuration) && - Objects.equals(this.details, recurringDetail.details) && - Objects.equals(this.group, recurringDetail.group) && - Objects.equals(this.name, recurringDetail.name) && - Objects.equals(this.paymentMethodData, recurringDetail.paymentMethodData) && - Objects.equals(this.storedDetails, recurringDetail.storedDetails) && - Objects.equals(this.type, recurringDetail.type); + return Objects.equals(this.configuration, recurringDetail.configuration) + && Objects.equals(this.details, recurringDetail.details) + && Objects.equals(this.group, recurringDetail.group) + && Objects.equals(this.name, recurringDetail.name) + && Objects.equals(this.paymentMethodData, recurringDetail.paymentMethodData) + && Objects.equals(this.storedDetails, recurringDetail.storedDetails) + && Objects.equals(this.type, recurringDetail.type); } @Override public int hashCode() { - return Objects.hash(_configuration, details, group, name, paymentMethodData, storedDetails, type); + return Objects.hash(configuration, details, group, name, paymentMethodData, storedDetails, type); } @Override @@ -234,7 +231,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RecurringDetail {\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n"); sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderStateResponse.java b/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderStateResponse.java index 2b56fb8cc..563fb82d8 100644 --- a/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderStateResponse.java +++ b/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderStateResponse.java @@ -21,7 +21,5 @@ package com.adyen.model.marketpay; -import com.adyen.model.marketpay.GetAccountHolderResponse; - public class UpdateAccountHolderStateResponse extends GetAccountHolderResponse { } diff --git a/src/main/java/com/adyen/model/marketpay/notification/ExchangeMessageContainer.java b/src/main/java/com/adyen/model/marketpay/notification/ExchangeMessageContainer.java index d600da1e3..e9594c06f 100644 --- a/src/main/java/com/adyen/model/marketpay/notification/ExchangeMessageContainer.java +++ b/src/main/java/com/adyen/model/marketpay/notification/ExchangeMessageContainer.java @@ -18,7 +18,6 @@ * This file is open source and available under the MIT license. * See the LICENSE file for more info. */ - package com.adyen.model.marketpay.notification; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/adyen/model/marketpay/notification/TestNotificationConfigurationResponse.java b/src/main/java/com/adyen/model/marketpay/notification/TestNotificationConfigurationResponse.java index 81bd78dae..aa30ca024 100755 --- a/src/main/java/com/adyen/model/marketpay/notification/TestNotificationConfigurationResponse.java +++ b/src/main/java/com/adyen/model/marketpay/notification/TestNotificationConfigurationResponse.java @@ -188,11 +188,11 @@ public void setOkMessages(List okMessages) { **/ public List getExchangeMessages() { - if(exchangeMessages == null) { + if (exchangeMessages == null) { exchangeMessages = new ArrayList(); - if(exchangeMessageContainers != null && !exchangeMessageContainers.isEmpty()){ - for(ExchangeMessageContainer exchangeMessageContainer : exchangeMessageContainers) { + if (exchangeMessageContainers != null && ! exchangeMessageContainers.isEmpty()) { + for (ExchangeMessageContainer exchangeMessageContainer : exchangeMessageContainers) { exchangeMessages.add(exchangeMessageContainer.getExchangeMessage()); } } diff --git a/src/main/java/com/adyen/model/notification/NotificationRequest.java b/src/main/java/com/adyen/model/notification/NotificationRequest.java index 907bc923d..ad92d84ec 100644 --- a/src/main/java/com/adyen/model/notification/NotificationRequest.java +++ b/src/main/java/com/adyen/model/notification/NotificationRequest.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -53,7 +53,7 @@ public void setNotificationItemContainers(List public List getNotificationItems() { List notificationRequestItems = new ArrayList<>(); - for(NotificationRequestItemContainer container: this.notificationItemContainers) { + for (NotificationRequestItemContainer container : this.notificationItemContainers) { notificationRequestItems.add(container.getNotificationItem()); } diff --git a/src/main/java/com/adyen/model/recurring/DisableRequest.java b/src/main/java/com/adyen/model/recurring/DisableRequest.java index 3aa6b87f7..d5d9eb712 100644 --- a/src/main/java/com/adyen/model/recurring/DisableRequest.java +++ b/src/main/java/com/adyen/model/recurring/DisableRequest.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,131 +27,135 @@ * DisableRequest */ public class DisableRequest { - @SerializedName("merchantAccount") - private String merchantAccount = null; - - @SerializedName("shopperReference") - private String shopperReference = null; - - @SerializedName("recurringDetailReference") - private String recurringDetailReference = null; - - @SerializedName("contract") - private String contract = null; - - public DisableRequest merchantAccount(String merchantAccount) { - this.merchantAccount = merchantAccount; - return this; - } - - /** - * the merchant account which will be used for processing this request - * @return merchantAccount - **/ - public String getMerchantAccount() { - return merchantAccount; - } - - public void setMerchantAccount(String merchantAccount) { - this.merchantAccount = merchantAccount; - } - - public DisableRequest shopperReference(String shopperReference) { - this.shopperReference = shopperReference; - return this; - } - - /** - * a reference you use to uniquely identify the shopper (e.g. user ID or account ID) - * @return shopperReference - **/ - public String getShopperReference() { - return shopperReference; - } - - public void setShopperReference(String shopperReference) { - this.shopperReference = shopperReference; - } - - public DisableRequest recurringDetailReference(String recurringDetailReference) { - this.recurringDetailReference = recurringDetailReference; - return this; - } - - /** - * the recurring detail you wish to disable - * @return recurringDetailReference - **/ - public String getRecurringDetailReference() { - return recurringDetailReference; - } - - public void setRecurringDetailReference(String recurringDetailReference) { - this.recurringDetailReference = recurringDetailReference; - } - - public DisableRequest contract(String contract) { - this.contract = contract; - return this; - } - - /** - * specify the contract if you only want to disable a specific use - * @return contract - **/ - public String getContract() { - return contract; - } - - public void setContract(String contract) { - this.contract = contract; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisableRequest disableRequest = (DisableRequest) o; - return Objects.equals(this.merchantAccount, disableRequest.merchantAccount) && - Objects.equals(this.shopperReference, disableRequest.shopperReference) && - Objects.equals(this.recurringDetailReference, disableRequest.recurringDetailReference) && - Objects.equals(this.contract, disableRequest.contract); - } - - @Override - public int hashCode() { - return Objects.hash(merchantAccount, shopperReference, recurringDetailReference, contract); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisableRequest {\n"); - - sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); - sb.append(" shopperReference: ").append(toIndentedString(shopperReference)).append("\n"); - sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); - sb.append(" contract: ").append(toIndentedString(contract)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - + @SerializedName("merchantAccount") + private String merchantAccount = null; + + @SerializedName("shopperReference") + private String shopperReference = null; + + @SerializedName("recurringDetailReference") + private String recurringDetailReference = null; + + @SerializedName("contract") + private String contract = null; + + public DisableRequest merchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + return this; + } + + /** + * the merchant account which will be used for processing this request + * + * @return merchantAccount + **/ + public String getMerchantAccount() { + return merchantAccount; + } + + public void setMerchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + } + + public DisableRequest shopperReference(String shopperReference) { + this.shopperReference = shopperReference; + return this; + } + + /** + * a reference you use to uniquely identify the shopper (e.g. user ID or account ID) + * + * @return shopperReference + **/ + public String getShopperReference() { + return shopperReference; + } + + public void setShopperReference(String shopperReference) { + this.shopperReference = shopperReference; + } + + public DisableRequest recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + /** + * the recurring detail you wish to disable + * + * @return recurringDetailReference + **/ + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + public DisableRequest contract(String contract) { + this.contract = contract; + return this; + } + + /** + * specify the contract if you only want to disable a specific use + * + * @return contract + **/ + public String getContract() { + return contract; + } + + public void setContract(String contract) { + this.contract = contract; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisableRequest disableRequest = (DisableRequest) o; + return Objects.equals(this.merchantAccount, disableRequest.merchantAccount) + && Objects.equals(this.shopperReference, disableRequest.shopperReference) + && Objects.equals(this.recurringDetailReference, disableRequest.recurringDetailReference) + && Objects.equals(this.contract, disableRequest.contract); + } + + @Override + public int hashCode() { + return Objects.hash(merchantAccount, shopperReference, recurringDetailReference, contract); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisableRequest {\n"); + + sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); + sb.append(" shopperReference: ").append(toIndentedString(shopperReference)).append("\n"); + sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); + sb.append(" contract: ").append(toIndentedString(contract)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/recurring/DisableResult.java b/src/main/java/com/adyen/model/recurring/DisableResult.java index d7750b750..be047002c 100644 --- a/src/main/java/com/adyen/model/recurring/DisableResult.java +++ b/src/main/java/com/adyen/model/recurring/DisableResult.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -29,92 +29,93 @@ * DisableResult */ public class DisableResult { - @SerializedName("response") - private String response = null; - - @SerializedName("details") - private List details = new ArrayList(); - - public DisableResult response(String response) { - this.response = response; - return this; - } - - /** - * Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled] - * @return response - **/ - public String getResponse() { - return response; - } - - public void setResponse(String response) { - this.response = response; - } - - public DisableResult details(List details) { - this.details = details; - return this; - } - - public DisableResult addDetailsItem(RecurringDetail detailsItem) { - this.details.add(detailsItem); - return this; - } - - /** - * a list of one or more recurring payment details that were disabled - * @return details - **/ - public List getDetails() { - return details; - } - - public void setDetails(List details) { - this.details = details; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @SerializedName("response") + private String response = null; + + @SerializedName("details") + private List details = new ArrayList(); + + public DisableResult response(String response) { + this.response = response; + return this; } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled] + * + * @return response + **/ + public String getResponse() { + return response; } - DisableResult disableResult = (DisableResult) o; - return Objects.equals(this.response, disableResult.response) && - Objects.equals(this.details, disableResult.details); - } - - @Override - public int hashCode() { - return Objects.hash(response, details); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisableResult {\n"); - - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).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(Object o) { - if (o == null) { - return "null"; + + public void setResponse(String response) { + this.response = response; + } + + public DisableResult details(List details) { + this.details = details; + return this; + } + + public DisableResult addDetailsItem(RecurringDetail detailsItem) { + this.details.add(detailsItem); + return this; + } + + /** + * a list of one or more recurring payment details that were disabled + * + * @return details + **/ + public List getDetails() { + return details; + } + + public void setDetails(List details) { + this.details = details; } - return o.toString().replace("\n", "\n "); - } - + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisableResult disableResult = (DisableResult) o; + return Objects.equals(this.response, disableResult.response) && Objects.equals(this.details, disableResult.details); + } + + @Override + public int hashCode() { + return Objects.hash(response, details); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisableResult {\n"); + + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + } diff --git a/src/main/java/com/adyen/model/recurring/Recurring.java b/src/main/java/com/adyen/model/recurring/Recurring.java index 6141cf1e8..396475fbe 100644 --- a/src/main/java/com/adyen/model/recurring/Recurring.java +++ b/src/main/java/com/adyen/model/recurring/Recurring.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,124 +27,125 @@ * Recurring */ public class Recurring { - /** - * how the recurring detail will be used, multiple values allowed as comma separated - */ - public enum ContractEnum { - @SerializedName("ONECLICK") - ONECLICK("ONECLICK"), - - @SerializedName("ONECLICK,RECURRING") - ONECLICK_RECURRING("ONECLICK,RECURRING"), - - @SerializedName("RECURRING") - RECURRING("RECURRING"), - - @SerializedName("PAYOUT") - PAYOUT("PAYOUT"), - - @SerializedName("ONECLICK,RECURRING,PAYOUT") - ONECLICK_RECURRING_PAYOUT("ONECLICK,RECURRING,PAYOUT"), - - @SerializedName("ONECLICK,PAYOUT") - ONECLICK_PAYOUT("ONECLICK,PAYOUT"), - - @SerializedName("RECURRING,PAYOUT") - RECURRING_PAYOUT("RECURRING,PAYOUT"); - - private String value; - - ContractEnum(String value) { - this.value = value; + /** + * how the recurring detail will be used, multiple values allowed as comma separated + */ + public enum ContractEnum { + @SerializedName("ONECLICK") + ONECLICK("ONECLICK"), + + @SerializedName("ONECLICK,RECURRING") + ONECLICK_RECURRING("ONECLICK,RECURRING"), + + @SerializedName("RECURRING") + RECURRING("RECURRING"), + + @SerializedName("PAYOUT") + PAYOUT("PAYOUT"), + + @SerializedName("ONECLICK,RECURRING,PAYOUT") + ONECLICK_RECURRING_PAYOUT("ONECLICK,RECURRING,PAYOUT"), + + @SerializedName("ONECLICK,PAYOUT") + ONECLICK_PAYOUT("ONECLICK,PAYOUT"), + + @SerializedName("RECURRING,PAYOUT") + RECURRING_PAYOUT("RECURRING,PAYOUT"); + + private String value; + + ContractEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("contract") + private ContractEnum contract = null; + + @SerializedName("recurringDetailName") + private String recurringDetailName = null; + + public Recurring contract(ContractEnum contract) { + this.contract = contract; + return this; + } + + /** + * how the recurring detail will be used, multiple values allowed as comma separated + * + * @return contract + **/ + public ContractEnum getContract() { + return contract; + } + + public void setContract(ContractEnum contract) { + this.contract = contract; } + public Recurring recurringDetailName(String recurringDetailName) { + this.recurringDetailName = recurringDetailName; + return this; + } + + /** + * assign a descriptive name for this detail + * + * @return recurringDetailName + **/ + public String getRecurringDetailName() { + return recurringDetailName; + } + + public void setRecurringDetailName(String recurringDetailName) { + this.recurringDetailName = recurringDetailName; + } + + @Override - public String toString() { - return String.valueOf(value); + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Recurring recurring = (Recurring) o; + return Objects.equals(this.contract, recurring.contract) && Objects.equals(this.recurringDetailName, recurring.recurringDetailName); } - } - - @SerializedName("contract") - private ContractEnum contract = null; - - @SerializedName("recurringDetailName") - private String recurringDetailName = null; - - public Recurring contract(ContractEnum contract) { - this.contract = contract; - return this; - } - - /** - * how the recurring detail will be used, multiple values allowed as comma separated - * @return contract - **/ - public ContractEnum getContract() { - return contract; - } - - public void setContract(ContractEnum contract) { - this.contract = contract; - } - - public Recurring recurringDetailName(String recurringDetailName) { - this.recurringDetailName = recurringDetailName; - return this; - } - - /** - * assign a descriptive name for this detail - * @return recurringDetailName - **/ - public String getRecurringDetailName() { - return recurringDetailName; - } - - public void setRecurringDetailName(String recurringDetailName) { - this.recurringDetailName = recurringDetailName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(contract, recurringDetailName); } - if (o == null || getClass() != o.getClass()) { - return false; + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Recurring {\n"); + + sb.append(" contract: ").append(toIndentedString(contract)).append("\n"); + sb.append(" recurringDetailName: ").append(toIndentedString(recurringDetailName)).append("\n"); + sb.append("}"); + return sb.toString(); } - Recurring recurring = (Recurring) o; - return Objects.equals(this.contract, recurring.contract) && - Objects.equals(this.recurringDetailName, recurring.recurringDetailName); - } - - @Override - public int hashCode() { - return Objects.hash(contract, recurringDetailName); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Recurring {\n"); - - sb.append(" contract: ").append(toIndentedString(contract)).append("\n"); - sb.append(" recurringDetailName: ").append(toIndentedString(recurringDetailName)).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(Object o) { - if (o == null) { - return "null"; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } - + } diff --git a/src/main/java/com/adyen/model/recurring/RecurringDetail.java b/src/main/java/com/adyen/model/recurring/RecurringDetail.java index 2bc3d9b20..3c256cbe2 100644 --- a/src/main/java/com/adyen/model/recurring/RecurringDetail.java +++ b/src/main/java/com/adyen/model/recurring/RecurringDetail.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ diff --git a/src/main/java/com/adyen/service/Checkout.java b/src/main/java/com/adyen/service/Checkout.java index df9ff11d0..41a5523ec 100644 --- a/src/main/java/com/adyen/service/Checkout.java +++ b/src/main/java/com/adyen/service/Checkout.java @@ -25,9 +25,21 @@ import com.adyen.ApiKeyAuthenticatedService; import com.adyen.Client; import com.adyen.model.RequestOptions; -import com.adyen.model.checkout.*; +import com.adyen.model.checkout.PaymentMethodsRequest; +import com.adyen.model.checkout.PaymentMethodsResponse; +import com.adyen.model.checkout.PaymentResultRequest; +import com.adyen.model.checkout.PaymentResultResponse; +import com.adyen.model.checkout.PaymentSessionRequest; +import com.adyen.model.checkout.PaymentSessionResponse; +import com.adyen.model.checkout.PaymentsDetailsRequest; +import com.adyen.model.checkout.PaymentsRequest; +import com.adyen.model.checkout.PaymentsResponse; import com.adyen.service.exception.ApiException; -import com.adyen.service.resource.checkout.*; +import com.adyen.service.resource.checkout.PaymentMethods; +import com.adyen.service.resource.checkout.PaymentSession; +import com.adyen.service.resource.checkout.Payments; +import com.adyen.service.resource.checkout.PaymentsDetails; +import com.adyen.service.resource.checkout.PaymentsResult; import com.google.gson.reflect.TypeToken; @@ -58,7 +70,7 @@ public Checkout(Client client) { * @throws ApiException */ public PaymentsResponse payments(PaymentsRequest paymentsRequest) throws ApiException, IOException { - return payments(paymentsRequest,null); + return payments(paymentsRequest, null); } public PaymentsResponse payments(PaymentsRequest paymentsRequest, RequestOptions requestOptions) throws ApiException, IOException { diff --git a/src/main/java/com/adyen/service/Fund.java b/src/main/java/com/adyen/service/Fund.java index e9c7a1120..e8c3da6ed 100644 --- a/src/main/java/com/adyen/service/Fund.java +++ b/src/main/java/com/adyen/service/Fund.java @@ -62,7 +62,7 @@ public Fund(Client client) { } - public AccountHolderBalanceResponse AccountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest) throws Exception { + public AccountHolderBalanceResponse accountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest) throws Exception { String jsonRequest = GSON.toJson(accountHolderBalanceRequest); String jsonResult = accountHolderBalance.request(jsonRequest); diff --git a/src/main/java/com/adyen/service/HostedPaymentPages.java b/src/main/java/com/adyen/service/HostedPaymentPages.java index 279e4c996..c55894146 100644 --- a/src/main/java/com/adyen/service/HostedPaymentPages.java +++ b/src/main/java/com/adyen/service/HostedPaymentPages.java @@ -85,7 +85,7 @@ public SortedMap getPostParametersFromDLRequest(DirectoryLookupR postParameters.put(SESSION_VALIDITY, request.getSessionValidity()); postParameters.put(COUNTRY_CODE, request.getCountryCode()); - if(request.getShopperLocale() != null) { + if (request.getShopperLocale() != null) { postParameters.put(SHOPPER_LOCALE, request.getShopperLocale()); } diff --git a/src/main/java/com/adyen/service/Modification.java b/src/main/java/com/adyen/service/Modification.java index a315e36b0..de2fd9662 100644 --- a/src/main/java/com/adyen/service/Modification.java +++ b/src/main/java/com/adyen/service/Modification.java @@ -1,19 +1,19 @@ /** - * ###### - * ###### + * ###### + * ###### * ############ ####( ###### #####. ###### ############ ############ * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### #####( ###### #####. ###### ##### ###### ##### ###### * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### * ###### ###### #####( ###### #####. ###### ##### ##### ###### * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + *

* Adyen Java API Library - * + *

* Copyright (c) 2017 Adyen B.V. * This file is open source and available under the MIT license. * See the LICENSE file for more info. @@ -61,7 +61,7 @@ public Modification(Client client) { * @throws ApiException */ public ModificationResult capture(CaptureRequest captureRequest) throws IOException, ApiException { - return capture(captureRequest,null); + return capture(captureRequest, null); } public ModificationResult capture(CaptureRequest captureRequest, RequestOptions requestOptions) throws IOException, ApiException { @@ -79,7 +79,7 @@ public ModificationResult capture(CaptureRequest captureRequest, RequestOptions * @throws ApiException */ public ModificationResult cancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest) throws IOException, ApiException { - return cancelOrRefund(cancelOrRefundRequest, null); + return cancelOrRefund(cancelOrRefundRequest, null); } public ModificationResult cancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest, RequestOptions requestOptions) throws IOException, ApiException { @@ -102,7 +102,7 @@ public ModificationResult refund(RefundRequest refundRequest) throws IOException public ModificationResult refund(RefundRequest refundRequest, RequestOptions requestOptions) throws IOException, ApiException { String jsonRequest = serializeRequest(refundRequest); - String jsonResult = refund.request(jsonRequest,requestOptions); + String jsonResult = refund.request(jsonRequest, requestOptions); return deserializeResponse(jsonResult); } diff --git a/src/main/java/com/adyen/service/Notification.java b/src/main/java/com/adyen/service/Notification.java index db77db79d..947f8137f 100644 --- a/src/main/java/com/adyen/service/Notification.java +++ b/src/main/java/com/adyen/service/Notification.java @@ -22,8 +22,23 @@ import com.adyen.Client; import com.adyen.Service; -import com.adyen.model.marketpay.notification.*; -import com.adyen.service.resource.notification.*; +import com.adyen.model.marketpay.notification.CreateNotificationConfigurationRequest; +import com.adyen.model.marketpay.notification.CreateNotificationConfigurationResponse; +import com.adyen.model.marketpay.notification.DeleteNotificationConfigurationRequest; +import com.adyen.model.marketpay.notification.DeleteNotificationConfigurationResponse; +import com.adyen.model.marketpay.notification.GetNotificationConfigurationListResponse; +import com.adyen.model.marketpay.notification.GetNotificationConfigurationRequest; +import com.adyen.model.marketpay.notification.GetNotificationConfigurationResponse; +import com.adyen.model.marketpay.notification.TestNotificationConfigurationRequest; +import com.adyen.model.marketpay.notification.TestNotificationConfigurationResponse; +import com.adyen.model.marketpay.notification.UpdateNotificationConfigurationRequest; +import com.adyen.model.marketpay.notification.UpdateNotificationConfigurationResponse; +import com.adyen.service.resource.notification.CreateNotificationConfiguration; +import com.adyen.service.resource.notification.DeleteNotificationConfigurations; +import com.adyen.service.resource.notification.GetNotificationConfiguration; +import com.adyen.service.resource.notification.GetNotificationConfigurationList; +import com.adyen.service.resource.notification.TestNotificationConfiguration; +import com.adyen.service.resource.notification.UpdateNotificationConfiguration; import com.google.gson.reflect.TypeToken; public class Notification extends Service { @@ -82,23 +97,23 @@ public DeleteNotificationConfigurationResponse deleteNotificationConfiguration(D return deleteNotificationConfigurationResponse; } - public TestNotificationConfigurationResponse testNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest) throws Exception{ - String jsonRequest = GSON.toJson(testNotificationConfigurationRequest); - String jsonResult = testNotificationConfiguration.request(jsonRequest); + public TestNotificationConfigurationResponse testNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest) throws Exception { + String jsonRequest = GSON.toJson(testNotificationConfigurationRequest); + String jsonResult = testNotificationConfiguration.request(jsonRequest); - TestNotificationConfigurationResponse testNotificationConfigurationResponse = GSON.fromJson(jsonResult, new TypeToken() { - }.getType()); + TestNotificationConfigurationResponse testNotificationConfigurationResponse = GSON.fromJson(jsonResult, new TypeToken() { + }.getType()); - return testNotificationConfigurationResponse; - } + return testNotificationConfigurationResponse; + } - public GetNotificationConfigurationListResponse getNotificationConfigurationList() throws Exception{ + public GetNotificationConfigurationListResponse getNotificationConfigurationList() throws Exception { String jsonResult = getNotificationConfigurationList.request("{}"); - GetNotificationConfigurationListResponse getNotificationConfigurationListResponse = GSON.fromJson(jsonResult, new TypeToken(){ + GetNotificationConfigurationListResponse getNotificationConfigurationListResponse = GSON.fromJson(jsonResult, new TypeToken() { }.getType()); return getNotificationConfigurationListResponse; - } + } } \ No newline at end of file diff --git a/src/main/java/com/adyen/service/Payout.java b/src/main/java/com/adyen/service/Payout.java index 88595bbf7..d596b2404 100644 --- a/src/main/java/com/adyen/service/Payout.java +++ b/src/main/java/com/adyen/service/Payout.java @@ -27,8 +27,6 @@ import com.adyen.model.payout.ConfirmThirdPartyResponse; import com.adyen.model.payout.DeclineThirdPartyRequest; import com.adyen.model.payout.DeclineThirdPartyResponse; -import com.adyen.model.payout.ModifyRequest; -import com.adyen.model.payout.ModifyResponse; import com.adyen.model.payout.StoreDetailAndSubmitRequest; import com.adyen.model.payout.StoreDetailAndSubmitResponse; import com.adyen.model.payout.StoreDetailRequest; diff --git a/src/main/java/com/adyen/service/resource/modification/Capture.java b/src/main/java/com/adyen/service/resource/modification/Capture.java index 57f57c765..66c13c433 100644 --- a/src/main/java/com/adyen/service/resource/modification/Capture.java +++ b/src/main/java/com/adyen/service/resource/modification/Capture.java @@ -21,7 +21,6 @@ package com.adyen.service.resource.modification; import java.util.Arrays; -import java.util.List; import com.adyen.Client; import com.adyen.Service; import com.adyen.service.Resource; diff --git a/src/test/java/com/adyen/MarketPayTest.java b/src/test/java/com/adyen/MarketPayTest.java index e3ad55ffa..ee21f4b40 100644 --- a/src/test/java/com/adyen/MarketPayTest.java +++ b/src/test/java/com/adyen/MarketPayTest.java @@ -277,7 +277,7 @@ public void TestAccountHolderBalanceSuccess() throws Exception { // create AccountHolderBalance Request AccountHolderBalanceRequest accountHolderBalanceRequest = new AccountHolderBalanceRequest(); accountHolderBalanceRequest.accountHolderCode("TestAccountHolder877209"); - AccountHolderBalanceResponse accountHolderBalanceResponse = fund.AccountHolderBalance(accountHolderBalanceRequest); + AccountHolderBalanceResponse accountHolderBalanceResponse = fund.accountHolderBalance(accountHolderBalanceRequest); assertEquals(new Long(42058), accountHolderBalanceResponse.getTotalBalance().getPendingBalance().get(0).getValue()); From 510c1f2a893e34592d9b9b0f0b8d037c4d6848f7 Mon Sep 17 00:00:00 2001 From: Giorgos Adam Date: Fri, 26 Oct 2018 17:56:27 +0200 Subject: [PATCH 2/3] Pin org.apache.felix maven-bundle-plugin to 3.5.0 --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 0ac039c8c..589313522 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,7 @@ org.apache.felix maven-bundle-plugin + 3.5.0 bundle-manifest From 4015766ec2aebb64ebb75a30f9b413f6dd8009f5 Mon Sep 17 00:00:00 2001 From: Giorgos Adam Date: Mon, 29 Oct 2018 11:05:13 +0100 Subject: [PATCH 3/3] Fixing storeToken style --- .../model/recurring/StoreTokenRequest.java | 461 +++++++++--------- .../model/recurring/StoreTokenResult.java | 346 ++++++------- .../java/com/adyen/service/Recurring.java | 34 +- 3 files changed, 420 insertions(+), 421 deletions(-) diff --git a/src/main/java/com/adyen/model/recurring/StoreTokenRequest.java b/src/main/java/com/adyen/model/recurring/StoreTokenRequest.java index a68f7fd29..63ca9d12d 100644 --- a/src/main/java/com/adyen/model/recurring/StoreTokenRequest.java +++ b/src/main/java/com/adyen/model/recurring/StoreTokenRequest.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -21,7 +21,6 @@ package com.adyen.model.recurring; import com.adyen.model.Card; -import com.adyen.model.recurring.Recurring; import com.google.gson.annotations.SerializedName; /** @@ -29,234 +28,234 @@ */ public class StoreTokenRequest { - @SerializedName("card") - private Card card; - - @SerializedName("merchantAccount") - private String merchantAccount; - - @SerializedName("pspEchoData") - private String pspEchoData; - - @SerializedName("recurring") - private Recurring recurring; - - @SerializedName("selectedBrand") - private String selectedBrand; - - @SerializedName("shopperEmail") - private String shopperEmail; - - @SerializedName("shopperIP") - private String shopperIP; - - @SerializedName("shopperReference") - private String shopperReference; - - @SerializedName("shopperStatement") - private String shopperStatement; - - /** - * A container for card data. - * - * @return card - */ - public Card getCard() { - return card; - } - - public void setCard(Card card) { - this.card = card; - } - - public StoreTokenRequest card(Card card) { - this.card = card; - return this; - } - - /** - * The merchant account identifier you want to process the (transaction) request with. - * - * @return merchantAccount - */ - public String getMerchantAccount() { - return merchantAccount; - } - - public void setMerchantAccount(String merchantAccount) { - this.merchantAccount = merchantAccount; - } - - public StoreTokenRequest merchantAccount(String merchantAccount) { - this.merchantAccount = merchantAccount; - return this; - } - - /** - * The pspEchoData value received in the prepareStoreToken response. - * - * @return pspEchoData - */ - public String getPspEchoData() { - return pspEchoData; - } - - public void setPspEchoData(String pspEchoData) { - this.pspEchoData = pspEchoData; - } - - public StoreTokenRequest pspEchoData(String pspEchoData) { - this.pspEchoData = pspEchoData; - return this; - } - - /** - * A container for the type of recurring contract to be retrieved. The recurring.contract must be set to "RECURRING". - * - * @return recurring - */ - public Recurring getRecurring() { - return recurring; - } - - public void setRecurring(Recurring recurring) { - this.recurring = recurring; - } - - public StoreTokenRequest recurring(Recurring recurring) { - this.recurring = recurring; - return this; - } - - /** - * Some payment methods require defining a value for this field to specify how to process the transaction. - * - * @return selectedBrand - */ - public String getSelectedBrand() { - return selectedBrand; - } - - public void setSelectedBrand(String selectedBrand) { - this.selectedBrand = selectedBrand; - } - - public StoreTokenRequest selectedBrand(String selectedBrand) { - this.selectedBrand = selectedBrand; - return this; - } - - /** - * The shopper's email address. - * - * @return shopperEmail - */ - public String getShopperEmail() { - return shopperEmail; - } - - public void setShopperEmail(String shopperEmail) { - this.shopperEmail = shopperEmail; - } - - public StoreTokenRequest shopperEmail(String shopperEmail) { - this.shopperEmail = shopperEmail; - return this; - } - - /** - * The shopper's IP address. - * - * @return shopperIP - */ - public String getShopperIP() { - return shopperIP; - } - - public void setShopperIP(String shopperIP) { - this.shopperIP = shopperIP; - } - - public StoreTokenRequest shopperIP(String shopperIP) { - this.shopperIP = shopperIP; - return this; - } - - /** - * The shopper's reference for the payment transaction. - * - * @return shopperReference - */ - public String getShopperReference() { - return shopperReference; - } - - public void setShopperReference(String shopperReference) { - this.shopperReference = shopperReference; - } - - public StoreTokenRequest shopperReference(String shopperReference) { - this.shopperReference = shopperReference; - return this; - } - - /** - * The text to appear on a shopper's statement. - * - * @return shopperStatement - */ - public String getShopperStatement() { - return shopperStatement; - } - - public void setShopperStatement(String shopperStatement) { - this.shopperStatement = shopperStatement; - } - - public StoreTokenRequest shopperStatement(String shopperStatement) { - this.shopperStatement = shopperStatement; - return this; - } - - public StoreTokenRequest setCardData(String cardNumber, String cardHolder, String expiryMonth, String expiryYear, String cvc) { - Card card = new Card(); - card.setExpiryMonth(expiryMonth); - card.setExpiryYear(expiryYear); - card.setHolderName(cardHolder); - card.setNumber(cardNumber); - card.setCvc(cvc); - - this.setCard(card); - return this; - } - - public StoreTokenRequest setContractToRecurring() { - setRecurring(new Recurring().contract(Recurring.ContractEnum.RECURRING)); - return this; - } - - public StoreTokenRequest setContractToOneClick() { - setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK)); - return this; - } - - public StoreTokenRequest setContractToOneClickRecurring() { - setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK_RECURRING)); - return this; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(this.getClass().getSimpleName()); - sb.append("[merchantAccount=").append(merchantAccount); - sb.append(", shopperReference=").append(shopperReference); - sb.append(", shopperEmail=").append(shopperEmail); - sb.append(", hasCard=").append(card != null); - sb.append(", selectedBrand=").append(selectedBrand); - sb.append(", shopperStatement=").append(shopperStatement); - sb.append("]"); - return sb.toString(); - } + @SerializedName("card") + private Card card; + + @SerializedName("merchantAccount") + private String merchantAccount; + + @SerializedName("pspEchoData") + private String pspEchoData; + + @SerializedName("recurring") + private Recurring recurring; + + @SerializedName("selectedBrand") + private String selectedBrand; + + @SerializedName("shopperEmail") + private String shopperEmail; + + @SerializedName("shopperIP") + private String shopperIP; + + @SerializedName("shopperReference") + private String shopperReference; + + @SerializedName("shopperStatement") + private String shopperStatement; + + /** + * A container for card data. + * + * @return card + */ + public Card getCard() { + return card; + } + + public void setCard(Card card) { + this.card = card; + } + + public StoreTokenRequest card(Card card) { + this.card = card; + return this; + } + + /** + * The merchant account identifier you want to process the (transaction) request with. + * + * @return merchantAccount + */ + public String getMerchantAccount() { + return merchantAccount; + } + + public void setMerchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + } + + public StoreTokenRequest merchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + return this; + } + + /** + * The pspEchoData value received in the prepareStoreToken response. + * + * @return pspEchoData + */ + public String getPspEchoData() { + return pspEchoData; + } + + public void setPspEchoData(String pspEchoData) { + this.pspEchoData = pspEchoData; + } + + public StoreTokenRequest pspEchoData(String pspEchoData) { + this.pspEchoData = pspEchoData; + return this; + } + + /** + * A container for the type of recurring contract to be retrieved. The recurring.contract must be set to "RECURRING". + * + * @return recurring + */ + public Recurring getRecurring() { + return recurring; + } + + public void setRecurring(Recurring recurring) { + this.recurring = recurring; + } + + public StoreTokenRequest recurring(Recurring recurring) { + this.recurring = recurring; + return this; + } + + /** + * Some payment methods require defining a value for this field to specify how to process the transaction. + * + * @return selectedBrand + */ + public String getSelectedBrand() { + return selectedBrand; + } + + public void setSelectedBrand(String selectedBrand) { + this.selectedBrand = selectedBrand; + } + + public StoreTokenRequest selectedBrand(String selectedBrand) { + this.selectedBrand = selectedBrand; + return this; + } + + /** + * The shopper's email address. + * + * @return shopperEmail + */ + public String getShopperEmail() { + return shopperEmail; + } + + public void setShopperEmail(String shopperEmail) { + this.shopperEmail = shopperEmail; + } + + public StoreTokenRequest shopperEmail(String shopperEmail) { + this.shopperEmail = shopperEmail; + return this; + } + + /** + * The shopper's IP address. + * + * @return shopperIP + */ + public String getShopperIP() { + return shopperIP; + } + + public void setShopperIP(String shopperIP) { + this.shopperIP = shopperIP; + } + + public StoreTokenRequest shopperIP(String shopperIP) { + this.shopperIP = shopperIP; + return this; + } + + /** + * The shopper's reference for the payment transaction. + * + * @return shopperReference + */ + public String getShopperReference() { + return shopperReference; + } + + public void setShopperReference(String shopperReference) { + this.shopperReference = shopperReference; + } + + public StoreTokenRequest shopperReference(String shopperReference) { + this.shopperReference = shopperReference; + return this; + } + + /** + * The text to appear on a shopper's statement. + * + * @return shopperStatement + */ + public String getShopperStatement() { + return shopperStatement; + } + + public void setShopperStatement(String shopperStatement) { + this.shopperStatement = shopperStatement; + } + + public StoreTokenRequest shopperStatement(String shopperStatement) { + this.shopperStatement = shopperStatement; + return this; + } + + public StoreTokenRequest setCardData(String cardNumber, String cardHolder, String expiryMonth, String expiryYear, String cvc) { + Card card = new Card(); + card.setExpiryMonth(expiryMonth); + card.setExpiryYear(expiryYear); + card.setHolderName(cardHolder); + card.setNumber(cardNumber); + card.setCvc(cvc); + + this.setCard(card); + return this; + } + + public StoreTokenRequest setContractToRecurring() { + setRecurring(new Recurring().contract(Recurring.ContractEnum.RECURRING)); + return this; + } + + public StoreTokenRequest setContractToOneClick() { + setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK)); + return this; + } + + public StoreTokenRequest setContractToOneClickRecurring() { + setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK_RECURRING)); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(this.getClass().getSimpleName()); + sb.append("[merchantAccount=").append(merchantAccount); + sb.append(", shopperReference=").append(shopperReference); + sb.append(", shopperEmail=").append(shopperEmail); + sb.append(", hasCard=").append(card != null); + sb.append(", selectedBrand=").append(selectedBrand); + sb.append(", shopperStatement=").append(shopperStatement); + sb.append("]"); + return sb.toString(); + } } diff --git a/src/main/java/com/adyen/model/recurring/StoreTokenResult.java b/src/main/java/com/adyen/model/recurring/StoreTokenResult.java index b1b395d7f..3ac759f49 100644 --- a/src/main/java/com/adyen/model/recurring/StoreTokenResult.java +++ b/src/main/java/com/adyen/model/recurring/StoreTokenResult.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -27,177 +27,177 @@ */ public class StoreTokenResult { - @SerializedName("alias") - private String alias; - - @SerializedName("aliasType") - private String aliasType; - - @SerializedName("pspEchoData") - private String pspEchoData; - - @SerializedName("pspReference") - private String pspReference; - - @SerializedName("recurringDetailReference") - private String recurringDetailReference; - - @SerializedName("redirectType") - private String redirectType; - - @SerializedName("redirectUrl") - private String redirectUrl; - - @SerializedName("result") - private String result; - - /** - * The alias of the credit card number. It is a unique alphanumeric identifier for the card. - * - * @return alias - */ - public String getAlias() { - return alias; - } - - public void setAlias(String alias) { - this.alias = alias; - } - - public StoreTokenResult alias(String alias) { - this.alias = alias; - return this; - } - - /** - * The alias type of the credit card number. Allowed values: Default and BinLetterRandomLastFour. The alias type depends on your account configuration. - * - * @return aliasType - */ - public String getAliasType() { - return aliasType; - } - - public void setAliasType(String aliasType) { - this.aliasType = aliasType; - } - - public StoreTokenResult aliasType(String aliasType) { - this.aliasType = aliasType; - return this; - } - - /** - * A data blob that must be submitted in the storeToken request. - * - * @return pspEchoData - */ - public String getPspEchoData() { - return pspEchoData; - } - - public void setPspEchoData(String pspEchoData) { - this.pspEchoData = pspEchoData; - } - - public StoreTokenResult pspEchoData(String pspEchoData) { - this.pspEchoData = pspEchoData; - return this; - } - - /** - * A reference to uniquely identify the request. - * - * @return pspReference - */ - public String getPspReference() { - return pspReference; - } - - public void setPspReference(String pspReference) { - this.pspReference = pspReference; - } - - public StoreTokenResult pspReference(String pspReference) { - this.pspReference = pspReference; - return this; - } - - /** - * The reference that uniquely identifies the recurring detail. - * - * @return recurringDetailReference - */ - public String getRecurringDetailReference() { - return recurringDetailReference; - } - - public void setRecurringDetailReference(String recurringDetailReference) { - this.recurringDetailReference = recurringDetailReference; - } - - public StoreTokenResult recurringDetailReference(String recurringDetailReference) { - this.recurringDetailReference = recurringDetailReference; - return this; - } - - public String getRedirectType() { - return redirectType; - } - - public void setRedirectType(String redirectType) { - this.redirectType = redirectType; - } - - public StoreTokenResult redirectType(String redirectType) { - this.redirectType = redirectType; - return this; - } - - public String getRedirectUrl() { - return redirectUrl; - } - - public void setRedirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; - } - - public StoreTokenResult redirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; - return this; - } - - /** - * - * @return result - */ - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result; - } - - public StoreTokenResult result(String result) { - this.result = result; - return this; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(this.getClass().getSimpleName()); - sb.append("["); - sb.append("pspReference=").append(pspReference); - sb.append(", recurringDetailReference=").append(recurringDetailReference); - sb.append(", result=").append(result); - sb.append(", alias=").append(alias); - sb.append(", aliasType=").append(aliasType); - sb.append(", redirectUrl=").append(redirectUrl); - sb.append(", redirectType=").append(redirectType); - sb.append("]"); - return sb.toString(); - } + @SerializedName("alias") + private String alias; + + @SerializedName("aliasType") + private String aliasType; + + @SerializedName("pspEchoData") + private String pspEchoData; + + @SerializedName("pspReference") + private String pspReference; + + @SerializedName("recurringDetailReference") + private String recurringDetailReference; + + @SerializedName("redirectType") + private String redirectType; + + @SerializedName("redirectUrl") + private String redirectUrl; + + @SerializedName("result") + private String result; + + /** + * The alias of the credit card number. It is a unique alphanumeric identifier for the card. + * + * @return alias + */ + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public StoreTokenResult alias(String alias) { + this.alias = alias; + return this; + } + + /** + * The alias type of the credit card number. Allowed values: Default and BinLetterRandomLastFour. The alias type depends on your account configuration. + * + * @return aliasType + */ + public String getAliasType() { + return aliasType; + } + + public void setAliasType(String aliasType) { + this.aliasType = aliasType; + } + + public StoreTokenResult aliasType(String aliasType) { + this.aliasType = aliasType; + return this; + } + + /** + * A data blob that must be submitted in the storeToken request. + * + * @return pspEchoData + */ + public String getPspEchoData() { + return pspEchoData; + } + + public void setPspEchoData(String pspEchoData) { + this.pspEchoData = pspEchoData; + } + + public StoreTokenResult pspEchoData(String pspEchoData) { + this.pspEchoData = pspEchoData; + return this; + } + + /** + * A reference to uniquely identify the request. + * + * @return pspReference + */ + public String getPspReference() { + return pspReference; + } + + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + public StoreTokenResult pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference that uniquely identifies the recurring detail. + * + * @return recurringDetailReference + */ + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + public StoreTokenResult recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + public String getRedirectType() { + return redirectType; + } + + public void setRedirectType(String redirectType) { + this.redirectType = redirectType; + } + + public StoreTokenResult redirectType(String redirectType) { + this.redirectType = redirectType; + return this; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public StoreTokenResult redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * + * @return result + */ + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + + public StoreTokenResult result(String result) { + this.result = result; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(this.getClass().getSimpleName()); + sb.append("["); + sb.append("pspReference=").append(pspReference); + sb.append(", recurringDetailReference=").append(recurringDetailReference); + sb.append(", result=").append(result); + sb.append(", alias=").append(alias); + sb.append(", aliasType=").append(aliasType); + sb.append(", redirectUrl=").append(redirectUrl); + sb.append(", redirectType=").append(redirectType); + sb.append("]"); + return sb.toString(); + } } diff --git a/src/main/java/com/adyen/service/Recurring.java b/src/main/java/com/adyen/service/Recurring.java index cb658322d..0a303cd13 100644 --- a/src/main/java/com/adyen/service/Recurring.java +++ b/src/main/java/com/adyen/service/Recurring.java @@ -1,4 +1,4 @@ -/** +/* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ @@ -21,7 +21,6 @@ package com.adyen.service; import java.io.IOException; - import com.adyen.Client; import com.adyen.Service; import com.adyen.model.recurring.DisableRequest; @@ -69,6 +68,7 @@ public RecurringDetailsResult listRecurringDetails(RecurringDetailsRequest reque /** * Issues a disable recurring contract API call + * * @param request * @return * @throws IOException @@ -84,22 +84,22 @@ public DisableResult disable(DisableRequest request) throws IOException, ApiExce return result; } - /** - * Issues a storeToken API call - * - * @param request - * @return - * @throws IOException - * @throws ApiException - */ - public StoreTokenResult storeToken(StoreTokenRequest request) throws IOException, ApiException { - String jsonRequest = GSON.toJson(request); + /** + * Issues a storeToken API call + * + * @param request + * @return + * @throws IOException + * @throws ApiException + */ + public StoreTokenResult storeToken(StoreTokenRequest request) throws IOException, ApiException { + String jsonRequest = GSON.toJson(request); - String jsonResult = storeToken.request(jsonRequest); + String jsonResult = storeToken.request(jsonRequest); - StoreTokenResult result = GSON.fromJson(jsonResult, new TypeToken() { - }.getType()); - return result; - } + StoreTokenResult result = GSON.fromJson(jsonResult, new TypeToken() { + }.getType()); + return result; + } }