@paygentic/sdk 0.6.22 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/funcs/billableMetricsGet.js.map +1 -1
- package/dist/commonjs/funcs/billableMetricsMeter.js.map +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/customersCreate.js +2 -2
- package/dist/commonjs/funcs/customersCreate.js.map +1 -1
- package/dist/commonjs/funcs/customersDelete.js.map +1 -1
- package/dist/commonjs/funcs/customersGet.js.map +1 -1
- package/dist/commonjs/funcs/customersList.js +1 -0
- package/dist/commonjs/funcs/customersList.js.map +1 -1
- package/dist/commonjs/funcs/customersUpdate.js +2 -2
- package/dist/commonjs/funcs/customersUpdate.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGet.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsCreate.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsGet.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsList.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsPurchase.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsVoid.js.map +1 -1
- package/dist/commonjs/funcs/featuresDelete.js.map +1 -1
- package/dist/commonjs/funcs/featuresGet.js.map +1 -1
- package/dist/commonjs/funcs/featuresUpdate.js.map +1 -1
- package/dist/commonjs/funcs/feesDelete.js.map +1 -1
- package/dist/commonjs/funcs/feesGet.js.map +1 -1
- package/dist/commonjs/funcs/feesGetPrice.js.map +1 -1
- package/dist/commonjs/funcs/feesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2Get.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2GetLineItems.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2List.js +1 -0
- package/dist/commonjs/funcs/invoicesV2List.js.map +1 -1
- package/dist/commonjs/funcs/paymentsGet.js.map +1 -1
- package/dist/commonjs/funcs/plansGet.js.map +1 -1
- package/dist/commonjs/funcs/plansUpdate.js.map +1 -1
- package/dist/commonjs/funcs/pricesDelete.js.map +1 -1
- package/dist/commonjs/funcs/pricesGet.js.map +1 -1
- package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/productsGet.js.map +1 -1
- package/dist/commonjs/funcs/productsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/sourcesEventsApprove.js.map +1 -1
- package/dist/commonjs/funcs/sourcesEventsBulkApprove.js.map +1 -1
- package/dist/commonjs/funcs/sourcesEventsBulkReject.js.map +1 -1
- package/dist/commonjs/funcs/sourcesEventsList.js.map +1 -1
- package/dist/commonjs/funcs/sourcesEventsReject.js.map +1 -1
- package/dist/commonjs/funcs/sourcesGet.js.map +1 -1
- package/dist/commonjs/funcs/sourcesRulesDelete.js.map +1 -1
- package/dist/commonjs/funcs/sourcesRulesGet.js.map +1 -1
- package/dist/commonjs/funcs/sourcesRulesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/sourcesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsGeneratePortalLink.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsGet.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsTerminate.js.map +1 -1
- package/dist/commonjs/funcs/testClocksAdvance.js.map +1 -1
- package/dist/commonjs/funcs/testClocksDelete.js.map +1 -1
- package/dist/commonjs/funcs/testClocksGet.js.map +1 -1
- package/dist/commonjs/funcs/usageEventsGet.js.map +1 -1
- package/dist/commonjs/funcs/usageEventsRefund.js.map +1 -1
- package/dist/commonjs/funcs/usersGet.js.map +1 -1
- package/dist/commonjs/funcs/usersUpdate.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -1
- package/dist/commonjs/lib/files.js +19 -0
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +8 -4
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/url.d.ts.map +1 -1
- package/dist/commonjs/lib/url.js +4 -2
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/customer.d.ts +4 -0
- package/dist/commonjs/models/customer.d.ts.map +1 -1
- package/dist/commonjs/models/customer.js +1 -0
- package/dist/commonjs/models/customer.js.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.d.ts +5 -0
- package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.js +1 -0
- package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/listcustomers.d.ts +5 -0
- package/dist/commonjs/models/operations/listcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcustomers.js +1 -0
- package/dist/commonjs/models/operations/listcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/listinvoices.d.ts +5 -0
- package/dist/commonjs/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listinvoices.js +1 -0
- package/dist/commonjs/models/operations/listinvoices.js.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts +5 -0
- package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js +1 -0
- package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
- package/dist/esm/funcs/billableMetricsGet.js.map +1 -1
- package/dist/esm/funcs/billableMetricsMeter.js.map +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/esm/funcs/customersCreate.js +2 -2
- package/dist/esm/funcs/customersCreate.js.map +1 -1
- package/dist/esm/funcs/customersDelete.js.map +1 -1
- package/dist/esm/funcs/customersGet.js.map +1 -1
- package/dist/esm/funcs/customersList.js +1 -0
- package/dist/esm/funcs/customersList.js.map +1 -1
- package/dist/esm/funcs/customersUpdate.js +2 -2
- package/dist/esm/funcs/customersUpdate.js.map +1 -1
- package/dist/esm/funcs/entitlementsGet.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsCreate.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsGet.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsList.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsPurchase.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsVoid.js.map +1 -1
- package/dist/esm/funcs/featuresDelete.js.map +1 -1
- package/dist/esm/funcs/featuresGet.js.map +1 -1
- package/dist/esm/funcs/featuresUpdate.js.map +1 -1
- package/dist/esm/funcs/feesDelete.js.map +1 -1
- package/dist/esm/funcs/feesGet.js.map +1 -1
- package/dist/esm/funcs/feesGetPrice.js.map +1 -1
- package/dist/esm/funcs/feesUpdate.js.map +1 -1
- package/dist/esm/funcs/invoicesV2Get.js.map +1 -1
- package/dist/esm/funcs/invoicesV2GetLineItems.js.map +1 -1
- package/dist/esm/funcs/invoicesV2List.js +1 -0
- package/dist/esm/funcs/invoicesV2List.js.map +1 -1
- package/dist/esm/funcs/paymentsGet.js.map +1 -1
- package/dist/esm/funcs/plansGet.js.map +1 -1
- package/dist/esm/funcs/plansUpdate.js.map +1 -1
- package/dist/esm/funcs/pricesDelete.js.map +1 -1
- package/dist/esm/funcs/pricesGet.js.map +1 -1
- package/dist/esm/funcs/pricesUpdate.js.map +1 -1
- package/dist/esm/funcs/productsGet.js.map +1 -1
- package/dist/esm/funcs/productsUpdate.js.map +1 -1
- package/dist/esm/funcs/sourcesEventsApprove.js.map +1 -1
- package/dist/esm/funcs/sourcesEventsBulkApprove.js.map +1 -1
- package/dist/esm/funcs/sourcesEventsBulkReject.js.map +1 -1
- package/dist/esm/funcs/sourcesEventsList.js.map +1 -1
- package/dist/esm/funcs/sourcesEventsReject.js.map +1 -1
- package/dist/esm/funcs/sourcesGet.js.map +1 -1
- package/dist/esm/funcs/sourcesRulesDelete.js.map +1 -1
- package/dist/esm/funcs/sourcesRulesGet.js.map +1 -1
- package/dist/esm/funcs/sourcesRulesUpdate.js.map +1 -1
- package/dist/esm/funcs/sourcesUpdate.js.map +1 -1
- package/dist/esm/funcs/subscriptionsGeneratePortalLink.js.map +1 -1
- package/dist/esm/funcs/subscriptionsGet.js.map +1 -1
- package/dist/esm/funcs/subscriptionsTerminate.js.map +1 -1
- package/dist/esm/funcs/testClocksAdvance.js.map +1 -1
- package/dist/esm/funcs/testClocksDelete.js.map +1 -1
- package/dist/esm/funcs/testClocksGet.js.map +1 -1
- package/dist/esm/funcs/usageEventsGet.js.map +1 -1
- package/dist/esm/funcs/usageEventsRefund.js.map +1 -1
- package/dist/esm/funcs/usersGet.js.map +1 -1
- package/dist/esm/funcs/usersUpdate.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -1
- package/dist/esm/lib/files.js +18 -0
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +8 -4
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/url.d.ts.map +1 -1
- package/dist/esm/lib/url.js +4 -2
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/customer.d.ts +4 -0
- package/dist/esm/models/customer.d.ts.map +1 -1
- package/dist/esm/models/customer.js +1 -0
- package/dist/esm/models/customer.js.map +1 -1
- package/dist/esm/models/operations/createcustomer.d.ts +5 -0
- package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/createcustomer.js +1 -0
- package/dist/esm/models/operations/createcustomer.js.map +1 -1
- package/dist/esm/models/operations/listcustomers.d.ts +5 -0
- package/dist/esm/models/operations/listcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/listcustomers.js +1 -0
- package/dist/esm/models/operations/listcustomers.js.map +1 -1
- package/dist/esm/models/operations/listinvoices.d.ts +5 -0
- package/dist/esm/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/esm/models/operations/listinvoices.js +1 -0
- package/dist/esm/models/operations/listinvoices.js.map +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts +5 -0
- package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecustomer.js +1 -0
- package/dist/esm/models/operations/updatecustomer.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/billableMetricsGet.ts +0 -1
- package/src/funcs/billableMetricsMeter.ts +0 -1
- package/src/funcs/billableMetricsUpdate.ts +0 -1
- package/src/funcs/customersCreate.ts +2 -2
- package/src/funcs/customersDelete.ts +0 -1
- package/src/funcs/customersGet.ts +0 -1
- package/src/funcs/customersList.ts +1 -0
- package/src/funcs/customersUpdate.ts +2 -3
- package/src/funcs/entitlementsGet.ts +0 -1
- package/src/funcs/entitlementsGrantsCreate.ts +0 -1
- package/src/funcs/entitlementsGrantsGet.ts +0 -1
- package/src/funcs/entitlementsGrantsList.ts +0 -1
- package/src/funcs/entitlementsGrantsPurchase.ts +0 -1
- package/src/funcs/entitlementsGrantsVoid.ts +0 -1
- package/src/funcs/featuresDelete.ts +0 -1
- package/src/funcs/featuresGet.ts +0 -1
- package/src/funcs/featuresUpdate.ts +0 -1
- package/src/funcs/feesDelete.ts +0 -1
- package/src/funcs/feesGet.ts +0 -1
- package/src/funcs/feesGetPrice.ts +0 -1
- package/src/funcs/feesUpdate.ts +0 -1
- package/src/funcs/invoicesV2Get.ts +0 -1
- package/src/funcs/invoicesV2GetLineItems.ts +0 -1
- package/src/funcs/invoicesV2List.ts +1 -0
- package/src/funcs/paymentsGet.ts +0 -1
- package/src/funcs/plansGet.ts +0 -1
- package/src/funcs/plansUpdate.ts +0 -1
- package/src/funcs/pricesDelete.ts +0 -1
- package/src/funcs/pricesGet.ts +0 -1
- package/src/funcs/pricesUpdate.ts +0 -1
- package/src/funcs/productsGet.ts +0 -1
- package/src/funcs/productsUpdate.ts +0 -1
- package/src/funcs/sourcesEventsApprove.ts +0 -1
- package/src/funcs/sourcesEventsBulkApprove.ts +0 -1
- package/src/funcs/sourcesEventsBulkReject.ts +0 -1
- package/src/funcs/sourcesEventsList.ts +0 -1
- package/src/funcs/sourcesEventsReject.ts +0 -1
- package/src/funcs/sourcesGet.ts +0 -1
- package/src/funcs/sourcesRulesDelete.ts +0 -1
- package/src/funcs/sourcesRulesGet.ts +0 -1
- package/src/funcs/sourcesRulesUpdate.ts +0 -1
- package/src/funcs/sourcesUpdate.ts +0 -1
- package/src/funcs/subscriptionsGeneratePortalLink.ts +0 -1
- package/src/funcs/subscriptionsGet.ts +0 -1
- package/src/funcs/subscriptionsTerminate.ts +0 -1
- package/src/funcs/testClocksAdvance.ts +0 -1
- package/src/funcs/testClocksDelete.ts +0 -1
- package/src/funcs/testClocksGet.ts +0 -1
- package/src/funcs/usageEventsGet.ts +0 -1
- package/src/funcs/usageEventsRefund.ts +0 -1
- package/src/funcs/usersGet.ts +0 -1
- package/src/funcs/usersUpdate.ts +0 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/files.ts +22 -0
- package/src/lib/sdks.ts +7 -5
- package/src/lib/url.ts +16 -14
- package/src/models/customer.ts +5 -0
- package/src/models/operations/createcustomer.ts +6 -0
- package/src/models/operations/listcustomers.ts +6 -0
- package/src/models/operations/listinvoices.ts +6 -0
- package/src/models/operations/updatecustomer.ts +6 -0
package/src/funcs/paymentsGet.ts
CHANGED
package/src/funcs/plansGet.ts
CHANGED
package/src/funcs/plansUpdate.ts
CHANGED
package/src/funcs/pricesGet.ts
CHANGED
package/src/funcs/productsGet.ts
CHANGED
package/src/funcs/sourcesGet.ts
CHANGED
package/src/funcs/usersGet.ts
CHANGED
package/src/funcs/usersUpdate.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.1.0",
|
|
64
|
-
sdkVersion: "0.6.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.6.
|
|
64
|
+
sdkVersion: "0.6.23",
|
|
65
|
+
genVersion: "2.869.3",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.6.23 2.869.3 0.1.0 @paygentic/sdk",
|
|
67
67
|
} as const;
|
package/src/lib/files.ts
CHANGED
|
@@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null {
|
|
|
80
80
|
|
|
81
81
|
return mimeTypes[ext] || null;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Creates a Blob from file content with the given MIME type.
|
|
86
|
+
*
|
|
87
|
+
* Node.js Buffers are Uint8Array subclasses that may share a pooled
|
|
88
|
+
* ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
|
|
89
|
+
* such a Buffer directly to `new Blob([buf])` can include the entire
|
|
90
|
+
* underlying pool on some runtimes, producing a Blob with extra bytes
|
|
91
|
+
* that corrupts multipart uploads.
|
|
92
|
+
*
|
|
93
|
+
* Copying into a standalone Uint8Array ensures the Blob receives only the
|
|
94
|
+
* intended bytes regardless of runtime behaviour.
|
|
95
|
+
*/
|
|
96
|
+
export function bytesToBlob(
|
|
97
|
+
content: Uint8Array<ArrayBufferLike> | ArrayBuffer | Blob | string,
|
|
98
|
+
contentType: string,
|
|
99
|
+
): Blob {
|
|
100
|
+
if (content instanceof Uint8Array) {
|
|
101
|
+
return new Blob([new Uint8Array(content)], { type: contentType });
|
|
102
|
+
}
|
|
103
|
+
return new Blob([content as BlobPart], { type: contentType });
|
|
104
|
+
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -127,13 +127,15 @@ export class ClientSDK {
|
|
|
127
127
|
if (!base) {
|
|
128
128
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
const baseURL = new URL(base);
|
|
131
|
+
let reqURL: URL;
|
|
133
132
|
if (path) {
|
|
134
|
-
|
|
135
|
-
reqURL
|
|
133
|
+
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
134
|
+
reqURL = new URL(path, baseURL);
|
|
135
|
+
} else {
|
|
136
|
+
reqURL = baseURL;
|
|
136
137
|
}
|
|
138
|
+
reqURL.hash = "";
|
|
137
139
|
|
|
138
140
|
let finalQuery = query || "";
|
|
139
141
|
|
package/src/lib/url.ts
CHANGED
|
@@ -13,21 +13,23 @@ export function pathToFunc(
|
|
|
13
13
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
-
return pathPattern
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return pathPattern
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
32
34
|
};
|
|
33
35
|
}
|
package/src/models/customer.ts
CHANGED
|
@@ -46,6 +46,10 @@ export type Customer = {
|
|
|
46
46
|
* Business tax registration identifier. Sample values: 'GB123456789' for UK VAT, 'DE123456789' for German VAT, 'FR12345678901' for French VAT. Enables inter-company tax handling and exemption from standard tax collection.
|
|
47
47
|
*/
|
|
48
48
|
taxId?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Merchant-defined identifier for this customer in their own system.
|
|
51
|
+
*/
|
|
52
|
+
externalId?: string | undefined;
|
|
49
53
|
/**
|
|
50
54
|
* An object mapping plan IDs, metric IDs, or 'default' to a tax rate percentage (e.g., 13 for 13%)
|
|
51
55
|
*/
|
|
@@ -98,6 +102,7 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
98
102
|
merchantId: z.string(),
|
|
99
103
|
organization: z.lazy(() => CustomerOrganization$inboundSchema).optional(),
|
|
100
104
|
taxId: z.string().optional(),
|
|
105
|
+
externalId: z.string().optional(),
|
|
101
106
|
taxRates: z.record(z.number()).optional(),
|
|
102
107
|
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
103
108
|
validTaxAddress: ValidTaxAddress$inboundSchema,
|
|
@@ -44,6 +44,10 @@ export type CreateCustomerRequest = {
|
|
|
44
44
|
* Optional business tax registration identifier. Sample values: 'GB123456789' for UK VAT, 'DE123456789' for German VAT, 'FR12345678901' for French VAT. Supplying this value enables inter-company tax handling and exemption from standard tax collection.
|
|
45
45
|
*/
|
|
46
46
|
taxId?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Merchant-defined identifier for this customer in their own system.
|
|
49
|
+
*/
|
|
50
|
+
externalId?: string | undefined;
|
|
47
51
|
/**
|
|
48
52
|
* An object mapping plan IDs, metric IDs, or 'default' to a tax rate percentage (e.g., 13 for 13%)
|
|
49
53
|
*/
|
|
@@ -106,6 +110,7 @@ export type CreateCustomerRequest$Outbound = {
|
|
|
106
110
|
consumerId?: string | undefined;
|
|
107
111
|
merchantId: string;
|
|
108
112
|
taxId?: string | undefined;
|
|
113
|
+
externalId?: string | undefined;
|
|
109
114
|
taxRates?: { [k: string]: number } | undefined;
|
|
110
115
|
};
|
|
111
116
|
|
|
@@ -119,6 +124,7 @@ export const CreateCustomerRequest$outboundSchema: z.ZodType<
|
|
|
119
124
|
consumerId: z.string().optional(),
|
|
120
125
|
merchantId: z.string(),
|
|
121
126
|
taxId: z.string().optional(),
|
|
127
|
+
externalId: z.string().optional(),
|
|
122
128
|
taxRates: z.record(z.number()).optional(),
|
|
123
129
|
});
|
|
124
130
|
|
|
@@ -26,6 +26,10 @@ export type ListCustomersRequest = {
|
|
|
26
26
|
* Filter customers by billing email (case-insensitive substring match). Minimum 3 characters required for efficient index usage. Accepts partial values — e.g. a domain ("acme.com") or local part ("billing").
|
|
27
27
|
*/
|
|
28
28
|
email?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Filter customers by exact external ID match.
|
|
31
|
+
*/
|
|
32
|
+
externalId?: string | undefined;
|
|
29
33
|
/**
|
|
30
34
|
* ID of the merchant organization to filter customers by
|
|
31
35
|
*/
|
|
@@ -55,6 +59,7 @@ export type ListCustomersRequest$Outbound = {
|
|
|
55
59
|
offset: number;
|
|
56
60
|
name?: string | undefined;
|
|
57
61
|
email?: string | undefined;
|
|
62
|
+
externalId?: string | undefined;
|
|
58
63
|
organizationId: string;
|
|
59
64
|
};
|
|
60
65
|
|
|
@@ -68,6 +73,7 @@ export const ListCustomersRequest$outboundSchema: z.ZodType<
|
|
|
68
73
|
offset: z.number().int().default(0),
|
|
69
74
|
name: z.string().optional(),
|
|
70
75
|
email: z.string().optional(),
|
|
76
|
+
externalId: z.string().optional(),
|
|
71
77
|
organizationId: z.string(),
|
|
72
78
|
});
|
|
73
79
|
|
|
@@ -58,6 +58,10 @@ export type ListInvoicesRequest = {
|
|
|
58
58
|
* Filter invoices by subscription ID
|
|
59
59
|
*/
|
|
60
60
|
subscriptionId?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Filter invoices by merchant ID
|
|
63
|
+
*/
|
|
64
|
+
merchantId?: string | undefined;
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
export const ListInvoicesObject = {
|
|
@@ -88,6 +92,7 @@ export type ListInvoicesRequest$Outbound = {
|
|
|
88
92
|
nextActionAt?: string | undefined;
|
|
89
93
|
status?: string | undefined;
|
|
90
94
|
subscriptionId?: string | undefined;
|
|
95
|
+
merchantId?: string | undefined;
|
|
91
96
|
};
|
|
92
97
|
|
|
93
98
|
/** @internal */
|
|
@@ -100,6 +105,7 @@ export const ListInvoicesRequest$outboundSchema: z.ZodType<
|
|
|
100
105
|
nextActionAt: NextActionAt$outboundSchema.optional(),
|
|
101
106
|
status: ListInvoicesStatus$outboundSchema.optional(),
|
|
102
107
|
subscriptionId: z.string().optional(),
|
|
108
|
+
merchantId: z.string().optional(),
|
|
103
109
|
});
|
|
104
110
|
|
|
105
111
|
export function listInvoicesRequestToJSON(
|
|
@@ -12,6 +12,10 @@ export type UpdateCustomerRequestBody = {
|
|
|
12
12
|
* Business tax registration identifier. Sample values: 'GB123456789' for UK VAT, 'DE123456789' for German VAT, 'FR12345678901' for French VAT. Enables inter-company tax handling and exemption from standard tax collection. Assign null to delete the identifier.
|
|
13
13
|
*/
|
|
14
14
|
taxId?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Merchant-defined identifier for this customer in their own system. Set to null to clear.
|
|
17
|
+
*/
|
|
18
|
+
externalId?: string | null | undefined;
|
|
15
19
|
taxRates?: number | { [k: string]: number } | undefined;
|
|
16
20
|
};
|
|
17
21
|
|
|
@@ -40,6 +44,7 @@ export function taxRatesToJSON(taxRates: TaxRates): string {
|
|
|
40
44
|
/** @internal */
|
|
41
45
|
export type UpdateCustomerRequestBody$Outbound = {
|
|
42
46
|
taxId?: string | null | undefined;
|
|
47
|
+
externalId?: string | null | undefined;
|
|
43
48
|
taxRates?: number | { [k: string]: number } | undefined;
|
|
44
49
|
};
|
|
45
50
|
|
|
@@ -50,6 +55,7 @@ export const UpdateCustomerRequestBody$outboundSchema: z.ZodType<
|
|
|
50
55
|
UpdateCustomerRequestBody
|
|
51
56
|
> = z.object({
|
|
52
57
|
taxId: z.nullable(z.string()).optional(),
|
|
58
|
+
externalId: z.nullable(z.string()).optional(),
|
|
53
59
|
taxRates: z.union([z.number(), z.record(z.number())]).optional(),
|
|
54
60
|
});
|
|
55
61
|
|