Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/main/java/com/adyen/service/Payout.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.adyen.Client;
import com.adyen.Service;
import com.adyen.model.RequestOptions;
import com.adyen.model.payout.ConfirmThirdPartyRequest;
import com.adyen.model.payout.ConfirmThirdPartyResponse;
import com.adyen.model.payout.DeclineThirdPartyRequest;
Expand Down Expand Up @@ -151,15 +152,28 @@ public SubmitResponse submitThirdparty(SubmitRequest request) throws IOException
/**
* Issues a payout API call
*
* @param request PayoutRequest
* @return payoutResponse
* @throws IOException IOException
* @throws ApiException ApiException
* @param request
* @return
* @throws IOException
* @throws ApiException
*/
public PayoutResponse payout(PayoutRequest request) throws IOException, ApiException {
return payout(request, null);
}

/**
* Issues a payout API call
*
* @param request
* @param requestOptions
* @return
* @throws IOException
* @throws ApiException
*/
public PayoutResponse payout(PayoutRequest request, RequestOptions requestOptions) throws IOException, ApiException {
String jsonRequest = GSON.toJson(request);

String jsonResult = payout.request(jsonRequest);
String jsonResult = payout.request(jsonRequest, requestOptions);

return GSON.fromJson(jsonResult, new TypeToken<PayoutResponse>() {
}.getType());
Expand Down