Search in sources :

Example 1 with CashbackApi

use of jp.ne.paypay.api.CashbackApi in project paypayopa-sdk-java by paypay.

the class CashbackApiExample method main.

public static void main(String[] args) throws ApiException {
    ApiClient apiClient = new Configuration().getDefaultApiClient();
    apiClient.setProductionMode(false);
    apiClient.setApiKey("API_KEY");
    apiClient.setApiSecretKey("API_SECRET_KEY");
    apiClient.setAssumeMerchant("YOUR_MERCHANT_ID");
    String userAuthorizationId = "USER_AUTHORIZATION_ID";
    CashbackApi cashbackApi = new CashbackApi(apiClient);
    CashbackDetails cashbackDetails = giveCashback(cashbackApi, userAuthorizationId, 1);
    if (cashbackDetails != null && cashbackDetails.getData() != null) {
        reverseCashback(cashbackApi, cashbackDetails.getData().getMerchantCashbackId(), 1);
    }
}
Also used : Configuration(jp.ne.paypay.Configuration) CashbackApi(jp.ne.paypay.api.CashbackApi) CashbackDetails(jp.ne.paypay.model.CashbackDetails) ReverseCashbackDetails(jp.ne.paypay.model.ReverseCashbackDetails) ApiClient(jp.ne.paypay.ApiClient)

Aggregations

ApiClient (jp.ne.paypay.ApiClient)1 Configuration (jp.ne.paypay.Configuration)1 CashbackApi (jp.ne.paypay.api.CashbackApi)1 CashbackDetails (jp.ne.paypay.model.CashbackDetails)1 ReverseCashbackDetails (jp.ne.paypay.model.ReverseCashbackDetails)1