prices-as-code
Version:
Prices as Code (PaC) - Define your product pricing schemas with type-safe definitions
36 lines (35 loc) • 912 B
TypeScript
import Stripe from 'stripe';
import { StripeOptions, Product, Price, ProviderClient } from '../types.js';
/**
* Stripe provider implementation
*/
export declare class StripeProvider implements ProviderClient {
private client;
private productIdMap;
constructor(options: StripeOptions);
getClient(): Stripe;
/**
* Fetch all products from Stripe
*/
fetchProducts(): Promise<Product[]>;
/**
* Process products before sending to Stripe
*/
private prepareProduct;
/**
* Synchronize products with Stripe
*/
syncProducts(products: Product[]): Promise<Product[]>;
/**
* Process prices before sending to Stripe
*/
private preparePrice;
/**
* Synchronize prices with Stripe
*/
/**
* Fetch all prices from Stripe
*/
fetchPrices(): Promise<Price[]>;
syncPrices(prices: Price[]): Promise<Price[]>;
}