POST | /sync/webhooks/subscriptions/delete |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
/**
* Represents a request to delete webhook subscriptions.
*/
@Api(Description="Represents a request to delete webhook subscriptions.")
public static class BatchDeleteWebhookSubscriptions extends BatchDeleteWebhookSubscriptionsBase
{
}
/**
* Specifies a request to delete webhook subscriptions.
*/
@Api(Description="Specifies a request to delete webhook subscriptions.")
public static class BatchDeleteWebhookSubscriptionsBase implements IPost
{
/**
* The subscriptions to delete.
*/
@ApiMember(Description="The subscriptions to delete.", IsRequired=true, Name="Subscriptions")
public ArrayList<WebhookSubscription> subscriptions = null;
public ArrayList<WebhookSubscription> getSubscriptions() { return subscriptions; }
public BatchDeleteWebhookSubscriptionsBase setSubscriptions(ArrayList<WebhookSubscription> value) { this.subscriptions = value; return this; }
}
public static class WebhookSubscription
{
public String id = null;
public String name = null;
public String event = null;
public Boolean isActive = null;
public Date createdDateUtc = null;
public String createdById = null;
public Date lastModifiedDateUtc = null;
public SubscriptionConfig config = null;
public String getId() { return id; }
public WebhookSubscription setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public WebhookSubscription setName(String value) { this.name = value; return this; }
public String getEvent() { return event; }
public WebhookSubscription setEvent(String value) { this.event = value; return this; }
public Boolean getIsActive() { return isActive; }
public WebhookSubscription setIsActive(Boolean value) { this.isActive = value; return this; }
public Date getCreatedDateUtc() { return createdDateUtc; }
public WebhookSubscription setCreatedDateUtc(Date value) { this.createdDateUtc = value; return this; }
public String getCreatedById() { return createdById; }
public WebhookSubscription setCreatedById(String value) { this.createdById = value; return this; }
public Date getLastModifiedDateUtc() { return lastModifiedDateUtc; }
public WebhookSubscription setLastModifiedDateUtc(Date value) { this.lastModifiedDateUtc = value; return this; }
public SubscriptionConfig getConfig() { return config; }
public WebhookSubscription setConfig(SubscriptionConfig value) { this.config = value; return this; }
}
public static class SubscriptionConfig
{
public String url = null;
public String contentType = null;
public String secret = null;
public String getUrl() { return url; }
public SubscriptionConfig setUrl(String value) { this.url = value; return this; }
public String getContentType() { return contentType; }
public SubscriptionConfig setContentType(String value) { this.contentType = value; return this; }
public String getSecret() { return secret; }
public SubscriptionConfig setSecret(String value) { this.secret = value; return this; }
}
}
Java BatchDeleteWebhookSubscriptions DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sync/webhooks/subscriptions/delete HTTP/1.1
Host: reportfiling.staging.pwc.de
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"subscriptions":[{"id":"String","name":"String","event":"String","isActive":false,"createdDateUtc":"\/Date(-62135596800000-0000)\/","createdById":"String","lastModifiedDateUtc":"\/Date(-62135596800000-0000)\/","config":{"url":"String","contentType":"String","secret":"String"}}]}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length [{"subscription":{"id":"String","name":"String","event":"String","isActive":false,"createdDateUtc":"\/Date(-62135596800000-0000)\/","createdById":"String","lastModifiedDateUtc":"\/Date(-62135596800000-0000)\/","config":{"url":"String","contentType":"String","secret":"String"}},"history":[{"attemptedDateUtc":"\/Date(-62135596800000-0000)\/","statusDescription":"String","statusCode":"Continue","subscriptionId":"String","id":"String","eventId":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}]