@unified-api/typescript-sdk 2.9.13 → 2.9.15
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 +12 -0
- package/docs/sdks/payment/README.md +494 -0
- package/docs/sdks/subscription/README.md +501 -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/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- 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/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/getunifiedintegrationauth.d.ts +6 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +2 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -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/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/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/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/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/crmevent.d.ts +18 -0
- package/sdk/models/shared/crmevent.d.ts.map +1 -1
- package/sdk/models/shared/crmevent.js +16 -0
- package/sdk/models/shared/crmevent.js.map +1 -1
- package/sdk/models/shared/crmeventformfield.d.ts +95 -0
- package/sdk/models/shared/crmeventformfield.d.ts.map +1 -0
- package/sdk/models/shared/crmeventformfield.js +96 -0
- package/sdk/models/shared/crmeventformfield.js.map +1 -0
- package/sdk/models/shared/crmeventformoption.d.ts +31 -0
- package/sdk/models/shared/crmeventformoption.d.ts.map +1 -0
- package/sdk/models/shared/crmeventformoption.js +61 -0
- package/sdk/models/shared/crmeventformoption.js.map +1 -0
- package/sdk/models/shared/index.d.ts +7 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +7 -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 +6 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/propertycrmeventform.d.ts +36 -0
- package/sdk/models/shared/propertycrmeventform.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventform.js +78 -0
- package/sdk/models/shared/propertycrmeventform.js.map +1 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.d.ts +47 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.js +80 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.js.map +1 -0
- package/sdk/models/shared/propertycrmeventpageview.d.ts +33 -0
- package/sdk/models/shared/propertycrmeventpageview.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventpageview.js +63 -0
- package/sdk/models/shared/propertycrmeventpageview.js.map +1 -0
- 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/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 +3 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -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 +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -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/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/lib/config.ts +2 -2
- package/src/sdk/models/operations/createpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/getpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listpaymentsubscriptions.ts +126 -0
- package/src/sdk/models/operations/patchpaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/removepaymentsubscription.ts +156 -0
- package/src/sdk/models/operations/updatepaymentsubscription.ts +101 -0
- package/src/sdk/models/shared/accountingjournal.ts +8 -6
- package/src/sdk/models/shared/crmevent.ts +37 -0
- package/src/sdk/models/shared/crmeventformfield.ts +123 -0
- package/src/sdk/models/shared/crmeventformoption.ts +70 -0
- package/src/sdk/models/shared/index.ts +7 -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 +2 -0
- package/src/sdk/models/shared/propertycrmeventform.ts +96 -0
- package/src/sdk/models/shared/propertycrmeventmarketingemail.ts +107 -0
- package/src/sdk/models/shared/propertycrmeventpageview.ts +74 -0
- package/src/sdk/models/shared/repoorganization.ts +12 -10
- package/src/sdk/models/shared/ticketingnote.ts +4 -3
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/payment.ts +90 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/subscription.ts +100 -0
- package/sdk/models/shared/paymentlinklineitem.d.ts.map +0 -1
- package/sdk/models/shared/paymentlinklineitem.js.map +0 -1
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# Subscription
|
|
2
|
+
(*subscription*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [createPaymentSubscription](#createpaymentsubscription) - Create a subscription
|
|
9
|
+
* [getPaymentSubscription](#getpaymentsubscription) - Retrieve a subscription
|
|
10
|
+
* [listPaymentSubscriptions](#listpaymentsubscriptions) - List all subscriptions
|
|
11
|
+
* [patchPaymentSubscription](#patchpaymentsubscription) - Update a subscription
|
|
12
|
+
* [removePaymentSubscription](#removepaymentsubscription) - Remove a subscription
|
|
13
|
+
* [updatePaymentSubscription](#updatepaymentsubscription) - Update a subscription
|
|
14
|
+
|
|
15
|
+
## createPaymentSubscription
|
|
16
|
+
|
|
17
|
+
Create a subscription
|
|
18
|
+
|
|
19
|
+
### Example Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
23
|
+
|
|
24
|
+
const unifiedTo = new UnifiedTo({
|
|
25
|
+
security: {
|
|
26
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
async function run() {
|
|
31
|
+
const result = await unifiedTo.subscription.createPaymentSubscription({
|
|
32
|
+
connectionId: "<id>",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Handle the result
|
|
36
|
+
console.log(result);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
run();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Standalone function
|
|
43
|
+
|
|
44
|
+
The standalone function version of this method:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
48
|
+
import { subscriptionCreatePaymentSubscription } from "@unified-api/typescript-sdk/funcs/subscriptionCreatePaymentSubscription.js";
|
|
49
|
+
|
|
50
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
51
|
+
// You can create one instance of it to use across an application.
|
|
52
|
+
const unifiedTo = new UnifiedToCore({
|
|
53
|
+
security: {
|
|
54
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
async function run() {
|
|
59
|
+
const res = await subscriptionCreatePaymentSubscription(unifiedTo, {
|
|
60
|
+
connectionId: "<id>",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (!res.ok) {
|
|
64
|
+
throw res.error;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const { value: result } = res;
|
|
68
|
+
|
|
69
|
+
// Handle the result
|
|
70
|
+
console.log(result);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
run();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Parameters
|
|
77
|
+
|
|
78
|
+
| Parameter | Type | Required | Description |
|
|
79
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
80
|
+
| `request` | [operations.CreatePaymentSubscriptionRequest](../../sdk/models/operations/createpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
81
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
82
|
+
| `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. |
|
|
83
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
84
|
+
|
|
85
|
+
### Response
|
|
86
|
+
|
|
87
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
88
|
+
|
|
89
|
+
### Errors
|
|
90
|
+
|
|
91
|
+
| Error Type | Status Code | Content Type |
|
|
92
|
+
| --------------- | --------------- | --------------- |
|
|
93
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
94
|
+
|
|
95
|
+
## getPaymentSubscription
|
|
96
|
+
|
|
97
|
+
Retrieve a subscription
|
|
98
|
+
|
|
99
|
+
### Example Usage
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
103
|
+
|
|
104
|
+
const unifiedTo = new UnifiedTo({
|
|
105
|
+
security: {
|
|
106
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
async function run() {
|
|
111
|
+
const result = await unifiedTo.subscription.getPaymentSubscription({
|
|
112
|
+
connectionId: "<id>",
|
|
113
|
+
id: "<id>",
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Handle the result
|
|
117
|
+
console.log(result);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
run();
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Standalone function
|
|
124
|
+
|
|
125
|
+
The standalone function version of this method:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
129
|
+
import { subscriptionGetPaymentSubscription } from "@unified-api/typescript-sdk/funcs/subscriptionGetPaymentSubscription.js";
|
|
130
|
+
|
|
131
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
132
|
+
// You can create one instance of it to use across an application.
|
|
133
|
+
const unifiedTo = new UnifiedToCore({
|
|
134
|
+
security: {
|
|
135
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
async function run() {
|
|
140
|
+
const res = await subscriptionGetPaymentSubscription(unifiedTo, {
|
|
141
|
+
connectionId: "<id>",
|
|
142
|
+
id: "<id>",
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
if (!res.ok) {
|
|
146
|
+
throw res.error;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const { value: result } = res;
|
|
150
|
+
|
|
151
|
+
// Handle the result
|
|
152
|
+
console.log(result);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
run();
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Parameters
|
|
159
|
+
|
|
160
|
+
| Parameter | Type | Required | Description |
|
|
161
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
162
|
+
| `request` | [operations.GetPaymentSubscriptionRequest](../../sdk/models/operations/getpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
163
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
164
|
+
| `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. |
|
|
165
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
166
|
+
|
|
167
|
+
### Response
|
|
168
|
+
|
|
169
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
170
|
+
|
|
171
|
+
### Errors
|
|
172
|
+
|
|
173
|
+
| Error Type | Status Code | Content Type |
|
|
174
|
+
| --------------- | --------------- | --------------- |
|
|
175
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
176
|
+
|
|
177
|
+
## listPaymentSubscriptions
|
|
178
|
+
|
|
179
|
+
List all subscriptions
|
|
180
|
+
|
|
181
|
+
### Example Usage
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
185
|
+
|
|
186
|
+
const unifiedTo = new UnifiedTo({
|
|
187
|
+
security: {
|
|
188
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
async function run() {
|
|
193
|
+
const result = await unifiedTo.subscription.listPaymentSubscriptions({
|
|
194
|
+
connectionId: "<id>",
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Handle the result
|
|
198
|
+
console.log(result);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
run();
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Standalone function
|
|
205
|
+
|
|
206
|
+
The standalone function version of this method:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
210
|
+
import { subscriptionListPaymentSubscriptions } from "@unified-api/typescript-sdk/funcs/subscriptionListPaymentSubscriptions.js";
|
|
211
|
+
|
|
212
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
213
|
+
// You can create one instance of it to use across an application.
|
|
214
|
+
const unifiedTo = new UnifiedToCore({
|
|
215
|
+
security: {
|
|
216
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
async function run() {
|
|
221
|
+
const res = await subscriptionListPaymentSubscriptions(unifiedTo, {
|
|
222
|
+
connectionId: "<id>",
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
if (!res.ok) {
|
|
226
|
+
throw res.error;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const { value: result } = res;
|
|
230
|
+
|
|
231
|
+
// Handle the result
|
|
232
|
+
console.log(result);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
run();
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Parameters
|
|
239
|
+
|
|
240
|
+
| Parameter | Type | Required | Description |
|
|
241
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
242
|
+
| `request` | [operations.ListPaymentSubscriptionsRequest](../../sdk/models/operations/listpaymentsubscriptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
243
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
244
|
+
| `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. |
|
|
245
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
246
|
+
|
|
247
|
+
### Response
|
|
248
|
+
|
|
249
|
+
**Promise\<[shared.PaymentSubscription[]](../../models/.md)\>**
|
|
250
|
+
|
|
251
|
+
### Errors
|
|
252
|
+
|
|
253
|
+
| Error Type | Status Code | Content Type |
|
|
254
|
+
| --------------- | --------------- | --------------- |
|
|
255
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
256
|
+
|
|
257
|
+
## patchPaymentSubscription
|
|
258
|
+
|
|
259
|
+
Update a subscription
|
|
260
|
+
|
|
261
|
+
### Example Usage
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
265
|
+
|
|
266
|
+
const unifiedTo = new UnifiedTo({
|
|
267
|
+
security: {
|
|
268
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
async function run() {
|
|
273
|
+
const result = await unifiedTo.subscription.patchPaymentSubscription({
|
|
274
|
+
connectionId: "<id>",
|
|
275
|
+
id: "<id>",
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// Handle the result
|
|
279
|
+
console.log(result);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
run();
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Standalone function
|
|
286
|
+
|
|
287
|
+
The standalone function version of this method:
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
291
|
+
import { subscriptionPatchPaymentSubscription } from "@unified-api/typescript-sdk/funcs/subscriptionPatchPaymentSubscription.js";
|
|
292
|
+
|
|
293
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
294
|
+
// You can create one instance of it to use across an application.
|
|
295
|
+
const unifiedTo = new UnifiedToCore({
|
|
296
|
+
security: {
|
|
297
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
async function run() {
|
|
302
|
+
const res = await subscriptionPatchPaymentSubscription(unifiedTo, {
|
|
303
|
+
connectionId: "<id>",
|
|
304
|
+
id: "<id>",
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
if (!res.ok) {
|
|
308
|
+
throw res.error;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const { value: result } = res;
|
|
312
|
+
|
|
313
|
+
// Handle the result
|
|
314
|
+
console.log(result);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
run();
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Parameters
|
|
321
|
+
|
|
322
|
+
| Parameter | Type | Required | Description |
|
|
323
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
324
|
+
| `request` | [operations.PatchPaymentSubscriptionRequest](../../sdk/models/operations/patchpaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
325
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
326
|
+
| `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. |
|
|
327
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
328
|
+
|
|
329
|
+
### Response
|
|
330
|
+
|
|
331
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
332
|
+
|
|
333
|
+
### Errors
|
|
334
|
+
|
|
335
|
+
| Error Type | Status Code | Content Type |
|
|
336
|
+
| --------------- | --------------- | --------------- |
|
|
337
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
338
|
+
|
|
339
|
+
## removePaymentSubscription
|
|
340
|
+
|
|
341
|
+
Remove a subscription
|
|
342
|
+
|
|
343
|
+
### Example Usage
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
347
|
+
|
|
348
|
+
const unifiedTo = new UnifiedTo({
|
|
349
|
+
security: {
|
|
350
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
351
|
+
},
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
async function run() {
|
|
355
|
+
const result = await unifiedTo.subscription.removePaymentSubscription({
|
|
356
|
+
connectionId: "<id>",
|
|
357
|
+
id: "<id>",
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// Handle the result
|
|
361
|
+
console.log(result);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
run();
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Standalone function
|
|
368
|
+
|
|
369
|
+
The standalone function version of this method:
|
|
370
|
+
|
|
371
|
+
```typescript
|
|
372
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
373
|
+
import { subscriptionRemovePaymentSubscription } from "@unified-api/typescript-sdk/funcs/subscriptionRemovePaymentSubscription.js";
|
|
374
|
+
|
|
375
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
376
|
+
// You can create one instance of it to use across an application.
|
|
377
|
+
const unifiedTo = new UnifiedToCore({
|
|
378
|
+
security: {
|
|
379
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
380
|
+
},
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
async function run() {
|
|
384
|
+
const res = await subscriptionRemovePaymentSubscription(unifiedTo, {
|
|
385
|
+
connectionId: "<id>",
|
|
386
|
+
id: "<id>",
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
if (!res.ok) {
|
|
390
|
+
throw res.error;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const { value: result } = res;
|
|
394
|
+
|
|
395
|
+
// Handle the result
|
|
396
|
+
console.log(result);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
run();
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Parameters
|
|
403
|
+
|
|
404
|
+
| Parameter | Type | Required | Description |
|
|
405
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
406
|
+
| `request` | [operations.RemovePaymentSubscriptionRequest](../../sdk/models/operations/removepaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
407
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
408
|
+
| `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. |
|
|
409
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
410
|
+
|
|
411
|
+
### Response
|
|
412
|
+
|
|
413
|
+
**Promise\<[operations.RemovePaymentSubscriptionResponse](../../sdk/models/operations/removepaymentsubscriptionresponse.md)\>**
|
|
414
|
+
|
|
415
|
+
### Errors
|
|
416
|
+
|
|
417
|
+
| Error Type | Status Code | Content Type |
|
|
418
|
+
| --------------- | --------------- | --------------- |
|
|
419
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
420
|
+
|
|
421
|
+
## updatePaymentSubscription
|
|
422
|
+
|
|
423
|
+
Update a subscription
|
|
424
|
+
|
|
425
|
+
### Example Usage
|
|
426
|
+
|
|
427
|
+
```typescript
|
|
428
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
429
|
+
|
|
430
|
+
const unifiedTo = new UnifiedTo({
|
|
431
|
+
security: {
|
|
432
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
async function run() {
|
|
437
|
+
const result = await unifiedTo.subscription.updatePaymentSubscription({
|
|
438
|
+
connectionId: "<id>",
|
|
439
|
+
id: "<id>",
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
// Handle the result
|
|
443
|
+
console.log(result);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
run();
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Standalone function
|
|
450
|
+
|
|
451
|
+
The standalone function version of this method:
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
455
|
+
import { subscriptionUpdatePaymentSubscription } from "@unified-api/typescript-sdk/funcs/subscriptionUpdatePaymentSubscription.js";
|
|
456
|
+
|
|
457
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
458
|
+
// You can create one instance of it to use across an application.
|
|
459
|
+
const unifiedTo = new UnifiedToCore({
|
|
460
|
+
security: {
|
|
461
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
async function run() {
|
|
466
|
+
const res = await subscriptionUpdatePaymentSubscription(unifiedTo, {
|
|
467
|
+
connectionId: "<id>",
|
|
468
|
+
id: "<id>",
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
if (!res.ok) {
|
|
472
|
+
throw res.error;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const { value: result } = res;
|
|
476
|
+
|
|
477
|
+
// Handle the result
|
|
478
|
+
console.log(result);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
run();
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Parameters
|
|
485
|
+
|
|
486
|
+
| Parameter | Type | Required | Description |
|
|
487
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
488
|
+
| `request` | [operations.UpdatePaymentSubscriptionRequest](../../sdk/models/operations/updatepaymentsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
489
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
490
|
+
| `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. |
|
|
491
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
492
|
+
|
|
493
|
+
### Response
|
|
494
|
+
|
|
495
|
+
**Promise\<[shared.PaymentSubscription](../../sdk/models/shared/paymentsubscription.md)\>**
|
|
496
|
+
|
|
497
|
+
### Errors
|
|
498
|
+
|
|
499
|
+
| Error Type | Status Code | Content Type |
|
|
500
|
+
| --------------- | --------------- | --------------- |
|
|
501
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UnifiedToCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/errors/httpclienterrors.js";
|
|
4
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
5
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
7
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
8
|
+
import { Result } from "../sdk/types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Create a subscription
|
|
11
|
+
*/
|
|
12
|
+
export declare function paymentCreatePaymentSubscription(client: UnifiedToCore, request: operations.CreatePaymentSubscriptionRequest, options?: RequestOptions): Promise<Result<shared.PaymentSubscription, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
13
|
+
//# sourceMappingURL=paymentCreatePaymentSubscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentCreatePaymentSubscription.d.ts","sourceRoot":"","sources":["../src/funcs/paymentCreatePaymentSubscription.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,MAAM,CAAC,mBAAmB,EACxB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA6FA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.paymentCreatePaymentSubscription = paymentCreatePaymentSubscription;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
33
|
+
const security_js_1 = require("../lib/security.js");
|
|
34
|
+
const url_js_1 = require("../lib/url.js");
|
|
35
|
+
const operations = __importStar(require("../sdk/models/operations/index.js"));
|
|
36
|
+
const shared = __importStar(require("../sdk/models/shared/index.js"));
|
|
37
|
+
/**
|
|
38
|
+
* Create a subscription
|
|
39
|
+
*/
|
|
40
|
+
async function paymentCreatePaymentSubscription(client, request, options) {
|
|
41
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CreatePaymentSubscriptionRequest$outboundSchema.parse(value), "Input validation failed");
|
|
42
|
+
if (!parsed.ok) {
|
|
43
|
+
return parsed;
|
|
44
|
+
}
|
|
45
|
+
const payload = parsed.value;
|
|
46
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload.PaymentSubscription, {
|
|
47
|
+
explode: true,
|
|
48
|
+
});
|
|
49
|
+
const pathParams = {
|
|
50
|
+
connection_id: (0, encodings_js_1.encodeSimple)("connection_id", payload.connection_id, {
|
|
51
|
+
explode: false,
|
|
52
|
+
charEncoding: "percent",
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
const path = (0, url_js_1.pathToFunc)("/payment/{connection_id}/subscription")(pathParams);
|
|
56
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
57
|
+
"fields": payload.fields,
|
|
58
|
+
});
|
|
59
|
+
const headers = new Headers({
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
Accept: "application/json",
|
|
62
|
+
});
|
|
63
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
64
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
65
|
+
const context = {
|
|
66
|
+
operationID: "createPaymentSubscription",
|
|
67
|
+
oAuth2Scopes: [],
|
|
68
|
+
resolvedSecurity: requestSecurity,
|
|
69
|
+
securitySource: client._options.security,
|
|
70
|
+
retryConfig: options?.retries
|
|
71
|
+
|| client._options.retryConfig
|
|
72
|
+
|| { strategy: "none" },
|
|
73
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
74
|
+
};
|
|
75
|
+
const requestRes = client._createRequest(context, {
|
|
76
|
+
security: requestSecurity,
|
|
77
|
+
method: "POST",
|
|
78
|
+
baseURL: options?.serverURL,
|
|
79
|
+
path: path,
|
|
80
|
+
headers: headers,
|
|
81
|
+
query: query,
|
|
82
|
+
body: body,
|
|
83
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
84
|
+
}, options);
|
|
85
|
+
if (!requestRes.ok) {
|
|
86
|
+
return requestRes;
|
|
87
|
+
}
|
|
88
|
+
const req = requestRes.value;
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
errorCodes: ["4XX", "5XX"],
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return doResult;
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
const [result] = await M.match(M.json(200, shared.PaymentSubscription$inboundSchema), M.fail(["4XX", "5XX"]))(response);
|
|
100
|
+
if (!result.ok) {
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=paymentCreatePaymentSubscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentCreatePaymentSubscription.js","sourceRoot":"","sources":["../src/funcs/paymentCreatePaymentSubscription.ts"],"names":[],"mappings":"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"}
|