getBillingPriceListWithHttpInfo method
List all billing prices
Returns a list of all prices for the instance. The prices are returned sorted by amount ascending, then by creation date descending. This includes both default and custom prices. Pagination is supported.
Note: This method returns the HTTP Response.
Parameters:
-
bool paginated: Whether to paginate the results. If true, the results will be paginated. If false, the results will not be paginated.
-
int limit: Applies a limit to the number of results returned. Can be used for paginating the results together with
offset. -
int offset: Skip the first
offsetresults when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction withlimit. -
String planId: Filter prices by plan ID
Implementation
Future<http.Response> getBillingPriceListWithHttpInfo({
bool? paginated,
int? limit,
int? offset,
String? planId,
}) async {
// ignore: prefer_const_declarations
final path = r'/billing/prices';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (paginated != null) {
queryParams.addAll(_queryParams('', 'paginated', paginated));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
if (offset != null) {
queryParams.addAll(_queryParams('', 'offset', offset));
}
if (planId != null) {
queryParams.addAll(_queryParams('', 'plan_id', planId));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}