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 FileUpload extends APIResource implements HasId { String id; String object; Long created; String purpose; Long size; String type; String url; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getObject() { return object; } public void setObject(String object) { this.object = object; } public Long getCreated() { return created; } public void setCreated(Long created) { this.created = created; } public String getPurpose() { return purpose; } public void setPurpose(String purpose) { this.purpose = purpose; } public Long getSize() { return size; } public void setSize(Long size) { this.size = size; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getURL() { return url; } public void setURL(String url) { this.url = url; } public static FileUpload create(Map<String, Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return create(params, (RequestOptions) null); } public static FileUpload retrieve(String id) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return retrieve(id, (RequestOptions) null); } @Deprecated public static FileUpload create(Map<String, Object> params, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { RequestOptions options = RequestOptions.builder().setApiKey(apiKey).build(); return create(params, options); } public static FileUpload create(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return multipartRequest(RequestMethod.POST, classURL(FileUpload.class, Stripe.UPLOAD_API_BASE), params, FileUpload.class, options); } @Deprecated public static FileUpload retrieve(String id, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { RequestOptions options = RequestOptions.builder().setApiKey(apiKey).build(); return retrieve(id, options); } public static FileUpload retrieve(String id, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return request(RequestMethod.GET, instanceURL(FileUpload.class, id, Stripe.UPLOAD_API_BASE), null, FileUpload.class, options); } public static FileUploadCollection list(Map<String, Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return list(params, (RequestOptions) null); } public static FileUploadCollection list(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return requestCollection(classURL(FileUpload.class, Stripe.UPLOAD_API_BASE), params, FileUploadCollection.class, options); } @Deprecated public static FileUploadCollection all(Map<String, Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return list(params, (RequestOptions) null); } @Deprecated public static FileUploadCollection all(Map<String, Object> params, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return list(params, RequestOptions.builder().setApiKey(apiKey).build()); } @Deprecated public static FileUploadCollection all(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return list(params, options); } }