
com.vk.api.sdk.queries.orders.OrdersChangeStateQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.
The newest version!
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.queries.orders;
import com.vk.api.sdk.client.AbstractQueryBuilder;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.ServiceActor;
import com.vk.api.sdk.objects.annotations.ApiParam;
import com.vk.api.sdk.objects.orders.ChangeStateAction;
import java.util.Arrays;
import java.util.List;
/**
* Query for Orders.changeState method
*/
public class OrdersChangeStateQuery extends AbstractQueryBuilder {
/**
* Creates a AbstractQueryBuilder instance that can be used to build service api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
* @param orderId value of "order id" parameter. Minimum is 0.
* @param action value of "action" parameter.
*/
public OrdersChangeStateQuery(VkApiClient client, ServiceActor actor, Integer orderId,
ChangeStateAction action) {
super(client, "orders.changeState", String.class);
accessToken(actor.getAccessToken());
clientSecret(actor.getClientSecret());
orderId(orderId);
action(action);
}
/**
* Creates a AbstractQueryBuilder instance that can be used to build service api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
*/
public OrdersChangeStateQuery(VkApiClient client, ServiceActor actor) {
super(client, "orders.changeState", String.class);
accessToken(actor.getAccessToken());
clientSecret(actor.getClientSecret());
}
/**
* Order ID.
*
* @param value value of "order id" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
@ApiParam("order_id")
public OrdersChangeStateQuery orderId(Integer value) {
return unsafeParam("order_id", value);
}
/**
* Action to be done with the order. Available actions: *cancel - to cancel unconfirmed order. *charge - to confirm unconfirmed order. Applies only if processing of [vk.com/dev/payments_status|order_change_state] notification failed. *refund - to cancel confirmed order.
*
* @param value value of "action" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
@ApiParam("action")
public OrdersChangeStateQuery action(ChangeStateAction value) {
return unsafeParam("action", value);
}
/**
* Internal ID of the order in the application.
*
* @param value value of "app order id" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
@ApiParam("app_order_id")
public OrdersChangeStateQuery appOrderId(Integer value) {
return unsafeParam("app_order_id", value);
}
/**
* If this parameter is set to 1, this method returns a list of test mode orders. By default - 0.
*
* @param value value of "test mode" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
@ApiParam("test_mode")
public OrdersChangeStateQuery testMode(Boolean value) {
return unsafeParam("test_mode", value);
}
@Override
protected OrdersChangeStateQuery getThis() {
return this;
}
@Override
protected List essentialKeys() {
return Arrays.asList("action", "order_id", "access_token");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy