@maxio-com/advanced-billing-sdk
Version:
Ultimate billing and pricing flexibility for B2B SaaS. Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
125 lines • 7.24 kB
TypeScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { ApiResponse, RequestOptions } from '../core.js';
import { BulkCreateSegments } from '../models/bulkCreateSegments.js';
import { BulkUpdateSegments } from '../models/bulkUpdateSegments.js';
import { CreateSegmentRequest } from '../models/createSegmentRequest.js';
import { ListSegmentsFilter } from '../models/listSegmentsFilter.js';
import { ListSegmentsResponse } from '../models/listSegmentsResponse.js';
import { SegmentResponse } from '../models/segmentResponse.js';
import { UpdateSegmentRequest } from '../models/updateSegmentRequest.js';
import { BaseController } from './baseController.js';
export declare class EventsBasedBillingSegmentsController extends BaseController {
/**
* This endpoint creates a new Segment for a Component with segmented Metric. It allows you to specify
* properties to bill upon and prices for each Segment. You can only pass as many "property_values" as
* the related Metric has segmenting properties defined.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle for the Component
* @param pricePointId ID or Handle for the Price Point belonging to the Component
* @param body
* @return Response from the API call
*/
createSegment(componentId: string, pricePointId: string, body?: CreateSegmentRequest, requestOptions?: RequestOptions): Promise<ApiResponse<SegmentResponse>>;
/**
* This endpoint allows you to fetch Segments created for a given Price Point. They will be returned in
* the order of creation.
*
* You can pass `page` and `per_page` parameters in order to access all of the segments. By default it
* will return `30` records. You can set `per_page` to `200` at most.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle for the Component
* @param pricePointId ID or Handle for the Price Point belonging to the Component
* @param page Result records are organized in pages. By default, the first
* page of results is displayed. The page parameter specifies a
* page number of results to fetch. You can start navigating
* through the pages to consume the results. You do this by
* passing in a page parameter. Retrieve the next page by adding ?
* page=2 to the query string. If there are no results to return,
* then an empty result set will be returned. Use in query
* `page=1`.
* @param perPage This parameter indicates how many records to fetch in each
* request. Default value is 30. The maximum allowed values is 200;
* any per_page value over 200 will be changed to 200. Use in
* query `per_page=200`.
* @param filter Filter to use for List Segments for a Price Point operation
* @return Response from the API call
*/
listSegmentsForPricePoint({ componentId, pricePointId, page, perPage, filter, }: {
componentId: string;
pricePointId: string;
page?: number;
perPage?: number;
filter?: ListSegmentsFilter;
}, requestOptions?: RequestOptions): Promise<ApiResponse<ListSegmentsResponse>>;
/**
* This endpoint updates a single Segment for a Component with a segmented Metric. It allows you to
* update the pricing for the segment.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle of the Component
* @param pricePointId ID or Handle of the Price Point belonging to the Component
* @param id The ID of the Segment
* @param body
* @return Response from the API call
*/
updateSegment(componentId: string, pricePointId: string, id: number, body?: UpdateSegmentRequest, requestOptions?: RequestOptions): Promise<ApiResponse<SegmentResponse>>;
/**
* This endpoint allows you to delete a Segment with specified ID.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle of the Component
* @param pricePointId ID or Handle of the Price Point belonging to the Component
* @param id The ID of the Segment
* @return Response from the API call
*/
deleteSegment(componentId: string, pricePointId: string, id: number, requestOptions?: RequestOptions): Promise<ApiResponse<void>>;
/**
* This endpoint allows you to create multiple segments in one request. The array of segments can
* contain up to `2000` records.
*
* If any of the records contain an error the whole request would fail and none of the requested
* segments get created. The error response contains a message for only the one segment that failed
* validation, with the corresponding index in the array.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle for the Component
* @param pricePointId ID or Handle for the Price Point belonging to the Component
* @param body
* @return Response from the API call
*/
bulkCreateSegments(componentId: string, pricePointId: string, body?: BulkCreateSegments, requestOptions?: RequestOptions): Promise<ApiResponse<ListSegmentsResponse>>;
/**
* This endpoint allows you to update multiple segments in one request. The array of segments can
* contain up to `1000` records.
*
* If any of the records contain an error the whole request would fail and none of the requested
* segments get updated. The error response contains a message for only the one segment that failed
* validation, with the corresponding index in the array.
*
* You may specify component and/or price point by using either the numeric ID or the `handle:gold`
* syntax.
*
* @param componentId ID or Handle for the Component
* @param pricePointId ID or Handle for the Price Point belonging to the Component
* @param body
* @return Response from the API call
*/
bulkUpdateSegments(componentId: string, pricePointId: string, body?: BulkUpdateSegments, requestOptions?: RequestOptions): Promise<ApiResponse<ListSegmentsResponse>>;
}
//# sourceMappingURL=eventsBasedBillingSegmentsController.d.ts.map