package com.stripe.model;
import com.stripe.Stripe;
import com.stripe.exception.APIConnectionException;
import com.stripe.exception.APIException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.CardException;
import com.stripe.exception.InvalidRequestException;
import com.stripe.net.APIResource;
import com.stripe.net.RequestOptions;
import java.util.Map;
public class FeeRefundCollection extends StripeCollection<FeeRefund> {
public FeeRefundCollection list(Map<String, Object> params)
throws AuthenticationException, InvalidRequestException,
APIConnectionException, CardException, APIException {
return list(params, (RequestOptions) null);
}
public FeeRefundCollection list(Map<String, Object> params,
RequestOptions options) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
String url = String.format("%s%s", Stripe.getApiBase(), this.getURL());
return APIResource.requestCollection(url, params, FeeRefundCollection.class, options);
}
@Deprecated
public FeeRefundCollection all(Map<String, Object> params)
throws AuthenticationException, InvalidRequestException,
APIConnectionException, CardException, APIException {
return list(params, (RequestOptions) null);
}
@Deprecated
public FeeRefundCollection all(Map<String, Object> params,
String apiKey) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
return list(params, RequestOptions.builder().setApiKey(apiKey).build());
}
@Deprecated
public FeeRefundCollection all(Map<String, Object> params,
RequestOptions options) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
return list(params, options);
}
public FeeRefund retrieve(String id)
throws AuthenticationException, InvalidRequestException,
APIConnectionException, CardException, APIException {
return retrieve(id, (RequestOptions) null);
}
@Deprecated
public FeeRefund retrieve(String id, String apiKey) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
return retrieve(id, RequestOptions.builder().setApiKey(apiKey).build());
}
public FeeRefund retrieve(String id, RequestOptions options) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
String url = String.format("%s%s/%s", Stripe.getApiBase(), this.getURL(), id);
return APIResource.request(APIResource.RequestMethod.GET, url, null, FeeRefund.class, options);
}
public FeeRefund create(Map<String, Object> params)
throws AuthenticationException, InvalidRequestException,
APIConnectionException, CardException, APIException {
return create(params, (RequestOptions) null);
}
@Deprecated
public FeeRefund create(Map<String, Object> params,
String apiKey) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
return create(params, RequestOptions.builder().setApiKey(apiKey).build());
}
public FeeRefund create(Map<String, Object> params,
RequestOptions options) throws AuthenticationException,
InvalidRequestException, APIConnectionException, CardException,
APIException {
String url = String.format("%s%s", Stripe.getApiBase(), this.getURL());
return APIResource.request(APIResource.RequestMethod.POST, url, params, FeeRefund.class, options);
}
}