Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.stripe.model.TaxIdCollection Maven / Gradle / Ivy
// File generated from our OpenAPI spec
package com.stripe.model;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiMode;
import com.stripe.net.ApiRequest;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.param.TaxIdCollectionCreateParams;
import com.stripe.param.TaxIdCollectionListParams;
import com.stripe.param.TaxIdCollectionRetrieveParams;
import java.util.Map;
public class TaxIdCollection extends StripeCollection {
/** Creates a new {@code tax_id} object for a customer. */
public TaxId create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
}
/** Creates a new {@code tax_id} object for a customer. */
public TaxId create(Map params, RequestOptions options) throws StripeException {
String path = this.getUrl();
ApiRequest request =
new ApiRequest(
BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options, ApiMode.V1);
return getResponseGetter().request(request, TaxId.class);
}
/** Creates a new {@code tax_id} object for a customer. */
public TaxId create(TaxIdCollectionCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}
/** Creates a new {@code tax_id} object for a customer. */
public TaxId create(TaxIdCollectionCreateParams params, RequestOptions options)
throws StripeException {
String path = this.getUrl();
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
ApiRequestParams.paramsToMap(params),
options,
ApiMode.V1);
return getResponseGetter().request(request, TaxId.class);
}
/** Returns a list of tax IDs for a customer. */
public TaxIdCollection list(Map params) throws StripeException {
return list(params, (RequestOptions) null);
}
/** Returns a list of tax IDs for a customer. */
public TaxIdCollection list(Map params, RequestOptions options)
throws StripeException {
String path = this.getUrl();
ApiRequest request =
new ApiRequest(
BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options, ApiMode.V1);
return getResponseGetter().request(request, TaxIdCollection.class);
}
/** Returns a list of tax IDs for a customer. */
public TaxIdCollection list(TaxIdCollectionListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}
/** Returns a list of tax IDs for a customer. */
public TaxIdCollection list(TaxIdCollectionListParams params, RequestOptions options)
throws StripeException {
String path = this.getUrl();
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
options,
ApiMode.V1);
return getResponseGetter().request(request, TaxIdCollection.class);
}
/** Retrieves the {@code tax_id} object with the given identifier. */
public TaxId retrieve(String id) throws StripeException {
return retrieve(id, (Map) null, (RequestOptions) null);
}
/** Retrieves the {@code tax_id} object with the given identifier. */
public TaxId retrieve(String id, RequestOptions options) throws StripeException {
return retrieve(id, (Map) null, options);
}
/** Retrieves the {@code tax_id} object with the given identifier. */
public TaxId retrieve(String id, Map params, RequestOptions options)
throws StripeException {
String path = String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id));
ApiRequest request =
new ApiRequest(
BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options, ApiMode.V1);
return getResponseGetter().request(request, TaxId.class);
}
/** Retrieves the {@code tax_id} object with the given identifier. */
public TaxId retrieve(String id, TaxIdCollectionRetrieveParams params, RequestOptions options)
throws StripeException {
String path = String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id));
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
options,
ApiMode.V1);
return getResponseGetter().request(request, TaxId.class);
}
}