
com.adyen.model.management.TestCompanyWebhookRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Management API
*
* The version of the OpenAPI document: 3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.management;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.CustomNotification;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* TestCompanyWebhookRequest
*/
@JsonPropertyOrder({
TestCompanyWebhookRequest.JSON_PROPERTY_MERCHANT_IDS,
TestCompanyWebhookRequest.JSON_PROPERTY_NOTIFICATION,
TestCompanyWebhookRequest.JSON_PROPERTY_TYPES
})
public class TestCompanyWebhookRequest {
public static final String JSON_PROPERTY_MERCHANT_IDS = "merchantIds";
private List merchantIds;
public static final String JSON_PROPERTY_NOTIFICATION = "notification";
private CustomNotification notification;
public static final String JSON_PROPERTY_TYPES = "types";
private List types;
public TestCompanyWebhookRequest() {
}
/**
* List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
*
* @param merchantIds List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
* @return the current {@code TestCompanyWebhookRequest} instance, allowing for method chaining
*/
public TestCompanyWebhookRequest merchantIds(List merchantIds) {
this.merchantIds = merchantIds;
return this;
}
public TestCompanyWebhookRequest addMerchantIdsItem(String merchantIdsItem) {
if (this.merchantIds == null) {
this.merchantIds = new ArrayList<>();
}
this.merchantIds.add(merchantIdsItem);
return this;
}
/**
* List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
* @return merchantIds List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
*/
@JsonProperty(JSON_PROPERTY_MERCHANT_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getMerchantIds() {
return merchantIds;
}
/**
* List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
*
* @param merchantIds List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.
*/
@JsonProperty(JSON_PROPERTY_MERCHANT_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMerchantIds(List merchantIds) {
this.merchantIds = merchantIds;
}
/**
* notification
*
* @param notification
* @return the current {@code TestCompanyWebhookRequest} instance, allowing for method chaining
*/
public TestCompanyWebhookRequest notification(CustomNotification notification) {
this.notification = notification;
return this;
}
/**
* Get notification
* @return notification
*/
@JsonProperty(JSON_PROPERTY_NOTIFICATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CustomNotification getNotification() {
return notification;
}
/**
* notification
*
* @param notification
*/
@JsonProperty(JSON_PROPERTY_NOTIFICATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNotification(CustomNotification notification) {
this.notification = notification;
}
/**
* List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
*
* @param types List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
* @return the current {@code TestCompanyWebhookRequest} instance, allowing for method chaining
*/
public TestCompanyWebhookRequest types(List types) {
this.types = types;
return this;
}
public TestCompanyWebhookRequest addTypesItem(String typesItem) {
if (this.types == null) {
this.types = new ArrayList<>();
}
this.types.add(typesItem);
return this;
}
/**
* List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
* @return types List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
*/
@JsonProperty(JSON_PROPERTY_TYPES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getTypes() {
return types;
}
/**
* List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
*
* @param types List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING**
*/
@JsonProperty(JSON_PROPERTY_TYPES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTypes(List types) {
this.types = types;
}
/**
* Return true if this TestCompanyWebhookRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestCompanyWebhookRequest testCompanyWebhookRequest = (TestCompanyWebhookRequest) o;
return Objects.equals(this.merchantIds, testCompanyWebhookRequest.merchantIds) &&
Objects.equals(this.notification, testCompanyWebhookRequest.notification) &&
Objects.equals(this.types, testCompanyWebhookRequest.types);
}
@Override
public int hashCode() {
return Objects.hash(merchantIds, notification, types);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestCompanyWebhookRequest {\n");
sb.append(" merchantIds: ").append(toIndentedString(merchantIds)).append("\n");
sb.append(" notification: ").append(toIndentedString(notification)).append("\n");
sb.append(" types: ").append(toIndentedString(types)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of TestCompanyWebhookRequest given an JSON string
*
* @param jsonString JSON string
* @return An instance of TestCompanyWebhookRequest
* @throws JsonProcessingException if the JSON string is invalid with respect to TestCompanyWebhookRequest
*/
public static TestCompanyWebhookRequest fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, TestCompanyWebhookRequest.class);
}
/**
* Convert an instance of TestCompanyWebhookRequest to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy