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.rights; // www.ja v a 2 s .c o m /** * ???????? ?????????? ??????? ??????????? ???????: ?? ?????????? ?????? ??? ?? * ???????????? ??????????? ????? * @author dvmelnikov */ public class MoneySource implements Permission { private static final String WALLET = "wallet"; private static final String CARD = "card"; private boolean wallet; private boolean card; /** * ???????? ????? money-source * @param wallet ?????????? ?? ?????? ?? ???????? ?????? * @param card ?????????? ?? ?????? ?? ???????????? ??????????? ????? */ public MoneySource(boolean wallet, boolean card) { this.wallet = wallet; this.card = card; } public String value() { if (!wallet && !card) { throw new IllegalArgumentException("money-source expected"); } String params; if (wallet && card) params = WALLET + "\",\"" + CARD; else { params = card ? CARD : WALLET; } return "money-source(\"" + params + "\")"; } }