コード例 #1
0
  /**
   * Constructor.
   *
   * @param number phone number
   * @param amount top up amount
   */
  public PhoneParams(String number, BigDecimal amount) {
    if (Strings.isNullOrEmpty(number))
      throw new IllegalArgumentException(PARAM_PHONE_NUMBER + " is null or empty");
    this.number = number;

    if (amount == null) throw new IllegalArgumentException(PARAM_AMOUNT + " is null or empty");
    this.amount = amount;
  }
コード例 #2
0
 /**
  * Constructor.
  *
  * <p>If {@code platform} parameter is null or empty default value will be used. No exception will
  * be thrown.
  *
  * @param clientId client id to use
  * @param debugLogging {@code true} if logging is required
  * @param platform the name of a platform client is running on
  */
 public DefaultApiClient(String clientId, boolean debugLogging, String platform) {
   this(clientId, debugLogging);
   if (!Strings.isNullOrEmpty(platform)) {
     this.platform = platform;
   }
 }
コード例 #3
0
 /**
  * Construct request using provided client ID.
  *
  * @param clientId client id of the application
  */
 public Request(String clientId) {
   if (Strings.isNullOrEmpty(clientId))
     throw new IllegalArgumentException("clientId is null or empty");
   this.clientId = clientId;
 }