com.dft.api.shopify.v202407.ShopifyWebhooksAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-admin-rest Show documentation
Show all versions of shopify-admin-rest Show documentation
Shopify Admin REST API using JDK 11 and Reactive Programming
The newest version!
package com.dft.api.shopify.v202407;
import com.dft.api.shopify.ShopifySdkNew;
import com.dft.api.shopify.model.auth.AccessCredential;
import com.dft.api.shopify.v202407.model.webhook.ShopifyWebhookRequest;
import com.dft.api.shopify.v202407.model.webhook.ShopifyWebhookWrapper;
import java.net.URI;
import java.net.http.HttpRequest;
public class ShopifyWebhooksAPI extends ShopifySdkNew {
public static final String VERSION_2024_07 = "/2024-07";
private static final String WEBHOOKS_ENDPOINT = "/webhooks";
public ShopifyWebhooksAPI(AccessCredential accessCredential) {
super(accessCredential);
}
public ShopifyWebhookWrapper createWebhook(ShopifyWebhookRequest shopifyWebhookRequest) {
URI uri = baseUrl(VERSION_2024_07, WEBHOOKS_ENDPOINT);
HttpRequest request = postWithObject(uri, shopifyWebhookRequest);
return getRequestWrapped(request, ShopifyWebhookWrapper.class);
}
}