Search in sources :

Example 6 with Call

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

the class PaymentApi method cancelPaymentWithHttpInfo.

/**
 * Cancel a payment
 * This api is used in case, while creating a payment, the client can not determine the status of the payment. For example, client get timeout or the response cannot contain the information to indicate the exact payment status.  By calling this api, if accepted, the OPA will guarantee the money eventually goes back to user's account.  </br><b style=\"color:red\">Note:</b> The Cancel API can be used until 00:14:59 AM the day after the Payment has happened. </br>For 00:15 AM or later, please call the refund API to refund the payment.  **Timeout: 15s**
 *
 * @param merchantPaymentId (required)
 * @return ApiResponse<NotDataResponse>
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<NotDataResponse> cancelPaymentWithHttpInfo(String merchantPaymentId) throws ApiException {
    Call call = cancelPaymentValidateBeforeCall(merchantPaymentId);
    Type localVarReturnType = new TypeToken<NotDataResponse>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.CANCEL_PAYMENT);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) NotDataResponse(jp.ne.paypay.model.NotDataResponse)

Example 7 with Call

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

the class PaymentApi method createPaymentWithHttpInfo.

/**
 * Create a payment
 * Create a direct debit payment and start the money transfer.  **Timeout: 30s**
 *
 * @param body                    Payment (optional)
 * @param agreeSimilarTransaction (Optional) If the parameter is set to \&quot;true\&quot;, the payment duplication check will be bypassed.  (optional)
 * @return ApiResponse&lt;PaymentDetails&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<PaymentDetails> createPaymentWithHttpInfo(Object body, String agreeSimilarTransaction) throws ApiException {
    Call call = createPaymentValidateBeforeCall(body, agreeSimilarTransaction);
    Type localVarReturnType = new TypeToken<PaymentDetails>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.CREATE_PAYMENT);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) PaymentDetails(jp.ne.paypay.model.PaymentDetails)

Example 8 with Call

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

the class PaymentApi method deleteQRCodeWithHttpInfo.

/**
 * Delete a Code
 * Delete a created Code.  **Timeout: 15s**
 *
 * @param codeId (required)
 * @return ApiResponse&lt;NotDataResponse&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<NotDataResponse> deleteQRCodeWithHttpInfo(String codeId) throws ApiException {
    Call call = deleteQRCodeValidateBeforeCall(codeId);
    Type localVarReturnType = new TypeToken<NotDataResponse>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.DELETE_QRCODE);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) NotDataResponse(jp.ne.paypay.model.NotDataResponse)

Example 9 with Call

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

the class PaymentApi method revertAuthWithHttpInfo.

/**
 * Revert a payment authorization
 * This api is used in case, the merchant wants to cancel the payment authorization because of cancellation of the order by the user.  **Timeout: 30s**
 *
 * @param body Revert Authorized Order Request (optional)
 * @return ApiResponse&lt;RevertAuthResponse&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<RevertAuthResponse> revertAuthWithHttpInfo(Object body) throws ApiException {
    Call call = revertAuthValidateBeforeCall(body);
    Type localVarReturnType = new TypeToken<RevertAuthResponse>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.REVERT_AUTHORIZE);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) RevertAuthResponse(jp.ne.paypay.model.RevertAuthResponse)

Example 10 with Call

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

the class PaymentApi method createQRCodeWithHttpInfo.

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

Aggregations

Call (com.squareup.okhttp.Call)42 Type (java.lang.reflect.Type)28 Request (com.squareup.okhttp.Request)10 Response (com.squareup.okhttp.Response)10 PaymentDetails (jp.ne.paypay.model.PaymentDetails)8 OkHttpClient (com.squareup.okhttp.OkHttpClient)6 HttpUrl (com.squareup.okhttp.HttpUrl)4 HashMap (java.util.HashMap)4 NotDataResponse (jp.ne.paypay.model.NotDataResponse)4 ReverseCashbackDetails (jp.ne.paypay.model.ReverseCashbackDetails)4 TypeToken (com.google.gson.reflect.TypeToken)3 RequestBody (com.squareup.okhttp.RequestBody)3 IOException (java.io.IOException)2 Pair (jp.ne.paypay.Pair)2 CashbackDetails (jp.ne.paypay.model.CashbackDetails)2 RefundDetails (jp.ne.paypay.model.RefundDetails)2 Request (com.android.volley.Request)1 BaseProducerContextCallbacks (com.facebook.imagepipeline.producers.BaseProducerContextCallbacks)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 YAMLFactory (com.fasterxml.jackson.dataformat.yaml.YAMLFactory)1