@flexprice/sdk 2.1.49-dev.3 → 2.1.49-dev.30
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/add-addon-request.md +13 -13
- package/docs/sdk/models/add-addon-to-subscription-request.md +11 -11
- package/docs/sdk/models/billingterm-instalment.md +1 -0
- package/docs/sdk/models/commitment-info.md +15 -12
- package/docs/sdk/models/commitment-response.md +0 -1
- package/docs/sdk/models/create-commitment-request.md +0 -1
- package/docs/sdk/models/create-customer-request.md +1 -0
- package/docs/sdk/models/create-subscription-line-item-request.md +6 -6
- package/docs/sdk/models/create-subscription-request.md +5 -4
- package/docs/sdk/models/customer-response.md +1 -0
- package/docs/sdk/models/customer.md +1 -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/grouped-invoicing-child-request.md +4 -4
- package/docs/sdk/models/invoice-payment-failure-reason.md +17 -0
- package/docs/sdk/models/payment-response.md +33 -32
- package/docs/sdk/models/price-response.md +2 -1
- package/docs/sdk/models/settings-override.md +15 -0
- package/docs/sdk/models/subscription-config-override.md +16 -0
- package/docs/sdk/models/subscription-response-v2.md +1 -0
- package/docs/sdk/models/subscription-response.md +1 -0
- package/docs/sdk/models/update-customer-request.md +1 -0
- package/docs/sdk/models/update-subscription-line-item-request.md +20 -20
- package/docs/sdk/models/update-subscription-request.md +1 -0
- package/docs/sdk/models/usage-analytic-instalment.md +24 -0
- package/docs/sdk/models/usage-analytic-point.md +3 -0
- package/docs/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.md +21 -0
- package/docs/sdk/models/webhook-dto-payment.md +1 -0
- package/docs/sdk/models/webhook-event-name.md +1 -1
- package/docs/sdks/scheduledtasks/README.md +0 -143
- package/docs/sdks/webhookevents/README.md +69 -0
- package/esm/funcs/{scheduled-tasks-schedule-update-billing-period.d.ts → webhook-events-post-webhook-events-invoice-payment-failed.d.ts} +4 -4
- package/esm/funcs/webhook-events-post-webhook-events-invoice-payment-failed.d.ts.map +1 -0
- package/esm/funcs/{scheduled-tasks-schedule-draft-finalization.js → webhook-events-post-webhook-events-invoice-payment-failed.js} +7 -10
- package/esm/funcs/webhook-events-post-webhook-events-invoice-payment-failed.js.map +1 -0
- 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/models/add-addon-request.d.ts +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts +1 -1
- 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/commitment-info.d.ts +15 -0
- package/esm/sdk/models/commitment-info.d.ts.map +1 -1
- package/esm/sdk/models/commitment-info.js +12 -0
- package/esm/sdk/models/commitment-info.js.map +1 -1
- package/esm/sdk/models/commitment-response.d.ts +0 -1
- package/esm/sdk/models/commitment-response.d.ts.map +1 -1
- package/esm/sdk/models/commitment-response.js +0 -1
- package/esm/sdk/models/commitment-response.js.map +1 -1
- package/esm/sdk/models/create-commitment-request.d.ts +0 -2
- package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/create-commitment-request.js +0 -1
- package/esm/sdk/models/create-commitment-request.js.map +1 -1
- package/esm/sdk/models/create-customer-request.d.ts +3 -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/create-subscription-line-item-request.d.ts +16 -1
- package/esm/sdk/models/create-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +13 -1
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +2 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/customer-response.d.ts +2 -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 +2 -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-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/grouped-invoicing-child-request.d.ts +10 -1
- package/esm/sdk/models/grouped-invoicing-child-request.d.ts.map +1 -1
- package/esm/sdk/models/grouped-invoicing-child-request.js.map +1 -1
- package/esm/sdk/models/index.d.ts +5 -2
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +5 -2
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-payment-failure-reason.d.ts +11 -0
- package/esm/sdk/models/invoice-payment-failure-reason.d.ts.map +1 -0
- package/esm/sdk/models/invoice-payment-failure-reason.js +12 -0
- package/esm/sdk/models/invoice-payment-failure-reason.js.map +1 -0
- package/esm/sdk/models/payment-response.d.ts +4 -0
- package/esm/sdk/models/payment-response.d.ts.map +1 -1
- package/esm/sdk/models/payment-response.js +2 -0
- package/esm/sdk/models/payment-response.js.map +1 -1
- package/esm/sdk/models/price-response.d.ts +4 -0
- package/esm/sdk/models/price-response.d.ts.map +1 -1
- package/esm/sdk/models/price-response.js +1 -0
- package/esm/sdk/models/price-response.js.map +1 -1
- package/esm/sdk/models/settings-override.d.ts +18 -0
- package/esm/sdk/models/settings-override.d.ts.map +1 -0
- package/esm/sdk/models/settings-override.js +31 -0
- package/esm/sdk/models/settings-override.js.map +1 -0
- package/esm/sdk/models/subscription-config-override.d.ts +19 -0
- package/esm/sdk/models/subscription-config-override.d.ts.map +1 -0
- package/esm/sdk/models/subscription-config-override.js +34 -0
- package/esm/sdk/models/subscription-config-override.js.map +1 -0
- package/esm/sdk/models/subscription-response-v2.d.ts +2 -0
- package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response-v2.js +2 -0
- package/esm/sdk/models/subscription-response-v2.js.map +1 -1
- package/esm/sdk/models/subscription-response.d.ts +2 -0
- package/esm/sdk/models/subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response.js +2 -0
- package/esm/sdk/models/subscription-response.js.map +1 -1
- package/esm/sdk/models/update-customer-request.d.ts +3 -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/update-subscription-line-item-request.d.ts +17 -1
- package/esm/sdk/models/update-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-request.d.ts +3 -0
- package/esm/sdk/models/update-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-request.js +2 -0
- package/esm/sdk/models/update-subscription-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/usage-analytic-point.d.ts +6 -0
- package/esm/sdk/models/usage-analytic-point.d.ts.map +1 -1
- package/esm/sdk/models/usage-analytic-point.js +6 -0
- package/esm/sdk/models/usage-analytic-point.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.d.ts +20 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.js +31 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-payment.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-payment.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-payment.js +2 -0
- package/esm/sdk/models/webhook-dto-payment.js.map +1 -1
- package/esm/sdk/models/webhook-event-name.d.ts +1 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +1 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/scheduled-tasks.d.ts +0 -14
- package/esm/sdk/scheduled-tasks.d.ts.map +1 -1
- package/esm/sdk/scheduled-tasks.js +0 -20
- package/esm/sdk/scheduled-tasks.js.map +1 -1
- package/esm/sdk/webhook-events.d.ts +7 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +10 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/{scheduled-tasks-schedule-draft-finalization.ts → webhook-events-post-webhook-events-invoice-payment-failed.ts} +13 -19
- package/src/lib/config.ts +4 -3
- package/src/sdk/models/add-addon-request.ts +1 -1
- package/src/sdk/models/add-addon-to-subscription-request.ts +1 -1
- package/src/sdk/models/billingterm-instalment.ts +6 -0
- package/src/sdk/models/commitment-info.ts +29 -0
- package/src/sdk/models/commitment-response.ts +0 -2
- package/src/sdk/models/create-commitment-request.ts +0 -3
- package/src/sdk/models/create-customer-request.ts +8 -0
- package/src/sdk/models/create-subscription-line-item-request.ts +16 -1
- package/src/sdk/models/create-subscription-request.ts +18 -1
- package/src/sdk/models/customer-response.ts +6 -0
- package/src/sdk/models/customer.ts +6 -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/grouped-invoicing-child-request.ts +10 -1
- package/src/sdk/models/index.ts +5 -2
- package/src/sdk/models/invoice-payment-failure-reason.ts +22 -0
- package/src/sdk/models/payment-response.ts +6 -0
- package/src/sdk/models/price-response.ts +5 -0
- package/src/sdk/models/settings-override.ts +73 -0
- package/src/sdk/models/subscription-config-override.ts +71 -0
- package/src/sdk/models/subscription-response-v2.ts +6 -0
- package/src/sdk/models/subscription-response.ts +6 -0
- package/src/sdk/models/update-customer-request.ts +8 -0
- package/src/sdk/models/update-subscription-line-item-request.ts +17 -1
- package/src/sdk/models/update-subscription-request.ts +8 -0
- package/src/sdk/models/usage-analytic-instalment.ts +66 -0
- package/src/sdk/models/usage-analytic-point.ts +13 -0
- package/src/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.ts +73 -0
- package/src/sdk/models/webhook-dto-payment.ts +3 -0
- package/src/sdk/models/webhook-event-name.ts +1 -0
- package/src/sdk/scheduled-tasks.ts +0 -34
- package/src/sdk/webhook-events.ts +16 -0
- package/docs/sdk/models/schedule-draft-finalization-response.md +0 -16
- package/docs/sdk/models/schedule-update-billing-period-request.md +0 -16
- package/docs/sdk/models/schedule-update-billing-period-response.md +0 -16
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts +0 -17
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.d.ts.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js +0 -73
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js.map +0 -1
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts +0 -11
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts.map +0 -1
- package/esm/sdk/models/schedule-draft-finalization-op.js +0 -11
- package/esm/sdk/models/schedule-draft-finalization-op.js.map +0 -1
- package/esm/sdk/models/schedule-update-billing-period-op.d.ts +0 -20
- package/esm/sdk/models/schedule-update-billing-period-op.d.ts.map +0 -1
- package/esm/sdk/models/schedule-update-billing-period-op.js +0 -16
- package/esm/sdk/models/schedule-update-billing-period-op.js.map +0 -1
- package/src/funcs/scheduled-tasks-schedule-update-billing-period.ts +0 -157
- package/src/sdk/models/schedule-draft-finalization-op.ts +0 -29
- package/src/sdk/models/schedule-update-billing-period-op.ts +0 -54
|
@@ -0,0 +1,71 @@
|
|
|
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 SubscriptionConfigOverride = {
|
|
13
|
+
autoCancellationEnabled?: boolean | undefined;
|
|
14
|
+
gracePeriodDays?: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const SubscriptionConfigOverride$inboundSchema: z.ZodMiniType<
|
|
19
|
+
SubscriptionConfigOverride,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.pipe(
|
|
22
|
+
z.object({
|
|
23
|
+
auto_cancellation_enabled: types.optional(types.boolean()),
|
|
24
|
+
grace_period_days: types.optional(types.number()),
|
|
25
|
+
}),
|
|
26
|
+
z.transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"auto_cancellation_enabled": "autoCancellationEnabled",
|
|
29
|
+
"grace_period_days": "gracePeriodDays",
|
|
30
|
+
});
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type SubscriptionConfigOverride$Outbound = {
|
|
35
|
+
auto_cancellation_enabled?: boolean | undefined;
|
|
36
|
+
grace_period_days?: number | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const SubscriptionConfigOverride$outboundSchema: z.ZodMiniType<
|
|
41
|
+
SubscriptionConfigOverride$Outbound,
|
|
42
|
+
SubscriptionConfigOverride
|
|
43
|
+
> = z.pipe(
|
|
44
|
+
z.object({
|
|
45
|
+
autoCancellationEnabled: z.optional(z.boolean()),
|
|
46
|
+
gracePeriodDays: z.optional(z.int()),
|
|
47
|
+
}),
|
|
48
|
+
z.transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
autoCancellationEnabled: "auto_cancellation_enabled",
|
|
51
|
+
gracePeriodDays: "grace_period_days",
|
|
52
|
+
});
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export function subscriptionConfigOverrideToJSON(
|
|
57
|
+
subscriptionConfigOverride: SubscriptionConfigOverride,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
SubscriptionConfigOverride$outboundSchema.parse(subscriptionConfigOverride),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export function subscriptionConfigOverrideFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<SubscriptionConfigOverride, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => SubscriptionConfigOverride$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'SubscriptionConfigOverride' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -44,6 +44,10 @@ import {
|
|
|
44
44
|
ProrationBehavior$inboundSchema,
|
|
45
45
|
} from "./proration-behavior.js";
|
|
46
46
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
47
|
+
import {
|
|
48
|
+
SettingsOverride,
|
|
49
|
+
SettingsOverride$inboundSchema,
|
|
50
|
+
} from "./settings-override.js";
|
|
47
51
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
48
52
|
import {
|
|
49
53
|
SubscriptionLineItemResponse,
|
|
@@ -231,6 +235,7 @@ export type SubscriptionResponseV2 = {
|
|
|
231
235
|
*/
|
|
232
236
|
planPricesOutOfSync?: boolean | undefined;
|
|
233
237
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
238
|
+
settings?: SettingsOverride | undefined;
|
|
234
239
|
/**
|
|
235
240
|
* StartDate is the start date of the subscription
|
|
236
241
|
*/
|
|
@@ -320,6 +325,7 @@ export const SubscriptionResponseV2$inboundSchema: z.ZodMiniType<
|
|
|
320
325
|
plan_id: types.optional(types.string()),
|
|
321
326
|
plan_prices_out_of_sync: types.optional(types.boolean()),
|
|
322
327
|
proration_behavior: types.optional(ProrationBehavior$inboundSchema),
|
|
328
|
+
settings: types.optional(SettingsOverride$inboundSchema),
|
|
323
329
|
start_date: types.optional(types.date()),
|
|
324
330
|
status: types.optional(Status$inboundSchema),
|
|
325
331
|
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
@@ -56,6 +56,10 @@ import {
|
|
|
56
56
|
ProrationBehavior$inboundSchema,
|
|
57
57
|
} from "./proration-behavior.js";
|
|
58
58
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
59
|
+
import {
|
|
60
|
+
SettingsOverride,
|
|
61
|
+
SettingsOverride$inboundSchema,
|
|
62
|
+
} from "./settings-override.js";
|
|
59
63
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
60
64
|
import {
|
|
61
65
|
SubscriptionPhaseResponse,
|
|
@@ -236,6 +240,7 @@ export type SubscriptionResponse = {
|
|
|
236
240
|
*/
|
|
237
241
|
planId?: string | undefined;
|
|
238
242
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
243
|
+
settings?: SettingsOverride | undefined;
|
|
239
244
|
/**
|
|
240
245
|
* StartDate is the start date of the subscription
|
|
241
246
|
*/
|
|
@@ -327,6 +332,7 @@ export const SubscriptionResponse$inboundSchema: z.ZodMiniType<
|
|
|
327
332
|
plan: types.optional(PlanResponse$inboundSchema),
|
|
328
333
|
plan_id: types.optional(types.string()),
|
|
329
334
|
proration_behavior: types.optional(ProrationBehavior$inboundSchema),
|
|
335
|
+
settings: types.optional(SettingsOverride$inboundSchema),
|
|
330
336
|
start_date: types.optional(types.date()),
|
|
331
337
|
status: types.optional(Status$inboundSchema),
|
|
332
338
|
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
@@ -14,6 +14,11 @@ import {
|
|
|
14
14
|
CustomerContactPerson$Outbound,
|
|
15
15
|
CustomerContactPerson$outboundSchema,
|
|
16
16
|
} from "./customer-contact-person.js";
|
|
17
|
+
import {
|
|
18
|
+
SettingsOverride,
|
|
19
|
+
SettingsOverride$Outbound,
|
|
20
|
+
SettingsOverride$outboundSchema,
|
|
21
|
+
} from "./settings-override.js";
|
|
17
22
|
import { TaxTreatment, TaxTreatment$outboundSchema } from "./tax-treatment.js";
|
|
18
23
|
|
|
19
24
|
/**
|
|
@@ -82,6 +87,7 @@ export type UpdateCustomerRequest = {
|
|
|
82
87
|
* name is the updated name or company name for the customer
|
|
83
88
|
*/
|
|
84
89
|
name?: string | undefined;
|
|
90
|
+
settings?: SettingsOverride | undefined;
|
|
85
91
|
taxTreatment?: TaxTreatment | undefined;
|
|
86
92
|
/**
|
|
87
93
|
* timezone is the updated IANA timezone name for the customer (e.g. "Asia/Kolkata", "America/New_York")
|
|
@@ -108,6 +114,7 @@ export type UpdateCustomerRequest$Outbound = {
|
|
|
108
114
|
| undefined;
|
|
109
115
|
metadata?: { [k: string]: string } | undefined;
|
|
110
116
|
name?: string | undefined;
|
|
117
|
+
settings?: SettingsOverride$Outbound | undefined;
|
|
111
118
|
tax_treatment?: string | undefined;
|
|
112
119
|
timezone?: string | undefined;
|
|
113
120
|
};
|
|
@@ -135,6 +142,7 @@ export const UpdateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
135
142
|
),
|
|
136
143
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
137
144
|
name: z.optional(z.string()),
|
|
145
|
+
settings: z.optional(SettingsOverride$outboundSchema),
|
|
138
146
|
taxTreatment: z.optional(TaxTreatment$outboundSchema),
|
|
139
147
|
timezone: z.optional(z.string()),
|
|
140
148
|
}),
|
|
@@ -39,18 +39,34 @@ export type UpdateSubscriptionLineItemRequest = {
|
|
|
39
39
|
billingModel?: BillingModel | undefined;
|
|
40
40
|
bucketSize?: WindowSize | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Deprecated: use POST /commitments instead.
|
|
43
43
|
*/
|
|
44
44
|
commitmentAmount?: number | undefined;
|
|
45
45
|
commitmentDuration?: BillingPeriod | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Deprecated: use POST /commitments instead.
|
|
48
|
+
*/
|
|
46
49
|
commitmentOverageFactor?: number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Deprecated: use POST /commitments instead.
|
|
52
|
+
*/
|
|
47
53
|
commitmentQuantity?: number | undefined;
|
|
48
54
|
/**
|
|
49
55
|
* Pointer so an explicit empty array can clear existing buckets (omission keeps them).
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
*
|
|
59
|
+
* Deprecated: use POST /commitments instead.
|
|
50
60
|
*/
|
|
51
61
|
commitmentTimeBuckets?: Array<CommitmentBucketRequest> | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Deprecated: use POST /commitments instead.
|
|
64
|
+
*/
|
|
52
65
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
53
66
|
commitmentType?: CommitmentType | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Deprecated: use POST /commitments instead.
|
|
69
|
+
*/
|
|
54
70
|
commitmentWindowed?: boolean | undefined;
|
|
55
71
|
/**
|
|
56
72
|
* EffectiveFrom for the existing line item (if not provided, defaults to now)
|
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
ProrationBehavior,
|
|
9
9
|
ProrationBehavior$outboundSchema,
|
|
10
10
|
} from "./proration-behavior.js";
|
|
11
|
+
import {
|
|
12
|
+
SettingsOverride,
|
|
13
|
+
SettingsOverride$Outbound,
|
|
14
|
+
SettingsOverride$outboundSchema,
|
|
15
|
+
} from "./settings-override.js";
|
|
11
16
|
import {
|
|
12
17
|
SubscriptionStatus,
|
|
13
18
|
SubscriptionStatus$outboundSchema,
|
|
@@ -24,6 +29,7 @@ export type UpdateSubscriptionRequest = {
|
|
|
24
29
|
*/
|
|
25
30
|
parentSubscriptionId?: string | undefined;
|
|
26
31
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
32
|
+
settings?: SettingsOverride | undefined;
|
|
27
33
|
status?: SubscriptionStatus | undefined;
|
|
28
34
|
};
|
|
29
35
|
|
|
@@ -33,6 +39,7 @@ export type UpdateSubscriptionRequest$Outbound = {
|
|
|
33
39
|
cancel_at_period_end?: boolean | undefined;
|
|
34
40
|
parent_subscription_id?: string | undefined;
|
|
35
41
|
proration_behavior?: string | undefined;
|
|
42
|
+
settings?: SettingsOverride$Outbound | undefined;
|
|
36
43
|
status?: string | undefined;
|
|
37
44
|
};
|
|
38
45
|
|
|
@@ -46,6 +53,7 @@ export const UpdateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
46
53
|
cancelAtPeriodEnd: z.optional(z.boolean()),
|
|
47
54
|
parentSubscriptionId: z.optional(z.string()),
|
|
48
55
|
prorationBehavior: z.optional(ProrationBehavior$outboundSchema),
|
|
56
|
+
settings: z.optional(SettingsOverride$outboundSchema),
|
|
49
57
|
status: z.optional(SubscriptionStatus$outboundSchema),
|
|
50
58
|
}),
|
|
51
59
|
z.transform((v) => {
|
|
@@ -0,0 +1,66 @@
|
|
|
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 UsageAnalyticInstalment = {
|
|
13
|
+
amount?: string | undefined;
|
|
14
|
+
commitmentId?: string | undefined;
|
|
15
|
+
currency?: string | undefined;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
invoiceId?: string | undefined;
|
|
18
|
+
invoiceLabel?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* when the invoice billing it was finalized
|
|
21
|
+
*/
|
|
22
|
+
invoicedAt?: Date | undefined;
|
|
23
|
+
servicePeriodEnd?: Date | undefined;
|
|
24
|
+
servicePeriodStart?: Date | undefined;
|
|
25
|
+
subscriptionId?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UsageAnalyticInstalment$inboundSchema: z.ZodMiniType<
|
|
30
|
+
UsageAnalyticInstalment,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.pipe(
|
|
33
|
+
z.object({
|
|
34
|
+
amount: types.optional(types.string()),
|
|
35
|
+
commitment_id: types.optional(types.string()),
|
|
36
|
+
currency: types.optional(types.string()),
|
|
37
|
+
id: types.optional(types.string()),
|
|
38
|
+
invoice_id: types.optional(types.string()),
|
|
39
|
+
invoice_label: types.optional(types.string()),
|
|
40
|
+
invoiced_at: types.optional(types.date()),
|
|
41
|
+
service_period_end: types.optional(types.date()),
|
|
42
|
+
service_period_start: types.optional(types.date()),
|
|
43
|
+
subscription_id: types.optional(types.string()),
|
|
44
|
+
}),
|
|
45
|
+
z.transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
"commitment_id": "commitmentId",
|
|
48
|
+
"invoice_id": "invoiceId",
|
|
49
|
+
"invoice_label": "invoiceLabel",
|
|
50
|
+
"invoiced_at": "invoicedAt",
|
|
51
|
+
"service_period_end": "servicePeriodEnd",
|
|
52
|
+
"service_period_start": "servicePeriodStart",
|
|
53
|
+
"subscription_id": "subscriptionId",
|
|
54
|
+
});
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export function usageAnalyticInstalmentFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<UsageAnalyticInstalment, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => UsageAnalyticInstalment$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'UsageAnalyticInstalment' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -27,8 +27,14 @@ export type UsageAnalyticPoint = {
|
|
|
27
27
|
* Commitment breakdown (only populated for windowed commitments)
|
|
28
28
|
*/
|
|
29
29
|
computedCommitmentUtilizedAmount?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Usage units behind the commitment breakdown, for v2 commitments
|
|
32
|
+
*/
|
|
33
|
+
computedCommitmentUtilizedQuantity?: string | undefined;
|
|
30
34
|
computedOverageAmount?: string | undefined;
|
|
35
|
+
computedOverageQuantity?: string | undefined;
|
|
31
36
|
computedTrueUpAmount?: string | undefined;
|
|
37
|
+
computedTrueUpQuantity?: string | undefined;
|
|
32
38
|
/**
|
|
33
39
|
* Cost is the final cost after discount (Subtotal - Discount)
|
|
34
40
|
*/
|
|
@@ -51,8 +57,11 @@ export const UsageAnalyticPoint$inboundSchema: z.ZodMiniType<
|
|
|
51
57
|
z.object({
|
|
52
58
|
buckets: types.optional(z.array(PointBucket$inboundSchema)),
|
|
53
59
|
computed_commitment_utilized_amount: types.optional(types.string()),
|
|
60
|
+
computed_commitment_utilized_quantity: types.optional(types.string()),
|
|
54
61
|
computed_overage_amount: types.optional(types.string()),
|
|
62
|
+
computed_overage_quantity: types.optional(types.string()),
|
|
55
63
|
computed_true_up_amount: types.optional(types.string()),
|
|
64
|
+
computed_true_up_quantity: types.optional(types.string()),
|
|
56
65
|
cost: types.optional(types.string()),
|
|
57
66
|
discount: types.optional(types.string()),
|
|
58
67
|
event_count: types.optional(types.number()),
|
|
@@ -63,8 +72,12 @@ export const UsageAnalyticPoint$inboundSchema: z.ZodMiniType<
|
|
|
63
72
|
z.transform((v) => {
|
|
64
73
|
return remap$(v, {
|
|
65
74
|
"computed_commitment_utilized_amount": "computedCommitmentUtilizedAmount",
|
|
75
|
+
"computed_commitment_utilized_quantity":
|
|
76
|
+
"computedCommitmentUtilizedQuantity",
|
|
66
77
|
"computed_overage_amount": "computedOverageAmount",
|
|
78
|
+
"computed_overage_quantity": "computedOverageQuantity",
|
|
67
79
|
"computed_true_up_amount": "computedTrueUpAmount",
|
|
80
|
+
"computed_true_up_quantity": "computedTrueUpQuantity",
|
|
68
81
|
"event_count": "eventCount",
|
|
69
82
|
});
|
|
70
83
|
}),
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
InvoicePaymentFailureReason,
|
|
12
|
+
InvoicePaymentFailureReason$inboundSchema,
|
|
13
|
+
} from "./invoice-payment-failure-reason.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
SecretProvider,
|
|
17
|
+
SecretProvider$inboundSchema,
|
|
18
|
+
} from "./secret-provider.js";
|
|
19
|
+
import {
|
|
20
|
+
WebhookDtoInvoice,
|
|
21
|
+
WebhookDtoInvoice$inboundSchema,
|
|
22
|
+
} from "./webhook-dto-invoice.js";
|
|
23
|
+
import {
|
|
24
|
+
WebhookEventName,
|
|
25
|
+
WebhookEventName$inboundSchema,
|
|
26
|
+
} from "./webhook-event-name.js";
|
|
27
|
+
|
|
28
|
+
export type WebhookDtoInvoicePaymentFailedWebhookPayload = {
|
|
29
|
+
error?: string | undefined;
|
|
30
|
+
eventType?: WebhookEventName | undefined;
|
|
31
|
+
invoice?: WebhookDtoInvoice | undefined;
|
|
32
|
+
isAutoChargeAttempt?: boolean | undefined;
|
|
33
|
+
paymentId?: string | undefined;
|
|
34
|
+
provider?: SecretProvider | undefined;
|
|
35
|
+
reason?: InvoicePaymentFailureReason | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const WebhookDtoInvoicePaymentFailedWebhookPayload$inboundSchema:
|
|
40
|
+
z.ZodMiniType<WebhookDtoInvoicePaymentFailedWebhookPayload, unknown> = z.pipe(
|
|
41
|
+
z.object({
|
|
42
|
+
error: types.optional(types.string()),
|
|
43
|
+
event_type: types.optional(WebhookEventName$inboundSchema),
|
|
44
|
+
invoice: types.optional(WebhookDtoInvoice$inboundSchema),
|
|
45
|
+
is_auto_charge_attempt: types.optional(types.boolean()),
|
|
46
|
+
payment_id: types.optional(types.string()),
|
|
47
|
+
provider: types.optional(SecretProvider$inboundSchema),
|
|
48
|
+
reason: types.optional(InvoicePaymentFailureReason$inboundSchema),
|
|
49
|
+
}),
|
|
50
|
+
z.transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"event_type": "eventType",
|
|
53
|
+
"is_auto_charge_attempt": "isAutoChargeAttempt",
|
|
54
|
+
"payment_id": "paymentId",
|
|
55
|
+
});
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export function webhookDtoInvoicePaymentFailedWebhookPayloadFromJSON(
|
|
60
|
+
jsonString: string,
|
|
61
|
+
): SafeParseResult<
|
|
62
|
+
WebhookDtoInvoicePaymentFailedWebhookPayload,
|
|
63
|
+
SDKValidationError
|
|
64
|
+
> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) =>
|
|
68
|
+
WebhookDtoInvoicePaymentFailedWebhookPayload$inboundSchema.parse(
|
|
69
|
+
JSON.parse(x),
|
|
70
|
+
),
|
|
71
|
+
`Failed to parse 'WebhookDtoInvoicePaymentFailedWebhookPayload' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -23,6 +23,7 @@ import { SDKValidationError } from "./sdk-validation-error.js";
|
|
|
23
23
|
|
|
24
24
|
export type WebhookDtoPayment = {
|
|
25
25
|
amount?: string | undefined;
|
|
26
|
+
connectionId?: string | undefined;
|
|
26
27
|
currency?: string | undefined;
|
|
27
28
|
destinationId?: string | undefined;
|
|
28
29
|
destinationType?: PaymentDestinationType | undefined;
|
|
@@ -45,6 +46,7 @@ export const WebhookDtoPayment$inboundSchema: z.ZodMiniType<
|
|
|
45
46
|
> = z.pipe(
|
|
46
47
|
z.object({
|
|
47
48
|
amount: types.optional(types.string()),
|
|
49
|
+
connection_id: types.optional(types.string()),
|
|
48
50
|
currency: types.optional(types.string()),
|
|
49
51
|
destination_id: types.optional(types.string()),
|
|
50
52
|
destination_type: types.optional(PaymentDestinationType$inboundSchema),
|
|
@@ -61,6 +63,7 @@ export const WebhookDtoPayment$inboundSchema: z.ZodMiniType<
|
|
|
61
63
|
}),
|
|
62
64
|
z.transform((v) => {
|
|
63
65
|
return remap$(v, {
|
|
66
|
+
"connection_id": "connectionId",
|
|
64
67
|
"destination_id": "destinationId",
|
|
65
68
|
"destination_type": "destinationType",
|
|
66
69
|
"error_message": "errorMessage",
|
|
@@ -56,6 +56,7 @@ export const WebhookEventName = {
|
|
|
56
56
|
InvoiceUpdateVoided: "invoice.update.voided",
|
|
57
57
|
InvoiceUpdate: "invoice.update",
|
|
58
58
|
InvoicePaymentOverdue: "invoice.payment.overdue",
|
|
59
|
+
InvoicePaymentFailed: "invoice.payment.failed",
|
|
59
60
|
InvoiceSyncSuccess: "invoice.sync.success",
|
|
60
61
|
InvoiceSyncFailed: "invoice.sync.failed",
|
|
61
62
|
WalletCreditBalanceDropped: "wallet.credit_balance.dropped",
|
|
@@ -6,8 +6,6 @@ import { scheduledTasksCreateScheduledTask } from "../funcs/scheduled-tasks-crea
|
|
|
6
6
|
import { scheduledTasksDeleteScheduledTask } from "../funcs/scheduled-tasks-delete-scheduled-task.js";
|
|
7
7
|
import { scheduledTasksGetScheduledTask } from "../funcs/scheduled-tasks-get-scheduled-task.js";
|
|
8
8
|
import { scheduledTasksListScheduledTasks } from "../funcs/scheduled-tasks-list-scheduled-tasks.js";
|
|
9
|
-
import { scheduledTasksScheduleDraftFinalization } from "../funcs/scheduled-tasks-schedule-draft-finalization.js";
|
|
10
|
-
import { scheduledTasksScheduleUpdateBillingPeriod } from "../funcs/scheduled-tasks-schedule-update-billing-period.js";
|
|
11
9
|
import { scheduledTasksTriggerScheduledTaskRun } from "../funcs/scheduled-tasks-trigger-scheduled-task-run.js";
|
|
12
10
|
import { scheduledTasksUpdateScheduledTask } from "../funcs/scheduled-tasks-update-scheduled-task.js";
|
|
13
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -49,38 +47,6 @@ export class ScheduledTasks extends ClientSDK {
|
|
|
49
47
|
));
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
/**
|
|
53
|
-
* Schedule draft finalization
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* Triggers the draft invoice finalization workflow that scans computed draft invoices whose finalization delay has elapsed and finalizes them (assign invoice number, sync to vendors, attempt payment).
|
|
57
|
-
*/
|
|
58
|
-
async scheduleDraftFinalization(
|
|
59
|
-
options?: RequestOptions,
|
|
60
|
-
): Promise<models.ScheduleDraftFinalizationResponse> {
|
|
61
|
-
return unwrapAsync(scheduledTasksScheduleDraftFinalization(
|
|
62
|
-
this,
|
|
63
|
-
options,
|
|
64
|
-
));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Schedule update billing period
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* Use when you need to trigger a billing-period update workflow (e.g. to recalculate or sync billing windows).
|
|
72
|
-
*/
|
|
73
|
-
async scheduleUpdateBillingPeriod(
|
|
74
|
-
request: models.ScheduleUpdateBillingPeriodRequest,
|
|
75
|
-
options?: RequestOptions,
|
|
76
|
-
): Promise<models.ScheduleUpdateBillingPeriodResponse> {
|
|
77
|
-
return unwrapAsync(scheduledTasksScheduleUpdateBillingPeriod(
|
|
78
|
-
this,
|
|
79
|
-
request,
|
|
80
|
-
options,
|
|
81
|
-
));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
50
|
/**
|
|
85
51
|
* Get scheduled task
|
|
86
52
|
*
|
|
@@ -30,6 +30,7 @@ import { webhookEventsPostWebhookEventsFeatureUpdated } from "../funcs/webhook-e
|
|
|
30
30
|
import { webhookEventsPostWebhookEventsFeatureWalletBalanceAlert } from "../funcs/webhook-events-post-webhook-events-feature-wallet-balance-alert.js";
|
|
31
31
|
import { webhookEventsPostWebhookEventsInvoiceCommunicationTriggered } from "../funcs/webhook-events-post-webhook-events-invoice-communication-triggered.js";
|
|
32
32
|
import { webhookEventsPostWebhookEventsInvoiceCreateDrafted } from "../funcs/webhook-events-post-webhook-events-invoice-create-drafted.js";
|
|
33
|
+
import { webhookEventsPostWebhookEventsInvoicePaymentFailed } from "../funcs/webhook-events-post-webhook-events-invoice-payment-failed.js";
|
|
33
34
|
import { webhookEventsPostWebhookEventsInvoicePaymentOverdue } from "../funcs/webhook-events-post-webhook-events-invoice-payment-overdue.js";
|
|
34
35
|
import { webhookEventsPostWebhookEventsInvoiceSyncFailed } from "../funcs/webhook-events-post-webhook-events-invoice-sync-failed.js";
|
|
35
36
|
import { webhookEventsPostWebhookEventsInvoiceSyncSuccess } from "../funcs/webhook-events-post-webhook-events-invoice-sync-success.js";
|
|
@@ -501,6 +502,21 @@ export class WebhookEvents extends ClientSDK {
|
|
|
501
502
|
));
|
|
502
503
|
}
|
|
503
504
|
|
|
505
|
+
/**
|
|
506
|
+
* invoice.payment.failed
|
|
507
|
+
*
|
|
508
|
+
* @remarks
|
|
509
|
+
* Fired when a payment of an invoice does not succeed. `reason` is `payment_method_unavailable`, `provider_error` or `declined`; `is_auto_charge_attempt` is true when Flexprice charged the saved payment method. Doc-only for parsing.
|
|
510
|
+
*/
|
|
511
|
+
async postWebhookEventsInvoicePaymentFailed(
|
|
512
|
+
options?: RequestOptions,
|
|
513
|
+
): Promise<models.WebhookDtoInvoicePaymentFailedWebhookPayload> {
|
|
514
|
+
return unwrapAsync(webhookEventsPostWebhookEventsInvoicePaymentFailed(
|
|
515
|
+
this,
|
|
516
|
+
options,
|
|
517
|
+
));
|
|
518
|
+
}
|
|
519
|
+
|
|
504
520
|
/**
|
|
505
521
|
* invoice.payment.overdue
|
|
506
522
|
*
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# ScheduleDraftFinalizationResponse
|
|
2
|
-
|
|
3
|
-
OK
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { ScheduleDraftFinalizationResponse } from "@flexprice/sdk/sdk/models";
|
|
9
|
-
|
|
10
|
-
let value: ScheduleDraftFinalizationResponse = {};
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Fields
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Description |
|
|
16
|
-
| ----------- | ----------- | ----------- | ----------- |
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# ScheduleUpdateBillingPeriodRequest
|
|
2
|
-
|
|
3
|
-
Schedule Update Billing Period Request
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { ScheduleUpdateBillingPeriodRequest } from "@flexprice/sdk/sdk/models";
|
|
9
|
-
|
|
10
|
-
let value: ScheduleUpdateBillingPeriodRequest = {};
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Fields
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Description |
|
|
16
|
-
| ----------- | ----------- | ----------- | ----------- |
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# ScheduleUpdateBillingPeriodResponse
|
|
2
|
-
|
|
3
|
-
OK
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { ScheduleUpdateBillingPeriodResponse } from "@flexprice/sdk/sdk/models";
|
|
9
|
-
|
|
10
|
-
let value: ScheduleUpdateBillingPeriodResponse = {};
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Fields
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Description |
|
|
16
|
-
| ----------- | ----------- | ----------- | ----------- |
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FlexpriceCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/http-client-errors.js";
|
|
5
|
-
import * as models from "../sdk/models/index.js";
|
|
6
|
-
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
7
|
-
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
8
|
-
import { APIPromise } from "../types/async.js";
|
|
9
|
-
import { Result } from "../types/fp.js";
|
|
10
|
-
/**
|
|
11
|
-
* Schedule draft finalization
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Triggers the draft invoice finalization workflow that scans computed draft invoices whose finalization delay has elapsed and finalizes them (assign invoice number, sync to vendors, attempt payment).
|
|
15
|
-
*/
|
|
16
|
-
export declare function scheduledTasksScheduleDraftFinalization(client: FlexpriceCore, options?: RequestOptions): APIPromise<Result<models.ScheduleDraftFinalizationResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
-
//# sourceMappingURL=scheduled-tasks-schedule-draft-finalization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-tasks-schedule-draft-finalization.d.ts","sourceRoot":"","sources":["../../src/funcs/scheduled-tasks-schedule-draft-finalization.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,iCAAiC,EACtC,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-tasks-schedule-draft-finalization.js","sourceRoot":"","sources":["../../src/funcs/scheduled-tasks-schedule-draft-finalization.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-tasks-schedule-update-billing-period.d.ts","sourceRoot":"","sources":["../../src/funcs/scheduled-tasks-schedule-update-billing-period.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,CAAC,kCAAkC,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,mCAAmC,EACxC,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|