Package vn.payos
Class PayOSAsync
java.lang.Object
vn.payos.core.Client
vn.payos.PayOSAsync
payOS async client
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPayOSAsync(@NonNull String clientId, @NonNull String apiKey, @NonNull String checksumKey) payOS async clientPayOSAsync(@NonNull String clientId, @NonNull String apiKey, @NonNull String checksumKey, String partnerCode) payOS async clientPayOSAsync(@NonNull ClientOptions options) payOS async client -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close<TResp,TReq>
CompletableFuture<TResp>deleteAsync(String path, Class<TResp> dataClass) Make DELETE request<TResp,TReq>
CompletableFuture<TResp>deleteAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make DELETE requestdownloadFileAsync(FinalRequestOptions<TReq> reqOpts) Download filestatic PayOSAsyncfromEnv()payOS async client<TResp> CompletableFuture<TResp>Make GET request<TResp> CompletableFuture<TResp>getAsync(String path, Class<TResp> dataClass, RequestOptions<Void> options) Make GET request<TResp,TReq>
CompletableFuture<TResp>patchAsync(String path, Class<TResp> dataClass) Make PATCH request<TResp,TReq>
CompletableFuture<TResp>patchAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make PATCH requestPaymentRequestsServicepayouts()PayoutsServicePayoutsAccountService<TResp,TReq>
CompletableFuture<TResp>Make POST request<TResp,TReq>
CompletableFuture<TResp>postAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make POST request<TResp,TReq>
CompletableFuture<TResp>Make PUT request<TResp,TReq>
CompletableFuture<TResp>putAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make PUT request<TResp,TReq>
CompletableFuture<TResp>requestAsync(FinalRequestOptions<TReq> options, Class<TResp> dataClass) Make requestsync()payOS clientwebhooks()WebhooksServiceMethods inherited from class vn.payos.core.Client
applySignatureHeaders, buildBody, buildHeaders, buildRequest, buildUrl, computeBackoffMs, computeRetryDelayMs, createAPIException, getCrypto, getUserAgent, parseJson, processFileDownloadResponse, processRequestBodyWithSignature, processResponse, shouldRetry, sleep, validateResponseSignature
-
Constructor Details
-
PayOSAsync
public PayOSAsync(@NonNull @NonNull String clientId, @NonNull @NonNull String apiKey, @NonNull @NonNull String checksumKey) payOS async client- Parameters:
clientId- client idapiKey- api keychecksumKey- checksum key
-
PayOSAsync
public PayOSAsync(@NonNull @NonNull String clientId, @NonNull @NonNull String apiKey, @NonNull @NonNull String checksumKey, String partnerCode) payOS async client- Parameters:
clientId- client idapiKey- api keychecksumKey- checksum keypartnerCode- partner code
-
PayOSAsync
payOS async client- Parameters:
options- options
-
-
Method Details
-
fromEnv
payOS async client- Returns:
- payOS async client
-
sync
payOS client- Returns:
- payOS client
-
requestAsync
public <TResp,TReq> CompletableFuture<TResp> requestAsync(FinalRequestOptions<TReq> options, Class<TResp> dataClass) Make request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
options- optionsdataClass- response data class- Returns:
- response
-
getAsync
public <TResp> CompletableFuture<TResp> getAsync(String path, Class<TResp> dataClass, RequestOptions<Void> options) Make GET request- Type Parameters:
TResp- response body type- Parameters:
path- pathdataClass- response data classoptions- options- Returns:
- response
-
getAsync
Make GET request- Type Parameters:
TResp- response body type- Parameters:
path- pathdataClass- response data class- Returns:
- response
-
postAsync
public <TResp,TReq> CompletableFuture<TResp> postAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make POST request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data classoptions- options- Returns:
- response
-
postAsync
Make POST request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data class- Returns:
- response
-
putAsync
public <TResp,TReq> CompletableFuture<TResp> putAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make PUT request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data classoptions- options- Returns:
- response
-
putAsync
Make PUT request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data class- Returns:
- response
-
patchAsync
public <TResp,TReq> CompletableFuture<TResp> patchAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make PATCH request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data classoptions- options- Returns:
- response
-
patchAsync
Make PATCH request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data class- Returns:
- response
-
deleteAsync
public <TResp,TReq> CompletableFuture<TResp> deleteAsync(String path, Class<TResp> dataClass, RequestOptions<TReq> options) Make DELETE request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data classoptions- options- Returns:
- response
-
deleteAsync
Make DELETE request- Type Parameters:
TResp- response body typeTReq- request body type- Parameters:
path- pathdataClass- response data class- Returns:
- response
-
downloadFileAsync
public <TReq> CompletableFuture<FileDownloadResponse> downloadFileAsync(FinalRequestOptions<TReq> reqOpts) Download file- Type Parameters:
TReq- request body type- Parameters:
reqOpts- options- Returns:
- File information
-
close
public void close()Close -
paymentRequests
PaymentRequestsService- Returns:
- PaymentRequestsService
-
webhooks
WebhooksService- Returns:
- WebhooksService
-
payouts
PayoutsService- Returns:
- PayoutsService
-
payoutsAccount
PayoutsAccountService- Returns:
- PayoutsAccountService
-