From 0a21e2646e7092f584814f9c1b110a74de3f27d3 Mon Sep 17 00:00:00 2001 From: Cristiano Betta Date: Thu, 8 Feb 2024 09:01:21 +0000 Subject: [PATCH] chore: Regenerate based on OpenAPI spec (#41) --- .openapi-generator/FILES | 20 + pom.xml | 2 +- .../gr4vy/api/model/ConnectionOptions.java | 34 +- .../ConnectionOptionsCybersourceCard.java | 99 +++++ .../model/ConnectionOptionsStripeCard.java | 34 +- ...nectionOptionsStripeCardStripeConnect.java | 129 +++++++ .../api/model/Error409DuplicateRecord.java | 2 +- .../api/model/Error429TooManyRequests.java | 361 ++++++++++++++++++ .../api/model/GiftCardBalancesRequest.java | 4 +- .../gr4vy/api/model/GiftCardRedemption.java | 4 +- .../com/gr4vy/api/model/GiftCardSummary.java | 4 +- ...NetworkTokenCryptogramProvisionFailed.java | 308 +++++++++++++++ ...TokenCryptogramProvisionFailedContext.java | 216 +++++++++++ ...workTokenCryptogramProvisionSucceeded.java | 308 +++++++++++++++ ...enCryptogramProvisionSucceededContext.java | 187 +++++++++ .../model/NetworkTokenProvisionFailed.java | 308 +++++++++++++++ .../NetworkTokenProvisionFailedContext.java | 216 +++++++++++ .../model/NetworkTokenProvisionSucceeded.java | 308 +++++++++++++++ .../api/model/PaymentMethodSnapshot.java | 6 +- .../java/com/gr4vy/api/model/Transaction.java | 34 +- .../api/model/TransactionHistoryEvent.java | 8 + .../gr4vy/api/model/TransactionRequest.java | 4 +- .../gr4vy/api/model/TransactionSummary.java | 42 +- 23 files changed, 2603 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCard.java create mode 100644 src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnect.java create mode 100644 src/main/java/com/gr4vy/api/model/Error429TooManyRequests.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailed.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContext.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceeded.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContext.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailed.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailedContext.java create mode 100644 src/main/java/com/gr4vy/api/model/NetworkTokenProvisionSucceeded.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c28a3c4..8390b5a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -87,6 +87,7 @@ src/main/java/com/gr4vy/api/model/ConnectionDefinitions.java src/main/java/com/gr4vy/api/model/ConnectionOptions.java src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java +src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCard.java src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudAddress.java src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudBasicItemData.java @@ -101,6 +102,7 @@ src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudTotalDiscountC src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypal.java src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalData.java src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCard.java +src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnect.java src/main/java/com/gr4vy/api/model/Connections.java src/main/java/com/gr4vy/api/model/Cryptogram.java src/main/java/com/gr4vy/api/model/DigitalWallet.java @@ -122,6 +124,7 @@ src/main/java/com/gr4vy/api/model/Error403Forbidden.java src/main/java/com/gr4vy/api/model/Error404NotFound.java src/main/java/com/gr4vy/api/model/Error404PendingCreation.java src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java +src/main/java/com/gr4vy/api/model/Error429TooManyRequests.java src/main/java/com/gr4vy/api/model/ErrorDetail.java src/main/java/com/gr4vy/api/model/ErrorGeneric.java src/main/java/com/gr4vy/api/model/GiftCard.java @@ -164,6 +167,13 @@ src/main/java/com/gr4vy/api/model/MerchantAccounts.java src/main/java/com/gr4vy/api/model/MerchantProfile.java src/main/java/com/gr4vy/api/model/MerchantProfileScheme.java src/main/java/com/gr4vy/api/model/NetworkToken.java +src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailed.java +src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContext.java +src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceeded.java +src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContext.java +src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailed.java +src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailedContext.java +src/main/java/com/gr4vy/api/model/NetworkTokenProvisionSucceeded.java src/main/java/com/gr4vy/api/model/NetworkTokenRequest.java src/main/java/com/gr4vy/api/model/NetworkTokens.java src/main/java/com/gr4vy/api/model/PaymentConnectorExternalTransactionRequest.java @@ -365,6 +375,7 @@ src/test/java/com/gr4vy/api/model/ConnectionDefinitionTest.java src/test/java/com/gr4vy/api/model/ConnectionDefinitionsTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsAdyenCardTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraudTest.java +src/test/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCardTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudAddressTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudBasicItemDataTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudBeneficiariesTest.java @@ -378,6 +389,7 @@ src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudTotalDiscountC src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudTotalDiscountTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalDataTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalTest.java +src/test/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnectTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsStripeCardTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsTest.java src/test/java/com/gr4vy/api/model/ConnectionTest.java @@ -402,6 +414,7 @@ src/test/java/com/gr4vy/api/model/Error403ForbiddenTest.java src/test/java/com/gr4vy/api/model/Error404NotFoundTest.java src/test/java/com/gr4vy/api/model/Error404PendingCreationTest.java src/test/java/com/gr4vy/api/model/Error409DuplicateRecordTest.java +src/test/java/com/gr4vy/api/model/Error429TooManyRequestsTest.java src/test/java/com/gr4vy/api/model/ErrorDetailTest.java src/test/java/com/gr4vy/api/model/ErrorGenericTest.java src/test/java/com/gr4vy/api/model/GiftCardBalanceNewRequestTest.java @@ -443,6 +456,13 @@ src/test/java/com/gr4vy/api/model/MerchantAccountUpdateTest.java src/test/java/com/gr4vy/api/model/MerchantAccountsTest.java src/test/java/com/gr4vy/api/model/MerchantProfileSchemeTest.java src/test/java/com/gr4vy/api/model/MerchantProfileTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContextTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContextTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenProvisionFailedContextTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenProvisionFailedTest.java +src/test/java/com/gr4vy/api/model/NetworkTokenProvisionSucceededTest.java src/test/java/com/gr4vy/api/model/NetworkTokenRequestTest.java src/test/java/com/gr4vy/api/model/NetworkTokenTest.java src/test/java/com/gr4vy/api/model/NetworkTokensTest.java diff --git a/pom.xml b/pom.xml index 5916ce2..74b42c9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ gr4vy jar gr4vy - 0.24.0 + 0.25.0 https://gr4vy.com Gr4vy Java SDK diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptions.java b/src/main/java/com/gr4vy/api/model/ConnectionOptions.java index 13bb32b..8d768ca 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptions.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptions.java @@ -22,6 +22,7 @@ import com.google.gson.stream.JsonWriter; import com.gr4vy.api.model.ConnectionOptionsAdyenCard; import com.gr4vy.api.model.ConnectionOptionsCybersourceAntiFraud; +import com.gr4vy.api.model.ConnectionOptionsCybersourceCard; import com.gr4vy.api.model.ConnectionOptionsForterAntiFraud; import com.gr4vy.api.model.ConnectionOptionsPaypalPaypal; import com.gr4vy.api.model.ConnectionOptionsStripeCard; @@ -34,6 +35,10 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConnectionOptions { + public static final String SERIALIZED_NAME_CYBERSOURCE_CARD = "cybersource-card"; + @SerializedName(SERIALIZED_NAME_CYBERSOURCE_CARD) + private ConnectionOptionsCybersourceCard cybersourceCard; + public static final String SERIALIZED_NAME_CYBERSOURCE_ANTI_FRAUD = "cybersource-anti-fraud"; @SerializedName(SERIALIZED_NAME_CYBERSOURCE_ANTI_FRAUD) private ConnectionOptionsCybersourceAntiFraud cybersourceAntiFraud; @@ -59,6 +64,29 @@ public class ConnectionOptions { private ConnectionOptionsStripeCard stripeCard; + public ConnectionOptions cybersourceCard(ConnectionOptionsCybersourceCard cybersourceCard) { + + this.cybersourceCard = cybersourceCard; + return this; + } + + /** + * Get cybersourceCard + * @return cybersourceCard + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public ConnectionOptionsCybersourceCard getCybersourceCard() { + return cybersourceCard; + } + + + public void setCybersourceCard(ConnectionOptionsCybersourceCard cybersourceCard) { + this.cybersourceCard = cybersourceCard; + } + + public ConnectionOptions cybersourceAntiFraud(ConnectionOptionsCybersourceAntiFraud cybersourceAntiFraud) { this.cybersourceAntiFraud = cybersourceAntiFraud; @@ -206,7 +234,8 @@ public boolean equals(Object o) { return false; } ConnectionOptions connectionOptions = (ConnectionOptions) o; - return Objects.equals(this.cybersourceAntiFraud, connectionOptions.cybersourceAntiFraud) && + return Objects.equals(this.cybersourceCard, connectionOptions.cybersourceCard) && + Objects.equals(this.cybersourceAntiFraud, connectionOptions.cybersourceAntiFraud) && Objects.equals(this.forterAntiFraud, connectionOptions.forterAntiFraud) && Objects.equals(this.adyenCard, connectionOptions.adyenCard) && Objects.equals(this.paypalPaypal, connectionOptions.paypalPaypal) && @@ -216,13 +245,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(cybersourceAntiFraud, forterAntiFraud, adyenCard, paypalPaypal, paypalPaypalpaylater, stripeCard); + return Objects.hash(cybersourceCard, cybersourceAntiFraud, forterAntiFraud, adyenCard, paypalPaypal, paypalPaypalpaylater, stripeCard); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConnectionOptions {\n"); + sb.append(" cybersourceCard: ").append(toIndentedString(cybersourceCard)).append("\n"); sb.append(" cybersourceAntiFraud: ").append(toIndentedString(cybersourceAntiFraud)).append("\n"); sb.append(" forterAntiFraud: ").append(toIndentedString(forterAntiFraud)).append("\n"); sb.append(" adyenCard: ").append(toIndentedString(adyenCard)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCard.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCard.java new file mode 100644 index 0000000..5776e65 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceCard.java @@ -0,0 +1,99 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Additional options for Cybersource payment gateway. + */ +@ApiModel(description = "Additional options for Cybersource payment gateway.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConnectionOptionsCybersourceCard { + public static final String SERIALIZED_NAME_META_KEY_MERCHANT_ID = "meta_key_merchant_id"; + @SerializedName(SERIALIZED_NAME_META_KEY_MERCHANT_ID) + private String metaKeyMerchantId; + + + public ConnectionOptionsCybersourceCard metaKeyMerchantId(String metaKeyMerchantId) { + + this.metaKeyMerchantId = metaKeyMerchantId; + return this; + } + + /** + * An override for the merchant ID configured for the connector, used in combination with meta keys. + * @return metaKeyMerchantId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "An override for the merchant ID configured for the connector, used in combination with meta keys.") + + public String getMetaKeyMerchantId() { + return metaKeyMerchantId; + } + + + public void setMetaKeyMerchantId(String metaKeyMerchantId) { + this.metaKeyMerchantId = metaKeyMerchantId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionOptionsCybersourceCard connectionOptionsCybersourceCard = (ConnectionOptionsCybersourceCard) o; + return Objects.equals(this.metaKeyMerchantId, connectionOptionsCybersourceCard.metaKeyMerchantId); + } + + @Override + public int hashCode() { + return Objects.hash(metaKeyMerchantId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionOptionsCybersourceCard {\n"); + sb.append(" metaKeyMerchantId: ").append(toIndentedString(metaKeyMerchantId)).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/gr4vy/api/model/ConnectionOptionsStripeCard.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCard.java index dd593d5..b89e3d8 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCard.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCard.java @@ -20,6 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.gr4vy.api.model.ConnectionOptionsStripeCardStripeConnect; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -34,6 +35,10 @@ public class ConnectionOptionsStripeCard { @SerializedName(SERIALIZED_NAME_ERROR_ON_REQUIRES_ACTION) private Boolean errorOnRequiresAction = false; + public static final String SERIALIZED_NAME_STRIPE_CONNECT = "stripe_connect"; + @SerializedName(SERIALIZED_NAME_STRIPE_CONNECT) + private ConnectionOptionsStripeCardStripeConnect stripeConnect; + public ConnectionOptionsStripeCard errorOnRequiresAction(Boolean errorOnRequiresAction) { @@ -58,6 +63,29 @@ public void setErrorOnRequiresAction(Boolean errorOnRequiresAction) { } + public ConnectionOptionsStripeCard stripeConnect(ConnectionOptionsStripeCardStripeConnect stripeConnect) { + + this.stripeConnect = stripeConnect; + return this; + } + + /** + * Get stripeConnect + * @return stripeConnect + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public ConnectionOptionsStripeCardStripeConnect getStripeConnect() { + return stripeConnect; + } + + + public void setStripeConnect(ConnectionOptionsStripeCardStripeConnect stripeConnect) { + this.stripeConnect = stripeConnect; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -67,12 +95,13 @@ public boolean equals(Object o) { return false; } ConnectionOptionsStripeCard connectionOptionsStripeCard = (ConnectionOptionsStripeCard) o; - return Objects.equals(this.errorOnRequiresAction, connectionOptionsStripeCard.errorOnRequiresAction); + return Objects.equals(this.errorOnRequiresAction, connectionOptionsStripeCard.errorOnRequiresAction) && + Objects.equals(this.stripeConnect, connectionOptionsStripeCard.stripeConnect); } @Override public int hashCode() { - return Objects.hash(errorOnRequiresAction); + return Objects.hash(errorOnRequiresAction, stripeConnect); } @Override @@ -80,6 +109,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConnectionOptionsStripeCard {\n"); sb.append(" errorOnRequiresAction: ").append(toIndentedString(errorOnRequiresAction)).append("\n"); + sb.append(" stripeConnect: ").append(toIndentedString(stripeConnect)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnect.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnect.java new file mode 100644 index 0000000..17114ae --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsStripeCardStripeConnect.java @@ -0,0 +1,129 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Stripe Connect configuration options. + */ +@ApiModel(description = "Stripe Connect configuration options.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConnectionOptionsStripeCardStripeConnect { + public static final String SERIALIZED_NAME_STRIPE_ACCOUNT = "stripe_account"; + @SerializedName(SERIALIZED_NAME_STRIPE_ACCOUNT) + private String stripeAccount; + + public static final String SERIALIZED_NAME_APPLICATION_FEE_AMOUNT = "application_fee_amount"; + @SerializedName(SERIALIZED_NAME_APPLICATION_FEE_AMOUNT) + private BigDecimal applicationFeeAmount; + + + public ConnectionOptionsStripeCardStripeConnect stripeAccount(String stripeAccount) { + + this.stripeAccount = stripeAccount; + return this; + } + + /** + * The ID of the connected Stripe account to process for. + * @return stripeAccount + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The ID of the connected Stripe account to process for.") + + public String getStripeAccount() { + return stripeAccount; + } + + + public void setStripeAccount(String stripeAccount) { + this.stripeAccount = stripeAccount; + } + + + public ConnectionOptionsStripeCardStripeConnect applicationFeeAmount(BigDecimal applicationFeeAmount) { + + this.applicationFeeAmount = applicationFeeAmount; + return this; + } + + /** + * The application fee to charge when processing for a connected account. + * @return applicationFeeAmount + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The application fee to charge when processing for a connected account.") + + public BigDecimal getApplicationFeeAmount() { + return applicationFeeAmount; + } + + + public void setApplicationFeeAmount(BigDecimal applicationFeeAmount) { + this.applicationFeeAmount = applicationFeeAmount; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionOptionsStripeCardStripeConnect connectionOptionsStripeCardStripeConnect = (ConnectionOptionsStripeCardStripeConnect) o; + return Objects.equals(this.stripeAccount, connectionOptionsStripeCardStripeConnect.stripeAccount) && + Objects.equals(this.applicationFeeAmount, connectionOptionsStripeCardStripeConnect.applicationFeeAmount); + } + + @Override + public int hashCode() { + return Objects.hash(stripeAccount, applicationFeeAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionOptionsStripeCardStripeConnect {\n"); + sb.append(" stripeAccount: ").append(toIndentedString(stripeAccount)).append("\n"); + sb.append(" applicationFeeAmount: ").append(toIndentedString(applicationFeeAmount)).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/gr4vy/api/model/Error409DuplicateRecord.java b/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java index d62bb27..909838a 100644 --- a/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java +++ b/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java @@ -269,7 +269,7 @@ public Error409DuplicateRecord message(String message) { * @return message **/ @javax.annotation.Nullable - @ApiModelProperty(example = "A duplicate ecord exists with this external_identifier value", value = "Further details on the field that triggered the error.") + @ApiModelProperty(example = "A duplicate record exists with this external_identifier value", value = "Further details on the field that triggered the error.") public String getMessage() { return message; diff --git a/src/main/java/com/gr4vy/api/model/Error429TooManyRequests.java b/src/main/java/com/gr4vy/api/model/Error429TooManyRequests.java new file mode 100644 index 0000000..bdd5c06 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/Error429TooManyRequests.java @@ -0,0 +1,361 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 com.gr4vy.api.model.ErrorDetail; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Too Many Requests Error (HTTP 429). + */ +@ApiModel(description = "Too Many Requests Error (HTTP 429).") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Error429TooManyRequests { + /** + * `error`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ERROR("error"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + /** + * `too_many_requests`. + */ + @JsonAdapter(CodeEnum.Adapter.class) + public enum CodeEnum { + TOO_MANY_REQUESTS("too_many_requests"); + + private String value; + + CodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CodeEnum fromValue(String value) { + for (CodeEnum b : CodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CodeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private CodeEnum code; + + /** + * `429`. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + NUMBER_429(429); + + private Integer value; + + StatusEnum(Integer value) { + this.value = value; + } + + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(Integer value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + Integer value = jsonReader.nextInt(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + private List details = null; + + + public Error429TooManyRequests type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * `error`. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "error", value = "`error`.") + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public Error429TooManyRequests code(CodeEnum code) { + + this.code = code; + return this; + } + + /** + * `too_many_requests`. + * @return code + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "too_many_requests", value = "`too_many_requests`.") + + public CodeEnum getCode() { + return code; + } + + + public void setCode(CodeEnum code) { + this.code = code; + } + + + public Error429TooManyRequests status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * `429`. + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "429", value = "`429`.") + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public Error429TooManyRequests message(String message) { + + this.message = message; + return this; + } + + /** + * Further details on the field that triggered the error. + * @return message + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Too many requests", value = "Further details on the field that triggered the error.") + + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + public Error429TooManyRequests details(List details) { + + this.details = details; + return this; + } + + public Error429TooManyRequests addDetailsItem(ErrorDetail detailsItem) { + if (this.details == null) { + this.details = new ArrayList(); + } + this.details.add(detailsItem); + return this; + } + + /** + * A list of detail objects that further clarify the reason for the error. Not every error supports more detail. + * @return details + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[]", value = "A list of detail objects that further clarify the reason for the error. Not every error supports more detail.") + + public List getDetails() { + return details; + } + + + public void setDetails(List details) { + this.details = details; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error429TooManyRequests error429TooManyRequests = (Error429TooManyRequests) o; + return Objects.equals(this.type, error429TooManyRequests.type) && + Objects.equals(this.code, error429TooManyRequests.code) && + Objects.equals(this.status, error429TooManyRequests.status) && + Objects.equals(this.message, error429TooManyRequests.message) && + Objects.equals(this.details, error429TooManyRequests.details); + } + + @Override + public int hashCode() { + return Objects.hash(type, code, status, message, details); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error429TooManyRequests {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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/gr4vy/api/model/GiftCardBalancesRequest.java b/src/main/java/com/gr4vy/api/model/GiftCardBalancesRequest.java index 6e0beb4..9aaca00 100644 --- a/src/main/java/com/gr4vy/api/model/GiftCardBalancesRequest.java +++ b/src/main/java/com/gr4vy/api/model/GiftCardBalancesRequest.java @@ -53,11 +53,11 @@ public GiftCardBalancesRequest addItemsItem(GiftCardBalanceRequest itemsItem) { } /** - * One or more gift cards to check balances for. + * One or more gift cards to check balances for, up to a default limit of 10 gift cards. Please contact our team to change this limit. * @return items **/ @javax.annotation.Nullable - @ApiModelProperty(value = "One or more gift cards to check balances for.") + @ApiModelProperty(value = "One or more gift cards to check balances for, up to a default limit of 10 gift cards. Please contact our team to change this limit.") public List getItems() { return items; diff --git a/src/main/java/com/gr4vy/api/model/GiftCardRedemption.java b/src/main/java/com/gr4vy/api/model/GiftCardRedemption.java index a1ffe13..192965d 100644 --- a/src/main/java/com/gr4vy/api/model/GiftCardRedemption.java +++ b/src/main/java/com/gr4vy/api/model/GiftCardRedemption.java @@ -155,10 +155,10 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ErrorCodeEnum.Adapter.class) public enum ErrorCodeEnum { - DEACTIVATED_CARD("deactivated_card"), - EXPIRED_CARD("expired_card"), + INACTIVE_CARD("inactive_card"), + INCORRECT_CURRENCY("incorrect_currency"), INSUFFICIENT_FUNDS("insufficient_funds"), diff --git a/src/main/java/com/gr4vy/api/model/GiftCardSummary.java b/src/main/java/com/gr4vy/api/model/GiftCardSummary.java index ed4d1bb..7fe4b94 100644 --- a/src/main/java/com/gr4vy/api/model/GiftCardSummary.java +++ b/src/main/java/com/gr4vy/api/model/GiftCardSummary.java @@ -118,10 +118,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(BalanceErrorCodeEnum.Adapter.class) public enum BalanceErrorCodeEnum { - DEACTIVATED_CARD("deactivated_card"), - EXPIRED_CARD("expired_card"), + INACTIVE_CARD("inactive_card"), + INCORRECT_CURRENCY("incorrect_currency"), INSUFFICIENT_FUNDS("insufficient_funds"), diff --git a/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailed.java b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailed.java new file mode 100644 index 0000000..4cc2590 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailed.java @@ -0,0 +1,308 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 com.gr4vy.api.model.NetworkTokenCryptogramProvisionFailedContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; + + +/** + * This event logs the request and response details of HTTP calls made to provision a cryptogram for a network token, in case the call failed. + */ +@ApiModel(description = "This event logs the request and response details of HTTP calls made to provision a cryptogram for a network token, in case the call failed.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenCryptogramProvisionFailed { + /** + * The type of this resource. Is always `transaction-event`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTION_EVENT("transaction-event"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private UUID id; + + /** + * The name of this resource. Is always `network-token-cryptogram-provision-failed`. + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + NETWORK_TOKEN_CRYPTOGRAM_PROVISION_FAILED("network-token-cryptogram-provision-failed"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String value) { + for (NameEnum b : NameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private NameEnum name; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private NetworkTokenCryptogramProvisionFailedContext context; + + + public NetworkTokenCryptogramProvisionFailed type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * The type of this resource. Is always `transaction-event`. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "transaction-event", value = "The type of this resource. Is always `transaction-event`.") + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public NetworkTokenCryptogramProvisionFailed id(UUID id) { + + this.id = id; + return this; + } + + /** + * The unique identifier for this event. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique identifier for this event.") + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public NetworkTokenCryptogramProvisionFailed name(NameEnum name) { + + this.name = name; + return this; + } + + /** + * The name of this resource. Is always `network-token-cryptogram-provision-failed`. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "network-token-cryptogram-provision-failed", value = "The name of this resource. Is always `network-token-cryptogram-provision-failed`.") + + public NameEnum getName() { + return name; + } + + + public void setName(NameEnum name) { + this.name = name; + } + + + public NetworkTokenCryptogramProvisionFailed createdAt(String createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * The date and time when this event was created in our system. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public NetworkTokenCryptogramProvisionFailed context(NetworkTokenCryptogramProvisionFailedContext context) { + + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public NetworkTokenCryptogramProvisionFailedContext getContext() { + return context; + } + + + public void setContext(NetworkTokenCryptogramProvisionFailedContext context) { + this.context = context; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenCryptogramProvisionFailed networkTokenCryptogramProvisionFailed = (NetworkTokenCryptogramProvisionFailed) o; + return Objects.equals(this.type, networkTokenCryptogramProvisionFailed.type) && + Objects.equals(this.id, networkTokenCryptogramProvisionFailed.id) && + Objects.equals(this.name, networkTokenCryptogramProvisionFailed.name) && + Objects.equals(this.createdAt, networkTokenCryptogramProvisionFailed.createdAt) && + Objects.equals(this.context, networkTokenCryptogramProvisionFailed.context); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, createdAt, context); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenCryptogramProvisionFailed {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).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/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContext.java b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContext.java new file mode 100644 index 0000000..39f8a49 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionFailedContext.java @@ -0,0 +1,216 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Additional context for this event. + */ +@ApiModel(description = "Additional context for this event.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenCryptogramProvisionFailedContext { + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private String url; + + public static final String SERIALIZED_NAME_REQUEST = "request"; + @SerializedName(SERIALIZED_NAME_REQUEST) + private String request; + + public static final String SERIALIZED_NAME_RESPONSE = "response"; + @SerializedName(SERIALIZED_NAME_RESPONSE) + private String response; + + public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) + private BigDecimal responseStatusCode; + + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + private String reason; + + + public NetworkTokenCryptogramProvisionFailedContext url(String url) { + + this.url = url; + return this; + } + + /** + * The endpoint for the request, if performed. + * @return url + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The endpoint for the request, if performed.") + + public String getUrl() { + return url; + } + + + public void setUrl(String url) { + this.url = url; + } + + + public NetworkTokenCryptogramProvisionFailedContext request(String request) { + + this.request = request; + return this; + } + + /** + * The HTTP body sent to the Network Token provider, if performed. + * @return request + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body sent to the Network Token provider, if performed.") + + public String getRequest() { + return request; + } + + + public void setRequest(String request) { + this.request = request; + } + + + public NetworkTokenCryptogramProvisionFailedContext response(String response) { + + this.response = response; + return this; + } + + /** + * The HTTP body received from the Network Token provider, if any. + * @return response + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body received from the Network Token provider, if any.") + + public String getResponse() { + return response; + } + + + public void setResponse(String response) { + this.response = response; + } + + + public NetworkTokenCryptogramProvisionFailedContext responseStatusCode(BigDecimal responseStatusCode) { + + this.responseStatusCode = responseStatusCode; + return this; + } + + /** + * The HTTP response status code from the Network Token provider, if any. + * @return responseStatusCode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP response status code from the Network Token provider, if any.") + + public BigDecimal getResponseStatusCode() { + return responseStatusCode; + } + + + public void setResponseStatusCode(BigDecimal responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + + + public NetworkTokenCryptogramProvisionFailedContext reason(String reason) { + + this.reason = reason; + return this; + } + + /** + * The reason we could not provision the cryptogram. + * @return reason + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Network Error", value = "The reason we could not provision the cryptogram.") + + public String getReason() { + return reason; + } + + + public void setReason(String reason) { + this.reason = reason; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenCryptogramProvisionFailedContext networkTokenCryptogramProvisionFailedContext = (NetworkTokenCryptogramProvisionFailedContext) o; + return Objects.equals(this.url, networkTokenCryptogramProvisionFailedContext.url) && + Objects.equals(this.request, networkTokenCryptogramProvisionFailedContext.request) && + Objects.equals(this.response, networkTokenCryptogramProvisionFailedContext.response) && + Objects.equals(this.responseStatusCode, networkTokenCryptogramProvisionFailedContext.responseStatusCode) && + Objects.equals(this.reason, networkTokenCryptogramProvisionFailedContext.reason); + } + + @Override + public int hashCode() { + return Objects.hash(url, request, response, responseStatusCode, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenCryptogramProvisionFailedContext {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" request: ").append(toIndentedString(request)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceeded.java b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceeded.java new file mode 100644 index 0000000..18c91cc --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceeded.java @@ -0,0 +1,308 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 com.gr4vy.api.model.NetworkTokenCryptogramProvisionSucceededContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; + + +/** + * This event logs the request and response details of HTTP calls made to provision a cryptogram for a network token, in case the call succeeded. + */ +@ApiModel(description = "This event logs the request and response details of HTTP calls made to provision a cryptogram for a network token, in case the call succeeded.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenCryptogramProvisionSucceeded { + /** + * The type of this resource. Is always `transaction-event`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTION_EVENT("transaction-event"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private UUID id; + + /** + * The name of this resource. Is always `network-token-cryptogram-provision-succeeded`. + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + NETWORK_TOKEN_CRYPTOGRAM_PROVISION_SUCCEEDED("network-token-cryptogram-provision-succeeded"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String value) { + for (NameEnum b : NameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private NameEnum name; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private NetworkTokenCryptogramProvisionSucceededContext context; + + + public NetworkTokenCryptogramProvisionSucceeded type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * The type of this resource. Is always `transaction-event`. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "transaction-event", value = "The type of this resource. Is always `transaction-event`.") + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public NetworkTokenCryptogramProvisionSucceeded id(UUID id) { + + this.id = id; + return this; + } + + /** + * The unique identifier for this event. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique identifier for this event.") + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public NetworkTokenCryptogramProvisionSucceeded name(NameEnum name) { + + this.name = name; + return this; + } + + /** + * The name of this resource. Is always `network-token-cryptogram-provision-succeeded`. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "network-token-cryptogram-provision-succeeded", value = "The name of this resource. Is always `network-token-cryptogram-provision-succeeded`.") + + public NameEnum getName() { + return name; + } + + + public void setName(NameEnum name) { + this.name = name; + } + + + public NetworkTokenCryptogramProvisionSucceeded createdAt(String createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * The date and time when this event was created in our system. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public NetworkTokenCryptogramProvisionSucceeded context(NetworkTokenCryptogramProvisionSucceededContext context) { + + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public NetworkTokenCryptogramProvisionSucceededContext getContext() { + return context; + } + + + public void setContext(NetworkTokenCryptogramProvisionSucceededContext context) { + this.context = context; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenCryptogramProvisionSucceeded networkTokenCryptogramProvisionSucceeded = (NetworkTokenCryptogramProvisionSucceeded) o; + return Objects.equals(this.type, networkTokenCryptogramProvisionSucceeded.type) && + Objects.equals(this.id, networkTokenCryptogramProvisionSucceeded.id) && + Objects.equals(this.name, networkTokenCryptogramProvisionSucceeded.name) && + Objects.equals(this.createdAt, networkTokenCryptogramProvisionSucceeded.createdAt) && + Objects.equals(this.context, networkTokenCryptogramProvisionSucceeded.context); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, createdAt, context); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenCryptogramProvisionSucceeded {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).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/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContext.java b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContext.java new file mode 100644 index 0000000..15f53c1 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenCryptogramProvisionSucceededContext.java @@ -0,0 +1,187 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Additional context for this event. + */ +@ApiModel(description = "Additional context for this event.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenCryptogramProvisionSucceededContext { + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private String url; + + public static final String SERIALIZED_NAME_REQUEST = "request"; + @SerializedName(SERIALIZED_NAME_REQUEST) + private String request; + + public static final String SERIALIZED_NAME_RESPONSE = "response"; + @SerializedName(SERIALIZED_NAME_RESPONSE) + private String response; + + public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) + private BigDecimal responseStatusCode; + + + public NetworkTokenCryptogramProvisionSucceededContext url(String url) { + + this.url = url; + return this; + } + + /** + * The endpoint for the request. + * @return url + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The endpoint for the request.") + + public String getUrl() { + return url; + } + + + public void setUrl(String url) { + this.url = url; + } + + + public NetworkTokenCryptogramProvisionSucceededContext request(String request) { + + this.request = request; + return this; + } + + /** + * The HTTP body sent to the Network Token provider. + * @return request + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body sent to the Network Token provider.") + + public String getRequest() { + return request; + } + + + public void setRequest(String request) { + this.request = request; + } + + + public NetworkTokenCryptogramProvisionSucceededContext response(String response) { + + this.response = response; + return this; + } + + /** + * The HTTP body received from the Network Token provider. + * @return response + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body received from the Network Token provider.") + + public String getResponse() { + return response; + } + + + public void setResponse(String response) { + this.response = response; + } + + + public NetworkTokenCryptogramProvisionSucceededContext responseStatusCode(BigDecimal responseStatusCode) { + + this.responseStatusCode = responseStatusCode; + return this; + } + + /** + * The HTTP response status code from the Network Token provider. + * @return responseStatusCode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP response status code from the Network Token provider.") + + public BigDecimal getResponseStatusCode() { + return responseStatusCode; + } + + + public void setResponseStatusCode(BigDecimal responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenCryptogramProvisionSucceededContext networkTokenCryptogramProvisionSucceededContext = (NetworkTokenCryptogramProvisionSucceededContext) o; + return Objects.equals(this.url, networkTokenCryptogramProvisionSucceededContext.url) && + Objects.equals(this.request, networkTokenCryptogramProvisionSucceededContext.request) && + Objects.equals(this.response, networkTokenCryptogramProvisionSucceededContext.response) && + Objects.equals(this.responseStatusCode, networkTokenCryptogramProvisionSucceededContext.responseStatusCode); + } + + @Override + public int hashCode() { + return Objects.hash(url, request, response, responseStatusCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenCryptogramProvisionSucceededContext {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" request: ").append(toIndentedString(request)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).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/gr4vy/api/model/NetworkTokenProvisionFailed.java b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailed.java new file mode 100644 index 0000000..a9191ea --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailed.java @@ -0,0 +1,308 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 com.gr4vy.api.model.NetworkTokenProvisionFailedContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; + + +/** + * This event logs the request and response details of HTTP calls made to provision a network token, in case the call failed. + */ +@ApiModel(description = "This event logs the request and response details of HTTP calls made to provision a network token, in case the call failed.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenProvisionFailed { + /** + * The type of this resource. Is always `transaction-event`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTION_EVENT("transaction-event"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private UUID id; + + /** + * The name of this resource. Is always `network-token-provision-failed`. + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + NETWORK_TOKEN_PROVISION_FAILED("network-token-provision-failed"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String value) { + for (NameEnum b : NameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private NameEnum name; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private NetworkTokenProvisionFailedContext context; + + + public NetworkTokenProvisionFailed type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * The type of this resource. Is always `transaction-event`. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "transaction-event", value = "The type of this resource. Is always `transaction-event`.") + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public NetworkTokenProvisionFailed id(UUID id) { + + this.id = id; + return this; + } + + /** + * The unique identifier for this event. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique identifier for this event.") + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public NetworkTokenProvisionFailed name(NameEnum name) { + + this.name = name; + return this; + } + + /** + * The name of this resource. Is always `network-token-provision-failed`. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "network-token-provision-failed", value = "The name of this resource. Is always `network-token-provision-failed`.") + + public NameEnum getName() { + return name; + } + + + public void setName(NameEnum name) { + this.name = name; + } + + + public NetworkTokenProvisionFailed createdAt(String createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * The date and time when this event was created in our system. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public NetworkTokenProvisionFailed context(NetworkTokenProvisionFailedContext context) { + + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public NetworkTokenProvisionFailedContext getContext() { + return context; + } + + + public void setContext(NetworkTokenProvisionFailedContext context) { + this.context = context; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenProvisionFailed networkTokenProvisionFailed = (NetworkTokenProvisionFailed) o; + return Objects.equals(this.type, networkTokenProvisionFailed.type) && + Objects.equals(this.id, networkTokenProvisionFailed.id) && + Objects.equals(this.name, networkTokenProvisionFailed.name) && + Objects.equals(this.createdAt, networkTokenProvisionFailed.createdAt) && + Objects.equals(this.context, networkTokenProvisionFailed.context); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, createdAt, context); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenProvisionFailed {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).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/gr4vy/api/model/NetworkTokenProvisionFailedContext.java b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailedContext.java new file mode 100644 index 0000000..5ee3cde --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionFailedContext.java @@ -0,0 +1,216 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Additional context for this event. + */ +@ApiModel(description = "Additional context for this event.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenProvisionFailedContext { + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private String url; + + public static final String SERIALIZED_NAME_REQUEST = "request"; + @SerializedName(SERIALIZED_NAME_REQUEST) + private String request; + + public static final String SERIALIZED_NAME_RESPONSE = "response"; + @SerializedName(SERIALIZED_NAME_RESPONSE) + private String response; + + public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) + private BigDecimal responseStatusCode; + + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + private String reason; + + + public NetworkTokenProvisionFailedContext url(String url) { + + this.url = url; + return this; + } + + /** + * The endpoint for the request, if performed. + * @return url + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The endpoint for the request, if performed.") + + public String getUrl() { + return url; + } + + + public void setUrl(String url) { + this.url = url; + } + + + public NetworkTokenProvisionFailedContext request(String request) { + + this.request = request; + return this; + } + + /** + * The HTTP body sent to the Network Token provider, if performed. + * @return request + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body sent to the Network Token provider, if performed.") + + public String getRequest() { + return request; + } + + + public void setRequest(String request) { + this.request = request; + } + + + public NetworkTokenProvisionFailedContext response(String response) { + + this.response = response; + return this; + } + + /** + * The HTTP body received from the Network Token provider, if any. + * @return response + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP body received from the Network Token provider, if any.") + + public String getResponse() { + return response; + } + + + public void setResponse(String response) { + this.response = response; + } + + + public NetworkTokenProvisionFailedContext responseStatusCode(BigDecimal responseStatusCode) { + + this.responseStatusCode = responseStatusCode; + return this; + } + + /** + * The HTTP response status code from the Network Token provider, if any. + * @return responseStatusCode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The HTTP response status code from the Network Token provider, if any.") + + public BigDecimal getResponseStatusCode() { + return responseStatusCode; + } + + + public void setResponseStatusCode(BigDecimal responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + + + public NetworkTokenProvisionFailedContext reason(String reason) { + + this.reason = reason; + return this; + } + + /** + * The reason we could not provision the network token. + * @return reason + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Network Error", value = "The reason we could not provision the network token.") + + public String getReason() { + return reason; + } + + + public void setReason(String reason) { + this.reason = reason; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenProvisionFailedContext networkTokenProvisionFailedContext = (NetworkTokenProvisionFailedContext) o; + return Objects.equals(this.url, networkTokenProvisionFailedContext.url) && + Objects.equals(this.request, networkTokenProvisionFailedContext.request) && + Objects.equals(this.response, networkTokenProvisionFailedContext.response) && + Objects.equals(this.responseStatusCode, networkTokenProvisionFailedContext.responseStatusCode) && + Objects.equals(this.reason, networkTokenProvisionFailedContext.reason); + } + + @Override + public int hashCode() { + return Objects.hash(url, request, response, responseStatusCode, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenProvisionFailedContext {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" request: ").append(toIndentedString(request)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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/gr4vy/api/model/NetworkTokenProvisionSucceeded.java b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionSucceeded.java new file mode 100644 index 0000000..97e5e8f --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenProvisionSucceeded.java @@ -0,0 +1,308 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * 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.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +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 com.gr4vy.api.model.NetworkTokenCryptogramProvisionSucceededContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; + + +/** + * This event logs the request and response details of HTTP calls made to provision a network token, in case the call succeeded. + */ +@ApiModel(description = "This event logs the request and response details of HTTP calls made to provision a network token, in case the call succeeded.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NetworkTokenProvisionSucceeded { + /** + * The type of this resource. Is always `transaction-event`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTION_EVENT("transaction-event"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private UUID id; + + /** + * The name of this resource. Is always `network-token-provision-succeeded`. + */ + @JsonAdapter(NameEnum.Adapter.class) + public enum NameEnum { + NETWORK_TOKEN_PROVISION_SUCCEEDED("network-token-provision-succeeded"); + + private String value; + + NameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NameEnum fromValue(String value) { + for (NameEnum b : NameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NameEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private NameEnum name; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private NetworkTokenCryptogramProvisionSucceededContext context; + + + public NetworkTokenProvisionSucceeded type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * The type of this resource. Is always `transaction-event`. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "transaction-event", value = "The type of this resource. Is always `transaction-event`.") + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public NetworkTokenProvisionSucceeded id(UUID id) { + + this.id = id; + return this; + } + + /** + * The unique identifier for this event. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique identifier for this event.") + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public NetworkTokenProvisionSucceeded name(NameEnum name) { + + this.name = name; + return this; + } + + /** + * The name of this resource. Is always `network-token-provision-succeeded`. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "network-token-provision-succeeded", value = "The name of this resource. Is always `network-token-provision-succeeded`.") + + public NameEnum getName() { + return name; + } + + + public void setName(NameEnum name) { + this.name = name; + } + + + public NetworkTokenProvisionSucceeded createdAt(String createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * The date and time when this event was created in our system. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public NetworkTokenProvisionSucceeded context(NetworkTokenCryptogramProvisionSucceededContext context) { + + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public NetworkTokenCryptogramProvisionSucceededContext getContext() { + return context; + } + + + public void setContext(NetworkTokenCryptogramProvisionSucceededContext context) { + this.context = context; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenProvisionSucceeded networkTokenProvisionSucceeded = (NetworkTokenProvisionSucceeded) o; + return Objects.equals(this.type, networkTokenProvisionSucceeded.type) && + Objects.equals(this.id, networkTokenProvisionSucceeded.id) && + Objects.equals(this.name, networkTokenProvisionSucceeded.name) && + Objects.equals(this.createdAt, networkTokenProvisionSucceeded.createdAt) && + Objects.equals(this.context, networkTokenProvisionSucceeded.context); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, createdAt, context); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenProvisionSucceeded {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).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/gr4vy/api/model/PaymentMethodSnapshot.java b/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java index d2830c8..898fe67 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java @@ -343,7 +343,7 @@ public MethodEnum read(final JsonReader jsonReader) throws IOException { private String paymentAccountReference; /** - * An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction. + * An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction. This field is `null` for the non-card payment methods. This represents the card scheme sent to the connector and it could be different from the actual card scheme that is being used by the PSP to process the transaction in the following situations: 1. `use_additional_scheme` transformation is used with the `PAN` instrument but we already have a PSP token for the card. 2. `use_additional_scheme` transformation is used but PSP has fallen back to the main card scheme internally. */ @JsonAdapter(SchemeEnum.Adapter.class) public enum SchemeEnum { @@ -740,11 +740,11 @@ public PaymentMethodSnapshot scheme(SchemeEnum scheme) { } /** - * An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction. + * An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction. This field is `null` for the non-card payment methods. This represents the card scheme sent to the connector and it could be different from the actual card scheme that is being used by the PSP to process the transaction in the following situations: 1. `use_additional_scheme` transformation is used with the `PAN` instrument but we already have a PSP token for the card. 2. `use_additional_scheme` transformation is used but PSP has fallen back to the main card scheme internally. * @return scheme **/ @javax.annotation.Nullable - @ApiModelProperty(example = "visa", value = "An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction.") + @ApiModelProperty(example = "visa", value = "An additional label used to differentiate different sub-types of a payment method. Most notably this can include the type of card used in a transaction. This field is `null` for the non-card payment methods. This represents the card scheme sent to the connector and it could be different from the actual card scheme that is being used by the PSP to process the transaction in the following situations: 1. `use_additional_scheme` transformation is used with the `PAN` instrument but we already have a PSP token for the card. 2. `use_additional_scheme` transformation is used but PSP has fallen back to the main card scheme internally.") public SchemeEnum getScheme() { return scheme; diff --git a/src/main/java/com/gr4vy/api/model/Transaction.java b/src/main/java/com/gr4vy/api/model/Transaction.java index 385a4ee..24f94e1 100644 --- a/src/main/java/com/gr4vy/api/model/Transaction.java +++ b/src/main/java/com/gr4vy/api/model/Transaction.java @@ -270,9 +270,9 @@ public CvvResponseCodeEnum read(final JsonReader jsonReader) throws IOException @SerializedName(SERIALIZED_NAME_GIFT_CARD_SERVICE) private GiftCardServiceSnapshot giftCardService; - public static final String SERIALIZED_NAME_GIFT_CARDS_REDEMPTIONS = "gift_cards_redemptions"; - @SerializedName(SERIALIZED_NAME_GIFT_CARDS_REDEMPTIONS) - private List giftCardsRedemptions = null; + public static final String SERIALIZED_NAME_GIFT_CARD_REDEMPTIONS = "gift_card_redemptions"; + @SerializedName(SERIALIZED_NAME_GIFT_CARD_REDEMPTIONS) + private List giftCardRedemptions = null; /** * The original `intent` used when the transaction was [created](#operation/authorize-new-transaction). @@ -1197,34 +1197,34 @@ public void setGiftCardService(GiftCardServiceSnapshot giftCardService) { } - public Transaction giftCardsRedemptions(List giftCardsRedemptions) { + public Transaction giftCardRedemptions(List giftCardRedemptions) { - this.giftCardsRedemptions = giftCardsRedemptions; + this.giftCardRedemptions = giftCardRedemptions; return this; } - public Transaction addGiftCardsRedemptionsItem(GiftCardRedemption giftCardsRedemptionsItem) { - if (this.giftCardsRedemptions == null) { - this.giftCardsRedemptions = new ArrayList(); + public Transaction addGiftCardRedemptionsItem(GiftCardRedemption giftCardRedemptionsItem) { + if (this.giftCardRedemptions == null) { + this.giftCardRedemptions = new ArrayList(); } - this.giftCardsRedemptions.add(giftCardsRedemptionsItem); + this.giftCardRedemptions.add(giftCardRedemptionsItem); return this; } /** * The gift cards redeemed for this transaction. - * @return giftCardsRedemptions + * @return giftCardRedemptions **/ @javax.annotation.Nullable @ApiModelProperty(value = "The gift cards redeemed for this transaction.") - public List getGiftCardsRedemptions() { - return giftCardsRedemptions; + public List getGiftCardRedemptions() { + return giftCardRedemptions; } - public void setGiftCardsRedemptions(List giftCardsRedemptions) { - this.giftCardsRedemptions = giftCardsRedemptions; + public void setGiftCardRedemptions(List giftCardRedemptions) { + this.giftCardRedemptions = giftCardRedemptions; } @@ -1818,7 +1818,7 @@ public boolean equals(Object o) { Objects.equals(this.errorCode, transaction.errorCode) && Objects.equals(this.externalIdentifier, transaction.externalIdentifier) && Objects.equals(this.giftCardService, transaction.giftCardService) && - Objects.equals(this.giftCardsRedemptions, transaction.giftCardsRedemptions) && + Objects.equals(this.giftCardRedemptions, transaction.giftCardRedemptions) && Objects.equals(this.intent, transaction.intent) && Objects.equals(this.intentOutcome, transaction.intentOutcome) && Objects.equals(this.isSubsequentPayment, transaction.isSubsequentPayment) && @@ -1847,7 +1847,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, id, amount, authResponseCode, authorizedAmount, authorizedAt, avsResponseCode, buyer, capturedAmount, capturedAt, cartItems, checkoutSessionId, country, createdAt, currency, cvvResponseCode, errorCode, externalIdentifier, giftCardService, giftCardsRedemptions, intent, intentOutcome, isSubsequentPayment, merchantAccountId, merchantInitiated, metadata, method, multiTender, paymentMethod, paymentService, paymentServiceTransactionId, paymentSource, pendingReview, rawResponseCode, rawResponseDescription, reconciliationId, refundedAmount, schemeTransactionId, shippingDetails, statementDescriptor, status, threeDSecure, updatedAt, voidedAt); + return Objects.hash(type, id, amount, authResponseCode, authorizedAmount, authorizedAt, avsResponseCode, buyer, capturedAmount, capturedAt, cartItems, checkoutSessionId, country, createdAt, currency, cvvResponseCode, errorCode, externalIdentifier, giftCardService, giftCardRedemptions, intent, intentOutcome, isSubsequentPayment, merchantAccountId, merchantInitiated, metadata, method, multiTender, paymentMethod, paymentService, paymentServiceTransactionId, paymentSource, pendingReview, rawResponseCode, rawResponseDescription, reconciliationId, refundedAmount, schemeTransactionId, shippingDetails, statementDescriptor, status, threeDSecure, updatedAt, voidedAt); } @Override @@ -1873,7 +1873,7 @@ public String toString() { sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).append("\n"); sb.append(" giftCardService: ").append(toIndentedString(giftCardService)).append("\n"); - sb.append(" giftCardsRedemptions: ").append(toIndentedString(giftCardsRedemptions)).append("\n"); + sb.append(" giftCardRedemptions: ").append(toIndentedString(giftCardRedemptions)).append("\n"); sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); sb.append(" intentOutcome: ").append(toIndentedString(intentOutcome)).append("\n"); sb.append(" isSubsequentPayment: ").append(toIndentedString(isSubsequentPayment)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java b/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java index fa3803b..b8116fa 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java +++ b/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java @@ -121,6 +121,14 @@ public enum NameEnum { GIFT_CARD_REFUND_SUCCEEDED("gift-card-refund-succeeded"), + NETWORK_TOKEN_CRYPTOGRAM_PROVISION_FAILED("network-token-cryptogram-provision-failed"), + + NETWORK_TOKEN_CRYPTOGRAM_PROVISION_SUCCEEDED("network-token-cryptogram-provision-succeeded"), + + NETWORK_TOKEN_PROVISION_FAILED("network-token-provision-failed"), + + NETWORK_TOKEN_PROVISION_SUCCEEDED("network-token-provision-succeeded"), + PAYMENT_CONNECTOR_RESPONSE_TRANSACTION_AUTHORIZATION_FAILED("payment-connector-response-transaction-authorization-failed"), PAYMENT_CONNECTOR_RESPONSE_TRANSACTION_AUTHORIZATION_SUCCEEDED("payment-connector-response-transaction-authorization-succeeded"), diff --git a/src/main/java/com/gr4vy/api/model/TransactionRequest.java b/src/main/java/com/gr4vy/api/model/TransactionRequest.java index 00abaed..ece0a8a 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionRequest.java @@ -534,11 +534,11 @@ public TransactionRequest addGiftCardsItem(TransactionGiftCardRequest giftCardsI } /** - * The optional gift-card to use for this transaction. At least one gift card is required if no other `payment_method` has been added. + * The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit. * @return giftCards **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The optional gift-card to use for this transaction. At least one gift card is required if no other `payment_method` has been added.") + @ApiModelProperty(value = "The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit.") public List getGiftCards() { return giftCards; diff --git a/src/main/java/com/gr4vy/api/model/TransactionSummary.java b/src/main/java/com/gr4vy/api/model/TransactionSummary.java index 559b0b6..33b2fd7 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionSummary.java +++ b/src/main/java/com/gr4vy/api/model/TransactionSummary.java @@ -21,11 +21,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.gr4vy.api.model.BuyerSnapshot; +import com.gr4vy.api.model.GiftCardRedemption; import com.gr4vy.api.model.PaymentMethodSnapshot; import com.gr4vy.api.model.PaymentServiceSnapshot; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; @@ -124,6 +127,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) private String externalIdentifier; + public static final String SERIALIZED_NAME_GIFT_CARD_REDEMPTIONS = "gift_card_redemptions"; + @SerializedName(SERIALIZED_NAME_GIFT_CARD_REDEMPTIONS) + private List giftCardRedemptions = null; + /** * The original `intent` used when the transaction was [created](#operation/authorize-new-transaction). */ @@ -705,6 +712,37 @@ public void setExternalIdentifier(String externalIdentifier) { } + public TransactionSummary giftCardRedemptions(List giftCardRedemptions) { + + this.giftCardRedemptions = giftCardRedemptions; + return this; + } + + public TransactionSummary addGiftCardRedemptionsItem(GiftCardRedemption giftCardRedemptionsItem) { + if (this.giftCardRedemptions == null) { + this.giftCardRedemptions = new ArrayList(); + } + this.giftCardRedemptions.add(giftCardRedemptionsItem); + return this; + } + + /** + * The gift cards redeemed for this transaction. + * @return giftCardRedemptions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The gift cards redeemed for this transaction.") + + public List getGiftCardRedemptions() { + return giftCardRedemptions; + } + + + public void setGiftCardRedemptions(List giftCardRedemptions) { + this.giftCardRedemptions = giftCardRedemptions; + } + + public TransactionSummary intent(IntentEnum intent) { this.intent = intent; @@ -1003,6 +1041,7 @@ public boolean equals(Object o) { Objects.equals(this.createdAt, transactionSummary.createdAt) && Objects.equals(this.currency, transactionSummary.currency) && Objects.equals(this.externalIdentifier, transactionSummary.externalIdentifier) && + Objects.equals(this.giftCardRedemptions, transactionSummary.giftCardRedemptions) && Objects.equals(this.intent, transactionSummary.intent) && Objects.equals(this.merchantAccountId, transactionSummary.merchantAccountId) && Objects.equals(this.method, transactionSummary.method) && @@ -1019,7 +1058,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, id, amount, authorizedAmount, buyer, capturedAmount, checkoutSessionId, country, createdAt, currency, externalIdentifier, intent, merchantAccountId, method, paymentMethod, paymentService, pendingReview, rawResponseCode, rawResponseDescription, reconciliationId, refundedAmount, status, updatedAt); + return Objects.hash(type, id, amount, authorizedAmount, buyer, capturedAmount, checkoutSessionId, country, createdAt, currency, externalIdentifier, giftCardRedemptions, intent, merchantAccountId, method, paymentMethod, paymentService, pendingReview, rawResponseCode, rawResponseDescription, reconciliationId, refundedAmount, status, updatedAt); } @Override @@ -1037,6 +1076,7 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).append("\n"); + sb.append(" giftCardRedemptions: ").append(toIndentedString(giftCardRedemptions)).append("\n"); sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); sb.append(" merchantAccountId: ").append(toIndentedString(merchantAccountId)).append("\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n");