UNPKG

@mozaic-io/mozaic-sdk-node

Version:

The Mozaic Node SDK enables you to pay your creators easily via the Mozaic API.

56 lines 2.83 kB
/** * This is the main entry point for working with Payment Cycles. * @group ResourcesGroup * @category ResourcesCat * @document ../../../documents/resources/PaymentCycles.md */ import { Mozaic } from "../.."; import { Configuration, PaymentCyclesApi, FeeDirection, PaymentCycleStatus, PaymentCycleSortFields } from "../../api"; import { BaseResource } from "../BaseResource"; import { PaymentCycle } from "./PaymentCycle"; import { PaymentCycleList } from "./PaymentCycleList"; import { PaymentCycleEntry } from "./PaymentCycleEntry"; export declare class PaymentCycles extends BaseResource { private _mozaic; private _paymentCycleApi; /** * @internal * You should not call this constructor directly. Instead, use the Mozaic main * entry point to get access to the SDK classes. * @param configuration */ constructor(mozaic: Mozaic, configuration: Configuration); /** * Get the underlying API for direct calls to the Mozaic API. */ get PaymentCyclesApi(): PaymentCyclesApi; /** * Creates a Payment Cycle * @param name The name of the payment cycle * @param feeDirection Determines who will pay the fees for payments issued from this payment cycle. * @param memo A free text field containing user supplied information about the payment cycle. * @param accountingFromDateUtc The starting data of the payment cycle in UTC. * @param accountingToDateUtc The ending date of the payment cycle in UTC. * @returns {PaymentCycle} */ createPaymentCycle(name: string, feeDirection: FeeDirection, memo: string, accountingFromDateUtc: Date, accountingToDateUtc: Date): Promise<PaymentCycle>; /** * Returns a list of payment cycles using limit for the maximum item count and page to retrieve more than one page. * @param limit An integer number between 1 and 100. * @param page An integer number of the page starting at 1. * @param paymentCycleStatus An optional filter to only return payment cycles with a specific status. If not provided, all payment cycles will be returned. * @returns A list of PaymentCycle objects. */ getPaymentCycles(limit: number, page: number, paymentCycleStatus?: PaymentCycleStatus, sortBy?: PaymentCycleSortFields, sortByAscending?: boolean): Promise<PaymentCycleList>; /** * Retrieves a specific payment cycle id. * @param paymentCycleId the payment cycle id to retrieve. Note: This is the long format payment cycle id, not the 9 character short version: XXXX-XXXX. * @returns */ getPaymentCycle(paymentCycleId: string): Promise<PaymentCycle>; /** * Retrieve a payment cycle entry by its ID. */ getPaymentCycleEntry(paymentCycleEntryId: string): Promise<PaymentCycleEntry>; } //# sourceMappingURL=PaymentCycles.d.ts.map