@paygentic/sdk 0.9.7 → 0.9.9
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/dist/commonjs/funcs/customersList.js +2 -2
- package/dist/commonjs/funcs/customersList.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts +1 -1
- package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.js +1 -1
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.js +2 -2
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/createpercentagediscountadjustment.d.ts +40 -0
- package/dist/commonjs/models/createpercentagediscountadjustment.d.ts.map +1 -0
- package/dist/commonjs/models/createpercentagediscountadjustment.js +54 -0
- package/dist/commonjs/models/createpercentagediscountadjustment.js.map +1 -0
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts +5 -45
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.js +7 -18
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.js.map +1 -1
- package/dist/commonjs/models/createusagediscountadjustment.d.ts +45 -0
- package/dist/commonjs/models/createusagediscountadjustment.d.ts.map +1 -0
- package/dist/commonjs/models/createusagediscountadjustment.js +55 -0
- package/dist/commonjs/models/createusagediscountadjustment.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +4 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/lineitem.d.ts +4 -0
- package/dist/commonjs/models/lineitem.d.ts.map +1 -1
- package/dist/commonjs/models/lineitem.js +1 -0
- package/dist/commonjs/models/lineitem.js.map +1 -1
- package/dist/commonjs/models/operations/createprice.d.ts +15 -0
- package/dist/commonjs/models/operations/createprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createprice.js +3 -0
- package/dist/commonjs/models/operations/createprice.js.map +1 -1
- package/dist/commonjs/models/operations/updateprice.d.ts +15 -0
- package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateprice.js +3 -0
- package/dist/commonjs/models/operations/updateprice.js.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.d.ts +30 -0
- package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.js +15 -1
- package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
- package/dist/commonjs/models/price.d.ts +30 -0
- package/dist/commonjs/models/price.d.ts.map +1 -1
- package/dist/commonjs/models/price.js +15 -1
- package/dist/commonjs/models/price.js.map +1 -1
- package/dist/commonjs/models/priceproperties.d.ts +3 -3
- package/dist/commonjs/models/pricetax.d.ts +58 -0
- package/dist/commonjs/models/pricetax.d.ts.map +1 -0
- package/dist/commonjs/models/pricetax.js +82 -0
- package/dist/commonjs/models/pricetax.js.map +1 -0
- package/dist/commonjs/models/ratetype.d.ts +18 -0
- package/dist/commonjs/models/ratetype.d.ts.map +1 -0
- package/dist/commonjs/models/ratetype.js +53 -0
- package/dist/commonjs/models/ratetype.js.map +1 -0
- package/dist/commonjs/models/schemasprice.d.ts +14 -0
- package/dist/commonjs/models/schemasprice.d.ts.map +1 -1
- package/dist/commonjs/models/schemasprice.js +5 -0
- package/dist/commonjs/models/schemasprice.js.map +1 -1
- package/dist/commonjs/models/subscriptionadjustment.d.ts +14 -5
- package/dist/commonjs/models/subscriptionadjustment.d.ts.map +1 -1
- package/dist/commonjs/models/subscriptionadjustment.js +4 -1
- package/dist/commonjs/models/subscriptionadjustment.js.map +1 -1
- package/dist/commonjs/sdk/subscriptions.d.ts +1 -1
- package/dist/commonjs/sdk/subscriptions.js +1 -1
- package/dist/esm/funcs/customersList.js +2 -2
- package/dist/esm/funcs/customersList.js.map +1 -1
- package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts +1 -1
- package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.js +1 -1
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.js +2 -2
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/createpercentagediscountadjustment.d.ts +40 -0
- package/dist/esm/models/createpercentagediscountadjustment.d.ts.map +1 -0
- package/dist/esm/models/createpercentagediscountadjustment.js +17 -0
- package/dist/esm/models/createpercentagediscountadjustment.js.map +1 -0
- package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts +5 -45
- package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts.map +1 -1
- package/dist/esm/models/createsubscriptionadjustmentrequest.js +6 -17
- package/dist/esm/models/createsubscriptionadjustmentrequest.js.map +1 -1
- package/dist/esm/models/createusagediscountadjustment.d.ts +45 -0
- package/dist/esm/models/createusagediscountadjustment.d.ts.map +1 -0
- package/dist/esm/models/createusagediscountadjustment.js +18 -0
- package/dist/esm/models/createusagediscountadjustment.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/lineitem.d.ts +4 -0
- package/dist/esm/models/lineitem.d.ts.map +1 -1
- package/dist/esm/models/lineitem.js +1 -0
- package/dist/esm/models/lineitem.js.map +1 -1
- package/dist/esm/models/operations/createprice.d.ts +15 -0
- package/dist/esm/models/operations/createprice.d.ts.map +1 -1
- package/dist/esm/models/operations/createprice.js +3 -0
- package/dist/esm/models/operations/createprice.js.map +1 -1
- package/dist/esm/models/operations/updateprice.d.ts +15 -0
- package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
- package/dist/esm/models/operations/updateprice.js +3 -0
- package/dist/esm/models/operations/updateprice.js.map +1 -1
- package/dist/esm/models/planversionpriceslot.d.ts +30 -0
- package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/esm/models/planversionpriceslot.js +14 -0
- package/dist/esm/models/planversionpriceslot.js.map +1 -1
- package/dist/esm/models/price.d.ts +30 -0
- package/dist/esm/models/price.d.ts.map +1 -1
- package/dist/esm/models/price.js +14 -0
- package/dist/esm/models/price.js.map +1 -1
- package/dist/esm/models/priceproperties.d.ts +3 -3
- package/dist/esm/models/pricetax.d.ts +58 -0
- package/dist/esm/models/pricetax.d.ts.map +1 -0
- package/dist/esm/models/pricetax.js +44 -0
- package/dist/esm/models/pricetax.js.map +1 -0
- package/dist/esm/models/ratetype.d.ts +18 -0
- package/dist/esm/models/ratetype.d.ts.map +1 -0
- package/dist/esm/models/ratetype.js +17 -0
- package/dist/esm/models/ratetype.js.map +1 -0
- package/dist/esm/models/schemasprice.d.ts +14 -0
- package/dist/esm/models/schemasprice.d.ts.map +1 -1
- package/dist/esm/models/schemasprice.js +5 -0
- package/dist/esm/models/schemasprice.js.map +1 -1
- package/dist/esm/models/subscriptionadjustment.d.ts +14 -5
- package/dist/esm/models/subscriptionadjustment.d.ts.map +1 -1
- package/dist/esm/models/subscriptionadjustment.js +4 -1
- package/dist/esm/models/subscriptionadjustment.js.map +1 -1
- package/dist/esm/sdk/subscriptions.d.ts +1 -1
- package/dist/esm/sdk/subscriptions.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customersList.ts +2 -2
- package/src/funcs/subscriptionsCreateSubscriptionAdjustment.ts +1 -1
- package/src/funcs/subscriptionsReconcileSubscriptionFeatures.ts +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/createpercentagediscountadjustment.ts +66 -0
- package/src/models/createsubscriptionadjustmentrequest.ts +21 -59
- package/src/models/createusagediscountadjustment.ts +72 -0
- package/src/models/index.ts +4 -0
- package/src/models/lineitem.ts +5 -0
- package/src/models/operations/createprice.ts +18 -0
- package/src/models/operations/updateprice.ts +18 -0
- package/src/models/planversionpriceslot.ts +40 -0
- package/src/models/price.ts +38 -0
- package/src/models/priceproperties.ts +3 -3
- package/src/models/pricetax.ts +100 -0
- package/src/models/ratetype.ts +25 -0
- package/src/models/schemasprice.ts +17 -0
- package/src/models/subscriptionadjustment.ts +17 -6
- package/src/sdk/subscriptions.ts +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PriceTax$outboundSchema = exports.PriceTax$inboundSchema = exports.OutsideScopeLabel$outboundSchema = exports.OutsideScopeLabel$inboundSchema = exports.SupplyScope$outboundSchema = exports.SupplyScope$inboundSchema = exports.OutsideScopeLabel = exports.SupplyScope = void 0;
|
|
40
|
+
exports.priceTaxToJSON = priceTaxToJSON;
|
|
41
|
+
exports.priceTaxFromJSON = priceTaxFromJSON;
|
|
42
|
+
const z = __importStar(require("zod/v3"));
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
/**
|
|
45
|
+
* Whether this price's money is consideration for a supply — the one tax fact only you can state, because it is settled when you agree the deal rather than derived from what was sold. `IN_SCOPE` (the default) is consideration: it enters the taxable amount, positive as a charge or negative as a reduction in the price of the supply it applies to. `OUTSIDE_SCOPE` money is not consideration for anything, so it does not change the taxable amount, carries no tax, does not appear on the tax document, and nets into the amount payable after tax. This means "not consideration for a supply" — it does NOT mean "a supply outside this jurisdiction": exports and place-of-supply answers are worked out from the addresses on the sale by the tax provider, and are never declared on a price. How a supply is then classified — standard, zero-rated, exempt — is the tax provider's determination and is not set here either. Omit the whole `tax` object to leave a price in scope; there is deliberately no schema default on this property, so that a misspelt key is refused rather than silently defaulted.
|
|
46
|
+
*/
|
|
47
|
+
exports.SupplyScope = {
|
|
48
|
+
InScope: "IN_SCOPE",
|
|
49
|
+
OutsideScope: "OUTSIDE_SCOPE",
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* What an `OUTSIDE_SCOPE` amount is called in the invoice totals, so the wording follows the declaration rather than being retyped per price. Required when `supplyScope` is `OUTSIDE_SCOPE`, and rejected otherwise. `CASHBACK` is the only value today, and a price declaring it must use the `standard` model and must not carry a positive `unitPrice` — a cashback is money paid back, not charged.
|
|
53
|
+
*/
|
|
54
|
+
exports.OutsideScopeLabel = {
|
|
55
|
+
Cashback: "CASHBACK",
|
|
56
|
+
};
|
|
57
|
+
/** @internal */
|
|
58
|
+
exports.SupplyScope$inboundSchema = z
|
|
59
|
+
.nativeEnum(exports.SupplyScope);
|
|
60
|
+
/** @internal */
|
|
61
|
+
exports.SupplyScope$outboundSchema = exports.SupplyScope$inboundSchema;
|
|
62
|
+
/** @internal */
|
|
63
|
+
exports.OutsideScopeLabel$inboundSchema = z.nativeEnum(exports.OutsideScopeLabel);
|
|
64
|
+
/** @internal */
|
|
65
|
+
exports.OutsideScopeLabel$outboundSchema = exports.OutsideScopeLabel$inboundSchema;
|
|
66
|
+
/** @internal */
|
|
67
|
+
exports.PriceTax$inboundSchema = z.object({
|
|
68
|
+
supplyScope: exports.SupplyScope$inboundSchema,
|
|
69
|
+
outsideScopeLabel: z.nullable(exports.OutsideScopeLabel$inboundSchema).optional(),
|
|
70
|
+
});
|
|
71
|
+
/** @internal */
|
|
72
|
+
exports.PriceTax$outboundSchema = z.object({
|
|
73
|
+
supplyScope: exports.SupplyScope$outboundSchema,
|
|
74
|
+
outsideScopeLabel: z.nullable(exports.OutsideScopeLabel$outboundSchema).optional(),
|
|
75
|
+
});
|
|
76
|
+
function priceTaxToJSON(priceTax) {
|
|
77
|
+
return JSON.stringify(exports.PriceTax$outboundSchema.parse(priceTax));
|
|
78
|
+
}
|
|
79
|
+
function priceTaxFromJSON(jsonString) {
|
|
80
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PriceTax$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PriceTax' from JSON`);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=pricetax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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,CAAC,CAAC,EAAE,EAAE,CAAC,8BAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClD,sCAAsC,CACvC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RateType: {
|
|
7
|
+
readonly Amount: "amount";
|
|
8
|
+
readonly Proportion: "proportion";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
|
|
12
|
+
*/
|
|
13
|
+
export type RateType = ClosedEnum<typeof RateType>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const RateType$inboundSchema: z.ZodNativeEnum<typeof RateType>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const RateType$outboundSchema: z.ZodNativeEnum<typeof RateType>;
|
|
18
|
+
//# sourceMappingURL=ratetype.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ratetype.d.ts","sourceRoot":"","sources":["../../../src/models/ratetype.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEnD,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,QAAQ,CAC7C,CAAC;AACxB,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,QAAQ,CAC7C,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.RateType$outboundSchema = exports.RateType$inboundSchema = exports.RateType = void 0;
|
|
40
|
+
const z = __importStar(require("zod/v3"));
|
|
41
|
+
/**
|
|
42
|
+
* What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
|
|
43
|
+
*/
|
|
44
|
+
exports.RateType = {
|
|
45
|
+
Amount: "amount",
|
|
46
|
+
Proportion: "proportion",
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
exports.RateType$inboundSchema = z
|
|
50
|
+
.nativeEnum(exports.RateType);
|
|
51
|
+
/** @internal */
|
|
52
|
+
exports.RateType$outboundSchema = exports.RateType$inboundSchema;
|
|
53
|
+
//# sourceMappingURL=ratetype.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ratetype.js","sourceRoot":"","sources":["../../../src/models/ratetype.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B;;GAEG;AACU,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;CAChB,CAAC;AAMX,gBAAgB;AACH,QAAA,sBAAsB,GAAqC,CAAC;KACtE,UAAU,CAAC,gBAAQ,CAAC,CAAC;AACxB,gBAAgB;AACH,QAAA,uBAAuB,GAClC,8BAAsB,CAAC"}
|
|
@@ -5,6 +5,8 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
5
5
|
import { PriceFeature } from "./pricefeature.js";
|
|
6
6
|
import { PriceModel } from "./pricemodel.js";
|
|
7
7
|
import { PriceProperties } from "./priceproperties.js";
|
|
8
|
+
import { PriceTax } from "./pricetax.js";
|
|
9
|
+
import { RateType } from "./ratetype.js";
|
|
8
10
|
export declare const SchemasPriceObject: {
|
|
9
11
|
readonly Price: "price";
|
|
10
12
|
};
|
|
@@ -42,6 +44,10 @@ export type SchemasPrice = {
|
|
|
42
44
|
billingCadence?: string | null | undefined;
|
|
43
45
|
createdAt: Date;
|
|
44
46
|
invoiceDisplayName: string;
|
|
47
|
+
/**
|
|
48
|
+
* Presentation only. Prices sharing this value, within one billing period, print as a single row on the rendered invoice PDF and are described by this string. Every member still bills its own line item on the ledger, this API and the compliance document. The combined row's rate is derived from the members' own rates. Requires the 'standard' pricing model. Sample values: 'Cross Border Fees', 'FX Fees'
|
|
49
|
+
*/
|
|
50
|
+
invoiceDisplayGroup?: string | null | undefined;
|
|
45
51
|
/**
|
|
46
52
|
* Pricing model of a price as returned by the API. Includes the legacy models ('dynamic', 'percentage') retained for existing prices; 'standard' and 'volume' can be created (see PriceModelInput).
|
|
47
53
|
*/
|
|
@@ -61,6 +67,14 @@ export type SchemasPrice = {
|
|
|
61
67
|
* A fixed amount owed whole rather than a per-period rate. An obligation is not prorated over a partial first period: when a subscription starts before its billing anchor, no truncated stub is billed and the first charge is the full amount at the next anchor. An obligation also refuses an interval boundary that falls strictly inside one of its own billing periods, since part of an amount owed whole is not a thing to bill. Defaults to false, which is a rate and is today's behaviour for every price. Not supported on a metered price, whose amount resolves from usage at close.
|
|
62
68
|
*/
|
|
63
69
|
isObligation: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
|
|
72
|
+
*/
|
|
73
|
+
rateType?: RateType | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* A price's tax declaration. Optional on write — a price that declares nothing is `IN_SCOPE`, and is billed and taxed exactly as it was before this object existed. Always present on read. Replaced as a whole on update: send the object to change it, omit it to leave it alone.
|
|
76
|
+
*/
|
|
77
|
+
tax: PriceTax;
|
|
64
78
|
/**
|
|
65
79
|
* Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
66
80
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemasprice.d.ts","sourceRoot":"","sources":["../../../src/models/schemasprice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,YAAY,EAA8B,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAA4B,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemasprice.d.ts","sourceRoot":"","sources":["../../../src/models/schemasprice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,YAAY,EAA8B,MAAM,mBAAmB,CAAC;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AoB,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,GAAG,EAAE,QAAQ,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,aAAa,CAC5D,OAAO,kBAAkB,CACS,CAAC;AAErC,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,aAAa,CACjE,OAAO,uBAAuB,CACS,CAAC;AAE1C,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAsBP,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -43,6 +43,8 @@ const schemas_js_1 = require("../lib/schemas.js");
|
|
|
43
43
|
const pricefeature_js_1 = require("./pricefeature.js");
|
|
44
44
|
const pricemodel_js_1 = require("./pricemodel.js");
|
|
45
45
|
const priceproperties_js_1 = require("./priceproperties.js");
|
|
46
|
+
const pricetax_js_1 = require("./pricetax.js");
|
|
47
|
+
const ratetype_js_1 = require("./ratetype.js");
|
|
46
48
|
exports.SchemasPriceObject = {
|
|
47
49
|
Price: "price",
|
|
48
50
|
};
|
|
@@ -65,6 +67,7 @@ exports.SchemasPrice$inboundSchema = z.object({
|
|
|
65
67
|
billingCadence: z.nullable(z.string()).optional(),
|
|
66
68
|
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
67
69
|
invoiceDisplayName: z.string(),
|
|
70
|
+
invoiceDisplayGroup: z.nullable(z.string()).optional(),
|
|
68
71
|
model: pricemodel_js_1.PriceModel$inboundSchema.optional(),
|
|
69
72
|
paymentTerm: exports.SchemasPricePaymentTerm$inboundSchema,
|
|
70
73
|
properties: priceproperties_js_1.PriceProperties$inboundSchema,
|
|
@@ -72,6 +75,8 @@ exports.SchemasPrice$inboundSchema = z.object({
|
|
|
72
75
|
features: z.array(pricefeature_js_1.PriceFeature$inboundSchema).optional(),
|
|
73
76
|
grantDiscountEnabled: z.boolean().default(false),
|
|
74
77
|
isObligation: z.boolean().default(false),
|
|
78
|
+
rateType: ratetype_js_1.RateType$inboundSchema.optional(),
|
|
79
|
+
tax: pricetax_js_1.PriceTax$inboundSchema,
|
|
75
80
|
quantity: z.number().int(),
|
|
76
81
|
});
|
|
77
82
|
function schemasPriceFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemasprice.js","sourceRoot":"","sources":["../../../src/models/schemasprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemasprice.js","sourceRoot":"","sources":["../../../src/models/schemasprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIH,oDAQC;AA1ID,0CAA4B;AAC5B,kDAA8C;AAI9C,uDAA6E;AAC7E,mDAAuE;AACvE,6DAG8B;AAC9B,+CAAiE;AACjE,+CAAiE;AAEpD,QAAA,kBAAkB,GAAG;IAChC,KAAK,EAAE,OAAO;CACN,CAAC;AAGE,QAAA,uBAAuB,GAAG;IACrC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;CACf,CAAC;AAsEX,gBAAgB;AACH,QAAA,gCAAgC,GAEzC,CAAC,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;AAErC,gBAAgB;AACH,QAAA,qCAAqC,GAE9C,CAAC,CAAC,UAAU,CAAC,+BAAuB,CAAC,CAAC;AAE1C,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAA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,OAAO,CAAC,KAAK,CAAC;IACxC,QAAQ,EAAE,oCAAsB,CAAC,QAAQ,EAAE;IAC3C,GAAG,EAAE,oCAAsB;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,SAAgB,oBAAoB,CAClC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare const SubscriptionAdjustmentObject: {
|
|
|
8
8
|
export type SubscriptionAdjustmentObject = ClosedEnum<typeof SubscriptionAdjustmentObject>;
|
|
9
9
|
export declare const SubscriptionAdjustmentType: {
|
|
10
10
|
readonly PercentageDiscount: "percentageDiscount";
|
|
11
|
+
readonly UsageDiscount: "usageDiscount";
|
|
11
12
|
};
|
|
12
13
|
export type SubscriptionAdjustmentType = ClosedEnum<typeof SubscriptionAdjustmentType>;
|
|
13
14
|
export type SubscriptionAdjustment = {
|
|
@@ -22,19 +23,27 @@ export type SubscriptionAdjustment = {
|
|
|
22
23
|
subscriptionId: string;
|
|
23
24
|
type: SubscriptionAdjustmentType;
|
|
24
25
|
/**
|
|
25
|
-
* The discount rate as a decimal fraction between 0 and 1. "0.35" means 35 percent.
|
|
26
|
+
* The discount rate as a decimal fraction between 0 and 1. "0.35" means 35 percent. Null on a usageDiscount, which carries a unit count instead.
|
|
26
27
|
*/
|
|
27
|
-
percentageDiscount: string;
|
|
28
|
+
percentageDiscount: string | null;
|
|
28
29
|
/**
|
|
29
|
-
* The
|
|
30
|
+
* The number of usage units taken off the targeted line's billable quantity. Null on a percentageDiscount, which carries a rate instead.
|
|
31
|
+
*/
|
|
32
|
+
usageDiscount: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* The prices this adjustment reduces. Exactly one metered price on a usageDiscount; empty on a percentageDiscount, which reduces every discountable charge.
|
|
35
|
+
*/
|
|
36
|
+
targetPriceIds: Array<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Opens the window. Read per type: INCLUSIVE on a percentageDiscount, whose window is prorated by day overlap; EXCLUSIVE on a usageDiscount, which corrects a line whose period END falls strictly after this instant.
|
|
30
39
|
*/
|
|
31
40
|
effectiveFrom: Date;
|
|
32
41
|
/**
|
|
33
|
-
*
|
|
42
|
+
* Closes the window, or null for never. Read per type: EXCLUSIVE on a percentageDiscount; INCLUSIVE on a usageDiscount, which corrects a line whose period END falls on or before this instant.
|
|
34
43
|
*/
|
|
35
44
|
effectiveTo: Date | null;
|
|
36
45
|
/**
|
|
37
|
-
* The deal's own name
|
|
46
|
+
* The deal's own name. Shown on each discount line a percentageDiscount emits; a usageDiscount emits no line, so its description is carried here only.
|
|
38
47
|
*/
|
|
39
48
|
description: string | null;
|
|
40
49
|
createdAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionadjustment.d.ts","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AACX,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"subscriptionadjustment.d.ts","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,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,OAAO,CAiBP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -45,6 +45,7 @@ exports.SubscriptionAdjustmentObject = {
|
|
|
45
45
|
};
|
|
46
46
|
exports.SubscriptionAdjustmentType = {
|
|
47
47
|
PercentageDiscount: "percentageDiscount",
|
|
48
|
+
UsageDiscount: "usageDiscount",
|
|
48
49
|
};
|
|
49
50
|
/** @internal */
|
|
50
51
|
exports.SubscriptionAdjustmentObject$inboundSchema = z.nativeEnum(exports.SubscriptionAdjustmentObject);
|
|
@@ -56,7 +57,9 @@ exports.SubscriptionAdjustment$inboundSchema = z.object({
|
|
|
56
57
|
id: z.string(),
|
|
57
58
|
subscriptionId: z.string(),
|
|
58
59
|
type: exports.SubscriptionAdjustmentType$inboundSchema,
|
|
59
|
-
percentageDiscount: z.string(),
|
|
60
|
+
percentageDiscount: z.nullable(z.string()),
|
|
61
|
+
usageDiscount: z.nullable(z.string()),
|
|
62
|
+
targetPriceIds: z.array(z.string()),
|
|
60
63
|
effectiveFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
61
64
|
effectiveTo: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
62
65
|
description: z.nullable(z.string()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionadjustment.js","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"subscriptionadjustment.js","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FH,wEAQC;AApGD,0CAA4B;AAC5B,kDAA8C;AAKjC,QAAA,4BAA4B,GAAG;IAC1C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Q,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CAC7E,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -53,7 +53,7 @@ export declare class Subscriptions extends ClientSDK {
|
|
|
53
53
|
* Create Adjustment
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* Attaches
|
|
56
|
+
* Attaches an adjustment to the subscription for a dated window. A percentageDiscount reduces every discountable charge by a rate and carries one discount line per charge on the invoice. A usageDiscount takes a number of usage units off one metered price's billable quantity before that line is priced, so the line re-slots on a volume ladder and shows the corrected quantity; it emits no line of its own. Tax is assessed on the reduced amount either way. An invoice that already exists is not changed, including one still in draft — the adjustment reaches the periods that close after it is created. There is no update operation, and a window cannot be changed after it is created. To change an adjustment before any invoice has issued under it, delete it and create a replacement. Once an invoice has issued the adjustment is permanent, so set effectiveTo at creation time whenever the deal has a known end date.
|
|
57
57
|
*/
|
|
58
58
|
createSubscriptionAdjustment(request: operations.CreateSubscriptionAdjustmentRequest, options?: RequestOptions): Promise<models.SubscriptionAdjustment>;
|
|
59
59
|
/**
|
|
@@ -84,7 +84,7 @@ class Subscriptions extends sdks_js_1.ClientSDK {
|
|
|
84
84
|
* Create Adjustment
|
|
85
85
|
*
|
|
86
86
|
* @remarks
|
|
87
|
-
* Attaches
|
|
87
|
+
* Attaches an adjustment to the subscription for a dated window. A percentageDiscount reduces every discountable charge by a rate and carries one discount line per charge on the invoice. A usageDiscount takes a number of usage units off one metered price's billable quantity before that line is priced, so the line re-slots on a volume ladder and shows the corrected quantity; it emits no line of its own. Tax is assessed on the reduced amount either way. An invoice that already exists is not changed, including one still in draft — the adjustment reaches the periods that close after it is created. There is no update operation, and a window cannot be changed after it is created. To change an adjustment before any invoice has issued under it, delete it and create a replacement. Once an invoice has issued the adjustment is permanent, so set effectiveTo at creation time whenever the deal has a known end date.
|
|
88
88
|
*/
|
|
89
89
|
async createSubscriptionAdjustment(request, options) {
|
|
90
90
|
return (0, fp_js_1.unwrapAsync)((0, subscriptionsCreateSubscriptionAdjustment_js_1.subscriptionsCreateSubscriptionAdjustment)(this, request, options));
|
|
@@ -67,7 +67,7 @@ async function $do(client, request, options) {
|
|
|
67
67
|
const req = requestRes.value;
|
|
68
68
|
const doResult = await client._do(req, {
|
|
69
69
|
context,
|
|
70
|
-
errorCodes: ["400", "403", "4XX", "500", "5XX"],
|
|
70
|
+
errorCodes: ["400", "403", "429", "4XX", "500", "5XX"],
|
|
71
71
|
retryConfig: context.retryConfig,
|
|
72
72
|
retryCodes: context.retryCodes,
|
|
73
73
|
});
|
|
@@ -78,7 +78,7 @@ async function $do(client, request, options) {
|
|
|
78
78
|
const responseFields = {
|
|
79
79
|
HttpMeta: { Response: response, Request: req },
|
|
80
80
|
};
|
|
81
|
-
const [result] = await M.match(M.json(200, operations.ListCustomersResponse$inboundSchema), M.jsonErr(400, errors.BadRequest$inboundSchema), M.jsonErr(403, errors.ErrorT$inboundSchema), M.jsonErr(500, errors.ErrorT$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
81
|
+
const [result] = await M.match(M.json(200, operations.ListCustomersResponse$inboundSchema), M.jsonErr(400, errors.BadRequest$inboundSchema), M.jsonErr([403, 429], errors.ErrorT$inboundSchema), M.jsonErr(500, errors.ErrorT$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
82
82
|
if (!result.ok) {
|
|
83
83
|
return [result, { status: "complete", request: req, response }];
|
|
84
84
|
}
|
|
@@ -1 +1 @@
|
|
|
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AAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Create Adjustment
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Attaches
|
|
16
|
+
* Attaches an adjustment to the subscription for a dated window. A percentageDiscount reduces every discountable charge by a rate and carries one discount line per charge on the invoice. A usageDiscount takes a number of usage units off one metered price's billable quantity before that line is priced, so the line re-slots on a volume ladder and shows the corrected quantity; it emits no line of its own. Tax is assessed on the reduced amount either way. An invoice that already exists is not changed, including one still in draft — the adjustment reaches the periods that close after it is created. There is no update operation, and a window cannot be changed after it is created. To change an adjustment before any invoice has issued under it, delete it and create a replacement. Once an invoice has issued the adjustment is permanent, so set effectiveTo at creation time whenever the deal has a known end date.
|
|
17
17
|
*/
|
|
18
18
|
export declare function subscriptionsCreateSubscriptionAdjustment(client: PaygenticCore, request: operations.CreateSubscriptionAdjustmentRequest, options?: RequestOptions): APIPromise<Result<models.SubscriptionAdjustment, errors.BadRequest | errors.ErrorT | PaygenticError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=subscriptionsCreateSubscriptionAdjustment.d.ts.map
|
|
@@ -15,7 +15,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
15
15
|
* Create Adjustment
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Attaches
|
|
18
|
+
* Attaches an adjustment to the subscription for a dated window. A percentageDiscount reduces every discountable charge by a rate and carries one discount line per charge on the invoice. A usageDiscount takes a number of usage units off one metered price's billable quantity before that line is priced, so the line re-slots on a volume ladder and shows the corrected quantity; it emits no line of its own. Tax is assessed on the reduced amount either way. An invoice that already exists is not changed, including one still in draft — the adjustment reaches the periods that close after it is created. There is no update operation, and a window cannot be changed after it is created. To change an adjustment before any invoice has issued under it, delete it and create a replacement. Once an invoice has issued the adjustment is permanent, so set effectiveTo at creation time whenever the deal has a known end date.
|
|
19
19
|
*/
|
|
20
20
|
export function subscriptionsCreateSubscriptionAdjustment(client, request, options) {
|
|
21
21
|
return new APIPromise($do(client, request, options));
|
|
@@ -69,7 +69,7 @@ async function $do(client, request, options) {
|
|
|
69
69
|
const req = requestRes.value;
|
|
70
70
|
const doResult = await client._do(req, {
|
|
71
71
|
context,
|
|
72
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
72
|
+
errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "5XX"],
|
|
73
73
|
retryConfig: context.retryConfig,
|
|
74
74
|
retryCodes: context.retryCodes,
|
|
75
75
|
});
|
|
@@ -80,7 +80,7 @@ async function $do(client, request, options) {
|
|
|
80
80
|
const responseFields = {
|
|
81
81
|
HttpMeta: { Response: response, Request: req },
|
|
82
82
|
};
|
|
83
|
-
const [result] = await M.match(M.json([200, 201], models.SubscriptionReconciliation$inboundSchema), M.jsonErr(400, errors.BadRequest$inboundSchema), M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema), M.jsonErr(500, errors.ErrorT$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
83
|
+
const [result] = await M.match(M.json([200, 201], models.SubscriptionReconciliation$inboundSchema), M.jsonErr(400, errors.BadRequest$inboundSchema), M.jsonErr([401, 403, 404, 429], errors.ErrorT$inboundSchema), M.jsonErr(500, errors.ErrorT$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
84
84
|
if (!result.ok) {
|
|
85
85
|
return [result, { status: "complete", request: req, response }];
|
|
86
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionsReconcileSubscriptionFeatures.js","sourceRoot":"","sources":["../../../src/funcs/subscriptionsReconcileSubscriptionFeatures.ts"],"names":[],"mappings":"AAAA;;GAEG;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E,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "0.1.0";
|
|
34
|
-
readonly sdkVersion: "0.9.
|
|
34
|
+
readonly sdkVersion: "0.9.9";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.9.9 2.879.13 0.1.0 @paygentic/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -31,8 +31,8 @@ export function serverURLFromOptions(options) {
|
|
|
31
31
|
export const SDK_METADATA = {
|
|
32
32
|
language: "typescript",
|
|
33
33
|
openapiDocVersion: "0.1.0",
|
|
34
|
-
sdkVersion: "0.9.
|
|
34
|
+
sdkVersion: "0.9.9",
|
|
35
35
|
genVersion: "2.879.13",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.9.9 2.879.13 0.1.0 @paygentic/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
export type CreatePercentageDiscountAdjustment = {
|
|
3
|
+
/**
|
|
4
|
+
* Reduces every discountable charge on the invoice by a rate.
|
|
5
|
+
*/
|
|
6
|
+
type: "percentageDiscount";
|
|
7
|
+
/**
|
|
8
|
+
* The discount rate as a decimal fraction between 0 and 1, sent as a string. "0.35" means 35 percent. "1" means 100 percent, not 1 percent. At most 6 decimal places. A value of 0 or above 1 is rejected.
|
|
9
|
+
*/
|
|
10
|
+
percentageDiscount: string;
|
|
11
|
+
/**
|
|
12
|
+
* The first instant the discount applies. Inclusive.
|
|
13
|
+
*/
|
|
14
|
+
effectiveFrom: Date;
|
|
15
|
+
/**
|
|
16
|
+
* The instant the discount stops applying. Exclusive, so a window ending on the same date another begins neither overlaps nor leaves a gap. Null means the discount never stops, and it cannot be ended later — set an instant whenever the deal has a known end date. Must be after effectiveFrom.
|
|
17
|
+
*/
|
|
18
|
+
effectiveTo?: Date | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The deal's own name, shown on each discount line of the invoice.
|
|
21
|
+
*/
|
|
22
|
+
description?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* A key of your choosing that makes a retry safe. Sending the same key against the same subscription returns the adjustment already created and creates no second one. Without a key a retried request creates a second adjustment, and two percentage discounts compound — two of 0.35 bill 57.75 percent off, not 35 percent.
|
|
25
|
+
*/
|
|
26
|
+
idempotencyKey?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type CreatePercentageDiscountAdjustment$Outbound = {
|
|
30
|
+
type: "percentageDiscount";
|
|
31
|
+
percentageDiscount: string;
|
|
32
|
+
effectiveFrom: string;
|
|
33
|
+
effectiveTo?: string | null | undefined;
|
|
34
|
+
description?: string | null | undefined;
|
|
35
|
+
idempotencyKey?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const CreatePercentageDiscountAdjustment$outboundSchema: z.ZodType<CreatePercentageDiscountAdjustment$Outbound, z.ZodTypeDef, CreatePercentageDiscountAdjustment>;
|
|
39
|
+
export declare function createPercentageDiscountAdjustmentToJSON(createPercentageDiscountAdjustment: CreatePercentageDiscountAdjustment): string;
|
|
40
|
+
//# sourceMappingURL=createpercentagediscountadjustment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createpercentagediscountadjustment.d.ts","sourceRoot":"","sources":["../../../src/models/createpercentagediscountadjustment.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,IAAI,EAAE,oBAAoB,CAAC;IAC3B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iDAAiD,EAAE,CAAC,CAAC,OAAO,CACvE,2CAA2C,EAC3C,CAAC,CAAC,UAAU,EACZ,kCAAkC,CAQlC,CAAC;AAEH,wBAAgB,wCAAwC,CACtD,kCAAkC,EAAE,kCAAkC,GACrE,MAAM,CAMR"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const CreatePercentageDiscountAdjustment$outboundSchema = z.object({
|
|
7
|
+
type: z.literal("percentageDiscount"),
|
|
8
|
+
percentageDiscount: z.string(),
|
|
9
|
+
effectiveFrom: z.date().transform(v => v.toISOString()),
|
|
10
|
+
effectiveTo: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
11
|
+
description: z.nullable(z.string()).optional(),
|
|
12
|
+
idempotencyKey: z.string().optional(),
|
|
13
|
+
});
|
|
14
|
+
export function createPercentageDiscountAdjustmentToJSON(createPercentageDiscountAdjustment) {
|
|
15
|
+
return JSON.stringify(CreatePercentageDiscountAdjustment$outboundSchema.parse(createPercentageDiscountAdjustment));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=createpercentagediscountadjustment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createpercentagediscountadjustment.js","sourceRoot":"","sources":["../../../src/models/createpercentagediscountadjustment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAuC5B,gBAAgB;AAChB,MAAM,CAAC,MAAM,iDAAiD,GAI1D,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5E,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEH,MAAM,UAAU,wCAAwC,CACtD,kCAAsE;IAEtE,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAiD,CAAC,KAAK,CACrD,kCAAkC,CACnC,CACF,CAAC;AACJ,CAAC"}
|