@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.
124 lines • 7.76 kB
TypeScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { ApiResponse, RequestOptions } from '../core';
import { AccountBalances } from '../models/accountBalances';
import { CreatePrepaymentRequest } from '../models/createPrepaymentRequest';
import { CreatePrepaymentResponse } from '../models/createPrepaymentResponse';
import { DeductServiceCreditRequest } from '../models/deductServiceCreditRequest';
import { IssueServiceCreditRequest } from '../models/issueServiceCreditRequest';
import { ListPrepaymentsFilter } from '../models/listPrepaymentsFilter';
import { ListServiceCreditsResponse } from '../models/listServiceCreditsResponse';
import { PrepaymentResponse } from '../models/prepaymentResponse';
import { PrepaymentsResponse } from '../models/prepaymentsResponse';
import { RefundPrepaymentRequest } from '../models/refundPrepaymentRequest';
import { ServiceCredit } from '../models/serviceCredit';
import { SortingDirection } from '../models/sortingDirection';
import { BaseController } from './baseController';
export declare class SubscriptionInvoiceAccountController extends BaseController {
/**
* Returns the `balance_in_cents` of the Subscription's Pending Discount, Service Credit, and
* Prepayment accounts, as well as the sum of the Subscription's open, payable invoices.
*
* @param subscriptionId The Chargify id of the subscription
* @return Response from the API call
*/
readAccountBalances(subscriptionId: number, requestOptions?: RequestOptions): Promise<ApiResponse<AccountBalances>>;
/**
* ## Create Prepayment
*
* In order to specify a prepayment made against a subscription, specify the `amount, memo, details,
* method`.
*
* When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected
* using the default credit card payment profile and applied to the prepayment account balance. This
* is especially useful for manual replenishment of prepaid subscriptions.
*
* Please note that you **can't** pass `amount_in_cents`.
*
*
* @param subscriptionId The Chargify id of the subscription
* @param body
* @return Response from the API call
*/
createPrepayment(subscriptionId: number, body?: CreatePrepaymentRequest, requestOptions?: RequestOptions): Promise<ApiResponse<CreatePrepaymentResponse>>;
/**
* This request will list a subscription's prepayments.
*
* @param subscriptionId The Chargify id of the subscription
* @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 20. 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 Prepayments operations
* @return Response from the API call
*/
listPrepayments({ subscriptionId, page, perPage, filter, }: {
subscriptionId: number;
page?: number;
perPage?: number;
filter?: ListPrepaymentsFilter;
}, requestOptions?: RequestOptions): Promise<ApiResponse<PrepaymentsResponse>>;
/**
* Credit will be added to the subscription in the amount specified in the request body. The credit is
* subsequently applied to the next generated invoice.
*
* @param subscriptionId The Chargify id of the subscription
* @param body
* @return Response from the API call
*/
issueServiceCredit(subscriptionId: number, body?: IssueServiceCreditRequest, requestOptions?: RequestOptions): Promise<ApiResponse<ServiceCredit>>;
/**
* Credit will be removed from the subscription in the amount specified in the request body. The credit
* amount being deducted must be equal to or less than the current credit balance.
*
* @param subscriptionId The Chargify id of the subscription
* @param body
* @return Response from the API call
*/
deductServiceCredit(subscriptionId: number, body?: DeductServiceCreditRequest, requestOptions?: RequestOptions): Promise<ApiResponse<void>>;
/**
* This request will list a subscription's service credits.
*
* @param subscriptionId The Chargify id of the subscription
* @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 20. The maximum allowed values is 200; any per_page
* value over 200 will be changed to 200. Use in query `per_page=200`.
* @param direction Controls the order in which results are returned. Use in query
* `direction=asc`.
* @return Response from the API call
*/
listServiceCredits(subscriptionId: number, page?: number, perPage?: number, direction?: SortingDirection, requestOptions?: RequestOptions): Promise<ApiResponse<ListServiceCreditsResponse>>;
/**
* This endpoint will refund, completely or partially, a particular prepayment applied to a
* subscription. The `prepayment_id` will be the account transaction ID of the original payment. The
* prepayment must have some amount remaining in order to be refunded.
*
* The amount may be passed either as a decimal, with `amount`, or an integer in cents, with
* `amount_in_cents`.
*
* @param subscriptionId The Chargify id of the subscription
* @param prepaymentId id of prepayment
* @param body
* @return Response from the API call
*/
refundPrepayment(subscriptionId: number, prepaymentId: bigint, body?: RefundPrepaymentRequest, requestOptions?: RequestOptions): Promise<ApiResponse<PrepaymentResponse>>;
}
//# sourceMappingURL=subscriptionInvoiceAccountController.d.ts.map