@paygentic/sdk 0.9.11 → 0.9.12
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/README.md +6 -0
- package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts +3 -2
- package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts.map +1 -1
- package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.js +3 -3
- package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.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/createmaximumquantityadjustment.d.ts +45 -0
- package/dist/commonjs/models/createmaximumquantityadjustment.d.ts.map +1 -0
- package/dist/commonjs/models/createmaximumquantityadjustment.js +55 -0
- package/dist/commonjs/models/createmaximumquantityadjustment.js.map +1 -0
- package/dist/commonjs/models/createminimumquantityadjustment.d.ts +45 -0
- package/dist/commonjs/models/createminimumquantityadjustment.d.ts.map +1 -0
- package/dist/commonjs/models/createminimumquantityadjustment.js +55 -0
- package/dist/commonjs/models/createminimumquantityadjustment.js.map +1 -0
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts +5 -3
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.js +4 -0
- package/dist/commonjs/models/createsubscriptionadjustmentrequest.js.map +1 -1
- package/dist/commonjs/models/currencybreakdownentry.d.ts +1 -1
- package/dist/commonjs/models/grouptrendentry.d.ts +1 -1
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoicecategorysummary.d.ts +1 -1
- package/dist/commonjs/models/operations/createbillablemetric.d.ts +3 -3
- package/dist/commonjs/models/operations/createbillablemetric.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createbillablemetric.js +1 -1
- package/dist/commonjs/models/operations/createbillablemetric.js.map +1 -1
- package/dist/commonjs/models/operations/createtestclock.d.ts +1 -1
- package/dist/commonjs/models/operations/updatebillablemetric.d.ts +4 -4
- package/dist/commonjs/models/operations/updatebillablemetric.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatebillablemetric.js +1 -1
- package/dist/commonjs/models/operations/updatebillablemetric.js.map +1 -1
- package/dist/commonjs/models/profitabilityrow.d.ts +1 -1
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +2 -2
- package/dist/commonjs/models/revenuetrendbucket.d.ts +1 -1
- package/dist/commonjs/models/subscriptionadjustment.d.ts +16 -6
- package/dist/commonjs/models/subscriptionadjustment.d.ts.map +1 -1
- package/dist/commonjs/models/subscriptionadjustment.js +4 -0
- package/dist/commonjs/models/subscriptionadjustment.js.map +1 -1
- package/dist/commonjs/sdk/subscriptions.d.ts +2 -2
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +1 -1
- package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts +3 -2
- package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts.map +1 -1
- package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.js +3 -3
- package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.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/createmaximumquantityadjustment.d.ts +45 -0
- package/dist/esm/models/createmaximumquantityadjustment.d.ts.map +1 -0
- package/dist/esm/models/createmaximumquantityadjustment.js +18 -0
- package/dist/esm/models/createmaximumquantityadjustment.js.map +1 -0
- package/dist/esm/models/createminimumquantityadjustment.d.ts +45 -0
- package/dist/esm/models/createminimumquantityadjustment.d.ts.map +1 -0
- package/dist/esm/models/createminimumquantityadjustment.js +18 -0
- package/dist/esm/models/createminimumquantityadjustment.js.map +1 -0
- package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts +5 -3
- package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts.map +1 -1
- package/dist/esm/models/createsubscriptionadjustmentrequest.js +4 -0
- package/dist/esm/models/createsubscriptionadjustmentrequest.js.map +1 -1
- package/dist/esm/models/currencybreakdownentry.d.ts +1 -1
- package/dist/esm/models/grouptrendentry.d.ts +1 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoicecategorysummary.d.ts +1 -1
- package/dist/esm/models/operations/createbillablemetric.d.ts +3 -3
- package/dist/esm/models/operations/createbillablemetric.d.ts.map +1 -1
- package/dist/esm/models/operations/createbillablemetric.js +1 -1
- package/dist/esm/models/operations/createbillablemetric.js.map +1 -1
- package/dist/esm/models/operations/createtestclock.d.ts +1 -1
- package/dist/esm/models/operations/updatebillablemetric.d.ts +4 -4
- package/dist/esm/models/operations/updatebillablemetric.d.ts.map +1 -1
- package/dist/esm/models/operations/updatebillablemetric.js +1 -1
- package/dist/esm/models/operations/updatebillablemetric.js.map +1 -1
- package/dist/esm/models/profitabilityrow.d.ts +1 -1
- package/dist/esm/models/revenuesummaryresponse.d.ts +2 -2
- package/dist/esm/models/revenuetrendbucket.d.ts +1 -1
- package/dist/esm/models/subscriptionadjustment.d.ts +16 -6
- package/dist/esm/models/subscriptionadjustment.d.ts.map +1 -1
- package/dist/esm/models/subscriptionadjustment.js +4 -0
- package/dist/esm/models/subscriptionadjustment.js.map +1 -1
- package/dist/esm/sdk/subscriptions.d.ts +2 -2
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/subscriptionsDeleteSubscriptionAdjustment.ts +7 -6
- package/src/lib/config.ts +2 -2
- package/src/models/createmaximumquantityadjustment.ts +72 -0
- package/src/models/createminimumquantityadjustment.ts +72 -0
- package/src/models/createsubscriptionadjustmentrequest.ts +19 -3
- package/src/models/currencybreakdownentry.ts +1 -1
- package/src/models/grouptrendentry.ts +1 -1
- package/src/models/index.ts +2 -0
- package/src/models/invoicecategorysummary.ts +1 -1
- package/src/models/operations/createbillablemetric.ts +4 -4
- package/src/models/operations/createtestclock.ts +1 -1
- package/src/models/operations/updatebillablemetric.ts +5 -5
- package/src/models/profitabilityrow.ts +1 -1
- package/src/models/revenuesummaryresponse.ts +2 -2
- package/src/models/revenuetrendbucket.ts +1 -1
- package/src/models/subscriptionadjustment.ts +18 -6
- package/src/sdk/subscriptions.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yCAAyC,CAAC;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cA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AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|
|
@@ -48,9 +48,9 @@ export type CreateBillableMetricRequest = {
|
|
|
48
48
|
/**
|
|
49
49
|
* CloudEvents type for meter routing. Links this billable metric to the metering service.
|
|
50
50
|
*/
|
|
51
|
-
eventType
|
|
51
|
+
eventType: string;
|
|
52
52
|
/**
|
|
53
|
-
* JSONPath to extract a numeric value from event data. Must start with `$.` (example: `$.amount` or `$.payload.bytes`). Required for SUM/AVG/MIN/MAX/LATEST aggregations.
|
|
53
|
+
* JSONPath to extract a numeric value from event data. Must start with `$.` (example: `$.amount` or `$.payload.bytes`). Required for SUM/AVG/MIN/MAX/LATEST aggregations. Optional for UNIQUE_COUNT, which counts distinct values of this property when set and distinct events when not. Not stored for COUNT.
|
|
54
54
|
*/
|
|
55
55
|
valueProperty?: string | undefined;
|
|
56
56
|
/**
|
|
@@ -75,7 +75,7 @@ export type CreateBillableMetricRequest$Outbound = {
|
|
|
75
75
|
productId?: string | undefined;
|
|
76
76
|
itemId?: string | undefined;
|
|
77
77
|
unit: string;
|
|
78
|
-
eventType
|
|
78
|
+
eventType: string;
|
|
79
79
|
valueProperty?: string | undefined;
|
|
80
80
|
groupBy?: {
|
|
81
81
|
[k: string]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createbillablemetric.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/createbillablemetric.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;CAQlC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,+BAA+B,CACvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,WAAW,EAAE,+BAA+B,CAAC;IAC7C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,
|
|
1
|
+
{"version":3,"file":"createbillablemetric.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/createbillablemetric.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;CAQlC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,+BAA+B,CACvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,WAAW,EAAE,+BAA+B,CAAC;IAC7C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,aAAa,CAC1E,OAAO,+BAA+B,CACS,CAAC;AAElD,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CAa3B,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR"}
|
|
@@ -25,7 +25,7 @@ export const CreateBillableMetricRequest$outboundSchema = z.object({
|
|
|
25
25
|
productId: z.string().optional(),
|
|
26
26
|
itemId: z.string().optional(),
|
|
27
27
|
unit: z.string(),
|
|
28
|
-
eventType: z.string()
|
|
28
|
+
eventType: z.string(),
|
|
29
29
|
valueProperty: z.string().optional(),
|
|
30
30
|
groupBy: z.record(z.string()).optional(),
|
|
31
31
|
eventFrom: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createbillablemetric.js","sourceRoot":"","sources":["../../../../src/models/operations/createbillablemetric.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,cAAc;IAC3B,MAAM,EAAE,QAAQ;CACR,CAAC;AAuDX,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAEvD,CAAC,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;AAiBlD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,8CAA8C;IAC3D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"createbillablemetric.js","sourceRoot":"","sources":["../../../../src/models/operations/createbillablemetric.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,cAAc;IAC3B,MAAM,EAAE,QAAQ;CACR,CAAC;AAuDX,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAEvD,CAAC,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;AAiBlD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,8CAA8C;IAC3D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,0CAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
export type CreateTestClockRequest = {
|
|
3
3
|
/**
|
|
4
|
-
* Initial time for the test clock (defaults to current time).
|
|
4
|
+
* Initial time for the test clock (defaults to current time). May be in the past, which lets a subscription on the clock start on a past date and bill its periods as the clock advances.
|
|
5
5
|
*/
|
|
6
6
|
currentTime?: Date | undefined;
|
|
7
7
|
/**
|
|
@@ -17,11 +17,11 @@ export type UpdateBillableMetricRequestBody = {
|
|
|
17
17
|
*/
|
|
18
18
|
itemId?: string | null | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* CloudEvents type for meter routing.
|
|
20
|
+
* CloudEvents type for meter routing. Cannot be cleared: every billable metric needs one.
|
|
21
21
|
*/
|
|
22
|
-
eventType?: string |
|
|
22
|
+
eventType?: string | undefined;
|
|
23
23
|
/**
|
|
24
|
-
* JSONPath to extract a numeric value from event data. Must start with `$.` (example: `$.amount` or `$.payload.bytes`).
|
|
24
|
+
* JSONPath to extract a numeric value from event data. Must start with `$.` (example: `$.amount` or `$.payload.bytes`). Cannot be cleared on a SUM/AVG/MIN/MAX/LATEST metric. Not stored for COUNT.
|
|
25
25
|
*/
|
|
26
26
|
valueProperty?: string | null | undefined;
|
|
27
27
|
/**
|
|
@@ -45,7 +45,7 @@ export type UpdateBillableMetricRequestBody$Outbound = {
|
|
|
45
45
|
name?: string | undefined;
|
|
46
46
|
unit?: string | undefined;
|
|
47
47
|
itemId?: string | null | undefined;
|
|
48
|
-
eventType?: string |
|
|
48
|
+
eventType?: string | undefined;
|
|
49
49
|
valueProperty?: string | null | undefined;
|
|
50
50
|
groupBy?: {
|
|
51
51
|
[k: string]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatebillablemetric.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updatebillablemetric.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"updatebillablemetric.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updatebillablemetric.ts"],"names":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GAAG,IAAI,GAAG,SAAS,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,wCAAwC,EACxC,CAAC,CAAC,UAAU,EACZ,+BAA+B,CAU/B,CAAC;AAEH,wBAAgB,qCAAqC,CACnD,+BAA+B,EAAE,+BAA+B,GAC/D,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,wCAAwC,CAAC;CACvD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CAQ3B,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR"}
|
|
@@ -9,7 +9,7 @@ export const UpdateBillableMetricRequestBody$outboundSchema = z.object({
|
|
|
9
9
|
name: z.string().optional(),
|
|
10
10
|
unit: z.string().optional(),
|
|
11
11
|
itemId: z.nullable(z.string()).optional(),
|
|
12
|
-
eventType: z.
|
|
12
|
+
eventType: z.string().optional(),
|
|
13
13
|
valueProperty: z.nullable(z.string()).optional(),
|
|
14
14
|
groupBy: z.nullable(z.record(z.string())).optional(),
|
|
15
15
|
eventFrom: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatebillablemetric.js","sourceRoot":"","sources":["../../../../src/models/operations/updatebillablemetric.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAsD1D,gBAAgB;AAChB,MAAM,CAAC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AAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3E,CAAC,CAAC;AAEH,MAAM,UAAU,qCAAqC,CACnD,+BAAgE;IAEhE,OAAO,IAAI,CAAC,SAAS,CACnB,8CAA8C,CAAC,KAAK,CAClD,+BAA+B,CAChC,CACF,CAAC;AACJ,CAAC;AAQD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,8CAA8C,CAAC;CAC1E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,aAAa;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,0CAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@ export type ProfitabilityRow = {
|
|
|
12
12
|
*/
|
|
13
13
|
customerName: string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Revenue excluding tax (paid + outstanding invoices issued in the period), in unit currency, with two decimals.
|
|
16
16
|
*/
|
|
17
17
|
netRevenue: string;
|
|
18
18
|
/**
|
|
@@ -25,11 +25,11 @@ export type RevenueSummaryResponse = {
|
|
|
25
25
|
*/
|
|
26
26
|
object: "revenue_summary";
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Revenue in dollars, excluding tax: invoices issued in the period plus completed payments, less non-voided refunds issued in the period. Invoices and refunds are counted excluding tax. Omitted when groupBy=currency is active.
|
|
29
29
|
*/
|
|
30
30
|
netRevenue?: string | undefined;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Total of non-voided refunds (credit notes) issued in the period, in dollars, including tax. netRevenue subtracts these refunds excluding tax. Omitted when groupBy=currency is active.
|
|
33
33
|
*/
|
|
34
34
|
totalRefunds?: string | undefined;
|
|
35
35
|
/**
|
|
@@ -8,7 +8,7 @@ export type RevenueTrendBucket = {
|
|
|
8
8
|
*/
|
|
9
9
|
timestamp: Date;
|
|
10
10
|
/**
|
|
11
|
-
* Total amount of all invoices issued in this bucket (all statuses, by issuedAt)
|
|
11
|
+
* Total amount of all invoices issued in this bucket (all statuses, by issuedAt), excluding tax
|
|
12
12
|
*/
|
|
13
13
|
issuedInvoices: string;
|
|
14
14
|
/**
|
|
@@ -9,6 +9,8 @@ export type SubscriptionAdjustmentObject = ClosedEnum<typeof SubscriptionAdjustm
|
|
|
9
9
|
export declare const SubscriptionAdjustmentType: {
|
|
10
10
|
readonly PercentageDiscount: "percentageDiscount";
|
|
11
11
|
readonly UsageDiscount: "usageDiscount";
|
|
12
|
+
readonly MinimumQuantity: "minimumQuantity";
|
|
13
|
+
readonly MaximumQuantity: "maximumQuantity";
|
|
12
14
|
};
|
|
13
15
|
export type SubscriptionAdjustmentType = ClosedEnum<typeof SubscriptionAdjustmentType>;
|
|
14
16
|
export type SubscriptionAdjustment = {
|
|
@@ -23,27 +25,35 @@ export type SubscriptionAdjustment = {
|
|
|
23
25
|
subscriptionId: string;
|
|
24
26
|
type: SubscriptionAdjustmentType;
|
|
25
27
|
/**
|
|
26
|
-
* The discount rate as a decimal fraction between 0 and 1. "0.35" means 35 percent. Null on
|
|
28
|
+
* The discount rate as a decimal fraction between 0 and 1. "0.35" means 35 percent. Null on every other type.
|
|
27
29
|
*/
|
|
28
30
|
percentageDiscount: string | null;
|
|
29
31
|
/**
|
|
30
|
-
* The number of usage units taken off the targeted line's billable quantity. Null on
|
|
32
|
+
* The number of usage units taken off the targeted line's billable quantity. Null on every other type.
|
|
31
33
|
*/
|
|
32
34
|
usageDiscount: string | null;
|
|
33
35
|
/**
|
|
34
|
-
* The
|
|
36
|
+
* The contracted minimum quantity billed for one period of the targeted price. Null on every other type.
|
|
37
|
+
*/
|
|
38
|
+
minimumQuantity: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* The contracted maximum quantity billed for one period of the targeted price. Null on every other type.
|
|
41
|
+
*/
|
|
42
|
+
maximumQuantity: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The prices this adjustment applies to. Exactly one price on a usageDiscount; empty on a percentageDiscount, which reduces every discountable charge. A minimumQuantity or maximumQuantity is created against exactly one price, and later lists more than one only where that charge moved to a new price — a floating subscription moving to a new plan version, or a price edit freezing the subscription's version. Every id listed is the same charge, and the bound applies to whichever one a period bills under.
|
|
35
45
|
*/
|
|
36
46
|
targetPriceIds: Array<string>;
|
|
37
47
|
/**
|
|
38
|
-
* Opens the window. Read per type: INCLUSIVE on a percentageDiscount, whose window is prorated by day overlap; EXCLUSIVE on a usageDiscount, which
|
|
48
|
+
* Opens the window. Read per type: INCLUSIVE on a percentageDiscount, whose window is prorated by day overlap; EXCLUSIVE on a usageDiscount and on both quantity bounds, which apply to a line whose period END falls strictly after this instant.
|
|
39
49
|
*/
|
|
40
50
|
effectiveFrom: Date;
|
|
41
51
|
/**
|
|
42
|
-
* Closes the window, or null for never. Read per type: EXCLUSIVE on a percentageDiscount; INCLUSIVE on a usageDiscount, which
|
|
52
|
+
* Closes the window, or null for never. Read per type: EXCLUSIVE on a percentageDiscount; INCLUSIVE on a usageDiscount and on both quantity bounds, which apply to a line whose period END falls on or before this instant. A delete shortens this to the end of the last period the adjustment has already been billed on.
|
|
43
53
|
*/
|
|
44
54
|
effectiveTo: Date | null;
|
|
45
55
|
/**
|
|
46
|
-
* The deal's own name. Shown on each discount line a percentageDiscount emits;
|
|
56
|
+
* The deal's own name. Shown on each discount line a percentageDiscount emits; every other type emits no line, so its description is carried here only.
|
|
47
57
|
*/
|
|
48
58
|
description: string | null;
|
|
49
59
|
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,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;;;;;CAK7B,CAAC;AACX,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,4BAA4B,CAAC;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,0BAA0B,CAAC;IACjC;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,aAAa,CACtE,OAAO,4BAA4B,CACS,CAAC;AAE/C,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,aAAa,CACpE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAmBP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -9,6 +9,8 @@ export const SubscriptionAdjustmentObject = {
|
|
|
9
9
|
export const SubscriptionAdjustmentType = {
|
|
10
10
|
PercentageDiscount: "percentageDiscount",
|
|
11
11
|
UsageDiscount: "usageDiscount",
|
|
12
|
+
MinimumQuantity: "minimumQuantity",
|
|
13
|
+
MaximumQuantity: "maximumQuantity",
|
|
12
14
|
};
|
|
13
15
|
/** @internal */
|
|
14
16
|
export const SubscriptionAdjustmentObject$inboundSchema = z.nativeEnum(SubscriptionAdjustmentObject);
|
|
@@ -22,6 +24,8 @@ export const SubscriptionAdjustment$inboundSchema = z.object({
|
|
|
22
24
|
type: SubscriptionAdjustmentType$inboundSchema,
|
|
23
25
|
percentageDiscount: z.nullable(z.string()),
|
|
24
26
|
usageDiscount: z.nullable(z.string()),
|
|
27
|
+
minimumQuantity: z.nullable(z.string()),
|
|
28
|
+
maximumQuantity: z.nullable(z.string()),
|
|
25
29
|
targetPriceIds: z.array(z.string()),
|
|
26
30
|
effectiveFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
27
31
|
effectiveTo: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionadjustment.js","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,sBAAsB,EAAE,wBAAwB;CACxC,CAAC;AAKX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"subscriptionadjustment.js","sourceRoot":"","sources":["../../../src/models/subscriptionadjustment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,sBAAsB,EAAE,wBAAwB;CACxC,CAAC;AAKX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;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C,MAAM,EAAE,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CAC7E,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -60,8 +60,8 @@ export declare class Subscriptions extends ClientSDK {
|
|
|
60
60
|
* Delete Adjustment
|
|
61
61
|
*
|
|
62
62
|
* @remarks
|
|
63
|
-
*
|
|
63
|
+
* Stops an adjustment from applying to any period it has not already been billed on. An adjustment that has never reached an issued invoice is removed, and the response is 204. An adjustment that has already been billed on an issued invoice is RETRACTED instead: its effectiveTo moves to the end of the last period it was billed on, the adjustment still exists, and the response is 200 carrying it. Read a 200 as "shortened", not as "removed". No invoice changes either way: an issued invoice keeps its numbers, and a draft loses the adjustment only when its period is calculated again. Deleting the same adjustment again returns the same 200 and the same window.
|
|
64
64
|
*/
|
|
65
|
-
deleteSubscriptionAdjustment(request: operations.DeleteSubscriptionAdjustmentRequest, options?: RequestOptions): Promise<
|
|
65
|
+
deleteSubscriptionAdjustment(request: operations.DeleteSubscriptionAdjustmentRequest, options?: RequestOptions): Promise<models.SubscriptionAdjustment | undefined>;
|
|
66
66
|
}
|
|
67
67
|
//# sourceMappingURL=subscriptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../src/sdk/subscriptions.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,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,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC;IAQrC;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;IAQ/B;;;;;OAKG;IACG,6BAA6B,CACjC,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,0BAA0B,CAAC;IAQ7C;;;;;OAKG;IACG,2BAA2B,CAC/B,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,+BAA+B,CAAC;IAQlD;;;;;OAKG;IACG,4BAA4B,CAChC,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC;IAQzC;;;;;OAKG;IACG,4BAA4B,CAChC,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,sBAAsB,GAAG,SAAS,CAAC;CAOtD"}
|
|
@@ -90,7 +90,7 @@ export class Subscriptions extends ClientSDK {
|
|
|
90
90
|
* Delete Adjustment
|
|
91
91
|
*
|
|
92
92
|
* @remarks
|
|
93
|
-
*
|
|
93
|
+
* Stops an adjustment from applying to any period it has not already been billed on. An adjustment that has never reached an issued invoice is removed, and the response is 204. An adjustment that has already been billed on an issued invoice is RETRACTED instead: its effectiveTo moves to the end of the last period it was billed on, the adjustment still exists, and the response is 200 carrying it. Read a 200 as "shortened", not as "removed". No invoice changes either way: an issued invoice keeps its numbers, and a draft loses the adjustment only when its period is calculated again. Deleting the same adjustment again returns the same 200 and the same window.
|
|
94
94
|
*/
|
|
95
95
|
async deleteSubscriptionAdjustment(request, options) {
|
|
96
96
|
return unwrapAsync(subscriptionsDeleteSubscriptionAdjustment(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
5
|
import { PaygenticCore } from "../core.js";
|
|
7
6
|
import { encodeSimple } from "../lib/encodings.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
@@ -22,6 +21,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
21
|
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
23
22
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
25
|
import * as operations from "../models/operations/index.js";
|
|
26
26
|
import { APICall, APIPromise } from "../types/async.js";
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Delete Adjustment
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
*
|
|
33
|
+
* Stops an adjustment from applying to any period it has not already been billed on. An adjustment that has never reached an issued invoice is removed, and the response is 204. An adjustment that has already been billed on an issued invoice is RETRACTED instead: its effectiveTo moves to the end of the last period it was billed on, the adjustment still exists, and the response is 200 carrying it. Read a 200 as "shortened", not as "removed". No invoice changes either way: an issued invoice keeps its numbers, and a draft loses the adjustment only when its period is calculated again. Deleting the same adjustment again returns the same 200 and the same window.
|
|
34
34
|
*/
|
|
35
35
|
export function subscriptionsDeleteSubscriptionAdjustment(
|
|
36
36
|
client: PaygenticCore,
|
|
@@ -38,7 +38,7 @@ export function subscriptionsDeleteSubscriptionAdjustment(
|
|
|
38
38
|
options?: RequestOptions,
|
|
39
39
|
): APIPromise<
|
|
40
40
|
Result<
|
|
41
|
-
|
|
41
|
+
models.SubscriptionAdjustment | undefined,
|
|
42
42
|
| errors.ErrorT
|
|
43
43
|
| PaygenticError
|
|
44
44
|
| ResponseValidationError
|
|
@@ -64,7 +64,7 @@ async function $do(
|
|
|
64
64
|
): Promise<
|
|
65
65
|
[
|
|
66
66
|
Result<
|
|
67
|
-
|
|
67
|
+
models.SubscriptionAdjustment | undefined,
|
|
68
68
|
| errors.ErrorT
|
|
69
69
|
| PaygenticError
|
|
70
70
|
| ResponseValidationError
|
|
@@ -160,7 +160,7 @@ async function $do(
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
const [result] = await M.match<
|
|
163
|
-
|
|
163
|
+
models.SubscriptionAdjustment | undefined,
|
|
164
164
|
| errors.ErrorT
|
|
165
165
|
| PaygenticError
|
|
166
166
|
| ResponseValidationError
|
|
@@ -171,7 +171,8 @@ async function $do(
|
|
|
171
171
|
| UnexpectedClientError
|
|
172
172
|
| SDKValidationError
|
|
173
173
|
>(
|
|
174
|
-
M.
|
|
174
|
+
M.json(200, models.SubscriptionAdjustment$inboundSchema.optional()),
|
|
175
|
+
M.nil(204, models.SubscriptionAdjustment$inboundSchema.optional()),
|
|
175
176
|
M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema),
|
|
176
177
|
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
177
178
|
M.fail("4XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.9.
|
|
68
|
+
sdkVersion: "0.9.12",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.9.12 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type CreateMaximumQuantityAdjustment = {
|
|
8
|
+
/**
|
|
9
|
+
* Bills at most the contracted quantity on one price, whatever the customer actually used.
|
|
10
|
+
*/
|
|
11
|
+
type: "maximumQuantity";
|
|
12
|
+
/**
|
|
13
|
+
* The contracted maximum quantity for one billing period of the target price, sent as a plain decimal string. Not negative, at most 6 decimal places, fewer than 35 digits before the point. Plain notation only — no sign, exponent, hex or digit separators, so "1_000" and "1e3" are rejected rather than read as 1000. "4" bills 4 seats in a period the customer used 9 in; a value of 0 bills nothing at all. Measured over the whole billing period, not per line: where a period is split into several lines, each line's quantity counts for its share of the period, and every line is scaled by the same factor to bring the period to the maximum. Several bounds of the same direction on one price do not add up — the greatest minimum and the least maximum are the ones that apply.
|
|
14
|
+
*/
|
|
15
|
+
maximumQuantity: string;
|
|
16
|
+
/**
|
|
17
|
+
* Exactly one price of this subscription. A metered price is accepted, and so is a price whose supply is outside the scope of VAT: a bound constrains a measurement rather than an amount of consideration. A price that bills once rather than per period is refused, because there is no repeating period for the bound to be measured over.
|
|
18
|
+
*/
|
|
19
|
+
targetPriceIds: Array<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Opens the window. Exclusive for this type: a line is bounded when its period END falls after this instant, so a window opening exactly when a period ends belongs to the next period, not that one. The bound is never prorated — a window opening mid-period applies to that whole period.
|
|
22
|
+
*/
|
|
23
|
+
effectiveFrom: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Closes the window. INCLUSIVE for this type, like usageDiscount and unlike percentageDiscount: set this to the exact period end you are bounding and that period is covered. Null means the bound never stops. Must be after effectiveFrom.
|
|
26
|
+
*/
|
|
27
|
+
effectiveTo?: Date | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Your own name for this term. A quantity bound emits no invoice line, so this is printed nowhere on the invoice — it is returned on the adjustment for your own records.
|
|
30
|
+
*/
|
|
31
|
+
description?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* 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 bound; two identical bounds change nothing, because bounds of one direction do not add up.
|
|
34
|
+
*/
|
|
35
|
+
idempotencyKey?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type CreateMaximumQuantityAdjustment$Outbound = {
|
|
40
|
+
type: "maximumQuantity";
|
|
41
|
+
maximumQuantity: string;
|
|
42
|
+
targetPriceIds: Array<string>;
|
|
43
|
+
effectiveFrom: string;
|
|
44
|
+
effectiveTo?: string | null | undefined;
|
|
45
|
+
description?: string | null | undefined;
|
|
46
|
+
idempotencyKey?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CreateMaximumQuantityAdjustment$outboundSchema: z.ZodType<
|
|
51
|
+
CreateMaximumQuantityAdjustment$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
CreateMaximumQuantityAdjustment
|
|
54
|
+
> = z.object({
|
|
55
|
+
type: z.literal("maximumQuantity"),
|
|
56
|
+
maximumQuantity: z.string(),
|
|
57
|
+
targetPriceIds: z.array(z.string()),
|
|
58
|
+
effectiveFrom: z.date().transform(v => v.toISOString()),
|
|
59
|
+
effectiveTo: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
60
|
+
description: z.nullable(z.string()).optional(),
|
|
61
|
+
idempotencyKey: z.string().optional(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function createMaximumQuantityAdjustmentToJSON(
|
|
65
|
+
createMaximumQuantityAdjustment: CreateMaximumQuantityAdjustment,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
CreateMaximumQuantityAdjustment$outboundSchema.parse(
|
|
69
|
+
createMaximumQuantityAdjustment,
|
|
70
|
+
),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type CreateMinimumQuantityAdjustment = {
|
|
8
|
+
/**
|
|
9
|
+
* Bills at least the contracted quantity on one price, whatever the customer actually used.
|
|
10
|
+
*/
|
|
11
|
+
type: "minimumQuantity";
|
|
12
|
+
/**
|
|
13
|
+
* The contracted minimum quantity for one billing period of the target price, sent as a plain decimal string. Not negative, at most 6 decimal places, fewer than 35 digits before the point. Plain notation only — no sign, exponent, hex or digit separators, so "1_000" and "1e3" are rejected rather than read as 1000. "4" bills 4 seats in a period the customer used 2 in; a value of 0 binds nothing. Measured over the whole billing period, not per line: where a period is split into several lines, each line's quantity counts for its share of the period, and every line is scaled by the same factor to bring the period to the minimum. Several bounds of the same direction on one price do not add up — the greatest minimum and the least maximum are the ones that apply.
|
|
14
|
+
*/
|
|
15
|
+
minimumQuantity: string;
|
|
16
|
+
/**
|
|
17
|
+
* Exactly one price of this subscription. A metered price is accepted, and so is a price whose supply is outside the scope of VAT: a bound constrains a measurement rather than an amount of consideration. A price that bills once rather than per period is refused, because there is no repeating period for the bound to be measured over.
|
|
18
|
+
*/
|
|
19
|
+
targetPriceIds: Array<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Opens the window. Exclusive for this type: a line is bounded when its period END falls after this instant, so a window opening exactly when a period ends belongs to the next period, not that one. The bound is never prorated — a window opening mid-period applies to that whole period.
|
|
22
|
+
*/
|
|
23
|
+
effectiveFrom: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Closes the window. INCLUSIVE for this type, like usageDiscount and unlike percentageDiscount: set this to the exact period end you are bounding and that period is covered. Null means the bound never stops. Must be after effectiveFrom.
|
|
26
|
+
*/
|
|
27
|
+
effectiveTo?: Date | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Your own name for this term. A quantity bound emits no invoice line, so this is printed nowhere on the invoice — it is returned on the adjustment for your own records.
|
|
30
|
+
*/
|
|
31
|
+
description?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* 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 bound; two identical bounds change nothing, because bounds of one direction do not add up.
|
|
34
|
+
*/
|
|
35
|
+
idempotencyKey?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type CreateMinimumQuantityAdjustment$Outbound = {
|
|
40
|
+
type: "minimumQuantity";
|
|
41
|
+
minimumQuantity: string;
|
|
42
|
+
targetPriceIds: Array<string>;
|
|
43
|
+
effectiveFrom: string;
|
|
44
|
+
effectiveTo?: string | null | undefined;
|
|
45
|
+
description?: string | null | undefined;
|
|
46
|
+
idempotencyKey?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CreateMinimumQuantityAdjustment$outboundSchema: z.ZodType<
|
|
51
|
+
CreateMinimumQuantityAdjustment$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
CreateMinimumQuantityAdjustment
|
|
54
|
+
> = z.object({
|
|
55
|
+
type: z.literal("minimumQuantity"),
|
|
56
|
+
minimumQuantity: z.string(),
|
|
57
|
+
targetPriceIds: z.array(z.string()),
|
|
58
|
+
effectiveFrom: z.date().transform(v => v.toISOString()),
|
|
59
|
+
effectiveTo: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
60
|
+
description: z.nullable(z.string()).optional(),
|
|
61
|
+
idempotencyKey: z.string().optional(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function createMinimumQuantityAdjustmentToJSON(
|
|
65
|
+
createMinimumQuantityAdjustment: CreateMinimumQuantityAdjustment,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
CreateMinimumQuantityAdjustment$outboundSchema.parse(
|
|
69
|
+
createMinimumQuantityAdjustment,
|
|
70
|
+
),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
CreateMaximumQuantityAdjustment,
|
|
8
|
+
CreateMaximumQuantityAdjustment$Outbound,
|
|
9
|
+
CreateMaximumQuantityAdjustment$outboundSchema,
|
|
10
|
+
} from "./createmaximumquantityadjustment.js";
|
|
11
|
+
import {
|
|
12
|
+
CreateMinimumQuantityAdjustment,
|
|
13
|
+
CreateMinimumQuantityAdjustment$Outbound,
|
|
14
|
+
CreateMinimumQuantityAdjustment$outboundSchema,
|
|
15
|
+
} from "./createminimumquantityadjustment.js";
|
|
6
16
|
import {
|
|
7
17
|
CreatePercentageDiscountAdjustment,
|
|
8
18
|
CreatePercentageDiscountAdjustment$Outbound,
|
|
@@ -15,16 +25,20 @@ import {
|
|
|
15
25
|
} from "./createusagediscountadjustment.js";
|
|
16
26
|
|
|
17
27
|
/**
|
|
18
|
-
* One adjustment to attach to the subscription. The type decides which number the body carries: a rate for percentageDiscount, a unit count and one target price for usageDiscount.
|
|
28
|
+
* One adjustment to attach to the subscription. The type decides which number the body carries: a rate for percentageDiscount, a unit count and one target price for usageDiscount, and a contracted quantity and one target price for minimumQuantity and maximumQuantity.
|
|
19
29
|
*/
|
|
20
30
|
export type CreateSubscriptionAdjustmentRequest =
|
|
21
31
|
| CreatePercentageDiscountAdjustment
|
|
22
|
-
| CreateUsageDiscountAdjustment
|
|
32
|
+
| CreateUsageDiscountAdjustment
|
|
33
|
+
| CreateMinimumQuantityAdjustment
|
|
34
|
+
| CreateMaximumQuantityAdjustment;
|
|
23
35
|
|
|
24
36
|
/** @internal */
|
|
25
37
|
export type CreateSubscriptionAdjustmentRequest$Outbound =
|
|
26
38
|
| CreatePercentageDiscountAdjustment$Outbound
|
|
27
|
-
| CreateUsageDiscountAdjustment$Outbound
|
|
39
|
+
| CreateUsageDiscountAdjustment$Outbound
|
|
40
|
+
| CreateMinimumQuantityAdjustment$Outbound
|
|
41
|
+
| CreateMaximumQuantityAdjustment$Outbound;
|
|
28
42
|
|
|
29
43
|
/** @internal */
|
|
30
44
|
export const CreateSubscriptionAdjustmentRequest$outboundSchema: z.ZodType<
|
|
@@ -34,6 +48,8 @@ export const CreateSubscriptionAdjustmentRequest$outboundSchema: z.ZodType<
|
|
|
34
48
|
> = z.union([
|
|
35
49
|
CreatePercentageDiscountAdjustment$outboundSchema,
|
|
36
50
|
CreateUsageDiscountAdjustment$outboundSchema,
|
|
51
|
+
CreateMinimumQuantityAdjustment$outboundSchema,
|
|
52
|
+
CreateMaximumQuantityAdjustment$outboundSchema,
|
|
37
53
|
]);
|
|
38
54
|
|
|
39
55
|
export function createSubscriptionAdjustmentRequestToJSON(
|
|
@@ -25,7 +25,7 @@ export type CurrencyBreakdownEntry = {
|
|
|
25
25
|
*/
|
|
26
26
|
currency: string;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Revenue in dollars for this currency, excluding tax: invoices issued in the period plus completed payments
|
|
29
29
|
*/
|
|
30
30
|
netRevenue: string;
|
|
31
31
|
invoices: InvoiceSummary;
|