@flexprice/sdk 2.1.49-dev.1 → 2.1.49-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sdk/models/billing-address.md +20 -0
- package/docs/sdk/models/billing-details.md +18 -0
- package/docs/sdk/models/billing-entity-mode-response.md +15 -0
- package/docs/sdk/models/billing-entity-mode.md +17 -0
- package/docs/sdk/models/billing-entity-response.md +27 -0
- package/docs/sdk/models/create-billing-entity-request.md +21 -0
- package/docs/sdk/models/create-customer-request.md +1 -0
- package/docs/sdk/models/customer-filter.md +1 -0
- package/docs/sdk/models/customer-response.md +1 -0
- package/docs/sdk/models/customer.md +1 -0
- package/docs/sdk/models/get-billing-entity-request.md +17 -0
- package/docs/sdk/models/invoice-billing-entity.md +17 -0
- package/docs/sdk/models/invoice-filter.md +1 -0
- package/docs/sdk/models/invoice-response.md +2 -0
- package/docs/sdk/models/list-billing-entities-order.md +15 -0
- package/docs/sdk/models/list-billing-entities-request.md +22 -0
- package/docs/sdk/models/list-billing-entities-response.md +16 -0
- package/docs/sdk/models/list-billing-entities-status.md +15 -0
- package/docs/sdk/models/tax-rate-entity-type.md +2 -2
- package/docs/sdk/models/update-billing-entity-request-request.md +19 -0
- package/docs/sdk/models/update-billing-entity-request.md +18 -0
- package/docs/sdk/models/update-customer-request.md +1 -0
- package/docs/sdk/models/webhook-dto-customer.md +1 -0
- package/docs/sdk/models/webhook-dto-invoice.md +1 -0
- package/docs/sdks/billingentities/README.md +442 -0
- package/docs/sdks/subscriptions/README.md +1 -1
- package/esm/funcs/billing-entities-create-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-create-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-create-billing-entity.js +83 -0
- package/esm/funcs/billing-entities-create-billing-entity.js.map +1 -0
- package/esm/funcs/billing-entities-enable-billing-entities.d.ts +17 -0
- package/esm/funcs/billing-entities-enable-billing-entities.d.ts.map +1 -0
- package/esm/funcs/billing-entities-enable-billing-entities.js +72 -0
- package/esm/funcs/billing-entities-enable-billing-entities.js.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.d.ts +17 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.d.ts.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.js +72 -0
- package/esm/funcs/billing-entities-get-billing-entities-status.js.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-get-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-get-billing-entity.js +91 -0
- package/esm/funcs/billing-entities-get-billing-entity.js.map +1 -0
- package/esm/funcs/billing-entities-list-billing-entities.d.ts +17 -0
- package/esm/funcs/billing-entities-list-billing-entities.d.ts.map +1 -0
- package/esm/funcs/billing-entities-list-billing-entities.js +94 -0
- package/esm/funcs/billing-entities-list-billing-entities.js.map +1 -0
- package/esm/funcs/billing-entities-update-billing-entity.d.ts +17 -0
- package/esm/funcs/billing-entities-update-billing-entity.d.ts.map +1 -0
- package/esm/funcs/billing-entities-update-billing-entity.js +93 -0
- package/esm/funcs/billing-entities-update-billing-entity.js.map +1 -0
- package/esm/funcs/subscriptions-cancel-subscription.js +1 -1
- package/esm/funcs/subscriptions-cancel-subscription.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/billing-entities.d.ts +47 -0
- package/esm/sdk/billing-entities.d.ts.map +1 -0
- package/esm/sdk/billing-entities.js +68 -0
- package/esm/sdk/billing-entities.js.map +1 -0
- package/esm/sdk/models/billing-address.d.ts +27 -0
- package/esm/sdk/models/billing-address.d.ts.map +1 -0
- package/esm/sdk/models/billing-address.js +50 -0
- package/esm/sdk/models/billing-address.js.map +1 -0
- package/esm/sdk/models/billing-details.d.ts +24 -0
- package/esm/sdk/models/billing-details.d.ts.map +1 -0
- package/esm/sdk/models/billing-details.js +37 -0
- package/esm/sdk/models/billing-details.js.map +1 -0
- package/esm/sdk/models/billing-entity-mode-response.d.ts +11 -0
- package/esm/sdk/models/billing-entity-mode-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-mode-response.js +15 -0
- package/esm/sdk/models/billing-entity-mode-response.js.map +1 -0
- package/esm/sdk/models/billing-entity-mode.d.ts +11 -0
- package/esm/sdk/models/billing-entity-mode.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-mode.js +12 -0
- package/esm/sdk/models/billing-entity-mode.js.map +1 -0
- package/esm/sdk/models/billing-entity-response.d.ts +26 -0
- package/esm/sdk/models/billing-entity-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-entity-response.js +41 -0
- package/esm/sdk/models/billing-entity-response.js.map +1 -0
- package/esm/sdk/models/create-billing-entity-request.d.ts +23 -0
- package/esm/sdk/models/create-billing-entity-request.d.ts.map +1 -0
- package/esm/sdk/models/create-billing-entity-request.js +22 -0
- package/esm/sdk/models/create-billing-entity-request.js.map +1 -0
- package/esm/sdk/models/create-customer-request.d.ts +8 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +2 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/customer-filter.d.ts +5 -0
- package/esm/sdk/models/customer-filter.d.ts.map +1 -1
- package/esm/sdk/models/customer-filter.js +2 -0
- package/esm/sdk/models/customer-filter.js.map +1 -1
- package/esm/sdk/models/customer-response.d.ts +4 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +2 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +4 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +2 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/get-billing-entity-op.d.ts +15 -0
- package/esm/sdk/models/get-billing-entity-op.d.ts.map +1 -0
- package/esm/sdk/models/get-billing-entity-op.js +12 -0
- package/esm/sdk/models/get-billing-entity-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +12 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +12 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-billing-entity.d.ts +13 -0
- package/esm/sdk/models/invoice-billing-entity.d.ts.map +1 -0
- package/esm/sdk/models/invoice-billing-entity.js +23 -0
- package/esm/sdk/models/invoice-billing-entity.js.map +1 -0
- package/esm/sdk/models/invoice-filter.d.ts +5 -0
- package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
- package/esm/sdk/models/invoice-filter.js +2 -0
- package/esm/sdk/models/invoice-filter.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +6 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +5 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/list-billing-entities-op.d.ts +42 -0
- package/esm/sdk/models/list-billing-entities-op.d.ts.map +1 -0
- package/esm/sdk/models/list-billing-entities-op.js +38 -0
- package/esm/sdk/models/list-billing-entities-op.js.map +1 -0
- package/esm/sdk/models/list-billing-entities-response.d.ts +13 -0
- package/esm/sdk/models/list-billing-entities-response.d.ts.map +1 -0
- package/esm/sdk/models/list-billing-entities-response.js +17 -0
- package/esm/sdk/models/list-billing-entities-response.js.map +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/tax-rate-entity-type.js +1 -0
- package/esm/sdk/models/tax-rate-entity-type.js.map +1 -1
- package/esm/sdk/models/update-billing-entity-op.d.ts +21 -0
- package/esm/sdk/models/update-billing-entity-op.d.ts.map +1 -0
- package/esm/sdk/models/update-billing-entity-op.js +14 -0
- package/esm/sdk/models/update-billing-entity-op.js.map +1 -0
- package/esm/sdk/models/update-billing-entity-request.d.ts +23 -0
- package/esm/sdk/models/update-billing-entity-request.d.ts.map +1 -0
- package/esm/sdk/models/update-billing-entity-request.js +22 -0
- package/esm/sdk/models/update-billing-entity-request.js.map +1 -0
- package/esm/sdk/models/update-customer-request.d.ts +5 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +2 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/webhook-dto-customer.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-customer.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-customer.js +2 -0
- package/esm/sdk/models/webhook-dto-customer.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-invoice.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.js +2 -0
- package/esm/sdk/models/webhook-dto-invoice.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/billing-entities-create-billing-entity.ts +172 -0
- package/src/funcs/billing-entities-enable-billing-entities.ts +153 -0
- package/src/funcs/billing-entities-get-billing-entities-status.ts +152 -0
- package/src/funcs/billing-entities-get-billing-entity.ts +181 -0
- package/src/funcs/billing-entities-list-billing-entities.ts +191 -0
- package/src/funcs/billing-entities-update-billing-entity.ts +187 -0
- package/src/funcs/subscriptions-cancel-subscription.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/sdk/billing-entities.ts +115 -0
- package/src/sdk/models/billing-address.ts +91 -0
- package/src/sdk/models/billing-details.ts +79 -0
- package/src/sdk/models/billing-entity-mode-response.ts +35 -0
- package/src/sdk/models/billing-entity-mode.ts +20 -0
- package/src/sdk/models/billing-entity-response.ts +76 -0
- package/src/sdk/models/create-billing-entity-request.ts +53 -0
- package/src/sdk/models/create-customer-request.ts +10 -0
- package/src/sdk/models/customer-filter.ts +7 -0
- package/src/sdk/models/customer-response.ts +6 -0
- package/src/sdk/models/customer.ts +6 -0
- package/src/sdk/models/get-billing-entity-op.ts +33 -0
- package/src/sdk/models/index.ts +12 -0
- package/src/sdk/models/invoice-billing-entity.ts +48 -0
- package/src/sdk/models/invoice-filter.ts +7 -0
- package/src/sdk/models/invoice-response.ts +13 -0
- package/src/sdk/models/list-billing-entities-op.ts +88 -0
- package/src/sdk/models/list-billing-entities-response.ts +41 -0
- package/src/sdk/models/tax-rate-entity-type.ts +1 -0
- package/src/sdk/models/update-billing-entity-op.ts +46 -0
- package/src/sdk/models/update-billing-entity-request.ts +53 -0
- package/src/sdk/models/update-customer-request.ts +7 -0
- package/src/sdk/models/webhook-dto-customer.ts +3 -0
- package/src/sdk/models/webhook-dto-invoice.ts +3 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# BillingEntities
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
### Available Operations
|
|
6
|
+
|
|
7
|
+
* [listBillingEntities](#listbillingentities) - List billing entities
|
|
8
|
+
* [createBillingEntity](#createbillingentity) - Create a billing entity
|
|
9
|
+
* [enableBillingEntities](#enablebillingentities) - Enable billing entities
|
|
10
|
+
* [getBillingEntitiesStatus](#getbillingentitiesstatus) - Get billing entities status
|
|
11
|
+
* [getBillingEntity](#getbillingentity) - Get a billing entity
|
|
12
|
+
* [updateBillingEntity](#updatebillingentity) - Update a billing entity
|
|
13
|
+
|
|
14
|
+
## listBillingEntities
|
|
15
|
+
|
|
16
|
+
List the billing entities of this environment.
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
<!-- UsageSnippet language="typescript" operationID="listBillingEntities" method="get" path="/billing-entities" -->
|
|
21
|
+
```typescript
|
|
22
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
23
|
+
|
|
24
|
+
const flexprice = new Flexprice({
|
|
25
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await flexprice.billingEntities.listBillingEntities();
|
|
30
|
+
|
|
31
|
+
console.log(result);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
run();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Standalone function
|
|
38
|
+
|
|
39
|
+
The standalone function version of this method:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
43
|
+
import { billingEntitiesListBillingEntities } from "@flexprice/sdk/funcs/billing-entities-list-billing-entities.js";
|
|
44
|
+
|
|
45
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
46
|
+
// You can create one instance of it to use across an application.
|
|
47
|
+
const flexprice = new FlexpriceCore({
|
|
48
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
async function run() {
|
|
52
|
+
const res = await billingEntitiesListBillingEntities(flexprice);
|
|
53
|
+
if (res.ok) {
|
|
54
|
+
const { value: result } = res;
|
|
55
|
+
console.log(result);
|
|
56
|
+
} else {
|
|
57
|
+
console.log("billingEntitiesListBillingEntities failed:", res.error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
run();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Required | Description |
|
|
67
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
68
|
+
| `request` | [models.ListBillingEntitiesRequest](../../sdk/models/list-billing-entities-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
69
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
70
|
+
| `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. |
|
|
71
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
72
|
+
|
|
73
|
+
### Response
|
|
74
|
+
|
|
75
|
+
**Promise\<[models.ListBillingEntitiesResponse](../../sdk/models/list-billing-entities-response.md)\>**
|
|
76
|
+
|
|
77
|
+
### Errors
|
|
78
|
+
|
|
79
|
+
| Error Type | Status Code | Content Type |
|
|
80
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
81
|
+
| models.ErrorsErrorResponse | 400 | application/json |
|
|
82
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
83
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
84
|
+
|
|
85
|
+
## createBillingEntity
|
|
86
|
+
|
|
87
|
+
Create a legal entity that bills customers in this environment. Requires billing entities to be enabled.
|
|
88
|
+
|
|
89
|
+
### Example Usage
|
|
90
|
+
|
|
91
|
+
<!-- UsageSnippet language="typescript" operationID="createBillingEntity" method="post" path="/billing-entities" -->
|
|
92
|
+
```typescript
|
|
93
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
94
|
+
|
|
95
|
+
const flexprice = new Flexprice({
|
|
96
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
async function run() {
|
|
100
|
+
const result = await flexprice.billingEntities.createBillingEntity({
|
|
101
|
+
invoiceNumberPrefix: "<value>",
|
|
102
|
+
name: "<value>",
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
console.log(result);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
run();
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Standalone function
|
|
112
|
+
|
|
113
|
+
The standalone function version of this method:
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
117
|
+
import { billingEntitiesCreateBillingEntity } from "@flexprice/sdk/funcs/billing-entities-create-billing-entity.js";
|
|
118
|
+
|
|
119
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
120
|
+
// You can create one instance of it to use across an application.
|
|
121
|
+
const flexprice = new FlexpriceCore({
|
|
122
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
async function run() {
|
|
126
|
+
const res = await billingEntitiesCreateBillingEntity(flexprice, {
|
|
127
|
+
invoiceNumberPrefix: "<value>",
|
|
128
|
+
name: "<value>",
|
|
129
|
+
});
|
|
130
|
+
if (res.ok) {
|
|
131
|
+
const { value: result } = res;
|
|
132
|
+
console.log(result);
|
|
133
|
+
} else {
|
|
134
|
+
console.log("billingEntitiesCreateBillingEntity failed:", res.error);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
run();
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Parameters
|
|
142
|
+
|
|
143
|
+
| Parameter | Type | Required | Description |
|
|
144
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
145
|
+
| `request` | [models.CreateBillingEntityRequest](../../sdk/models/create-billing-entity-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
146
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
147
|
+
| `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. |
|
|
148
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
149
|
+
|
|
150
|
+
### Response
|
|
151
|
+
|
|
152
|
+
**Promise\<[models.BillingEntityResponse](../../sdk/models/billing-entity-response.md)\>**
|
|
153
|
+
|
|
154
|
+
### Errors
|
|
155
|
+
|
|
156
|
+
| Error Type | Status Code | Content Type |
|
|
157
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
158
|
+
| models.ErrorsErrorResponse | 400, 409 | application/json |
|
|
159
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
160
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
161
|
+
|
|
162
|
+
## enableBillingEntities
|
|
163
|
+
|
|
164
|
+
Start enabling billing entities in the environment. The environment gets a default entity and its existing customers are assigned to it. Irreversible.
|
|
165
|
+
|
|
166
|
+
### Example Usage
|
|
167
|
+
|
|
168
|
+
<!-- UsageSnippet language="typescript" operationID="enableBillingEntities" method="post" path="/billing-entities/enable" -->
|
|
169
|
+
```typescript
|
|
170
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
171
|
+
|
|
172
|
+
const flexprice = new Flexprice({
|
|
173
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
async function run() {
|
|
177
|
+
const result = await flexprice.billingEntities.enableBillingEntities();
|
|
178
|
+
|
|
179
|
+
console.log(result);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
run();
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Standalone function
|
|
186
|
+
|
|
187
|
+
The standalone function version of this method:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
191
|
+
import { billingEntitiesEnableBillingEntities } from "@flexprice/sdk/funcs/billing-entities-enable-billing-entities.js";
|
|
192
|
+
|
|
193
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
194
|
+
// You can create one instance of it to use across an application.
|
|
195
|
+
const flexprice = new FlexpriceCore({
|
|
196
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
async function run() {
|
|
200
|
+
const res = await billingEntitiesEnableBillingEntities(flexprice);
|
|
201
|
+
if (res.ok) {
|
|
202
|
+
const { value: result } = res;
|
|
203
|
+
console.log(result);
|
|
204
|
+
} else {
|
|
205
|
+
console.log("billingEntitiesEnableBillingEntities failed:", res.error);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
run();
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Parameters
|
|
213
|
+
|
|
214
|
+
| Parameter | Type | Required | Description |
|
|
215
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
216
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
217
|
+
| `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. |
|
|
218
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
219
|
+
|
|
220
|
+
### Response
|
|
221
|
+
|
|
222
|
+
**Promise\<[models.BillingEntityModeResponse](../../sdk/models/billing-entity-mode-response.md)\>**
|
|
223
|
+
|
|
224
|
+
### Errors
|
|
225
|
+
|
|
226
|
+
| Error Type | Status Code | Content Type |
|
|
227
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
228
|
+
| models.ErrorsErrorResponse | 400, 403 | application/json |
|
|
229
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
230
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
231
|
+
|
|
232
|
+
## getBillingEntitiesStatus
|
|
233
|
+
|
|
234
|
+
Whether billing entities are off, enabling or enabled in the environment.
|
|
235
|
+
|
|
236
|
+
### Example Usage
|
|
237
|
+
|
|
238
|
+
<!-- UsageSnippet language="typescript" operationID="getBillingEntitiesStatus" method="get" path="/billing-entities/status" -->
|
|
239
|
+
```typescript
|
|
240
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
241
|
+
|
|
242
|
+
const flexprice = new Flexprice({
|
|
243
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
async function run() {
|
|
247
|
+
const result = await flexprice.billingEntities.getBillingEntitiesStatus();
|
|
248
|
+
|
|
249
|
+
console.log(result);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
run();
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Standalone function
|
|
256
|
+
|
|
257
|
+
The standalone function version of this method:
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
261
|
+
import { billingEntitiesGetBillingEntitiesStatus } from "@flexprice/sdk/funcs/billing-entities-get-billing-entities-status.js";
|
|
262
|
+
|
|
263
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
264
|
+
// You can create one instance of it to use across an application.
|
|
265
|
+
const flexprice = new FlexpriceCore({
|
|
266
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
async function run() {
|
|
270
|
+
const res = await billingEntitiesGetBillingEntitiesStatus(flexprice);
|
|
271
|
+
if (res.ok) {
|
|
272
|
+
const { value: result } = res;
|
|
273
|
+
console.log(result);
|
|
274
|
+
} else {
|
|
275
|
+
console.log("billingEntitiesGetBillingEntitiesStatus failed:", res.error);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
run();
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Parameters
|
|
283
|
+
|
|
284
|
+
| Parameter | Type | Required | Description |
|
|
285
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
286
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
287
|
+
| `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. |
|
|
288
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
289
|
+
|
|
290
|
+
### Response
|
|
291
|
+
|
|
292
|
+
**Promise\<[models.BillingEntityModeResponse](../../sdk/models/billing-entity-mode-response.md)\>**
|
|
293
|
+
|
|
294
|
+
### Errors
|
|
295
|
+
|
|
296
|
+
| Error Type | Status Code | Content Type |
|
|
297
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
298
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
299
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
300
|
+
|
|
301
|
+
## getBillingEntity
|
|
302
|
+
|
|
303
|
+
Load a single billing entity by ID.
|
|
304
|
+
|
|
305
|
+
### Example Usage
|
|
306
|
+
|
|
307
|
+
<!-- UsageSnippet language="typescript" operationID="getBillingEntity" method="get" path="/billing-entities/{id}" -->
|
|
308
|
+
```typescript
|
|
309
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
310
|
+
|
|
311
|
+
const flexprice = new Flexprice({
|
|
312
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
async function run() {
|
|
316
|
+
const result = await flexprice.billingEntities.getBillingEntity("<id>");
|
|
317
|
+
|
|
318
|
+
console.log(result);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
run();
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Standalone function
|
|
325
|
+
|
|
326
|
+
The standalone function version of this method:
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
330
|
+
import { billingEntitiesGetBillingEntity } from "@flexprice/sdk/funcs/billing-entities-get-billing-entity.js";
|
|
331
|
+
|
|
332
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
333
|
+
// You can create one instance of it to use across an application.
|
|
334
|
+
const flexprice = new FlexpriceCore({
|
|
335
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
async function run() {
|
|
339
|
+
const res = await billingEntitiesGetBillingEntity(flexprice, "<id>");
|
|
340
|
+
if (res.ok) {
|
|
341
|
+
const { value: result } = res;
|
|
342
|
+
console.log(result);
|
|
343
|
+
} else {
|
|
344
|
+
console.log("billingEntitiesGetBillingEntity failed:", res.error);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
run();
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Parameters
|
|
352
|
+
|
|
353
|
+
| Parameter | Type | Required | Description |
|
|
354
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
355
|
+
| `id` | *string* | :heavy_check_mark: | Billing entity ID |
|
|
356
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
357
|
+
| `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. |
|
|
358
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
359
|
+
|
|
360
|
+
### Response
|
|
361
|
+
|
|
362
|
+
**Promise\<[models.BillingEntityResponse](../../sdk/models/billing-entity-response.md)\>**
|
|
363
|
+
|
|
364
|
+
### Errors
|
|
365
|
+
|
|
366
|
+
| Error Type | Status Code | Content Type |
|
|
367
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
368
|
+
| models.ErrorsErrorResponse | 400, 404 | application/json |
|
|
369
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
370
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
371
|
+
|
|
372
|
+
## updateBillingEntity
|
|
373
|
+
|
|
374
|
+
Edit a billing entity. Drafts and future invoices use the new details; finalized invoices keep theirs.
|
|
375
|
+
|
|
376
|
+
### Example Usage
|
|
377
|
+
|
|
378
|
+
<!-- UsageSnippet language="typescript" operationID="updateBillingEntity" method="put" path="/billing-entities/{id}" -->
|
|
379
|
+
```typescript
|
|
380
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
381
|
+
|
|
382
|
+
const flexprice = new Flexprice({
|
|
383
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
async function run() {
|
|
387
|
+
const result = await flexprice.billingEntities.updateBillingEntity("<id>", {});
|
|
388
|
+
|
|
389
|
+
console.log(result);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
run();
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Standalone function
|
|
396
|
+
|
|
397
|
+
The standalone function version of this method:
|
|
398
|
+
|
|
399
|
+
```typescript
|
|
400
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
401
|
+
import { billingEntitiesUpdateBillingEntity } from "@flexprice/sdk/funcs/billing-entities-update-billing-entity.js";
|
|
402
|
+
|
|
403
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
404
|
+
// You can create one instance of it to use across an application.
|
|
405
|
+
const flexprice = new FlexpriceCore({
|
|
406
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
async function run() {
|
|
410
|
+
const res = await billingEntitiesUpdateBillingEntity(flexprice, "<id>", {});
|
|
411
|
+
if (res.ok) {
|
|
412
|
+
const { value: result } = res;
|
|
413
|
+
console.log(result);
|
|
414
|
+
} else {
|
|
415
|
+
console.log("billingEntitiesUpdateBillingEntity failed:", res.error);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
run();
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Parameters
|
|
423
|
+
|
|
424
|
+
| Parameter | Type | Required | Description |
|
|
425
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
426
|
+
| `id` | *string* | :heavy_check_mark: | Billing entity ID |
|
|
427
|
+
| `body` | [models.UpdateBillingEntityRequest](../../sdk/models/update-billing-entity-request.md) | :heavy_check_mark: | Fields to change |
|
|
428
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
429
|
+
| `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. |
|
|
430
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
431
|
+
|
|
432
|
+
### Response
|
|
433
|
+
|
|
434
|
+
**Promise\<[models.BillingEntityResponse](../../sdk/models/billing-entity-response.md)\>**
|
|
435
|
+
|
|
436
|
+
### Errors
|
|
437
|
+
|
|
438
|
+
| Error Type | Status Code | Content Type |
|
|
439
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
440
|
+
| models.ErrorsErrorResponse | 400, 404, 409 | application/json |
|
|
441
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
442
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1280,7 +1280,7 @@ run();
|
|
|
1280
1280
|
|
|
1281
1281
|
| Error Type | Status Code | Content Type |
|
|
1282
1282
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
1283
|
-
| models.ErrorsErrorResponse | 400
|
|
1283
|
+
| models.ErrorsErrorResponse | 400, 409 | application/json |
|
|
1284
1284
|
| models.ErrorsErrorResponse | 500 | application/json |
|
|
1285
1285
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1286
1286
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FlexpriceCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/http-client-errors.js";
|
|
5
|
+
import * as models from "../sdk/models/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
7
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Create a billing entity
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Create a legal entity that bills customers in this environment. Requires billing entities to be enabled.
|
|
15
|
+
*/
|
|
16
|
+
export declare function billingEntitiesCreateBillingEntity(client: FlexpriceCore, request: models.CreateBillingEntityRequest, options?: RequestOptions): APIPromise<Result<models.BillingEntityResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=billing-entities-create-billing-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-entities-create-billing-entity.d.ts","sourceRoot":"","sources":["../../src/funcs/billing-entities-create-billing-entity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,CAAC,0BAA0B,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,qBAAqB,EAC1B,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as models from "../sdk/models/index.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* Create a billing entity
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Create a legal entity that bills customers in this environment. Requires billing entities to be enabled.
|
|
19
|
+
*/
|
|
20
|
+
export function billingEntitiesCreateBillingEntity(client, request, options) {
|
|
21
|
+
return new APIPromise($do(client, request, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, request, options) {
|
|
24
|
+
const parsed = safeParse(request, (value) => z.parse(models.CreateBillingEntityRequest$outboundSchema, value), "Input validation failed");
|
|
25
|
+
if (!parsed.ok) {
|
|
26
|
+
return [parsed, { status: "invalid" }];
|
|
27
|
+
}
|
|
28
|
+
const payload = parsed.value;
|
|
29
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
30
|
+
const path = pathToFunc("/billing-entities")();
|
|
31
|
+
const headers = new Headers(compactMap({
|
|
32
|
+
"Content-Type": "application/json",
|
|
33
|
+
Accept: "application/json",
|
|
34
|
+
}));
|
|
35
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
36
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
37
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
38
|
+
const context = {
|
|
39
|
+
options: client._options,
|
|
40
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
41
|
+
operationID: "createBillingEntity",
|
|
42
|
+
oAuth2Scopes: null,
|
|
43
|
+
resolvedSecurity: requestSecurity,
|
|
44
|
+
securitySource: client._options.apiKeyAuth,
|
|
45
|
+
retryConfig: options?.retries
|
|
46
|
+
|| client._options.retryConfig
|
|
47
|
+
|| { strategy: "none" },
|
|
48
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
49
|
+
};
|
|
50
|
+
const requestRes = client._createRequest(context, {
|
|
51
|
+
security: requestSecurity,
|
|
52
|
+
method: "POST",
|
|
53
|
+
baseURL: options?.serverURL,
|
|
54
|
+
path: path,
|
|
55
|
+
headers: headers,
|
|
56
|
+
body: body,
|
|
57
|
+
userAgent: client._options.userAgent,
|
|
58
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
59
|
+
}, options);
|
|
60
|
+
if (!requestRes.ok) {
|
|
61
|
+
return [requestRes, { status: "invalid" }];
|
|
62
|
+
}
|
|
63
|
+
const req = requestRes.value;
|
|
64
|
+
const doResult = await client._do(req, {
|
|
65
|
+
context,
|
|
66
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
67
|
+
retryConfig: context.retryConfig,
|
|
68
|
+
retryCodes: context.retryCodes,
|
|
69
|
+
});
|
|
70
|
+
if (!doResult.ok) {
|
|
71
|
+
return [doResult, { status: "request-error", request: req }];
|
|
72
|
+
}
|
|
73
|
+
const response = doResult.value;
|
|
74
|
+
const responseFields = {
|
|
75
|
+
HttpMeta: { Response: response, Request: req },
|
|
76
|
+
};
|
|
77
|
+
const [result] = await M.match(M.json(201, models.BillingEntityResponse$inboundSchema), M.jsonErr([400, 409], models.ErrorsErrorResponse$inboundSchema), M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
78
|
+
if (!result.ok) {
|
|
79
|
+
return [result, { status: "complete", request: req, response }];
|
|
80
|
+
}
|
|
81
|
+
return [result, { status: "complete", request: req, response }];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=billing-entities-create-billing-entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-entities-create-billing-entity.js","sourceRoot":"","sources":["../../src/funcs/billing-entities-create-billing-entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FlexpriceCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/http-client-errors.js";
|
|
5
|
+
import * as models from "../sdk/models/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
7
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Enable billing entities
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Start enabling billing entities in the environment. The environment gets a default entity and its existing customers are assigned to it. Irreversible.
|
|
15
|
+
*/
|
|
16
|
+
export declare function billingEntitiesEnableBillingEntities(client: FlexpriceCore, options?: RequestOptions): APIPromise<Result<models.BillingEntityModeResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=billing-entities-enable-billing-entities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-entities-enable-billing-entities.d.ts","sourceRoot":"","sources":["../../src/funcs/billing-entities-enable-billing-entities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,yBAAyB,EAC9B,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}
|