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

com.yandex.money.api.net.MethodRequest Maven / Gradle / Ivy

Go to download

This Java library contains classes that allows you to do payments using Yandex.Money public API.

The newest version!
package com.yandex.money.api.net;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * API methods implement this interface.
 *
 * @param  response
 */
public interface MethodRequest {

    /**
     * Builds URL with using specified hosts provider
     *
     * @param hostsProvider hosts provider
     * @return complete URL
     * @throws MalformedURLException if URL is malformed
     */
    URL requestURL(HostsProvider hostsProvider) throws MalformedURLException;

    /**
     * Parses API response from stream.
     *
     * @param inputStream input stream
     * @return response
     */
    T parseResponse(InputStream inputStream);

    /**
     * Builds post parameters to use when posting a request. Can be null.
     *
     * @return buffer of parameters
     */
    PostRequestBodyBuffer buildParameters() throws IOException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy