From 477598d9f1cc1496c3117b4611d3c97dfa553d22 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Thu, 14 May 2026 14:22:16 +0000 Subject: [PATCH] [transferwebhooks] Automated update from Adyen/adyen-openapi@cbc5406 --- sdk-generation-log/transferwebhooks.json | 8 +- .../transferwebhooks/FundingInstrument.java | 304 +++++++++ .../IbanAccountIdentification.java | 43 +- .../model/transferwebhooks/IssuedCard.java | 35 +- .../model/transferwebhooks/Modification.java | 4 + .../model/transferwebhooks/TransferData.java | 44 ++ .../model/transferwebhooks/TransferEvent.java | 4 + .../TransferNotificationMerchantData.java | 48 +- .../UltimatePartyIdentification.java | 606 ++++++++++++++++++ 9 files changed, 1075 insertions(+), 21 deletions(-) create mode 100644 src/main/java/com/adyen/model/transferwebhooks/FundingInstrument.java create mode 100644 src/main/java/com/adyen/model/transferwebhooks/UltimatePartyIdentification.java diff --git a/sdk-generation-log/transferwebhooks.json b/sdk-generation-log/transferwebhooks.json index 80b7c5e09..1ed24a7f8 100644 --- a/sdk-generation-log/transferwebhooks.json +++ b/sdk-generation-log/transferwebhooks.json @@ -1,8 +1,8 @@ { "service": "transferwebhooks", "project": "java", - "generatedAt": "2026-04-10T08:24:56Z", - "openapiCommitSha": "aa5556ef9586980ba6c319d0750fb38d7bbda09b", - "automationCommitSha": "855b6c5526cb5fae757e921687c38df66d31dc4b", - "libraryCommitSha": "334bfa6a6af849c76a7a28c45a36a692ab0274c3" + "generatedAt": "2026-05-14T14:22:16Z", + "openapiCommitSha": "cbc5406a2df1f24d50e40742f18342f7ca7f21fc", + "automationCommitSha": "6f06b47d0661f0891defe6b85461d2c367fbd284", + "libraryCommitSha": "5790580db2f8a931a68baba2bff9760b8aed2067" } diff --git a/src/main/java/com/adyen/model/transferwebhooks/FundingInstrument.java b/src/main/java/com/adyen/model/transferwebhooks/FundingInstrument.java new file mode 100644 index 000000000..a6f820a8c --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/FundingInstrument.java @@ -0,0 +1,304 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.transferwebhooks; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** FundingInstrument */ +@JsonPropertyOrder({ + FundingInstrument.JSON_PROPERTY_CARD_IDENTIFICATION, + FundingInstrument.JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE, + FundingInstrument.JSON_PROPERTY_REFERENCE, + FundingInstrument.JSON_PROPERTY_SOURCE_OF_FUNDS +}) +public class FundingInstrument { + public static final String JSON_PROPERTY_CARD_IDENTIFICATION = "cardIdentification"; + private CardIdentification cardIdentification; + + public static final String JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE = "networkPaymentReference"; + private String networkPaymentReference; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** + * Indicates where the funds used for the transfer originated. Possible values are: - **DEBIT** + * for card-to-card transfers. - **DEPOSIT_ACCOUNT** for wallet-to-card transfers. + */ + public enum SourceOfFundsEnum { + DEBIT(String.valueOf("DEBIT")), + + DEPOSIT_ACCOUNT(String.valueOf("DEPOSIT_ACCOUNT")); + + private static final Logger LOG = Logger.getLogger(SourceOfFundsEnum.class.getName()); + + private String value; + + SourceOfFundsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceOfFundsEnum fromValue(String value) { + for (SourceOfFundsEnum b : SourceOfFundsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "SourceOfFundsEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(SourceOfFundsEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds"; + private SourceOfFundsEnum sourceOfFunds; + + public FundingInstrument() {} + + /** + * cardIdentification + * + * @param cardIdentification + * @return the current {@code FundingInstrument} instance, allowing for method chaining + */ + public FundingInstrument cardIdentification(CardIdentification cardIdentification) { + this.cardIdentification = cardIdentification; + return this; + } + + /** + * Get cardIdentification + * + * @return cardIdentification + */ + @JsonProperty(JSON_PROPERTY_CARD_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CardIdentification getCardIdentification() { + return cardIdentification; + } + + /** + * cardIdentification + * + * @param cardIdentification + */ + @JsonProperty(JSON_PROPERTY_CARD_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardIdentification(CardIdentification cardIdentification) { + this.cardIdentification = cardIdentification; + } + + /** + * The unique reference assigned by the card network for the pay-in transaction. + * + * @param networkPaymentReference The unique reference assigned by the card network for the pay-in + * transaction. + * @return the current {@code FundingInstrument} instance, allowing for method chaining + */ + public FundingInstrument networkPaymentReference(String networkPaymentReference) { + this.networkPaymentReference = networkPaymentReference; + return this; + } + + /** + * The unique reference assigned by the card network for the pay-in transaction. + * + * @return networkPaymentReference The unique reference assigned by the card network for the + * pay-in transaction. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNetworkPaymentReference() { + return networkPaymentReference; + } + + /** + * The unique reference assigned by the card network for the pay-in transaction. + * + * @param networkPaymentReference The unique reference assigned by the card network for the pay-in + * transaction. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkPaymentReference(String networkPaymentReference) { + this.networkPaymentReference = networkPaymentReference; + } + + /** + * Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + * + * @param reference Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + * @return the current {@code FundingInstrument} instance, allowing for method chaining + */ + public FundingInstrument reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + * + * @return reference Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReference() { + return reference; + } + + /** + * Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + * + * @param reference Your internal reference that identifies this funding instrument. Required if + * `sourceOfFunds` is **DEPOSIT_ACCOUNT**. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + /** + * Indicates where the funds used for the transfer originated. Possible values are: - **DEBIT** + * for card-to-card transfers. - **DEPOSIT_ACCOUNT** for wallet-to-card transfers. + * + * @param sourceOfFunds Indicates where the funds used for the transfer originated. Possible + * values are: - **DEBIT** for card-to-card transfers. - **DEPOSIT_ACCOUNT** for + * wallet-to-card transfers. + * @return the current {@code FundingInstrument} instance, allowing for method chaining + */ + public FundingInstrument sourceOfFunds(SourceOfFundsEnum sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** + * Indicates where the funds used for the transfer originated. Possible values are: - **DEBIT** + * for card-to-card transfers. - **DEPOSIT_ACCOUNT** for wallet-to-card transfers. + * + * @return sourceOfFunds Indicates where the funds used for the transfer originated. Possible + * values are: - **DEBIT** for card-to-card transfers. - **DEPOSIT_ACCOUNT** for + * wallet-to-card transfers. + */ + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceOfFundsEnum getSourceOfFunds() { + return sourceOfFunds; + } + + /** + * Indicates where the funds used for the transfer originated. Possible values are: - **DEBIT** + * for card-to-card transfers. - **DEPOSIT_ACCOUNT** for wallet-to-card transfers. + * + * @param sourceOfFunds Indicates where the funds used for the transfer originated. Possible + * values are: - **DEBIT** for card-to-card transfers. - **DEPOSIT_ACCOUNT** for + * wallet-to-card transfers. + */ + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfFunds(SourceOfFundsEnum sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + } + + /** Return true if this FundingInstrument object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FundingInstrument fundingInstrument = (FundingInstrument) o; + return Objects.equals(this.cardIdentification, fundingInstrument.cardIdentification) + && Objects.equals(this.networkPaymentReference, fundingInstrument.networkPaymentReference) + && Objects.equals(this.reference, fundingInstrument.reference) + && Objects.equals(this.sourceOfFunds, fundingInstrument.sourceOfFunds); + } + + @Override + public int hashCode() { + return Objects.hash(cardIdentification, networkPaymentReference, reference, sourceOfFunds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FundingInstrument {\n"); + sb.append(" cardIdentification: ").append(toIndentedString(cardIdentification)).append("\n"); + sb.append(" networkPaymentReference: ") + .append(toIndentedString(networkPaymentReference)) + .append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).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 "); + } + + /** + * Create an instance of FundingInstrument given an JSON string + * + * @param jsonString JSON string + * @return An instance of FundingInstrument + * @throws JsonProcessingException if the JSON string is invalid with respect to FundingInstrument + */ + public static FundingInstrument fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FundingInstrument.class); + } + + /** + * Convert an instance of FundingInstrument to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java index 3d44f7cc4..d1df4ba48 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java @@ -23,10 +23,14 @@ /** IbanAccountIdentification */ @JsonPropertyOrder({ + IbanAccountIdentification.JSON_PROPERTY_BIC, IbanAccountIdentification.JSON_PROPERTY_IBAN, IbanAccountIdentification.JSON_PROPERTY_TYPE }) public class IbanAccountIdentification { + public static final String JSON_PROPERTY_BIC = "bic"; + private String bic; + public static final String JSON_PROPERTY_IBAN = "iban"; private String iban; @@ -74,6 +78,39 @@ public static TypeEnum fromValue(String value) { public IbanAccountIdentification() {} + /** + * The bank's 8- or 11-character BIC or SWIFT code. + * + * @param bic The bank's 8- or 11-character BIC or SWIFT code. + * @return the current {@code IbanAccountIdentification} instance, allowing for method chaining + */ + public IbanAccountIdentification bic(String bic) { + this.bic = bic; + return this; + } + + /** + * The bank's 8- or 11-character BIC or SWIFT code. + * + * @return bic The bank's 8- or 11-character BIC or SWIFT code. + */ + @JsonProperty(JSON_PROPERTY_BIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBic() { + return bic; + } + + /** + * The bank's 8- or 11-character BIC or SWIFT code. + * + * @param bic The bank's 8- or 11-character BIC or SWIFT code. + */ + @JsonProperty(JSON_PROPERTY_BIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBic(String bic) { + this.bic = bic; + } + /** * The international bank account number as defined in the * [ISO-13616](https://www.iso.org/standard/81090.html) standard. @@ -156,19 +193,21 @@ public boolean equals(Object o) { return false; } IbanAccountIdentification ibanAccountIdentification = (IbanAccountIdentification) o; - return Objects.equals(this.iban, ibanAccountIdentification.iban) + return Objects.equals(this.bic, ibanAccountIdentification.bic) + && Objects.equals(this.iban, ibanAccountIdentification.iban) && Objects.equals(this.type, ibanAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(iban, type); + return Objects.hash(bic, iban, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IbanAccountIdentification {\n"); + sb.append(" bic: ").append(toIndentedString(bic)).append("\n"); sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java b/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java index b464f625f..e8e9f58e8 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java +++ b/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java @@ -97,8 +97,9 @@ public static PanEntryModeEnum fromValue(String value) { private PanEntryModeEnum panEntryMode; /** - * Contains information about how the payment was processed. For example, **ecommerce** for online - * or **pos** for in-person payments. + * Contains information about how the payment was processed. Possible values: **atmWithdraw**, + * **balanceInquiry**, **ecommerce**, **moto**, **pos**, **purchaseWithCashback**, **recurring**, + * **token**. */ public enum ProcessingTypeEnum { ATMWITHDRAW(String.valueOf("atmWithdraw")), @@ -297,11 +298,13 @@ public void setPanEntryMode(PanEntryModeEnum panEntryMode) { } /** - * Contains information about how the payment was processed. For example, **ecommerce** for online - * or **pos** for in-person payments. + * Contains information about how the payment was processed. Possible values: **atmWithdraw**, + * **balanceInquiry**, **ecommerce**, **moto**, **pos**, **purchaseWithCashback**, **recurring**, + * **token**. * - * @param processingType Contains information about how the payment was processed. For example, - * **ecommerce** for online or **pos** for in-person payments. + * @param processingType Contains information about how the payment was processed. Possible + * values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, + * **purchaseWithCashback**, **recurring**, **token**. * @return the current {@code IssuedCard} instance, allowing for method chaining */ public IssuedCard processingType(ProcessingTypeEnum processingType) { @@ -310,11 +313,13 @@ public IssuedCard processingType(ProcessingTypeEnum processingType) { } /** - * Contains information about how the payment was processed. For example, **ecommerce** for online - * or **pos** for in-person payments. + * Contains information about how the payment was processed. Possible values: **atmWithdraw**, + * **balanceInquiry**, **ecommerce**, **moto**, **pos**, **purchaseWithCashback**, **recurring**, + * **token**. * - * @return processingType Contains information about how the payment was processed. For example, - * **ecommerce** for online or **pos** for in-person payments. + * @return processingType Contains information about how the payment was processed. Possible + * values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, + * **purchaseWithCashback**, **recurring**, **token**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -323,11 +328,13 @@ public ProcessingTypeEnum getProcessingType() { } /** - * Contains information about how the payment was processed. For example, **ecommerce** for online - * or **pos** for in-person payments. + * Contains information about how the payment was processed. Possible values: **atmWithdraw**, + * **balanceInquiry**, **ecommerce**, **moto**, **pos**, **purchaseWithCashback**, **recurring**, + * **token**. * - * @param processingType Contains information about how the payment was processed. For example, - * **ecommerce** for online or **pos** for in-person payments. + * @param processingType Contains information about how the payment was processed. Possible + * values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, + * **purchaseWithCashback**, **recurring**, **token**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/transferwebhooks/Modification.java b/src/main/java/com/adyen/model/transferwebhooks/Modification.java index 398b46bdb..79d4fe480 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/Modification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/Modification.java @@ -145,6 +145,8 @@ public enum StatusEnum { PAYMENTCOSTPENDING(String.valueOf("paymentCostPending")), + PENDING(String.valueOf("pending")), + PENDINGAPPROVAL(String.valueOf("pendingApproval")), PENDINGEXECUTION(String.valueOf("pendingExecution")), @@ -171,6 +173,8 @@ public enum StatusEnum { RETURNED(String.valueOf("returned")), + REVERSED(String.valueOf("reversed")), + SECONDCHARGEBACK(String.valueOf("secondChargeback")), SECONDCHARGEBACKPENDING(String.valueOf("secondChargebackPending")), diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferData.java index fb1c78dba..8b624d63d 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferData.java @@ -54,6 +54,7 @@ TransferData.JSON_PROPERTY_TRACKING, TransferData.JSON_PROPERTY_TRANSACTION_RULES_RESULT, TransferData.JSON_PROPERTY_TYPE, + TransferData.JSON_PROPERTY_ULTIMATE_PARTY, TransferData.JSON_PROPERTY_UPDATED_AT }) public class TransferData { @@ -551,6 +552,8 @@ public enum StatusEnum { PAYMENTCOSTPENDING(String.valueOf("paymentCostPending")), + PENDING(String.valueOf("pending")), + PENDINGAPPROVAL(String.valueOf("pendingApproval")), PENDINGEXECUTION(String.valueOf("pendingExecution")), @@ -577,6 +580,8 @@ public enum StatusEnum { RETURNED(String.valueOf("returned")), + REVERSED(String.valueOf("reversed")), + SECONDCHARGEBACK(String.valueOf("secondChargeback")), SECONDCHARGEBACKPENDING(String.valueOf("secondChargebackPending")), @@ -746,6 +751,9 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type; + public static final String JSON_PROPERTY_ULTIMATE_PARTY = "ultimateParty"; + private UltimatePartyIdentification ultimateParty; + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; private OffsetDateTime updatedAt; @@ -1871,6 +1879,39 @@ public void setType(TypeEnum type) { this.type = type; } + /** + * ultimateParty + * + * @param ultimateParty + * @return the current {@code TransferData} instance, allowing for method chaining + */ + public TransferData ultimateParty(UltimatePartyIdentification ultimateParty) { + this.ultimateParty = ultimateParty; + return this; + } + + /** + * Get ultimateParty + * + * @return ultimateParty + */ + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UltimatePartyIdentification getUltimateParty() { + return ultimateParty; + } + + /** + * ultimateParty + * + * @param ultimateParty + */ + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUltimateParty(UltimatePartyIdentification ultimateParty) { + this.ultimateParty = ultimateParty; + } + /** * The date and time when the event was triggered, in ISO 8601 extended format. For example, * **2020-12-18T10:15:30+01:00**. @@ -1948,6 +1989,7 @@ public boolean equals(Object o) { && Objects.equals(this.tracking, transferData.tracking) && Objects.equals(this.transactionRulesResult, transferData.transactionRulesResult) && Objects.equals(this.type, transferData.type) + && Objects.equals(this.ultimateParty, transferData.ultimateParty) && Objects.equals(this.updatedAt, transferData.updatedAt); } @@ -1982,6 +2024,7 @@ public int hashCode() { tracking, transactionRulesResult, type, + ultimateParty, updatedAt); } @@ -2023,6 +2066,7 @@ public String toString() { .append(toIndentedString(transactionRulesResult)) .append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" ultimateParty: ").append(toIndentedString(ultimateParty)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java b/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java index 2420ee509..23da5de7b 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java @@ -396,6 +396,8 @@ public enum StatusEnum { PAYMENTCOSTPENDING(String.valueOf("paymentCostPending")), + PENDING(String.valueOf("pending")), + PENDINGAPPROVAL(String.valueOf("pendingApproval")), PENDINGEXECUTION(String.valueOf("pendingExecution")), @@ -422,6 +424,8 @@ public enum StatusEnum { RETURNED(String.valueOf("returned")), + REVERSED(String.valueOf("reversed")), + SECONDCHARGEBACK(String.valueOf("secondChargeback")), SECONDCHARGEBACKPENDING(String.valueOf("secondChargebackPending")), diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationMerchantData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationMerchantData.java index 1595c6a5b..df23d1bcf 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationMerchantData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationMerchantData.java @@ -22,6 +22,7 @@ TransferNotificationMerchantData.JSON_PROPERTY_ACQUIRER_ID, TransferNotificationMerchantData.JSON_PROPERTY_CITY, TransferNotificationMerchantData.JSON_PROPERTY_COUNTRY, + TransferNotificationMerchantData.JSON_PROPERTY_COUNTRY_CODE, TransferNotificationMerchantData.JSON_PROPERTY_MCC, TransferNotificationMerchantData.JSON_PROPERTY_MERCHANT_ID, TransferNotificationMerchantData.JSON_PROPERTY_NAME, @@ -37,6 +38,9 @@ public class TransferNotificationMerchantData { public static final String JSON_PROPERTY_COUNTRY = "country"; private String country; + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + public static final String JSON_PROPERTY_MCC = "mcc"; private String mcc; @@ -153,6 +157,46 @@ public void setCountry(String country) { this.country = country; } + /** + * The two-character country code of the merchant's location, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * + * @param countryCode The two-character country code of the merchant's location, in [ISO + * 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * @return the current {@code TransferNotificationMerchantData} instance, allowing for method + * chaining + */ + public TransferNotificationMerchantData countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character country code of the merchant's location, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * + * @return countryCode The two-character country code of the merchant's location, in [ISO + * 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountryCode() { + return countryCode; + } + + /** + * The two-character country code of the merchant's location, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * + * @param countryCode The two-character country code of the merchant's location, in [ISO + * 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + /** * The merchant category code. * @@ -303,6 +347,7 @@ public boolean equals(Object o) { return Objects.equals(this.acquirerId, transferNotificationMerchantData.acquirerId) && Objects.equals(this.city, transferNotificationMerchantData.city) && Objects.equals(this.country, transferNotificationMerchantData.country) + && Objects.equals(this.countryCode, transferNotificationMerchantData.countryCode) && Objects.equals(this.mcc, transferNotificationMerchantData.mcc) && Objects.equals(this.merchantId, transferNotificationMerchantData.merchantId) && Objects.equals(this.name, transferNotificationMerchantData.name) @@ -311,7 +356,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(acquirerId, city, country, mcc, merchantId, name, postalCode); + return Objects.hash(acquirerId, city, country, countryCode, mcc, merchantId, name, postalCode); } @Override @@ -321,6 +366,7 @@ public String toString() { sb.append(" acquirerId: ").append(toIndentedString(acquirerId)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" mcc: ").append(toIndentedString(mcc)).append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/adyen/model/transferwebhooks/UltimatePartyIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/UltimatePartyIdentification.java new file mode 100644 index 000000000..de47c2996 --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/UltimatePartyIdentification.java @@ -0,0 +1,606 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.transferwebhooks; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.time.LocalDate; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** UltimatePartyIdentification */ +@JsonPropertyOrder({ + UltimatePartyIdentification.JSON_PROPERTY_ADDRESS, + UltimatePartyIdentification.JSON_PROPERTY_DATE_OF_BIRTH, + UltimatePartyIdentification.JSON_PROPERTY_EMAIL, + UltimatePartyIdentification.JSON_PROPERTY_FIRST_NAME, + UltimatePartyIdentification.JSON_PROPERTY_FULL_NAME, + UltimatePartyIdentification.JSON_PROPERTY_FUNDING_INSTRUMENT, + UltimatePartyIdentification.JSON_PROPERTY_LAST_NAME, + UltimatePartyIdentification.JSON_PROPERTY_REFERENCE, + UltimatePartyIdentification.JSON_PROPERTY_TYPE, + UltimatePartyIdentification.JSON_PROPERTY_URL +}) +public class UltimatePartyIdentification { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private String fullName; + + public static final String JSON_PROPERTY_FUNDING_INSTRUMENT = "fundingInstrument"; + private FundingInstrument fundingInstrument; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** + * The type of entity that owns the bank account or card. Possible values: **individual**, + * **organization**, or **unknown**. Required when `category` is **card**. In this case, + * the value must be **individual**. + */ + public enum TypeEnum { + INDIVIDUAL(String.valueOf("individual")), + + ORGANIZATION(String.valueOf("organization")), + + UNKNOWN(String.valueOf("unknown")); + + private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "TypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(TypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public UltimatePartyIdentification() {} + + /** + * address + * + * @param address + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Address getAddress() { + return address; + } + + /** + * address + * + * @param address + */ + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + /** + * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. + * For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + * + * @param dateOfBirth The date of birth of the individual in + * [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. + * Allowed only when `type` is **individual**. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. + * For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + * + * @return dateOfBirth The date of birth of the individual in + * [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. + * Allowed only when `type` is **individual**. + */ + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + /** + * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. + * For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + * + * @param dateOfBirth The date of birth of the individual in + * [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. + * Allowed only when `type` is **individual**. + */ + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + /** + * The email address of the organization or individual. Maximum length: 254 characters. + * + * @param email The email address of the organization or individual. Maximum length: 254 + * characters. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the organization or individual. Maximum length: 254 characters. + * + * @return email The email address of the organization or individual. Maximum length: 254 + * characters. + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + /** + * The email address of the organization or individual. Maximum length: 254 characters. + * + * @param email The email address of the organization or individual. Maximum length: 254 + * characters. + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + /** + * The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @param firstName The first name of the individual. Supported characters: [a-z] [A-Z] - . / — + * and space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @return firstName The first name of the individual. Supported characters: [a-z] [A-Z] - . / — + * and space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + */ + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirstName() { + return firstName; + } + + /** + * The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @param firstName The first name of the individual. Supported characters: [a-z] [A-Z] - . / — + * and space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + */ + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * The full name of the entity that owns the bank account or card. Supported characters: [a-z] + * [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when + * `category` is **bank**. + * + * @param fullName The full name of the entity that owns the bank account or card. Supported + * characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. + * Required when `category` is **bank**. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification fullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** + * The full name of the entity that owns the bank account or card. Supported characters: [a-z] + * [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when + * `category` is **bank**. + * + * @return fullName The full name of the entity that owns the bank account or card. Supported + * characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. + * Required when `category` is **bank**. + */ + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFullName() { + return fullName; + } + + /** + * The full name of the entity that owns the bank account or card. Supported characters: [a-z] + * [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when + * `category` is **bank**. + * + * @param fullName The full name of the entity that owns the bank account or card. Supported + * characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. + * Required when `category` is **bank**. + */ + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(String fullName) { + this.fullName = fullName; + } + + /** + * fundingInstrument + * + * @param fundingInstrument + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification fundingInstrument(FundingInstrument fundingInstrument) { + this.fundingInstrument = fundingInstrument; + return this; + } + + /** + * Get fundingInstrument + * + * @return fundingInstrument + */ + @JsonProperty(JSON_PROPERTY_FUNDING_INSTRUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FundingInstrument getFundingInstrument() { + return fundingInstrument; + } + + /** + * fundingInstrument + * + * @param fundingInstrument + */ + @JsonProperty(JSON_PROPERTY_FUNDING_INSTRUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundingInstrument(FundingInstrument fundingInstrument) { + this.fundingInstrument = fundingInstrument; + } + + /** + * The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @param lastName The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and + * space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @return lastName The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and + * space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + */ + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastName() { + return lastName; + } + + /** + * The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This + * parameter is: - Allowed only when `type` is **individual**. - Required when + * `category` is **card**. + * + * @param lastName The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and + * space. This parameter is: - Allowed only when `type` is **individual**. - + * Required when `category` is **card**. + */ + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * A unique reference to identify the party or counterparty involved in the transfer. For example, + * your client's unique wallet or payee ID. Required when you include + * `cardIdentification.storedPaymentMethodId`. + * + * @param reference A unique reference to identify the party or counterparty involved in the + * transfer. For example, your client's unique wallet or payee ID. Required when you + * include `cardIdentification.storedPaymentMethodId`. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification reference(String reference) { + this.reference = reference; + return this; + } + + /** + * A unique reference to identify the party or counterparty involved in the transfer. For example, + * your client's unique wallet or payee ID. Required when you include + * `cardIdentification.storedPaymentMethodId`. + * + * @return reference A unique reference to identify the party or counterparty involved in the + * transfer. For example, your client's unique wallet or payee ID. Required when you + * include `cardIdentification.storedPaymentMethodId`. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReference() { + return reference; + } + + /** + * A unique reference to identify the party or counterparty involved in the transfer. For example, + * your client's unique wallet or payee ID. Required when you include + * `cardIdentification.storedPaymentMethodId`. + * + * @param reference A unique reference to identify the party or counterparty involved in the + * transfer. For example, your client's unique wallet or payee ID. Required when you + * include `cardIdentification.storedPaymentMethodId`. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + /** + * The type of entity that owns the bank account or card. Possible values: **individual**, + * **organization**, or **unknown**. Required when `category` is **card**. In this case, + * the value must be **individual**. + * + * @param type The type of entity that owns the bank account or card. Possible values: + * **individual**, **organization**, or **unknown**. Required when `category` is + * **card**. In this case, the value must be **individual**. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of entity that owns the bank account or card. Possible values: **individual**, + * **organization**, or **unknown**. Required when `category` is **card**. In this case, + * the value must be **individual**. + * + * @return type The type of entity that owns the bank account or card. Possible values: + * **individual**, **organization**, or **unknown**. Required when `category` is + * **card**. In this case, the value must be **individual**. + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of entity that owns the bank account or card. Possible values: **individual**, + * **organization**, or **unknown**. Required when `category` is **card**. In this case, + * the value must be **individual**. + * + * @param type The type of entity that owns the bank account or card. Possible values: + * **individual**, **organization**, or **unknown**. Required when `category` is + * **card**. In this case, the value must be **individual**. + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * The URL of the organization or individual. Maximum length: 255 characters. + * + * @param url The URL of the organization or individual. Maximum length: 255 characters. + * @return the current {@code UltimatePartyIdentification} instance, allowing for method chaining + */ + public UltimatePartyIdentification url(String url) { + this.url = url; + return this; + } + + /** + * The URL of the organization or individual. Maximum length: 255 characters. + * + * @return url The URL of the organization or individual. Maximum length: 255 characters. + */ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + /** + * The URL of the organization or individual. Maximum length: 255 characters. + * + * @param url The URL of the organization or individual. Maximum length: 255 characters. + */ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + } + + /** Return true if this UltimatePartyIdentification object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UltimatePartyIdentification ultimatePartyIdentification = (UltimatePartyIdentification) o; + return Objects.equals(this.address, ultimatePartyIdentification.address) + && Objects.equals(this.dateOfBirth, ultimatePartyIdentification.dateOfBirth) + && Objects.equals(this.email, ultimatePartyIdentification.email) + && Objects.equals(this.firstName, ultimatePartyIdentification.firstName) + && Objects.equals(this.fullName, ultimatePartyIdentification.fullName) + && Objects.equals(this.fundingInstrument, ultimatePartyIdentification.fundingInstrument) + && Objects.equals(this.lastName, ultimatePartyIdentification.lastName) + && Objects.equals(this.reference, ultimatePartyIdentification.reference) + && Objects.equals(this.type, ultimatePartyIdentification.type) + && Objects.equals(this.url, ultimatePartyIdentification.url); + } + + @Override + public int hashCode() { + return Objects.hash( + address, + dateOfBirth, + email, + firstName, + fullName, + fundingInstrument, + lastName, + reference, + type, + url); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UltimatePartyIdentification {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" fundingInstrument: ").append(toIndentedString(fundingInstrument)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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 "); + } + + /** + * Create an instance of UltimatePartyIdentification given an JSON string + * + * @param jsonString JSON string + * @return An instance of UltimatePartyIdentification + * @throws JsonProcessingException if the JSON string is invalid with respect to + * UltimatePartyIdentification + */ + public static UltimatePartyIdentification fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UltimatePartyIdentification.class); + } + + /** + * Convert an instance of UltimatePartyIdentification to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +}