@paygentic/sdk 0.8.7 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/commonjs/funcs/billableMetricsList.js +1 -0
- package/dist/commonjs/funcs/billableMetricsList.js.map +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.js +2 -2
- package/dist/commonjs/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/feesList.js +1 -0
- package/dist/commonjs/funcs/feesList.js.map +1 -1
- package/dist/commonjs/funcs/feesUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/feesUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/feesUpdate.js +2 -2
- package/dist/commonjs/funcs/feesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.d.ts +18 -0
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.d.ts.map +1 -0
- package/dist/commonjs/funcs/{itemsDeleteItem.js → invoicesV2DownloadInvoicePdf.js} +16 -11
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.js.map +1 -0
- package/dist/commonjs/funcs/pricesDelete.d.ts +1 -1
- package/dist/commonjs/funcs/pricesDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesDelete.js +2 -2
- package/dist/commonjs/funcs/pricesDelete.js.map +1 -1
- package/dist/commonjs/funcs/pricesList.js +3 -2
- package/dist/commonjs/funcs/pricesList.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/costusageresponse.d.ts +4 -0
- package/dist/commonjs/models/costusageresponse.d.ts.map +1 -1
- package/dist/commonjs/models/costusageresponse.js +1 -0
- package/dist/commonjs/models/costusageresponse.js.map +1 -1
- package/dist/commonjs/models/createbillingschedulerequest.d.ts +3 -0
- package/dist/commonjs/models/createbillingschedulerequest.d.ts.map +1 -1
- package/dist/commonjs/models/createbillingschedulerequest.js.map +1 -1
- package/dist/commonjs/models/errors/deleteprice.d.ts +28 -0
- package/dist/commonjs/models/errors/deleteprice.d.ts.map +1 -0
- package/dist/commonjs/models/errors/deleteprice.js +75 -0
- package/dist/commonjs/models/errors/deleteprice.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +18 -1
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +12 -1
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/mappingcapabilities.d.ts +26 -0
- package/dist/commonjs/models/mappingcapabilities.d.ts.map +1 -0
- package/dist/commonjs/models/mappingcapabilities.js +51 -0
- package/dist/commonjs/models/mappingcapabilities.js.map +1 -0
- package/dist/commonjs/models/merchantintegration.d.ts +12 -1
- package/dist/commonjs/models/merchantintegration.d.ts.map +1 -1
- package/dist/commonjs/models/merchantintegration.js +2 -0
- package/dist/commonjs/models/merchantintegration.js.map +1 -1
- package/dist/commonjs/models/merchantintegrationprovider.d.ts +4 -2
- package/dist/commonjs/models/merchantintegrationprovider.d.ts.map +1 -1
- package/dist/commonjs/models/merchantintegrationprovider.js +3 -1
- package/dist/commonjs/models/merchantintegrationprovider.js.map +1 -1
- package/dist/commonjs/models/operations/createexternalreference.d.ts +17 -4
- package/dist/commonjs/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createexternalreference.js +3 -2
- package/dist/commonjs/models/operations/createexternalreference.js.map +1 -1
- package/dist/commonjs/models/operations/deletecustomer.d.ts +4 -4
- package/dist/commonjs/models/operations/deletecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletecustomer.js +6 -7
- package/dist/commonjs/models/operations/deletecustomer.js.map +1 -1
- package/dist/commonjs/models/operations/deletefee.d.ts +8 -0
- package/dist/commonjs/models/operations/deletefee.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletefee.js +11 -1
- package/dist/commonjs/models/operations/deletefee.js.map +1 -1
- package/dist/commonjs/models/operations/deleteprice.d.ts +25 -0
- package/dist/commonjs/models/operations/deleteprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deleteprice.js +31 -1
- package/dist/commonjs/models/operations/deleteprice.js.map +1 -1
- package/dist/commonjs/models/operations/downloadinvoicepdf.d.ts +15 -0
- package/dist/commonjs/models/operations/downloadinvoicepdf.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{deleteitem.js → downloadinvoicepdf.js} +6 -6
- package/dist/commonjs/models/operations/downloadinvoicepdf.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetrics.d.ts +5 -0
- package/dist/commonjs/models/operations/listbillablemetrics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetrics.js +1 -0
- package/dist/commonjs/models/operations/listbillablemetrics.js.map +1 -1
- package/dist/commonjs/models/operations/listfees.d.ts +5 -0
- package/dist/commonjs/models/operations/listfees.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listfees.js +1 -0
- package/dist/commonjs/models/operations/listfees.js.map +1 -1
- package/dist/commonjs/models/operations/listprices.d.ts +5 -0
- package/dist/commonjs/models/operations/listprices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listprices.js +1 -0
- package/dist/commonjs/models/operations/listprices.js.map +1 -1
- package/dist/commonjs/models/operations/updatebillablemetric.d.ts +1 -1
- package/dist/commonjs/models/operations/updatefee.d.ts +1 -1
- package/dist/commonjs/models/operations/updateitem.d.ts +1 -1
- package/dist/commonjs/models/operations/upsertmerchantintegration.d.ts +1 -1
- package/dist/commonjs/models/planversion.d.ts +3 -4
- package/dist/commonjs/models/planversion.d.ts.map +1 -1
- package/dist/commonjs/models/planversion.js +0 -1
- package/dist/commonjs/models/planversion.js.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.d.ts +1 -1
- package/dist/commonjs/models/planversionsummary.d.ts +1 -2
- package/dist/commonjs/models/planversionsummary.d.ts.map +1 -1
- package/dist/commonjs/models/planversionsummary.js +0 -1
- package/dist/commonjs/models/planversionsummary.js.map +1 -1
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts +4 -3
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts.map +1 -1
- package/dist/commonjs/models/reconciledfeaturefailed.js +2 -1
- package/dist/commonjs/models/reconciledfeaturefailed.js.map +1 -1
- package/dist/commonjs/models/schemasbillingschedule.d.ts +1 -1
- package/dist/commonjs/sdk/invoicesv2.d.ts +7 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoicesv2.js +10 -0
- package/dist/commonjs/sdk/invoicesv2.js.map +1 -1
- package/dist/commonjs/sdk/items.d.ts +0 -4
- package/dist/commonjs/sdk/items.d.ts.map +1 -1
- package/dist/commonjs/sdk/items.js +0 -7
- package/dist/commonjs/sdk/items.js.map +1 -1
- package/dist/esm/funcs/billableMetricsList.js +1 -0
- package/dist/esm/funcs/billableMetricsList.js.map +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.d.ts +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.js +2 -2
- package/dist/esm/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/esm/funcs/feesList.js +1 -0
- package/dist/esm/funcs/feesList.js.map +1 -1
- package/dist/esm/funcs/feesUpdate.d.ts +1 -1
- package/dist/esm/funcs/feesUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/feesUpdate.js +2 -2
- package/dist/esm/funcs/feesUpdate.js.map +1 -1
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.d.ts +18 -0
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.d.ts.map +1 -0
- package/dist/esm/funcs/{itemsDeleteItem.js → invoicesV2DownloadInvoicePdf.js} +15 -10
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.js.map +1 -0
- package/dist/esm/funcs/pricesDelete.d.ts +1 -1
- package/dist/esm/funcs/pricesDelete.d.ts.map +1 -1
- package/dist/esm/funcs/pricesDelete.js +2 -2
- package/dist/esm/funcs/pricesDelete.js.map +1 -1
- package/dist/esm/funcs/pricesList.js +3 -2
- package/dist/esm/funcs/pricesList.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/costusageresponse.d.ts +4 -0
- package/dist/esm/models/costusageresponse.d.ts.map +1 -1
- package/dist/esm/models/costusageresponse.js +1 -0
- package/dist/esm/models/costusageresponse.js.map +1 -1
- package/dist/esm/models/createbillingschedulerequest.d.ts +3 -0
- package/dist/esm/models/createbillingschedulerequest.d.ts.map +1 -1
- package/dist/esm/models/createbillingschedulerequest.js.map +1 -1
- package/dist/esm/models/errors/deleteprice.d.ts +28 -0
- package/dist/esm/models/errors/deleteprice.d.ts.map +1 -0
- package/dist/esm/models/errors/deleteprice.js +38 -0
- package/dist/esm/models/errors/deleteprice.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +18 -1
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +11 -0
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/mappingcapabilities.d.ts +26 -0
- package/dist/esm/models/mappingcapabilities.d.ts.map +1 -0
- package/dist/esm/models/mappingcapabilities.js +14 -0
- package/dist/esm/models/mappingcapabilities.js.map +1 -0
- package/dist/esm/models/merchantintegration.d.ts +12 -1
- package/dist/esm/models/merchantintegration.d.ts.map +1 -1
- package/dist/esm/models/merchantintegration.js +2 -0
- package/dist/esm/models/merchantintegration.js.map +1 -1
- package/dist/esm/models/merchantintegrationprovider.d.ts +4 -2
- package/dist/esm/models/merchantintegrationprovider.d.ts.map +1 -1
- package/dist/esm/models/merchantintegrationprovider.js +3 -1
- package/dist/esm/models/merchantintegrationprovider.js.map +1 -1
- package/dist/esm/models/operations/createexternalreference.d.ts +17 -4
- package/dist/esm/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/esm/models/operations/createexternalreference.js +3 -2
- package/dist/esm/models/operations/createexternalreference.js.map +1 -1
- package/dist/esm/models/operations/deletecustomer.d.ts +4 -4
- package/dist/esm/models/operations/deletecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/deletecustomer.js +4 -5
- package/dist/esm/models/operations/deletecustomer.js.map +1 -1
- package/dist/esm/models/operations/deletefee.d.ts +8 -0
- package/dist/esm/models/operations/deletefee.d.ts.map +1 -1
- package/dist/esm/models/operations/deletefee.js +9 -0
- package/dist/esm/models/operations/deletefee.js.map +1 -1
- package/dist/esm/models/operations/deleteprice.d.ts +25 -0
- package/dist/esm/models/operations/deleteprice.d.ts.map +1 -1
- package/dist/esm/models/operations/deleteprice.js +27 -0
- package/dist/esm/models/operations/deleteprice.js.map +1 -1
- package/dist/esm/models/operations/downloadinvoicepdf.d.ts +15 -0
- package/dist/esm/models/operations/downloadinvoicepdf.d.ts.map +1 -0
- package/dist/esm/models/operations/downloadinvoicepdf.js +12 -0
- package/dist/esm/models/operations/downloadinvoicepdf.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbillablemetrics.d.ts +5 -0
- package/dist/esm/models/operations/listbillablemetrics.d.ts.map +1 -1
- package/dist/esm/models/operations/listbillablemetrics.js +1 -0
- package/dist/esm/models/operations/listbillablemetrics.js.map +1 -1
- package/dist/esm/models/operations/listfees.d.ts +5 -0
- package/dist/esm/models/operations/listfees.d.ts.map +1 -1
- package/dist/esm/models/operations/listfees.js +1 -0
- package/dist/esm/models/operations/listfees.js.map +1 -1
- package/dist/esm/models/operations/listprices.d.ts +5 -0
- package/dist/esm/models/operations/listprices.d.ts.map +1 -1
- package/dist/esm/models/operations/listprices.js +1 -0
- package/dist/esm/models/operations/listprices.js.map +1 -1
- package/dist/esm/models/operations/updatebillablemetric.d.ts +1 -1
- package/dist/esm/models/operations/updatefee.d.ts +1 -1
- package/dist/esm/models/operations/updateitem.d.ts +1 -1
- package/dist/esm/models/operations/upsertmerchantintegration.d.ts +1 -1
- package/dist/esm/models/planversion.d.ts +3 -4
- package/dist/esm/models/planversion.d.ts.map +1 -1
- package/dist/esm/models/planversion.js +0 -1
- package/dist/esm/models/planversion.js.map +1 -1
- package/dist/esm/models/planversionpriceslot.d.ts +1 -1
- package/dist/esm/models/planversionsummary.d.ts +1 -2
- package/dist/esm/models/planversionsummary.d.ts.map +1 -1
- package/dist/esm/models/planversionsummary.js +0 -1
- package/dist/esm/models/planversionsummary.js.map +1 -1
- package/dist/esm/models/reconciledfeaturefailed.d.ts +4 -3
- package/dist/esm/models/reconciledfeaturefailed.d.ts.map +1 -1
- package/dist/esm/models/reconciledfeaturefailed.js +2 -1
- package/dist/esm/models/reconciledfeaturefailed.js.map +1 -1
- package/dist/esm/models/schemasbillingschedule.d.ts +1 -1
- package/dist/esm/sdk/invoicesv2.d.ts +7 -0
- package/dist/esm/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/esm/sdk/invoicesv2.js +10 -0
- package/dist/esm/sdk/invoicesv2.js.map +1 -1
- package/dist/esm/sdk/items.d.ts +0 -4
- package/dist/esm/sdk/items.d.ts.map +1 -1
- package/dist/esm/sdk/items.js +0 -7
- package/dist/esm/sdk/items.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/billableMetricsList.ts +1 -0
- package/src/funcs/billableMetricsUpdate.ts +6 -2
- package/src/funcs/feesList.ts +1 -0
- package/src/funcs/feesUpdate.ts +6 -2
- package/src/funcs/{itemsDeleteItem.ts → invoicesV2DownloadInvoicePdf.ts} +19 -18
- package/src/funcs/pricesDelete.ts +5 -1
- package/src/funcs/pricesList.ts +3 -2
- package/src/lib/config.ts +2 -2
- package/src/models/costusageresponse.ts +5 -0
- package/src/models/createbillingschedulerequest.ts +3 -0
- package/src/models/errors/deleteprice.ts +61 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/index.ts +1 -0
- package/src/models/invoice.ts +22 -1
- package/src/models/mappingcapabilities.ts +48 -0
- package/src/models/merchantintegration.ts +16 -1
- package/src/models/merchantintegrationprovider.ts +4 -2
- package/src/models/operations/createexternalreference.ts +20 -6
- package/src/models/operations/deletecustomer.ts +15 -12
- package/src/models/operations/deletefee.ts +27 -0
- package/src/models/operations/deleteprice.ts +82 -0
- package/src/models/operations/downloadinvoicepdf.ts +34 -0
- package/src/models/operations/index.ts +1 -1
- package/src/models/operations/listbillablemetrics.ts +6 -0
- package/src/models/operations/listfees.ts +6 -0
- package/src/models/operations/listprices.ts +6 -0
- package/src/models/operations/updatebillablemetric.ts +1 -1
- package/src/models/operations/updatefee.ts +1 -1
- package/src/models/operations/updateitem.ts +1 -1
- package/src/models/operations/upsertmerchantintegration.ts +1 -1
- package/src/models/planversion.ts +3 -4
- package/src/models/planversionpriceslot.ts +1 -1
- package/src/models/planversionsummary.ts +1 -2
- package/src/models/reconciledfeaturefailed.ts +4 -3
- package/src/models/schemasbillingschedule.ts +1 -1
- package/src/sdk/invoicesv2.ts +18 -0
- package/src/sdk/items.ts +0 -15
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts +0 -15
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts.map +0 -1
- package/dist/commonjs/funcs/itemsDeleteItem.js.map +0 -1
- package/dist/commonjs/models/operations/deleteitem.d.ts +0 -15
- package/dist/commonjs/models/operations/deleteitem.d.ts.map +0 -1
- package/dist/commonjs/models/operations/deleteitem.js.map +0 -1
- package/dist/esm/funcs/itemsDeleteItem.d.ts +0 -15
- package/dist/esm/funcs/itemsDeleteItem.d.ts.map +0 -1
- package/dist/esm/funcs/itemsDeleteItem.js.map +0 -1
- package/dist/esm/models/operations/deleteitem.d.ts +0 -15
- package/dist/esm/models/operations/deleteitem.d.ts.map +0 -1
- package/dist/esm/models/operations/deleteitem.js +0 -12
- package/dist/esm/models/operations/deleteitem.js.map +0 -1
- package/src/models/operations/deleteitem.ts +0 -34
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.
|
|
68
|
+
sdkVersion: "0.9.0",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.9.0 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -46,6 +46,10 @@ export type CostUsageResponse = {
|
|
|
46
46
|
* CloudEvents type for metered costs.
|
|
47
47
|
*/
|
|
48
48
|
eventType?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Unit label for metered costs (e.g. 'token', 'request'). Absent when the cost defines no unit.
|
|
51
|
+
*/
|
|
52
|
+
unit?: string | undefined;
|
|
49
53
|
/**
|
|
50
54
|
* Total cost for the query window. Null if usage data could not be computed.
|
|
51
55
|
*/
|
|
@@ -128,6 +132,7 @@ export const CostUsageResponse$inboundSchema: z.ZodType<
|
|
|
128
132
|
type: CostUsageResponseType$inboundSchema,
|
|
129
133
|
currency: z.string(),
|
|
130
134
|
eventType: z.string().optional(),
|
|
135
|
+
unit: z.string().optional(),
|
|
131
136
|
totalCost: z.nullable(z.number()),
|
|
132
137
|
totalQuantity: z.nullable(z.number()).optional(),
|
|
133
138
|
groups: z.array(z.lazy(() => Group$inboundSchema)).optional(),
|
|
@@ -36,6 +36,9 @@ export type CreateBillingScheduleRequestPeriodPreset = ClosedEnum<
|
|
|
36
36
|
|
|
37
37
|
export type CreateBillingScheduleRequest = {
|
|
38
38
|
orderId?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Not supported for creating a billing schedule. Use orderId — every billing schedule belongs to an order.
|
|
41
|
+
*/
|
|
39
42
|
subscriptionId?: string | undefined;
|
|
40
43
|
startDate: Date;
|
|
41
44
|
endDate: Date;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as operations from "../operations/index.js";
|
|
7
|
+
import { PaygenticError } from "./paygenticerror.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Price cannot be deleted because a live plan still references it
|
|
11
|
+
*/
|
|
12
|
+
export type DeletePriceConflictErrorData = {
|
|
13
|
+
error?: string | undefined;
|
|
14
|
+
message?: string | undefined;
|
|
15
|
+
details?: operations.DeletePriceDetails | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Price cannot be deleted because a live plan still references it
|
|
20
|
+
*/
|
|
21
|
+
export class DeletePriceConflictError extends PaygenticError {
|
|
22
|
+
error?: string | undefined;
|
|
23
|
+
details?: operations.DeletePriceDetails | undefined;
|
|
24
|
+
|
|
25
|
+
/** The original data that was passed to this error instance. */
|
|
26
|
+
data$: DeletePriceConflictErrorData;
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
err: DeletePriceConflictErrorData,
|
|
30
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
31
|
+
) {
|
|
32
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
33
|
+
super(message, httpMeta);
|
|
34
|
+
this.data$ = err;
|
|
35
|
+
if (err.error != null) this.error = err.error;
|
|
36
|
+
if (err.details != null) this.details = err.details;
|
|
37
|
+
|
|
38
|
+
this.name = "DeletePriceConflictError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const DeletePriceConflictError$inboundSchema: z.ZodType<
|
|
44
|
+
DeletePriceConflictError,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
error: z.string().optional(),
|
|
49
|
+
message: z.string().optional(),
|
|
50
|
+
details: z.lazy(() => operations.DeletePriceDetails$inboundSchema).optional(),
|
|
51
|
+
request$: z.instanceof(Request),
|
|
52
|
+
response$: z.instanceof(Response),
|
|
53
|
+
body$: z.string(),
|
|
54
|
+
})
|
|
55
|
+
.transform((v) => {
|
|
56
|
+
return new DeletePriceConflictError(v, {
|
|
57
|
+
request: v.request$,
|
|
58
|
+
response: v.response$,
|
|
59
|
+
body: v.body$,
|
|
60
|
+
});
|
|
61
|
+
});
|
package/src/models/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./item.js";
|
|
|
48
48
|
export * from "./lineitem.js";
|
|
49
49
|
export * from "./lineitemsresponse.js";
|
|
50
50
|
export * from "./lineitemssummary.js";
|
|
51
|
+
export * from "./mappingcapabilities.js";
|
|
51
52
|
export * from "./merchantintegration.js";
|
|
52
53
|
export * from "./merchantintegrationprovider.js";
|
|
53
54
|
export * from "./merchantintegrationstatus.js";
|
package/src/models/invoice.ts
CHANGED
|
@@ -50,6 +50,18 @@ export type InvoiceLineItems = {
|
|
|
50
50
|
totalCount: number;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
55
|
+
*/
|
|
56
|
+
export const PdfSource = {
|
|
57
|
+
Paygentic: "paygentic",
|
|
58
|
+
TaxProvider: "tax_provider",
|
|
59
|
+
} as const;
|
|
60
|
+
/**
|
|
61
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
62
|
+
*/
|
|
63
|
+
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
64
|
+
|
|
53
65
|
/**
|
|
54
66
|
* The current status of the invoice
|
|
55
67
|
*/
|
|
@@ -191,9 +203,13 @@ export type Invoice = {
|
|
|
191
203
|
*/
|
|
192
204
|
paymentUrl?: string | null | undefined;
|
|
193
205
|
/**
|
|
194
|
-
*
|
|
206
|
+
* Link to the invoice document, or null when there is none. For Paygentic-rendered documents this is GET /v2/invoices/{id}/pdf, which requires authentication; for documents supplied by the tax provider it is the provider's own direct link. The URL is stable and does not expire. Branch on pdfSource rather than on the shape of this URL.
|
|
195
207
|
*/
|
|
196
208
|
pdfUrl?: string | null | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
211
|
+
*/
|
|
212
|
+
pdfSource?: PdfSource | null | undefined;
|
|
197
213
|
/**
|
|
198
214
|
* The end of the billing period
|
|
199
215
|
*/
|
|
@@ -272,6 +288,10 @@ export function invoiceLineItemsFromJSON(
|
|
|
272
288
|
);
|
|
273
289
|
}
|
|
274
290
|
|
|
291
|
+
/** @internal */
|
|
292
|
+
export const PdfSource$inboundSchema: z.ZodNativeEnum<typeof PdfSource> = z
|
|
293
|
+
.nativeEnum(PdfSource);
|
|
294
|
+
|
|
275
295
|
/** @internal */
|
|
276
296
|
export const InvoiceStatus$inboundSchema: z.ZodNativeEnum<
|
|
277
297
|
typeof InvoiceStatus
|
|
@@ -339,6 +359,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
339
359
|
).optional(),
|
|
340
360
|
paymentUrl: z.nullable(z.string()).optional(),
|
|
341
361
|
pdfUrl: z.nullable(z.string()).optional(),
|
|
362
|
+
pdfSource: z.nullable(PdfSource$inboundSchema).optional(),
|
|
342
363
|
periodEnd: z.string().datetime({ offset: true }).transform(v =>
|
|
343
364
|
new Date(v)
|
|
344
365
|
),
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* What this provider does with an item's external codes.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* Two independent capabilities, not one direction: the behaviours are not alternatives. An integration can resolve an incoming item code *and* be sent a selected one on a different path, so a single `inbound`/`outbound` value would have to misdescribe it or forbid one of its operations.
|
|
16
|
+
*
|
|
17
|
+
* A capability that is not declared is unavailable rather than inferred. Declaring one does not make a provider connectable — that still requires its credentials and connection lifecycle.
|
|
18
|
+
*/
|
|
19
|
+
export type MappingCapabilities = {
|
|
20
|
+
/**
|
|
21
|
+
* A code arriving from this provider must name exactly one of the merchant's items. The lookup key is the code, so several codes may point at one item while each code resolves to one — which is why a code recorded for this purpose is claimed, and a second item claiming it is a conflict.
|
|
22
|
+
*/
|
|
23
|
+
resolvesItemCodes: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A consumer needs one of an item's codes to send to this provider, and takes the item's designated one (`isDefault`). Because the lookup key is the item, several items may share one code — a chart of accounts exists so that many things sold roll into one account.
|
|
26
|
+
*/
|
|
27
|
+
sendsItemCodes: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const MappingCapabilities$inboundSchema: z.ZodType<
|
|
32
|
+
MappingCapabilities,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
resolvesItemCodes: z.boolean(),
|
|
37
|
+
sendsItemCodes: z.boolean(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function mappingCapabilitiesFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<MappingCapabilities, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => MappingCapabilities$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'MappingCapabilities' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -7,6 +7,10 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
MappingCapabilities,
|
|
12
|
+
MappingCapabilities$inboundSchema,
|
|
13
|
+
} from "./mappingcapabilities.js";
|
|
10
14
|
import {
|
|
11
15
|
MerchantIntegrationProvider,
|
|
12
16
|
MerchantIntegrationProvider$inboundSchema,
|
|
@@ -37,9 +41,19 @@ export type MerchantIntegration = {
|
|
|
37
41
|
*/
|
|
38
42
|
merchantId: string;
|
|
39
43
|
/**
|
|
40
|
-
* External provider a merchant can connect at the tenant level
|
|
44
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
41
45
|
*/
|
|
42
46
|
provider: MerchantIntegrationProvider;
|
|
47
|
+
/**
|
|
48
|
+
* What this provider does with an item's external codes.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
*
|
|
52
|
+
* Two independent capabilities, not one direction: the behaviours are not alternatives. An integration can resolve an incoming item code *and* be sent a selected one on a different path, so a single `inbound`/`outbound` value would have to misdescribe it or forbid one of its operations.
|
|
53
|
+
*
|
|
54
|
+
* A capability that is not declared is unavailable rather than inferred. Declaring one does not make a provider connectable — that still requires its credentials and connection lifecycle.
|
|
55
|
+
*/
|
|
56
|
+
capabilities: MappingCapabilities;
|
|
43
57
|
/**
|
|
44
58
|
* Ampersand installation id.
|
|
45
59
|
*/
|
|
@@ -73,6 +87,7 @@ export const MerchantIntegration$inboundSchema: z.ZodType<
|
|
|
73
87
|
),
|
|
74
88
|
merchantId: z.string(),
|
|
75
89
|
provider: MerchantIntegrationProvider$inboundSchema,
|
|
90
|
+
capabilities: MappingCapabilities$inboundSchema,
|
|
76
91
|
externalId: z.nullable(z.string()),
|
|
77
92
|
status: MerchantIntegrationStatus$inboundSchema,
|
|
78
93
|
config: z.record(z.any()),
|
|
@@ -6,13 +6,15 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* External provider a merchant can connect at the tenant level
|
|
9
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
10
10
|
*/
|
|
11
11
|
export const MerchantIntegrationProvider = {
|
|
12
12
|
Salesforce: "salesforce",
|
|
13
|
+
Netsuite: "netsuite",
|
|
14
|
+
Accountsiq: "accountsiq",
|
|
13
15
|
} as const;
|
|
14
16
|
/**
|
|
15
|
-
* External provider a merchant can connect at the tenant level
|
|
17
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
16
18
|
*/
|
|
17
19
|
export type MerchantIntegrationProvider = ClosedEnum<
|
|
18
20
|
typeof MerchantIntegrationProvider
|
|
@@ -32,13 +32,25 @@ export type CreateExternalReferenceRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
metadata?: { [k: string]: any } | undefined;
|
|
34
34
|
/**
|
|
35
|
-
* Whether this
|
|
35
|
+
* Whether this reference claims `(provider, externalId)` — the code resolves back to this one entity. Unique per merchant; unclaimed references are aliases. **Omitting it claims the code.** Send `false` for a code that is only ever sent outward, such as a ledger account several items post to — claiming that refuses the second item to use it. The default is not derived from the provider: what a code is for is a property of the operation recording it, and one provider can both resolve an arriving code and be sent a selected one. Declaring a schema default here would defeat the distinction, because a generated client materialises the default into the request body and the caller can no longer express "I did not say".
|
|
36
36
|
*/
|
|
37
37
|
isPrimary?: boolean | undefined;
|
|
38
38
|
/**
|
|
39
|
-
* Whether this is the
|
|
39
|
+
* Whether this is the code sent *to* the provider for this entity. At most one per `(entityType, entityId, provider)`. **Omit** to have the entity's first code for the provider designated automatically — see the note on `isPrimary` for why this carries no schema default.
|
|
40
40
|
*/
|
|
41
41
|
isDefault?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Take this code's claim from whichever entity currently holds it, in the same transaction.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
*
|
|
47
|
+
* Without it, claiming a code another entity claims is a `409` identifying the holder — the right answer to an accident, and the common case. With it, the reassignment is the point.
|
|
48
|
+
*
|
|
49
|
+
* It exists because the alternative route — remove the old claim, then create the new one — leaves a window in which the code resolves to nothing. An arrival in that window is still recorded, untagged rather than rejected, so nothing is lost; but it is silent while it lasts and leaves work to repair.
|
|
50
|
+
*
|
|
51
|
+
* Deliberately opt-in, unlike moving a designation. A designation moves within one entity; a claim moves *between* entities and changes what future arrivals resolve to, which should never be a side effect of recording a code. Ignored when the write is not claiming the code.
|
|
52
|
+
*/
|
|
53
|
+
moveClaim?: boolean | undefined;
|
|
42
54
|
};
|
|
43
55
|
|
|
44
56
|
/** @internal */
|
|
@@ -50,8 +62,9 @@ export type CreateExternalReferenceRequest$Outbound = {
|
|
|
50
62
|
externalId: string;
|
|
51
63
|
externalLabel?: string | undefined;
|
|
52
64
|
metadata?: { [k: string]: any } | undefined;
|
|
53
|
-
isPrimary
|
|
54
|
-
isDefault
|
|
65
|
+
isPrimary?: boolean | undefined;
|
|
66
|
+
isDefault?: boolean | undefined;
|
|
67
|
+
moveClaim?: boolean | undefined;
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
/** @internal */
|
|
@@ -67,8 +80,9 @@ export const CreateExternalReferenceRequest$outboundSchema: z.ZodType<
|
|
|
67
80
|
externalId: z.string(),
|
|
68
81
|
externalLabel: z.string().optional(),
|
|
69
82
|
metadata: z.record(z.any()).optional(),
|
|
70
|
-
isPrimary: z.boolean().
|
|
71
|
-
isDefault: z.boolean().
|
|
83
|
+
isPrimary: z.boolean().optional(),
|
|
84
|
+
isDefault: z.boolean().optional(),
|
|
85
|
+
moveClaim: z.boolean().optional(),
|
|
72
86
|
});
|
|
73
87
|
|
|
74
88
|
export function createExternalReferenceRequestToJSON(
|
|
@@ -28,7 +28,7 @@ export const DeleteCustomerType = {
|
|
|
28
28
|
} as const;
|
|
29
29
|
export type DeleteCustomerType = ClosedEnum<typeof DeleteCustomerType>;
|
|
30
30
|
|
|
31
|
-
export type
|
|
31
|
+
export type DeleteCustomerItem = {
|
|
32
32
|
id?: string | undefined;
|
|
33
33
|
status?: string | undefined;
|
|
34
34
|
};
|
|
@@ -36,7 +36,7 @@ export type Item = {
|
|
|
36
36
|
export type DeleteCustomerBlocker = {
|
|
37
37
|
type: DeleteCustomerType;
|
|
38
38
|
count: number;
|
|
39
|
-
items: Array<
|
|
39
|
+
items: Array<DeleteCustomerItem>;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export type DeleteCustomerDetails = {
|
|
@@ -75,19 +75,22 @@ export const DeleteCustomerType$inboundSchema: z.ZodNativeEnum<
|
|
|
75
75
|
> = z.nativeEnum(DeleteCustomerType);
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
78
|
-
export const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
export const DeleteCustomerItem$inboundSchema: z.ZodType<
|
|
79
|
+
DeleteCustomerItem,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
unknown
|
|
82
|
+
> = z.object({
|
|
83
|
+
id: z.string().optional(),
|
|
84
|
+
status: z.string().optional(),
|
|
85
|
+
});
|
|
83
86
|
|
|
84
|
-
export function
|
|
87
|
+
export function deleteCustomerItemFromJSON(
|
|
85
88
|
jsonString: string,
|
|
86
|
-
): SafeParseResult<
|
|
89
|
+
): SafeParseResult<DeleteCustomerItem, SDKValidationError> {
|
|
87
90
|
return safeParse(
|
|
88
91
|
jsonString,
|
|
89
|
-
(x) =>
|
|
90
|
-
`Failed to parse '
|
|
92
|
+
(x) => DeleteCustomerItem$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'DeleteCustomerItem' from JSON`,
|
|
91
94
|
);
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -99,7 +102,7 @@ export const DeleteCustomerBlocker$inboundSchema: z.ZodType<
|
|
|
99
102
|
> = z.object({
|
|
100
103
|
type: DeleteCustomerType$inboundSchema,
|
|
101
104
|
count: z.number().int(),
|
|
102
|
-
items: z.array(z.lazy(() =>
|
|
105
|
+
items: z.array(z.lazy(() => DeleteCustomerItem$inboundSchema)),
|
|
103
106
|
});
|
|
104
107
|
|
|
105
108
|
export function deleteCustomerBlockerFromJSON(
|
|
@@ -14,9 +14,15 @@ export type DeleteFeeRequest = {
|
|
|
14
14
|
id: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
export type DeleteFeeItem = {
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
invoiceDisplayName?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
export type DeleteFeeBlocker = {
|
|
18
23
|
type?: string | undefined;
|
|
19
24
|
count?: number | undefined;
|
|
25
|
+
items?: Array<DeleteFeeItem> | undefined;
|
|
20
26
|
};
|
|
21
27
|
|
|
22
28
|
export type DeleteFeeDetails = {
|
|
@@ -45,6 +51,26 @@ export function deleteFeeRequestToJSON(
|
|
|
45
51
|
);
|
|
46
52
|
}
|
|
47
53
|
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const DeleteFeeItem$inboundSchema: z.ZodType<
|
|
56
|
+
DeleteFeeItem,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
id: z.string().optional(),
|
|
61
|
+
invoiceDisplayName: z.string().optional(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function deleteFeeItemFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<DeleteFeeItem, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => DeleteFeeItem$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'DeleteFeeItem' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
48
74
|
/** @internal */
|
|
49
75
|
export const DeleteFeeBlocker$inboundSchema: z.ZodType<
|
|
50
76
|
DeleteFeeBlocker,
|
|
@@ -53,6 +79,7 @@ export const DeleteFeeBlocker$inboundSchema: z.ZodType<
|
|
|
53
79
|
> = z.object({
|
|
54
80
|
type: z.string().optional(),
|
|
55
81
|
count: z.number().int().optional(),
|
|
82
|
+
items: z.array(z.lazy(() => DeleteFeeItem$inboundSchema)).optional(),
|
|
56
83
|
});
|
|
57
84
|
|
|
58
85
|
export function deleteFeeBlockerFromJSON(
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
6
9
|
|
|
7
10
|
export type DeletePriceRequest = {
|
|
8
11
|
/**
|
|
@@ -11,6 +14,23 @@ export type DeletePriceRequest = {
|
|
|
11
14
|
id: string;
|
|
12
15
|
};
|
|
13
16
|
|
|
17
|
+
export type DeletePriceItem = {
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
versionNumber?: number | undefined;
|
|
21
|
+
versionNumbers?: Array<number> | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type DeletePriceBlocker = {
|
|
25
|
+
type?: string | undefined;
|
|
26
|
+
count?: number | undefined;
|
|
27
|
+
items?: Array<DeletePriceItem> | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type DeletePriceDetails = {
|
|
31
|
+
blockers?: Array<DeletePriceBlocker> | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
14
34
|
/** @internal */
|
|
15
35
|
export type DeletePriceRequest$Outbound = {
|
|
16
36
|
id: string;
|
|
@@ -32,3 +52,65 @@ export function deletePriceRequestToJSON(
|
|
|
32
52
|
DeletePriceRequest$outboundSchema.parse(deletePriceRequest),
|
|
33
53
|
);
|
|
34
54
|
}
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const DeletePriceItem$inboundSchema: z.ZodType<
|
|
58
|
+
DeletePriceItem,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
unknown
|
|
61
|
+
> = z.object({
|
|
62
|
+
id: z.string().optional(),
|
|
63
|
+
name: z.string().optional(),
|
|
64
|
+
versionNumber: z.number().int().optional(),
|
|
65
|
+
versionNumbers: z.array(z.number().int()).optional(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function deletePriceItemFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<DeletePriceItem, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => DeletePriceItem$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'DeletePriceItem' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const DeletePriceBlocker$inboundSchema: z.ZodType<
|
|
80
|
+
DeletePriceBlocker,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
type: z.string().optional(),
|
|
85
|
+
count: z.number().int().optional(),
|
|
86
|
+
items: z.array(z.lazy(() => DeletePriceItem$inboundSchema)).optional(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function deletePriceBlockerFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<DeletePriceBlocker, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) => DeletePriceBlocker$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
+
`Failed to parse 'DeletePriceBlocker' from JSON`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const DeletePriceDetails$inboundSchema: z.ZodType<
|
|
101
|
+
DeletePriceDetails,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
unknown
|
|
104
|
+
> = z.object({
|
|
105
|
+
blockers: z.array(z.lazy(() => DeletePriceBlocker$inboundSchema)).optional(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export function deletePriceDetailsFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<DeletePriceDetails, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => DeletePriceDetails$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'DeletePriceDetails' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 DownloadInvoicePdfRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The invoice ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DownloadInvoicePdfRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DownloadInvoicePdfRequest$outboundSchema: z.ZodType<
|
|
21
|
+
DownloadInvoicePdfRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
DownloadInvoicePdfRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function downloadInvoicePdfRequestToJSON(
|
|
29
|
+
downloadInvoicePdfRequest: DownloadInvoicePdfRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
DownloadInvoicePdfRequest$outboundSchema.parse(downloadInvoicePdfRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -32,13 +32,13 @@ export * from "./deletecustomer.js";
|
|
|
32
32
|
export * from "./deleteexternalreference.js";
|
|
33
33
|
export * from "./deletefeature.js";
|
|
34
34
|
export * from "./deletefee.js";
|
|
35
|
-
export * from "./deleteitem.js";
|
|
36
35
|
export * from "./deleteorder.js";
|
|
37
36
|
export * from "./deleteorderlineitem.js";
|
|
38
37
|
export * from "./deleteprice.js";
|
|
39
38
|
export * from "./deletesourcerule.js";
|
|
40
39
|
export * from "./deletetestclock.js";
|
|
41
40
|
export * from "./disconnectmerchantintegration.js";
|
|
41
|
+
export * from "./downloadinvoicepdf.js";
|
|
42
42
|
export * from "./generateportallink.js";
|
|
43
43
|
export * from "./generatescheduleinvoices.js";
|
|
44
44
|
export * from "./getapproval.js";
|
|
@@ -22,6 +22,10 @@ export type ListBillableMetricsRequest = {
|
|
|
22
22
|
* Number of billable metrics to skip.
|
|
23
23
|
*/
|
|
24
24
|
offset?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Filter to the charges tagged with this item. Lets a surface that needs only one item's charges read exactly those, rather than reading the whole product's and filtering — which makes its completeness a function of how large the product is.
|
|
27
|
+
*/
|
|
28
|
+
itemId?: string | undefined;
|
|
25
29
|
/**
|
|
26
30
|
* Filter billable metrics by product ID.
|
|
27
31
|
*/
|
|
@@ -55,6 +59,7 @@ export type ListBillableMetricsRequest$Outbound = {
|
|
|
55
59
|
limit: number;
|
|
56
60
|
merchantId: string;
|
|
57
61
|
offset: number;
|
|
62
|
+
itemId?: string | undefined;
|
|
58
63
|
productId?: string | undefined;
|
|
59
64
|
};
|
|
60
65
|
|
|
@@ -67,6 +72,7 @@ export const ListBillableMetricsRequest$outboundSchema: z.ZodType<
|
|
|
67
72
|
limit: z.number().int().default(10),
|
|
68
73
|
merchantId: z.string(),
|
|
69
74
|
offset: z.number().int().default(0),
|
|
75
|
+
itemId: z.string().optional(),
|
|
70
76
|
productId: z.string().optional(),
|
|
71
77
|
});
|
|
72
78
|
|
|
@@ -22,6 +22,10 @@ export type ListFeesRequest = {
|
|
|
22
22
|
* Number of fees to skip.
|
|
23
23
|
*/
|
|
24
24
|
offset?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Filter to the charges tagged with this item. Lets a surface that needs only one item's charges read exactly those, rather than reading the whole product's and filtering — which makes its completeness a function of how large the product is.
|
|
27
|
+
*/
|
|
28
|
+
itemId?: string | undefined;
|
|
25
29
|
/**
|
|
26
30
|
* Filter fees by product ID.
|
|
27
31
|
*/
|
|
@@ -53,6 +57,7 @@ export type ListFeesRequest$Outbound = {
|
|
|
53
57
|
limit: number;
|
|
54
58
|
merchantId: string;
|
|
55
59
|
offset: number;
|
|
60
|
+
itemId?: string | undefined;
|
|
56
61
|
productId?: string | undefined;
|
|
57
62
|
};
|
|
58
63
|
|
|
@@ -65,6 +70,7 @@ export const ListFeesRequest$outboundSchema: z.ZodType<
|
|
|
65
70
|
limit: z.number().int().default(10),
|
|
66
71
|
merchantId: z.string(),
|
|
67
72
|
offset: z.number().int().default(0),
|
|
73
|
+
itemId: z.string().optional(),
|
|
68
74
|
productId: z.string().optional(),
|
|
69
75
|
});
|
|
70
76
|
|
|
@@ -13,6 +13,10 @@ export type ListPricesRequest = {
|
|
|
13
13
|
* Filter prices by billable metric ID
|
|
14
14
|
*/
|
|
15
15
|
billableMetricId?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Filter prices by merchant organization ID. Matches prices reached via either a billable metric or a fee belonging to that merchant. Unlike the unfiltered listing, this includes prices whose billable metric or fee has been deleted — deleting a parent does not delete its prices, and they can still bill. Returns 404 if the merchant does not exist.
|
|
18
|
+
*/
|
|
19
|
+
merchantId?: string | undefined;
|
|
16
20
|
/**
|
|
17
21
|
* Number of prices to return
|
|
18
22
|
*/
|
|
@@ -40,6 +44,7 @@ export type ListPricesResponse = {
|
|
|
40
44
|
/** @internal */
|
|
41
45
|
export type ListPricesRequest$Outbound = {
|
|
42
46
|
billableMetricId?: string | undefined;
|
|
47
|
+
merchantId?: string | undefined;
|
|
43
48
|
limit: number;
|
|
44
49
|
offset: number;
|
|
45
50
|
};
|
|
@@ -51,6 +56,7 @@ export const ListPricesRequest$outboundSchema: z.ZodType<
|
|
|
51
56
|
ListPricesRequest
|
|
52
57
|
> = z.object({
|
|
53
58
|
billableMetricId: z.string().optional(),
|
|
59
|
+
merchantId: z.string().optional(),
|
|
54
60
|
limit: z.number().int().default(10),
|
|
55
61
|
offset: z.number().int().default(0),
|
|
56
62
|
});
|