@unified-api/typescript-sdk 2.9.14 → 2.9.16
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 +24 -0
- package/docs/sdks/comment/README.md +501 -0
- package/docs/sdks/payment/README.md +494 -0
- package/docs/sdks/subscription/README.md +501 -0
- package/docs/sdks/task/README.md +494 -0
- package/funcs/commentCreateTaskComment.d.ts +13 -0
- package/funcs/commentCreateTaskComment.d.ts.map +1 -0
- package/funcs/commentCreateTaskComment.js +103 -0
- package/funcs/commentCreateTaskComment.js.map +1 -0
- package/funcs/commentGetTaskComment.d.ts +13 -0
- package/funcs/commentGetTaskComment.d.ts.map +1 -0
- package/funcs/commentGetTaskComment.js +106 -0
- package/funcs/commentGetTaskComment.js.map +1 -0
- package/funcs/commentListTaskComments.d.ts +13 -0
- package/funcs/commentListTaskComments.d.ts.map +1 -0
- package/funcs/commentListTaskComments.js +110 -0
- package/funcs/commentListTaskComments.js.map +1 -0
- package/funcs/commentPatchTaskComment.d.ts +13 -0
- package/funcs/commentPatchTaskComment.d.ts.map +1 -0
- package/funcs/commentPatchTaskComment.js +107 -0
- package/funcs/commentPatchTaskComment.js.map +1 -0
- package/funcs/commentRemoveTaskComment.d.ts +12 -0
- package/funcs/commentRemoveTaskComment.d.ts.map +1 -0
- package/funcs/commentRemoveTaskComment.js +104 -0
- package/funcs/commentRemoveTaskComment.js.map +1 -0
- package/funcs/commentUpdateTaskComment.d.ts +13 -0
- package/funcs/commentUpdateTaskComment.d.ts.map +1 -0
- package/funcs/commentUpdateTaskComment.js +107 -0
- package/funcs/commentUpdateTaskComment.js.map +1 -0
- package/funcs/paymentCreatePaymentSubscription.d.ts +13 -0
- package/funcs/paymentCreatePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentCreatePaymentSubscription.js +105 -0
- package/funcs/paymentCreatePaymentSubscription.js.map +1 -0
- package/funcs/paymentGetPaymentSubscription.d.ts +13 -0
- package/funcs/paymentGetPaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentGetPaymentSubscription.js +106 -0
- package/funcs/paymentGetPaymentSubscription.js.map +1 -0
- package/funcs/paymentListPaymentSubscriptions.d.ts +13 -0
- package/funcs/paymentListPaymentSubscriptions.d.ts.map +1 -0
- package/funcs/paymentListPaymentSubscriptions.js +110 -0
- package/funcs/paymentListPaymentSubscriptions.js.map +1 -0
- package/funcs/paymentPatchPaymentSubscription.d.ts +13 -0
- package/funcs/paymentPatchPaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentPatchPaymentSubscription.js +109 -0
- package/funcs/paymentPatchPaymentSubscription.js.map +1 -0
- package/funcs/paymentRemovePaymentSubscription.d.ts +12 -0
- package/funcs/paymentRemovePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentRemovePaymentSubscription.js +104 -0
- package/funcs/paymentRemovePaymentSubscription.js.map +1 -0
- package/funcs/paymentUpdatePaymentSubscription.d.ts +13 -0
- package/funcs/paymentUpdatePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentUpdatePaymentSubscription.js +109 -0
- package/funcs/paymentUpdatePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionCreatePaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionCreatePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionCreatePaymentSubscription.js +105 -0
- package/funcs/subscriptionCreatePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionGetPaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionGetPaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionGetPaymentSubscription.js +106 -0
- package/funcs/subscriptionGetPaymentSubscription.js.map +1 -0
- package/funcs/subscriptionListPaymentSubscriptions.d.ts +13 -0
- package/funcs/subscriptionListPaymentSubscriptions.d.ts.map +1 -0
- package/funcs/subscriptionListPaymentSubscriptions.js +110 -0
- package/funcs/subscriptionListPaymentSubscriptions.js.map +1 -0
- package/funcs/subscriptionPatchPaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionPatchPaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionPatchPaymentSubscription.js +109 -0
- package/funcs/subscriptionPatchPaymentSubscription.js.map +1 -0
- package/funcs/subscriptionRemovePaymentSubscription.d.ts +12 -0
- package/funcs/subscriptionRemovePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionRemovePaymentSubscription.js +104 -0
- package/funcs/subscriptionRemovePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionUpdatePaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionUpdatePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionUpdatePaymentSubscription.js +109 -0
- package/funcs/subscriptionUpdatePaymentSubscription.js.map +1 -0
- package/funcs/taskCreateTaskComment.d.ts +13 -0
- package/funcs/taskCreateTaskComment.d.ts.map +1 -0
- package/funcs/taskCreateTaskComment.js +103 -0
- package/funcs/taskCreateTaskComment.js.map +1 -0
- package/funcs/taskGetTaskComment.d.ts +13 -0
- package/funcs/taskGetTaskComment.d.ts.map +1 -0
- package/funcs/taskGetTaskComment.js +106 -0
- package/funcs/taskGetTaskComment.js.map +1 -0
- package/funcs/taskListTaskComments.d.ts +13 -0
- package/funcs/taskListTaskComments.d.ts.map +1 -0
- package/funcs/taskListTaskComments.js +110 -0
- package/funcs/taskListTaskComments.js.map +1 -0
- package/funcs/taskPatchTaskComment.d.ts +13 -0
- package/funcs/taskPatchTaskComment.d.ts.map +1 -0
- package/funcs/taskPatchTaskComment.js +107 -0
- package/funcs/taskPatchTaskComment.js.map +1 -0
- package/funcs/taskRemoveTaskComment.d.ts +12 -0
- package/funcs/taskRemoveTaskComment.d.ts.map +1 -0
- package/funcs/taskRemoveTaskComment.js +104 -0
- package/funcs/taskRemoveTaskComment.js.map +1 -0
- package/funcs/taskUpdateTaskComment.d.ts +13 -0
- package/funcs/taskUpdateTaskComment.d.ts.map +1 -0
- package/funcs/taskUpdateTaskComment.js +107 -0
- package/funcs/taskUpdateTaskComment.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/comment.d.ts +30 -0
- package/sdk/comment.d.ts.map +1 -0
- package/sdk/comment.js +54 -0
- package/sdk/comment.js.map +1 -0
- package/sdk/models/operations/createpaymentsubscription.d.ts +40 -0
- package/sdk/models/operations/createpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/createpaymentsubscription.js +75 -0
- package/sdk/models/operations/createpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/createtaskcomment.d.ts +40 -0
- package/sdk/models/operations/createtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/createtaskcomment.js +75 -0
- package/sdk/models/operations/createtaskcomment.js.map +1 -0
- package/sdk/models/operations/getpaymentsubscription.d.ts +42 -0
- package/sdk/models/operations/getpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/getpaymentsubscription.js +72 -0
- package/sdk/models/operations/getpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/gettaskcomment.d.ts +42 -0
- package/sdk/models/operations/gettaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/gettaskcomment.js +72 -0
- package/sdk/models/operations/gettaskcomment.js.map +1 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +12 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +4 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +12 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +12 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listpaymentsubscriptions.d.ts +57 -0
- package/sdk/models/operations/listpaymentsubscriptions.d.ts.map +1 -0
- package/sdk/models/operations/listpaymentsubscriptions.js +89 -0
- package/sdk/models/operations/listpaymentsubscriptions.js.map +1 -0
- package/sdk/models/operations/listtaskcomments.d.ts +57 -0
- package/sdk/models/operations/listtaskcomments.d.ts.map +1 -0
- package/sdk/models/operations/listtaskcomments.js +89 -0
- package/sdk/models/operations/listtaskcomments.js.map +1 -0
- package/sdk/models/operations/patchpaymentsubscription.d.ts +45 -0
- package/sdk/models/operations/patchpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/patchpaymentsubscription.js +77 -0
- package/sdk/models/operations/patchpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/patchtaskcomment.d.ts +45 -0
- package/sdk/models/operations/patchtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/patchtaskcomment.js +77 -0
- package/sdk/models/operations/patchtaskcomment.js.map +1 -0
- package/sdk/models/operations/removepaymentsubscription.d.ts +66 -0
- package/sdk/models/operations/removepaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/removepaymentsubscription.js +105 -0
- package/sdk/models/operations/removepaymentsubscription.js.map +1 -0
- package/sdk/models/operations/removetaskcomment.d.ts +66 -0
- package/sdk/models/operations/removetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/removetaskcomment.js +105 -0
- package/sdk/models/operations/removetaskcomment.js.map +1 -0
- package/sdk/models/operations/updatepaymentsubscription.d.ts +45 -0
- package/sdk/models/operations/updatepaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/updatepaymentsubscription.js +77 -0
- package/sdk/models/operations/updatepaymentsubscription.js.map +1 -0
- package/sdk/models/operations/updatetaskcomment.d.ts +45 -0
- package/sdk/models/operations/updatetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/updatetaskcomment.js +77 -0
- package/sdk/models/operations/updatetaskcomment.js.map +1 -0
- package/sdk/models/shared/accountingjournal.d.ts +2 -2
- package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
- package/sdk/models/shared/accountingjournal.js +6 -4
- package/sdk/models/shared/accountingjournal.js.map +1 -1
- package/sdk/models/shared/index.d.ts +3 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +3 -1
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/{paymentlinklineitem.d.ts → paymentlineitem.d.ts} +14 -14
- package/sdk/models/shared/paymentlineitem.d.ts.map +1 -0
- package/sdk/models/shared/{paymentlinklineitem.js → paymentlineitem.js} +17 -17
- package/sdk/models/shared/paymentlineitem.js.map +1 -0
- package/sdk/models/shared/paymentlink.d.ts +3 -3
- package/sdk/models/shared/paymentlink.d.ts.map +1 -1
- package/sdk/models/shared/paymentlink.js +3 -3
- package/sdk/models/shared/paymentlink.js.map +1 -1
- package/sdk/models/shared/paymentrefund.d.ts +2 -2
- package/sdk/models/shared/paymentrefund.d.ts.map +1 -1
- package/sdk/models/shared/paymentrefund.js +6 -4
- package/sdk/models/shared/paymentrefund.js.map +1 -1
- package/sdk/models/shared/paymentsubscription.d.ts +135 -0
- package/sdk/models/shared/paymentsubscription.d.ts.map +1 -0
- package/sdk/models/shared/paymentsubscription.js +176 -0
- package/sdk/models/shared/paymentsubscription.js.map +1 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +12 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +4 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/propertycrmeventemail.d.ts +2 -2
- package/sdk/models/shared/repoorganization.d.ts +4 -4
- package/sdk/models/shared/repoorganization.d.ts.map +1 -1
- package/sdk/models/shared/repoorganization.js +8 -6
- package/sdk/models/shared/repoorganization.js.map +1 -1
- package/sdk/models/shared/taskcomment.d.ts +47 -0
- package/sdk/models/shared/taskcomment.d.ts.map +1 -0
- package/sdk/models/shared/taskcomment.js +92 -0
- package/sdk/models/shared/taskcomment.js.map +1 -0
- package/sdk/models/shared/tasktask.d.ts +5 -0
- package/sdk/models/shared/tasktask.d.ts.map +1 -1
- package/sdk/models/shared/tasktask.js +4 -0
- package/sdk/models/shared/tasktask.js.map +1 -1
- package/sdk/models/shared/ticketingnote.d.ts +1 -1
- package/sdk/models/shared/ticketingnote.d.ts.map +1 -1
- package/sdk/models/shared/ticketingnote.js +3 -2
- package/sdk/models/shared/ticketingnote.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +6 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +2 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/payment.d.ts +24 -0
- package/sdk/payment.d.ts.map +1 -1
- package/sdk/payment.js +42 -0
- package/sdk/payment.js.map +1 -1
- package/sdk/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +8 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/subscription.d.ts +30 -0
- package/sdk/subscription.d.ts.map +1 -0
- package/sdk/subscription.js +54 -0
- package/sdk/subscription.js.map +1 -0
- package/sdk/task.d.ts +24 -0
- package/sdk/task.d.ts.map +1 -1
- package/sdk/task.js +42 -0
- package/sdk/task.js.map +1 -1
- package/src/funcs/commentCreateTaskComment.ts +133 -0
- package/src/funcs/commentGetTaskComment.ts +136 -0
- package/src/funcs/commentListTaskComments.ts +140 -0
- package/src/funcs/commentPatchTaskComment.ts +137 -0
- package/src/funcs/commentRemoveTaskComment.ts +139 -0
- package/src/funcs/commentUpdateTaskComment.ts +137 -0
- package/src/funcs/paymentCreatePaymentSubscription.ts +136 -0
- package/src/funcs/paymentGetPaymentSubscription.ts +139 -0
- package/src/funcs/paymentListPaymentSubscriptions.ts +141 -0
- package/src/funcs/paymentPatchPaymentSubscription.ts +142 -0
- package/src/funcs/paymentRemovePaymentSubscription.ts +145 -0
- package/src/funcs/paymentUpdatePaymentSubscription.ts +142 -0
- package/src/funcs/subscriptionCreatePaymentSubscription.ts +136 -0
- package/src/funcs/subscriptionGetPaymentSubscription.ts +139 -0
- package/src/funcs/subscriptionListPaymentSubscriptions.ts +141 -0
- package/src/funcs/subscriptionPatchPaymentSubscription.ts +142 -0
- package/src/funcs/subscriptionRemovePaymentSubscription.ts +145 -0
- package/src/funcs/subscriptionUpdatePaymentSubscription.ts +142 -0
- package/src/funcs/taskCreateTaskComment.ts +133 -0
- package/src/funcs/taskGetTaskComment.ts +136 -0
- package/src/funcs/taskListTaskComments.ts +140 -0
- package/src/funcs/taskPatchTaskComment.ts +137 -0
- package/src/funcs/taskRemoveTaskComment.ts +139 -0
- package/src/funcs/taskUpdateTaskComment.ts +137 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/comment.ts +100 -0
- package/src/sdk/models/operations/createpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/createtaskcomment.ts +92 -0
- package/src/sdk/models/operations/getpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/gettaskcomment.ts +92 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +4 -0
- package/src/sdk/models/operations/index.ts +12 -0
- package/src/sdk/models/operations/listpaymentsubscriptions.ts +126 -0
- package/src/sdk/models/operations/listtaskcomments.ts +124 -0
- package/src/sdk/models/operations/patchpaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/patchtaskcomment.ts +99 -0
- package/src/sdk/models/operations/removepaymentsubscription.ts +156 -0
- package/src/sdk/models/operations/removetaskcomment.ts +151 -0
- package/src/sdk/models/operations/updatepaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/updatetaskcomment.ts +99 -0
- package/src/sdk/models/shared/accountingjournal.ts +8 -6
- package/src/sdk/models/shared/index.ts +3 -1
- package/src/sdk/models/shared/{paymentlinklineitem.ts → paymentlineitem.ts} +21 -23
- package/src/sdk/models/shared/paymentlink.ts +9 -9
- package/src/sdk/models/shared/paymentrefund.ts +8 -6
- package/src/sdk/models/shared/paymentsubscription.ts +247 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +4 -0
- package/src/sdk/models/shared/propertycrmeventemail.ts +2 -2
- package/src/sdk/models/shared/repoorganization.ts +12 -10
- package/src/sdk/models/shared/taskcomment.ts +109 -0
- package/src/sdk/models/shared/tasktask.ts +9 -0
- package/src/sdk/models/shared/ticketingnote.ts +4 -3
- package/src/sdk/models/shared/webhook.ts +2 -0
- package/src/sdk/payment.ts +90 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/subscription.ts +100 -0
- package/src/sdk/task.ts +90 -0
- package/sdk/models/shared/paymentlinklineitem.d.ts.map +0 -1
- package/sdk/models/shared/paymentlinklineitem.js.map +0 -1
|
@@ -7,20 +7,26 @@
|
|
|
7
7
|
|
|
8
8
|
* [createPaymentLink](#createpaymentlink) - Create a link
|
|
9
9
|
* [createPaymentPayment](#createpaymentpayment) - Create a payment
|
|
10
|
+
* [createPaymentSubscription](#createpaymentsubscription) - Create a subscription
|
|
10
11
|
* [getPaymentLink](#getpaymentlink) - Retrieve a link
|
|
11
12
|
* [getPaymentPayment](#getpaymentpayment) - Retrieve a payment
|
|
12
13
|
* [getPaymentPayout](#getpaymentpayout) - Retrieve a payout
|
|
13
14
|
* [getPaymentRefund](#getpaymentrefund) - Retrieve a refund
|
|
15
|
+
* [getPaymentSubscription](#getpaymentsubscription) - Retrieve a subscription
|
|
14
16
|
* [listPaymentLinks](#listpaymentlinks) - List all links
|
|
15
17
|
* [listPaymentPayments](#listpaymentpayments) - List all payments
|
|
16
18
|
* [listPaymentPayouts](#listpaymentpayouts) - List all payouts
|
|
17
19
|
* [listPaymentRefunds](#listpaymentrefunds) - List all refunds
|
|
20
|
+
* [listPaymentSubscriptions](#listpaymentsubscriptions) - List all subscriptions
|
|
18
21
|
* [patchPaymentLink](#patchpaymentlink) - Update a link
|
|
19
22
|
* [patchPaymentPayment](#patchpaymentpayment) - Update a payment
|
|
23
|
+
* [patchPaymentSubscription](#patchpaymentsubscription) - Update a subscription
|
|
20
24
|
* [removePaymentLink](#removepaymentlink) - Remove a link
|
|
21
25
|
* [removePaymentPayment](#removepaymentpayment) - Remove a payment
|
|
26
|
+
* [removePaymentSubscription](#removepaymentsubscription) - Remove a subscription
|
|
22
27
|
* [updatePaymentLink](#updatepaymentlink) - Update a link
|
|
23
28
|
* [updatePaymentPayment](#updatepaymentpayment) - Update a payment
|
|
29
|
+
* [updatePaymentSubscription](#updatepaymentsubscription) - Update a subscription
|
|
24
30
|
|
|
25
31
|
## createPaymentLink
|
|
26
32
|
|
|
@@ -182,6 +188,86 @@ run();
|
|
|
182
188
|
| --------------- | --------------- | --------------- |
|
|
183
189
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
184
190
|
|
|
191
|
+
## createPaymentSubscription
|
|
192
|
+
|
|
193
|
+
Create a subscription
|
|
194
|
+
|
|
195
|
+
### Example Usage
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
199
|
+
|
|
200
|
+
const unifiedTo = new UnifiedTo({
|
|
201
|
+
security: {
|
|
202
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
async function run() {
|
|
207
|
+
const result = await unifiedTo.payment.createPaymentSubscription({
|
|
208
|
+
connectionId: "<id>",
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// Handle the result
|
|
212
|
+
console.log(result);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
run();
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Standalone function
|
|
219
|
+
|
|
220
|
+
The standalone function version of this method:
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
224
|
+
import { paymentCreatePaymentSubscription } from "@unified-api/typescript-sdk/funcs/paymentCreatePaymentSubscription.js";
|
|
225
|
+
|
|
226
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
227
|
+
// You can create one instance of it to use across an application.
|
|
228
|
+
const unifiedTo = new UnifiedToCore({
|
|
229
|
+
security: {
|
|
230
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
async function run() {
|
|
235
|
+
const res = await paymentCreatePaymentSubscription(unifiedTo, {
|
|
236
|
+
connectionId: "<id>",
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
if (!res.ok) {
|
|
240
|
+
throw res.error;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const { value: result } = res;
|
|
244
|
+
|
|
245
|
+
// Handle the result
|
|
246
|
+
console.log(result);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
run();
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Parameters
|
|
253
|
+
|
|
254
|
+
| Parameter | Type | Required | Description |
|
|
255
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
256
|
+
| `request` | [operations.CreatePaymentSubscriptionRequest](../../sdk/models/operations/createpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
257
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
258
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
259
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
260
|
+
|
|
261
|
+
### Response
|
|
262
|
+
|
|
263
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
264
|
+
|
|
265
|
+
### Errors
|
|
266
|
+
|
|
267
|
+
| Error Type | Status Code | Content Type |
|
|
268
|
+
| --------------- | --------------- | --------------- |
|
|
269
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
270
|
+
|
|
185
271
|
## getPaymentLink
|
|
186
272
|
|
|
187
273
|
Retrieve a link
|
|
@@ -510,6 +596,88 @@ run();
|
|
|
510
596
|
| --------------- | --------------- | --------------- |
|
|
511
597
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
512
598
|
|
|
599
|
+
## getPaymentSubscription
|
|
600
|
+
|
|
601
|
+
Retrieve a subscription
|
|
602
|
+
|
|
603
|
+
### Example Usage
|
|
604
|
+
|
|
605
|
+
```typescript
|
|
606
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
607
|
+
|
|
608
|
+
const unifiedTo = new UnifiedTo({
|
|
609
|
+
security: {
|
|
610
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
611
|
+
},
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
async function run() {
|
|
615
|
+
const result = await unifiedTo.payment.getPaymentSubscription({
|
|
616
|
+
connectionId: "<id>",
|
|
617
|
+
id: "<id>",
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
// Handle the result
|
|
621
|
+
console.log(result);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
run();
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Standalone function
|
|
628
|
+
|
|
629
|
+
The standalone function version of this method:
|
|
630
|
+
|
|
631
|
+
```typescript
|
|
632
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
633
|
+
import { paymentGetPaymentSubscription } from "@unified-api/typescript-sdk/funcs/paymentGetPaymentSubscription.js";
|
|
634
|
+
|
|
635
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
636
|
+
// You can create one instance of it to use across an application.
|
|
637
|
+
const unifiedTo = new UnifiedToCore({
|
|
638
|
+
security: {
|
|
639
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
640
|
+
},
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
async function run() {
|
|
644
|
+
const res = await paymentGetPaymentSubscription(unifiedTo, {
|
|
645
|
+
connectionId: "<id>",
|
|
646
|
+
id: "<id>",
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
if (!res.ok) {
|
|
650
|
+
throw res.error;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
const { value: result } = res;
|
|
654
|
+
|
|
655
|
+
// Handle the result
|
|
656
|
+
console.log(result);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
run();
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
### Parameters
|
|
663
|
+
|
|
664
|
+
| Parameter | Type | Required | Description |
|
|
665
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
666
|
+
| `request` | [operations.GetPaymentSubscriptionRequest](../../sdk/models/operations/getpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
667
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
668
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
669
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
670
|
+
|
|
671
|
+
### Response
|
|
672
|
+
|
|
673
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
674
|
+
|
|
675
|
+
### Errors
|
|
676
|
+
|
|
677
|
+
| Error Type | Status Code | Content Type |
|
|
678
|
+
| --------------- | --------------- | --------------- |
|
|
679
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
680
|
+
|
|
513
681
|
## listPaymentLinks
|
|
514
682
|
|
|
515
683
|
List all links
|
|
@@ -830,6 +998,86 @@ run();
|
|
|
830
998
|
| --------------- | --------------- | --------------- |
|
|
831
999
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
832
1000
|
|
|
1001
|
+
## listPaymentSubscriptions
|
|
1002
|
+
|
|
1003
|
+
List all subscriptions
|
|
1004
|
+
|
|
1005
|
+
### Example Usage
|
|
1006
|
+
|
|
1007
|
+
```typescript
|
|
1008
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1009
|
+
|
|
1010
|
+
const unifiedTo = new UnifiedTo({
|
|
1011
|
+
security: {
|
|
1012
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1013
|
+
},
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
async function run() {
|
|
1017
|
+
const result = await unifiedTo.payment.listPaymentSubscriptions({
|
|
1018
|
+
connectionId: "<id>",
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
// Handle the result
|
|
1022
|
+
console.log(result);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
run();
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
### Standalone function
|
|
1029
|
+
|
|
1030
|
+
The standalone function version of this method:
|
|
1031
|
+
|
|
1032
|
+
```typescript
|
|
1033
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1034
|
+
import { paymentListPaymentSubscriptions } from "@unified-api/typescript-sdk/funcs/paymentListPaymentSubscriptions.js";
|
|
1035
|
+
|
|
1036
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1037
|
+
// You can create one instance of it to use across an application.
|
|
1038
|
+
const unifiedTo = new UnifiedToCore({
|
|
1039
|
+
security: {
|
|
1040
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1041
|
+
},
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
async function run() {
|
|
1045
|
+
const res = await paymentListPaymentSubscriptions(unifiedTo, {
|
|
1046
|
+
connectionId: "<id>",
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
if (!res.ok) {
|
|
1050
|
+
throw res.error;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
const { value: result } = res;
|
|
1054
|
+
|
|
1055
|
+
// Handle the result
|
|
1056
|
+
console.log(result);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
run();
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
### Parameters
|
|
1063
|
+
|
|
1064
|
+
| Parameter | Type | Required | Description |
|
|
1065
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1066
|
+
| `request` | [operations.ListPaymentSubscriptionsRequest](../../sdk/models/operations/listpaymentsubscriptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1067
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1068
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1069
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1070
|
+
|
|
1071
|
+
### Response
|
|
1072
|
+
|
|
1073
|
+
**Promise\<[shared.PaymentSubscription[]](../../models/.md)\>**
|
|
1074
|
+
|
|
1075
|
+
### Errors
|
|
1076
|
+
|
|
1077
|
+
| Error Type | Status Code | Content Type |
|
|
1078
|
+
| --------------- | --------------- | --------------- |
|
|
1079
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1080
|
+
|
|
833
1081
|
## patchPaymentLink
|
|
834
1082
|
|
|
835
1083
|
Update a link
|
|
@@ -994,6 +1242,88 @@ run();
|
|
|
994
1242
|
| --------------- | --------------- | --------------- |
|
|
995
1243
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
996
1244
|
|
|
1245
|
+
## patchPaymentSubscription
|
|
1246
|
+
|
|
1247
|
+
Update a subscription
|
|
1248
|
+
|
|
1249
|
+
### Example Usage
|
|
1250
|
+
|
|
1251
|
+
```typescript
|
|
1252
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1253
|
+
|
|
1254
|
+
const unifiedTo = new UnifiedTo({
|
|
1255
|
+
security: {
|
|
1256
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1257
|
+
},
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
async function run() {
|
|
1261
|
+
const result = await unifiedTo.payment.patchPaymentSubscription({
|
|
1262
|
+
connectionId: "<id>",
|
|
1263
|
+
id: "<id>",
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
// Handle the result
|
|
1267
|
+
console.log(result);
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
run();
|
|
1271
|
+
```
|
|
1272
|
+
|
|
1273
|
+
### Standalone function
|
|
1274
|
+
|
|
1275
|
+
The standalone function version of this method:
|
|
1276
|
+
|
|
1277
|
+
```typescript
|
|
1278
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1279
|
+
import { paymentPatchPaymentSubscription } from "@unified-api/typescript-sdk/funcs/paymentPatchPaymentSubscription.js";
|
|
1280
|
+
|
|
1281
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1282
|
+
// You can create one instance of it to use across an application.
|
|
1283
|
+
const unifiedTo = new UnifiedToCore({
|
|
1284
|
+
security: {
|
|
1285
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1286
|
+
},
|
|
1287
|
+
});
|
|
1288
|
+
|
|
1289
|
+
async function run() {
|
|
1290
|
+
const res = await paymentPatchPaymentSubscription(unifiedTo, {
|
|
1291
|
+
connectionId: "<id>",
|
|
1292
|
+
id: "<id>",
|
|
1293
|
+
});
|
|
1294
|
+
|
|
1295
|
+
if (!res.ok) {
|
|
1296
|
+
throw res.error;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
const { value: result } = res;
|
|
1300
|
+
|
|
1301
|
+
// Handle the result
|
|
1302
|
+
console.log(result);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
run();
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
### Parameters
|
|
1309
|
+
|
|
1310
|
+
| Parameter | Type | Required | Description |
|
|
1311
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1312
|
+
| `request` | [operations.PatchPaymentSubscriptionRequest](../../sdk/models/operations/patchpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1313
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1314
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1315
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1316
|
+
|
|
1317
|
+
### Response
|
|
1318
|
+
|
|
1319
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
1320
|
+
|
|
1321
|
+
### Errors
|
|
1322
|
+
|
|
1323
|
+
| Error Type | Status Code | Content Type |
|
|
1324
|
+
| --------------- | --------------- | --------------- |
|
|
1325
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1326
|
+
|
|
997
1327
|
## removePaymentLink
|
|
998
1328
|
|
|
999
1329
|
Remove a link
|
|
@@ -1158,6 +1488,88 @@ run();
|
|
|
1158
1488
|
| --------------- | --------------- | --------------- |
|
|
1159
1489
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1160
1490
|
|
|
1491
|
+
## removePaymentSubscription
|
|
1492
|
+
|
|
1493
|
+
Remove a subscription
|
|
1494
|
+
|
|
1495
|
+
### Example Usage
|
|
1496
|
+
|
|
1497
|
+
```typescript
|
|
1498
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1499
|
+
|
|
1500
|
+
const unifiedTo = new UnifiedTo({
|
|
1501
|
+
security: {
|
|
1502
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1503
|
+
},
|
|
1504
|
+
});
|
|
1505
|
+
|
|
1506
|
+
async function run() {
|
|
1507
|
+
const result = await unifiedTo.payment.removePaymentSubscription({
|
|
1508
|
+
connectionId: "<id>",
|
|
1509
|
+
id: "<id>",
|
|
1510
|
+
});
|
|
1511
|
+
|
|
1512
|
+
// Handle the result
|
|
1513
|
+
console.log(result);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
run();
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
### Standalone function
|
|
1520
|
+
|
|
1521
|
+
The standalone function version of this method:
|
|
1522
|
+
|
|
1523
|
+
```typescript
|
|
1524
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1525
|
+
import { paymentRemovePaymentSubscription } from "@unified-api/typescript-sdk/funcs/paymentRemovePaymentSubscription.js";
|
|
1526
|
+
|
|
1527
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1528
|
+
// You can create one instance of it to use across an application.
|
|
1529
|
+
const unifiedTo = new UnifiedToCore({
|
|
1530
|
+
security: {
|
|
1531
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1532
|
+
},
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
async function run() {
|
|
1536
|
+
const res = await paymentRemovePaymentSubscription(unifiedTo, {
|
|
1537
|
+
connectionId: "<id>",
|
|
1538
|
+
id: "<id>",
|
|
1539
|
+
});
|
|
1540
|
+
|
|
1541
|
+
if (!res.ok) {
|
|
1542
|
+
throw res.error;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
const { value: result } = res;
|
|
1546
|
+
|
|
1547
|
+
// Handle the result
|
|
1548
|
+
console.log(result);
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
run();
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1554
|
+
### Parameters
|
|
1555
|
+
|
|
1556
|
+
| Parameter | Type | Required | Description |
|
|
1557
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1558
|
+
| `request` | [operations.RemovePaymentSubscriptionRequest](../../sdk/models/operations/removepaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1559
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1560
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1561
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1562
|
+
|
|
1563
|
+
### Response
|
|
1564
|
+
|
|
1565
|
+
**Promise\<[operations.RemovePaymentSubscriptionResponse](../../sdk/models/operations/removepaymentsubscriptionresponse.md)\>**
|
|
1566
|
+
|
|
1567
|
+
### Errors
|
|
1568
|
+
|
|
1569
|
+
| Error Type | Status Code | Content Type |
|
|
1570
|
+
| --------------- | --------------- | --------------- |
|
|
1571
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1572
|
+
|
|
1161
1573
|
## updatePaymentLink
|
|
1162
1574
|
|
|
1163
1575
|
Update a link
|
|
@@ -1318,6 +1730,88 @@ run();
|
|
|
1318
1730
|
|
|
1319
1731
|
### Errors
|
|
1320
1732
|
|
|
1733
|
+
| Error Type | Status Code | Content Type |
|
|
1734
|
+
| --------------- | --------------- | --------------- |
|
|
1735
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1736
|
+
|
|
1737
|
+
## updatePaymentSubscription
|
|
1738
|
+
|
|
1739
|
+
Update a subscription
|
|
1740
|
+
|
|
1741
|
+
### Example Usage
|
|
1742
|
+
|
|
1743
|
+
```typescript
|
|
1744
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1745
|
+
|
|
1746
|
+
const unifiedTo = new UnifiedTo({
|
|
1747
|
+
security: {
|
|
1748
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1749
|
+
},
|
|
1750
|
+
});
|
|
1751
|
+
|
|
1752
|
+
async function run() {
|
|
1753
|
+
const result = await unifiedTo.payment.updatePaymentSubscription({
|
|
1754
|
+
connectionId: "<id>",
|
|
1755
|
+
id: "<id>",
|
|
1756
|
+
});
|
|
1757
|
+
|
|
1758
|
+
// Handle the result
|
|
1759
|
+
console.log(result);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
run();
|
|
1763
|
+
```
|
|
1764
|
+
|
|
1765
|
+
### Standalone function
|
|
1766
|
+
|
|
1767
|
+
The standalone function version of this method:
|
|
1768
|
+
|
|
1769
|
+
```typescript
|
|
1770
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1771
|
+
import { paymentUpdatePaymentSubscription } from "@unified-api/typescript-sdk/funcs/paymentUpdatePaymentSubscription.js";
|
|
1772
|
+
|
|
1773
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1774
|
+
// You can create one instance of it to use across an application.
|
|
1775
|
+
const unifiedTo = new UnifiedToCore({
|
|
1776
|
+
security: {
|
|
1777
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1778
|
+
},
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1781
|
+
async function run() {
|
|
1782
|
+
const res = await paymentUpdatePaymentSubscription(unifiedTo, {
|
|
1783
|
+
connectionId: "<id>",
|
|
1784
|
+
id: "<id>",
|
|
1785
|
+
});
|
|
1786
|
+
|
|
1787
|
+
if (!res.ok) {
|
|
1788
|
+
throw res.error;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
const { value: result } = res;
|
|
1792
|
+
|
|
1793
|
+
// Handle the result
|
|
1794
|
+
console.log(result);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
run();
|
|
1798
|
+
```
|
|
1799
|
+
|
|
1800
|
+
### Parameters
|
|
1801
|
+
|
|
1802
|
+
| Parameter | Type | Required | Description |
|
|
1803
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1804
|
+
| `request` | [operations.UpdatePaymentSubscriptionRequest](../../sdk/models/operations/updatepaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1805
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1806
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1807
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1808
|
+
|
|
1809
|
+
### Response
|
|
1810
|
+
|
|
1811
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
1812
|
+
|
|
1813
|
+
### Errors
|
|
1814
|
+
|
|
1321
1815
|
| Error Type | Status Code | Content Type |
|
|
1322
1816
|
| --------------- | --------------- | --------------- |
|
|
1323
1817
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|