jp.gopay.sdk.builders.webhook.AbstractWebhookBuilders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.builders.webhook;
import jp.gopay.sdk.builders.IdempotentRetrofitRequestBuilder;
import jp.gopay.sdk.builders.RetrofitRequestBuilder;
import jp.gopay.sdk.builders.RetrofitRequestBuilderPaginated;
import jp.gopay.sdk.models.common.StoreId;
import jp.gopay.sdk.models.common.Void;
import jp.gopay.sdk.models.common.WebhookId;
import jp.gopay.sdk.models.response.webhook.Webhook;
import jp.gopay.sdk.types.PaymentSystemEvent;
import retrofit2.Retrofit;
import java.net.URL;
import java.util.List;
public abstract class AbstractWebhookBuilders {
public static abstract class AbstractListWebhookMerchantRequestBuilder
extends RetrofitRequestBuilderPaginated {
public AbstractListWebhookMerchantRequestBuilder(Retrofit retrofit) {
super(retrofit);
}
}
public static abstract class AbstractGetWebhookMerchantRequestBuilder
extends RetrofitRequestBuilder {
protected final WebhookId webhookId;
protected WebhookId getWebhookId() {
return webhookId;
}
public AbstractGetWebhookMerchantRequestBuilder(Retrofit retrofit, WebhookId webhookId) {
super(retrofit);
this.webhookId = webhookId;
}
}
public static abstract class AbstractCreateWebhookMerchantRequestBuilder
extends IdempotentRetrofitRequestBuilder {
protected URL url;
protected List triggers;
public AbstractCreateWebhookMerchantRequestBuilder(Retrofit retrofit, URL url) {
super(retrofit);
this.url = url;
}
protected URL getUrl() {
return url;
}
protected List getTriggers() {
return triggers;
}
public B withTriggers(List triggers) {
this.triggers = triggers;
return (B)this;
}
}
public static abstract class AbstractUpdateWebhookMerchantRequestBuilder
extends IdempotentRetrofitRequestBuilder {
protected final WebhookId webhookId;
protected URL url;
protected List triggers;
protected WebhookId getWebhookId() {
return webhookId;
}
protected URL getUrl() {
return url;
}
protected List getTriggers() {
return triggers;
}
public AbstractUpdateWebhookMerchantRequestBuilder(Retrofit retrofit, WebhookId webhookId) {
super(retrofit);
this.webhookId = webhookId;
}
public B withURL(URL url) {
this.url = url;
return (B)this;
}
public B withTriggers(List triggers) {
this.triggers = triggers;
return (B)this;
}
}
public static abstract class AbstractDeleteWebhookMerchantRequestBuilder
extends RetrofitRequestBuilder {
protected final WebhookId webhookId;
protected WebhookId getWebhookId() {
return webhookId;
}
public AbstractDeleteWebhookMerchantRequestBuilder(Retrofit retrofit, WebhookId webhookId) {
super(retrofit);
this.webhookId = webhookId;
}
}
public static abstract class AbstractListWebhookRequestBuilder
extends RetrofitRequestBuilderPaginated {
protected StoreId storeId;
protected StoreId getStoreId() {
return storeId;
}
public AbstractListWebhookRequestBuilder(Retrofit retrofit, StoreId storeId) {
super(retrofit);
this.storeId = storeId;
}
}
public static abstract class AbstractDeleteWebhookRequestBuilder
extends RetrofitRequestBuilder {
protected final StoreId storeId;
protected final WebhookId webhookId;
protected StoreId getStoreId() {
return storeId;
}
protected WebhookId getWebhookId() {
return webhookId;
}
public AbstractDeleteWebhookRequestBuilder(Retrofit retrofit, StoreId storeId, WebhookId webhookId) {
super(retrofit);
this.storeId = storeId;
this.webhookId = webhookId;
}
}
public static abstract class AbstractGetWebhookRequestBuilder
extends RetrofitRequestBuilder {
protected final StoreId storeId;
protected final WebhookId webhookId;
protected StoreId getStoreId() {
return storeId;
}
protected WebhookId getWebhookId() {
return webhookId;
}
public AbstractGetWebhookRequestBuilder(Retrofit retrofit, StoreId storeId, WebhookId webhookId) {
super(retrofit);
this.storeId = storeId;
this.webhookId = webhookId;
}
}
public static abstract class AbstractUpdateWebhookRequestBuilder
extends IdempotentRetrofitRequestBuilder {
protected final StoreId storeId;
protected final WebhookId webhookId;
protected URL url;
protected List triggers;
protected StoreId getStoreId() {
return storeId;
}
protected WebhookId getWebhookId() {
return webhookId;
}
protected URL getUrl() {
return url;
}
protected List getTriggers() {
return triggers;
}
public AbstractUpdateWebhookRequestBuilder(Retrofit retrofit, StoreId storeId, WebhookId webhookId) {
super(retrofit);
this.storeId = storeId;
this.webhookId = webhookId;
}
public B withURL(URL url) {
this.url = url;
return (B)this;
}
public B withTriggers(List triggers) {
this.triggers = triggers;
return (B)this;
}
}
public static abstract class AbstractCreateWebhookRequestBuilder
extends IdempotentRetrofitRequestBuilder {
protected StoreId storeId;
protected URL url;
protected List triggers;
public AbstractCreateWebhookRequestBuilder(Retrofit retrofit, StoreId storeId, URL url) {
super(retrofit);
this.storeId = storeId;
this.url = url;
}
protected StoreId getStoreId() {
return storeId;
}
protected URL getUrl() {
return url;
}
protected List getTriggers() {
return triggers;
}
public B withTriggers(List triggers) {
this.triggers = triggers;
return (B)this;
}
}
}