Class BaseService

java.lang.Object
dev.resms.core.service.BaseService
Direct Known Subclasses:
Otp, Sms

public abstract class BaseService extends Object
An abstract base class for service implementations, providing common functionality such as HTTP client, authentication provider, and mapper initialization.
  • Field Details

    • apiKey

      protected final String apiKey
      Apikey used for authenticating requests.
    • httpClient

      protected final IHttpClient httpClient
      HTTP client for making HTTP requests.
    • reSMSMapper

      protected final ReSMSMapper reSMSMapper
      Mapper responsible for mapping data between different representations.
  • Constructor Details

    • BaseService

      protected BaseService(String apiKey)
      Constructs a BaseService instance with the specified authentication provider, default HTTP client, and mapper.
      Parameters:
      apiKey - The apiKey to use.