Package vn.payos

Class PayOSAsync


public class PayOSAsync extends Client
payOS async client
  • Constructor Details

    • PayOSAsync

      public PayOSAsync(@NonNull @NonNull String clientId, @NonNull @NonNull String apiKey, @NonNull @NonNull String checksumKey)
      payOS async client
      Parameters:
      clientId - client id
      apiKey - api key
      checksumKey - 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 id
      apiKey - api key
      checksumKey - checksum key
      partnerCode - partner code
    • PayOSAsync

      public PayOSAsync(@NonNull @NonNull ClientOptions options)
      payOS async client
      Parameters:
      options - options
  • Method Details

    • fromEnv

      public static PayOSAsync fromEnv()
      payOS async client
      Returns:
      payOS async client
    • sync

      public PayOS 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 type
      TReq - request body type
      Parameters:
      options - options
      dataClass - 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 - path
      dataClass - response data class
      options - options
      Returns:
      response
    • getAsync

      public <TResp> CompletableFuture<TResp> getAsync(String path, Class<TResp> dataClass)
      Make GET request
      Type Parameters:
      TResp - response body type
      Parameters:
      path - path
      dataClass - 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 type
      TReq - request body type
      Parameters:
      path - path
      dataClass - response data class
      options - options
      Returns:
      response
    • postAsync

      public <TResp, TReq> CompletableFuture<TResp> postAsync(String path, Class<TResp> dataClass)
      Make POST request
      Type Parameters:
      TResp - response body type
      TReq - request body type
      Parameters:
      path - path
      dataClass - 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 type
      TReq - request body type
      Parameters:
      path - path
      dataClass - response data class
      options - options
      Returns:
      response
    • putAsync

      public <TResp, TReq> CompletableFuture<TResp> putAsync(String path, Class<TResp> dataClass)
      Make PUT request
      Type Parameters:
      TResp - response body type
      TReq - request body type
      Parameters:
      path - path
      dataClass - 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 type
      TReq - request body type
      Parameters:
      path - path
      dataClass - response data class
      options - options
      Returns:
      response
    • patchAsync

      public <TResp, TReq> CompletableFuture<TResp> patchAsync(String path, Class<TResp> dataClass)
      Make PATCH request
      Type Parameters:
      TResp - response body type
      TReq - request body type
      Parameters:
      path - path
      dataClass - 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 type
      TReq - request body type
      Parameters:
      path - path
      dataClass - response data class
      options - options
      Returns:
      response
    • deleteAsync

      public <TResp, TReq> CompletableFuture<TResp> deleteAsync(String path, Class<TResp> dataClass)
      Make DELETE request
      Type Parameters:
      TResp - response body type
      TReq - request body type
      Parameters:
      path - path
      dataClass - 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

      public PaymentRequestsService paymentRequests()
      PaymentRequestsService
      Returns:
      PaymentRequestsService
    • webhooks

      public WebhooksService webhooks()
      WebhooksService
      Returns:
      WebhooksService
    • payouts

      public PayoutsService payouts()
      PayoutsService
      Returns:
      PayoutsService
    • payoutsAccount

      public PayoutsAccountService payoutsAccount()
      PayoutsAccountService
      Returns:
      PayoutsAccountService