@flexprice/sdk 2.1.49-dev.1 → 2.1.49-dev.3
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/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/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/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 +2 -2
- package/esm/lib/config.js +2 -2
- 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/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/index.d.ts +12 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +12 -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/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 +2 -2
- 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/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/index.ts +12 -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/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,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
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 {
|
|
8
|
+
BillingDetails,
|
|
9
|
+
BillingDetails$Outbound,
|
|
10
|
+
BillingDetails$outboundSchema,
|
|
11
|
+
} from "./billing-details.js";
|
|
12
|
+
|
|
13
|
+
export type CreateBillingEntityRequest = {
|
|
14
|
+
billingDetails?: BillingDetails | undefined;
|
|
15
|
+
invoiceNumberPrefix: string;
|
|
16
|
+
metadata?: { [k: string]: string } | undefined;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type CreateBillingEntityRequest$Outbound = {
|
|
22
|
+
billing_details?: BillingDetails$Outbound | undefined;
|
|
23
|
+
invoice_number_prefix: string;
|
|
24
|
+
metadata?: { [k: string]: string } | undefined;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreateBillingEntityRequest$outboundSchema: z.ZodMiniType<
|
|
30
|
+
CreateBillingEntityRequest$Outbound,
|
|
31
|
+
CreateBillingEntityRequest
|
|
32
|
+
> = z.pipe(
|
|
33
|
+
z.object({
|
|
34
|
+
billingDetails: z.optional(BillingDetails$outboundSchema),
|
|
35
|
+
invoiceNumberPrefix: z.string(),
|
|
36
|
+
metadata: z.optional(z.record(z.string(), z.string())),
|
|
37
|
+
name: z.string(),
|
|
38
|
+
}),
|
|
39
|
+
z.transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
billingDetails: "billing_details",
|
|
42
|
+
invoiceNumberPrefix: "invoice_number_prefix",
|
|
43
|
+
});
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export function createBillingEntityRequestToJSON(
|
|
48
|
+
createBillingEntityRequest: CreateBillingEntityRequest,
|
|
49
|
+
): string {
|
|
50
|
+
return JSON.stringify(
|
|
51
|
+
CreateBillingEntityRequest$outboundSchema.parse(createBillingEntityRequest),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -53,6 +53,13 @@ export type CreateCustomerRequest = {
|
|
|
53
53
|
* billing_currency is the fiat currency invoices are issued in; empty means the charge currency is used as-is
|
|
54
54
|
*/
|
|
55
55
|
billingCurrency?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* billing_entity_id is the billing entity that bills this customer; defaults to the environment's
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* default entity. Accepted only once billing entities are enabled, and never changes afterwards.
|
|
61
|
+
*/
|
|
62
|
+
billingEntityId?: string | undefined;
|
|
56
63
|
/**
|
|
57
64
|
* contact is an optional contact number for the customer (e.g. phone)
|
|
58
65
|
*/
|
|
@@ -118,6 +125,7 @@ export type CreateCustomerRequest$Outbound = {
|
|
|
118
125
|
address_postal_code?: string | undefined;
|
|
119
126
|
address_state?: string | undefined;
|
|
120
127
|
billing_currency?: string | undefined;
|
|
128
|
+
billing_entity_id?: string | undefined;
|
|
121
129
|
contact?: string | undefined;
|
|
122
130
|
contact_persons?: Array<CustomerContactPerson$Outbound> | undefined;
|
|
123
131
|
email?: string | undefined;
|
|
@@ -147,6 +155,7 @@ export const CreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
147
155
|
addressPostalCode: z.optional(z.string()),
|
|
148
156
|
addressState: z.optional(z.string()),
|
|
149
157
|
billingCurrency: z.optional(z.string()),
|
|
158
|
+
billingEntityId: z.optional(z.string()),
|
|
150
159
|
contact: z.optional(z.string()),
|
|
151
160
|
contactPersons: z.optional(z.array(CustomerContactPerson$outboundSchema)),
|
|
152
161
|
email: z.optional(z.string()),
|
|
@@ -171,6 +180,7 @@ export const CreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
171
180
|
addressPostalCode: "address_postal_code",
|
|
172
181
|
addressState: "address_state",
|
|
173
182
|
billingCurrency: "billing_currency",
|
|
183
|
+
billingEntityId: "billing_entity_id",
|
|
174
184
|
contactPersons: "contact_persons",
|
|
175
185
|
externalId: "external_id",
|
|
176
186
|
integrationEntityMapping: "integration_entity_mapping",
|
|
@@ -24,6 +24,10 @@ export const CustomerFilterOrder = {
|
|
|
24
24
|
export type CustomerFilterOrder = ClosedEnum<typeof CustomerFilterOrder>;
|
|
25
25
|
|
|
26
26
|
export type CustomerFilter = {
|
|
27
|
+
/**
|
|
28
|
+
* billing_entity_id filters by the customer's billing entity
|
|
29
|
+
*/
|
|
30
|
+
billingEntityId?: string | undefined;
|
|
27
31
|
customerIds?: Array<string> | undefined;
|
|
28
32
|
email?: string | undefined;
|
|
29
33
|
endTime?: Date | undefined;
|
|
@@ -47,6 +51,7 @@ export const CustomerFilterOrder$outboundSchema: z.ZodMiniEnum<
|
|
|
47
51
|
|
|
48
52
|
/** @internal */
|
|
49
53
|
export type CustomerFilter$Outbound = {
|
|
54
|
+
billing_entity_id?: string | undefined;
|
|
50
55
|
customer_ids?: Array<string> | undefined;
|
|
51
56
|
email?: string | undefined;
|
|
52
57
|
end_time?: string | undefined;
|
|
@@ -69,6 +74,7 @@ export const CustomerFilter$outboundSchema: z.ZodMiniType<
|
|
|
69
74
|
CustomerFilter
|
|
70
75
|
> = z.pipe(
|
|
71
76
|
z.object({
|
|
77
|
+
billingEntityId: z.optional(z.string()),
|
|
72
78
|
customerIds: z.optional(z.array(z.string())),
|
|
73
79
|
email: z.optional(z.string()),
|
|
74
80
|
endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
@@ -86,6 +92,7 @@ export const CustomerFilter$outboundSchema: z.ZodMiniType<
|
|
|
86
92
|
}),
|
|
87
93
|
z.transform((v) => {
|
|
88
94
|
return remap$(v, {
|
|
95
|
+
billingEntityId: "billing_entity_id",
|
|
89
96
|
customerIds: "customer_ids",
|
|
90
97
|
endTime: "end_time",
|
|
91
98
|
externalId: "external_id",
|
|
@@ -51,6 +51,10 @@ export type CustomerResponse = {
|
|
|
51
51
|
* BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.
|
|
52
52
|
*/
|
|
53
53
|
billingCurrency?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* BillingEntityID is the entity that bills the customer; nil while the environment has no billing entities. Never changes once set.
|
|
56
|
+
*/
|
|
57
|
+
billingEntityId?: string | undefined;
|
|
54
58
|
/**
|
|
55
59
|
* Contact is an optional contact number for the customer (e.g. phone)
|
|
56
60
|
*/
|
|
@@ -110,6 +114,7 @@ export const CustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
110
114
|
address_postal_code: types.optional(types.string()),
|
|
111
115
|
address_state: types.optional(types.string()),
|
|
112
116
|
billing_currency: types.optional(types.string()),
|
|
117
|
+
billing_entity_id: types.optional(types.string()),
|
|
113
118
|
contact: types.optional(types.string()),
|
|
114
119
|
contact_persons: types.optional(
|
|
115
120
|
z.array(CustomerContactPerson$inboundSchema),
|
|
@@ -141,6 +146,7 @@ export const CustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
141
146
|
"address_postal_code": "addressPostalCode",
|
|
142
147
|
"address_state": "addressState",
|
|
143
148
|
"billing_currency": "billingCurrency",
|
|
149
|
+
"billing_entity_id": "billingEntityId",
|
|
144
150
|
"contact_persons": "contactPersons",
|
|
145
151
|
"created_at": "createdAt",
|
|
146
152
|
"created_by": "createdBy",
|
|
@@ -44,6 +44,10 @@ export type Customer = {
|
|
|
44
44
|
* BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.
|
|
45
45
|
*/
|
|
46
46
|
billingCurrency?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* BillingEntityID is the entity that bills the customer; nil while the environment has no billing entities. Never changes once set.
|
|
49
|
+
*/
|
|
50
|
+
billingEntityId?: string | undefined;
|
|
47
51
|
/**
|
|
48
52
|
* Contact is an optional contact number for the customer (e.g. phone)
|
|
49
53
|
*/
|
|
@@ -99,6 +103,7 @@ export const Customer$inboundSchema: z.ZodMiniType<Customer, unknown> = z.pipe(
|
|
|
99
103
|
address_postal_code: types.optional(types.string()),
|
|
100
104
|
address_state: types.optional(types.string()),
|
|
101
105
|
billing_currency: types.optional(types.string()),
|
|
106
|
+
billing_entity_id: types.optional(types.string()),
|
|
102
107
|
contact: types.optional(types.string()),
|
|
103
108
|
contact_persons: types.optional(
|
|
104
109
|
z.array(CustomerContactPerson$inboundSchema),
|
|
@@ -127,6 +132,7 @@ export const Customer$inboundSchema: z.ZodMiniType<Customer, unknown> = z.pipe(
|
|
|
127
132
|
"address_postal_code": "addressPostalCode",
|
|
128
133
|
"address_state": "addressState",
|
|
129
134
|
"billing_currency": "billingCurrency",
|
|
135
|
+
"billing_entity_id": "billingEntityId",
|
|
130
136
|
"contact_persons": "contactPersons",
|
|
131
137
|
"created_at": "createdAt",
|
|
132
138
|
"created_by": "createdBy",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type GetBillingEntityRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Billing entity ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetBillingEntityRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetBillingEntityRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
GetBillingEntityRequest$Outbound,
|
|
22
|
+
GetBillingEntityRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function getBillingEntityRequestToJSON(
|
|
28
|
+
getBillingEntityRequest: GetBillingEntityRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
GetBillingEntityRequest$outboundSchema.parse(getBillingEntityRequest),
|
|
32
|
+
);
|
|
33
|
+
}
|
package/src/sdk/models/index.ts
CHANGED
|
@@ -61,9 +61,14 @@ export * from "./auto-topup.js";
|
|
|
61
61
|
export * from "./aws-marketplace-agreement.js";
|
|
62
62
|
export * from "./aws-marketplace-sync-config.js";
|
|
63
63
|
export * from "./azure-marketplace-agreement.js";
|
|
64
|
+
export * from "./billing-address.js";
|
|
64
65
|
export * from "./billing-cadence.js";
|
|
65
66
|
export * from "./billing-cycle-info.js";
|
|
66
67
|
export * from "./billing-cycle.js";
|
|
68
|
+
export * from "./billing-details.js";
|
|
69
|
+
export * from "./billing-entity-mode-response.js";
|
|
70
|
+
export * from "./billing-entity-mode.js";
|
|
71
|
+
export * from "./billing-entity-response.js";
|
|
67
72
|
export * from "./billing-model.js";
|
|
68
73
|
export * from "./billing-period-behaviour.js";
|
|
69
74
|
export * from "./billing-period-config.js";
|
|
@@ -155,6 +160,7 @@ export * from "./create-addon-response.js";
|
|
|
155
160
|
export * from "./create-alert-settings-request.js";
|
|
156
161
|
export * from "./create-api-key-request.js";
|
|
157
162
|
export * from "./create-api-key-response.js";
|
|
163
|
+
export * from "./create-billing-entity-request.js";
|
|
158
164
|
export * from "./create-bulk-entitlement-request.js";
|
|
159
165
|
export * from "./create-bulk-entitlement-response.js";
|
|
160
166
|
export * from "./create-bulk-price-request.js";
|
|
@@ -327,6 +333,7 @@ export * from "./get-addon-entitlements-op.js";
|
|
|
327
333
|
export * from "./get-addon-op.js";
|
|
328
334
|
export * from "./get-alert-settings-op.js";
|
|
329
335
|
export * from "./get-analytics-view-op.js";
|
|
336
|
+
export * from "./get-billing-entity-op.js";
|
|
330
337
|
export * from "./get-checkout-session-op.js";
|
|
331
338
|
export * from "./get-commitment-billing-terms-op.js";
|
|
332
339
|
export * from "./get-commitment-op.js";
|
|
@@ -423,6 +430,7 @@ export * from "./instalment-status.js";
|
|
|
423
430
|
export * from "./integration-config-entry.js";
|
|
424
431
|
export * from "./integration-config-response.js";
|
|
425
432
|
export * from "./integration-entity-type.js";
|
|
433
|
+
export * from "./invoice-billing-entity.js";
|
|
426
434
|
export * from "./invoice-billing-reason.js";
|
|
427
435
|
export * from "./invoice-cadence.js";
|
|
428
436
|
export * from "./invoice-coupon.js";
|
|
@@ -462,6 +470,8 @@ export * from "./list-alert-settings-response.js";
|
|
|
462
470
|
export * from "./list-all-subscription-schedules-op.js";
|
|
463
471
|
export * from "./list-analytics-views-op.js";
|
|
464
472
|
export * from "./list-api-keys-op.js";
|
|
473
|
+
export * from "./list-billing-entities-op.js";
|
|
474
|
+
export * from "./list-billing-entities-response.js";
|
|
465
475
|
export * from "./list-commitment-instalments-op.js";
|
|
466
476
|
export * from "./list-commitments-response.js";
|
|
467
477
|
export * from "./list-contracts-response.js";
|
|
@@ -776,6 +786,8 @@ export * from "./update-addon-request.js";
|
|
|
776
786
|
export * from "./update-alert-settings-op.js";
|
|
777
787
|
export * from "./update-alert-settings-request.js";
|
|
778
788
|
export * from "./update-analytics-view-op.js";
|
|
789
|
+
export * from "./update-billing-entity-op.js";
|
|
790
|
+
export * from "./update-billing-entity-request.js";
|
|
779
791
|
export * from "./update-commitment-op.js";
|
|
780
792
|
export * from "./update-commitment-request.js";
|
|
781
793
|
export * from "./update-costsheet-op.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
16
|
+
export type InvoiceBillingEntity = {
|
|
17
|
+
billingDetails?: BillingDetails | undefined;
|
|
18
|
+
billingEntityId?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const InvoiceBillingEntity$inboundSchema: z.ZodMiniType<
|
|
24
|
+
InvoiceBillingEntity,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.pipe(
|
|
27
|
+
z.object({
|
|
28
|
+
billing_details: types.optional(BillingDetails$inboundSchema),
|
|
29
|
+
billing_entity_id: types.optional(types.string()),
|
|
30
|
+
name: types.optional(types.string()),
|
|
31
|
+
}),
|
|
32
|
+
z.transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"billing_details": "billingDetails",
|
|
35
|
+
"billing_entity_id": "billingEntityId",
|
|
36
|
+
});
|
|
37
|
+
}),
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export function invoiceBillingEntityFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<InvoiceBillingEntity, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => InvoiceBillingEntity$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'InvoiceBillingEntity' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -51,6 +51,10 @@ export type InvoiceFilter = {
|
|
|
51
51
|
* Useful for finding invoices that still have significant unpaid amounts
|
|
52
52
|
*/
|
|
53
53
|
amountRemainingGt?: number | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* billing_entity_id filters by the customer's billing entity
|
|
56
|
+
*/
|
|
57
|
+
billingEntityId?: string | undefined;
|
|
54
58
|
billingReason?: InvoiceBillingReason | undefined;
|
|
55
59
|
/**
|
|
56
60
|
* currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur").
|
|
@@ -166,6 +170,7 @@ export const InvoiceFilterOrder$outboundSchema: z.ZodMiniEnum<
|
|
|
166
170
|
export type InvoiceFilter$Outbound = {
|
|
167
171
|
amount_due_gt?: number | undefined;
|
|
168
172
|
amount_remaining_gt?: number | undefined;
|
|
173
|
+
billing_entity_id?: string | undefined;
|
|
169
174
|
billing_reason?: string | undefined;
|
|
170
175
|
currency?: string | undefined;
|
|
171
176
|
customer_id?: string | undefined;
|
|
@@ -205,6 +210,7 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
|
|
|
205
210
|
z.object({
|
|
206
211
|
amountDueGt: z.optional(z.number()),
|
|
207
212
|
amountRemainingGt: z.optional(z.number()),
|
|
213
|
+
billingEntityId: z.optional(z.string()),
|
|
208
214
|
billingReason: z.optional(InvoiceBillingReason$outboundSchema),
|
|
209
215
|
currency: z.optional(z.string()),
|
|
210
216
|
customerId: z.optional(z.string()),
|
|
@@ -245,6 +251,7 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
|
|
|
245
251
|
return remap$(v, {
|
|
246
252
|
amountDueGt: "amount_due_gt",
|
|
247
253
|
amountRemainingGt: "amount_remaining_gt",
|
|
254
|
+
billingEntityId: "billing_entity_id",
|
|
248
255
|
billingReason: "billing_reason",
|
|
249
256
|
customerId: "customer_id",
|
|
250
257
|
endTime: "end_time",
|