@flexprice/sdk 2.1.49-dev.1 → 2.1.49-dev.10
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/docs/sdk/models/billing-address.md +20 -0
- package/docs/sdk/models/billing-details.md +18 -0
- package/docs/sdk/models/billing-entity-mode-response.md +15 -0
- package/docs/sdk/models/billing-entity-mode.md +17 -0
- package/docs/sdk/models/billing-entity-response.md +27 -0
- package/docs/sdk/models/billingterm-instalment.md +1 -0
- package/docs/sdk/models/create-billing-entity-request.md +21 -0
- package/docs/sdk/models/create-customer-request.md +1 -0
- package/docs/sdk/models/customer-filter.md +1 -0
- package/docs/sdk/models/customer-response.md +1 -0
- package/docs/sdk/models/customer.md +1 -0
- package/docs/sdk/models/get-billing-entity-request.md +17 -0
- package/docs/sdk/models/get-usage-analytics-request.md +1 -1
- package/docs/sdk/models/get-usage-analytics-response.md +10 -8
- package/docs/sdk/models/invoice-billing-entity.md +17 -0
- package/docs/sdk/models/invoice-filter.md +1 -0
- package/docs/sdk/models/invoice-response.md +2 -0
- package/docs/sdk/models/list-billing-entities-order.md +15 -0
- package/docs/sdk/models/list-billing-entities-request.md +22 -0
- package/docs/sdk/models/list-billing-entities-response.md +16 -0
- package/docs/sdk/models/list-billing-entities-status.md +15 -0
- package/docs/sdk/models/tax-rate-entity-type.md +2 -2
- package/docs/sdk/models/update-billing-entity-request-request.md +19 -0
- package/docs/sdk/models/update-billing-entity-request.md +18 -0
- package/docs/sdk/models/update-customer-request.md +1 -0
- package/docs/sdk/models/usage-analytic-instalment.md +24 -0
- package/docs/sdk/models/webhook-dto-customer.md +1 -0
- package/docs/sdk/models/webhook-dto-invoice.md +1 -0
- package/docs/sdks/billingentities/README.md +442 -0
- package/docs/sdks/subscriptions/README.md +1 -1
- package/esm/funcs/billing-entities-create-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-create-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-create-billing-entity.js +83 -0
- package/esm/funcs/billing-entities-create-billing-entity.js.map +1 -0
- package/esm/funcs/billing-entities-enable-billing-entities.d.ts +17 -0
- package/esm/funcs/billing-entities-enable-billing-entities.d.ts.map +1 -0
- package/esm/funcs/billing-entities-enable-billing-entities.js +72 -0
- package/esm/funcs/billing-entities-enable-billing-entities.js.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.d.ts +17 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.d.ts.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.js +72 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.js.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-get-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entity.js +91 -0
- package/esm/funcs/billing-entities-get-billing-entity.js.map +1 -0
- package/esm/funcs/billing-entities-list-billing-entities.d.ts +17 -0
- package/esm/funcs/billing-entities-list-billing-entities.d.ts.map +1 -0
- package/esm/funcs/billing-entities-list-billing-entities.js +94 -0
- package/esm/funcs/billing-entities-list-billing-entities.js.map +1 -0
- package/esm/funcs/billing-entities-update-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-update-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-update-billing-entity.js +93 -0
- package/esm/funcs/billing-entities-update-billing-entity.js.map +1 -0
- package/esm/funcs/subscriptions-cancel-subscription.js +1 -1
- package/esm/funcs/subscriptions-cancel-subscription.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/billing-entities.d.ts +47 -0
- package/esm/sdk/billing-entities.d.ts.map +1 -0
- package/esm/sdk/billing-entities.js +68 -0
- package/esm/sdk/billing-entities.js.map +1 -0
- package/esm/sdk/models/billing-address.d.ts +27 -0
- package/esm/sdk/models/billing-address.d.ts.map +1 -0
- package/esm/sdk/models/billing-address.js +50 -0
- package/esm/sdk/models/billing-address.js.map +1 -0
- package/esm/sdk/models/billing-details.d.ts +24 -0
- package/esm/sdk/models/billing-details.d.ts.map +1 -0
- package/esm/sdk/models/billing-details.js +37 -0
- package/esm/sdk/models/billing-details.js.map +1 -0
- package/esm/sdk/models/billing-entity-mode-response.d.ts +11 -0
- package/esm/sdk/models/billing-entity-mode-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-mode-response.js +15 -0
- package/esm/sdk/models/billing-entity-mode-response.js.map +1 -0
- package/esm/sdk/models/billing-entity-mode.d.ts +11 -0
- package/esm/sdk/models/billing-entity-mode.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-mode.js +12 -0
- package/esm/sdk/models/billing-entity-mode.js.map +1 -0
- package/esm/sdk/models/billing-entity-response.d.ts +26 -0
- package/esm/sdk/models/billing-entity-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-response.js +41 -0
- package/esm/sdk/models/billing-entity-response.js.map +1 -0
- package/esm/sdk/models/billingterm-instalment.d.ts +4 -0
- package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -1
- package/esm/sdk/models/billingterm-instalment.js +2 -0
- package/esm/sdk/models/billingterm-instalment.js.map +1 -1
- package/esm/sdk/models/create-billing-entity-request.d.ts +23 -0
- package/esm/sdk/models/create-billing-entity-request.d.ts.map +1 -0
- package/esm/sdk/models/create-billing-entity-request.js +22 -0
- package/esm/sdk/models/create-billing-entity-request.js.map +1 -0
- package/esm/sdk/models/create-customer-request.d.ts +8 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +2 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/customer-filter.d.ts +5 -0
- package/esm/sdk/models/customer-filter.d.ts.map +1 -1
- package/esm/sdk/models/customer-filter.js +2 -0
- package/esm/sdk/models/customer-filter.js.map +1 -1
- package/esm/sdk/models/customer-response.d.ts +4 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +2 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +4 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +2 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/get-billing-entity-op.d.ts +15 -0
- package/esm/sdk/models/get-billing-entity-op.d.ts.map +1 -0
- package/esm/sdk/models/get-billing-entity-op.js +12 -0
- package/esm/sdk/models/get-billing-entity-op.js.map +1 -0
- package/esm/sdk/models/get-usage-analytics-request.d.ts +1 -1
- package/esm/sdk/models/get-usage-analytics-response.d.ts +12 -0
- package/esm/sdk/models/get-usage-analytics-response.d.ts.map +1 -1
- package/esm/sdk/models/get-usage-analytics-response.js +4 -0
- package/esm/sdk/models/get-usage-analytics-response.js.map +1 -1
- package/esm/sdk/models/index.d.ts +13 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +13 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-billing-entity.d.ts +13 -0
- package/esm/sdk/models/invoice-billing-entity.d.ts.map +1 -0
- package/esm/sdk/models/invoice-billing-entity.js +23 -0
- package/esm/sdk/models/invoice-billing-entity.js.map +1 -0
- package/esm/sdk/models/invoice-filter.d.ts +5 -0
- package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
- package/esm/sdk/models/invoice-filter.js +2 -0
- package/esm/sdk/models/invoice-filter.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +6 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +5 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/list-billing-entities-op.d.ts +42 -0
- package/esm/sdk/models/list-billing-entities-op.d.ts.map +1 -0
- package/esm/sdk/models/list-billing-entities-op.js +38 -0
- package/esm/sdk/models/list-billing-entities-op.js.map +1 -0
- package/esm/sdk/models/list-billing-entities-response.d.ts +13 -0
- package/esm/sdk/models/list-billing-entities-response.d.ts.map +1 -0
- package/esm/sdk/models/list-billing-entities-response.js +17 -0
- package/esm/sdk/models/list-billing-entities-response.js.map +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/tax-rate-entity-type.js +1 -0
- package/esm/sdk/models/tax-rate-entity-type.js.map +1 -1
- package/esm/sdk/models/update-billing-entity-op.d.ts +21 -0
- package/esm/sdk/models/update-billing-entity-op.d.ts.map +1 -0
- package/esm/sdk/models/update-billing-entity-op.js +14 -0
- package/esm/sdk/models/update-billing-entity-op.js.map +1 -0
- package/esm/sdk/models/update-billing-entity-request.d.ts +23 -0
- package/esm/sdk/models/update-billing-entity-request.d.ts.map +1 -0
- package/esm/sdk/models/update-billing-entity-request.js +22 -0
- package/esm/sdk/models/update-billing-entity-request.js.map +1 -0
- package/esm/sdk/models/update-customer-request.d.ts +5 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +2 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/usage-analytic-instalment.d.ts +22 -0
- package/esm/sdk/models/usage-analytic-instalment.d.ts.map +1 -0
- package/esm/sdk/models/usage-analytic-instalment.js +34 -0
- package/esm/sdk/models/usage-analytic-instalment.js.map +1 -0
- package/esm/sdk/models/webhook-dto-customer.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-customer.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-customer.js +2 -0
- package/esm/sdk/models/webhook-dto-customer.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-invoice.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.js +2 -0
- package/esm/sdk/models/webhook-dto-invoice.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/billing-entities-create-billing-entity.ts +172 -0
- package/src/funcs/billing-entities-enable-billing-entities.ts +153 -0
- package/src/funcs/billing-entities-get-billing-entities-status.ts +152 -0
- package/src/funcs/billing-entities-get-billing-entity.ts +181 -0
- package/src/funcs/billing-entities-list-billing-entities.ts +191 -0
- package/src/funcs/billing-entities-update-billing-entity.ts +187 -0
- package/src/funcs/subscriptions-cancel-subscription.ts +1 -1
- package/src/lib/config.ts +4 -3
- package/src/sdk/billing-entities.ts +115 -0
- package/src/sdk/models/billing-address.ts +91 -0
- package/src/sdk/models/billing-details.ts +79 -0
- package/src/sdk/models/billing-entity-mode-response.ts +35 -0
- package/src/sdk/models/billing-entity-mode.ts +20 -0
- package/src/sdk/models/billing-entity-response.ts +76 -0
- package/src/sdk/models/billingterm-instalment.ts +6 -0
- package/src/sdk/models/create-billing-entity-request.ts +53 -0
- package/src/sdk/models/create-customer-request.ts +10 -0
- package/src/sdk/models/customer-filter.ts +7 -0
- package/src/sdk/models/customer-response.ts +6 -0
- package/src/sdk/models/customer.ts +6 -0
- package/src/sdk/models/get-billing-entity-op.ts +33 -0
- package/src/sdk/models/get-usage-analytics-request.ts +1 -1
- package/src/sdk/models/get-usage-analytics-response.ts +18 -0
- package/src/sdk/models/index.ts +13 -0
- package/src/sdk/models/invoice-billing-entity.ts +48 -0
- package/src/sdk/models/invoice-filter.ts +7 -0
- package/src/sdk/models/invoice-response.ts +13 -0
- package/src/sdk/models/list-billing-entities-op.ts +88 -0
- package/src/sdk/models/list-billing-entities-response.ts +41 -0
- package/src/sdk/models/tax-rate-entity-type.ts +1 -0
- package/src/sdk/models/update-billing-entity-op.ts +46 -0
- package/src/sdk/models/update-billing-entity-request.ts +53 -0
- package/src/sdk/models/update-customer-request.ts +7 -0
- package/src/sdk/models/usage-analytic-instalment.ts +66 -0
- package/src/sdk/models/webhook-dto-customer.ts +3 -0
- package/src/sdk/models/webhook-dto-invoice.ts +3 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { FlexpriceCore } from "../core.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../sdk/models/http-client-errors.js";
|
|
23
|
+
import * as models from "../sdk/models/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Update a billing entity
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Edit a billing entity. Drafts and future invoices use the new details; finalized invoices keep theirs.
|
|
34
|
+
*/
|
|
35
|
+
export function billingEntitiesUpdateBillingEntity(
|
|
36
|
+
client: FlexpriceCore,
|
|
37
|
+
id: string,
|
|
38
|
+
body: models.UpdateBillingEntityRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
models.BillingEntityResponse,
|
|
43
|
+
| models.ErrorsErrorResponse
|
|
44
|
+
| FlexPriceError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
id,
|
|
57
|
+
body,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: FlexpriceCore,
|
|
64
|
+
id: string,
|
|
65
|
+
body: models.UpdateBillingEntityRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
models.BillingEntityResponse,
|
|
71
|
+
| models.ErrorsErrorResponse
|
|
72
|
+
| FlexPriceError
|
|
73
|
+
| ResponseValidationError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
| RequestAbortedError
|
|
76
|
+
| RequestTimeoutError
|
|
77
|
+
| InvalidRequestError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
>,
|
|
81
|
+
APICall,
|
|
82
|
+
]
|
|
83
|
+
> {
|
|
84
|
+
const input: models.UpdateBillingEntityRequestRequest = {
|
|
85
|
+
id: id,
|
|
86
|
+
body: body,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const parsed = safeParse(
|
|
90
|
+
input,
|
|
91
|
+
(value) =>
|
|
92
|
+
z.parse(models.UpdateBillingEntityRequestRequest$outboundSchema, value),
|
|
93
|
+
"Input validation failed",
|
|
94
|
+
);
|
|
95
|
+
if (!parsed.ok) {
|
|
96
|
+
return [parsed, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const payload = parsed.value;
|
|
99
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
100
|
+
|
|
101
|
+
const pathParams = {
|
|
102
|
+
id: encodeSimple("id", payload.id, {
|
|
103
|
+
explode: false,
|
|
104
|
+
charEncoding: "percent",
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
const path = pathToFunc("/billing-entities/{id}")(pathParams);
|
|
108
|
+
|
|
109
|
+
const headers = new Headers(compactMap({
|
|
110
|
+
"Content-Type": "application/json",
|
|
111
|
+
Accept: "application/json",
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
115
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
116
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
117
|
+
|
|
118
|
+
const context = {
|
|
119
|
+
options: client._options,
|
|
120
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
121
|
+
operationID: "updateBillingEntity",
|
|
122
|
+
oAuth2Scopes: null,
|
|
123
|
+
|
|
124
|
+
resolvedSecurity: requestSecurity,
|
|
125
|
+
|
|
126
|
+
securitySource: client._options.apiKeyAuth,
|
|
127
|
+
retryConfig: options?.retries
|
|
128
|
+
|| client._options.retryConfig
|
|
129
|
+
|| { strategy: "none" },
|
|
130
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const requestRes = client._createRequest(context, {
|
|
134
|
+
security: requestSecurity,
|
|
135
|
+
method: "PUT",
|
|
136
|
+
baseURL: options?.serverURL,
|
|
137
|
+
path: path,
|
|
138
|
+
headers: headers,
|
|
139
|
+
body: body$,
|
|
140
|
+
userAgent: client._options.userAgent,
|
|
141
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
142
|
+
}, options);
|
|
143
|
+
if (!requestRes.ok) {
|
|
144
|
+
return [requestRes, { status: "invalid" }];
|
|
145
|
+
}
|
|
146
|
+
const req = requestRes.value;
|
|
147
|
+
|
|
148
|
+
const doResult = await client._do(req, {
|
|
149
|
+
context,
|
|
150
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
151
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
152
|
+
retryConfig: context.retryConfig,
|
|
153
|
+
retryCodes: context.retryCodes,
|
|
154
|
+
});
|
|
155
|
+
if (!doResult.ok) {
|
|
156
|
+
return [doResult, { status: "request-error", request: req }];
|
|
157
|
+
}
|
|
158
|
+
const response = doResult.value;
|
|
159
|
+
|
|
160
|
+
const responseFields = {
|
|
161
|
+
HttpMeta: { Response: response, Request: req },
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const [result] = await M.match<
|
|
165
|
+
models.BillingEntityResponse,
|
|
166
|
+
| models.ErrorsErrorResponse
|
|
167
|
+
| FlexPriceError
|
|
168
|
+
| ResponseValidationError
|
|
169
|
+
| ConnectionError
|
|
170
|
+
| RequestAbortedError
|
|
171
|
+
| RequestTimeoutError
|
|
172
|
+
| InvalidRequestError
|
|
173
|
+
| UnexpectedClientError
|
|
174
|
+
| SDKValidationError
|
|
175
|
+
>(
|
|
176
|
+
M.json(200, models.BillingEntityResponse$inboundSchema),
|
|
177
|
+
M.jsonErr([400, 404, 409], models.ErrorsErrorResponse$inboundSchema),
|
|
178
|
+
M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
|
|
179
|
+
M.fail("4XX"),
|
|
180
|
+
M.fail("5XX"),
|
|
181
|
+
)(response, req, { extraFields: responseFields });
|
|
182
|
+
if (!result.ok) {
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
@@ -174,7 +174,7 @@ async function $do(
|
|
|
174
174
|
| SDKValidationError
|
|
175
175
|
>(
|
|
176
176
|
M.json(200, models.CancelSubscriptionResponse$inboundSchema),
|
|
177
|
-
M.jsonErr(400, models.ErrorsErrorResponse$inboundSchema),
|
|
177
|
+
M.jsonErr([400, 409], models.ErrorsErrorResponse$inboundSchema),
|
|
178
178
|
M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
|
|
179
179
|
M.fail("4XX"),
|
|
180
180
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -77,7 +77,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
77
77
|
export const SDK_METADATA = {
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "1.0",
|
|
80
|
-
sdkVersion: "2.1.49-dev.
|
|
81
|
-
genVersion: "2.
|
|
82
|
-
userAgent:
|
|
80
|
+
sdkVersion: "2.1.49-dev.10",
|
|
81
|
+
genVersion: "2.948.4",
|
|
82
|
+
userAgent:
|
|
83
|
+
"speakeasy-sdk/typescript 2.1.49-dev.10 2.948.4 1.0 @flexprice/sdk",
|
|
83
84
|
} as const;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { billingEntitiesCreateBillingEntity } from "../funcs/billing-entities-create-billing-entity.js";
|
|
6
|
+
import { billingEntitiesEnableBillingEntities } from "../funcs/billing-entities-enable-billing-entities.js";
|
|
7
|
+
import { billingEntitiesGetBillingEntitiesStatus } from "../funcs/billing-entities-get-billing-entities-status.js";
|
|
8
|
+
import { billingEntitiesGetBillingEntity } from "../funcs/billing-entities-get-billing-entity.js";
|
|
9
|
+
import { billingEntitiesListBillingEntities } from "../funcs/billing-entities-list-billing-entities.js";
|
|
10
|
+
import { billingEntitiesUpdateBillingEntity } from "../funcs/billing-entities-update-billing-entity.js";
|
|
11
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
13
|
+
import * as models from "./models/index.js";
|
|
14
|
+
|
|
15
|
+
export class BillingEntities extends ClientSDK {
|
|
16
|
+
/**
|
|
17
|
+
* List billing entities
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* List the billing entities of this environment.
|
|
21
|
+
*/
|
|
22
|
+
async listBillingEntities(
|
|
23
|
+
request?: models.ListBillingEntitiesRequest | undefined,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<models.ListBillingEntitiesResponse> {
|
|
26
|
+
return unwrapAsync(billingEntitiesListBillingEntities(
|
|
27
|
+
this,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Create a billing entity
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Create a legal entity that bills customers in this environment. Requires billing entities to be enabled.
|
|
38
|
+
*/
|
|
39
|
+
async createBillingEntity(
|
|
40
|
+
request: models.CreateBillingEntityRequest,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): Promise<models.BillingEntityResponse> {
|
|
43
|
+
return unwrapAsync(billingEntitiesCreateBillingEntity(
|
|
44
|
+
this,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Enable billing entities
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Start enabling billing entities in the environment. The environment gets a default entity and its existing customers are assigned to it. Irreversible.
|
|
55
|
+
*/
|
|
56
|
+
async enableBillingEntities(
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<models.BillingEntityModeResponse> {
|
|
59
|
+
return unwrapAsync(billingEntitiesEnableBillingEntities(
|
|
60
|
+
this,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Get billing entities status
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Whether billing entities are off, enabling or enabled in the environment.
|
|
70
|
+
*/
|
|
71
|
+
async getBillingEntitiesStatus(
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<models.BillingEntityModeResponse> {
|
|
74
|
+
return unwrapAsync(billingEntitiesGetBillingEntitiesStatus(
|
|
75
|
+
this,
|
|
76
|
+
options,
|
|
77
|
+
));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get a billing entity
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Load a single billing entity by ID.
|
|
85
|
+
*/
|
|
86
|
+
async getBillingEntity(
|
|
87
|
+
id: string,
|
|
88
|
+
options?: RequestOptions,
|
|
89
|
+
): Promise<models.BillingEntityResponse> {
|
|
90
|
+
return unwrapAsync(billingEntitiesGetBillingEntity(
|
|
91
|
+
this,
|
|
92
|
+
id,
|
|
93
|
+
options,
|
|
94
|
+
));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Update a billing entity
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Edit a billing entity. Drafts and future invoices use the new details; finalized invoices keep theirs.
|
|
102
|
+
*/
|
|
103
|
+
async updateBillingEntity(
|
|
104
|
+
id: string,
|
|
105
|
+
body: models.UpdateBillingEntityRequest,
|
|
106
|
+
options?: RequestOptions,
|
|
107
|
+
): Promise<models.BillingEntityResponse> {
|
|
108
|
+
return unwrapAsync(billingEntitiesUpdateBillingEntity(
|
|
109
|
+
this,
|
|
110
|
+
id,
|
|
111
|
+
body,
|
|
112
|
+
options,
|
|
113
|
+
));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type BillingAddress = {
|
|
13
|
+
addressCity?: string | undefined;
|
|
14
|
+
addressCountry?: string | undefined;
|
|
15
|
+
addressLine1?: string | undefined;
|
|
16
|
+
addressLine2?: string | undefined;
|
|
17
|
+
addressPostalCode?: string | undefined;
|
|
18
|
+
addressState?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const BillingAddress$inboundSchema: z.ZodMiniType<
|
|
23
|
+
BillingAddress,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.pipe(
|
|
26
|
+
z.object({
|
|
27
|
+
address_city: types.optional(types.string()),
|
|
28
|
+
address_country: types.optional(types.string()),
|
|
29
|
+
address_line1: types.optional(types.string()),
|
|
30
|
+
address_line2: types.optional(types.string()),
|
|
31
|
+
address_postal_code: types.optional(types.string()),
|
|
32
|
+
address_state: types.optional(types.string()),
|
|
33
|
+
}),
|
|
34
|
+
z.transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"address_city": "addressCity",
|
|
37
|
+
"address_country": "addressCountry",
|
|
38
|
+
"address_line1": "addressLine1",
|
|
39
|
+
"address_line2": "addressLine2",
|
|
40
|
+
"address_postal_code": "addressPostalCode",
|
|
41
|
+
"address_state": "addressState",
|
|
42
|
+
});
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type BillingAddress$Outbound = {
|
|
47
|
+
address_city?: string | undefined;
|
|
48
|
+
address_country?: string | undefined;
|
|
49
|
+
address_line1?: string | undefined;
|
|
50
|
+
address_line2?: string | undefined;
|
|
51
|
+
address_postal_code?: string | undefined;
|
|
52
|
+
address_state?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const BillingAddress$outboundSchema: z.ZodMiniType<
|
|
57
|
+
BillingAddress$Outbound,
|
|
58
|
+
BillingAddress
|
|
59
|
+
> = z.pipe(
|
|
60
|
+
z.object({
|
|
61
|
+
addressCity: z.optional(z.string()),
|
|
62
|
+
addressCountry: z.optional(z.string()),
|
|
63
|
+
addressLine1: z.optional(z.string()),
|
|
64
|
+
addressLine2: z.optional(z.string()),
|
|
65
|
+
addressPostalCode: z.optional(z.string()),
|
|
66
|
+
addressState: z.optional(z.string()),
|
|
67
|
+
}),
|
|
68
|
+
z.transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
addressCity: "address_city",
|
|
71
|
+
addressCountry: "address_country",
|
|
72
|
+
addressLine1: "address_line1",
|
|
73
|
+
addressLine2: "address_line2",
|
|
74
|
+
addressPostalCode: "address_postal_code",
|
|
75
|
+
addressState: "address_state",
|
|
76
|
+
});
|
|
77
|
+
}),
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export function billingAddressToJSON(billingAddress: BillingAddress): string {
|
|
81
|
+
return JSON.stringify(BillingAddress$outboundSchema.parse(billingAddress));
|
|
82
|
+
}
|
|
83
|
+
export function billingAddressFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<BillingAddress, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => BillingAddress$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'BillingAddress' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
BillingAddress,
|
|
12
|
+
BillingAddress$inboundSchema,
|
|
13
|
+
BillingAddress$Outbound,
|
|
14
|
+
BillingAddress$outboundSchema,
|
|
15
|
+
} from "./billing-address.js";
|
|
16
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
17
|
+
|
|
18
|
+
export type BillingDetails = {
|
|
19
|
+
address?: BillingAddress | undefined;
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
helpEmail?: string | undefined;
|
|
22
|
+
phone?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const BillingDetails$inboundSchema: z.ZodMiniType<
|
|
27
|
+
BillingDetails,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.pipe(
|
|
30
|
+
z.object({
|
|
31
|
+
address: types.optional(BillingAddress$inboundSchema),
|
|
32
|
+
email: types.optional(types.string()),
|
|
33
|
+
help_email: types.optional(types.string()),
|
|
34
|
+
phone: types.optional(types.string()),
|
|
35
|
+
}),
|
|
36
|
+
z.transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"help_email": "helpEmail",
|
|
39
|
+
});
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type BillingDetails$Outbound = {
|
|
44
|
+
address?: BillingAddress$Outbound | undefined;
|
|
45
|
+
email?: string | undefined;
|
|
46
|
+
help_email?: string | undefined;
|
|
47
|
+
phone?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const BillingDetails$outboundSchema: z.ZodMiniType<
|
|
52
|
+
BillingDetails$Outbound,
|
|
53
|
+
BillingDetails
|
|
54
|
+
> = z.pipe(
|
|
55
|
+
z.object({
|
|
56
|
+
address: z.optional(BillingAddress$outboundSchema),
|
|
57
|
+
email: z.optional(z.string()),
|
|
58
|
+
helpEmail: z.optional(z.string()),
|
|
59
|
+
phone: z.optional(z.string()),
|
|
60
|
+
}),
|
|
61
|
+
z.transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
helpEmail: "help_email",
|
|
64
|
+
});
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export function billingDetailsToJSON(billingDetails: BillingDetails): string {
|
|
69
|
+
return JSON.stringify(BillingDetails$outboundSchema.parse(billingDetails));
|
|
70
|
+
}
|
|
71
|
+
export function billingDetailsFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<BillingDetails, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => BillingDetails$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'BillingDetails' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import {
|
|
10
|
+
BillingEntityMode,
|
|
11
|
+
BillingEntityMode$inboundSchema,
|
|
12
|
+
} from "./billing-entity-mode.js";
|
|
13
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
14
|
+
|
|
15
|
+
export type BillingEntityModeResponse = {
|
|
16
|
+
mode?: BillingEntityMode | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const BillingEntityModeResponse$inboundSchema: z.ZodMiniType<
|
|
21
|
+
BillingEntityModeResponse,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
mode: types.optional(BillingEntityMode$inboundSchema),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function billingEntityModeResponseFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<BillingEntityModeResponse, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => BillingEntityModeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'BillingEntityModeResponse' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const BillingEntityMode = {
|
|
10
|
+
Off: "off",
|
|
11
|
+
Enabling: "enabling",
|
|
12
|
+
Enabled: "enabled",
|
|
13
|
+
} as const;
|
|
14
|
+
export type BillingEntityMode = OpenEnum<typeof BillingEntityMode>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const BillingEntityMode$inboundSchema: z.ZodMiniType<
|
|
18
|
+
BillingEntityMode,
|
|
19
|
+
unknown
|
|
20
|
+
> = openEnums.inboundSchema(BillingEntityMode);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
BillingDetails,
|
|
12
|
+
BillingDetails$inboundSchema,
|
|
13
|
+
} from "./billing-details.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import { Status, Status$inboundSchema } from "./status.js";
|
|
16
|
+
|
|
17
|
+
export type BillingEntityResponse = {
|
|
18
|
+
billingDetails?: BillingDetails | undefined;
|
|
19
|
+
createdAt?: Date | undefined;
|
|
20
|
+
createdBy?: string | undefined;
|
|
21
|
+
environmentId?: string | undefined;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
invoiceNumberPrefix?: string | undefined;
|
|
24
|
+
isDefault?: boolean | undefined;
|
|
25
|
+
metadata?: { [k: string]: string } | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
status?: Status | undefined;
|
|
28
|
+
tenantId?: string | undefined;
|
|
29
|
+
updatedAt?: Date | undefined;
|
|
30
|
+
updatedBy?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const BillingEntityResponse$inboundSchema: z.ZodMiniType<
|
|
35
|
+
BillingEntityResponse,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.pipe(
|
|
38
|
+
z.object({
|
|
39
|
+
billing_details: types.optional(BillingDetails$inboundSchema),
|
|
40
|
+
created_at: types.optional(types.date()),
|
|
41
|
+
created_by: types.optional(types.string()),
|
|
42
|
+
environment_id: types.optional(types.string()),
|
|
43
|
+
id: types.optional(types.string()),
|
|
44
|
+
invoice_number_prefix: types.optional(types.string()),
|
|
45
|
+
is_default: types.optional(types.boolean()),
|
|
46
|
+
metadata: types.optional(z.record(z.string(), types.string())),
|
|
47
|
+
name: types.optional(types.string()),
|
|
48
|
+
status: types.optional(Status$inboundSchema),
|
|
49
|
+
tenant_id: types.optional(types.string()),
|
|
50
|
+
updated_at: types.optional(types.date()),
|
|
51
|
+
updated_by: types.optional(types.string()),
|
|
52
|
+
}),
|
|
53
|
+
z.transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
"billing_details": "billingDetails",
|
|
56
|
+
"created_at": "createdAt",
|
|
57
|
+
"created_by": "createdBy",
|
|
58
|
+
"environment_id": "environmentId",
|
|
59
|
+
"invoice_number_prefix": "invoiceNumberPrefix",
|
|
60
|
+
"is_default": "isDefault",
|
|
61
|
+
"tenant_id": "tenantId",
|
|
62
|
+
"updated_at": "updatedAt",
|
|
63
|
+
"updated_by": "updatedBy",
|
|
64
|
+
});
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export function billingEntityResponseFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<BillingEntityResponse, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => BillingEntityResponse$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'BillingEntityResponse' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -45,6 +45,10 @@ export type BillingtermInstalment = {
|
|
|
45
45
|
instalmentStatus?: InstalmentStatus | undefined;
|
|
46
46
|
invoiceId?: string | undefined;
|
|
47
47
|
invoiceLabel?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* InvoicedAt is when the invoice billing the instalment was finalized.
|
|
50
|
+
*/
|
|
51
|
+
invoicedAt?: Date | undefined;
|
|
48
52
|
kind?: InstalmentKind | undefined;
|
|
49
53
|
metadata?: { [k: string]: string } | undefined;
|
|
50
54
|
ownerId?: string | undefined;
|
|
@@ -79,6 +83,7 @@ export const BillingtermInstalment$inboundSchema: z.ZodMiniType<
|
|
|
79
83
|
instalment_status: types.optional(InstalmentStatus$inboundSchema),
|
|
80
84
|
invoice_id: types.optional(types.string()),
|
|
81
85
|
invoice_label: types.optional(types.string()),
|
|
86
|
+
invoiced_at: types.optional(types.date()),
|
|
82
87
|
kind: types.optional(InstalmentKind$inboundSchema),
|
|
83
88
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
84
89
|
owner_id: types.optional(types.string()),
|
|
@@ -104,6 +109,7 @@ export const BillingtermInstalment$inboundSchema: z.ZodMiniType<
|
|
|
104
109
|
"instalment_status": "instalmentStatus",
|
|
105
110
|
"invoice_id": "invoiceId",
|
|
106
111
|
"invoice_label": "invoiceLabel",
|
|
112
|
+
"invoiced_at": "invoicedAt",
|
|
107
113
|
"owner_id": "ownerId",
|
|
108
114
|
"owner_type": "ownerType",
|
|
109
115
|
"service_period_end": "servicePeriodEnd",
|