@vendasta/billing 6.5.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/vendasta-billing.umd.js +4 -72
- package/bundles/vendasta-billing.umd.js.map +1 -1
- package/bundles/vendasta-billing.umd.min.js +2 -2
- package/bundles/vendasta-billing.umd.min.js.map +1 -1
- package/esm2015/lib/contract/index.js +1 -2
- package/fesm2015/vendasta-billing.js +1 -68
- package/fesm2015/vendasta-billing.js.map +1 -1
- package/lib/contract/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2015/lib/contract/contract-pricing/billed-product.js +0 -50
- package/esm2015/lib/contract/contract-pricing/billing-model.js +0 -10
- package/esm2015/lib/contract/contract-pricing/index.js +0 -4
- package/esm2015/lib/contract/contract-pricing/product-category.js +0 -9
- package/lib/contract/contract-pricing/billed-product.d.ts +0 -50
- package/lib/contract/contract-pricing/billing-model.d.ts +0 -8
- package/lib/contract/contract-pricing/index.d.ts +0 -3
- package/lib/contract/contract-pricing/product-category.d.ts +0 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@vendasta/core'), require('rxjs/operators'), require('rxjs')
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@vendasta/billing', ['exports', '@angular/core', '@angular/common/http', '@vendasta/core', 'rxjs/operators', 'rxjs'
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendasta = global.vendasta || {}, global.vendasta.billing = {}), global.ng.core, global.ng.common.http, global.i1, global.rxjs.operators, global.rxjs
|
|
5
|
-
}(this, (function (exports, i0, i1$1, i1, operators, rxjs
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@vendasta/core'), require('rxjs/operators'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@vendasta/billing', ['exports', '@angular/core', '@angular/common/http', '@vendasta/core', 'rxjs/operators', 'rxjs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendasta = global.vendasta || {}, global.vendasta.billing = {}), global.ng.core, global.ng.common.http, global.i1, global.rxjs.operators, global.rxjs));
|
|
5
|
+
}(this, (function (exports, i0, i1$1, i1, operators, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function convertApiAppliedBundle(ab) {
|
|
8
8
|
if (!ab) {
|
|
@@ -15846,70 +15846,6 @@
|
|
|
15846
15846
|
{ type: ContractApiService }
|
|
15847
15847
|
]; };
|
|
15848
15848
|
|
|
15849
|
-
/**
|
|
15850
|
-
* @deprecated: Use ProductPricingType instead
|
|
15851
|
-
**/
|
|
15852
|
-
(function (BillingModel) {
|
|
15853
|
-
BillingModel["Standard"] = "Standard";
|
|
15854
|
-
BillingModel["Stairstep"] = "Stairstep";
|
|
15855
|
-
BillingModel["Tiered"] = "Tiered";
|
|
15856
|
-
})(exports.BillingModel || (exports.BillingModel = {}));
|
|
15857
|
-
|
|
15858
|
-
function pricingTypeToBillingModel(pricingType) {
|
|
15859
|
-
switch (pricingType) {
|
|
15860
|
-
case exports.ProductPricingType.Stairstep:
|
|
15861
|
-
return exports.BillingModel.Stairstep;
|
|
15862
|
-
case exports.ProductPricingType.Tiered:
|
|
15863
|
-
return exports.BillingModel.Tiered;
|
|
15864
|
-
case exports.ProductPricingType.Standard:
|
|
15865
|
-
return exports.BillingModel.Standard;
|
|
15866
|
-
}
|
|
15867
|
-
return exports.BillingModel.Standard;
|
|
15868
|
-
}
|
|
15869
|
-
function pricingRulesToTiers(rules) {
|
|
15870
|
-
return rules.map(function (r) {
|
|
15871
|
-
return {
|
|
15872
|
-
rangeMin: r.minUnits,
|
|
15873
|
-
rangeMax: r.maxUnits,
|
|
15874
|
-
price: r.price || 0
|
|
15875
|
-
};
|
|
15876
|
-
});
|
|
15877
|
-
}
|
|
15878
|
-
function mapFrequency(frequency) {
|
|
15879
|
-
switch (frequency) {
|
|
15880
|
-
case exports.Frequency.OneTime:
|
|
15881
|
-
return shared.MarketplaceBillingFrequency.OneTime;
|
|
15882
|
-
case exports.Frequency.Monthly:
|
|
15883
|
-
return shared.MarketplaceBillingFrequency.Monthly;
|
|
15884
|
-
case exports.Frequency.Yearly:
|
|
15885
|
-
return shared.MarketplaceBillingFrequency.Yearly;
|
|
15886
|
-
}
|
|
15887
|
-
}
|
|
15888
|
-
function buildBilledProductFromProductPricingAndAddon(addon, productPricing) {
|
|
15889
|
-
return {
|
|
15890
|
-
productName: addon.productName,
|
|
15891
|
-
productId: addon.addonId,
|
|
15892
|
-
billingModel: pricingTypeToBillingModel(productPricing.pricingType),
|
|
15893
|
-
price: undefined,
|
|
15894
|
-
notes: [],
|
|
15895
|
-
iconURL: addon.productIcon,
|
|
15896
|
-
currency: productPricing.currency,
|
|
15897
|
-
billingFrequency: mapFrequency(productPricing.frequency),
|
|
15898
|
-
pricingTiers: pricingRulesToTiers(productPricing.pricingRules),
|
|
15899
|
-
productCategory: undefined,
|
|
15900
|
-
commitment: productPricing.commitment,
|
|
15901
|
-
setupFee: productPricing.setupFee
|
|
15902
|
-
};
|
|
15903
|
-
}
|
|
15904
|
-
|
|
15905
|
-
(function (ProductCategory) {
|
|
15906
|
-
ProductCategory["BUNDLE"] = "bundle";
|
|
15907
|
-
ProductCategory["VENDASTA"] = "vendasta_product";
|
|
15908
|
-
ProductCategory["PRODUCT"] = "product";
|
|
15909
|
-
ProductCategory["SUBSCRIPTION"] = "subscription";
|
|
15910
|
-
ProductCategory["FEE"] = "fee";
|
|
15911
|
-
})(exports.ProductCategory || (exports.ProductCategory = {}));
|
|
15912
|
-
|
|
15913
15849
|
var setNetD = function (netD) { return ({ netD: netD }); };
|
|
15914
15850
|
var setCurrencyCode = function (currencyCode) { return ({ currencyCode: currencyCode }); };
|
|
15915
15851
|
var setStatus = function (status) { return ({ status: status }); };
|
|
@@ -19143,7 +19079,6 @@
|
|
|
19143
19079
|
exports.appliedTaxRateFromAPI = appliedTaxRateFromAPI;
|
|
19144
19080
|
exports.billingStrategyFromAPI = billingStrategyFromAPI;
|
|
19145
19081
|
exports.billingStrategyToAPI = billingStrategyToAPI;
|
|
19146
|
-
exports.buildBilledProductFromProductPricingAndAddon = buildBilledProductFromProductPricingAndAddon;
|
|
19147
19082
|
exports.collectionMethodFromApi = collectionMethodFromApi;
|
|
19148
19083
|
exports.collectionMethodToApi = collectionMethodToApi;
|
|
19149
19084
|
exports.contractFromApi = contractFromApi;
|
|
@@ -19158,7 +19093,6 @@
|
|
|
19158
19093
|
exports.frequencyToApi = frequencyToApi;
|
|
19159
19094
|
exports.isBillingStrategyInstant = isBillingStrategyInstant;
|
|
19160
19095
|
exports.listProductsFilterToApi = listProductsFilterToApi;
|
|
19161
|
-
exports.mapFrequency = mapFrequency;
|
|
19162
19096
|
exports.paymentAllocationFromApi = paymentAllocationFromApi;
|
|
19163
19097
|
exports.paymentAllocationTypeFromApi = paymentAllocationTypeFromApi;
|
|
19164
19098
|
exports.paymentFromApi = paymentFromApi;
|
|
@@ -19168,8 +19102,6 @@
|
|
|
19168
19102
|
exports.pricingPlanFromAPI = pricingPlanFromAPI;
|
|
19169
19103
|
exports.pricingPlanProductFromApi = pricingPlanProductFromApi;
|
|
19170
19104
|
exports.pricingPlanProductPricingToApi = pricingPlanProductPricingToApi;
|
|
19171
|
-
exports.pricingRulesToTiers = pricingRulesToTiers;
|
|
19172
|
-
exports.pricingTypeToBillingModel = pricingTypeToBillingModel;
|
|
19173
19105
|
exports.productFromApi = productFromApi;
|
|
19174
19106
|
exports.productPricingFromApi = productPricingFromApi;
|
|
19175
19107
|
exports.productPricingRulesFromApi = productPricingRulesFromApi;
|