Class Accounts
- java.lang.Object
-
- pl.gsmservice.gateway.Accounts
-
public class Accounts extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncAccountsasync()Switches to the async SDK.GetAccountDetailsRequestBuilderget()Get account detailsGetAccountDetailsResponseget(java.util.Optional<Options> options)Get account detailsGetAccountDetailsResponsegetDirect()Get account detailsGetSubaccountDetailsRequestBuildergetSubaccount()Get subaccount detailsGetSubaccountDetailsResponsegetSubaccount(java.lang.String userLogin)Get subaccount detailsGetSubaccountDetailsResponsegetSubaccount(java.lang.String userLogin, java.util.Optional<Options> options)Get subaccount details
-
-
-
Method Detail
-
async
public AsyncAccounts async()
Switches to the async SDK.- Returns:
- The async SDK
-
get
public GetAccountDetailsRequestBuilder get()
Get account details
Get current account balance and other details of your account. You can check also account limit and if account is main one. Main accounts have unlimited privileges and using User Panel you can create as many subaccounts as you need.
This method doesn't take any parameters. As a successful result a details of current account you are logged in using an API Access Token will be returned.- Returns:
- The call builder
-
getDirect
public GetAccountDetailsResponse getDirect() throws java.lang.Exception
Get account details
Get current account balance and other details of your account. You can check also account limit and if account is main one. Main accounts have unlimited privileges and using User Panel you can create as many subaccounts as you need.
This method doesn't take any parameters. As a successful result a details of current account you are logged in using an API Access Token will be returned.- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
get
public GetAccountDetailsResponse get(java.util.Optional<Options> options) throws java.lang.Exception
Get account details
Get current account balance and other details of your account. You can check also account limit and if account is main one. Main accounts have unlimited privileges and using User Panel you can create as many subaccounts as you need.
This method doesn't take any parameters. As a successful result a details of current account you are logged in using an API Access Token will be returned.- Parameters:
options- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
getSubaccount
public GetSubaccountDetailsRequestBuilder getSubaccount()
Get subaccount details
Check account balance and other details such subcredit balance of a subaccount. Subaccounts are additional users who can access your account services and the details. You can restrict access level and setup privileges to subaccounts using User Panel.
You should pass the subaccount user login to access its data. Please use builder style:
GetSubaccountDetailsResponse res = sdk.accounts().getSubaccount() .userLogin("some-login") .call();
As a successful result the details of subaccount with provided login will be returned.- Returns:
- The call builder
-
getSubaccount
public GetSubaccountDetailsResponse getSubaccount(java.lang.String userLogin) throws java.lang.Exception
Get subaccount details
Check account balance and other details such subcredit balance of a subaccount. Subaccounts are additional users who can access your account services and the details. You can restrict access level and setup privileges to subaccounts using User Panel.
You should pass the subaccount user login to access its data. Please use builder style:
GetSubaccountDetailsResponse res = sdk.accounts().getSubaccount() .userLogin("some-login") .call();
As a successful result the details of subaccount with provided login will be returned.- Parameters:
userLogin- Login of the subaccount (user) to get the data for- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
getSubaccount
public GetSubaccountDetailsResponse getSubaccount(java.lang.String userLogin, java.util.Optional<Options> options) throws java.lang.Exception
Get subaccount details
Check account balance and other details such subcredit balance of a subaccount. Subaccounts are additional users who can access your account services and the details. You can restrict access level and setup privileges to subaccounts using User Panel.
You should pass the subaccount user login to access its data. Please use builder style:
GetSubaccountDetailsResponse res = sdk.accounts().getSubaccount() .userLogin("some-login") .call();
As a successful result the details of subaccount with provided login will be returned.- Parameters:
userLogin- Login of the subaccount (user) to get the data foroptions- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
-