declastruct-stripe-sdk
Version:
declarative control of stripe constructs, via declastruct
21 lines (20 loc) • 905 B
TypeScript
import { RefByPrimary, RefByUnique } from 'domain-objects';
import { PickOne } from 'type-fns';
import { VisualogicContext } from 'visualogic';
import { StripeApiContext } from '../../domain/constants';
import { DeclaredStripeInvoice } from '../../domain/objects/DeclaredStripeInvoice';
/**
* .what = set the status of an invoice to "open"
* .what.intent
* - issues / finalizes the invoice in order to make it payable
* - enables autoAdvance to issue automaticPayment once collection config has it enabled
*/
export declare const setInvoiceOpened: (input: {
by: PickOne<{
unique: RefByUnique<typeof DeclaredStripeInvoice>;
primary: RefByPrimary<typeof DeclaredStripeInvoice>;
}>;
with?: {
autoAdvance?: boolean | undefined;
} | undefined;
}, context: StripeApiContext & VisualogicContext) => Promise<import("type-fns").HasMetadata<DeclaredStripeInvoice>>;