code: protected HttpUrl buildUrl(Endpoint endpoint, String path, String... segments) {
          Preconditions.checkNotNull(endpoint);
          Preconditions.checkNotNull(path);
  
          HttpUrl.Builder builder = endpoint.buildUrl()
                  .addPathSegment(path);
  
          for (String segment : segments) {
              if (segment == null || segment.isEmpty()) {
                  continue;
              }
  
              builder = builder.addPathSegment(segment);
          }
  
          return builder.build();
      }
docs: Builds and returns a valid {@link HttpUrl} pointing to the given {@link Endpoint}'s host
  and with all the supplied segments concatenated.
  
  @param endpoint The Omise API {@link Endpoint} to point to.
  @param path     The base API path.
  @param segments Additional URL path segments that should be appended.
  @return An {@link HttpUrl} instance.