Class SmsClient

java.lang.Object
com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient
com.sap.cds.feature.mt.SmsClient

public class SmsClient extends com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient
Implementation of the SMS REST client.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient

    mapper
  • Constructor Summary

    Constructors
    Constructor
    Description
    SmsClient(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    callBackSms(SmsCallback payload, String callbackUrl)
     
    static Optional<com.sap.cloud.environment.servicebinding.api.ServiceBinding>
    findBinding(com.sap.cds.services.runtime.CdsRuntime runtime)
     
    List<com.sap.cds.services.mt.TenantInfo>
    Retrieves the tenant info of all subscribed tenants
    List<com.sap.cds.services.mt.TenantInfo>
    getSubscribedTenants(UnaryOperator<com.sap.cds.services.mt.TenantInfo> filter)
    Retrieves the tenant info of all subscribed tenants
    static com.sap.cds.services.mt.TenantInfo
     

    Methods inherited from class com.sap.cds.integration.cloudsdk.rest.client.JsonRestClient

    deleteRequest, getRequest, getRequestWithOnlyResponseCode, patchRequestWithOnlyResponseCode, postRequest, postRequest, putRequest, putRequestWithOnlyResponseCode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SmsClient

      public SmsClient(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding)
  • Method Details

    • findBinding

      public static Optional<com.sap.cloud.environment.servicebinding.api.ServiceBinding> findBinding(com.sap.cds.services.runtime.CdsRuntime runtime)
    • toTenantInfo

      public static com.sap.cds.services.mt.TenantInfo toTenantInfo(Map<String,Object> tenant)
    • callBackSms

      public void callBackSms(SmsCallback payload, String callbackUrl) throws IOException
      Throws:
      IOException
    • getSubscribedTenants

      public List<com.sap.cds.services.mt.TenantInfo> getSubscribedTenants(UnaryOperator<com.sap.cds.services.mt.TenantInfo> filter) throws IOException
      Retrieves the tenant info of all subscribed tenants
      Parameters:
      filter - function to filter the tenants
      Returns:
      tenants info
      Throws:
      IOException - throws when any connection problems occur
    • getSubscribedTenants

      public List<com.sap.cds.services.mt.TenantInfo> getSubscribedTenants() throws IOException
      Retrieves the tenant info of all subscribed tenants
      Returns:
      tenants info
      Throws:
      IOException - throws when any connection problems occur