com.stripe.model.CustomerBalanceTransactionCollection Maven / Gradle / Ivy
// File generated from our OpenAPI spec
package com.stripe.model;
import com.stripe.exception.StripeException;
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.CustomerBalanceTransactionCollectionCreateParams;
import com.stripe.param.CustomerBalanceTransactionCollectionListParams;
import com.stripe.param.CustomerBalanceTransactionCollectionRetrieveParams;
import java.util.Map;
public class CustomerBalanceTransactionCollection
extends StripeCollection {
/**
* Creates an immutable transaction that updates the customer’s credit balance.
*/
public CustomerBalanceTransaction create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an immutable transaction that updates the customer’s credit balance.
*/
public CustomerBalanceTransaction create(Map params, RequestOptions options)
throws StripeException {
String path = this.getUrl();
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
return getResponseGetter().request(request, CustomerBalanceTransaction.class);
}
/**
* Creates an immutable transaction that updates the customer’s credit balance.
*/
public CustomerBalanceTransaction create(CustomerBalanceTransactionCollectionCreateParams params)
throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Creates an immutable transaction that updates the customer’s credit balance.
*/
public CustomerBalanceTransaction create(
CustomerBalanceTransactionCollectionCreateParams 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);
return getResponseGetter().request(request, CustomerBalanceTransaction.class);
}
/**
* Returns a list of transactions that updated the customer’s balances.
*/
public CustomerBalanceTransactionCollection list(Map params)
throws StripeException {
return list(params, (RequestOptions) null);
}
/**
* Returns a list of transactions that updated the customer’s balances.
*/
public CustomerBalanceTransactionCollection list(
Map params, RequestOptions options) throws StripeException {
String path = this.getUrl();
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
return getResponseGetter().request(request, CustomerBalanceTransactionCollection.class);
}
/**
* Returns a list of transactions that updated the customer’s balances.
*/
public CustomerBalanceTransactionCollection list(
CustomerBalanceTransactionCollectionListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}
/**
* Returns a list of transactions that updated the customer’s balances.
*/
public CustomerBalanceTransactionCollection list(
CustomerBalanceTransactionCollectionListParams 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);
return getResponseGetter().request(request, CustomerBalanceTransactionCollection.class);
}
/**
* Retrieves a specific customer balance transaction that updated the customer’s balances.
*/
public CustomerBalanceTransaction retrieve(String id) throws StripeException {
return retrieve(id, (Map) null, (RequestOptions) null);
}
/**
* Retrieves a specific customer balance transaction that updated the customer’s balances.
*/
public CustomerBalanceTransaction retrieve(String id, RequestOptions options)
throws StripeException {
return retrieve(id, (Map) null, options);
}
/**
* Retrieves a specific customer balance transaction that updated the customer’s balances.
*/
public CustomerBalanceTransaction 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);
return getResponseGetter().request(request, CustomerBalanceTransaction.class);
}
/**
* Retrieves a specific customer balance transaction that updated the customer’s balances.
*/
public CustomerBalanceTransaction retrieve(
String id, CustomerBalanceTransactionCollectionRetrieveParams 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);
return getResponseGetter().request(request, CustomerBalanceTransaction.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy