* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
+| `paymentMethodUpdate` | [PaymentMethodUpdate](../../models/components/PaymentMethodUpdate.md) | :heavy_check_mark: | N/A | |
+
+### Response
+
+**[UpdatePaymentMethodResponse](../../models/operations/UpdatePaymentMethodResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
+
## delete
Delete a payment method.
diff --git a/docs/sdks/paymentservices/README.md b/docs/sdks/paymentservices/README.md
index 7fff302e..51e7d47f 100644
--- a/docs/sdks/paymentservices/README.md
+++ b/docs/sdks/paymentservices/README.md
@@ -5,9 +5,9 @@
### Available Operations
* [list](#list) - List payment services
-* [create](#create) - Update a configured payment service
+* [create](#create) - Configure a payment service
* [get](#get) - Get payment service
-* [update](#update) - Configure a payment service
+* [update](#update) - Update a configured payment service
* [delete](#delete) - Delete a configured payment service
* [verify](#verify) - Verify payment service credentials
* [session](#session) - Create a session for a payment service definition
@@ -83,11 +83,11 @@ public class Application {
## create
-Updates the configuration of a payment service.
+Configures a new payment service for use by merchants.
### Example Usage
-
+
```java
package hello.world;
@@ -95,7 +95,7 @@ import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.components.Field;
import com.gr4vy.sdk.models.components.PaymentServiceCreate;
import com.gr4vy.sdk.models.errors.*;
-import com.gr4vy.sdk.models.operations.UpdatePaymentServiceResponse;
+import com.gr4vy.sdk.models.operations.CreatePaymentServiceResponse;
import java.lang.Exception;
import java.util.List;
@@ -108,15 +108,11 @@ public class Application {
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
- UpdatePaymentServiceResponse res = sdk.paymentServices().create()
+ CreatePaymentServiceResponse res = sdk.paymentServices().create()
.paymentServiceCreate(PaymentServiceCreate.builder()
.displayName("Stripe")
.paymentServiceDefinitionId("stripe-card")
.fields(List.of(
- Field.builder()
- .key("api_key")
- .value("key-12345")
- .build(),
Field.builder()
.key("api_key")
.value("key-12345")
@@ -150,7 +146,7 @@ public class Application {
### Response
-**[UpdatePaymentServiceResponse](../../models/operations/UpdatePaymentServiceResponse.md)**
+**[CreatePaymentServiceResponse](../../models/operations/CreatePaymentServiceResponse.md)**
### Errors
@@ -236,18 +232,18 @@ public class Application {
## update
-Configures a new payment service for use by merchants.
+Updates the configuration of a payment service.
### Example Usage
-
+
```java
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.components.PaymentServiceUpdate;
import com.gr4vy.sdk.models.errors.*;
-import com.gr4vy.sdk.models.operations.CreatePaymentServiceResponse;
+import com.gr4vy.sdk.models.operations.UpdatePaymentServiceResponse;
import java.lang.Exception;
public class Application {
@@ -259,7 +255,7 @@ public class Application {
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
- CreatePaymentServiceResponse res = sdk.paymentServices().update()
+ UpdatePaymentServiceResponse res = sdk.paymentServices().update()
.paymentServiceId("fffd152a-9532-4087-9a4f-de58754210f0")
.paymentServiceUpdate(PaymentServiceUpdate.builder()
.settlementReportingEnabled(true)
@@ -283,7 +279,7 @@ public class Application {
### Response
-**[CreatePaymentServiceResponse](../../models/operations/CreatePaymentServiceResponse.md)**
+**[UpdatePaymentServiceResponse](../../models/operations/UpdatePaymentServiceResponse.md)**
### Errors
diff --git a/gradle.properties b/gradle.properties
index 9d426f78..066282b7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.52
+version=2.16.53
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
diff --git a/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java b/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java
index 0ce620d8..d02d1e49 100644
--- a/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java
+++ b/src/main/java/com/gr4vy/sdk/AsyncBuyersGiftCards.java
@@ -11,10 +11,8 @@
import com.gr4vy.sdk.operations.ListBuyerGiftCards;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
-import java.lang.String;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
-import org.openapitools.jackson.nullable.JsonNullable;
public class AsyncBuyersGiftCards {
@@ -53,12 +51,11 @@ public ListBuyerGiftCardsRequestBuilder list() {
*
* List all the stored gift cards for a specific buyer.
*
+ * @param request The request object containing all the parameters for the API call.
* @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture listDirect() {
- return list(
- JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
- Optional.empty());
+ public CompletableFuture list(ListBuyerGiftCardsRequest request) {
+ return list(request, Optional.empty());
}
/**
@@ -66,22 +63,11 @@ public CompletableFuture listDirect() {
*
* List all the stored gift cards for a specific buyer.
*
- * @param buyerExternalIdentifier
- * @param buyerId
- * @param merchantAccountId
+ * @param request The request object containing all the parameters for the API call.
* @param options additional options
* @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture list(
- JsonNullable buyerExternalIdentifier, JsonNullable buyerId,
- JsonNullable merchantAccountId, Optional options) {
- ListBuyerGiftCardsRequest request =
- ListBuyerGiftCardsRequest
- .builder()
- .buyerExternalIdentifier(buyerExternalIdentifier)
- .buyerId(buyerId)
- .merchantAccountId(merchantAccountId)
- .build();
+ public CompletableFuture list(ListBuyerGiftCardsRequest request, Optional options) {
AsyncRequestOperation operation
= new ListBuyerGiftCards.Async(
sdkConfiguration, options, sdkConfiguration.retryScheduler(),
diff --git a/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java b/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java
index ab92881e..97a34a84 100644
--- a/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java
+++ b/src/main/java/com/gr4vy/sdk/AsyncPaymentMethods.java
@@ -5,11 +5,13 @@
import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation;
+import com.gr4vy.sdk.models.components.PaymentMethodUpdate;
import com.gr4vy.sdk.models.operations.Body;
import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequest;
import com.gr4vy.sdk.models.operations.DeletePaymentMethodRequest;
import com.gr4vy.sdk.models.operations.GetPaymentMethodRequest;
import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequest;
+import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest;
import com.gr4vy.sdk.models.operations.async.CreatePaymentMethodRequestBuilder;
import com.gr4vy.sdk.models.operations.async.CreatePaymentMethodResponse;
import com.gr4vy.sdk.models.operations.async.DeletePaymentMethodRequestBuilder;
@@ -18,10 +20,13 @@
import com.gr4vy.sdk.models.operations.async.GetPaymentMethodResponse;
import com.gr4vy.sdk.models.operations.async.ListPaymentMethodsRequestBuilder;
import com.gr4vy.sdk.models.operations.async.ListPaymentMethodsResponse;
+import com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.UpdatePaymentMethodResponse;
import com.gr4vy.sdk.operations.CreatePaymentMethod;
import com.gr4vy.sdk.operations.DeletePaymentMethod;
import com.gr4vy.sdk.operations.GetPaymentMethod;
import com.gr4vy.sdk.operations.ListPaymentMethods;
+import com.gr4vy.sdk.operations.UpdatePaymentMethod;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
import java.lang.String;
@@ -201,6 +206,57 @@ public CompletableFuture get(
}
+ /**
+ * Update payment method
+ *
+ * Update the details of a stored payment method.
+ *
+ * @return The async call builder
+ */
+ public UpdatePaymentMethodRequestBuilder update() {
+ return new UpdatePaymentMethodRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Update payment method
+ *
+ *
Update the details of a stored payment method.
+ *
+ * @param paymentMethodId The ID of the payment method
+ * @param paymentMethodUpdate Request body for updating a stored payment method.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture update(String paymentMethodId, PaymentMethodUpdate paymentMethodUpdate) {
+ return update(paymentMethodId, JsonNullable.undefined(), paymentMethodUpdate);
+ }
+
+ /**
+ * Update payment method
+ *
+ * Update the details of a stored payment method.
+ *
+ * @param paymentMethodId The ID of the payment method
+ * @param merchantAccountId
+ * @param paymentMethodUpdate Request body for updating a stored payment method.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture update(
+ String paymentMethodId, JsonNullable merchantAccountId,
+ PaymentMethodUpdate paymentMethodUpdate) {
+ UpdatePaymentMethodRequest request =
+ UpdatePaymentMethodRequest
+ .builder()
+ .paymentMethodId(paymentMethodId)
+ .merchantAccountId(merchantAccountId)
+ .paymentMethodUpdate(paymentMethodUpdate)
+ .build();
+ AsyncRequestOperation operation
+ = new UpdatePaymentMethod.Async(sdkConfiguration, _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+
/**
* Delete payment method
*
diff --git a/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java b/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java
index cfe5e0d4..13a36eb2 100644
--- a/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java
+++ b/src/main/java/com/gr4vy/sdk/AsyncPaymentServices.java
@@ -109,46 +109,46 @@ public CompletableFuture list(ListPaymentServicesRe
/**
- * Update a configured payment service
+ * Configure a payment service
*
- * Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @return The async call builder
*/
- public UpdatePaymentServiceRequestBuilder create() {
- return new UpdatePaymentServiceRequestBuilder(sdkConfiguration);
+ public CreatePaymentServiceRequestBuilder create() {
+ return new CreatePaymentServiceRequestBuilder(sdkConfiguration);
}
/**
- * Update a configured payment service
+ * Configure a payment service
*
- *
Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @param paymentServiceCreate Request body for activating a payment service
- * @return {@code CompletableFuture} - The async response
+ * @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture create(PaymentServiceCreate paymentServiceCreate) {
+ public CompletableFuture create(PaymentServiceCreate paymentServiceCreate) {
return create(JsonNullable.undefined(), paymentServiceCreate);
}
/**
- * Update a configured payment service
+ * Configure a payment service
*
- * Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @param merchantAccountId
* @param paymentServiceCreate Request body for activating a payment service
- * @return {@code CompletableFuture} - The async response
+ * @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) {
- UpdatePaymentServiceRequest request =
- UpdatePaymentServiceRequest
+ public CompletableFuture create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) {
+ CreatePaymentServiceRequest request =
+ CreatePaymentServiceRequest
.builder()
.merchantAccountId(merchantAccountId)
.paymentServiceCreate(paymentServiceCreate)
.build();
- AsyncRequestOperation operation
- = new UpdatePaymentService.Async(sdkConfiguration, _headers);
+ AsyncRequestOperation operation
+ = new CreatePaymentService.Async(sdkConfiguration, _headers);
return operation.doRequest(request)
.thenCompose(operation::handleResponse);
}
@@ -206,51 +206,51 @@ public CompletableFuture get(
/**
- * Configure a payment service
+ * Update a configured payment service
*
- * Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @return The async call builder
*/
- public CreatePaymentServiceRequestBuilder update() {
- return new CreatePaymentServiceRequestBuilder(sdkConfiguration);
+ public UpdatePaymentServiceRequestBuilder update() {
+ return new UpdatePaymentServiceRequestBuilder(sdkConfiguration);
}
/**
- * Configure a payment service
+ * Update a configured payment service
*
- *
Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @param paymentServiceId the ID of the payment service
* @param paymentServiceUpdate Request body for updating a Payment Service
- * @return {@code CompletableFuture} - The async response
+ * @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) {
+ public CompletableFuture update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) {
return update(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate);
}
/**
- * Configure a payment service
+ * Update a configured payment service
*
- * Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @param paymentServiceId the ID of the payment service
* @param merchantAccountId
* @param paymentServiceUpdate Request body for updating a Payment Service
- * @return {@code CompletableFuture} - The async response
+ * @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture update(
+ public CompletableFuture update(
String paymentServiceId, JsonNullable merchantAccountId,
PaymentServiceUpdate paymentServiceUpdate) {
- CreatePaymentServiceRequest request =
- CreatePaymentServiceRequest
+ UpdatePaymentServiceRequest request =
+ UpdatePaymentServiceRequest
.builder()
.paymentServiceId(paymentServiceId)
.merchantAccountId(merchantAccountId)
.paymentServiceUpdate(paymentServiceUpdate)
.build();
- AsyncRequestOperation operation
- = new CreatePaymentService.Async(sdkConfiguration, _headers);
+ AsyncRequestOperation operation
+ = new UpdatePaymentService.Async(sdkConfiguration, _headers);
return operation.doRequest(request)
.thenCompose(operation::handleResponse);
}
diff --git a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java
index f3803fe7..81f5e07b 100644
--- a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java
+++ b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java
@@ -11,9 +11,7 @@
import com.gr4vy.sdk.operations.ListBuyerGiftCards;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
-import java.lang.String;
import java.util.Optional;
-import org.openapitools.jackson.nullable.JsonNullable;
public class BuyersGiftCards {
@@ -51,12 +49,12 @@ public ListBuyerGiftCardsRequestBuilder list() {
*
* List all the stored gift cards for a specific buyer.
*
+ * @param request The request object containing all the parameters for the API call.
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public ListBuyerGiftCardsResponse listDirect() {
- return list(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
- Optional.empty());
+ public ListBuyerGiftCardsResponse list(ListBuyerGiftCardsRequest request) {
+ return list(request, Optional.empty());
}
/**
@@ -64,23 +62,12 @@ public ListBuyerGiftCardsResponse listDirect() {
*
*
List all the stored gift cards for a specific buyer.
*
- * @param buyerExternalIdentifier
- * @param buyerId
- * @param merchantAccountId
+ * @param request The request object containing all the parameters for the API call.
* @param options additional options
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public ListBuyerGiftCardsResponse list(
- JsonNullable buyerExternalIdentifier, JsonNullable buyerId,
- JsonNullable merchantAccountId, Optional options) {
- ListBuyerGiftCardsRequest request =
- ListBuyerGiftCardsRequest
- .builder()
- .buyerExternalIdentifier(buyerExternalIdentifier)
- .buyerId(buyerId)
- .merchantAccountId(merchantAccountId)
- .build();
+ public ListBuyerGiftCardsResponse list(ListBuyerGiftCardsRequest request, Optional options) {
RequestOperation operation
= new ListBuyerGiftCards.Sync(sdkConfiguration, options, _headers);
return operation.handleResponse(operation.doRequest(request));
diff --git a/src/main/java/com/gr4vy/sdk/PaymentMethods.java b/src/main/java/com/gr4vy/sdk/PaymentMethods.java
index f8fb6b6f..2701ffc4 100644
--- a/src/main/java/com/gr4vy/sdk/PaymentMethods.java
+++ b/src/main/java/com/gr4vy/sdk/PaymentMethods.java
@@ -5,6 +5,7 @@
import static com.gr4vy.sdk.operations.Operations.RequestOperation;
+import com.gr4vy.sdk.models.components.PaymentMethodUpdate;
import com.gr4vy.sdk.models.operations.Body;
import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequest;
import com.gr4vy.sdk.models.operations.CreatePaymentMethodRequestBuilder;
@@ -18,10 +19,14 @@
import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequest;
import com.gr4vy.sdk.models.operations.ListPaymentMethodsRequestBuilder;
import com.gr4vy.sdk.models.operations.ListPaymentMethodsResponse;
+import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequest;
+import com.gr4vy.sdk.models.operations.UpdatePaymentMethodRequestBuilder;
+import com.gr4vy.sdk.models.operations.UpdatePaymentMethodResponse;
import com.gr4vy.sdk.operations.CreatePaymentMethod;
import com.gr4vy.sdk.operations.DeletePaymentMethod;
import com.gr4vy.sdk.operations.GetPaymentMethod;
import com.gr4vy.sdk.operations.ListPaymentMethods;
+import com.gr4vy.sdk.operations.UpdatePaymentMethod;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
import java.lang.String;
@@ -195,6 +200,57 @@ public GetPaymentMethodResponse get(
return operation.handleResponse(operation.doRequest(request));
}
+ /**
+ * Update payment method
+ *
+ * Update the details of a stored payment method.
+ *
+ * @return The call builder
+ */
+ public UpdatePaymentMethodRequestBuilder update() {
+ return new UpdatePaymentMethodRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Update payment method
+ *
+ *
Update the details of a stored payment method.
+ *
+ * @param paymentMethodId The ID of the payment method
+ * @param paymentMethodUpdate Request body for updating a stored payment method.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public UpdatePaymentMethodResponse update(String paymentMethodId, PaymentMethodUpdate paymentMethodUpdate) {
+ return update(paymentMethodId, JsonNullable.undefined(), paymentMethodUpdate);
+ }
+
+ /**
+ * Update payment method
+ *
+ *
Update the details of a stored payment method.
+ *
+ * @param paymentMethodId The ID of the payment method
+ * @param merchantAccountId
+ * @param paymentMethodUpdate Request body for updating a stored payment method.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public UpdatePaymentMethodResponse update(
+ String paymentMethodId, JsonNullable merchantAccountId,
+ PaymentMethodUpdate paymentMethodUpdate) {
+ UpdatePaymentMethodRequest request =
+ UpdatePaymentMethodRequest
+ .builder()
+ .paymentMethodId(paymentMethodId)
+ .merchantAccountId(merchantAccountId)
+ .paymentMethodUpdate(paymentMethodUpdate)
+ .build();
+ RequestOperation operation
+ = new UpdatePaymentMethod.Sync(sdkConfiguration, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
/**
* Delete payment method
*
diff --git a/src/main/java/com/gr4vy/sdk/PaymentServices.java b/src/main/java/com/gr4vy/sdk/PaymentServices.java
index d6a31c71..0ecdd593 100644
--- a/src/main/java/com/gr4vy/sdk/PaymentServices.java
+++ b/src/main/java/com/gr4vy/sdk/PaymentServices.java
@@ -105,48 +105,48 @@ public ListPaymentServicesResponse list(ListPaymentServicesRequest request, Opti
}
/**
- * Update a configured payment service
+ * Configure a payment service
*
- * Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @return The call builder
*/
- public UpdatePaymentServiceRequestBuilder create() {
- return new UpdatePaymentServiceRequestBuilder(sdkConfiguration);
+ public CreatePaymentServiceRequestBuilder create() {
+ return new CreatePaymentServiceRequestBuilder(sdkConfiguration);
}
/**
- * Update a configured payment service
+ * Configure a payment service
*
- *
Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @param paymentServiceCreate Request body for activating a payment service
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public UpdatePaymentServiceResponse create(PaymentServiceCreate paymentServiceCreate) {
+ public CreatePaymentServiceResponse create(PaymentServiceCreate paymentServiceCreate) {
return create(JsonNullable.undefined(), paymentServiceCreate);
}
/**
- * Update a configured payment service
+ * Configure a payment service
*
- *
Updates the configuration of a payment service.
+ *
Configures a new payment service for use by merchants.
*
* @param merchantAccountId
* @param paymentServiceCreate Request body for activating a payment service
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public UpdatePaymentServiceResponse create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) {
- UpdatePaymentServiceRequest request =
- UpdatePaymentServiceRequest
+ public CreatePaymentServiceResponse create(JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) {
+ CreatePaymentServiceRequest request =
+ CreatePaymentServiceRequest
.builder()
.merchantAccountId(merchantAccountId)
.paymentServiceCreate(paymentServiceCreate)
.build();
- RequestOperation operation
- = new UpdatePaymentService.Sync(sdkConfiguration, _headers);
+ RequestOperation operation
+ = new CreatePaymentService.Sync(sdkConfiguration, _headers);
return operation.handleResponse(operation.doRequest(request));
}
@@ -200,34 +200,34 @@ public GetPaymentServiceResponse get(
}
/**
- * Configure a payment service
+ * Update a configured payment service
*
- * Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @return The call builder
*/
- public CreatePaymentServiceRequestBuilder update() {
- return new CreatePaymentServiceRequestBuilder(sdkConfiguration);
+ public UpdatePaymentServiceRequestBuilder update() {
+ return new UpdatePaymentServiceRequestBuilder(sdkConfiguration);
}
/**
- * Configure a payment service
+ * Update a configured payment service
*
- *
Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @param paymentServiceId the ID of the payment service
* @param paymentServiceUpdate Request body for updating a Payment Service
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public CreatePaymentServiceResponse update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) {
+ public UpdatePaymentServiceResponse update(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) {
return update(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate);
}
/**
- * Configure a payment service
+ * Update a configured payment service
*
- *
Configures a new payment service for use by merchants.
+ *
Updates the configuration of a payment service.
*
* @param paymentServiceId the ID of the payment service
* @param merchantAccountId
@@ -235,18 +235,18 @@ public CreatePaymentServiceResponse update(String paymentServiceId, PaymentServi
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public CreatePaymentServiceResponse update(
+ public UpdatePaymentServiceResponse update(
String paymentServiceId, JsonNullable merchantAccountId,
PaymentServiceUpdate paymentServiceUpdate) {
- CreatePaymentServiceRequest request =
- CreatePaymentServiceRequest
+ UpdatePaymentServiceRequest request =
+ UpdatePaymentServiceRequest
.builder()
.paymentServiceId(paymentServiceId)
.merchantAccountId(merchantAccountId)
.paymentServiceUpdate(paymentServiceUpdate)
.build();
- RequestOperation operation
- = new CreatePaymentService.Sync(sdkConfiguration, _headers);
+ RequestOperation operation
+ = new UpdatePaymentService.Sync(sdkConfiguration, _headers);
return operation.handleResponse(operation.doRequest(request));
}
diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
index e2e6d732..647e3c6d 100644
--- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
+++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
@@ -22,8 +22,8 @@ public class SDKConfiguration {
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "1.0.0";
- public static final String SDK_VERSION = "2.16.52";
- public static final String GEN_VERSION = "2.873.1";
+ public static final String SDK_VERSION = "2.16.53";
+ public static final String GEN_VERSION = "2.881.4";
private static final String BASE_PACKAGE = "com.gr4vy.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
diff --git a/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java b/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java
index 2d7b0712..2b1d991f 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/DigitalWalletProvider.java
@@ -23,6 +23,7 @@ public class DigitalWalletProvider {
public static final DigitalWalletProvider APPLE = new DigitalWalletProvider("apple");
public static final DigitalWalletProvider GOOGLE = new DigitalWalletProvider("google");
public static final DigitalWalletProvider CLICK_TO_PAY = new DigitalWalletProvider("click-to-pay");
+ public static final DigitalWalletProvider PAZE = new DigitalWalletProvider("paze");
// This map will grow whenever a Color gets created with a new
// unrecognized value (a potential memory leak if the user is not
@@ -99,6 +100,7 @@ private static final Map createValuesMap() {
map.put("apple", APPLE);
map.put("google", GOOGLE);
map.put("click-to-pay", CLICK_TO_PAY);
+ map.put("paze", PAZE);
return map;
}
@@ -107,6 +109,7 @@ private static final Map createEnumsMap() {
map.put("apple", DigitalWalletProviderEnum.APPLE);
map.put("google", DigitalWalletProviderEnum.GOOGLE);
map.put("click-to-pay", DigitalWalletProviderEnum.CLICK_TO_PAY);
+ map.put("paze", DigitalWalletProviderEnum.PAZE);
return map;
}
@@ -115,7 +118,8 @@ public enum DigitalWalletProviderEnum {
APPLE("apple"),
GOOGLE("google"),
- CLICK_TO_PAY("click-to-pay"),;
+ CLICK_TO_PAY("click-to-pay"),
+ PAZE("paze"),;
private final String value;
diff --git a/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java b/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java
new file mode 100644
index 00000000..72c0f10d
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/EcommpayOptions.java
@@ -0,0 +1,186 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class EcommpayOptions {
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("booking_start_date")
+ private JsonNullable bookingStartDate;
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("booking_end_date")
+ private JsonNullable bookingEndDate;
+
+ @JsonCreator
+ public EcommpayOptions(
+ @JsonProperty("booking_start_date") JsonNullable bookingStartDate,
+ @JsonProperty("booking_end_date") JsonNullable bookingEndDate) {
+ Utils.checkNotNull(bookingStartDate, "bookingStartDate");
+ Utils.checkNotNull(bookingEndDate, "bookingEndDate");
+ this.bookingStartDate = bookingStartDate;
+ this.bookingEndDate = bookingEndDate;
+ }
+
+ public EcommpayOptions() {
+ this(JsonNullable.undefined(), JsonNullable.undefined());
+ }
+
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ @JsonIgnore
+ public JsonNullable bookingStartDate() {
+ return bookingStartDate;
+ }
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ @JsonIgnore
+ public JsonNullable bookingEndDate() {
+ return bookingEndDate;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public EcommpayOptions withBookingStartDate(String bookingStartDate) {
+ Utils.checkNotNull(bookingStartDate, "bookingStartDate");
+ this.bookingStartDate = JsonNullable.of(bookingStartDate);
+ return this;
+ }
+
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public EcommpayOptions withBookingStartDate(JsonNullable bookingStartDate) {
+ Utils.checkNotNull(bookingStartDate, "bookingStartDate");
+ this.bookingStartDate = bookingStartDate;
+ return this;
+ }
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public EcommpayOptions withBookingEndDate(String bookingEndDate) {
+ Utils.checkNotNull(bookingEndDate, "bookingEndDate");
+ this.bookingEndDate = JsonNullable.of(bookingEndDate);
+ return this;
+ }
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public EcommpayOptions withBookingEndDate(JsonNullable bookingEndDate) {
+ Utils.checkNotNull(bookingEndDate, "bookingEndDate");
+ this.bookingEndDate = bookingEndDate;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EcommpayOptions other = (EcommpayOptions) o;
+ return
+ Utils.enhancedDeepEquals(this.bookingStartDate, other.bookingStartDate) &&
+ Utils.enhancedDeepEquals(this.bookingEndDate, other.bookingEndDate);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ bookingStartDate, bookingEndDate);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(EcommpayOptions.class,
+ "bookingStartDate", bookingStartDate,
+ "bookingEndDate", bookingEndDate);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private JsonNullable bookingStartDate = JsonNullable.undefined();
+
+ private JsonNullable bookingEndDate = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public Builder bookingStartDate(String bookingStartDate) {
+ Utils.checkNotNull(bookingStartDate, "bookingStartDate");
+ this.bookingStartDate = JsonNullable.of(bookingStartDate);
+ return this;
+ }
+
+ /**
+ * The start date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public Builder bookingStartDate(JsonNullable bookingStartDate) {
+ Utils.checkNotNull(bookingStartDate, "bookingStartDate");
+ this.bookingStartDate = bookingStartDate;
+ return this;
+ }
+
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public Builder bookingEndDate(String bookingEndDate) {
+ Utils.checkNotNull(bookingEndDate, "bookingEndDate");
+ this.bookingEndDate = JsonNullable.of(bookingEndDate);
+ return this;
+ }
+
+ /**
+ * The end date of the booking in ISO 8601 format (YYYY-MM-DD). Required for certain MCCs.
+ */
+ public Builder bookingEndDate(JsonNullable bookingEndDate) {
+ Utils.checkNotNull(bookingEndDate, "bookingEndDate");
+ this.bookingEndDate = bookingEndDate;
+ return this;
+ }
+
+ public EcommpayOptions build() {
+
+ return new EcommpayOptions(
+ bookingStartDate, bookingEndDate);
+ }
+
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java
index 7a5b104a..86e82602 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCard.java
@@ -11,6 +11,7 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.gr4vy.sdk.utils.LazySingletonValue;
import com.gr4vy.sdk.utils.Utils;
+import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -88,6 +89,32 @@ public class GiftCard {
@JsonProperty("updated_at")
private OffsetDateTime updatedAt;
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("last_used_at")
+ private JsonNullable lastUsedAt;
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ @JsonProperty("usage_count")
+ private long usageCount;
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("cit_last_used_at")
+ private JsonNullable citLastUsedAt;
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ @JsonProperty("cit_usage_count")
+ private long citUsageCount;
+
@JsonCreator
public GiftCard(
@JsonProperty("id") String id,
@@ -99,7 +126,11 @@ public GiftCard(
@JsonProperty("expiration_date") JsonNullable expirationDate,
@JsonProperty("buyer") JsonNullable extends Buyer> buyer,
@JsonProperty("created_at") OffsetDateTime createdAt,
- @JsonProperty("updated_at") OffsetDateTime updatedAt) {
+ @JsonProperty("updated_at") OffsetDateTime updatedAt,
+ @JsonProperty("last_used_at") JsonNullable lastUsedAt,
+ @JsonProperty("usage_count") long usageCount,
+ @JsonProperty("cit_last_used_at") JsonNullable citLastUsedAt,
+ @JsonProperty("cit_usage_count") long citUsageCount) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(merchantAccountId, "merchantAccountId");
Utils.checkNotNull(giftCardService, "giftCardService");
@@ -110,6 +141,10 @@ public GiftCard(
Utils.checkNotNull(buyer, "buyer");
Utils.checkNotNull(createdAt, "createdAt");
Utils.checkNotNull(updatedAt, "updatedAt");
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ Utils.checkNotNull(usageCount, "usageCount");
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ Utils.checkNotNull(citUsageCount, "citUsageCount");
this.type = Builder._SINGLETON_VALUE_Type.value();
this.id = id;
this.merchantAccountId = merchantAccountId;
@@ -121,6 +156,10 @@ public GiftCard(
this.buyer = buyer;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
+ this.lastUsedAt = lastUsedAt;
+ this.usageCount = usageCount;
+ this.citLastUsedAt = citLastUsedAt;
+ this.citUsageCount = citUsageCount;
}
public GiftCard(
@@ -131,11 +170,14 @@ public GiftCard(
String subBin,
String last4,
OffsetDateTime createdAt,
- OffsetDateTime updatedAt) {
+ OffsetDateTime updatedAt,
+ long usageCount,
+ long citUsageCount) {
this(id, merchantAccountId, giftCardService,
bin, subBin, last4,
JsonNullable.undefined(), JsonNullable.undefined(), createdAt,
- updatedAt);
+ updatedAt, JsonNullable.undefined(), usageCount,
+ JsonNullable.undefined(), citUsageCount);
}
/**
@@ -225,6 +267,38 @@ public OffsetDateTime updatedAt() {
return updatedAt;
}
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ @JsonIgnore
+ public JsonNullable lastUsedAt() {
+ return lastUsedAt;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ @JsonIgnore
+ public long usageCount() {
+ return usageCount;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ @JsonIgnore
+ public JsonNullable citLastUsedAt() {
+ return citLastUsedAt;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ @JsonIgnore
+ public long citUsageCount() {
+ return citUsageCount;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -337,6 +411,60 @@ public GiftCard withUpdatedAt(OffsetDateTime updatedAt) {
return this;
}
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public GiftCard withLastUsedAt(OffsetDateTime lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = JsonNullable.of(lastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public GiftCard withLastUsedAt(JsonNullable lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = lastUsedAt;
+ return this;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ public GiftCard withUsageCount(long usageCount) {
+ Utils.checkNotNull(usageCount, "usageCount");
+ this.usageCount = usageCount;
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public GiftCard withCitLastUsedAt(OffsetDateTime citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = JsonNullable.of(citLastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public GiftCard withCitLastUsedAt(JsonNullable citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = citLastUsedAt;
+ return this;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ public GiftCard withCitUsageCount(long citUsageCount) {
+ Utils.checkNotNull(citUsageCount, "citUsageCount");
+ this.citUsageCount = citUsageCount;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -357,7 +485,11 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.expirationDate, other.expirationDate) &&
Utils.enhancedDeepEquals(this.buyer, other.buyer) &&
Utils.enhancedDeepEquals(this.createdAt, other.createdAt) &&
- Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt);
+ Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) &&
+ Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) &&
+ Utils.enhancedDeepEquals(this.usageCount, other.usageCount) &&
+ Utils.enhancedDeepEquals(this.citLastUsedAt, other.citLastUsedAt) &&
+ Utils.enhancedDeepEquals(this.citUsageCount, other.citUsageCount);
}
@Override
@@ -366,7 +498,8 @@ public int hashCode() {
type, id, merchantAccountId,
giftCardService, bin, subBin,
last4, expirationDate, buyer,
- createdAt, updatedAt);
+ createdAt, updatedAt, lastUsedAt,
+ usageCount, citLastUsedAt, citUsageCount);
}
@Override
@@ -382,7 +515,11 @@ public String toString() {
"expirationDate", expirationDate,
"buyer", buyer,
"createdAt", createdAt,
- "updatedAt", updatedAt);
+ "updatedAt", updatedAt,
+ "lastUsedAt", lastUsedAt,
+ "usageCount", usageCount,
+ "citLastUsedAt", citLastUsedAt,
+ "citUsageCount", citUsageCount);
}
@SuppressWarnings("UnusedReturnValue")
@@ -408,6 +545,14 @@ public final static class Builder {
private OffsetDateTime updatedAt;
+ private JsonNullable lastUsedAt = JsonNullable.undefined();
+
+ private Long usageCount;
+
+ private JsonNullable citLastUsedAt = JsonNullable.undefined();
+
+ private Long citUsageCount;
+
private Builder() {
// force use of static builder() method
}
@@ -529,13 +674,72 @@ public Builder updatedAt(OffsetDateTime updatedAt) {
return this;
}
+
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public Builder lastUsedAt(OffsetDateTime lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = JsonNullable.of(lastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public Builder lastUsedAt(JsonNullable lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = lastUsedAt;
+ return this;
+ }
+
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ public Builder usageCount(long usageCount) {
+ Utils.checkNotNull(usageCount, "usageCount");
+ this.usageCount = usageCount;
+ return this;
+ }
+
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public Builder citLastUsedAt(OffsetDateTime citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = JsonNullable.of(citLastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public Builder citLastUsedAt(JsonNullable citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = citLastUsedAt;
+ return this;
+ }
+
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ public Builder citUsageCount(long citUsageCount) {
+ Utils.checkNotNull(citUsageCount, "citUsageCount");
+ this.citUsageCount = citUsageCount;
+ return this;
+ }
+
public GiftCard build() {
return new GiftCard(
id, merchantAccountId, giftCardService,
bin, subBin, last4,
expirationDate, buyer, createdAt,
- updatedAt);
+ updatedAt, lastUsedAt, usageCount,
+ citLastUsedAt, citUsageCount);
}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java
index 133cbb5e..d0fee25a 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCardSummary.java
@@ -105,6 +105,32 @@ public class GiftCardSummary {
@JsonProperty("balance_raw_error_message")
private JsonNullable balanceRawErrorMessage;
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("last_used_at")
+ private JsonNullable lastUsedAt;
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ @JsonProperty("usage_count")
+ private long usageCount;
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("cit_last_used_at")
+ private JsonNullable citLastUsedAt;
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ @JsonProperty("cit_usage_count")
+ private long citUsageCount;
+
@JsonCreator
public GiftCardSummary(
@JsonProperty("id") JsonNullable id,
@@ -117,7 +143,11 @@ public GiftCardSummary(
@JsonProperty("balance") JsonNullable balance,
@JsonProperty("balance_error_code") JsonNullable extends GiftCardErrorCode> balanceErrorCode,
@JsonProperty("balance_raw_error_code") JsonNullable balanceRawErrorCode,
- @JsonProperty("balance_raw_error_message") JsonNullable balanceRawErrorMessage) {
+ @JsonProperty("balance_raw_error_message") JsonNullable balanceRawErrorMessage,
+ @JsonProperty("last_used_at") JsonNullable lastUsedAt,
+ @JsonProperty("usage_count") long usageCount,
+ @JsonProperty("cit_last_used_at") JsonNullable citLastUsedAt,
+ @JsonProperty("cit_usage_count") long citUsageCount) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(merchantAccountId, "merchantAccountId");
Utils.checkNotNull(bin, "bin");
@@ -129,6 +159,10 @@ public GiftCardSummary(
Utils.checkNotNull(balanceErrorCode, "balanceErrorCode");
Utils.checkNotNull(balanceRawErrorCode, "balanceRawErrorCode");
Utils.checkNotNull(balanceRawErrorMessage, "balanceRawErrorMessage");
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ Utils.checkNotNull(usageCount, "usageCount");
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ Utils.checkNotNull(citUsageCount, "citUsageCount");
this.type = Builder._SINGLETON_VALUE_Type.value();
this.id = id;
this.merchantAccountId = merchantAccountId;
@@ -141,17 +175,24 @@ public GiftCardSummary(
this.balanceErrorCode = balanceErrorCode;
this.balanceRawErrorCode = balanceRawErrorCode;
this.balanceRawErrorMessage = balanceRawErrorMessage;
+ this.lastUsedAt = lastUsedAt;
+ this.usageCount = usageCount;
+ this.citLastUsedAt = citLastUsedAt;
+ this.citUsageCount = citUsageCount;
}
public GiftCardSummary(
String merchantAccountId,
String bin,
String subBin,
- String last4) {
+ String last4,
+ long usageCount,
+ long citUsageCount) {
this(JsonNullable.undefined(), merchantAccountId, bin,
subBin, last4, JsonNullable.undefined(),
JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
- JsonNullable.undefined(), JsonNullable.undefined());
+ JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
+ usageCount, JsonNullable.undefined(), citUsageCount);
}
/**
@@ -255,6 +296,38 @@ public JsonNullable balanceRawErrorMessage() {
return balanceRawErrorMessage;
}
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ @JsonIgnore
+ public JsonNullable lastUsedAt() {
+ return lastUsedAt;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ @JsonIgnore
+ public long usageCount() {
+ return usageCount;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ @JsonIgnore
+ public JsonNullable citLastUsedAt() {
+ return citLastUsedAt;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ @JsonIgnore
+ public long citUsageCount() {
+ return citUsageCount;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -430,6 +503,60 @@ public GiftCardSummary withBalanceRawErrorMessage(JsonNullable balanceRa
return this;
}
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public GiftCardSummary withLastUsedAt(OffsetDateTime lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = JsonNullable.of(lastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction.
+ */
+ public GiftCardSummary withLastUsedAt(JsonNullable lastUsedAt) {
+ Utils.checkNotNull(lastUsedAt, "lastUsedAt");
+ this.lastUsedAt = lastUsedAt;
+ return this;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions.
+ */
+ public GiftCardSummary withUsageCount(long usageCount) {
+ Utils.checkNotNull(usageCount, "usageCount");
+ this.usageCount = usageCount;
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public GiftCardSummary withCitLastUsedAt(OffsetDateTime citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = JsonNullable.of(citLastUsedAt);
+ return this;
+ }
+
+ /**
+ * The timestamp when this gift card was last used in a transaction for client initiated transactions.
+ */
+ public GiftCardSummary withCitLastUsedAt(JsonNullable citLastUsedAt) {
+ Utils.checkNotNull(citLastUsedAt, "citLastUsedAt");
+ this.citLastUsedAt = citLastUsedAt;
+ return this;
+ }
+
+ /**
+ * The number of times this gift card has been used in transactions for client initiated transactions.
+ */
+ public GiftCardSummary withCitUsageCount(long citUsageCount) {
+ Utils.checkNotNull(citUsageCount, "citUsageCount");
+ this.citUsageCount = citUsageCount;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -451,7 +578,11 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.balance, other.balance) &&
Utils.enhancedDeepEquals(this.balanceErrorCode, other.balanceErrorCode) &&
Utils.enhancedDeepEquals(this.balanceRawErrorCode, other.balanceRawErrorCode) &&
- Utils.enhancedDeepEquals(this.balanceRawErrorMessage, other.balanceRawErrorMessage);
+ Utils.enhancedDeepEquals(this.balanceRawErrorMessage, other.balanceRawErrorMessage) &&
+ Utils.enhancedDeepEquals(this.lastUsedAt, other.lastUsedAt) &&
+ Utils.enhancedDeepEquals(this.usageCount, other.usageCount) &&
+ Utils.enhancedDeepEquals(this.citLastUsedAt, other.citLastUsedAt) &&
+ Utils.enhancedDeepEquals(this.citUsageCount, other.citUsageCount);
}
@Override
@@ -460,7 +591,9 @@ public int hashCode() {
type, id, merchantAccountId,
bin, subBin, last4,
currency, expirationDate, balance,
- balanceErrorCode, balanceRawErrorCode, balanceRawErrorMessage);
+ balanceErrorCode, balanceRawErrorCode, balanceRawErrorMessage,
+ lastUsedAt, usageCount, citLastUsedAt,
+ citUsageCount);
}
@Override
@@ -477,7 +610,11 @@ public String toString() {
"balance", balance,
"balanceErrorCode", balanceErrorCode,
"balanceRawErrorCode", balanceRawErrorCode,
- "balanceRawErrorMessage", balanceRawErrorMessage);
+ "balanceRawErrorMessage", balanceRawErrorMessage,
+ "lastUsedAt", lastUsedAt,
+ "usageCount", usageCount,
+ "citLastUsedAt", citLastUsedAt,
+ "citUsageCount", citUsageCount);
}
@SuppressWarnings("UnusedReturnValue")
@@ -505,6 +642,14 @@ public final static class Builder {
private JsonNullable