com.sponsorpay.sdk.android.publisher.currency
Interface SPCurrencyServerListener

All Known Implementing Classes:
VirtualCurrencyConnector

public interface SPCurrencyServerListener

Interface to be implemented by parties interested in the results of requests to the SponsorPay Virtual Currency Server.


Method Summary
 void onSPCurrencyDeltaReceived(CurrencyServerDeltaOfCoinsResponse response)
          Called when a response containing the currency delta for a given user has been answered by the SponsorPay's Virtual Currency Server.
 void onSPCurrencyServerError(CurrencyServerAbstractResponse response)
          Called when a request to SponsorPay's Virtual Currency Server resulted in an error.
 

Method Detail

onSPCurrencyServerError

void onSPCurrencyServerError(CurrencyServerAbstractResponse response)
Called when a request to SponsorPay's Virtual Currency Server resulted in an error.

Parameters:
response - Instance implementing the CurrencyServerAbstractResponse.getErrorType(), CurrencyServerAbstractResponse.getErrorCode(), CurrencyServerAbstractResponse.getErrorMessage() and methods.

onSPCurrencyDeltaReceived

void onSPCurrencyDeltaReceived(CurrencyServerDeltaOfCoinsResponse response)
Called when a response containing the currency delta for a given user has been answered by the SponsorPay's Virtual Currency Server. Having this method invoked on your callback means that the request has been successful and the response contains valid data.

Parameters:
response - A response instance that implements the CurrencyServerDeltaOfCoinsResponse.getDeltaOfCoins() and CurrencyServerDeltaOfCoinsResponse.getLatestTransactionId() methods.