prices-as-code
Version:
Prices as Code (PaC) - Define your product pricing schemas with type-safe definitions
50 lines (49 loc) • 1.55 kB
JavaScript
/**
* NOTE: Recurly provider has been removed from the public API in v2.0.0.
* This file is kept for future reference but is not used or exported.
*
* For custom Recurly integration, see the Custom Providers Guide:
* https://wickdninja.github.io/prices-as-code/guides/custom-providers.html
*/
/**
* Recurly provider implementation (DEPRECATED - Not used in v2.0.0+)
*/
export class RecurlyProvider {
constructor(options) {
this.productMap = new Map(); // code -> id
// Mock client since recurly package is not included anymore
this.client = {};
console.warn('RecurlyProvider is deprecated and not supported in v2.0.0+');
}
getClient() {
return this.client;
}
/**
* Synchronize products with Recurly (STUB)
*/
async syncProducts(products) {
// Only return non-recurly products
return products.filter(p => p.provider === 'stripe');
}
/**
* Synchronize prices with Recurly (STUB)
*/
async syncPrices(prices) {
// Only return the prices that are not recurly
return prices.filter(p => p.provider === 'stripe');
}
/**
* Fetch products from Recurly (STUB)
*/
async fetchProducts() {
console.warn('RecurlyProvider is deprecated and fetchProducts is not implemented');
return [];
}
/**
* Fetch prices from Recurly (STUB)
*/
async fetchPrices() {
console.warn('RecurlyProvider is deprecated and fetchPrices is not implemented');
return [];
}
}