it.netgrid.woocommerce.jersey.bulk.ProductReviewBulkService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwcrc Show documentation
Show all versions of jwcrc Show documentation
JWCRC provides a client for the Woocommerce API v1. (2.6.x)
package it.netgrid.woocommerce.jersey.bulk;
import java.util.Arrays;
import java.util.List;
import javax.ws.rs.client.WebTarget;
import it.netgrid.woocommerce.model.Product;
import it.netgrid.woocommerce.model.ProductReview;
public class ProductReviewBulkService extends TemplateReadOnlyBulkService {
public static final String READ_BASE_PATH = "products/%d/reviews";
public ProductReviewBulkService(WebTarget target) {
super(target);
}
@Override
public String getReadPath(Product context) {
return String.format(READ_BASE_PATH, context.getId());
}
@Override
public Class getResponseClass() {
return ProductReview[].class;
}
@Override
public List getResult(ProductReview[] productReviews) {
return Arrays.asList(productReviews);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy