@paygentic/sdk 0.7.6 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/commonjs/funcs/subscriptionsUpdateSubscription.d.ts +16 -0
- package/dist/commonjs/funcs/subscriptionsUpdateSubscription.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsUpdateSubscription.js +122 -0
- package/dist/commonjs/funcs/subscriptionsUpdateSubscription.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/feeprice.d.ts +5 -1
- package/dist/commonjs/models/feeprice.d.ts.map +1 -1
- package/dist/commonjs/models/feeprice.js +1 -0
- package/dist/commonjs/models/feeprice.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/lineitem.d.ts +1 -1
- package/dist/commonjs/models/operations/createprice.d.ts +5 -0
- package/dist/commonjs/models/operations/createprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createprice.js +1 -0
- package/dist/commonjs/models/operations/createprice.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +10 -0
- package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.js +2 -0
- package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listsubscriptions.d.ts +9 -0
- package/dist/commonjs/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listsubscriptions.js.map +1 -1
- package/dist/commonjs/models/operations/updateprice.d.ts +5 -0
- package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateprice.js +1 -0
- package/dist/commonjs/models/operations/updateprice.js.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.d.ts +71 -0
- package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatesubscription.js +78 -0
- package/dist/commonjs/models/operations/updatesubscription.js.map +1 -0
- package/dist/commonjs/models/price.d.ts +4 -0
- package/dist/commonjs/models/price.d.ts.map +1 -1
- package/dist/commonjs/models/price.js +1 -0
- package/dist/commonjs/models/price.js.map +1 -1
- package/dist/commonjs/models/pricepropertiesunion.d.ts +1 -1
- package/dist/commonjs/models/schemasprice.d.ts +4 -0
- package/dist/commonjs/models/schemasprice.d.ts.map +1 -1
- package/dist/commonjs/models/schemasprice.js +1 -0
- package/dist/commonjs/models/schemasprice.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +7 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +2 -0
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptionmetadata.d.ts +13 -0
- package/dist/commonjs/models/subscriptionmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionmetadata.js +54 -0
- package/dist/commonjs/models/subscriptionmetadata.js.map +1 -0
- package/dist/commonjs/sdk/subscriptions.d.ts +4 -0
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +7 -0
- package/dist/commonjs/sdk/subscriptions.js.map +1 -1
- package/dist/esm/funcs/subscriptionsUpdateSubscription.d.ts +16 -0
- package/dist/esm/funcs/subscriptionsUpdateSubscription.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsUpdateSubscription.js +86 -0
- package/dist/esm/funcs/subscriptionsUpdateSubscription.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/feeprice.d.ts +5 -1
- package/dist/esm/models/feeprice.d.ts.map +1 -1
- package/dist/esm/models/feeprice.js +1 -0
- package/dist/esm/models/feeprice.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/lineitem.d.ts +1 -1
- package/dist/esm/models/operations/createprice.d.ts +5 -0
- package/dist/esm/models/operations/createprice.d.ts.map +1 -1
- package/dist/esm/models/operations/createprice.js +1 -0
- package/dist/esm/models/operations/createprice.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +10 -0
- package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/createsubscription.js +2 -0
- package/dist/esm/models/operations/createsubscription.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listsubscriptions.d.ts +9 -0
- package/dist/esm/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/esm/models/operations/listsubscriptions.js.map +1 -1
- package/dist/esm/models/operations/updateprice.d.ts +5 -0
- package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
- package/dist/esm/models/operations/updateprice.js +1 -0
- package/dist/esm/models/operations/updateprice.js.map +1 -1
- package/dist/esm/models/operations/updatesubscription.d.ts +71 -0
- package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -0
- package/dist/esm/models/operations/updatesubscription.js +40 -0
- package/dist/esm/models/operations/updatesubscription.js.map +1 -0
- package/dist/esm/models/price.d.ts +4 -0
- package/dist/esm/models/price.d.ts.map +1 -1
- package/dist/esm/models/price.js +1 -0
- package/dist/esm/models/price.js.map +1 -1
- package/dist/esm/models/pricepropertiesunion.d.ts +1 -1
- package/dist/esm/models/schemasprice.d.ts +4 -0
- package/dist/esm/models/schemasprice.d.ts.map +1 -1
- package/dist/esm/models/schemasprice.js +1 -0
- package/dist/esm/models/schemasprice.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +7 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +2 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptionmetadata.d.ts +13 -0
- package/dist/esm/models/subscriptionmetadata.d.ts.map +1 -0
- package/dist/esm/models/subscriptionmetadata.js +16 -0
- package/dist/esm/models/subscriptionmetadata.js.map +1 -0
- package/dist/esm/sdk/subscriptions.d.ts +4 -0
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +7 -0
- package/dist/esm/sdk/subscriptions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/subscriptionsUpdateSubscription.ts +178 -0
- package/src/lib/config.ts +2 -2
- package/src/models/feeprice.ts +6 -1
- package/src/models/index.ts +1 -0
- package/src/models/lineitem.ts +1 -1
- package/src/models/operations/createprice.ts +6 -0
- package/src/models/operations/createsubscription.ts +7 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listsubscriptions.ts +9 -0
- package/src/models/operations/updateprice.ts +6 -0
- package/src/models/operations/updatesubscription.ts +129 -0
- package/src/models/price.ts +5 -0
- package/src/models/pricepropertiesunion.ts +1 -1
- package/src/models/schemasprice.ts +5 -0
- package/src/models/subscription.ts +9 -0
- package/src/models/subscriptionmetadata.ts +43 -0
- package/src/sdk/subscriptions.ts +15 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const UpdateSubscriptionStatus = {
|
|
10
|
+
Active: "active",
|
|
11
|
+
Terminated: "terminated",
|
|
12
|
+
} as const;
|
|
13
|
+
export type UpdateSubscriptionStatus = ClosedEnum<
|
|
14
|
+
typeof UpdateSubscriptionStatus
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export type UpdateSubscriptionRequestBody = {
|
|
18
|
+
endingAt?: Date | undefined;
|
|
19
|
+
status?: UpdateSubscriptionStatus | undefined;
|
|
20
|
+
terminatedAt?: Date | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Identifier of entity that cancelled the subscription. Sample values: 'cust_abc123' for customer-initiated cancellation, 'org_xyz789' for merchant-initiated cancellation
|
|
23
|
+
*/
|
|
24
|
+
terminatedBy?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Explanation for subscription cancellation. Sample values: 'Customer requested cancellation', 'Payment failure', 'Service migration', 'Contract expiration'
|
|
27
|
+
*/
|
|
28
|
+
terminationReason?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Enable or disable automatic charging of invoices using stored payment methods.
|
|
31
|
+
*/
|
|
32
|
+
autoCharge?: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* When true, forces tax rate to 0%.
|
|
35
|
+
*/
|
|
36
|
+
taxExempt?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Minimum wallet balance requirement in decimal dollars (e.g., '100.00'). Can be set to '0' to disable. Maximum allowed is $5,000. Contact support for higher limits. Note: If the calculated charge amount at renewal is below payment processor minimums (typically $1.00), it will be automatically adjusted upward to meet the minimum requirement. Changes apply at next renewal.
|
|
39
|
+
*/
|
|
40
|
+
minimumAccountBalance?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Override plan setting for renewal reminder emails. Set to true to enable, false to disable, or null to use plan default.
|
|
43
|
+
*/
|
|
44
|
+
renewalReminderEnabled?: boolean | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Override plan setting for number of days before renewal to send the reminder. Set to null to use plan default.
|
|
47
|
+
*/
|
|
48
|
+
renewalReminderDays?: number | null | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type UpdateSubscriptionRequest = {
|
|
52
|
+
id: string;
|
|
53
|
+
requestBody: UpdateSubscriptionRequestBody;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const UpdateSubscriptionStatus$outboundSchema: z.ZodNativeEnum<
|
|
58
|
+
typeof UpdateSubscriptionStatus
|
|
59
|
+
> = z.nativeEnum(UpdateSubscriptionStatus);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type UpdateSubscriptionRequestBody$Outbound = {
|
|
63
|
+
endingAt?: string | undefined;
|
|
64
|
+
status?: string | undefined;
|
|
65
|
+
terminatedAt?: string | undefined;
|
|
66
|
+
terminatedBy?: string | undefined;
|
|
67
|
+
terminationReason?: string | undefined;
|
|
68
|
+
autoCharge?: boolean | undefined;
|
|
69
|
+
taxExempt?: boolean | undefined;
|
|
70
|
+
minimumAccountBalance?: string | undefined;
|
|
71
|
+
renewalReminderEnabled?: boolean | null | undefined;
|
|
72
|
+
renewalReminderDays?: number | null | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const UpdateSubscriptionRequestBody$outboundSchema: z.ZodType<
|
|
77
|
+
UpdateSubscriptionRequestBody$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
UpdateSubscriptionRequestBody
|
|
80
|
+
> = z.object({
|
|
81
|
+
endingAt: z.date().transform(v => v.toISOString()).optional(),
|
|
82
|
+
status: UpdateSubscriptionStatus$outboundSchema.optional(),
|
|
83
|
+
terminatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
84
|
+
terminatedBy: z.string().optional(),
|
|
85
|
+
terminationReason: z.string().optional(),
|
|
86
|
+
autoCharge: z.boolean().optional(),
|
|
87
|
+
taxExempt: z.boolean().optional(),
|
|
88
|
+
minimumAccountBalance: z.string().optional(),
|
|
89
|
+
renewalReminderEnabled: z.nullable(z.boolean()).optional(),
|
|
90
|
+
renewalReminderDays: z.nullable(z.number().int()).optional(),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export function updateSubscriptionRequestBodyToJSON(
|
|
94
|
+
updateSubscriptionRequestBody: UpdateSubscriptionRequestBody,
|
|
95
|
+
): string {
|
|
96
|
+
return JSON.stringify(
|
|
97
|
+
UpdateSubscriptionRequestBody$outboundSchema.parse(
|
|
98
|
+
updateSubscriptionRequestBody,
|
|
99
|
+
),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export type UpdateSubscriptionRequest$Outbound = {
|
|
105
|
+
id: string;
|
|
106
|
+
RequestBody: UpdateSubscriptionRequestBody$Outbound;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const UpdateSubscriptionRequest$outboundSchema: z.ZodType<
|
|
111
|
+
UpdateSubscriptionRequest$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
UpdateSubscriptionRequest
|
|
114
|
+
> = z.object({
|
|
115
|
+
id: z.string(),
|
|
116
|
+
requestBody: z.lazy(() => UpdateSubscriptionRequestBody$outboundSchema),
|
|
117
|
+
}).transform((v) => {
|
|
118
|
+
return remap$(v, {
|
|
119
|
+
requestBody: "RequestBody",
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export function updateSubscriptionRequestToJSON(
|
|
124
|
+
updateSubscriptionRequest: UpdateSubscriptionRequest,
|
|
125
|
+
): string {
|
|
126
|
+
return JSON.stringify(
|
|
127
|
+
UpdateSubscriptionRequest$outboundSchema.parse(updateSubscriptionRequest),
|
|
128
|
+
);
|
|
129
|
+
}
|
package/src/models/price.ts
CHANGED
|
@@ -61,6 +61,10 @@ export type Price = {
|
|
|
61
61
|
* When true, grants applied to a subscription will discount usage charged by this price. Only supported for standard metered prices.
|
|
62
62
|
*/
|
|
63
63
|
grantDiscountEnabled: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
66
|
+
*/
|
|
67
|
+
quantity: number;
|
|
64
68
|
};
|
|
65
69
|
|
|
66
70
|
/** @internal */
|
|
@@ -99,6 +103,7 @@ export const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown> = z
|
|
|
99
103
|
),
|
|
100
104
|
features: z.array(PriceFeature$inboundSchema).optional(),
|
|
101
105
|
grantDiscountEnabled: z.boolean().default(false),
|
|
106
|
+
quantity: z.number().int().default(1),
|
|
102
107
|
});
|
|
103
108
|
|
|
104
109
|
export function priceFromJSON(
|
|
@@ -86,7 +86,7 @@ export type PriceProperties2 = {
|
|
|
86
86
|
*/
|
|
87
87
|
export type PriceProperties1 = {
|
|
88
88
|
/**
|
|
89
|
-
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call
|
|
89
|
+
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field.
|
|
90
90
|
*/
|
|
91
91
|
unitPrice: string;
|
|
92
92
|
};
|
|
@@ -67,6 +67,10 @@ export type SchemasPrice = {
|
|
|
67
67
|
* When true, grants applied to a subscription will discount usage charged by this price. Only supported for standard metered prices.
|
|
68
68
|
*/
|
|
69
69
|
grantDiscountEnabled: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
|
|
72
|
+
*/
|
|
73
|
+
quantity: number;
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
/** @internal */
|
|
@@ -103,6 +107,7 @@ export const SchemasPrice$inboundSchema: z.ZodType<
|
|
|
103
107
|
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
104
108
|
features: z.array(PriceFeature$inboundSchema).optional(),
|
|
105
109
|
grantDiscountEnabled: z.boolean().default(false),
|
|
110
|
+
quantity: z.number().int(),
|
|
106
111
|
});
|
|
107
112
|
|
|
108
113
|
export function schemasPriceFromJSON(
|
|
@@ -7,6 +7,10 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SubscriptionMetadata,
|
|
12
|
+
SubscriptionMetadata$inboundSchema,
|
|
13
|
+
} from "./subscriptionmetadata.js";
|
|
10
14
|
|
|
11
15
|
export const SubscriptionObject = {
|
|
12
16
|
Subscription: "subscription",
|
|
@@ -197,6 +201,10 @@ export type Subscription = {
|
|
|
197
201
|
* Subscription-level auto-approval override. Null means plan default is used.
|
|
198
202
|
*/
|
|
199
203
|
autoApprove?: boolean | null | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Free-form merchant metadata to attach to the subscription. Values must be strings, numbers, or booleans.
|
|
206
|
+
*/
|
|
207
|
+
metadata?: { [k: string]: SubscriptionMetadata } | undefined;
|
|
200
208
|
/**
|
|
201
209
|
* Customer details with merchant and consumer information. Only included when include=customer is specified in the list query.
|
|
202
210
|
*/
|
|
@@ -421,6 +429,7 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
421
429
|
renewalReminderEnabled: z.nullable(z.boolean()).optional(),
|
|
422
430
|
renewalReminderDays: z.nullable(z.number().int()).optional(),
|
|
423
431
|
autoApprove: z.nullable(z.boolean()).optional(),
|
|
432
|
+
metadata: z.record(SubscriptionMetadata$inboundSchema).optional(),
|
|
424
433
|
customer: z.lazy(() => SubscriptionCustomer$inboundSchema).optional(),
|
|
425
434
|
});
|
|
426
435
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type SubscriptionMetadata = string | number | boolean;
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const SubscriptionMetadata$inboundSchema: z.ZodType<
|
|
14
|
+
SubscriptionMetadata,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type SubscriptionMetadata$Outbound = string | number | boolean;
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const SubscriptionMetadata$outboundSchema: z.ZodType<
|
|
23
|
+
SubscriptionMetadata$Outbound,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
SubscriptionMetadata
|
|
26
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
27
|
+
|
|
28
|
+
export function subscriptionMetadataToJSON(
|
|
29
|
+
subscriptionMetadata: SubscriptionMetadata,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
SubscriptionMetadata$outboundSchema.parse(subscriptionMetadata),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export function subscriptionMetadataFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<SubscriptionMetadata, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => SubscriptionMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'SubscriptionMetadata' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
package/src/sdk/subscriptions.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { subscriptionsGeneratePortalLink } from "../funcs/subscriptionsGenerateP
|
|
|
7
7
|
import { subscriptionsGet } from "../funcs/subscriptionsGet.js";
|
|
8
8
|
import { subscriptionsList } from "../funcs/subscriptionsList.js";
|
|
9
9
|
import { subscriptionsTerminate } from "../funcs/subscriptionsTerminate.js";
|
|
10
|
+
import { subscriptionsUpdateSubscription } from "../funcs/subscriptionsUpdateSubscription.js";
|
|
10
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
12
|
import * as models from "../models/index.js";
|
|
12
13
|
import * as operations from "../models/operations/index.js";
|
|
@@ -58,6 +59,20 @@ export class Subscriptions extends ClientSDK {
|
|
|
58
59
|
));
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Update
|
|
64
|
+
*/
|
|
65
|
+
async updateSubscription(
|
|
66
|
+
request: operations.UpdateSubscriptionRequest,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<models.Subscription> {
|
|
69
|
+
return unwrapAsync(subscriptionsUpdateSubscription(
|
|
70
|
+
this,
|
|
71
|
+
request,
|
|
72
|
+
options,
|
|
73
|
+
));
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
/**
|
|
62
77
|
* Generate Portal Link
|
|
63
78
|
*
|