Search in sources :

Example 31 with Call

use of com.squareup.okhttp.Call in project paypayopa-sdk-java by paypay.

the class CashbackApi method createCashbackRequestWithHttpInfo.

/**
 * Give Cashback to User
 * Transfer money from merchants campaign wallet to user wallet.  **Timeout: 30s**
 *
 * @param cashback Cashback
 * @return ApiResponse<CashbackDetails>
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<CashbackDetails> createCashbackRequestWithHttpInfo(Cashback cashback) throws ApiException {
    Call call = ApiUtil.postCallObject(apiClient, "/v2/cashback", cashback, null);
    Type localVarReturnType = new TypeToken<CashbackDetails>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.CREATE_CASHBACK_REQUEST);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) ReverseCashbackDetails(jp.ne.paypay.model.ReverseCashbackDetails) CashbackDetails(jp.ne.paypay.model.CashbackDetails)

Example 32 with Call

use of com.squareup.okhttp.Call in project paypayopa-sdk-java by paypay.

the class CashbackApi method createReverseCashbackRequestWithHttpInfo.

/**
 * Reverse a given cashback
 * Transfer money back from user wallet to merchants campaign wallet.  **Timeout: 30s**
 *
 * @param reverseCashback ReverseCashback
 * @return ApiResponse&lt;ReverseCashbackDetails&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<ReverseCashbackDetails> createReverseCashbackRequestWithHttpInfo(ReverseCashback reverseCashback) throws ApiException {
    Call call = ApiUtil.postCallObject(apiClient, "/v2/cashback_reversal", reverseCashback, null);
    Type localVarReturnType = new TypeToken<ReverseCashbackDetails>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.CREATE_REVERSE_CASHBACK_REQUEST);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) ReverseCashbackDetails(jp.ne.paypay.model.ReverseCashbackDetails)

Example 33 with Call

use of com.squareup.okhttp.Call in project paypayopa-sdk-java by paypay.

the class CashbackApi method getReversedCashbackDetailsWithHttpInfo.

/**
 * Check Cashback Reversal Details
 * Check the cashback reversal details of the cashback reversed  **Timeout: 15s**
 *
 * @param merchantCashbackReversalId (required)
 * @param merchantCashbackId (required)
 * @return ApiResponse&lt;ReverseCashbackDetails&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<ReverseCashbackDetails> getReversedCashbackDetailsWithHttpInfo(String merchantCashbackReversalId, String merchantCashbackId) throws ApiException {
    if (StringUtils.isEmpty(merchantCashbackReversalId)) {
        throw new IllegalArgumentException("Missing the required parameter merchantCashbackReversalId");
    }
    Call call = ApiUtil.getCallObject(apiClient, "/v2/cashback_reversal/" + apiClient.escapeString(merchantCashbackReversalId) + "/{merchantCashbackId}", new Pair(ApiConstants.MERCHANT_CASHBACK_ID, merchantCashbackId), "GET");
    Type localVarReturnType = new TypeToken<ReverseCashbackDetails>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.GET_REVERSED_CASHBACK_DETAILS);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) ReverseCashbackDetails(jp.ne.paypay.model.ReverseCashbackDetails) Pair(jp.ne.paypay.Pair)

Example 34 with Call

use of com.squareup.okhttp.Call in project paypayopa-sdk-java by paypay.

the class PaymentApi method refundPaymentWithHttpInfo.

/**
 * Refund a payment
 * Refund a payment.  **Timeout: 30s**
 *
 * @param body Refund (optional)
 * @return ApiResponse&lt;RefundDetails&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<RefundDetails> refundPaymentWithHttpInfo(Object body) throws ApiException {
    Call call = refundPaymentValidateBeforeCall(body);
    Type localVarReturnType = new TypeToken<RefundDetails>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.REFUND_PAYMENT);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) RefundDetails(jp.ne.paypay.model.RefundDetails)

Example 35 with Call

use of com.squareup.okhttp.Call in project paypayopa-sdk-java by paypay.

the class PaymentApi method createAccountLinkQRCodeWithHttpInfo.

/**
 * Create an Account Link QRCode
 * Create an ACCOUNT LINK QR and display it to the user.  **Timeout: 10s**
 *
 * @param body Account Link Code Creation
 * @return ApiResponse&lt;LinkQRCodeResponse&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<LinkQRCodeResponse> createAccountLinkQRCodeWithHttpInfo(Object body) throws ApiException {
    Call call = createAccountLinkQrCodeCall(body);
    Type localVarReturnType = new TypeToken<LinkQRCodeResponse>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.CREATE_QR_SESSION);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) LinkQRCodeResponse(jp.ne.paypay.model.LinkQRCodeResponse)

Aggregations

Call (com.squareup.okhttp.Call)46 Type (java.lang.reflect.Type)28 Request (com.squareup.okhttp.Request)13 Response (com.squareup.okhttp.Response)13 OkHttpClient (com.squareup.okhttp.OkHttpClient)9 PaymentDetails (jp.ne.paypay.model.PaymentDetails)8 RequestBody (com.squareup.okhttp.RequestBody)5 IOException (java.io.IOException)5 HttpUrl (com.squareup.okhttp.HttpUrl)4 HashMap (java.util.HashMap)4 ReverseCashbackDetails (jp.ne.paypay.model.ReverseCashbackDetails)4 TypeToken (com.google.gson.reflect.TypeToken)3 NotDataResponse (jp.ne.paypay.model.NotDataResponse)3 Base64 (org.apache.commons.codec.binary.Base64)3 Pair (jp.ne.paypay.Pair)2 Request (com.android.volley.Request)1 ApiCommand (com.cloudera.api.swagger.model.ApiCommand)1 ApiCommandList (com.cloudera.api.swagger.model.ApiCommandList)1 ApiHost (com.cloudera.api.swagger.model.ApiHost)1 ApiHostList (com.cloudera.api.swagger.model.ApiHostList)1