Back to project page Java-Yandex.Money-API-SDK.
The source code is released under:
MIT License
If you think the Android project Java-Yandex.Money-API-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ru.yandex.money.api; // ww w . ja v a 2s . co m import ru.yandex.money.api.enums.OperationHistoryType; import ru.yandex.money.api.response.*; import ru.yandex.money.api.rights.IdentifierType; import java.io.IOException; import java.math.BigDecimal; import java.util.Date; import java.util.Map; import java.util.Set; /** * ???????, ????????????? ??????????????? ????? ???? ??????????? ????????? ?? ????? ?????????????. * <p/> * <p/> * Copyright 2012 Yandex Money, All rights reserved. * <p/> * Date: 25.10.13 18:52 * * @author sergeev */ public interface ApiCommandsFacade { /** * URI API ???????? ???????.????? */ String URI_YM_API = "https://money.yandex.ru/api"; /** * ????? ???? ?????? ?????? ???????????. ??? ?????? ??????, ???? ?????, ???????? ?????? ??????, ????? ????????. * * @param accessToken ????? ??????????? ????????????? * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ????? */ void revokeOAuthToken(String accessToken) throws IOException, InvalidTokenException; /** * ????? ?????????? ?????????? ? ??????? ???????????? ?????? ?????????????. * ????????? ????? ??????: account-info * * @param accessToken string ????? ??????????? ????????????? * @return ??????????? ???????? {@link ru.yandex.money.api.response.AccountInfoResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ AccountInfoResponse accountInfo(String accessToken) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ????? ?????????? ?????????????? ???????? ???????? (?????????? ??? ?????????) * ? ????????????? ??????. ??????? ???????? ?????????? ? ???????? ???????????????? * ????????. ???????? ?????????? ???? ?????????????? ???????????? (???????????? ???????????). * ????????? ????? ??????: operation-history. * * @param accessToken ????? ??????????? ????????????? * @param startRecord integer ??????????? ????? ?????? ??????? ? ??????. ?? ????????? * ?????????? ?? ?????? ??????? * @param records ??????????? ????????????? ???????? ???????? ????????. * ??????????? ?????????: ?? 1 ?? 100, ?? ????????? 30. * @param operationsType ???????? ????? ????????, ??????? ??????????? ??????????. * ???? ???????? ????????????????? ????? ??????. ? ???????, ????? ???????? * ?????????????, ???????????? ???? ????????. ????????? ?????????: payment deposition. * ? ????????? ???????????? ?????????? ???????? ??????????????? ??????, ????????? ???????? * ?????????????? ? ?????????. * @return ??????????? ???????? {@link ru.yandex.money.api.response.OperationHistoryResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ OperationHistoryResponse operationHistory(String accessToken, Integer startRecord, Integer records, Set<OperationHistoryType> operationsType) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ????? ?????????? ?????????????? ???????? ???????? (?????????? ??? ?????????) * ? ????????????? ??????. ??????? ???????? ?????????? ? ???????? ???????????????? * ????????. ???????? ?????????? ???? ?????????????? ???????????? (???????????? ???????????). * ????????? ????? ??????: operation-history. * * @param accessToken ????? ??????????? ????????????? * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.OperationHistoryResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ OperationHistoryResponse operationHistory(String accessToken) throws IOException, InvalidTokenException, InsufficientScopeException; OperationHistoryResponse operationHistory(String accessToken, Integer startRecord) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ????? ?????????? ?????????????? ???????? ???????? (?????????? ??? ?????????) * ? ????????????? ??????. ??????? ???????? ?????????? ? ???????? ???????????????? * ????????. ???????? ?????????? ???? ?????????????? ???????????? (???????????? ???????????). * ????????? ????? ??????: operation-history. * * @param accessToken ????? ??????????? ????????????? * @param startRecord ??????? ?? ??????? ???????? ????? * @param records ??????????? ???????? * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.OperationHistoryResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ OperationHistoryResponse operationHistory(String accessToken, Integer startRecord, Integer records) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ????? ?????????? ????????? ?????????? ?? ???????? ?? ????????. * * @param accessToken ????? ??????????? ????????????? * @param operationId ????????????? ????????. ???????? ????????? ??????????????? * ???? ???????? ????? operationId ?????? ?????? operationHistory, ????, ? * ??????? ????? ??????????????? ????????? ?????? ???????????, ???????? ????? * paymentId ?????? ?????? processPayment. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.OperationHistoryResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ OperationDetailResponse operationDetail(String accessToken, String operationId) throws IOException, InvalidTokenException, InsufficientScopeException; /** * @param accessToken ????? ??????????? ????????????? * @param startRecord ??????? ?? ??????? ???????? ????? * @param records ??????????? ???????? * @param operationsType ???? ???????? ("payment" ?/??? "deposition") * @param fetchDetails ????????? ?? ?????? ???????? (?? ????????? - false) * ????? ????? true, ?? ????? ?????? ???????? ????????? ?? ?? ?????, ??? ? operation-details. * ???? ??????????? ?????? ?? ????????? ???????, ????? ?????? ???????? * ? ?????? operation-history ? ?????? operation-details * @param from ????, ?? ??????? ???????? ?????????? ?????? ???????? * @param till ????, ?? ??????? ???????? ?????????? ?????? ???????? * @param label ????? ??????? * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.OperationHistoryResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ??.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ OperationHistoryResponse operationHistory(String accessToken, Integer startRecord, Integer records, Set<OperationHistoryType> operationsType, Boolean fetchDetails, Date from, Date till, String label) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ??????? ???????? ???????????? ?? ????????? ???????? ?????????????, ??????????? ?? ???????????? ??????. * ??????? ????? ?????? operation-details * * @param accessToken ????? ??????????? ????????????? * @param label ?????, ?? ??????? ?????????????? ????????? ??????? * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. */ FundraisingStatsResponse fundraisingStats(String accessToken, String label) throws IOException, InvalidTokenException, InsufficientScopeException; /** * <p>??????? p2p ???????? ??????? ????????????.</p> * <b>????????</b>: ??????? ?? ????? ?????????????, ??? ????? ????????????? ? ??????????, * ??????????. ?.?. ??????? ????? ?????? ???????? ???????. * * @param accessToken ????? ??????????? ????????????? * @param to ????? ?????? ??????????? ??????? (????? ???????.?????) * @param amount ?????? ????????. ?????????????? ?????? ?????? ?? ?????????????? ??????, * ??? ????? ?????? ?????. * @param comment ???????? ???????, ?????????????? ?????? ? ???????? ???????? * ????????????. * @param message ?????????? ?????????? ???????. @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentP2P(String accessToken, String to, BigDecimal amount, String comment, String message) throws IOException, InvalidTokenException, InsufficientScopeException; /** * <p>??????? p2p ???????? ??????? ????????????.</p> * <b>????????</b>: ??????? ?? ????? ?????????????, ??? ????? ????????????? ? ??????????, * ??????????. ?.?. ??????? ????? ?????? ???????? ???????. * * @param accessToken ????? ??????????? ????????????? * @param to ????????????? ??????????? ??????? (????? ???????.?????) * @param identifierType ??? ????????? ??????????? ??????? (?????? ?? ?????? ????????, ?? e-mail ??? ?? ?????? ??????) * @param amount ?????? ????????. ?????????????? ?????? ?????? ?? ?????????????? ??????, * ??? ????? ?????? ?????. * @param comment ???????? ???????, ?????????????? ?????? ? ???????? ???????? * ????????????. * @param message ?????????? ?????????? ???????. @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @param label ????? ??????? (?????????? ??????? ?? 64 ?????????) ????? ??????????????. * ?????? ???????? ???????? ?????????? ???????? ???? ??????? ????????????? ?? ????????? ?????. * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentP2P(String accessToken, String to, IdentifierType identifierType, BigDecimal amount, String comment, String message, String label) throws IOException, InvalidTokenException, InsufficientScopeException; /** * <p>??????? p2p ???????? ??????? ????????????.</p> * <p><b>????????</b>: ?????????? ? ????????? amountDue ?????? ????? ?????????? ?? ????? ???????????. ? ???????????? * ????? ??????? ???????? ??????, ?? ?????? ??????????.</p> * <p/> * <p><b>????????</b>: ??????? ?? ????? ?????????????, ??? ????? ????????????? ? ??????????, * ??????????. ?.?. ??????? ????? ?????? ???????? ???????.</p> * * @param accessToken ????? ??????????? ????????????? * @param to ????????????? ??????????? ??????? (????? ???????.?????) * @param identifierType ??? ????????? ??????????? ??????? (?????? ?? ?????? ????????, ?? e-mail ??? ?? ?????? ??????) * @param amountDue ?????? ????????. ?????????????? ?????? ?????? ?? ?????????????? ??????, * ??? ????? ?????? ?????. * @param comment ???????? ???????, ?????????????? ?????? ? ???????? ???????? * ????????????. * @param message ?????????? ?????????? ???????. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentP2PDue(String accessToken, String to, IdentifierType identifierType, BigDecimal amountDue, String comment, String message, String label) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ??????? ?????? ? ???????. * * @param accessToken ????? ??????????? ????????????? * @param patternId ????????????? ??????? ??????? * @param params ????????????????? ????????? ??????? ???????, ????????? * ?????????. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentShop(String accessToken, String patternId, Map<String, String> params) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ??????? ?????? ? ???????. * * @param accessToken ????? ??????????? ????????????? * @param patternId ????????????? ??????? ??????? * @param params ????????????????? ????????? ??????? ???????, ????????? * ?????????. * @param showContractDetails ?????????? ?? ?????????????? ???????? ?????????, * ??????? ????? ???? ????????? ????????? * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentShop(String accessToken, String patternId, Map<String, String> params, boolean showContractDetails) throws IOException, InvalidTokenException, InsufficientScopeException; /** * ??????? ?? ?????????? ?????? ?????????? ????????. * ???????.?????? ?????????? ????????? ?? ?????? ???????? * * @param accessToken ????? ??????????? ????????????? * @param phone ????????????? ??????? ??????? * @param amount ????????????????? ????????? ??????? ???????, ????????? * ?????????. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.RequestPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ RequestPaymentResponse requestPaymentToPhone(String accessToken, String phone, BigDecimal amount) throws InsufficientScopeException, InvalidTokenException, IOException; /** * ????? ?????????????? ??????? ?? ??????? ?? ???????????? ?????. * * @param accessToken ????? ??????????? ????????????? * @param requestId ????????????? ???????? (requestId), ?????????? ?? * ??????? ??????? requestPayment*. * @param csc Card Security Code, CVV2/CVC2-??? ???????????? * ??????????? ????? ?????????????. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.ProcessPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ ProcessPaymentResponse processPaymentByCard(String accessToken, String requestId, String csc) throws IOException, InsufficientScopeException, InvalidTokenException; /** * ????? ?????????????? ??????? c ??????? ?? ???????? ?????????????. * * @param accessToken ????? ??????????? ????????????? * @param requestId ????????????? ???????? (requestId), ?????????? ?? * ??????? ??????? requestPayment*. * @return ?????????? ??????????? ???????? {@link ru.yandex.money.api.response.ProcessPaymentResponse} * @throws java.io.IOException ?????? ??????? ?? ????????? ???????.????? * @throws ru.yandex.money.api.InsufficientScopeException * ????????? ?????????, ?? ??????? ? * ?????? ??? ????. * @throws ru.yandex.money.api.InvalidTokenException * ?????? ????????????????, ?????????????, ??? ?????????? ?????. * @throws ru.yandex.money.api.InternalServerErrorException * ????????????? ?????? ???????? ???????.????? */ ProcessPaymentResponse processPaymentByWallet(String accessToken, String requestId) throws IOException, InsufficientScopeException, InvalidTokenException; }