All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jp.gopay.sdk.builders.transfer.TransferBuilders Maven / Gradle / Ivy

There is a newer version: 0.11.17
Show newest version
package jp.gopay.sdk.builders.transfer;

import jp.gopay.sdk.builders.transfer.AbstractTransferBuilders.AbstractGetTransferRequestBuilder;
import jp.gopay.sdk.builders.transfer.AbstractTransferBuilders.AbstractListTransferRequestBuilder;
import jp.gopay.sdk.models.common.TransferId;
import jp.gopay.sdk.models.response.PaginatedList;
import jp.gopay.sdk.models.response.transfer.Transfer;
import jp.gopay.sdk.resources.TransfersResource;
import retrofit2.Call;
import retrofit2.Retrofit;

public abstract class TransferBuilders {

    public static class ListTransferRequestBuilder
            extends AbstractListTransferRequestBuilder{

        public ListTransferRequestBuilder(Retrofit retrofit) {
            super(retrofit);
        }

        @Override
        protected Call> getRequest(TransfersResource resource) {
            return resource.list(getLimit(), getCursorDirection(), getCursor());
        }
    }

    public static class GetTransferRequestBuilder
            extends AbstractGetTransferRequestBuilder{

        public GetTransferRequestBuilder(Retrofit retrofit, TransferId transferId) {
            super(retrofit, transferId);
        }

        @Override
        protected Call getRequest(TransfersResource resource) {
            return resource.get(transferId);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy