All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.numbers.models.requests.RentSMSConfigurationRequestParameters Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.sinch.sdk.domains.numbers.models.requests;

import com.sinch.sdk.core.models.OptionalValue;

/**
 * SMS configuration parameters request to rent a number
 *
 * @since 1.0
 */
public class RentSMSConfigurationRequestParameters {
  private final OptionalValue servicePlanId;
  private final OptionalValue campaignId;

  private RentSMSConfigurationRequestParameters(
      OptionalValue servicePlanId, OptionalValue campaignId) {
    this.servicePlanId = servicePlanId;
    this.campaignId = campaignId;
  }

  public OptionalValue getServicePlanId() {
    return servicePlanId;
  }

  public OptionalValue getCampaignId() {
    return this.campaignId;
  }

  public static Builder builder() {
    return new Builder();
  }

  public static class Builder {
    OptionalValue servicePlanId = OptionalValue.empty();
    OptionalValue campaignId = OptionalValue.empty();

    private Builder() {}

    /**
     * @param servicePlanId The servicePlanId can be found in the Sinch Customer Dashboard. The
     *     service plan ID is what ties this number to the configured SMS service.
     * @return current builder
     */
    public Builder setServicePlanId(String servicePlanId) {
      this.servicePlanId = OptionalValue.of(servicePlanId);
      return this;
    }

    /**
     * @param campaignId Only for US phone numbers. This campaignId is required to send SMS traffic
     *     to US; click here to read more about 10DLC A2P messaging. So, it is the current campaign
     *     ID for this number. The campaignId is found on your TCR platform.
     */
    public Builder setCampaignId(String campaignId) {
      this.campaignId = OptionalValue.of(campaignId);
      return this;
    }

    public RentSMSConfigurationRequestParameters build() {
      return new RentSMSConfigurationRequestParameters(servicePlanId, campaignId);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy