@paygentic/sdk 0.9.7 → 0.9.8
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 +22 -0
- package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.js +13 -1
- package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
- package/dist/commonjs/models/price.d.ts +22 -0
- package/dist/commonjs/models/price.d.ts.map +1 -1
- package/dist/commonjs/models/price.js +13 -1
- package/dist/commonjs/models/price.js.map +1 -1
- 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 +22 -0
- package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/esm/models/planversionpriceslot.js +12 -0
- package/dist/esm/models/planversionpriceslot.js.map +1 -1
- package/dist/esm/models/price.d.ts +22 -0
- package/dist/esm/models/price.d.ts.map +1 -1
- package/dist/esm/models/price.js +12 -0
- package/dist/esm/models/price.js.map +1 -1
- 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 +30 -0
- package/src/models/price.ts +28 -0
- 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
|
@@ -33,6 +33,10 @@ export type CreatePriceRequest = {
|
|
|
33
33
|
* Line item label shown on customer invoices. Sample values: 'Claude Token Consumption', 'Storage Usage (GB)', 'Inference API Calls', 'Image Generation Count', 'Training Compute Hours', 'Data Transfer (TB)'
|
|
34
34
|
*/
|
|
35
35
|
invoiceDisplayName: string;
|
|
36
|
+
/**
|
|
37
|
+
* 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'
|
|
38
|
+
*/
|
|
39
|
+
invoiceDisplayGroup?: string | null | undefined;
|
|
36
40
|
/**
|
|
37
41
|
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
38
42
|
*/
|
|
@@ -51,6 +55,14 @@ export type CreatePriceRequest = {
|
|
|
51
55
|
* 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.
|
|
52
56
|
*/
|
|
53
57
|
isObligation?: boolean | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* 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.
|
|
60
|
+
*/
|
|
61
|
+
rateType?: models.RateType | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*/
|
|
65
|
+
tax?: models.PriceTax | undefined;
|
|
54
66
|
/**
|
|
55
67
|
* Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
56
68
|
*/
|
|
@@ -65,12 +77,15 @@ export type CreatePriceRequest$Outbound = {
|
|
|
65
77
|
pricingUnitId?: string | undefined;
|
|
66
78
|
model?: string | undefined;
|
|
67
79
|
invoiceDisplayName: string;
|
|
80
|
+
invoiceDisplayGroup?: string | null | undefined;
|
|
68
81
|
paymentTerm: string;
|
|
69
82
|
billingCadence?: string | null | undefined;
|
|
70
83
|
properties: models.PriceProperties$Outbound;
|
|
71
84
|
feature?: models.PriceFeatureInput$Outbound | undefined;
|
|
72
85
|
grantDiscountEnabled: boolean;
|
|
73
86
|
isObligation: boolean;
|
|
87
|
+
rateType?: string | undefined;
|
|
88
|
+
tax?: models.PriceTax$Outbound | undefined;
|
|
74
89
|
quantity?: number | undefined;
|
|
75
90
|
};
|
|
76
91
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createprice.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/createprice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/E,MAAM,MAAM,kBAAkB,GAA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,SAAS,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAiBlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -56,12 +56,15 @@ exports.CreatePriceRequest$outboundSchema = z.object({
|
|
|
56
56
|
pricingUnitId: z.string().optional(),
|
|
57
57
|
model: models.PriceModelInput$outboundSchema.optional(),
|
|
58
58
|
invoiceDisplayName: z.string(),
|
|
59
|
+
invoiceDisplayGroup: z.nullable(z.string()).optional(),
|
|
59
60
|
paymentTerm: exports.CreatePricePaymentTerm$outboundSchema,
|
|
60
61
|
billingCadence: z.nullable(z.string()).optional(),
|
|
61
62
|
properties: models.PriceProperties$outboundSchema,
|
|
62
63
|
feature: models.PriceFeatureInput$outboundSchema.optional(),
|
|
63
64
|
grantDiscountEnabled: z.boolean().default(false),
|
|
64
65
|
isObligation: z.boolean().default(false),
|
|
66
|
+
rateType: models.RateType$outboundSchema.optional(),
|
|
67
|
+
tax: models.PriceTax$outboundSchema.optional(),
|
|
65
68
|
quantity: z.number().int().optional(),
|
|
66
69
|
});
|
|
67
70
|
function createPriceRequestToJSON(createPriceRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createprice.js","sourceRoot":"","sources":["../../../../src/models/operations/createprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"createprice.js","sourceRoot":"","sources":["../../../../src/models/operations/createprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HH,4DAMC;AA9HD,0CAA4B;AAE5B,oDAA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B,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -27,6 +27,10 @@ export type UpdatePriceRequestBody = {
|
|
|
27
27
|
* Updated invoice line item label. Sample values: 'LLM Token Usage', 'Storage Charges', 'API Call Fees'
|
|
28
28
|
*/
|
|
29
29
|
invoiceDisplayName?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 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'
|
|
32
|
+
*/
|
|
33
|
+
invoiceDisplayGroup?: string | null | undefined;
|
|
30
34
|
/**
|
|
31
35
|
* The pricing model to set. 'standard' and 'volume' are accepted. Legacy 'dynamic'/'percentage' prices can still be edited (other fields) but cannot be switched back to those models. Percentage/revenue-share is expressed via 'standard' with a unit-price multiplier.
|
|
32
36
|
*/
|
|
@@ -52,6 +56,14 @@ export type UpdatePriceRequestBody = {
|
|
|
52
56
|
* 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.
|
|
53
57
|
*/
|
|
54
58
|
isObligation?: boolean | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* 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.
|
|
61
|
+
*/
|
|
62
|
+
rateType?: models.RateType | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*/
|
|
66
|
+
tax?: models.PriceTax | undefined;
|
|
55
67
|
/**
|
|
56
68
|
* Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
57
69
|
*/
|
|
@@ -76,6 +88,7 @@ export type UpdatePriceRequestBody$Outbound = {
|
|
|
76
88
|
billableMetricId?: string | undefined;
|
|
77
89
|
pricingUnitId?: string | null | undefined;
|
|
78
90
|
invoiceDisplayName?: string | undefined;
|
|
91
|
+
invoiceDisplayGroup?: string | null | undefined;
|
|
79
92
|
model?: string | undefined;
|
|
80
93
|
properties?: models.PriceProperties$Outbound | undefined;
|
|
81
94
|
paymentTerm?: string | undefined;
|
|
@@ -83,6 +96,8 @@ export type UpdatePriceRequestBody$Outbound = {
|
|
|
83
96
|
feature?: models.PriceFeatureInput$Outbound | null | undefined;
|
|
84
97
|
grantDiscountEnabled?: boolean | undefined;
|
|
85
98
|
isObligation?: boolean | undefined;
|
|
99
|
+
rateType?: string | undefined;
|
|
100
|
+
tax?: models.PriceTax$Outbound | undefined;
|
|
86
101
|
quantity?: number | undefined;
|
|
87
102
|
};
|
|
88
103
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateprice.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updateprice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,MAAM,MAA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,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,sBAAsB,CAgBtB,CAAC;AAEH,wBAAgB,4BAA4B,CAC1C,sBAAsB,EAAE,sBAAsB,GAC7C,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,+BAA+B,CAAC;CAC9C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAQlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR;AAED,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -58,6 +58,7 @@ exports.UpdatePriceRequestBody$outboundSchema = z.object({
|
|
|
58
58
|
billableMetricId: z.string().optional(),
|
|
59
59
|
pricingUnitId: z.nullable(z.string()).optional(),
|
|
60
60
|
invoiceDisplayName: z.string().optional(),
|
|
61
|
+
invoiceDisplayGroup: z.nullable(z.string()).optional(),
|
|
61
62
|
model: models.PriceModelInput$outboundSchema.optional(),
|
|
62
63
|
properties: models.PriceProperties$outboundSchema.optional(),
|
|
63
64
|
paymentTerm: exports.UpdatePricePaymentTerm$outboundSchema.optional(),
|
|
@@ -65,6 +66,8 @@ exports.UpdatePriceRequestBody$outboundSchema = z.object({
|
|
|
65
66
|
feature: z.nullable(models.PriceFeatureInput$outboundSchema).optional(),
|
|
66
67
|
grantDiscountEnabled: z.boolean().optional(),
|
|
67
68
|
isObligation: z.boolean().optional(),
|
|
69
|
+
rateType: models.RateType$outboundSchema.optional(),
|
|
70
|
+
tax: models.PriceTax$outboundSchema.optional(),
|
|
68
71
|
quantity: z.number().int().optional(),
|
|
69
72
|
});
|
|
70
73
|
function updatePriceRequestBodyToJSON(updatePriceRequestBody) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateprice.js","sourceRoot":"","sources":["../../../../src/models/operations/updateprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"updateprice.js","sourceRoot":"","sources":["../../../../src/models/operations/updateprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyIH,oEAMC;AAsBD,4DAMC;AAaD,gEAQC;AA9LD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAIjD,oDAAsC;AAEtC;;GAEG;AACU,QAAA,sBAAsB,GAAG;IACpC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;CACf,CAAC;AA4EX,gBAAgB;AACH,QAAA,qCAAqC,GAE9C,CAAC,CAAC,UAAU,CAAC,8BAAsB,CAAC,CAAC;AAoBzC,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,mBAAmB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,MAAM,CAAC,8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CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAEH,SAAgB,0BAA0B,CACxC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { PriceFeature } from "./pricefeature.js";
|
|
6
|
+
import { PriceTax } from "./pricetax.js";
|
|
6
7
|
export declare const PlanVersionPriceSlotObject: {
|
|
7
8
|
readonly Price: "price";
|
|
8
9
|
};
|
|
@@ -19,6 +20,17 @@ export declare const PlanVersionPriceSlotPaymentTerm: {
|
|
|
19
20
|
readonly InAdvance: "in_advance";
|
|
20
21
|
};
|
|
21
22
|
export type PlanVersionPriceSlotPaymentTerm = ClosedEnum<typeof PlanVersionPriceSlotPaymentTerm>;
|
|
23
|
+
/**
|
|
24
|
+
* 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.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PlanVersionPriceSlotRateType: {
|
|
27
|
+
readonly Amount: "amount";
|
|
28
|
+
readonly Proportion: "proportion";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 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.
|
|
32
|
+
*/
|
|
33
|
+
export type PlanVersionPriceSlotRateType = ClosedEnum<typeof PlanVersionPriceSlotRateType>;
|
|
22
34
|
/**
|
|
23
35
|
* One price slot on a plan version. Every `Price` field is present, plus `priceDeleted` layered on top.
|
|
24
36
|
*/
|
|
@@ -64,6 +76,14 @@ export type PlanVersionPriceSlot = {
|
|
|
64
76
|
* 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.
|
|
65
77
|
*/
|
|
66
78
|
isObligation: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 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.
|
|
81
|
+
*/
|
|
82
|
+
rateType: PlanVersionPriceSlotRateType;
|
|
83
|
+
/**
|
|
84
|
+
* 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.
|
|
85
|
+
*/
|
|
86
|
+
tax: PriceTax;
|
|
67
87
|
/**
|
|
68
88
|
* Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
69
89
|
*/
|
|
@@ -80,6 +100,8 @@ export declare const PlanVersionPriceSlotModel$inboundSchema: z.ZodNativeEnum<ty
|
|
|
80
100
|
/** @internal */
|
|
81
101
|
export declare const PlanVersionPriceSlotPaymentTerm$inboundSchema: z.ZodNativeEnum<typeof PlanVersionPriceSlotPaymentTerm>;
|
|
82
102
|
/** @internal */
|
|
103
|
+
export declare const PlanVersionPriceSlotRateType$inboundSchema: z.ZodNativeEnum<typeof PlanVersionPriceSlotRateType>;
|
|
104
|
+
/** @internal */
|
|
83
105
|
export declare const PlanVersionPriceSlot$inboundSchema: z.ZodType<PlanVersionPriceSlot, z.ZodTypeDef, unknown>;
|
|
84
106
|
export declare function planVersionPriceSlotFromJSON(jsonString: string): SafeParseResult<PlanVersionPriceSlot, SDKValidationError>;
|
|
85
107
|
//# sourceMappingURL=planversionpriceslot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planversionpriceslot.d.ts","sourceRoot":"","sources":["../../../src/models/planversionpriceslot.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;
|
|
1
|
+
{"version":3,"file":"planversionpriceslot.d.ts","sourceRoot":"","sources":["../../../src/models/planversionpriceslot.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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defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.PlanVersionPriceSlot$inboundSchema = exports.PlanVersionPriceSlotPaymentTerm$inboundSchema = exports.PlanVersionPriceSlotModel$inboundSchema = exports.PlanVersionPriceSlotObject$inboundSchema = exports.PlanVersionPriceSlotPaymentTerm = exports.PlanVersionPriceSlotModel = exports.PlanVersionPriceSlotObject = void 0;
|
|
39
|
+
exports.PlanVersionPriceSlot$inboundSchema = exports.PlanVersionPriceSlotRateType$inboundSchema = exports.PlanVersionPriceSlotPaymentTerm$inboundSchema = exports.PlanVersionPriceSlotModel$inboundSchema = exports.PlanVersionPriceSlotObject$inboundSchema = exports.PlanVersionPriceSlotRateType = exports.PlanVersionPriceSlotPaymentTerm = exports.PlanVersionPriceSlotModel = exports.PlanVersionPriceSlotObject = void 0;
|
|
40
40
|
exports.planVersionPriceSlotFromJSON = planVersionPriceSlotFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
43
|
const pricefeature_js_1 = require("./pricefeature.js");
|
|
44
|
+
const pricetax_js_1 = require("./pricetax.js");
|
|
44
45
|
exports.PlanVersionPriceSlotObject = {
|
|
45
46
|
Price: "price",
|
|
46
47
|
};
|
|
@@ -54,6 +55,13 @@ exports.PlanVersionPriceSlotPaymentTerm = {
|
|
|
54
55
|
InArrears: "in_arrears",
|
|
55
56
|
InAdvance: "in_advance",
|
|
56
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* 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.
|
|
60
|
+
*/
|
|
61
|
+
exports.PlanVersionPriceSlotRateType = {
|
|
62
|
+
Amount: "amount",
|
|
63
|
+
Proportion: "proportion",
|
|
64
|
+
};
|
|
57
65
|
/** @internal */
|
|
58
66
|
exports.PlanVersionPriceSlotObject$inboundSchema = z.nativeEnum(exports.PlanVersionPriceSlotObject);
|
|
59
67
|
/** @internal */
|
|
@@ -61,6 +69,8 @@ exports.PlanVersionPriceSlotModel$inboundSchema = z.nativeEnum(exports.PlanVersi
|
|
|
61
69
|
/** @internal */
|
|
62
70
|
exports.PlanVersionPriceSlotPaymentTerm$inboundSchema = z.nativeEnum(exports.PlanVersionPriceSlotPaymentTerm);
|
|
63
71
|
/** @internal */
|
|
72
|
+
exports.PlanVersionPriceSlotRateType$inboundSchema = z.nativeEnum(exports.PlanVersionPriceSlotRateType);
|
|
73
|
+
/** @internal */
|
|
64
74
|
exports.PlanVersionPriceSlot$inboundSchema = z.object({
|
|
65
75
|
id: z.string(),
|
|
66
76
|
object: exports.PlanVersionPriceSlotObject$inboundSchema.default("price"),
|
|
@@ -80,6 +90,8 @@ exports.PlanVersionPriceSlot$inboundSchema = z.object({
|
|
|
80
90
|
features: z.array(pricefeature_js_1.PriceFeature$inboundSchema).optional(),
|
|
81
91
|
grantDiscountEnabled: z.boolean().default(false),
|
|
82
92
|
isObligation: z.boolean().default(false),
|
|
93
|
+
rateType: exports.PlanVersionPriceSlotRateType$inboundSchema.default("amount"),
|
|
94
|
+
tax: pricetax_js_1.PriceTax$inboundSchema,
|
|
83
95
|
quantity: z.number().int().default(1),
|
|
84
96
|
priceDeleted: z.boolean(),
|
|
85
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planversionpriceslot.js","sourceRoot":"","sources":["../../../src/models/planversionpriceslot.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"planversionpriceslot.js","sourceRoot":"","sources":["../../../src/models/planversionpriceslot.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgKH,oEAQC;AAtKD,0CAA4B;AAC5B,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AAE,EAAE,CAAC,0CAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { PriceFeature } from "./pricefeature.js";
|
|
6
|
+
import { PriceTax } from "./pricetax.js";
|
|
6
7
|
export declare const PriceObject: {
|
|
7
8
|
readonly Price: "price";
|
|
8
9
|
};
|
|
@@ -19,6 +20,17 @@ export declare const PricePaymentTerm: {
|
|
|
19
20
|
readonly InAdvance: "in_advance";
|
|
20
21
|
};
|
|
21
22
|
export type PricePaymentTerm = ClosedEnum<typeof PricePaymentTerm>;
|
|
23
|
+
/**
|
|
24
|
+
* 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.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PriceRateType: {
|
|
27
|
+
readonly Amount: "amount";
|
|
28
|
+
readonly Proportion: "proportion";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 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.
|
|
32
|
+
*/
|
|
33
|
+
export type PriceRateType = ClosedEnum<typeof PriceRateType>;
|
|
22
34
|
export type Price = {
|
|
23
35
|
/**
|
|
24
36
|
* Unique identifier for a price
|
|
@@ -61,6 +73,14 @@ export type Price = {
|
|
|
61
73
|
* 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
74
|
*/
|
|
63
75
|
isObligation: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
*/
|
|
79
|
+
rateType: PriceRateType;
|
|
80
|
+
/**
|
|
81
|
+
* 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.
|
|
82
|
+
*/
|
|
83
|
+
tax: PriceTax;
|
|
64
84
|
/**
|
|
65
85
|
* Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
66
86
|
*/
|
|
@@ -73,6 +93,8 @@ export declare const PriceModel1$inboundSchema: z.ZodNativeEnum<typeof PriceMode
|
|
|
73
93
|
/** @internal */
|
|
74
94
|
export declare const PricePaymentTerm$inboundSchema: z.ZodNativeEnum<typeof PricePaymentTerm>;
|
|
75
95
|
/** @internal */
|
|
96
|
+
export declare const PriceRateType$inboundSchema: z.ZodNativeEnum<typeof PriceRateType>;
|
|
97
|
+
/** @internal */
|
|
76
98
|
export declare const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown>;
|
|
77
99
|
export declare function priceFromJSON(jsonString: string): SafeParseResult<Price, SDKValidationError>;
|
|
78
100
|
//# sourceMappingURL=price.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../src/models/price.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;
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../src/models/price.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,QAAQ,EAA0B,MAAM,eAAe,CAAC;AAEjE,eAAO,MAAM,WAAW;;CAEd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzD,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzD,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7D,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,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;AAEnC,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,aAAa,CACvD,OAAO,aAAa,CACS,CAAC;AAEhC,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CA2BpE,CAAC;AAEL,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAM5C"}
|
|
@@ -36,11 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Price$inboundSchema = exports.PricePaymentTerm$inboundSchema = exports.PriceModel1$inboundSchema = exports.PriceObject$inboundSchema = exports.PricePaymentTerm = exports.PriceModel1 = exports.PriceObject = void 0;
|
|
39
|
+
exports.Price$inboundSchema = exports.PriceRateType$inboundSchema = exports.PricePaymentTerm$inboundSchema = exports.PriceModel1$inboundSchema = exports.PriceObject$inboundSchema = exports.PriceRateType = exports.PricePaymentTerm = exports.PriceModel1 = exports.PriceObject = void 0;
|
|
40
40
|
exports.priceFromJSON = priceFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
43
|
const pricefeature_js_1 = require("./pricefeature.js");
|
|
44
|
+
const pricetax_js_1 = require("./pricetax.js");
|
|
44
45
|
exports.PriceObject = {
|
|
45
46
|
Price: "price",
|
|
46
47
|
};
|
|
@@ -54,6 +55,13 @@ exports.PricePaymentTerm = {
|
|
|
54
55
|
InArrears: "in_arrears",
|
|
55
56
|
InAdvance: "in_advance",
|
|
56
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* 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.
|
|
60
|
+
*/
|
|
61
|
+
exports.PriceRateType = {
|
|
62
|
+
Amount: "amount",
|
|
63
|
+
Proportion: "proportion",
|
|
64
|
+
};
|
|
57
65
|
/** @internal */
|
|
58
66
|
exports.PriceObject$inboundSchema = z
|
|
59
67
|
.nativeEnum(exports.PriceObject);
|
|
@@ -63,6 +71,8 @@ exports.PriceModel1$inboundSchema = z
|
|
|
63
71
|
/** @internal */
|
|
64
72
|
exports.PricePaymentTerm$inboundSchema = z.nativeEnum(exports.PricePaymentTerm);
|
|
65
73
|
/** @internal */
|
|
74
|
+
exports.PriceRateType$inboundSchema = z.nativeEnum(exports.PriceRateType);
|
|
75
|
+
/** @internal */
|
|
66
76
|
exports.Price$inboundSchema = z
|
|
67
77
|
.object({
|
|
68
78
|
id: z.string(),
|
|
@@ -83,6 +93,8 @@ exports.Price$inboundSchema = z
|
|
|
83
93
|
features: z.array(pricefeature_js_1.PriceFeature$inboundSchema).optional(),
|
|
84
94
|
grantDiscountEnabled: z.boolean().default(false),
|
|
85
95
|
isObligation: z.boolean().default(false),
|
|
96
|
+
rateType: exports.PriceRateType$inboundSchema.default("amount"),
|
|
97
|
+
tax: pricetax_js_1.PriceTax$inboundSchema,
|
|
86
98
|
quantity: z.number().int().default(1),
|
|
87
99
|
});
|
|
88
100
|
function priceFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../../src/models/price.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../../src/models/price.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IH,sCAQC;AArJD,0CAA4B;AAC5B,kDAA8C;AAI9C,uD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CAAC,CAAC,EAC/C,mCAAmC,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* 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.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SupplyScope: {
|
|
9
|
+
readonly InScope: "IN_SCOPE";
|
|
10
|
+
readonly OutsideScope: "OUTSIDE_SCOPE";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
export type SupplyScope = ClosedEnum<typeof SupplyScope>;
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
*/
|
|
19
|
+
export declare const OutsideScopeLabel: {
|
|
20
|
+
readonly Cashback: "CASHBACK";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 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.
|
|
24
|
+
*/
|
|
25
|
+
export type OutsideScopeLabel = ClosedEnum<typeof OutsideScopeLabel>;
|
|
26
|
+
/**
|
|
27
|
+
* 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.
|
|
28
|
+
*/
|
|
29
|
+
export type PriceTax = {
|
|
30
|
+
/**
|
|
31
|
+
* 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.
|
|
32
|
+
*/
|
|
33
|
+
supplyScope: SupplyScope;
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*/
|
|
37
|
+
outsideScopeLabel?: OutsideScopeLabel | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const SupplyScope$inboundSchema: z.ZodNativeEnum<typeof SupplyScope>;
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const SupplyScope$outboundSchema: z.ZodNativeEnum<typeof SupplyScope>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const OutsideScopeLabel$inboundSchema: z.ZodNativeEnum<typeof OutsideScopeLabel>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const OutsideScopeLabel$outboundSchema: z.ZodNativeEnum<typeof OutsideScopeLabel>;
|
|
47
|
+
/** @internal */
|
|
48
|
+
export declare const PriceTax$inboundSchema: z.ZodType<PriceTax, z.ZodTypeDef, unknown>;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type PriceTax$Outbound = {
|
|
51
|
+
supplyScope: string;
|
|
52
|
+
outsideScopeLabel?: string | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const PriceTax$outboundSchema: z.ZodType<PriceTax$Outbound, z.ZodTypeDef, PriceTax>;
|
|
56
|
+
export declare function priceTaxToJSON(priceTax: PriceTax): string;
|
|
57
|
+
export declare function priceTaxFromJSON(jsonString: string): SafeParseResult<PriceTax, SDKValidationError>;
|
|
58
|
+
//# sourceMappingURL=pricetax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricetax.d.ts","sourceR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AAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAC7C,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,QAAQ,CAIR,CAAC;AAEH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEzD;AACD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
|
|
@@ -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
|
+
{"version":3,"file":"pricetax.js","sourceRoot":"","sources":["../../../src/models/pricetax.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFH,wCAEC;AACD,4CAQC;AA/FD,0CAA4B;AAC5B,kDAA8C;AAK9C;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,eAAe;CACrB,CAAC;AAMX;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,UAAU;CACZ,CAAC;AAoBX,gBAAgB;AACH,QAAA,yBAAyB,GAAwC,CAAC;KAC5E,UAAU,CAAC,mBAAW,CAAC,CAAC;AAC3B,gBAAgB;AACH,QAAA,0BAA0B,GACrC,iCAAyB,CAAC;AAE5B,gBAAgB;AACH,QAAA,+BAA+B,GAExC,CAAC,CAAC,UAAU,CAAC,yBAAiB,CAAC,CAAC;AACpC,gBAAgB;AACH,QAAA,gCAAgC,GAEzC,uCAA+B,CAAC;AAEpC,gBAAgB;AACH,QAAA,sBAAsB,GAI/B,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,iCAAyB;IACtC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,uCAA+B,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAOH,gBAAgB;AACH,QAAA,uBAAuB,GAIhC,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,kCAA0B;IACvC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,wCAAgC,CAAC,CAAC,QAAQ,EAAE;CAC3E,CAAC,CAAC;AAEH,SAAgB,cAAc,CAAC,QAAkB;IAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,+BAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjE,CAAC;AACD,SAAgB,gBAAgB,CAC9B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,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"}
|